This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: Fix gen-auto-libm-tests sticky bit setting for negative results
- From: Andreas Jaeger <aj at suse dot com>
- To: "Joseph S. Myers" <joseph at codesourcery dot com>, libc-alpha at sourceware dot org
- Date: Tue, 18 Feb 2014 08:45:53 +0100
- Subject: Re: Fix gen-auto-libm-tests sticky bit setting for negative results
- Authentication-results: sourceware.org; auth=none
- References: <Pine dot LNX dot 4 dot 64 dot 1402180138001 dot 2486 at digraph dot polyomino dot org dot uk>
On 02/18/2014 02:39 AM, Joseph S. Myers wrote:
> gen-auto-libm-tests has a bug in the logic for setting a sticky bit
> based on the ternary value from MPFR: it is correct for positive
> results, but for negative results mpz_setbit acts as if a two's
> complement representation is used, whereas the low bit needs setting
> based on the sign-magnitude representation GMP actually uses. (This
> showed up in converting fma tests to use auto-libm-test-in /
> gen-auto-libm-tests.)
>
> This patch fixes the problem by negating the mpz_t value to set its
> low bit. There are lots of changes to auto-libm-test-out (mainly 1ulp
> fixes to ldbl-128 expected results), but only a few ulps updates are
> needed on x86 / x86_64 (ulps updates included below,
> auto-libm-test-out changes omitted below). In one case, a corrected
> expectation showed up a spurious underflow exception where the correct
> result is slightly outside the underflowing range.
>
> Tested x86_64 and x86 and ulps updated accordingly.
thanks,
Andreas
--
Andreas Jaeger aj@{suse.com,opensuse.org} Twitter: jaegerandi
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn,Jennifer Guild,Felix Imendörffer,HRB16746 (AG Nürnberg)
GPG fingerprint = 93A3 365E CE47 B889 DF7F FED1 389A 563C C272 A126