std::fetestexcept - cppreference.com (original) (raw)
| | | | | -------------------------------- | | ------------- | | int fetestexcept( int excepts ); | | (since C++11) |
Determines which of the specified subset of the floating point exceptions are currently set. The argument excepts
is a bitwise OR of the floating point exception macros.
[edit] Parameters
excepts | - | bitmask listing the exception flags to test |
---|
[edit] Return value
Bitwise OR of the floating-point exception macros that are both included in excepts
and correspond to floating-point exceptions currently set.
[edit] Example
Possible output:
1.0/0.0 = inf division by zero reported 1.0/10 = 0.1 inexact result reported sqrt(-1) = -nan invalid result reported