__fpc_sm() — set floating-point control register rounding mode field

Standards

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

Syntax

#include <_Ieee754.h>
void __fpc_sm(_FP_rmode_t rmode);

General description

The __fpc_sm() function changes the rounding mode field of the floating-point control (FPC) register based on the value of rmode as follows:
Value
Description
_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

Related information