(j3.2006) (SC22WG5.5086) [ukfortran] WG5 ballot N1988

Malcolm Cohen malcolm
Thu Sep 5 03:08:56 UTC 2013


>The Fortran 2008 standard places no requirements on division in
>its description of IEEE_SUPPORT_DATATYPE (14.9p1, 14.11.24).
>The proposed edits require a processor to signal IEEE_OVERFLOW
>and IEEE_DIVIDE_BY_ZERO as specified by IEC 60559:1989, even
>though the processor is not required to produce the results
>specified by IEC 60559:1989 for normal operands returning normal
>operands unless IEEE_SUPPORT_DIVIDE is true.  That makes no sense.

This statement is what makes no sense.  IEEE_OVERFLOW and IEEE_DIVIDE_BY_ZERO 
are not signalled for normal operands returning normal results.

>For example, consider the case of an Intel 386 CPU with a 387
>numeric coprocessor.  A Fortran processor for such a system might
>implement the statement
>
>       X = X/Y
>
>where X and Y are represented in the double-precision format of
>IEC 60559:1989 by extending the values of X and Y to extended
>precision performing the division and converting the result back
>to double-precision.  The resulting division would not always
>produce the result required by IEC 60559:1989.  It would also
>not signal exceptions as required by IEC 60559:1989.

It obviously does signal as required for IEEE_DIVIDE_BY_ZERO.  It also signals 
IEEE_OVERFLOW correctly on assignment to X.

The Fortran standard permits evaluating an expression in a higher precision 
under the rules of mathematical equivalence; that's how we avoided the Java trap 
(which was a performance trap, not an IEEE conformance trap).

I am boggled by the apparent claim that the very chip that the IEEE standard was 
written to describe, the Intel x87, does not conform to the IEEE standard.

Cheers,
-- 
................................Malcolm Cohen, Nihon NAG, Tokyo. 




More information about the J3 mailing list