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 HandlingCostBiasPossibility of Overflow
CeilingRounds to the nearest representable number in the direction of positive infinity.N/ALowLarge positiveYes
ConvergentRounds to the nearest representable number.Ties are rounded to nearest even number.HighUnbiasedYes
FloorRounds to the nearest representable number in the direction of negative infinity. Equivalent to two's complement truncation.N/ALowLarge negativeNo
NearestRounds to the nearest representable number.Ties are rounded to the closest representable number in the direction of positive infinity.ModerateSmall positiveYes
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

Yes
Simplest
(Simulink only)
Automatically chooses between Floor and Zero to produce generated code that is as efficient as possible.N/ALowDepends on the operationNo
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

No

Related Topics