This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: g77 IEEE NaNs
- From: Toon Moene <toon at moene dot indiv dot nluug dot nl>
- To: Lionel B <lionelbuk at yahoo dot co dot uk>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Wed, 09 Mar 2005 20:55:36 +0100
- Subject: Re: g77 IEEE NaNs
- Organization: Moene Computational Physics, Maartensdijk, The Netherlands
- References: <24159440.1110391176868.JavaMail.root@dtm1eusosrv72.dtm.ops.eu.uu.net>
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/