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
GeeksforGeeks has prepared a complete interview preparation course with premium videos, theory, practice problems, TA support and many more features. Please refer Placement 100 for details
- Pi(π) in C++ with Examples
- cin get() in C++ with Examples
- std::less in C++ with Examples
- Map of Vectors in C++ STL with Examples
- std::bit_or in C++ with Examples
- ratio_equal() in C++ with examples
- std::bit_xor in C++ with Examples
- std::not_equal_to in C++ with Examples
- std::less_equal in C++ with Examples
- std::is_heap( ) in C++ with Examples
- std::greater_equal in C++ with Examples
- cauchy_distribution a() in C++ with Examples
- C/C++ if else if ladder with Examples
- std::equal_to in C++ with Examples
- C/C++ if else statement with Examples
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.