Fixed-point Simulink® blocks support the rounding modes shown in the expanded drop-down menu of the following dialog box.
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 Mode | Description | Tie Handling | Cost | Bias |
---|---|---|---|---|
Ceiling | Rounds to the nearest representable number in the direction of positive infinity. | N/A | Low | Large positive |
Convergent | Rounds to the nearest representable number. | Ties are rounded to nearest even number. | High | Unbiased |
Floor | Rounds to the nearest representable number in the direction of negative infinity. Equivalent to two's complement truncation. | N/A | Low | Large negative |
Nearest | Rounds to the nearest representable number. | Ties are rounded to the closest representable number in the direction of positive infinity. | Moderate | Small positive |
Round | Rounds to the nearest representable number. |
| High |
|
Simplest (Simulink only) | Automatically chooses between Floor and
Zero to produce generated code that is as
efficient as possible. | N/A | Low | Depends on the operation |
Zero | Rounds to the nearest representable number in the direction of zero. | N/A | Low |
|