[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: isnan in fortran
From: |
Michael Goffioul |
Subject: |
Re: isnan in fortran |
Date: |
Wed, 11 Apr 2012 12:35:46 +0100 |
On Wed, Apr 11, 2012 at 12:24 PM, John W. Eaton <address@hidden> wrote:
> 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
Sounds like a good plan. Would we also need a single precision version?
Michael.
- Re: isnan in fortran, (continued)
- Re: isnan in fortran, Jordi Gutiérrez Hermoso, 2012/04/10
- Re: isnan in fortran, Michael Goffioul, 2012/04/10
- Re: isnan in fortran, Svante Signell, 2012/04/10
- Re: isnan in fortran, Mike Miller, 2012/04/10
- Re: isnan in fortran, John W. Eaton, 2012/04/10
- Re: isnan in fortran, Mike Miller, 2012/04/10
- Re: isnan in fortran, John W. Eaton, 2012/04/10
Re: isnan in fortran, c., 2012/04/11
Re: isnan in fortran, c., 2012/04/11
Re: isnan in fortran, Mike Miller, 2012/04/11
Re: isnan in fortran, John W. Eaton, 2012/04/11
Re: isnan in fortran, c., 2012/04/11
Re: isnan in fortran, c., 2012/04/11
Re: isnan in fortran, Mike Miller, 2012/04/11
Re: isnan in fortran, c., 2012/04/11