Main Content

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.

Fixed-Point Designer Rounding Modes

To provide you with greater flexibility in the trade-off between cost and bias, the Fixed-Point Designer™ product currently supports the following rounding methods:

Fixed-Point Designer Rounding ModeDescriptionTie HandlingCostBias
CeilingRounds to the nearest representable number in the direction of positive infinity.N/ALowLarge positive
ConvergentRounds to the nearest representable number.Ties are rounded to nearest even number.HighUnbiased
FloorRounds to the nearest representable number in the direction of negative infinity. Equivalent to two's complement truncation.N/ALowLarge negative
NearestRounds to the nearest representable number.Ties are rounded to the closest representable number in the direction of positive infinity.ModerateSmall positive
RoundRounds to the nearest representable number.
  • For positive numbers, ties are rounded to the nearest representable number in the direction of positive infinity.

  • For negative numbers, ties are rounded to the nearest representable number in the direction of negative infinity.

High
  • Small negative for negative samples

  • Unbiased for samples with evenly distributed positive and negative values

  • Small positive for positive samples

Simplest
(Simulink only)
Automatically chooses between Floor and Zero to produce generated code that is as efficient as possible.N/ALowDepends on the operation
ZeroRounds to the nearest representable number in the direction of zero.N/ALow
  • Large positive for negative samples

  • Unbiased for samples with evenly distributed positive and negative values

  • Large negative for positive samples

Related Topics