CFD Online Logo CFD Online URL
Home > Forums > Main CFD Forum

Intrinsic Procedure 'ISNAN' in GNU FORTRAN 77

Register Blogs Members List Search Today's Posts Mark Forums Read

LinkBack Thread Tools Display Modes
Old   April 12, 2005, 19:57
Default Intrinsic Procedure 'ISNAN' in GNU FORTRAN 77
Posts: n/a
Hi! FORTRAN experts. I need your help.

I am using an 'ISNAN' Intrinsic Procedure in my FORTRAN code. Under Windows with DEC Fortran 77 complier, it is working well. But when I put it to a unix system and compile it with GNU FORTRAN 77 complier, it is not working. And later I found there is not such an Intrinsic Procedures in GNU FORTRAN 77.

What can I do to make my program work under GNU FORTRAN 77? I need your suggestions.

Thank you very much.
  Reply With Quote

Old   April 12, 2005, 22:13
Default Re: Intrinsic Procedure 'ISNAN' in GNU FORTRAN 77
Posts: n/a
You might want to try testing a value for equality with itself. If c=NAN, then (c .eq. c) is false (on my system, anyway).

I had exactly the same problem a few years back, and this was the easiest thing to do in my case. I think that this should work on other compilers, as I think that NAN is never equal to anything. It is a bit kludgy, so there might be a better solution.
  Reply With Quote


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Comparison between C/C++ and Fortran? rick Main CFD Forum 45 September 6, 2011 00:52
CFX11 + Fortran compiler ? Mohan CFX 20 March 30, 2011 18:56
Fortran 90 faster than C/C++ B. R. Guirguis Main CFD Forum 48 March 6, 2006 14:49
how to link a fortran procedure with UDF? yinyue FLUENT 0 October 4, 2004 03:49
visual fortran Monica Main CFD Forum 1 August 28, 2004 20:45

All times are GMT -4. The time now is 15:21.