This is the mail archive of the
mailing list for the GCC project.
Re: Kahan's Floating Point Test
Look into the provisions of glibc (if that is what you use on your linux)
for supporting ieee fp features. The way this was done changed from glibc
1.x to glibc 2.x. I fear that you must look through the glibc source, as I
don't know where to find adequate documentation on it, and I am not
proficient with it. I do think that glibc provides a decent model there
which I would like to see other compilers adopt.
If you are using glibc, your results will be affected also by whether
mathinline.h is invoked; you can check <math.h> and <bits/mathinline.h> to
see which optimizations invoke it, and how to disable it. I myself am not
happy with a Paranoia which can't handle normal optimizations, but that
puts me in a distinct minority.
----- Original Message -----
From: "Michael Price" <email@example.com>
Sent: Wednesday, May 30, 2001 8:35 AM
Subject: Re: Kahan's Floating Point Test
> On Wed, May 30, 2001 at 11:11:27AM -0400, firstname.lastname@example.org
> > Assuming that you used the same compiler options in both cases, it
> > that you have run with precision mode set to 53 bits in one case, and
> > bits in the other (likely set by the run-time library), and that you
> > invoked different math libraries, apparently not invoking in-line
> > one case. The standard versions of Paranoia aren't totally correct for
> > mixed 53- and 64- bit precision case. Many readers will claim that
> > in 64-bit precision mode is incorrect.
> Do you have any information as to what to do on the linux machine to
> this situation? Its annoying to have a program that heavily uses floating
> point math to produce the same output on FreeBSD and Solaris but
> output on Linux.
> Michael Price
> Distributed Processing Lab; Lockheed Martin Adv. Tech. Labs
> A&E 3W; 1 Federal Street; Camden, NJ 08102
> 856-338-4021, fax 856-338-4144 email: email@example.com