Chapter Contents

Previous

Next
SIGBFPE

SIGBFPE



Binary Floating Point Error


Default handling
Ignoring the Signal
Information returned by siginfo
Notes on defining a handler
The SIGBFPE signal is raised when a binary floating-point exception occurs for which trapping is enabled, and default handling is in effect for SIGFPE. If you have specified a handler for SIGFPE (either SIG_IGN or a function you define), SIGBFPE is not raised.


Default handling

If the SIGBFPE signal is raised, and default handling is in effect, the program abnormally terminates with an ABEND code of 0C7.


Ignoring the Signal

If your program ignores SIGBFPE, program execution continues, but the results of the failed expression are unpredictable. Note that the exception bits for the failure may not be reflected in the floating-point environment.


Information returned by siginfo

If you call siginfo after a SIGBFPE signal occurs, siginfo returns a pointer to a structure of type FPE_t. Refer to the description of SIGFPE for a discussion of this structure.


Notes on defining a handler

If you define a handler for SIGBFPE, you can change the result of the computation by using the information returned by siginfo. Refer to the example in the descrption of the siginfo function for an illustration of this technique.


Chapter Contents

Previous

Next

Top of Page

Copyright © 2004 by SAS Institute Inc., Cary, NC, USA. All rights reserved.