feclearexcept in C++ with Examples
feclearexcept() clears the supported floating-point exceptions represented by excepts.
int feclearexcept(int excepts); excepts : Bitmask listing of exception flags to clear
The feclearexcept() function returns zero value if all the exceptions were cleared or if excepts is equal to zero.
It returns nonzero if any error occurs.
For the function to work, you should enable FENV_ACCESS, which will give your program to access the Floating point environment to test the exceptions raised.
sqrt(-1) raises FE_INVALID