CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > General Forums > Main CFD Forum

Intrinsic Procedure 'ISNAN' in GNU FORTRAN 77

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 12, 2005, 20:57
Default Intrinsic Procedure 'ISNAN' in GNU FORTRAN 77
  #1
hawk
Guest
 
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, 23:13
Default Re: Intrinsic Procedure 'ISNAN' in GNU FORTRAN 77
  #2
jasond
Guest
 
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

Reply


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 Off
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 01:52
CFX11 + Fortran compiler ? Mohan CFX 20 March 30, 2011 19: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 04:49
visual fortran Monica Main CFD Forum 1 August 28, 2004 21:45


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