Signed integer division rounds to - MATLAB & Simulink (original) (raw)

Main Content

Description

Describe how your compiler for the hardware rounds the result of dividing two signed integers.

Category: Hardware Implementation

Settings

Default: Zero

Undefined

Choose this option if neither Zero norFloor describes the compiler behavior, or if that behavior is unknown.

Zero

If the quotient is between two integers, the compiler chooses the integer that is closer to zero as the result.

Floor

If the quotient is between two integers, the compiler chooses the integer that is closer to negative infinity.

Tips

Dependency

Command-Line Information

Parameter: ProdIntDivRoundTo
Type: string
Value: 'Floor' | 'Zero' 'Undefined'
Default: 'Zero'
Application Setting
Debugging No impact for simulation or during development. Undefined for production code generation.
Traceability No impact for simulation or during development. Zero orFloor for production code generation.
Efficiency No impact for simulation or during development. Zero for production code generation.
Safety precaution No recommendation for simulation without code generation.For simulation with code generation, select your Device vendor and Device type if they are available in the drop-down list. If yourDevice vendor and Device type are not available, set device-specific values by using Custom Processor.

See Also