This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Fourth Draft "Unsafe fp optimizations" project description.
- To: Gabriel Dos Reis <gdr at codesourcery dot com>
- Subject: Re: Fourth Draft "Unsafe fp optimizations" project description.
- From: Stephen L Moshier <moshier at mediaone dot net>
- Date: Sun, 12 Aug 2001 11:37:19 -0400 (EDT)
- cc: Toon Moene <toon at moene dot indiv dot nluug dot nl>, gcc at gcc dot gnu dot org
- Reply-To: moshier at moshier dot ne dot mediaone dot net
> | The loss of accuracy is due to subtractive cancellation, an error source
> | that your document does not mention.
>
> Actually on x86, sin(x) just returns x for "large" values of x.
x at about 2^62 is the coprocessor's total loss of precision
threshold, where the error approaches 100% and the 8087 sets a
hardware flag. The error increases gradually to that point, however.
The threshold, where the range reduction error due to cancellation
begins, is about x = 2^18 for double precision and x = 2^47 for single
precision.