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 erf, erfc [committed]


This patch adds some randomly-generated tests of erf and erfc 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 erf and erfc.
	* 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 9c2abde..e60a68d 100644
--- a/math/auto-libm-test-in
+++ b/math/auto-libm-test-in
@@ -1087,6 +1087,10 @@ erf 108
 erf 1000
 erf max
 
+erf -0x1.ddaea4p+0
+erf -0x1.2b1f68p+0
+erf 0x1.44e722p+0
+
 erfc 0.0
 erfc -0
 erfc 0.125
@@ -1111,6 +1115,16 @@ erfc 108
 erfc 1000
 erfc max
 
+erfc 0x1.8a0c64p+0
+erfc 0x1.8a0c62p+0
+erfc 0x1.64dafap+0
+erfc 0x6.88fb08p+0
+erfc 0xd.361d9p-4
+erfc 0x8.c66b44ca40038p+0
+erfc 0x2.586f1cp+0
+erfc 0xb.acb72p+0
+erfc 0xb.227499103357d84p+0
+
 exp 0
 exp -0
 exp 1
diff --git a/sysdeps/i386/fpu/libm-test-ulps b/sysdeps/i386/fpu/libm-test-ulps
index 7692852..4d8054f 100644
--- a/sysdeps/i386/fpu/libm-test-ulps
+++ b/sysdeps/i386/fpu/libm-test-ulps
@@ -1285,44 +1285,60 @@ ldouble: 3
 
 Function: "erf":
 double: 1
+float: 1
 idouble: 1
+ifloat: 1
 ildouble: 1
 ldouble: 1
 
-Function: "erf_upward":
+Function: "erf_downward":
+double: 1
+idouble: 1
 ildouble: 1
 ldouble: 1
 
-Function: "erfc":
+Function: "erf_towardzero":
 double: 1
 idouble: 1
 ildouble: 1
 ldouble: 1
 
+Function: "erf_upward":
+ildouble: 1
+ldouble: 1
+
+Function: "erfc":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+ildouble: 2
+ldouble: 2
+
 Function: "erfc_downward":
 double: 1
 float: 2
 idouble: 1
 ifloat: 2
-ildouble: 3
-ldouble: 3
+ildouble: 4
+ldouble: 4
 
 Function: "erfc_towardzero":
 double: 1
 float: 2
 idouble: 1
 ifloat: 2
-ildouble: 2
-ldouble: 2
-
-Function: "erfc_upward":
-double: 1
-float: 1
-idouble: 1
-ifloat: 1
 ildouble: 3
 ldouble: 3
 
+Function: "erfc_upward":
+double: 2
+float: 2
+idouble: 2
+ifloat: 2
+ildouble: 4
+ldouble: 4
+
 Function: "exp10":
 ildouble: 1
 ldouble: 1
diff --git a/sysdeps/x86_64/fpu/libm-test-ulps b/sysdeps/x86_64/fpu/libm-test-ulps
index 22dfe5f..2a7cc4d 100644
--- a/sysdeps/x86_64/fpu/libm-test-ulps
+++ b/sysdeps/x86_64/fpu/libm-test-ulps
@@ -1369,17 +1369,27 @@ ldouble: 3
 
 Function: "erf":
 double: 1
+float: 1
 idouble: 1
+ifloat: 1
 ildouble: 1
 ldouble: 1
 
 Function: "erf_downward":
+double: 1
 float: 1
+idouble: 1
 ifloat: 1
+ildouble: 1
+ldouble: 1
 
 Function: "erf_towardzero":
+double: 1
 float: 1
+idouble: 1
 ifloat: 1
+ildouble: 1
+ldouble: 1
 
 Function: "erf_upward":
 float: 1
@@ -1388,37 +1398,37 @@ ildouble: 1
 ldouble: 1
 
 Function: "erfc":
-double: 1
-float: 1
-idouble: 1
-ifloat: 1
-ildouble: 1
-ldouble: 1
+double: 2
+float: 2
+idouble: 2
+ifloat: 2
+ildouble: 2
+ldouble: 2
 
 Function: "erfc_downward":
-double: 1
-float: 3
-idouble: 1
-ifloat: 3
-ildouble: 3
-ldouble: 3
+double: 3
+float: 5
+idouble: 3
+ifloat: 5
+ildouble: 4
+ldouble: 4
 
 Function: "erfc_towardzero":
-double: 1
+double: 3
 float: 3
-idouble: 1
+idouble: 3
 ifloat: 3
-ildouble: 2
-ldouble: 2
-
-Function: "erfc_upward":
-double: 2
-float: 2
-idouble: 2
-ifloat: 2
 ildouble: 3
 ldouble: 3
 
+Function: "erfc_upward":
+double: 4
+float: 5
+idouble: 4
+ifloat: 5
+ildouble: 4
+ldouble: 4
+
 Function: "exp10":
 double: 1
 idouble: 1

-- 
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]