Lionel B wrote:
Is there a Fortran 77 intrinsic equivalent to the libc isnan() function for detecting IEEE fp NaNs? Otherwise any other reliable means of detection for my platform (gcc 3.3.3 cygwin on Win 2K)? Testing X.EQ.X doesn't appear to work correctly...
Not surprising - you should test X.NE.X :-)
Oh, and don't use -ffast-math, because then you're telling the compiler you're not interested in exact IEEE 754 conformant floating point math.
Hope this helps,
-- Toon Moene - e-mail: toon@xxxxxxxxxxxxxxxxxxxx - phone: +31 346 214290 Saturnushof 14, 3738 XG Maartensdijk, The Netherlands A maintainer of GNU Fortran 95: http://gcc.gnu.org/fortran/ News on GNU Fortran 95: http://gfortran.org/