### Question 19.39

How can I handle floating-point exceptions gracefully?

On many systems, you can define a routine `matherr` which will be called when there are certain floating-point errors, such as errors in the math routines in `<math.h>`. You may also be able to use `signal` (see question 19.38) to catch SIGFPE. See also question 14.9.

References: Rationale Sec. 4.5.1

Read sequentially: prev next up top

This page by Steve Summit // Copyright 1995 // mail feedback