This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: Fix ldbl-128ibm cos range reduction near pi/2 (bug 15359)
- From: "Carlos O'Donell" <carlos at redhat dot com>
- To: "Joseph S. Myers" <joseph at codesourcery dot com>
- Cc: libc-alpha at sourceware dot org
- Date: Thu, 09 May 2013 16:58:46 -0400
- Subject: Re: Fix ldbl-128ibm cos range reduction near pi/2 (bug 15359)
- References: <Pine dot LNX dot 4 dot 64 dot 1305092036040 dot 29757 at digraph dot polyomino dot org dot uk>
On 05/09/2013 04:38 PM, Joseph S. Myers wrote:
> Bug 15359 is inaccuracy of ldbl-128ibm cos near pi/2. As with the
> ldbl-128 case, the cause is inaccurate range reduction, and like that
> patch <http://sourceware.org/ml/libc-alpha/2013-05/msg00271.html> this
> patch uses the full precision of long double for the high and low
> parts of pi/2 to fix the inaccuracy. Tested powerpc to confirm the
> large ulps no longer appear.
>
> 2013-05-09 Joseph Myers <joseph@codesourcery.com>
>
> [BZ #15359]
> * sysdeps/ieee754/ldbl-128ibm/e_rem_pio2l.c (c): Use 106 bits for
> high part of pi/2.
> (__ieee754_rem_pio2l): Update comments.
Looks good to me.
I know Richard mentioned that we could do better here instead
of using static variables, but that's orthogonal to this fix.
Cheers,
Carlos.