fegetmode3
Save and restore floating-point control modes
Usage
#include <fenv.h>
#pragma STDC FENV_ACCESS ON
int
fegetmode(femode_t *modep);
int
fesetmode(const femode_t *modep);
Library
Math Library (libm, -lm)
Overview
The femode_t type represents the dynamic floating-point control modes, including the rounding direction and, where supported, exception masks and other implementation-defined modes.
The fegetmode() function stores the current control modes in the object pointed to by modep.
The fesetmode() function establishes the control modes represented by modep. The argument modep must point to an object set by a prior call to fegetmode(), or equal FE_DFL_MODE. FE_DFL_MODE expands to a pointer to the default control modes( installed at program startup).
Return values
The fegetmode() and fesetmode() functions return 0 if they succeed, and non-zero otherwise; however, the present implementation always succeeds.