Main Content

jc_0642: Integer rounding mode setting

Sub ID Recommendations

  • NA-MAAB — a

  • JMAAB — a

MATLABVersions

All

Rule

Sub ID a

When block parameterInteger rounding modeis set toSimplest, configuration parameterProduction hardware signed integer division rounds toshall be set toFloororZero.

Custom Parameter

Not Applicable

例子——正确的

Block parameterInteger rounding modeis set toSimplestand configuration parameterProduction hardware signed integer division rounds tois set toZero.

Example — Incorrect

Configuration parameterProduction hardware signed integer division rounds tois set toUndefinedwhen block parameterInteger rounding modeis set toSimplest.

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

Version History

介绍了R2020a