This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Reduce various x86/x86_64 libm ulps expectations
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: libc-alpha at sourceware dot org
- Cc: aj at suse dot de
- Date: Wed, 29 Feb 2012 16:49:36 +0000 (UTC)
- Subject: Reduce various x86/x86_64 libm ulps expectations
Some libm tests for x86 and x86_64 long double had huge error
expectations - hundreds of ulps, where otherwise the maximum expected
error was 25ulp.
I did some testing with those expectations removed, and actually I
don't see those huge errors. So I propose this patch that reduces
various expectations based on my testing. Variations between
different x86 processors may require some of these to be increased a
bit - but I hope that people will look carefully before increasing
anything above 25 (or even above 9, which is now the biggest error
listed for any x86 or x86_64 test).
I did a spot check on the orphaned acos error - an expectation of
622ulps error on acos on i386, but without any particular test input
expected to produce such an error. It was originally an error for a
test of acos (0.0625) (commit
1af437d6368694a0aea5f9ad1daec66bee2dd673, 2002-06-20). That test
failed to include the "L" suffix on the expected result, so that error
was almost entirely the result of a testcase bug. That was fixed in
commit 96d10bdf030b75d28ddef3b342981ef810489ed8 (2002-07-02), and the
expectation for that individual test removed - but not the overall
expectation for acos. My expectation is that the other large errors
have similar stories: they were at one point actually seen in
testsuite runs, but either testcases or function implementations have
been changed since then so that those large errors will no longer be
seen.
2012-02-29 Joseph Myers <joseph@codesourcery.com>
* sysdeps/i386/fpu/libm-test-ulps: Reduce some expected errors.
* sysdeps/x86_64/fpu/libm-test-ulps: Likewise.
diff --git a/sysdeps/i386/fpu/libm-test-ulps b/sysdeps/i386/fpu/libm-test-ulps
index 83a68af..68e1fa9 100644
--- a/sysdeps/i386/fpu/libm-test-ulps
+++ b/sysdeps/i386/fpu/libm-test-ulps
@@ -370,8 +370,8 @@ ifloat: 1
Test "Real part of: ctan (-2 - 3 i) == 0.376402564150424829275122113032269084e-2 - 1.00323862735360980144635859782192726 i":
double: 1
idouble: 1
-ildouble: 439
-ldouble: 439
+ildouble: 1
+ldouble: 1
Test "Imaginary part of: ctan (-2 - 3 i) == 0.376402564150424829275122113032269084e-2 - 1.00323862735360980144635859782192726 i":
float: 1
ifloat: 1
@@ -390,13 +390,13 @@ ldouble: 3
# ctanh
Test "Real part of: ctanh (-2 - 3 i) == -0.965385879022133124278480269394560686 + 0.988437503832249372031403430350121098e-2 i":
-ildouble: 5
-ldouble: 5
+ildouble: 3
+ldouble: 3
Test "Imaginary part of: ctanh (-2 - 3 i) == -0.965385879022133124278480269394560686 + 0.988437503832249372031403430350121098e-2 i":
float: 1
ifloat: 1
-ildouble: 25
-ldouble: 25
+ildouble: 1
+ldouble: 1
Test "Imaginary part of: ctanh (0 + pi/4 i) == 0.0 + 1.0 i":
float: 1
ifloat: 1
@@ -437,10 +437,6 @@ ldouble: 1
# exp
Test "exp (0.75) == 2.11700001661267466854536981983709561":
ildouble: 1
-Test "exp (1000.0) == 0.197007111401704699388887935224332313e435":
-ildouble: 754
-Test "exp (50.0) == 5184705528587072464087.45332293348538":
-ildouble: 16
# exp10
Test "exp10 (-1) == 0.1":
@@ -942,10 +938,6 @@ idouble: 1
ifloat: 1
# Maximal error of functions:
-Function: "acos":
-ildouble: 622
-ldouble: 622
-
Function: "asin":
ildouble: 1
ldouble: 1
@@ -1096,8 +1088,8 @@ double: 1
float: 4
idouble: 1
ifloat: 4
-ildouble: 763
-ldouble: 763
+ildouble: 6
+ldouble: 6
Function: Imaginary part of "cpow":
double: 2
@@ -1136,8 +1128,8 @@ ldouble: 2
Function: Real part of "ctan":
double: 1
idouble: 1
-ildouble: 439
-ldouble: 439
+ildouble: 1
+ldouble: 1
Function: Imaginary part of "ctan":
double: 1
@@ -1152,16 +1144,16 @@ double: 1
float: 1
idouble: 1
ifloat: 1
-ildouble: 5
-ldouble: 5
+ildouble: 3
+ldouble: 3
Function: Imaginary part of "ctanh":
double: 1
float: 1
idouble: 1
ifloat: 1
-ildouble: 25
-ldouble: 25
+ildouble: 1
+ldouble: 1
Function: "erf":
double: 1
@@ -1175,9 +1167,6 @@ ifloat: 1
ildouble: 1
ldouble: 1
-Function: "exp":
-ildouble: 754
-
Function: "exp10":
ildouble: 8
ldouble: 8
diff --git a/sysdeps/x86_64/fpu/libm-test-ulps b/sysdeps/x86_64/fpu/libm-test-ulps
index a2a82e6..1bd06d1 100644
--- a/sysdeps/x86_64/fpu/libm-test-ulps
+++ b/sysdeps/x86_64/fpu/libm-test-ulps
@@ -420,8 +420,8 @@ ifloat: 1
Test "Real part of: ctan (-2 - 3 i) == 0.376402564150424829275122113032269084e-2 - 1.00323862735360980144635859782192726 i":
double: 1
idouble: 1
-ildouble: 439
-ldouble: 439
+ildouble: 1
+ldouble: 1
Test "Imaginary part of: ctan (-2 - 3 i) == 0.376402564150424829275122113032269084e-2 - 1.00323862735360980144635859782192726 i":
float: 1
ifloat: 1
@@ -444,11 +444,11 @@ double: 1
float: 2
idouble: 1
ifloat: 2
-ildouble: 5
-ldouble: 5
+ildouble: 3
+ldouble: 3
Test "Imaginary part of: ctanh (-2 - 3 i) == -0.965385879022133124278480269394560686 + 0.988437503832249372031403430350121098e-2 i":
-ildouble: 25
-ldouble: 25
+ildouble: 1
+ldouble: 1
Test "Imaginary part of: ctanh (0 + pi/4 i) == 0.0 + 1.0 i":
float: 1
ifloat: 1
@@ -1215,8 +1215,8 @@ ifloat: 1
Function: Real part of "ctan":
double: 1
idouble: 1
-ildouble: 439
-ldouble: 439
+ildouble: 1
+ldouble: 1
Function: Imaginary part of "ctan":
double: 1
@@ -1231,16 +1231,16 @@ double: 1
float: 2
idouble: 1
ifloat: 2
-ildouble: 5
-ldouble: 5
+ildouble: 3
+ldouble: 3
Function: Imaginary part of "ctanh":
double: 1
float: 1
idouble: 1
ifloat: 1
-ildouble: 25
-ldouble: 25
+ildouble: 1
+ldouble: 1
Function: "erf":
double: 1
--
Joseph S. Myers
joseph@codesourcery.com