3.2.5 Functions for handling rounding modes

The fegetround() and fesetround functions let you get and set the current rounding mode.

Note:

The following functionality requires a floating-point model that supports exceptions. In ARM® Compiler 6 this is disabled by default, and can be enabled by the armclang command-line option -ffp-mode=full.

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.

Non-ConfidentialPDF file icon PDF versionARM 100073_0607_00_en
Copyright © 2014–2017 ARM Limited or its affiliates. All rights reserved.