This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Add more tests of tanh [committed]


This patch adds some randomly-generated tests of tanh that are
observed to increase ulps on x86_64.

Tested for x86_64 and x86 and ulps updated accordingly.  Committed.

(auto-libm-test-out diffs omitted below.)

2015-05-01  Joseph Myers  <joseph@codesourcery.com>

	* math/auto-libm-test-in: Add more tests of tanh.
	* math/auto-libm-test-out: Regenerated.
	* sysdeps/i386/fpu/libm-test-ulps: Update.
	* sysdeps/x86_64/fpu/libm-test-ulps: Likewise.

diff --git a/math/auto-libm-test-in b/math/auto-libm-test-in
index 249aa9d..64000ff 100644
--- a/math/auto-libm-test-in
+++ b/math/auto-libm-test-in
@@ -2418,6 +2418,16 @@ tanh -0.75
 tanh 1.0
 tanh -1.0
 tanh 0x1p-57
+tanh 0xe.6c659p-4
+tanh 0x8.c259ep-4
+tanh 0x6.5821dp-4
+tanh 0x8.7c9e5p-4
+tanh -0x3.b60d7cp-4
+tanh 0x7.b9985p-4
+tanh 0x7.a18e8p-4
+tanh -0x2.6082fp-4
+tanh 0xe.05031p-16
+tanh 0x3.c80eaa7adaa3p-4
 
 tgamma 0.5
 tgamma -0.5
diff --git a/sysdeps/i386/fpu/libm-test-ulps b/sysdeps/i386/fpu/libm-test-ulps
index 2286c88..10e0ca6 100644
--- a/sysdeps/i386/fpu/libm-test-ulps
+++ b/sysdeps/i386/fpu/libm-test-ulps
@@ -1829,25 +1829,29 @@ ifloat: 1
 ildouble: 2
 ldouble: 2
 
+Function: "tanh":
+ildouble: 2
+ldouble: 2
+
 Function: "tanh_downward":
 double: 1
 float: 1
 idouble: 1
 ifloat: 1
-ildouble: 3
-ldouble: 1
+ildouble: 4
+ldouble: 3
 
 Function: "tanh_towardzero":
 double: 1
 float: 1
-ildouble: 2
-ldouble: 1
+ildouble: 3
+ldouble: 3
 
 Function: "tanh_upward":
 double: 1
 float: 1
-ildouble: 2
-ldouble: 1
+ildouble: 5
+ldouble: 4
 
 Function: "tgamma":
 double: 4
diff --git a/sysdeps/x86_64/fpu/libm-test-ulps b/sysdeps/x86_64/fpu/libm-test-ulps
index 0cb22a4..9fd710b 100644
--- a/sysdeps/x86_64/fpu/libm-test-ulps
+++ b/sysdeps/x86_64/fpu/libm-test-ulps
@@ -1981,29 +1981,37 @@ ifloat: 1
 ildouble: 2
 ldouble: 2
 
+Function: "tanh":
+double: 2
+float: 2
+idouble: 2
+ifloat: 2
+ildouble: 2
+ldouble: 2
+
 Function: "tanh_downward":
-double: 1
-float: 1
-idouble: 1
-ifloat: 1
-ildouble: 1
-ldouble: 1
+double: 3
+float: 3
+idouble: 3
+ifloat: 3
+ildouble: 3
+ldouble: 3
 
 Function: "tanh_towardzero":
-double: 1
-float: 1
-idouble: 1
-ifloat: 1
-ildouble: 1
-ldouble: 1
+double: 2
+float: 2
+idouble: 2
+ifloat: 2
+ildouble: 3
+ldouble: 3
 
 Function: "tanh_upward":
-double: 1
-float: 1
-idouble: 1
-ifloat: 1
-ildouble: 1
-ldouble: 1
+double: 3
+float: 3
+idouble: 3
+ifloat: 3
+ildouble: 4
+ldouble: 4
 
 Function: "tgamma":
 double: 4

-- 
Joseph S. Myers
joseph@codesourcery.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]