[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
Re: differences between implementations of IEEE-754 basic operators
On 2008-07-04 10:35:56 +0200, David Monniaux wrote:
My understanding is that as long as:
* One uses IEEE-754 single and double precision formats (this leaves out
the x87 extended-precision registers).
and rounding directly to the same format.
* One does not set trap handlers except for invalid operation.
* One sets the trap handler for invalid operation to abort the program.
* One does not use the "flush denormals to zero" and similar flags from
certain FPUs (PowerPC).
Then all computations on any IEEE-754 compatible system (let's say,
Intel SSE and PowerPC) give exactly the same result: either a trap for
invalid operation, either a same non-NaN result.
Am I correct or is there still leeway for differences?
You should not look at the memory representation either (due to the
differences in the endianness).
And as you said:
* More generally, how trap handlers are set, when they are triggered, is
unspecified.
In particular, there are differences between x87 (perhaps not SSE,
though) and PowerPC[*].
[*] http://gcc.gnu.org/ml/gcc/2005-06/msg00559.html
--
Vincent Lefèvre <vincent@xxxxxxxxxx> - Web: <http://www.vinc17.org/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.org/blog/>
Work: CR INRIA - computer arithmetic / Arenaire project (LIP, ENS-Lyon)