aboutsummaryrefslogtreecommitdiff
path: root/math/auto-libm-test-in
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2015-08-05 15:01:58 +0000
committerJoseph Myers <joseph@codesourcery.com>2015-08-05 15:01:58 +0000
commitcf36e5034fa8ed5d44036bce09a55a7f00d19252 (patch)
tree9fca061d81056a70793ebee9bf828b4e5b97f724 /math/auto-libm-test-in
parent2aa6c8af26e65695e9daf382a6e508574a30cdf2 (diff)
downloadglibc-cf36e5034fa8ed5d44036bce09a55a7f00d19252.zip
glibc-cf36e5034fa8ed5d44036bce09a55a7f00d19252.tar.gz
glibc-cf36e5034fa8ed5d44036bce09a55a7f00d19252.tar.bz2
Fix powf (close to -1, large) (bug 18647).
The flt-32 implementation of powf wrongly uses x-1 instead of |x|-1 when computing log (x) for the case where |x| is close to 1 and y is large. This patch fixes the logic accordingly. Relevant tests existed for x close to 1, and corresponding tests are added for x close to -1, as well as for some new variant cases. Tested for x86_64 and x86. [BZ #18647] * sysdeps/ieee754/flt-32/e_powf.c (__ieee754_powf): For large y and |x| close to 1, use absolute value of x when computing log. * math/auto-libm-test-in: Add more tests of pow. * math/auto-libm-test-out: Regenerated.
Diffstat (limited to 'math/auto-libm-test-in')
-rw-r--r--math/auto-libm-test-in40
1 files changed, 40 insertions, 0 deletions
diff --git a/math/auto-libm-test-in b/math/auto-libm-test-in
index f783c5b..c17f6f5 100644
--- a/math/auto-libm-test-in
+++ b/math/auto-libm-test-in
@@ -2361,6 +2361,46 @@ pow 0x0.ffffffffffffffffffffffffffff8p0 -0x1.23456789abcdef0123456789abcdp126
pow 0x1.0000000000000000000000000001p0 0x1.23456789abcdef0123456789abcdp125
pow 0x1.0000000000000000000000000001p0 -0x1.23456789abcdef0123456789abcdp125
+pow -0x0.ffffffp0 10
+pow -0x0.ffffffp0 100
+pow -0x0.ffffffp0 1000
+pow -0x0.ffffffp0 0x1p24
+pow -0x0.ffffffp0 0x1p30
+pow -0x0.ffffffp0 0x1.234566p30
+pow -0x0.ffffffp0 -10
+pow -0x0.ffffffp0 -100
+pow -0x0.ffffffp0 -1000
+pow -0x0.ffffffp0 -0x1p24
+pow -0x0.ffffffp0 -0x1p30
+pow -0x0.ffffffp0 -0x1.234566p30
+pow -0x1.000002p0 0x1p24
+pow -0x1.000002p0 0x1.234566p29
+pow -0x1.000002p0 -0x1.234566p29
+
+pow -0x0.fffffffffffff8p0 0x1.23456789abcdfp62
+pow -0x0.fffffffffffff8p0 -0x1.23456789abcdfp62
+pow -0x1.0000000000001p0 0x1.23456789abcdfp61
+pow -0x1.0000000000001p0 -0x1.23456789abcdfp61
+
+pow -0x0.ffffffffffffffffp0 0x1.23456789abcdef0ep77
+pow -0x0.ffffffffffffffffp0 -0x1.23456789abcdef0ep77
+pow -0x1.0000000000000002p0 0x1.23456789abcdef0ep76
+pow -0x1.0000000000000002p0 -0x1.23456789abcdef0ep76
+
+pow -0x0.ffffffffffffffffffffffffffff8p0 0x1.23456789abcdef0123456789abcdp126
+pow -0x0.ffffffffffffffffffffffffffff8p0 -0x1.23456789abcdef0123456789abcdp126
+pow -0x1.0000000000000000000000000001p0 0x1.23456789abcdef0123456789abcdp125
+pow -0x1.0000000000000000000000000001p0 -0x1.23456789abcdef0123456789abcdp125
+
+pow 0x1.000002p0 0x1p30
+pow -0x1.000002p0 0x1p30
+pow 0x1.000002p0 max
+pow -0x1.000002p0 max
+pow 0x1.00000ep0 0x1p30
+pow -0x1.00000ep0 0x1p30
+pow 0x1.00000ep0 max
+pow -0x1.00000ep0 max
+
pow 1e4932 0.75
pow 1e4928 0.75
pow 1e4924 0.75