Gets and sets the current rounding direction.
#include <fenv.h> int fegetround (void) int fesetround (round) int round;
The fegetround subroutine gets the current rounding direction.
The fesetround subroutine establishes the rounding direction represented by the round parameter. If the round parameter is not equal to the value of a rounding direction macro, the rounding direction is not changed.
round | Specifies the rounding direction. |
The fegetround subroutine returns the value of the rounding direction macro representing the current rounding direction or a negative value if there is no such rounding direction macro or the current rounding direction is not determinable.
The fesetround subroutine returns a zero value if the requested rounding direction was established.