[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 08:09:01 -0400 |
On 11-Apr-2012, Mike Miller wrote:
| That would be a lot clearer. So is a single-precision NaN guaranteed to
| cast to a double-precision NaN value? Or would we need isnan and
| disnan?
|
| logical function isnan(x)
| isnan = x .ne. x
| return
| end
|
| logical function disnan(x)
| double precision x
| isnan = x .ne. x
| return
| end
|
| Both erfc and derfc will need type declarations for "logical isnan" to
| call this function. Will that break the builtin isnan if the compiler
| does provide it?
OK, that's a problem. With the intrinsic ISNAN, the compiler chooses
the right version based on the type of the argument. But with Fortran
77 and our own function there is no overloading, so we would need to
use different names.
jwe
- Re: isnan in fortran, (continued)
- Re: isnan in fortran, c., 2012/04/11
- Re: isnan in fortran, John W. Eaton, 2012/04/11
- Re: isnan in fortran, John W. Eaton, 2012/04/11
- Re: isnan in fortran, Michael Goffioul, 2012/04/11
- Re: isnan in fortran, c., 2012/04/11
- Re: isnan in fortran, Michael Goffioul, 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,
John W. Eaton <=
- 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
- Re: isnan in fortran, John W. Eaton, 2012/04/11
- Re: isnan in fortran, c., 2012/04/11
- Re: isnan in fortran, Jordi GutiƩrrez Hermoso, 2012/04/11
- Re: isnan in fortran, c., 2012/04/11
- Re: isnan in fortran, Mike Miller, 2012/04/11
- Re: isnan in fortran, Mike Miller, 2012/04/11