08-287
To: J3
From: Robert Corbett
Subject: changes to the intrinsic function FRACTION
Date: 2008 November 03
The specification of the intrinsic function FRACTION
has been changed in CD 1539-1 in ways that make it
less clear than the specification in the Fortran 2003
standard.
The Fortran 2003 standard states (317:13.7.40l9)
If X is an IEEE NaN, the result is that NaN.
The CD 1539-1 specification states (348:13.7.63p5)
If X has the value zero or is an IEEE NaN,
the result has the same value as X.
It is unclear what it means for a NaN to have the
same value as another NaN. The description in
Fortran 2003 is clearer. I suggest restoring the
text to that of the Fortran 2003 standard.
The specification of Fraction leaves many important
questions unanswered.
Is it the intent of the committee that applying
FRACTION to a zero value on a processor that
distinguishes the sign of zero shall produce a
result that preserves the sign of that zero value?
If so, that seems to conflict with 52:4.4.3p3.
Is it the intent of the committee that the result
of applying FRACTION to a zero value should be the
same representation of a zero value? The IBM
mainframe architecture and the Intel architecture
with the DAZ bit set in the MXCSR provide many
different representations of zero.
It seems clear that the committee intends that the
result of applying FRACTION to a signaling NaN
should produce a result that is a signaling NaN.
For some processors, it is difficult to return a
signaling NaN.