When last time operation return missing value use this function to check which value it is.
int get_error_code( )
MATH_ERR_GENERAL, last missing is not defined a special value infinite.
MATH_ERR_INFINITE, last missing value is infinite value
MATH_ERR_MINUS_INFINITE, last missing value is minus infinite value
EX1
void get_error_code_ex1() { double inverf1; int nErr; inverf1 = inverf(1-1E-16); if ( NANUM == inverf1 ) { nErr = get_error_code(); if ( MATH_ERR_INFINITE == nErr ) { out_str("value is infinite"); } } inverf1 = inverf(1); if ( NANUM == inverf1 ) { nErr = get_error_code(); if ( MATH_ERR_INFINITE == nErr ) { out_str("value is infinite"); } } }
origin.h