floating point inconsistency

Vincent Lefevre vincent+gcc@vinc17.org
Wed Feb 17 15:02:00 GMT 2010

On 2010-02-17 15:33:48 +0100, Cedric Roux wrote:
> well I posted some 32b assembly code a few messages ago that give
> different results for "fcos" with the angle of Christoph when run
> on ADM or intel CPUs.
> So no gcc, no libm, no libc, no lib at all in fact, in the loop.
> Just raw CPUs.

No, in my tests, I was using the cos() function from glibc, which
is *not* implemented by the fcos instruction of the processor, but
by a software algorithm from IBM.

Note: IIRC, these tests are several years old, I haven't tried with
a recent glibc.

Vincent Lefèvre <vincent@vinc17.net> - Web: <http://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / Arénaire project (LIP, ENS-Lyon)

More information about the Gcc-help mailing list