From a4fb786185fce5048a13c7879f67dfbe59ff70be Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Tue, 18 Feb 2014 14:45:41 +0000 Subject: Fix gen-auto-libm-tests sticky bit setting for negative results. 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. 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. * math/gen-auto-libm-tests.c (adjust_real): Ensure integers are non-negative before setting low bit. * math/auto-libm-test-in: Mark one asin test possibly having spurious underflow. * math/auto-libm-test-out: Regenerated. * sysdeps/i386/fpu/libm-test-ulps: Update. * sysdeps/x86_64/fpu/libm-test-ulps: Likewise. --- math/auto-libm-test-in | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'math/auto-libm-test-in') diff --git a/math/auto-libm-test-in b/math/auto-libm-test-in index c620361613..17158ea685 100644 --- a/math/auto-libm-test-in +++ b/math/auto-libm-test-in @@ -61,8 +61,9 @@ asin -0x0.ffffffffffffp0 asin 0x0.ffffffffffffffffp0 asin -0x0.ffffffffffffffffp0 # Bug 16351: underflow exception may be missing. +# Bug 16599: spurious underflow may occur. asin min missing-underflow -asin -min missing-underflow +asin -min missing-underflow spurious-underflow:dbl-64:x86 asin min_subnorm missing-underflow asin -min_subnorm missing-underflow -- cgit 1.4.1