From cppreference.com
This header was originally in the C standard library as
.
This header is part of the
library.
Types
fenv_t
(C++11)
the type representing the entire floating-point environment
(typedef)
fexcept_t
(C++11)
the type representing all floating-point status flags collectively
(typedef)
Functions
(C++11)
clears the specified floating-point status flags
(function)
(C++11)
determines which of the specified floating-point status flags are set
(function)
(C++11)
raises the specified floating-point exceptions
(function)
fegetexceptflagfesetexceptflag
(C++11)(C++11)
copies the state of the specified floating-point status flags from or to the floating-point environment
(function)
(C++11)(C++11)
gets or sets rounding direction
(function)
(C++11)
saves or restores the current floating-point environment
(function)
(C++11)
saves the environment, clears all status flags and ignores all future errors
(function)
(C++11)
restores the floating-point environment and raises the previously raised exceptions
(function)
Macros
Synopsis
#define FE_ALL_EXCEPT /* see description */#define FE_DIVBYZERO /* see description */// optional#define FE_INEXACT /* see description */// optional#define FE_INVALID /* see description */// optional#define FE_OVERFLOW /* see description */// optional#define FE_UNDERFLOW /* see description */// optional#define FE_DOWNWARD /* see description */// optional#define FE_TONEAREST /* see description */// optional#define FE_TOWARDZERO /* see description */// optional#define FE_UPWARD /* see description */// optional#define FE_DFL_ENV /* see description */namespacestd{// typesusingfenv_t=/* object type */;usingfexcept_t=/* object type */;// functionsintfeclearexcept(intexcept);intfegetexceptflag(fexcept_t*pflag,intexcept);intferaiseexcept(intexcept);intfesetexceptflag(constfexcept_t*pflag,intexcept);intfetestexcept(intexcept);intfegetround(void);intfesetround(intmode);intfegetenv(fenv_t*penv);intfeholdexcept(fenv_t*penv);intfesetenv(constfenv_t*penv);intfeupdateenv(constfenv_t*penv);}Defect reports
The following behavior-changing defect reports were applied retroactively to previously published C++ standards.
DR Applied to Behavior as published Correct behavior
C++11 std::fexcept_t must be an integer type it is an object type