This is the mail archive of the
mailing list for the GCC project.
Re: Fourth Draft "Unsafe fp optimizations" project description.
- To: Tim Prince <tprince at computer dot org>
- Subject: Re: Fourth Draft "Unsafe fp optimizations" project description.
- From: Stephen L Moshier <moshier at mediaone dot net>
- Date: Mon, 13 Aug 2001 07:54:15 -0400 (EDT)
- cc: gcc at gcc dot gnu dot org
- Reply-To: moshier at moshier dot ne dot mediaone dot net
> The internal value of pi is not exact, but it should have 66
> bits of significance, on any processor model of the last 7
> years, so it is difficult for a user program to perform much
> more accurate range reduction.
It's not necessarily difficult.
User programs that actually need this measure the angles in fractions
of a revolution or in degrees, which are easy units to reduce, or they
already compute the angles in extended precision.
> The one commonly used range
> reduction based on i386 internals which is deficient is the
> one used in exp(), where glibc takes the short cut in its
> external function and does not necessarily get more than float
If you have a bug to report, please send in a specific description.
This is getting far off topic, but I have recently tested the standard
i386 exponential functions in glibc and improved the long double range
reduction in expl; but the float expf and double exp versions seemed
to have no problem. There might be several other exponential
functions in there that weren't tested, so your bug report needs to
specify a test case, target machine, and compilation particulars.