octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: isnan in fortran


From: John W. Eaton
Subject: Re: isnan in fortran
Date: Wed, 11 Apr 2012 07:24:18 -0400

On 11-Apr-2012, John W. Eaton wrote:

| On 11-Apr-2012, c. wrote:
| 
| | 
| | On 10 Apr 2012, at 19:00, address@hidden wrote:
| | 
| | > I think it would be better to rename the files that need this
| | > treatment to FILE.in.f and then use sed to do the transformation to
| | > generate FILE.f in the build tree.
| | > 
| | > jwe
| | 
| | I am preparing a patch to do that.
| 
| After giving it some more thought, it might be better in this specific
| case to have a configure test that checks whether isnan is available
| in Fortran and if not, adds misc/isnan.f to the list of functions to
| compile.  The misc/isnan.f function could be
| 
|       logical function isnan (x)
|       double precision x
|       if (x != x)
|         isnan = .false.
|       else
|         isnan = .true.
|       endif
|       return
|       end

Uh, except that I have the test and some syntax wrong.  How about

       logical function isnan (x)
       double precision x
       isnan = x .ne. x
       return
       end

jwe


reply via email to

[Prev in Thread] Current Thread [Next in Thread]