summary refs log tree commit diff
path: root/sysdeps/x86_64
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2014-03-21 00:03:38 +0000
committerJoseph Myers <joseph@codesourcery.com>2014-03-21 00:03:38 +0000
commit8c92dfff412c20dc0c483ea68444d093a5672de0 (patch)
treeed4e4aa92d826a5a319b39bce73d9abee1cfccb9 /sysdeps/x86_64
parent6eaf95cbfa0031ea267682dc2c9c17ed3e3dc167 (diff)
downloadglibc-8c92dfff412c20dc0c483ea68444d093a5672de0.tar.gz
glibc-8c92dfff412c20dc0c483ea68444d093a5672de0.tar.xz
glibc-8c92dfff412c20dc0c483ea68444d093a5672de0.zip
Test most libm functions in all rounding modes.
This patch makes libm-test.inc tests of most functions use ALL_RM_TEST
unless there was some reason to defer that change for a particular
function.

I started out planning to defer the change for pow (bug 16315), cexp /
ccos / ccosh / csin / csinh (likely fallout from exp, bug 16284) and
cpow (exact expectations for signs of exact zero results not wanted).
Testing on x86_64 and x86 showed additional failures for acosh, cacos,
catan, catanh, clog, clog10, jn, log, log10, log1p, log2, tgamma, yn,
so making the change for those functions was deferred as well, pending
investigation to show which of these represent distinct bugs (some
such bugs may already be filed) and appropriate fixing / XFAILing.
Failures include wrong signs of zero results, errors slightly above
the 9ulp bound (in such cases it may make sense for functions to set
round-to-nearest internally to reduce error accumulation), large
errors and incorrect overflow/underflow for the rounding mode (with
consequent missing errno settings in some cases).  It's possible some
could be issues with test expectations, though I didn't notice any
that were obviously like that (I added NO_TEST_INLINE for cases that
were failing for ildoubl on x86 and where it seemed reasonable for
them to fail for the fast-math inlines).

There may of course be failures on other architectures for functions
that didn't fail on x86_64 or x86, in which case the usual rule
applies: file a bug (preferably identifying the underlying problem
function, in cases where function A calls function B and a problem
with function B may present in the test results for function A) if not
already in Bugzilla then fix or XFAIL.

Tested x86_64 and x86 and ulps updated accordingly.

	* math/libm-test.inc (asinh_test): Use ALL_RM_TEST.
	(atan_test): Likewise.
	(atanh_test_data): Use NO_TEST_INLINE for two tests.
	(atanh_test): Use ALL_RM_TEST.
	(atan2_test_data): Likewise.
	(cabs_test): Likewise.
	(cacosh_test): Likewise.
	(carg_test): Likewise.
	(casin_test): Likewise.
	(casinh_test): Likewise.
	(cbrt_test): Likewise.
	(csqrt_test): Likewise.
	(erf_test): Likewise.
	(erfc_test): Likewise.
	(pow10_test): Likewise.
	(exp2_test): Likewise.
	(hypot_test): Likewise.
	(j0_test): Likewise.
	(j1_test): Likewise.
	(lgamma_test): Likewise.
	(gamma_test): Likewise.
	(sincos_test): Likewise.
	(tanh_test): Likewise.
	(y0_test): Likewise.
	(y1_test): Likewise.
	* sysdeps/i386/fpu/libm-test-ulps: Update.
	* sysdeps/x86_64/fpu/libm-test-ulps: Likewise.
Diffstat (limited to 'sysdeps/x86_64')
-rw-r--r--sysdeps/x86_64/fpu/libm-test-ulps592
1 files changed, 592 insertions, 0 deletions
diff --git a/sysdeps/x86_64/fpu/libm-test-ulps b/sysdeps/x86_64/fpu/libm-test-ulps
index d88584b646..5f4ab06050 100644
--- a/sysdeps/x86_64/fpu/libm-test-ulps
+++ b/sysdeps/x86_64/fpu/libm-test-ulps
@@ -62,18 +62,112 @@ ifloat: 1
 ildouble: 1
 ldouble: 1
 
+Function: "asinh_downward":
+double: 1
+float: 2
+idouble: 1
+ifloat: 1
+ildouble: 1
+ldouble: 3
+
+Function: "asinh_towardzero":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+ildouble: 1
+ldouble: 2
+
+Function: "asinh_upward":
+double: 2
+float: 1
+idouble: 1
+ifloat: 1
+ildouble: 2
+ldouble: 2
+
 Function: "atan2":
 float: 1
 ifloat: 1
 ildouble: 1
 ldouble: 1
 
+Function: "atan2_downward":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+ildouble: 1
+ldouble: 1
+
+Function: "atan2_towardzero":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+ildouble: 1
+ldouble: 1
+
+Function: "atan2_upward":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+ildouble: 1
+ldouble: 1
+
+Function: "atan_downward":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+
+Function: "atan_towardzero":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+
+Function: "atan_upward":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+
 Function: "atanh":
 float: 1
 ifloat: 1
 ildouble: 1
 ldouble: 1
 
+Function: "atanh_downward":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+ildouble: 2
+ldouble: 2
+
+Function: "atanh_towardzero":
+float: 1
+ifloat: 1
+ildouble: 2
+ldouble: 2
+
+Function: "atanh_upward":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+
 Function: Real part of "cacos":
 double: 1
 float: 2
@@ -106,6 +200,76 @@ ifloat: 2
 ildouble: 1
 ldouble: 1
 
+Function: Real part of "cacosh_downward":
+double: 5
+float: 3
+idouble: 5
+ifloat: 3
+ildouble: 5
+ldouble: 5
+
+Function: Imaginary part of "cacosh_downward":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+ildouble: 2
+ldouble: 2
+
+Function: Real part of "cacosh_towardzero":
+double: 5
+float: 3
+idouble: 5
+ifloat: 3
+ildouble: 5
+ldouble: 5
+
+Function: Imaginary part of "cacosh_towardzero":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+ildouble: 2
+ldouble: 2
+
+Function: Real part of "cacosh_upward":
+double: 4
+float: 4
+idouble: 4
+ifloat: 4
+ildouble: 5
+ldouble: 5
+
+Function: Imaginary part of "cacosh_upward":
+double: 2
+float: 2
+idouble: 2
+ifloat: 2
+ildouble: 2
+ldouble: 2
+
+Function: "carg_downward":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+ildouble: 1
+ldouble: 1
+
+Function: "carg_towardzero":
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+
+Function: "carg_upward":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+ildouble: 1
+ldouble: 1
+
 Function: Real part of "casin":
 double: 1
 float: 1
@@ -122,6 +286,54 @@ ifloat: 2
 ildouble: 2
 ldouble: 2
 
+Function: Real part of "casin_downward":
+double: 3
+float: 1
+idouble: 3
+ifloat: 1
+ildouble: 2
+ldouble: 2
+
+Function: Imaginary part of "casin_downward":
+double: 5
+float: 3
+idouble: 5
+ifloat: 3
+ildouble: 5
+ldouble: 5
+
+Function: Real part of "casin_towardzero":
+double: 3
+float: 1
+idouble: 3
+ifloat: 1
+ildouble: 2
+ldouble: 2
+
+Function: Imaginary part of "casin_towardzero":
+double: 5
+float: 3
+idouble: 5
+ifloat: 3
+ildouble: 5
+ldouble: 5
+
+Function: Real part of "casin_upward":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+ildouble: 2
+ldouble: 2
+
+Function: Imaginary part of "casin_upward":
+double: 4
+float: 4
+idouble: 4
+ifloat: 4
+ildouble: 5
+ldouble: 5
+
 Function: Real part of "casinh":
 double: 1
 float: 2
@@ -138,6 +350,54 @@ ifloat: 1
 ildouble: 1
 ldouble: 1
 
+Function: Real part of "casinh_downward":
+double: 5
+float: 3
+idouble: 5
+ifloat: 3
+ildouble: 5
+ldouble: 5
+
+Function: Imaginary part of "casinh_downward":
+double: 3
+float: 1
+idouble: 3
+ifloat: 1
+ildouble: 2
+ldouble: 2
+
+Function: Real part of "casinh_towardzero":
+double: 5
+float: 3
+idouble: 5
+ifloat: 3
+ildouble: 5
+ldouble: 5
+
+Function: Imaginary part of "casinh_towardzero":
+double: 3
+float: 1
+idouble: 3
+ifloat: 1
+ildouble: 2
+ldouble: 2
+
+Function: Real part of "casinh_upward":
+double: 4
+float: 4
+idouble: 4
+ifloat: 4
+ildouble: 5
+ldouble: 5
+
+Function: Imaginary part of "casinh_upward":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
+ildouble: 2
+ldouble: 2
+
 Function: Real part of "catan":
 float: 1
 ifloat: 1
@@ -170,6 +430,28 @@ ifloat: 1
 ildouble: 1
 ldouble: 1
 
+Function: "cbrt_downward":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+ildouble: 1
+ldouble: 1
+
+Function: "cbrt_towardzero":
+double: 2
+idouble: 2
+ildouble: 1
+ldouble: 1
+
+Function: "cbrt_upward":
+double: 3
+float: 1
+idouble: 3
+ifloat: 1
+ildouble: 1
+ldouble: 1
+
 Function: Real part of "ccos":
 double: 1
 float: 1
@@ -362,6 +644,54 @@ ifloat: 1
 ildouble: 1
 ldouble: 1
 
+Function: Real part of "csqrt_downward":
+double: 3
+float: 3
+idouble: 3
+ifloat: 3
+ildouble: 3
+ldouble: 3
+
+Function: Imaginary part of "csqrt_downward":
+double: 2
+float: 2
+idouble: 2
+ifloat: 2
+ildouble: 2
+ldouble: 2
+
+Function: Real part of "csqrt_towardzero":
+double: 2
+float: 2
+idouble: 2
+ifloat: 2
+ildouble: 2
+ldouble: 2
+
+Function: Imaginary part of "csqrt_towardzero":
+double: 2
+float: 2
+idouble: 2
+ifloat: 2
+ildouble: 2
+ldouble: 2
+
+Function: Real part of "csqrt_upward":
+double: 3
+float: 2
+idouble: 3
+ifloat: 2
+ildouble: 3
+ldouble: 3
+
+Function: Imaginary part of "csqrt_upward":
+double: 2
+float: 2
+idouble: 2
+ifloat: 2
+ildouble: 2
+ldouble: 2
+
 Function: Real part of "ctan":
 double: 1
 float: 1
@@ -528,6 +858,20 @@ idouble: 1
 ildouble: 1
 ldouble: 1
 
+Function: "erf_downward":
+float: 1
+ifloat: 1
+
+Function: "erf_towardzero":
+float: 1
+ifloat: 1
+
+Function: "erf_upward":
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+
 Function: "erfc":
 double: 1
 float: 1
@@ -536,6 +880,30 @@ ifloat: 1
 ildouble: 1
 ldouble: 1
 
+Function: "erfc_downward":
+double: 1
+float: 3
+idouble: 1
+ifloat: 3
+ildouble: 3
+ldouble: 3
+
+Function: "erfc_towardzero":
+double: 1
+float: 3
+idouble: 1
+ifloat: 3
+ildouble: 2
+ldouble: 2
+
+Function: "erfc_upward":
+double: 2
+float: 2
+idouble: 2
+ifloat: 2
+ildouble: 3
+ldouble: 3
+
 Function: "exp10":
 double: 1
 idouble: 1
@@ -630,12 +998,54 @@ ifloat: 1
 ildouble: 1
 ldouble: 1
 
+Function: "gamma_downward":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+ildouble: 3
+ldouble: 3
+
+Function: "gamma_towardzero":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+ildouble: 2
+ldouble: 2
+
+Function: "gamma_upward":
+double: 1
+float: 3
+idouble: 1
+ifloat: 3
+ildouble: 2
+ldouble: 2
+
 Function: "hypot":
 double: 1
 idouble: 1
 ildouble: 1
 ldouble: 1
 
+Function: "hypot_downward":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
+
+Function: "hypot_towardzero":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
+
+Function: "hypot_upward":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
+
 Function: "j0":
 double: 2
 float: 2
@@ -644,6 +1054,30 @@ ifloat: 2
 ildouble: 2
 ldouble: 2
 
+Function: "j0_downward":
+double: 2
+float: 4
+idouble: 2
+ifloat: 4
+ildouble: 4
+ldouble: 4
+
+Function: "j0_towardzero":
+double: 3
+float: 2
+idouble: 3
+ifloat: 2
+ildouble: 5
+ldouble: 5
+
+Function: "j0_upward":
+double: 3
+float: 2
+idouble: 3
+ifloat: 2
+ildouble: 4
+ldouble: 4
+
 Function: "j1":
 double: 1
 float: 2
@@ -652,6 +1086,30 @@ ifloat: 2
 ildouble: 1
 ldouble: 1
 
+Function: "j1_downward":
+double: 3
+float: 3
+idouble: 3
+ifloat: 3
+ildouble: 4
+ldouble: 4
+
+Function: "j1_towardzero":
+double: 3
+float: 2
+idouble: 3
+ifloat: 2
+ildouble: 4
+ldouble: 4
+
+Function: "j1_upward":
+double: 3
+float: 5
+idouble: 3
+ifloat: 5
+ildouble: 3
+ldouble: 3
+
 Function: "jn":
 double: 4
 float: 4
@@ -668,6 +1126,30 @@ ifloat: 1
 ildouble: 1
 ldouble: 1
 
+Function: "lgamma_downward":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
+ildouble: 3
+ldouble: 3
+
+Function: "lgamma_towardzero":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+ildouble: 2
+ldouble: 2
+
+Function: "lgamma_upward":
+double: 1
+float: 3
+idouble: 1
+ifloat: 3
+ildouble: 2
+ldouble: 2
+
 Function: "log":
 float: 1
 ifloat: 1
@@ -700,6 +1182,26 @@ idouble: 1
 ildouble: 1
 ldouble: 1
 
+Function: "pow10_downward":
+double: 1
+idouble: 1
+ildouble: 2
+ldouble: 2
+
+Function: "pow10_towardzero":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
+
+Function: "pow10_upward":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+
 Function: "pow_downward":
 float: 1
 ifloat: 1
@@ -750,6 +1252,24 @@ Function: "sincos":
 ildouble: 1
 ldouble: 1
 
+Function: "sincos_downward":
+double: 1
+idouble: 1
+ildouble: 2
+ldouble: 2
+
+Function: "sincos_towardzero":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
+
+Function: "sincos_upward":
+double: 1
+idouble: 1
+ildouble: 2
+ldouble: 2
+
 Function: "sinh":
 ildouble: 1
 ldouble: 1
@@ -810,6 +1330,30 @@ ifloat: 1
 ildouble: 2
 ldouble: 2
 
+Function: "tanh_downward":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+
+Function: "tanh_towardzero":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+
+Function: "tanh_upward":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+
 Function: "tgamma":
 double: 4
 float: 3
@@ -826,6 +1370,30 @@ ifloat: 1
 ildouble: 1
 ldouble: 1
 
+Function: "y0_downward":
+double: 3
+float: 4
+idouble: 3
+ifloat: 4
+ildouble: 5
+ldouble: 5
+
+Function: "y0_towardzero":
+double: 3
+float: 3
+idouble: 3
+ifloat: 3
+ildouble: 5
+ldouble: 5
+
+Function: "y0_upward":
+double: 3
+float: 5
+idouble: 3
+ifloat: 5
+ildouble: 3
+ldouble: 3
+
 Function: "y1":
 double: 3
 float: 2
@@ -834,6 +1402,30 @@ ifloat: 2
 ildouble: 2
 ldouble: 2
 
+Function: "y1_downward":
+double: 3
+float: 7
+idouble: 3
+ifloat: 7
+ildouble: 7
+ldouble: 7
+
+Function: "y1_towardzero":
+double: 3
+float: 3
+idouble: 3
+ifloat: 3
+ildouble: 5
+ldouble: 5
+
+Function: "y1_upward":
+double: 7
+float: 5
+idouble: 7
+ifloat: 5
+ildouble: 7
+ldouble: 7
+
 Function: "yn":
 double: 3
 float: 3