If you do not enable traps for floating-point exceptions,
you can still determine whether the exceptions have occurred. When
an exception occurs and the corresponding exception trap enable
bit is not set, the system sets the corresponding exception flag.
The exception flags are cumulative; once a flag is set, it remains
set for the duration of the program unless you clear it. (This is
why the exception flags are also called sticky bits.)
At critical points in your program, you can call the fetestexcept
function (described in “Manipulating the Exception Flags:
fegetexceptflag, fesetexceptflag, fetestexcept, feraiseexcept, feclearexcept”) to determine whether an exception has
occurred. You can then respond to the exception as you wish. The
program example in that section illustrates the use of this function.