Otherwise, the process calls the signal-handler subroutine. The Subroutine Impact figure illustrates the default state when floating-point exceptions occur and how this behavior can be changed by the appropriate operating system subroutine calls. Changing the execution state of the program may slow performance because floating-point trapping causes the process to execute in serial mode. To change this behavior, the program must establish a signal handler for this signal. See the sigaction , sigvec , or signal subroutines for more information on signal handlers.
Some systems have imprecise trapping modes .
This means the hardware can detect a floating-point exception and deliver an interrupt, but processing may continue while the signal is delivered. Imprecise trapping modes cause less performance degradation than precise trapping mode . However, some recovery operations are not possible, because the operation that caused the exception cannot be determined or because subsequent instruction may have modified the argument that caused the exception. To use imprecise exceptions, a signal handler must be able to determine if a trap was precise or imprecise. A program can modify the arguments to the instruction and restart it, or fix the result of the operation and continue with the next instruction.