This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Sine and Cosine Accuracy
- From: Olivier Galibert <galibert at pobox dot com>
- To: Gabriel Dos Reis <gdr at integrable-solutions dot net>
- Cc: Uros Bizjak <uros at kss-loka dot si>, Paul Koning <pkoning at equallogic dot com>,gcc at gcc dot gnu dot org
- Date: Fri, 27 May 2005 15:36:51 +0200
- Subject: Re: Sine and Cosine Accuracy
- References: <429638A1.3080102@kss-loka.si> <m364x562uy.fsf@uniton.integrable-solutions.net>
On Fri, May 27, 2005 at 12:26:13AM +0200, Gabriel Dos Reis wrote:
> If it was and angle! Not everything that is an argument to sin or cos
> is an angle. They are just functions! Suppose you're evaluating an
> approximation of a Fourrier series expansion.
If you're evaluating it at the floating point value 2^90 you're just
evaluating a fancy prng. Floating point values represent intervals,
and when the interval size is way bigger than 2pi any value in [-1,1]
is a perfectably acceptable answer for sin or cos.
OG.