Chapter Contents

Previous

Next
SIGFPDIV

SIGFPDIV



Floating-Point Division by 0


Default handling
Ignoring the signal
Information returned by siginfo
Notes on defining a handler
The SIGFPDIV signal is raised when the second operand of the division operator (/) is 0, and default handling is in effect for SIGFPE . If you have specified a handler for SIGFPE (either SIG_IGN or a function you define), SIGFPDIV is not raised.


Default handling

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


Ignoring the signal

If your program ignores SIGFPDIV , program execution continues, but the results of the failed expression are unpredictable.


Information returned by siginfo

If you call siginfo after a SIGFPDIV 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 SIGFPDIV , you can change the result of the computation by using the information returned by siginfo . Refer to the example in the description of the siginfo function for an illustration of this technique.


Chapter Contents

Previous

Next

Top of Page

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