__fp_setmode() — set IEEE or hexadecimal mode
Standards
Standards / Extensions | C or C++ | Dependencies |
---|---|---|
Both | OS/390® V2R6 |
Syntax
#include <_Ieee754.h>
void __fp_setmode(int mode);
General description
The __fp_setmode() function sets a flag to tell C/C++ runtime library functions whether to interpret parameters as IEEE floating-point or hexadecimal floating-point values based on the value of mode as follows:
- Value
- Description
- _FP_MODE_RESET
- Use the FLOAT compile option to determine the format of floating-point parameters.
- _FP_HFP_MODE
- Interpret parameters as hexadecimal floating-point values.
- _FP_BFP_MODE
- Interpret parameters as IEEE floating-point values.
Note: The compiler defines the __BFP__ macro if the
FLOAT(IEEE) compile option is chosen. Otherwise, it undefines the
__BFP__ macro. Headers related to floating-point, <float.h>, <limits.h>,
and <math.h>, use the __BFP__ macro to select floating-point-type-specific
bindings for functions and constants at compile-time. Applications
that use __fp_setmode() must use the _FP_MODE_VARIABLE macro to prevent
type-specific compile-time binding of functions and constants as illustrated
by the following example:
#define _FP_MODE_VARIABLE
#include <float.h>
#include <limits.h>
#include <math.h>
...
Return values
None