Fix gen-auto-libm-tests sticky bit setting for negative results
Andreas Jaeger
aj@suse.com
Tue Feb 18 07:46:00 GMT 2014
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
More information about the Libc-alpha
mailing list