| Common mathematical functions | |||||||||||||||||||||||||||||||
| Mathematical special functions(C++17) | |||||||||||||||||||||||||||||||
| Mathematical constants(C++20) | |||||||||||||||||||||||||||||||
| Basic linear algebra algorithms(C++26) | |||||||||||||||||||||||||||||||
| Data-parallel types (SIMD)(C++26) | |||||||||||||||||||||||||||||||
| Floating-point environment(C++11) | |||||||||||||||||||||||||||||||
| Complex numbers | |||||||||||||||||||||||||||||||
Numeric array (valarray) | |||||||||||||||||||||||||||||||
| Pseudo-random number generation | |||||||||||||||||||||||||||||||
| Bit manipulation(C++20) | |||||||||||||||||||||||||||||||
| Saturation arithmetic(C++26) | |||||||||||||||||||||||||||||||
| Factor operations | |||||||||||||||||||||||||||||||
|
| ||||||||||||||||||||||||||||||
| Interpolations | |||||||||||||||||||||||||||||||
|
| ||||||||||||||||||||||||||||||
| Generic numeric operations | |||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||
| C-style checked integer arithmetic | |||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||
| Functions | ||||
(C++11) | ||||
(C++11) | ||||
(C++11) | ||||
fegetexceptflagfesetexceptflag (C++11)(C++11) | ||||
(C++11)(C++11) | ||||
(C++11)(C++11) | ||||
(C++11) | ||||
(C++11) | ||||
| Macro constants | ||||
(C++11)(C++11)(C++11)(C++11)(C++11)(C++11) | ||||
(C++11)(C++11)(C++11)(C++11) | ||||
(C++11) |
Defined in header <cfenv> | ||
int fegetexceptflag(std::fexcept_t* flagp,int excepts); | (1) | (since C++11) |
int fesetexceptflag(conststd::fexcept_t* flagp,int excepts); | (2) | (since C++11) |
1) Attempts to obtain the full contents of the floating-point exception flags that are listed in the bitmask argumentexcepts, which is a bitwise OR of thefloating point exception macros.
2) Attempts to copy the full contents of the floating-point exception flags that are listed inexcepts fromflagp into the floating-point environment. Does not raise any exceptions, only modifies the flags.
The full contents of a floating-point exception flag is not necessarily a boolean value indicating whether the exception is raised or cleared. For example, it may be a struct which includes the boolean status and the address of the code that triggered the exception. These functions obtain all such content and obtain/store it inflagp in implementation-defined format.
| flagp | - | pointer to anstd::fexcept_t object where the flags will be stored or read from |
| excepts | - | bitmask listing the exception flags to get/set |
0 on success, non-zero otherwise.
C documentation forfegetexceptflag,fesetexceptflag |