From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23268 invoked by alias); 12 Apr 2013 02:22:59 -0000 Mailing-List: contact libc-ports-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: libc-ports-owner@sourceware.org Received: (qmail 23249 invoked by uid 89); 12 Apr 2013 02:22:58 -0000 X-Spam-SWARE-Status: No, score=-9.4 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.1 X-Spam-User: qpsmtpd, 2 recipients Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Fri, 12 Apr 2013 02:22:58 +0000 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r3C2MsYc015497 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 11 Apr 2013 22:22:54 -0400 Received: from [10.3.113.80] (ovpn-113-80.phx2.redhat.com [10.3.113.80]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r3C2Mr7a005561; Thu, 11 Apr 2013 22:22:53 -0400 Message-ID: <51676FFC.2090301@redhat.com> Date: Fri, 12 Apr 2013 02:22:00 -0000 From: "Carlos O'Donell" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130311 Thunderbird/17.0.4 MIME-Version: 1.0 To: Andreas Schwab CC: GNU C Library , "libc-ports@sourceware.org" Subject: Re: Results of cos(pi/2) tests are dependent on error rounding pi/2 to a type. References: <5166B3C5.90206@redhat.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-SW-Source: 2013-04/txt/msg00042.txt.bz2 On 04/11/2013 01:44 PM, Andreas Schwab wrote: > I'm getting this result on ppc for long double: > > Failure: Test: cos (pi/2) == 1.082856673921913968223746169860580e-32 > Result: > is: 1.08285667392191396822e-32 0x1.c1cd129024e088a67cc7p-107 > should be: 1.08285667392191396822e-32 0x1.c1cd129024e088a67cc7p-107 > difference: 5.71253355584909492648e-62 0x1.78000000000000000000p-204 > ulp : 376.0000 > max.ulp : 0.0000 > Maximal error of `cos' > is : 376 ulp > accepted: 1 ulp > Failure: Test: sincos (pi/2, &sin_res, &cos_res) puts 1.082856673921913968223746169860580e-32 in cos_res > Result: > is: 1.08285667392191396822e-32 0x1.c1cd129024e088a67cc7p-107 > should be: 1.08285667392191396822e-32 0x1.c1cd129024e088a67cc7p-107 > difference: 5.71253355584909492648e-62 0x1.78000000000000000000p-204 > ulp : 376.0000 > max.ulp : 0.0000 > Maximal error of `sincos' > is : 376 ulp > accepted: 1 ulp > > Filed as PR15359. Could you print the following for me? printf ("%.100000g\n", (long double)(M_PIl/2.0L)); The most likely scenario is that I lost digits of precision when using only %.100Le. I'm trying to get my hands on a fast ppc box to test stuff on. Cheers, Carlos.