The feenableexcept and fedisableexcept functions unmask and mask (respectively) exceptions specified in excepts. The fegetexcept function returns the current exception mask. All exceptions are masked by default.
Floating-point operations that produce unmasked exceptions will trap, and a SIGFPE will be delivered to the process. By installing a signal handler for SIGFPE, applications can take appropriate action immediately without testing the exception flags after every operation. Note that the trap may not be immediate, but it should occur before the next floating-point instruction is executed.
For all of these functions, the possible types of exceptions include those described in fenv(3). Some architectures may define other types of floating-point exceptions.
The feenableexcept, fedisableexcept, and fegetexcept functions return a bitmap of the exceptions that were unmasked prior to the call.
sigaction(2), feclearexcept(3), feholdexcept(3), fenv(3), feupdateenv(3)