Mail Archives: djgpp/1998/04/23/03:37:45
Hello!
>
> Is there an ANSI/POSIX function for testing if a float or a double is a NaN?
>
>
I'm not sure if this will work with djgpp (since I haven't a PC with DJGPP
in front of me), but you should try the following functions
int isnan (double x);
int isnanf (float x);
Both return a nonzero integer if x is NaN, otherwise they return 0.
Don't forget to link in the math library (-lm).
Jens
--
| | | Jens Bischoff | Daimler-Benz Aerospace Airbus |
| --<O>-- +-----------------+---------------------------------+
| | | Aerodynamic Data Department (EFD) |
| Dasa Airbus | Huenefeldstrasse 1-5 D-28199 Bremen (Germany) |
- Raw text -