about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2015-05-01 23:06:44 +0000
committerJoseph Myers <joseph@codesourcery.com>2015-05-01 23:06:44 +0000
commit5ffb9a53d7d8dec873b272d162ba4f84452a3d03 (patch)
tree9d50fcae4f65e87ecce66563b4e8c85870f463e1
parent0957e15d0a58b389155750f6748f083196e06c31 (diff)
downloadglibc-5ffb9a53d7d8dec873b272d162ba4f84452a3d03.tar.gz
glibc-5ffb9a53d7d8dec873b272d162ba4f84452a3d03.tar.xz
glibc-5ffb9a53d7d8dec873b272d162ba4f84452a3d03.zip
Add more tests of tanh.
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.

	* 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.
-rw-r--r--ChangeLog5
-rw-r--r--math/auto-libm-test-in10
-rw-r--r--math/auto-libm-test-out294
-rw-r--r--sysdeps/i386/fpu/libm-test-ulps16
-rw-r--r--sysdeps/x86_64/fpu/libm-test-ulps44
5 files changed, 345 insertions, 24 deletions
diff --git a/ChangeLog b/ChangeLog
index 815b1cc7ed..a8ff1171b1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 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.
+
 	* math/auto-libm-test-in: Add more tests of tan.
 	* math/auto-libm-test-out: Regenerated.
 	* sysdeps/i386/fpu/libm-test-ulps: Update.
diff --git a/math/auto-libm-test-in b/math/auto-libm-test-in
index 249aa9de20..64000ffbb7 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/math/auto-libm-test-out b/math/auto-libm-test-out
index 139cacc3ca..aff7559c76 100644
--- a/math/auto-libm-test-out
+++ b/math/auto-libm-test-out
@@ -183956,6 +183956,300 @@ tanh 0x1p-57
 = tanh tonearest ldbl-128ibm 0x8p-60L : 0x8p-60L : inexact-ok
 = tanh towardzero ldbl-128ibm 0x8p-60L : 0x7.fffffffffffffffffffffffffep-60L : inexact-ok
 = tanh upward ldbl-128ibm 0x8p-60L : 0x8p-60L : inexact-ok
+tanh 0xe.6c659p-4
+= tanh downward flt-32 0xe.6c659p-4f : 0xb.78df7p-4f : inexact-ok
+= tanh tonearest flt-32 0xe.6c659p-4f : 0xb.78df8p-4f : inexact-ok
+= tanh towardzero flt-32 0xe.6c659p-4f : 0xb.78df7p-4f : inexact-ok
+= tanh upward flt-32 0xe.6c659p-4f : 0xb.78df8p-4f : inexact-ok
+= tanh downward dbl-64 0xe.6c659p-4 : 0xb.78df781e11d8p-4 : inexact-ok
+= tanh tonearest dbl-64 0xe.6c659p-4 : 0xb.78df781e11d8p-4 : inexact-ok
+= tanh towardzero dbl-64 0xe.6c659p-4 : 0xb.78df781e11d8p-4 : inexact-ok
+= tanh upward dbl-64 0xe.6c659p-4 : 0xb.78df781e11d88p-4 : inexact-ok
+= tanh downward ldbl-96-intel 0xe.6c659p-4L : 0xb.78df781e11d83e1p-4L : inexact-ok
+= tanh tonearest ldbl-96-intel 0xe.6c659p-4L : 0xb.78df781e11d83e2p-4L : inexact-ok
+= tanh towardzero ldbl-96-intel 0xe.6c659p-4L : 0xb.78df781e11d83e1p-4L : inexact-ok
+= tanh upward ldbl-96-intel 0xe.6c659p-4L : 0xb.78df781e11d83e2p-4L : inexact-ok
+= tanh downward ldbl-96-m68k 0xe.6c659p-4L : 0xb.78df781e11d83e1p-4L : inexact-ok
+= tanh tonearest ldbl-96-m68k 0xe.6c659p-4L : 0xb.78df781e11d83e2p-4L : inexact-ok
+= tanh towardzero ldbl-96-m68k 0xe.6c659p-4L : 0xb.78df781e11d83e1p-4L : inexact-ok
+= tanh upward ldbl-96-m68k 0xe.6c659p-4L : 0xb.78df781e11d83e2p-4L : inexact-ok
+= tanh downward ldbl-128 0xe.6c659p-4L : 0xb.78df781e11d83e198e857e22169p-4L : inexact-ok
+= tanh tonearest ldbl-128 0xe.6c659p-4L : 0xb.78df781e11d83e198e857e22169p-4L : inexact-ok
+= tanh towardzero ldbl-128 0xe.6c659p-4L : 0xb.78df781e11d83e198e857e22169p-4L : inexact-ok
+= tanh upward ldbl-128 0xe.6c659p-4L : 0xb.78df781e11d83e198e857e221698p-4L : inexact-ok
+= tanh downward ldbl-128ibm 0xe.6c659p-4L : 0xb.78df781e11d83e198e857e2214p-4L : inexact-ok
+= tanh tonearest ldbl-128ibm 0xe.6c659p-4L : 0xb.78df781e11d83e198e857e2218p-4L : inexact-ok
+= tanh towardzero ldbl-128ibm 0xe.6c659p-4L : 0xb.78df781e11d83e198e857e2214p-4L : inexact-ok
+= tanh upward ldbl-128ibm 0xe.6c659p-4L : 0xb.78df781e11d83e198e857e2218p-4L : inexact-ok
+tanh 0x8.c259ep-4
+= tanh downward flt-32 0x8.c259ep-4f : 0x7.fa4a18p-4f : inexact-ok
+= tanh tonearest flt-32 0x8.c259ep-4f : 0x7.fa4a2p-4f : inexact-ok
+= tanh towardzero flt-32 0x8.c259ep-4f : 0x7.fa4a18p-4f : inexact-ok
+= tanh upward flt-32 0x8.c259ep-4f : 0x7.fa4a2p-4f : inexact-ok
+= tanh downward dbl-64 0x8.c259ep-4 : 0x7.fa4a1eea64fap-4 : inexact-ok
+= tanh tonearest dbl-64 0x8.c259ep-4 : 0x7.fa4a1eea64fa4p-4 : inexact-ok
+= tanh towardzero dbl-64 0x8.c259ep-4 : 0x7.fa4a1eea64fap-4 : inexact-ok
+= tanh upward dbl-64 0x8.c259ep-4 : 0x7.fa4a1eea64fa4p-4 : inexact-ok
+= tanh downward ldbl-96-intel 0x8.c259ep-4L : 0x7.fa4a1eea64fa2838p-4L : inexact-ok
+= tanh tonearest ldbl-96-intel 0x8.c259ep-4L : 0x7.fa4a1eea64fa2838p-4L : inexact-ok
+= tanh towardzero ldbl-96-intel 0x8.c259ep-4L : 0x7.fa4a1eea64fa2838p-4L : inexact-ok
+= tanh upward ldbl-96-intel 0x8.c259ep-4L : 0x7.fa4a1eea64fa284p-4L : inexact-ok
+= tanh downward ldbl-96-m68k 0x8.c259ep-4L : 0x7.fa4a1eea64fa2838p-4L : inexact-ok
+= tanh tonearest ldbl-96-m68k 0x8.c259ep-4L : 0x7.fa4a1eea64fa2838p-4L : inexact-ok
+= tanh towardzero ldbl-96-m68k 0x8.c259ep-4L : 0x7.fa4a1eea64fa2838p-4L : inexact-ok
+= tanh upward ldbl-96-m68k 0x8.c259ep-4L : 0x7.fa4a1eea64fa284p-4L : inexact-ok
+= tanh downward ldbl-128 0x8.c259ep-4L : 0x7.fa4a1eea64fa283aa32d48b14b94p-4L : inexact-ok
+= tanh tonearest ldbl-128 0x8.c259ep-4L : 0x7.fa4a1eea64fa283aa32d48b14b94p-4L : inexact-ok
+= tanh towardzero ldbl-128 0x8.c259ep-4L : 0x7.fa4a1eea64fa283aa32d48b14b94p-4L : inexact-ok
+= tanh upward ldbl-128 0x8.c259ep-4L : 0x7.fa4a1eea64fa283aa32d48b14b98p-4L : inexact-ok
+= tanh downward ldbl-128ibm 0x8.c259ep-4L : 0x7.fa4a1eea64fa283aa32d48b14ap-4L : inexact-ok
+= tanh tonearest ldbl-128ibm 0x8.c259ep-4L : 0x7.fa4a1eea64fa283aa32d48b14cp-4L : inexact-ok
+= tanh towardzero ldbl-128ibm 0x8.c259ep-4L : 0x7.fa4a1eea64fa283aa32d48b14ap-4L : inexact-ok
+= tanh upward ldbl-128ibm 0x8.c259ep-4L : 0x7.fa4a1eea64fa283aa32d48b14cp-4L : inexact-ok
+tanh 0x6.5821dp-4
+= tanh downward flt-32 0x6.5821dp-4f : 0x6.080bfp-4f : inexact-ok
+= tanh tonearest flt-32 0x6.5821dp-4f : 0x6.080bfp-4f : inexact-ok
+= tanh towardzero flt-32 0x6.5821dp-4f : 0x6.080bfp-4f : inexact-ok
+= tanh upward flt-32 0x6.5821dp-4f : 0x6.080bf8p-4f : inexact-ok
+= tanh downward dbl-64 0x6.5821dp-4 : 0x6.080bf03812d8p-4 : inexact-ok
+= tanh tonearest dbl-64 0x6.5821dp-4 : 0x6.080bf03812d8p-4 : inexact-ok
+= tanh towardzero dbl-64 0x6.5821dp-4 : 0x6.080bf03812d8p-4 : inexact-ok
+= tanh upward dbl-64 0x6.5821dp-4 : 0x6.080bf03812d84p-4 : inexact-ok
+= tanh downward ldbl-96-intel 0x6.5821dp-4L : 0x6.080bf03812d804fp-4L : inexact-ok
+= tanh tonearest ldbl-96-intel 0x6.5821dp-4L : 0x6.080bf03812d804f8p-4L : inexact-ok
+= tanh towardzero ldbl-96-intel 0x6.5821dp-4L : 0x6.080bf03812d804fp-4L : inexact-ok
+= tanh upward ldbl-96-intel 0x6.5821dp-4L : 0x6.080bf03812d804f8p-4L : inexact-ok
+= tanh downward ldbl-96-m68k 0x6.5821dp-4L : 0x6.080bf03812d804fp-4L : inexact-ok
+= tanh tonearest ldbl-96-m68k 0x6.5821dp-4L : 0x6.080bf03812d804f8p-4L : inexact-ok
+= tanh towardzero ldbl-96-m68k 0x6.5821dp-4L : 0x6.080bf03812d804fp-4L : inexact-ok
+= tanh upward ldbl-96-m68k 0x6.5821dp-4L : 0x6.080bf03812d804f8p-4L : inexact-ok
+= tanh downward ldbl-128 0x6.5821dp-4L : 0x6.080bf03812d804f456a4858a20dp-4L : inexact-ok
+= tanh tonearest ldbl-128 0x6.5821dp-4L : 0x6.080bf03812d804f456a4858a20dp-4L : inexact-ok
+= tanh towardzero ldbl-128 0x6.5821dp-4L : 0x6.080bf03812d804f456a4858a20dp-4L : inexact-ok
+= tanh upward ldbl-128 0x6.5821dp-4L : 0x6.080bf03812d804f456a4858a20d4p-4L : inexact-ok
+= tanh downward ldbl-128ibm 0x6.5821dp-4L : 0x6.080bf03812d804f456a4858a2p-4L : inexact-ok
+= tanh tonearest ldbl-128ibm 0x6.5821dp-4L : 0x6.080bf03812d804f456a4858a2p-4L : inexact-ok
+= tanh towardzero ldbl-128ibm 0x6.5821dp-4L : 0x6.080bf03812d804f456a4858a2p-4L : inexact-ok
+= tanh upward ldbl-128ibm 0x6.5821dp-4L : 0x6.080bf03812d804f456a4858a22p-4L : inexact-ok
+tanh 0x8.7c9e5p-4
+= tanh downward flt-32 0x8.7c9e5p-4f : 0x7.c5731p-4f : inexact-ok
+= tanh tonearest flt-32 0x8.7c9e5p-4f : 0x7.c5731p-4f : inexact-ok
+= tanh towardzero flt-32 0x8.7c9e5p-4f : 0x7.c5731p-4f : inexact-ok
+= tanh upward flt-32 0x8.7c9e5p-4f : 0x7.c57318p-4f : inexact-ok
+= tanh downward dbl-64 0x8.7c9e5p-4 : 0x7.c57313d935198p-4 : inexact-ok
+= tanh tonearest dbl-64 0x8.7c9e5p-4 : 0x7.c57313d93519cp-4 : inexact-ok
+= tanh towardzero dbl-64 0x8.7c9e5p-4 : 0x7.c57313d935198p-4 : inexact-ok
+= tanh upward dbl-64 0x8.7c9e5p-4 : 0x7.c57313d93519cp-4 : inexact-ok
+= tanh downward ldbl-96-intel 0x8.7c9e5p-4L : 0x7.c57313d93519a7e8p-4L : inexact-ok
+= tanh tonearest ldbl-96-intel 0x8.7c9e5p-4L : 0x7.c57313d93519a7fp-4L : inexact-ok
+= tanh towardzero ldbl-96-intel 0x8.7c9e5p-4L : 0x7.c57313d93519a7e8p-4L : inexact-ok
+= tanh upward ldbl-96-intel 0x8.7c9e5p-4L : 0x7.c57313d93519a7fp-4L : inexact-ok
+= tanh downward ldbl-96-m68k 0x8.7c9e5p-4L : 0x7.c57313d93519a7e8p-4L : inexact-ok
+= tanh tonearest ldbl-96-m68k 0x8.7c9e5p-4L : 0x7.c57313d93519a7fp-4L : inexact-ok
+= tanh towardzero ldbl-96-m68k 0x8.7c9e5p-4L : 0x7.c57313d93519a7e8p-4L : inexact-ok
+= tanh upward ldbl-96-m68k 0x8.7c9e5p-4L : 0x7.c57313d93519a7fp-4L : inexact-ok
+= tanh downward ldbl-128 0x8.7c9e5p-4L : 0x7.c57313d93519a7edb391a912d4e8p-4L : inexact-ok
+= tanh tonearest ldbl-128 0x8.7c9e5p-4L : 0x7.c57313d93519a7edb391a912d4e8p-4L : inexact-ok
+= tanh towardzero ldbl-128 0x8.7c9e5p-4L : 0x7.c57313d93519a7edb391a912d4e8p-4L : inexact-ok
+= tanh upward ldbl-128 0x8.7c9e5p-4L : 0x7.c57313d93519a7edb391a912d4ecp-4L : inexact-ok
+= tanh downward ldbl-128ibm 0x8.7c9e5p-4L : 0x7.c57313d93519a7edb391a912d4p-4L : inexact-ok
+= tanh tonearest ldbl-128ibm 0x8.7c9e5p-4L : 0x7.c57313d93519a7edb391a912d4p-4L : inexact-ok
+= tanh towardzero ldbl-128ibm 0x8.7c9e5p-4L : 0x7.c57313d93519a7edb391a912d4p-4L : inexact-ok
+= tanh upward ldbl-128ibm 0x8.7c9e5p-4L : 0x7.c57313d93519a7edb391a912d6p-4L : inexact-ok
+tanh -0x3.b60d7cp-4
+= tanh downward flt-32 -0x3.b60d7cp-4f : -0x3.a55fccp-4f : inexact-ok
+= tanh tonearest flt-32 -0x3.b60d7cp-4f : -0x3.a55fc8p-4f : inexact-ok
+= tanh towardzero flt-32 -0x3.b60d7cp-4f : -0x3.a55fc8p-4f : inexact-ok
+= tanh upward flt-32 -0x3.b60d7cp-4f : -0x3.a55fc8p-4f : inexact-ok
+= tanh downward dbl-64 -0x3.b60d7cp-4 : -0x3.a55fc883707aep-4 : inexact-ok
+= tanh tonearest dbl-64 -0x3.b60d7cp-4 : -0x3.a55fc883707acp-4 : inexact-ok
+= tanh towardzero dbl-64 -0x3.b60d7cp-4 : -0x3.a55fc883707acp-4 : inexact-ok
+= tanh upward dbl-64 -0x3.b60d7cp-4 : -0x3.a55fc883707acp-4 : inexact-ok
+= tanh downward ldbl-96-intel -0x3.b60d7cp-4L : -0x3.a55fc883707aca24p-4L : inexact-ok
+= tanh tonearest ldbl-96-intel -0x3.b60d7cp-4L : -0x3.a55fc883707aca2p-4L : inexact-ok
+= tanh towardzero ldbl-96-intel -0x3.b60d7cp-4L : -0x3.a55fc883707aca2p-4L : inexact-ok
+= tanh upward ldbl-96-intel -0x3.b60d7cp-4L : -0x3.a55fc883707aca2p-4L : inexact-ok
+= tanh downward ldbl-96-m68k -0x3.b60d7cp-4L : -0x3.a55fc883707aca24p-4L : inexact-ok
+= tanh tonearest ldbl-96-m68k -0x3.b60d7cp-4L : -0x3.a55fc883707aca2p-4L : inexact-ok
+= tanh towardzero ldbl-96-m68k -0x3.b60d7cp-4L : -0x3.a55fc883707aca2p-4L : inexact-ok
+= tanh upward ldbl-96-m68k -0x3.b60d7cp-4L : -0x3.a55fc883707aca2p-4L : inexact-ok
+= tanh downward ldbl-128 -0x3.b60d7cp-4L : -0x3.a55fc883707aca21b3d3eb4c9496p-4L : inexact-ok
+= tanh tonearest ldbl-128 -0x3.b60d7cp-4L : -0x3.a55fc883707aca21b3d3eb4c9496p-4L : inexact-ok
+= tanh towardzero ldbl-128 -0x3.b60d7cp-4L : -0x3.a55fc883707aca21b3d3eb4c9494p-4L : inexact-ok
+= tanh upward ldbl-128 -0x3.b60d7cp-4L : -0x3.a55fc883707aca21b3d3eb4c9494p-4L : inexact-ok
+= tanh downward ldbl-128ibm -0x3.b60d7cp-4L : -0x3.a55fc883707aca21b3d3eb4c95p-4L : inexact-ok
+= tanh tonearest ldbl-128ibm -0x3.b60d7cp-4L : -0x3.a55fc883707aca21b3d3eb4c95p-4L : inexact-ok
+= tanh towardzero ldbl-128ibm -0x3.b60d7cp-4L : -0x3.a55fc883707aca21b3d3eb4c94p-4L : inexact-ok
+= tanh upward ldbl-128ibm -0x3.b60d7cp-4L : -0x3.a55fc883707aca21b3d3eb4c94p-4L : inexact-ok
+tanh 0x7.b9985p-4
+= tanh downward flt-32 0x7.b9985p-4f : 0x7.2d063p-4f : inexact-ok
+= tanh tonearest flt-32 0x7.b9985p-4f : 0x7.2d063p-4f : inexact-ok
+= tanh towardzero flt-32 0x7.b9985p-4f : 0x7.2d063p-4f : inexact-ok
+= tanh upward flt-32 0x7.b9985p-4f : 0x7.2d0638p-4f : inexact-ok
+= tanh downward dbl-64 0x7.b9985p-4 : 0x7.2d06324738d2p-4 : inexact-ok
+= tanh tonearest dbl-64 0x7.b9985p-4 : 0x7.2d06324738d24p-4 : inexact-ok
+= tanh towardzero dbl-64 0x7.b9985p-4 : 0x7.2d06324738d2p-4 : inexact-ok
+= tanh upward dbl-64 0x7.b9985p-4 : 0x7.2d06324738d24p-4 : inexact-ok
+= tanh downward ldbl-96-intel 0x7.b9985p-4L : 0x7.2d06324738d23d48p-4L : inexact-ok
+= tanh tonearest ldbl-96-intel 0x7.b9985p-4L : 0x7.2d06324738d23d5p-4L : inexact-ok
+= tanh towardzero ldbl-96-intel 0x7.b9985p-4L : 0x7.2d06324738d23d48p-4L : inexact-ok
+= tanh upward ldbl-96-intel 0x7.b9985p-4L : 0x7.2d06324738d23d5p-4L : inexact-ok
+= tanh downward ldbl-96-m68k 0x7.b9985p-4L : 0x7.2d06324738d23d48p-4L : inexact-ok
+= tanh tonearest ldbl-96-m68k 0x7.b9985p-4L : 0x7.2d06324738d23d5p-4L : inexact-ok
+= tanh towardzero ldbl-96-m68k 0x7.b9985p-4L : 0x7.2d06324738d23d48p-4L : inexact-ok
+= tanh upward ldbl-96-m68k 0x7.b9985p-4L : 0x7.2d06324738d23d5p-4L : inexact-ok
+= tanh downward ldbl-128 0x7.b9985p-4L : 0x7.2d06324738d23d4d4328c1a80f98p-4L : inexact-ok
+= tanh tonearest ldbl-128 0x7.b9985p-4L : 0x7.2d06324738d23d4d4328c1a80f9cp-4L : inexact-ok
+= tanh towardzero ldbl-128 0x7.b9985p-4L : 0x7.2d06324738d23d4d4328c1a80f98p-4L : inexact-ok
+= tanh upward ldbl-128 0x7.b9985p-4L : 0x7.2d06324738d23d4d4328c1a80f9cp-4L : inexact-ok
+= tanh downward ldbl-128ibm 0x7.b9985p-4L : 0x7.2d06324738d23d4d4328c1a80ep-4L : inexact-ok
+= tanh tonearest ldbl-128ibm 0x7.b9985p-4L : 0x7.2d06324738d23d4d4328c1a81p-4L : inexact-ok
+= tanh towardzero ldbl-128ibm 0x7.b9985p-4L : 0x7.2d06324738d23d4d4328c1a80ep-4L : inexact-ok
+= tanh upward ldbl-128ibm 0x7.b9985p-4L : 0x7.2d06324738d23d4d4328c1a81p-4L : inexact-ok
+tanh 0x7.a18e8p-4
+= tanh downward flt-32 0x7.a18e8p-4f : 0x7.19c54p-4f : inexact-ok
+= tanh tonearest flt-32 0x7.a18e8p-4f : 0x7.19c548p-4f : inexact-ok
+= tanh towardzero flt-32 0x7.a18e8p-4f : 0x7.19c54p-4f : inexact-ok
+= tanh upward flt-32 0x7.a18e8p-4f : 0x7.19c548p-4f : inexact-ok
+= tanh downward dbl-64 0x7.a18e8p-4 : 0x7.19c5470dc5d6cp-4 : inexact-ok
+= tanh tonearest dbl-64 0x7.a18e8p-4 : 0x7.19c5470dc5d6cp-4 : inexact-ok
+= tanh towardzero dbl-64 0x7.a18e8p-4 : 0x7.19c5470dc5d6cp-4 : inexact-ok
+= tanh upward dbl-64 0x7.a18e8p-4 : 0x7.19c5470dc5d7p-4 : inexact-ok
+= tanh downward ldbl-96-intel 0x7.a18e8p-4L : 0x7.19c5470dc5d6c09p-4L : inexact-ok
+= tanh tonearest ldbl-96-intel 0x7.a18e8p-4L : 0x7.19c5470dc5d6c09p-4L : inexact-ok
+= tanh towardzero ldbl-96-intel 0x7.a18e8p-4L : 0x7.19c5470dc5d6c09p-4L : inexact-ok
+= tanh upward ldbl-96-intel 0x7.a18e8p-4L : 0x7.19c5470dc5d6c098p-4L : inexact-ok
+= tanh downward ldbl-96-m68k 0x7.a18e8p-4L : 0x7.19c5470dc5d6c09p-4L : inexact-ok
+= tanh tonearest ldbl-96-m68k 0x7.a18e8p-4L : 0x7.19c5470dc5d6c09p-4L : inexact-ok
+= tanh towardzero ldbl-96-m68k 0x7.a18e8p-4L : 0x7.19c5470dc5d6c09p-4L : inexact-ok
+= tanh upward ldbl-96-m68k 0x7.a18e8p-4L : 0x7.19c5470dc5d6c098p-4L : inexact-ok
+= tanh downward ldbl-128 0x7.a18e8p-4L : 0x7.19c5470dc5d6c0913805237beb4cp-4L : inexact-ok
+= tanh tonearest ldbl-128 0x7.a18e8p-4L : 0x7.19c5470dc5d6c0913805237beb5p-4L : inexact-ok
+= tanh towardzero ldbl-128 0x7.a18e8p-4L : 0x7.19c5470dc5d6c0913805237beb4cp-4L : inexact-ok
+= tanh upward ldbl-128 0x7.a18e8p-4L : 0x7.19c5470dc5d6c0913805237beb5p-4L : inexact-ok
+= tanh downward ldbl-128ibm 0x7.a18e8p-4L : 0x7.19c5470dc5d6c0913805237beap-4L : inexact-ok
+= tanh tonearest ldbl-128ibm 0x7.a18e8p-4L : 0x7.19c5470dc5d6c0913805237becp-4L : inexact-ok
+= tanh towardzero ldbl-128ibm 0x7.a18e8p-4L : 0x7.19c5470dc5d6c0913805237beap-4L : inexact-ok
+= tanh upward ldbl-128ibm 0x7.a18e8p-4L : 0x7.19c5470dc5d6c0913805237becp-4L : inexact-ok
+tanh -0x2.6082fp-4
+= tanh downward flt-32 -0x2.6082fp-4f : -0x2.5c12ecp-4f : inexact-ok
+= tanh tonearest flt-32 -0x2.6082fp-4f : -0x2.5c12e8p-4f : inexact-ok
+= tanh towardzero flt-32 -0x2.6082fp-4f : -0x2.5c12e8p-4f : inexact-ok
+= tanh upward flt-32 -0x2.6082fp-4f : -0x2.5c12e8p-4f : inexact-ok
+= tanh downward dbl-64 -0x2.6082fp-4 : -0x2.5c12e9588a796p-4 : inexact-ok
+= tanh tonearest dbl-64 -0x2.6082fp-4 : -0x2.5c12e9588a796p-4 : inexact-ok
+= tanh towardzero dbl-64 -0x2.6082fp-4 : -0x2.5c12e9588a794p-4 : inexact-ok
+= tanh upward dbl-64 -0x2.6082fp-4 : -0x2.5c12e9588a794p-4 : inexact-ok
+= tanh downward ldbl-96-intel -0x2.6082fp-4L : -0x2.5c12e9588a795db8p-4L : inexact-ok
+= tanh tonearest ldbl-96-intel -0x2.6082fp-4L : -0x2.5c12e9588a795db8p-4L : inexact-ok
+= tanh towardzero ldbl-96-intel -0x2.6082fp-4L : -0x2.5c12e9588a795db4p-4L : inexact-ok
+= tanh upward ldbl-96-intel -0x2.6082fp-4L : -0x2.5c12e9588a795db4p-4L : inexact-ok
+= tanh downward ldbl-96-m68k -0x2.6082fp-4L : -0x2.5c12e9588a795db8p-4L : inexact-ok
+= tanh tonearest ldbl-96-m68k -0x2.6082fp-4L : -0x2.5c12e9588a795db8p-4L : inexact-ok
+= tanh towardzero ldbl-96-m68k -0x2.6082fp-4L : -0x2.5c12e9588a795db4p-4L : inexact-ok
+= tanh upward ldbl-96-m68k -0x2.6082fp-4L : -0x2.5c12e9588a795db4p-4L : inexact-ok
+= tanh downward ldbl-128 -0x2.6082fp-4L : -0x2.5c12e9588a795db643b503e27bp-4L : inexact-ok
+= tanh tonearest ldbl-128 -0x2.6082fp-4L : -0x2.5c12e9588a795db643b503e27bp-4L : inexact-ok
+= tanh towardzero ldbl-128 -0x2.6082fp-4L : -0x2.5c12e9588a795db643b503e27afep-4L : inexact-ok
+= tanh upward ldbl-128 -0x2.6082fp-4L : -0x2.5c12e9588a795db643b503e27afep-4L : inexact-ok
+= tanh downward ldbl-128ibm -0x2.6082fp-4L : -0x2.5c12e9588a795db643b503e27bp-4L : inexact-ok
+= tanh tonearest ldbl-128ibm -0x2.6082fp-4L : -0x2.5c12e9588a795db643b503e27bp-4L : inexact-ok
+= tanh towardzero ldbl-128ibm -0x2.6082fp-4L : -0x2.5c12e9588a795db643b503e27ap-4L : inexact-ok
+= tanh upward ldbl-128ibm -0x2.6082fp-4L : -0x2.5c12e9588a795db643b503e27ap-4L : inexact-ok
+tanh 0xe.05031p-16
+= tanh downward flt-32 0xe.05031p-16f : 0xe.0503p-16f : inexact-ok
+= tanh tonearest flt-32 0xe.05031p-16f : 0xe.05031p-16f : inexact-ok
+= tanh towardzero flt-32 0xe.05031p-16f : 0xe.0503p-16f : inexact-ok
+= tanh upward flt-32 0xe.05031p-16f : 0xe.05031p-16f : inexact-ok
+= tanh downward dbl-64 0xe.05031p-16 : 0xe.05030c697d9ep-16 : inexact-ok
+= tanh tonearest dbl-64 0xe.05031p-16 : 0xe.05030c697d9e8p-16 : inexact-ok
+= tanh towardzero dbl-64 0xe.05031p-16 : 0xe.05030c697d9ep-16 : inexact-ok
+= tanh upward dbl-64 0xe.05031p-16 : 0xe.05030c697d9e8p-16 : inexact-ok
+= tanh downward ldbl-96-intel 0xe.05031p-16L : 0xe.05030c697d9e582p-16L : inexact-ok
+= tanh tonearest ldbl-96-intel 0xe.05031p-16L : 0xe.05030c697d9e583p-16L : inexact-ok
+= tanh towardzero ldbl-96-intel 0xe.05031p-16L : 0xe.05030c697d9e582p-16L : inexact-ok
+= tanh upward ldbl-96-intel 0xe.05031p-16L : 0xe.05030c697d9e583p-16L : inexact-ok
+= tanh downward ldbl-96-m68k 0xe.05031p-16L : 0xe.05030c697d9e582p-16L : inexact-ok
+= tanh tonearest ldbl-96-m68k 0xe.05031p-16L : 0xe.05030c697d9e583p-16L : inexact-ok
+= tanh towardzero ldbl-96-m68k 0xe.05031p-16L : 0xe.05030c697d9e582p-16L : inexact-ok
+= tanh upward ldbl-96-m68k 0xe.05031p-16L : 0xe.05030c697d9e583p-16L : inexact-ok
+= tanh downward ldbl-128 0xe.05031p-16L : 0xe.05030c697d9e582f4a79c88f0198p-16L : inexact-ok
+= tanh tonearest ldbl-128 0xe.05031p-16L : 0xe.05030c697d9e582f4a79c88f0198p-16L : inexact-ok
+= tanh towardzero ldbl-128 0xe.05031p-16L : 0xe.05030c697d9e582f4a79c88f0198p-16L : inexact-ok
+= tanh upward ldbl-128 0xe.05031p-16L : 0xe.05030c697d9e582f4a79c88f01ap-16L : inexact-ok
+= tanh downward ldbl-128ibm 0xe.05031p-16L : 0xe.05030c697d9e582f4a79c88fp-16L : inexact-ok
+= tanh tonearest ldbl-128ibm 0xe.05031p-16L : 0xe.05030c697d9e582f4a79c88fp-16L : inexact-ok
+= tanh towardzero ldbl-128ibm 0xe.05031p-16L : 0xe.05030c697d9e582f4a79c88fp-16L : inexact-ok
+= tanh upward ldbl-128ibm 0xe.05031p-16L : 0xe.05030c697d9e582f4a79c88f04p-16L : inexact-ok
+tanh 0x3.c80eaa7adaa3p-4
+= tanh downward flt-32 0x3.c80eacp-4f : 0x3.b66d38p-4f : inexact-ok
+= tanh tonearest flt-32 0x3.c80eacp-4f : 0x3.b66d3cp-4f : inexact-ok
+= tanh towardzero flt-32 0x3.c80eacp-4f : 0x3.b66d38p-4f : inexact-ok
+= tanh upward flt-32 0x3.c80eacp-4f : 0x3.b66d3cp-4f : inexact-ok
+= tanh downward dbl-64 0x3.c80eacp-4 : 0x3.b66d3ac34ff92p-4 : inexact-ok
+= tanh tonearest dbl-64 0x3.c80eacp-4 : 0x3.b66d3ac34ff94p-4 : inexact-ok
+= tanh towardzero dbl-64 0x3.c80eacp-4 : 0x3.b66d3ac34ff92p-4 : inexact-ok
+= tanh upward dbl-64 0x3.c80eacp-4 : 0x3.b66d3ac34ff94p-4 : inexact-ok
+= tanh downward ldbl-96-intel 0x3.c80eacp-4L : 0x3.b66d3ac34ff934ccp-4L : inexact-ok
+= tanh tonearest ldbl-96-intel 0x3.c80eacp-4L : 0x3.b66d3ac34ff934dp-4L : inexact-ok
+= tanh towardzero ldbl-96-intel 0x3.c80eacp-4L : 0x3.b66d3ac34ff934ccp-4L : inexact-ok
+= tanh upward ldbl-96-intel 0x3.c80eacp-4L : 0x3.b66d3ac34ff934dp-4L : inexact-ok
+= tanh downward ldbl-96-m68k 0x3.c80eacp-4L : 0x3.b66d3ac34ff934ccp-4L : inexact-ok
+= tanh tonearest ldbl-96-m68k 0x3.c80eacp-4L : 0x3.b66d3ac34ff934dp-4L : inexact-ok
+= tanh towardzero ldbl-96-m68k 0x3.c80eacp-4L : 0x3.b66d3ac34ff934ccp-4L : inexact-ok
+= tanh upward ldbl-96-m68k 0x3.c80eacp-4L : 0x3.b66d3ac34ff934dp-4L : inexact-ok
+= tanh downward ldbl-128 0x3.c80eacp-4L : 0x3.b66d3ac34ff934cf70cbc132d382p-4L : inexact-ok
+= tanh tonearest ldbl-128 0x3.c80eacp-4L : 0x3.b66d3ac34ff934cf70cbc132d382p-4L : inexact-ok
+= tanh towardzero ldbl-128 0x3.c80eacp-4L : 0x3.b66d3ac34ff934cf70cbc132d382p-4L : inexact-ok
+= tanh upward ldbl-128 0x3.c80eacp-4L : 0x3.b66d3ac34ff934cf70cbc132d384p-4L : inexact-ok
+= tanh downward ldbl-128ibm 0x3.c80eacp-4L : 0x3.b66d3ac34ff934cf70cbc132d3p-4L : inexact-ok
+= tanh tonearest ldbl-128ibm 0x3.c80eacp-4L : 0x3.b66d3ac34ff934cf70cbc132d4p-4L : inexact-ok
+= tanh towardzero ldbl-128ibm 0x3.c80eacp-4L : 0x3.b66d3ac34ff934cf70cbc132d3p-4L : inexact-ok
+= tanh upward ldbl-128ibm 0x3.c80eacp-4L : 0x3.b66d3ac34ff934cf70cbc132d4p-4L : inexact-ok
+= tanh downward flt-32 0x3.c80ea8p-4f : 0x3.b66d34p-4f : inexact-ok
+= tanh tonearest flt-32 0x3.c80ea8p-4f : 0x3.b66d38p-4f : inexact-ok
+= tanh towardzero flt-32 0x3.c80ea8p-4f : 0x3.b66d34p-4f : inexact-ok
+= tanh upward flt-32 0x3.c80ea8p-4f : 0x3.b66d38p-4f : inexact-ok
+= tanh downward dbl-64 0x3.c80ea8p-4 : 0x3.b66d36fa72346p-4 : inexact-ok
+= tanh tonearest dbl-64 0x3.c80ea8p-4 : 0x3.b66d36fa72348p-4 : inexact-ok
+= tanh towardzero dbl-64 0x3.c80ea8p-4 : 0x3.b66d36fa72346p-4 : inexact-ok
+= tanh upward dbl-64 0x3.c80ea8p-4 : 0x3.b66d36fa72348p-4 : inexact-ok
+= tanh downward ldbl-96-intel 0x3.c80ea8p-4L : 0x3.b66d36fa7234778cp-4L : inexact-ok
+= tanh tonearest ldbl-96-intel 0x3.c80ea8p-4L : 0x3.b66d36fa7234779p-4L : inexact-ok
+= tanh towardzero ldbl-96-intel 0x3.c80ea8p-4L : 0x3.b66d36fa7234778cp-4L : inexact-ok
+= tanh upward ldbl-96-intel 0x3.c80ea8p-4L : 0x3.b66d36fa7234779p-4L : inexact-ok
+= tanh downward ldbl-96-m68k 0x3.c80ea8p-4L : 0x3.b66d36fa7234778cp-4L : inexact-ok
+= tanh tonearest ldbl-96-m68k 0x3.c80ea8p-4L : 0x3.b66d36fa7234779p-4L : inexact-ok
+= tanh towardzero ldbl-96-m68k 0x3.c80ea8p-4L : 0x3.b66d36fa7234778cp-4L : inexact-ok
+= tanh upward ldbl-96-m68k 0x3.c80ea8p-4L : 0x3.b66d36fa7234779p-4L : inexact-ok
+= tanh downward ldbl-128 0x3.c80ea8p-4L : 0x3.b66d36fa7234778e14df5c18c678p-4L : inexact-ok
+= tanh tonearest ldbl-128 0x3.c80ea8p-4L : 0x3.b66d36fa7234778e14df5c18c67ap-4L : inexact-ok
+= tanh towardzero ldbl-128 0x3.c80ea8p-4L : 0x3.b66d36fa7234778e14df5c18c678p-4L : inexact-ok
+= tanh upward ldbl-128 0x3.c80ea8p-4L : 0x3.b66d36fa7234778e14df5c18c67ap-4L : inexact-ok
+= tanh downward ldbl-128ibm 0x3.c80ea8p-4L : 0x3.b66d36fa7234778e14df5c18c6p-4L : inexact-ok
+= tanh tonearest ldbl-128ibm 0x3.c80ea8p-4L : 0x3.b66d36fa7234778e14df5c18c6p-4L : inexact-ok
+= tanh towardzero ldbl-128ibm 0x3.c80ea8p-4L : 0x3.b66d36fa7234778e14df5c18c6p-4L : inexact-ok
+= tanh upward ldbl-128ibm 0x3.c80ea8p-4L : 0x3.b66d36fa7234778e14df5c18c7p-4L : inexact-ok
+= tanh downward dbl-64 0x3.c80eaa7adaa3p-4 : 0x3.b66d39531e604p-4 : inexact-ok
+= tanh tonearest dbl-64 0x3.c80eaa7adaa3p-4 : 0x3.b66d39531e604p-4 : inexact-ok
+= tanh towardzero dbl-64 0x3.c80eaa7adaa3p-4 : 0x3.b66d39531e604p-4 : inexact-ok
+= tanh upward dbl-64 0x3.c80eaa7adaa3p-4 : 0x3.b66d39531e606p-4 : inexact-ok
+= tanh downward ldbl-96-intel 0x3.c80eaa7adaa3p-4L : 0x3.b66d39531e6043a8p-4L : inexact-ok
+= tanh tonearest ldbl-96-intel 0x3.c80eaa7adaa3p-4L : 0x3.b66d39531e6043a8p-4L : inexact-ok
+= tanh towardzero ldbl-96-intel 0x3.c80eaa7adaa3p-4L : 0x3.b66d39531e6043a8p-4L : inexact-ok
+= tanh upward ldbl-96-intel 0x3.c80eaa7adaa3p-4L : 0x3.b66d39531e6043acp-4L : inexact-ok
+= tanh downward ldbl-96-m68k 0x3.c80eaa7adaa3p-4L : 0x3.b66d39531e6043a8p-4L : inexact-ok
+= tanh tonearest ldbl-96-m68k 0x3.c80eaa7adaa3p-4L : 0x3.b66d39531e6043a8p-4L : inexact-ok
+= tanh towardzero ldbl-96-m68k 0x3.c80eaa7adaa3p-4L : 0x3.b66d39531e6043a8p-4L : inexact-ok
+= tanh upward ldbl-96-m68k 0x3.c80eaa7adaa3p-4L : 0x3.b66d39531e6043acp-4L : inexact-ok
+= tanh downward ldbl-128 0x3.c80eaa7adaa3p-4L : 0x3.b66d39531e6043a85263d7aef20cp-4L : inexact-ok
+= tanh tonearest ldbl-128 0x3.c80eaa7adaa3p-4L : 0x3.b66d39531e6043a85263d7aef20ep-4L : inexact-ok
+= tanh towardzero ldbl-128 0x3.c80eaa7adaa3p-4L : 0x3.b66d39531e6043a85263d7aef20cp-4L : inexact-ok
+= tanh upward ldbl-128 0x3.c80eaa7adaa3p-4L : 0x3.b66d39531e6043a85263d7aef20ep-4L : inexact-ok
+= tanh downward ldbl-128ibm 0x3.c80eaa7adaa3p-4L : 0x3.b66d39531e6043a85263d7aef2p-4L : inexact-ok
+= tanh tonearest ldbl-128ibm 0x3.c80eaa7adaa3p-4L : 0x3.b66d39531e6043a85263d7aef2p-4L : inexact-ok
+= tanh towardzero ldbl-128ibm 0x3.c80eaa7adaa3p-4L : 0x3.b66d39531e6043a85263d7aef2p-4L : inexact-ok
+= tanh upward ldbl-128ibm 0x3.c80eaa7adaa3p-4L : 0x3.b66d39531e6043a85263d7aef3p-4L : inexact-ok
 tgamma 0.5
 = tgamma downward flt-32 0x8p-4f : 0x1.c5bf88p+0f : inexact-ok
 = tgamma tonearest flt-32 0x8p-4f : 0x1.c5bf8ap+0f : inexact-ok
diff --git a/sysdeps/i386/fpu/libm-test-ulps b/sysdeps/i386/fpu/libm-test-ulps
index 2286c8817c..10e0ca6f3b 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 0cb22a42fe..9fd710be24 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