11.3 Rounding
Three rounding modes are supported, corresponding to the three rounding modes supported by the 16-bit device fixed-point multiplication facilities.
Mode | Description |
---|---|
Truncation | Truncate signed result - round toward -saturation |
Conventional | Round signed result to nearest, ties toward +saturation |
Convergent | Round signed result to nearest, ties to even |
All operations on fixed point variables, whether intrinsically supported
by the hardware or not, are performed according to the prevailing rounding mode chosen. The
rounding mode may be specified globally via the -menable-fixed
compiler
switch, as described in the Driver Option Descriptions section or on a function-by-function
basis, via the -round
attribute, as described in Function Attributes.
These modes are described in more detail in the “16-bit MCU and DSC Programmer’s Reference Manual” (DS70157).