Rounding Modes for Fixed-Point Simulink Blocks

Fixed-point Simulink® blocks support the rounding modes shown in the expanded drop-down menu of the following dialog box.

The following table illustrates the differences between these rounding modes:

Rounding ModeDescriptionTie Handling
CeilingRounds to the nearest representable number in the direction of positive infinity. N/A
FloorRounds to the nearest representable number in the direction of negative infinity. N/A
ZeroRounds to the nearest representable number in the direction of zero.N/A
ConvergentRounds to the nearest representable number. Ties are rounded toward the nearest even integer.
NearestRounds to the nearest representable number. Ties are rounded to the closest representable number in the direction of positive infinity.
RoundRounds to the nearest representable number.

For positive numbers, ties are rounded toward the closest representable number in the direction of positive infinity.

For negative numbers, ties are rounded toward the closest representable number in the direction of negative infinity.

SimplestAutomatically chooses between Floor and Zero to produce generated code that is as efficient as possible. N/A