aboutsummaryrefslogtreecommitdiff
path: root/math/auto-libm-test-in
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2014-06-25 11:33:22 +0000
committerJoseph Myers <joseph@codesourcery.com>2014-06-25 11:33:22 +0000
commita638de828d877376fb238efc8b0bc9220dd2601e (patch)
treedd366ccb27ca5aaeea9ba0e5406b50da9432b9f9 /math/auto-libm-test-in
parent0f5b71850e7ae2a4fefade72c73556166d52bc93 (diff)
downloadglibc-a638de828d877376fb238efc8b0bc9220dd2601e.zip
glibc-a638de828d877376fb238efc8b0bc9220dd2601e.tar.gz
glibc-a638de828d877376fb238efc8b0bc9220dd2601e.tar.bz2
Fix exp10 spurious underflows (bug 16560).
This patch fixes spurious underflows from exp10 for arguments near 0 (part of bug 16560; that bug also includes spurious underflows from exp2, which are not fixed by this patch). The problem is underflows in the internal computation converting the exp10 argument to arguments for exp (with extra precision), and the fix is simply to return 1 early for arguments near enough to 0 (just as arguments with large enough magnitude have their own overflow / underflow logic at the start of the function). Tested x86_64 and x86 and ulps updated accordingly; also tested for powerpc32 and mips64 to validate the ldbl-128ibm and ldbl-128 changes. [BZ #16560] * sysdeps/ieee754/dbl-64/e_exp10.c (__ieee754_exp10): Return 1 for arguments close to 0. * sysdeps/ieee754/ldbl-128/e_exp10l.c (__ieee754_exp10l): Likewise. * sysdeps/ieee754/ldbl-128ibm/e_exp10l.c (__ieee754_exp10l): Likewise. * math/auto-libm-test-in: Add more tests of exp10. * math/auto-libm-test-out: Regenerated. * sysdeps/x86_64/fpu/libm-test-ulps: Update.
Diffstat (limited to 'math/auto-libm-test-in')
-rw-r--r--math/auto-libm-test-in18
1 files changed, 18 insertions, 0 deletions
diff --git a/math/auto-libm-test-in b/math/auto-libm-test-in
index f36d200..48c5c6c 100644
--- a/math/auto-libm-test-in
+++ b/math/auto-libm-test-in
@@ -902,6 +902,24 @@ exp10 -max
exp10 0.75
# GCC bug 59666: results on directed rounding may be incorrect.
exp10 0x1.348e45573a1dd72cp+8 xfail-rounding:ldbl-128ibm
+exp10 0x1p-10
+exp10 -0x1p-10
+exp10 0x1p-20
+exp10 -0x1p-20
+exp10 0x1p-30
+exp10 -0x1p-30
+exp10 0x1p-40
+exp10 -0x1p-40
+exp10 0x1p-50
+exp10 -0x1p-50
+exp10 0x1p-60
+exp10 -0x1p-60
+exp10 0x1p-100
+exp10 -0x1p-100
+exp10 min
+exp10 -min
+exp10 min_subnorm
+exp10 -min_subnorm
exp2 0
exp2 -0