diff options
author | Joseph Myers <joseph@codesourcery.com> | 2014-03-24 12:18:45 +0000 |
---|---|---|
committer | Joseph Myers <joseph@codesourcery.com> | 2014-03-24 12:18:45 +0000 |
commit | b376a11a19aa7b64107081e4eed2327c25a131be (patch) | |
tree | 09e60db7b0fad49f557d8b109e861d58945943f8 /math/auto-libm-test-in | |
parent | 1ca2d03e3e4c8b27a666676bb5b92e6f5d6f2a07 (diff) | |
download | glibc-b376a11a19aa7b64107081e4eed2327c25a131be.tar.gz glibc-b376a11a19aa7b64107081e4eed2327c25a131be.tar.xz glibc-b376a11a19aa7b64107081e4eed2327c25a131be.zip |
Fix dbl-64 exp overflow/underflow in non-default rounding modes (bug 16284).
The dbl-64 version of exp needs round-to-nearest mode for its internal computations, but that has the consequence of inappropriate overflowing and underflowing results in other rounding modes. This patch fixes this by recomputing the relevant results in cases where the round-to-nearest result overflows to infinity or underflows to zero (most of the diffs are actually just consequent reindentation). Tests are enabled in all rounding modes for complex functions using exp - but not for cexp because it turns out there are bugs causing spurious underflows for cexp for some tests, which will need to be fixed separately (I suspect ccos ccosh csin csinh ctan ctanh have similar bugs, just not shown by the present set of test inputs). Tested x86_64 and x86 and ulps updated accordingly. [BZ #16284] * sysdeps/ieee754/dbl-64/e_exp.c (__ieee754_exp): Use original rounding mode to recompute results that overflow to infinity or underflow to zero. * math/auto-libm-test-in: Don't mark tests as expected to fail for bug 16284. * math/auto-libm-test-out: Regenerated. * math/libm-test.inc (ccos_test): Use ALL_RM_TEST. (ccosh_test): Likewise. (csin_test_data): Use plus_oflow. (csin_test): Use ALL_RM_TEST. (csinh_test_data): Use plus_oflow. (csinh_test): Use ALL_RM_TEST. * sysdeps/i386/fpu/libm-test-ulps: Update. * sysdeps/x86_64/fpu/libm-test-ulps: Likewise.
Diffstat (limited to 'math/auto-libm-test-in')
-rw-r--r-- | math/auto-libm-test-in | 27 |
1 files changed, 10 insertions, 17 deletions
diff --git a/math/auto-libm-test-in b/math/auto-libm-test-in index fafe96ff22..59756319cf 100644 --- a/math/auto-libm-test-in +++ b/math/auto-libm-test-in @@ -833,16 +833,14 @@ exp 0.75 exp 50.0 exp 88.72269439697265625 exp 709.75 -# Bug 16284: results on directed rounding may be incorrect. # GCC bug 59666: results on directed rounding may be incorrect. -exp 1000.0 xfail-rounding:dbl-64 xfail-rounding:ldbl-128ibm -exp 710 xfail-rounding:dbl-64 xfail-rounding:ldbl-128ibm +exp 1000.0 xfail-rounding:ldbl-128ibm +exp 710 xfail-rounding:ldbl-128ibm exp -1234 -# Bug 16284: results on directed rounding may be incorrect. # GCC bug 59666: results on directed rounding may be incorrect. -exp 0x2.c679d1f73f0fb628p+8 xfail-rounding:dbl-64 xfail-rounding:ldbl-128ibm -exp 1e5 xfail-rounding:dbl-64 xfail-rounding:ldbl-128ibm -exp max xfail-rounding:dbl-64 xfail-rounding:ldbl-128ibm +exp 0x2.c679d1f73f0fb628p+8 xfail-rounding:ldbl-128ibm +exp 1e5 xfail-rounding:ldbl-128ibm +exp max xfail-rounding:ldbl-128ibm exp -7.4444006192138124e+02 exp -0x1.75f113c30b1c8p+9 exp -max @@ -856,27 +854,22 @@ exp10 36 exp10 -36 exp10 305 exp10 -305 -# Bug 16284: results on directed rounding may be incorrect. # GCC bug 59666: results on directed rounding may be incorrect. -exp10 4932 xfail-rounding:flt-32 xfail-rounding:ldbl-128ibm +exp10 4932 xfail-rounding:ldbl-128ibm # Bug 16361: underflow exception may be misssing exp10 -4932 missing-underflow:ldbl-96-intel:x86 missing-underflow:ldbl-96-intel:x86_64 -# Bug 16284: results on directed rounding may be incorrect. # GCC bug 59666: results on directed rounding may be incorrect. -exp10 1e5 xfail-rounding:flt-32 xfail-rounding:ldbl-128ibm +exp10 1e5 xfail-rounding:ldbl-128ibm exp10 -1e5 -# Bug 16284: results on directed rounding may be incorrect. # GCC bug 59666: results on directed rounding may be incorrect. -exp10 1e6 xfail-rounding:flt-32 xfail-rounding:ldbl-128ibm +exp10 1e6 xfail-rounding:ldbl-128ibm exp10 -1e6 -# Bug 16284: results on directed rounding may be incorrect. # GCC bug 59666: results on directed rounding may be incorrect. -exp10 max xfail-rounding:flt-32 xfail-rounding:ldbl-128ibm +exp10 max xfail-rounding:ldbl-128ibm exp10 -max exp10 0.75 -# Bug 16284: results on directed rounding may be incorrect. # GCC bug 59666: results on directed rounding may be incorrect. -exp10 0x1.348e45573a1dd72cp+8 xfail-rounding:flt-32 xfail-rounding:dbl-64 xfail-rounding:ldbl-128ibm +exp10 0x1.348e45573a1dd72cp+8 xfail-rounding:ldbl-128ibm exp2 0 exp2 -0 |