Linux doubles precision bug?

Ian Lance Taylor iant@google.com
Wed Feb 27 15:54:00 GMT 2008


"Betty Evans" <bevans@ittvis.com> writes:

> Running the same code gives me different results on Linux 32 bit and 64
> bit computers.  I'm not sure if it is a bug or not but other compilers
> give the same results when run on 32 and 64-bit systems.

This question would be better directed to the mailing list
gcc-help@gcc.gnu.org.  Please take any followups there.  Thanks.

You didn't mention the processor, but let's assume it's x86.  On x86,
32-bit floating point code uses the x87 registers with 80-bit
precision.  64-bit floating point code uses the SSE registers with
64-bit precision.  Different results are normal and expected.

You may find it interesting to look at http://gcc.gnu.org/PR323 .

Ian



More information about the Libstdc++ mailing list