__fp_read_rnd() — determine rounding mode

Standards

Standards / Extensions C or C++ Dependencies
  Both OS/390® V2R6

Syntax

#include <float.h>
__fprnd_t __fp_read_rnd(void);

General description

For an application running in IEEE floating-point mode, the __fp_read_rnd() function returns the current rounding mode indicated by the rounding mode field of the floating-point control (FPC) register. For an application running in hexadecimal floating-point mode, __fp_read_rnd() returns 0.
Note: This function does not return or update decimal floating-point rounding mode bits.

Return values

For an application running in IEEE floating-point mode, __fp_read_rnd() returns the following:
Value
Rounding Mode
_FP_RND_RZ
Round toward 0
_FP_RND_RN
Round to nearest
_FP_RND_RP
Round toward +infinity
_FP_RND_RM
Round toward -infinity
For an application running in hexadecimal floating-point mode, __fp_read_rnd() returns 0.

Related information