The System V Interface Definition (SVID) Issue 3 specifies that various math functions should invoke a function called matherr() if a math exception is detected. This function is called before the math function returns; after matherr() returns, the system then returns to the math function, which in turn returns to the caller.
matherr() is obsolete; indeed it was withdrawn in the System V Interface Definition (SVID) Issue 4, and is required only by this specification for historical compatibility, and will be removed in a future version. The floating point environment function group including fesetenv() should be used instead.
matherr() is not in the source standard; it is only in the binary standard.