This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

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" <mprice@atl.lmco.com>
To: <tprinceusa@mindspring.com>
Cc: <gcc@gcc.gnu.org>
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, tprinceusa@mindspring.com
wrote:
> > Assuming that you used the same compiler options in both cases, it
appears
> > that you have run with precision mode set to 53 bits in one case, and
64
> > bits in the other (likely set by the run-time library), and that you
have
> > invoked different math libraries, apparently not invoking in-line
sqrt() in
> > one case.  The standard versions of Paranoia aren't totally correct for
the
> > mixed 53- and 64- bit precision case.  Many readers will claim that
running
> > in 64-bit precision mode is incorrect.
>
> Do you have any information as to what to do on the linux machine to
correct
> this situation? Its annoying to have a program that heavily uses floating
> point math to produce the same output on FreeBSD and Solaris but
different
> 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: mprice@atl.lmco.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]