(j3.2006) interpretation F03/0030
Robert Corbett
robert.corbett
Wed Aug 24 04:35:06 EDT 2011
The answer and edits provided for F03/0030 are wrong.
They are wrong in general and in specifics. I
explained how they are wrong in the comments I
included with my vote on J3 ballot #22. Since
F03/0030 passed the ballot, my arguments obviously
were not persuasive. Nonetheless, I shall try again.
If anyone sees an error in what I claim, please let
me know what my mistake is.
The proposed edit for Clause 14.3, paragraph 1, of
10-007r1 includes the text
IEEE_OVERFLOW occurs in an intrinsic real
addition, subtraction, multiplication,
division, or conversion by the intrinsic
function REAL, as specified by
IEC 60559:1989 if IEEE_SUPPORT_DATATYPE is
true for the result of the operation or
conversion, and as determined by the
processor if IEEE_SUPPORT_DATATYPE for the
result is not true.
The specification of the result value of the
function IEEE_SUPPORT_DATATYPE given in paragraph 5
of Clause 14.11.24 is
Result Value. The result has the value true
if the processor supports IEEE arithmetic for
all reals (X does not appear) or for real
variables of the same kind type parameter as X;
otherwise, it has the value false. Here,
support is as defined in the first paragraph
of 14.9.
The first paragraph of Clause 14.9 states
The inquiry function IEEE_SUPPORT_DATATYPE
can be used to inquire whether IEEE
arithmetic is supported for a particular
kind of real. Complete conformance with
IEC 60559:1989 is not required, but
o the normal numbers shall be exactly
those of an IEC 60559:1989 floating-
point format,
o for at least one rounding mode, the
intrinsic operations of addition,
subtraction, and multiplication shall
conform whenever the operands and
result specified by IEC 60559:1989
are normal numbers,
o the IEEE operation rem shall be
provided by the function IEEE_REM, and
o the IEEE functions copysign, scalb,
logb, nextafter, and unordered shall
be provided by the functions
IEEE_COPY_SIGN, IEEE_SCALB,
IEEE_LOGB, IEEE_NEXT_AFTER, and
IEEE_UNORDERED, respectively,
for that kind of real.
Thus, even if IEEE_SUPPORT_DATATYPE is true for a kind
of real, the intrinsic operations division and
conversion by the intrinsic function REAL are not
required to conform to IEC 60559:1989. Furthermore,
because the result of an operation that overflows in
IEEE arithmetic is not a normal number, Fortran 2008
does not require IEEE_OVERFLOW to occur for addition,
subtraction, and multiplication if
IEEE_SUPPORT_DATATYPE is true (see the text at the
end of the second item of the list above).
The intent of the proposed edits might be to extend
the requirements presented in the first paragraph of
Clause 14.9. If so, it is done in a manner that is
certain to confuse readers. Furthermore, the functions
IEEE_SUPPORT_DIVIDE and IEEE_SUPPORT_INF will be made
pointless by such extensions.
Robert Corbett
More information about the J3
mailing list