[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: differences between implementations of IEEE-754 basic operators



As has been mentioned, one must also avoid the non-754 instructions that are
becoming more prevalent for inverse and inverse sqrt that don't round
correctly or even consistently from one implementation to another, 
as well as the x87 transcendental operations which are necessarily 
implemented differently by AMD and Intel. 

And in the reproducibility section of 754R, there is a long list of things
to do and not do that is intended to cover many of these cases.

Not having seen the final approved standard, I suppose it is something like
this from an earlier draft:

***

Users obtain the same floating-point numerical and reproducible status flag 
results, on all platforms supporting such a language standard, by writing 
programs that
-       use the reproducible results required attribute
-       use only floating-point formats that are reproducible formats
-       use only reproducible floating-point operations explicitly, or 
implicitly via expressions,
-       use only attributes required in all implementations for rounding, and 
preferredWidth
-       use only integer and non-floating-point formats supported in all 
implementations of the language standard, and only in ways that avoid signaling 
integer arithmetic exceptions and other implement-ation-defined exceptions
and that
-       do not use value-changing optimizations (see )
-       do not exceed system limits
-       do not use fusedMultiplyAdd(0, ?, c) or fusedMultiplyAdd(?, 0, c) where
c is a quiet NaN
-       do not use signaling NaNs
-       do not depend on the sign of a zero result or the quantum of a decimal 
result for minNum(x, y), maxNum(x, y), minNumMag(x, y), or maxNumMag(x, y) when 
x and y are equal
-       do not depend on quiet NaN propagation, payloads, or sign bits
-       do not depend on the underflow and inexact exceptions and flags
-       do not depend on the quantum of the results of operations on decimal 
formats in Table 9.1
-       do not depend on encodings (e.g., type overlays).


***

My comments on 754R drafts touched on these and other issues:

http://754r.ucbtest.org/msc-ballots/comments-190.html
 


754 | revision | FAQ | references | list archive