Facilities for retrieving and setting the floating-point environment's status flags.
The floating-point environment has exception flags. When a floating-point operation gives an extraordinary result, the environment raises an exception. Raising a floatingpoint exception does not affect a program's execution. Instead, these exceptions act as status flags. The fenv.h header file offers facilities to clear, set, and test the state of these exceptions, allowing you to choose how your program manages and reacts to them.
| Macro | Status Flag |
|---|---|
| FE_DIVBYZERO | division by zero |
| FE_INEXACT | inexact value |
| FE_INVALID | invalid value |
| FE_OVERFLOW | overflow |
| FE_UNDERFLOW | underflow |
| FE_ALL_EXCEPT | all exceptions combined |