This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: g77 IEEE NaNs


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@moene.indiv.nluug.nl - 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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]