Error conditions can arise for several of the functions and for the MEDIAN( ), MEDIANINT( ), and SUMINT( ) subroutines. In each case, an error message is placed in the errorlog of the form:
Mathlib error detected: ROUTINE_NAME: diagnosis; action.
The diagnosis explains the problem, which, for the functions, is always an incorrect argument(s). The action explains what the routine did, which, for the functions, is always to return either zero or negative one (-1). Thus, you can examine at runtime the return value of a function to determine whether an error has occurred, and possibly take remedial action.
Note: Math functions cannot be nested.