2.1.16.4.1 get_error_code


Description

When last time operation return missing value use this function to check which value it is.

Syntax

int get_error_code( )

Parameters

Return

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

Examples

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");
        }
        
    }
}

Remark

See Also

Header to Include

origin.h

Reference