__fpc_rs() — read floating-point control register and change rounding mode field

Standards

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

Syntax

#include <_Ieee754.h>
void __fpc_rs(_FP_fpcreg_t *cur_ptr, _FP_rmode_t rmode);

General description

The __fpc_rs() function stores the current contents of the floating-point control (FPC) register at the location pointed to by cur_ptr and then sets the rounding mode field of the FPC based on the value specified by rmode as follows:
Value
Rounding Mode
_RMODE_RN
Round to nearest
_RMODE_RZ
Round toward zero
_RMODE_RP
Round toward +Infinity
_RMODE_RM
Round toward -Infinity
Note:
  1. When processing IEEE floating-point values, the C/C++ runtime library math functions require IEEE rounding mode of round to nearest. The C/C++ runtime library takes care of setting round to nearest rounding mode while executing math functions and restoring application rounding mode before returning to the caller.
  2. This function does not return or update decimal floating-point rounding mode bits.

Return values

None