Main Content

jc_0642: Integer rounding mode setting

Sub ID Recommendations

  • NA-MAAB — a

  • JMAAB — a

MATLAB Versions

All

Rule

Sub ID a

When block parameter Integer rounding mode is set to Simplest, configuration parameter Production hardware signed integer division rounds to shall be set to Floor or Zero.

Custom Parameter

Not Applicable

Example — Correct

Block parameter Integer rounding mode is set to Simplest and configuration parameter Production hardware signed integer division rounds to is set to Zero.

Example — Incorrect

Configuration parameter Production hardware signed integer division rounds to is set to Undefined when block parameter Integer rounding mode is set to Simplest.

Rationale

Sub ID a:

  • Prevents unintended rounding of divided signed integers.

Verification

Model Advisor check: Check Signed Integer Division Rounding mode (Simulink Check)

Last Changed

R2020a

See Also

Introduced in R2020a