This is the mail archive of the
libc-ports@sources.redhat.com
mailing list for the libc-ports project.
Re: Results of cos(pi/2) tests are dependent on error rounding pi/2 to a type.
- From: "Carlos O'Donell" <carlos at redhat dot com>
- To: Andreas Schwab <schwab at linux-m68k dot org>
- Cc: GNU C Library <libc-alpha at sourceware dot org>, "libc-ports at sourceware dot org" <libc-ports at sourceware dot org>
- Date: Thu, 11 Apr 2013 22:22:52 -0400
- Subject: Re: Results of cos(pi/2) tests are dependent on error rounding pi/2 to a type.
- References: <5166B3C5 dot 90206 at redhat dot com> <m238uxaroc dot fsf at igel dot home>
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.