Math error handling function.
System V Math Library (libmsaa.a)
#include <math.h>
int matherr (x) struct exception *x;
The matherr subroutine is called by math library routines when errors are detected.
You can use matherr or define your own procedure for handling errors by creating a function named matherr in your program. Such a user-designed function must follow the same syntax as matherr. When an error occurs, a pointer to the exception structure will be passed to the user-supplied matherr function. This structure, which is defined in the math.h file, includes:
int type; char *name; double arg1, arg2, retval;
If the user's matherr function returns a non-zero value, no error message is printed, and the errno global variable will not be set.
If the function matherr is not supplied by the user, the default error-handling procedures, described with the math library routines involved, will be invoked upon error. In every case, the errno global variable is set to EDOM or ERANGE and the program continues.
The bessel: j0, j1, jn, y0, y1, yn (bessel: j0, j1, jn, y0, y1, or yn Subroutine) subroutine, exp, expm1, log, log10, log1p, pow (exp, expf, or expl Subroutine) subroutine, lgamma (gamma Subroutine) subroutine, hypot, cabs (hypot, hypotf, or hypotl Subroutine) subroutine, sin, cos, tan, asin, acos, atan,atan2 subroutine, sinh, cosh, tanh subroutine.
Subroutines Overview in AIX 5L Version 5.2 General Programming Concepts: Writing and Debugging Programs.