From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3354 invoked by alias); 27 May 2005 23:43:59 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 3339 invoked by uid 22791); 27 May 2005 23:43:56 -0000 Received: from intrepid.intrepid.com (HELO intrepid.intrepid.com) (192.195.190.1) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Fri, 27 May 2005 23:43:56 +0000 Received: from WINNIE (winnie.intrepid.com [192.195.190.24]) by intrepid.intrepid.com (8.13.1/8.13.1) with ESMTP id j4RNhhXR024655; Fri, 27 May 2005 16:43:43 -0700 From: "Gary Funck" To: Cc: "Menezes, Evandro" , "Scott Robert Ladd" Subject: RE: Sine and Cosine Accuracy Date: Sat, 28 May 2005 10:44:00 -0000 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit In-Reply-To: <84EA05E2CA77634C82730353CBE3A843028F468D@SAUSEXMB1.amd.com> X-SW-Source: 2005-05/txt/msg01526.txt.bz2 > -----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.