How to detect NaN's

Vic Rice vlr at litwin.com
Tue Jun 4 05:36:39 AEST 1991


In <WARREN.91May31174433 at stormy.atmos.washington.edu> warren at atmos.washington.edu (David Warren) writes:

>how about linking with this c function:

>int *check_nan_(num)
>/*make sure num != NaN*/
>float *num;
>{
>    int true=1,false=0;
>    if(isnan((double)num))return(&true);
>    else return(&false);
>}

>then do

>ISTAT = CHECK_NAN(RVAL)

I originally looked at this. However, as best as I can tell this macro expects
bit patterns associated with IEEE format machines. I don't believe the Mips
-- 
Dr. Victor L. Rice
Litwin Process Automation



More information about the Comp.unix.ultrix mailing list