This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Add more tests of log, log10, log1p, log2 [committed]
- From: Joseph Myers <joseph at codesourcery dot com>
- To: <libc-alpha at sourceware dot org>
- Date: Fri, 1 May 2015 21:09:50 +0000
- Subject: Add more tests of log, log10, log1p, log2 [committed]
- Authentication-results: sourceware.org; auth=none
This patch adds some randomly-generated tests of log, log10, log1p and
log2 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 log, log10, log2 and
log1p.
* 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 051c068..7a8a67b 100644
--- a/math/auto-libm-test-in
+++ b/math/auto-libm-test-in
@@ -1768,6 +1768,11 @@ log 0.75
log min
log min_subnorm
+log 0xb.0d5dfp-4
+log 0x1.6c3f6p+0
+log 0xa.ae688p-4
+log 0x1.017f8ap+44
+
log10 1
log10 0.1
log10 10.0
@@ -1778,6 +1783,12 @@ log10 0.75
log10 min
log10 min_subnorm
+log10 0x9.ad6e3p-4
+log10 0x1.7163aep+0
+log10 0xa.9d0d4p-4
+log10 0x1.251ec6p+0
+log10 0x1.022e82p+0
+
log1p 0
log1p -0
log1p e-1
@@ -1797,6 +1808,16 @@ log1p 0x1p100
log1p 0x1p1000
log1p max
+log1p 0x7.2a4368p-4
+log1p 0x6.d3a118p-4
+log1p 0x5.03f228p+0
+log1p 0x7.264963888ac9p-4
+log1p 0x8.786bdp-4
+log1p 0x7.89dc17790eeb4p-4
+log1p 0x9.81ccf8887c24a7bp-4
+log1p 0xa.5028608bd65f38dp-4
+log1p 0x5.bf78873e20a2d468p-4
+
log2 1
log2 e
log2 2.0
@@ -1809,6 +1830,8 @@ log2 0x1.63d202d04392cp+0
log2 0xf.d9ce0b1a50e08p-4
log2 0x1.07465bdc7e41b52ep+0
log2 0xf.4dfb4p-48
+log2 0x1.0a588ep+0
+log2 0xb.e77c6p-4
log2 min
log2 min_subnorm
diff --git a/sysdeps/i386/fpu/libm-test-ulps b/sysdeps/i386/fpu/libm-test-ulps
index 91e5c63..ae64aae 100644
--- a/sysdeps/i386/fpu/libm-test-ulps
+++ b/sysdeps/i386/fpu/libm-test-ulps
@@ -1604,16 +1604,16 @@ double: 1
float: 1
idouble: 1
ifloat: 1
-ildouble: 1
-ldouble: 1
+ildouble: 2
+ldouble: 2
Function: "log10_towardzero":
double: 1
float: 1
idouble: 1
ifloat: 1
-ildouble: 1
-ldouble: 1
+ildouble: 2
+ldouble: 2
Function: "log10_upward":
double: 1
@@ -1624,32 +1624,32 @@ ildouble: 1
ldouble: 1
Function: "log1p":
-ildouble: 1
-ldouble: 1
+ildouble: 2
+ldouble: 2
Function: "log1p_downward":
double: 1
float: 1
idouble: 1
ifloat: 1
-ildouble: 2
-ldouble: 2
+ildouble: 3
+ldouble: 3
Function: "log1p_towardzero":
double: 1
float: 1
idouble: 1
ifloat: 1
-ildouble: 2
-ldouble: 2
+ildouble: 3
+ldouble: 3
Function: "log1p_upward":
double: 1
float: 1
idouble: 1
ifloat: 1
-ildouble: 1
-ldouble: 1
+ildouble: 3
+ldouble: 3
Function: "log2":
ildouble: 1
@@ -1676,12 +1676,12 @@ ildouble: 1
ldouble: 1
Function: "log_downward":
-ildouble: 1
-ldouble: 1
+ildouble: 2
+ldouble: 2
Function: "log_towardzero":
-ildouble: 1
-ldouble: 1
+ildouble: 2
+ldouble: 2
Function: "log_upward":
ildouble: 1
diff --git a/sysdeps/x86_64/fpu/libm-test-ulps b/sysdeps/x86_64/fpu/libm-test-ulps
index 8b4cdd4..f0ece1e 100644
--- a/sysdeps/x86_64/fpu/libm-test-ulps
+++ b/sysdeps/x86_64/fpu/libm-test-ulps
@@ -1710,36 +1710,30 @@ ildouble: 1
ldouble: 1
Function: "log10_downward":
-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: "log10_towardzero":
-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: "log10_upward":
-double: 1
-float: 1
-idouble: 1
-ifloat: 1
+double: 2
+float: 2
+idouble: 2
+ifloat: 2
ildouble: 1
ldouble: 1
Function: "log1p":
-float: 1
-ifloat: 1
-ildouble: 1
-ldouble: 1
-
-Function: "log1p_downward":
double: 1
float: 1
idouble: 1
@@ -1747,21 +1741,29 @@ ifloat: 1
ildouble: 2
ldouble: 2
-Function: "log1p_towardzero":
-double: 1
+Function: "log1p_downward":
+double: 2
float: 1
-idouble: 1
+idouble: 2
ifloat: 1
-ildouble: 2
-ldouble: 2
+ildouble: 3
+ldouble: 3
+
+Function: "log1p_towardzero":
+double: 2
+float: 2
+idouble: 2
+ifloat: 2
+ildouble: 3
+ldouble: 3
Function: "log1p_upward":
-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: "log2":
double: 1
@@ -1780,34 +1782,36 @@ ildouble: 1
ldouble: 1
Function: "log2_towardzero":
-double: 1
+double: 2
float: 2
-idouble: 1
+idouble: 2
ifloat: 2
ildouble: 1
ldouble: 1
Function: "log2_upward":
double: 3
-float: 2
+float: 3
idouble: 3
-ifloat: 2
+ifloat: 3
ildouble: 1
ldouble: 1
Function: "log_downward":
-float: 1
-ifloat: 1
-ildouble: 1
-ldouble: 1
+float: 2
+ifloat: 2
+ildouble: 2
+ldouble: 2
Function: "log_towardzero":
-ildouble: 1
-ldouble: 1
+float: 2
+ifloat: 2
+ildouble: 2
+ldouble: 2
Function: "log_upward":
-float: 1
-ifloat: 1
+float: 2
+ifloat: 2
ildouble: 1
ldouble: 1
--
Joseph S. Myers
joseph@codesourcery.com