This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
RE: Sine and Cosine Accuracy
- From: "Gary Funck" <gary at intrepid dot com>
- To: <gcc at gcc dot gnu dot org>
- Cc: "Menezes, Evandro" <evandro dot menezes at amd dot com>, "Scott Robert Ladd" <scott dot ladd at coyotegulch dot com>
- Date: Fri, 27 May 2005 16:43:44 -0700
- Subject: RE: Sine and Cosine Accuracy
> -----Original Message-----
> From: gcc-owner@gcc.gnu.org [mailto:gcc-owner@gcc.gnu.org]On Behalf Of
> Menezes, Evandro
> Sent: Friday, May 27, 2005 1:55 PM
[...]
>
> That's because the error is the same but symmetrical for sin and
> cos, so that, when you calculate the sum of their squares, one
> cancels the other out.
>
> The lack of accuracy in x87 is well known: see
> http://www.gnu.org/software/libc/manual/html_node/Errors-in-Math-F
> unctions.html#Errors-in-Math-Functions.
Ulrich Drepper used a different method to compute math function
accuracy, described here:
http://people.redhat.com/drepper/libm/index.html
It might be interesting to re-run the safe/unsafe/x87 tests using
his methodology. His results show offer comparisons on a number of
platforms, and the visual representation of the errors can offer
some insight into the behavior of the implementation.