Monday, November 03, 2008

How to detect NaN in F77?

The error message in Cygwin looks like:

nan=0d10/0.
^
Division by 0 (zero) at (^) (IEEE not yet supported)


I checked the GNU web site. It says GFortran supports isNaN() function. I think g77 does not support it.

In Solaris, I can write a function similar to isNaN(), because IEEE Not-a-number is supported.

The intel & imsl also has this FORTRAN intrinsic.

What should I do in Cygwin with g77?

No comments: