Non-Confidential | PDF version | ARM DUI0475M | ||

| ||||

Home > Floating-point Support > Controlling the ARM floating-point environment > Functions for handling rounding modes |

The `fegetround()`

and `fesetround`

functions let you get and set the current rounding mode.

`--fpmode=ieee_full`

or `--fpmode=ieee_fixed`

. C99 defines these functions as follows:

`int`

fegetround(`void`

);

`int`

fesetround(`int`

round);

The `fegetround()`

function returns the
current rounding mode. The current rounding mode has a value equal
to one of the C99 rounding mode macros or exceptions.

The `fesetround()`

function sets the current
rounding mode to the value provided. `fesetround()`

returns
zero for success, or nonzero if its argument is not a valid rounding
mode.