std::feclearexcept - cppreference.com (original) (raw)

| | | | | --------------------------------- | | ------------- | | int feclearexcept( int excepts ); | | (since C++11) |

Attempts to clear the floating-point exceptions that are listed in the bitmask argument excepts, which is a bitwise OR of the floating point exception macros.

[edit] Parameters

excepts - bitmask listing the exception flags to clear

[edit] Return value

​0​ if all indicated exceptions were successfully cleared or if excepts is zero. Returns a non-zero value on error.

[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

[edit] See also