summary refs log tree commit diff
path: root/math/auto-libm-test-in
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2016-03-24 01:32:52 +0000
committerJoseph Myers <joseph@codesourcery.com>2016-03-24 01:32:52 +0000
commitc898991d8bcfacc825097ba389ffccc5367c2b2d (patch)
treeef1f3fec885e5e5ed89048016ffe8b8b2c0e8393 /math/auto-libm-test-in
parent7e1ff08c260ae105208edb4e778e50525dff05d3 (diff)
downloadglibc-c898991d8bcfacc825097ba389ffccc5367c2b2d.tar.gz
glibc-c898991d8bcfacc825097ba389ffccc5367c2b2d.tar.xz
glibc-c898991d8bcfacc825097ba389ffccc5367c2b2d.zip
Fix x86_64 / x86 powl inaccuracy for integer exponents (bug 19848).
Bug 19848 reports cases where powl on x86 / x86_64 has error
accumulation, for small integer exponents, larger than permitted by
glibc's accuracy goals, at least in some rounding modes.  This patch
further restricts the exponent range for which the
small-integer-exponent logic is used to limit the possible error
accumulation.

Tested for x86_64 and x86 and ulps updated accordingly.

	[BZ #19848]
	* sysdeps/i386/fpu/e_powl.S (p3): Rename to p2 and change value
	from 8 to 4.
	(__ieee754_powl): Compare integer exponent against 4 not 8.
	* sysdeps/x86_64/fpu/e_powl.S (p3): Rename to p2 and change value
	from 8 to 4.
	(__ieee754_powl): Compare integer exponent against 4 not 8.
	* math/auto-libm-test-in: Add more tests of pow.
	* math/auto-libm-test-out: Regenerated.
	* sysdeps/i386/i686/fpu/multiarch/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-in38
1 files changed, 38 insertions, 0 deletions
diff --git a/math/auto-libm-test-in b/math/auto-libm-test-in
index 4b753de040..34a63233d3 100644
--- a/math/auto-libm-test-in
+++ b/math/auto-libm-test-in
@@ -3717,6 +3717,44 @@ pow 0x2.000582p0 -1022
 pow 2 -0x3.fe513p+8
 pow 2 -0x3.fe4e8p+8
 
+pow 10 -1
+pow 10 -2
+pow 10 -3
+pow 10 -4
+pow 10 -5
+pow 10 -6
+pow 10 -7
+
+pow 0x0.ffffffffffffffffp0 1
+pow 0x0.ffffffffffffffffp0 2
+pow 0x0.ffffffffffffffffp0 3
+pow 0x0.ffffffffffffffffp0 4
+pow 0x0.ffffffffffffffffp0 5
+pow 0x0.ffffffffffffffffp0 6
+pow 0x0.ffffffffffffffffp0 7
+pow 0x0.ffffffffffffffffp0 -1
+pow 0x0.ffffffffffffffffp0 -2
+pow 0x0.ffffffffffffffffp0 -3
+pow 0x0.ffffffffffffffffp0 -4
+pow 0x0.ffffffffffffffffp0 -5
+pow 0x0.ffffffffffffffffp0 -6
+pow 0x0.ffffffffffffffffp0 -7
+
+pow 0x1.0000000000000002p0 1
+pow 0x1.0000000000000002p0 2
+pow 0x1.0000000000000002p0 3
+pow 0x1.0000000000000002p0 4
+pow 0x1.0000000000000002p0 5
+pow 0x1.0000000000000002p0 6
+pow 0x1.0000000000000002p0 7
+pow 0x1.0000000000000002p0 -1
+pow 0x1.0000000000000002p0 -2
+pow 0x1.0000000000000002p0 -3
+pow 0x1.0000000000000002p0 -4
+pow 0x1.0000000000000002p0 -5
+pow 0x1.0000000000000002p0 -6
+pow 0x1.0000000000000002p0 -7
+
 pow 1.0625 1.125
 pow 1.5 1.03125
 pow 0x1.7d1a0a6f2p+681 1.5