(j3.2006) FRACTION: zeros, infinities and NaNs
Tue Sep 23 17:49:52 EDT 2008
The changes for FRACTION for f08 are in paper 07-200r1, which includes
extensive explanation. These changes were a small part of Interp
F03/0042 that was filed against f03. I suspect that we omitted the
"incompatible change" text in hopes of attacking the interp before f08
was published. At this late date, it might be worth revisiting.
Robert Corbett wrote:
> The specification of the intrinsic function FRACTION in
> Section 13.7.40 of the Fortran 2003 standard states
> If X has the value zero, the result has the
> value zero. If X is and IEEE infinity, the
> result is that infinity. If X is an IEEE NaN,
> the result is that NaN.
> The related language in Section 13.7.63 of CD 1539-1
> If X has the value zero or is an IEEE NaN,
> the result has the same value as X. If X
> is an IEEE infinity, the result is an
> IEEE NaN.
> The change in the treatment of IEEE infinities is an
> incompatible change. If it were an intentional change,
> it would, of course, be listed as an incompatible
> change in Section 1.5.2 of CD 1539-1. Since it is not
> listed in Section 1.5.2, I assume it is an unintended
> The change to the specification of the treatment of
> IEEE NaNs is troubling. It is unclear what it means
> for NaNs to have the same value, given that NaNs have
> no value.
> Is the new wording regarding zeros intended to mean
> that on a processor that distinguishes between zeros
> with positive and negative signs, the sign must be
> preserved? If so, it should say so. A zero value
> with a positive sign and a zero value with a negative
> sign both have the same value (zero).
> The Fortran 2003 standard seems to say that if the
> actual argument of a call of FRACTION is a signaling
> NaN, that signaling NaN must be returned. That could
> be difficult to implement on some hardware. Is that
> really the intent? Is FRACTION allowed to signal an
> invalid exception if its actual argument is a
> signaling NaN?
> Bob Corbett
> J3 mailing list
> J3 at j3-fortran.org
Bill Long longb at cray.com
Fortran Technical Support & voice: 651-605-9024
Bioinformatics Software Development fax: 651-605-9142
Cray Inc., 1340 Mendota Heights Rd., Mendota Heights, MN, 55120
More information about the J3