summary refs log tree commit diff
path: root/math/auto-libm-test-in
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2015-08-10 20:35:30 +0000
committerJoseph Myers <joseph@codesourcery.com>2015-08-10 20:35:30 +0000
commit7ee06ef15827f8f2582a94b1ceaad47eaf502744 (patch)
treea9708093ad2f011a6a92b76e7aab574b72593649 /math/auto-libm-test-in
parenteb32b0d40308166c4d8f6330cc2958cb1e545075 (diff)
downloadglibc-7ee06ef15827f8f2582a94b1ceaad47eaf502744.tar.gz
glibc-7ee06ef15827f8f2582a94b1ceaad47eaf502744.tar.xz
glibc-7ee06ef15827f8f2582a94b1ceaad47eaf502744.zip
Fix ldbl-128ibm tanhl inaccuracy (bug 18790).
ldbl-128ibm tanhl uses a too-small threshold to decide when to return
+/-1, resulting in large errors.  This patch changes it to a more
appropriate threshold (the requirement is for 2*exp(-2|x|) to be small
in terms of ulps of 1).

Tested for x86_64, x86 and powerpc.

	[BZ #18790]
	* sysdeps/ieee754/ldbl-128ibm/s_tanhl.c (__tanhl): Increase
	threshold for returning +/- 1.
	* math/auto-libm-test-in: Add more tests of tanh.
	* math/auto-libm-test-out: Regenerated.
	* sysdeps/i386/fpu/libm-test-ulps: Update.
Diffstat (limited to 'math/auto-libm-test-in')
-rw-r--r--math/auto-libm-test-in36
1 files changed, 36 insertions, 0 deletions
diff --git a/math/auto-libm-test-in b/math/auto-libm-test-in
index c33334c8cc..6716cfe907 100644
--- a/math/auto-libm-test-in
+++ b/math/auto-libm-test-in
@@ -2692,6 +2692,42 @@ tanh 0.75
 tanh -0.75
 tanh 1.0
 tanh -1.0
+tanh 2
+tanh -2
+tanh 3
+tanh -3
+tanh 4
+tanh -4
+tanh 5
+tanh -5
+tanh 6
+tanh -6
+tanh 7
+tanh -7
+tanh 8
+tanh -8
+tanh 9
+tanh -9
+tanh 10
+tanh -10
+tanh 15
+tanh -15
+tanh 20
+tanh -20
+tanh 22
+tanh -22
+tanh 25
+tanh -25
+tanh 30
+tanh -30
+tanh 35
+tanh -35
+tanh 40
+tanh -40
+tanh 45
+tanh -45
+tanh 50
+tanh -50
 tanh 0x1p-57
 tanh 0xe.6c659p-4
 tanh 0x8.c259ep-4