This is the mail archive of the
glibc-cvs@sourceware.org
mailing list for the glibc project.
Community source repository for glibc add-on ports branch, master, updated. glibc-2.15-227-g61a5213
- From: cmetcalf at sourceware dot org
- To: glibc-cvs at sourceware dot org
- Date: 17 May 2012 15:39:03 -0000
- Subject: Community source repository for glibc add-on ports branch, master, updated. glibc-2.15-227-g61a5213
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Community source repository for glibc add-on ports".
The branch, master has been updated
via 61a52130e8736d13059cdd090d3c8b2ac42f292b (commit)
via ac9182e7532b7a903afa1b86545dd9f1cc308a74 (commit)
from 342a78ccd537e6abd917eacac21ae2064ef39df9 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://sources.redhat.com/git/gitweb.cgi?p=glibc-ports.git;a=commitdiff;h=61a52130e8736d13059cdd090d3c8b2ac42f292b
commit 61a52130e8736d13059cdd090d3c8b2ac42f292b
Author: Chris Metcalf <cmetcalf@tilera.com>
Date: Thu May 17 11:31:07 2012 -0400
tile: update libm-test-ulps for improved fma() and exp10()
diff --git a/ChangeLog.tile b/ChangeLog.tile
index 7d3c7bd..24da151 100644
--- a/ChangeLog.tile
+++ b/ChangeLog.tile
@@ -1,5 +1,7 @@
2012-05-17 Chris Metcalf <cmetcalf@tilera.com>
+ * sysdeps/tile/libm-test-ulps: Improved fma() and exp10().
+
* sysdeps/tile/s_fma.c: Use ieee754/dbl-64 without rounding or
exception support; it's still much better than the generic version.
diff --git a/sysdeps/tile/libm-test-ulps b/sysdeps/tile/libm-test-ulps
index 1912f44..b5e0179 100644
--- a/sysdeps/tile/libm-test-ulps
+++ b/sysdeps/tile/libm-test-ulps
@@ -625,25 +625,16 @@ idouble: 1
# exp10
Test "exp10 (-1) == 0.1":
double: 1
-float: 1
idouble: 1
-ifloat: 1
Test "exp10 (-305) == 1.0e-305":
double: 1
idouble: 1
Test "exp10 (-36) == 1.0e-36":
double: 1
idouble: 1
-Test "exp10 (0.75) == 5.62341325190349080394951039776481231":
-double: 1
-float: 1
-idouble: 1
-ifloat: 1
Test "exp10 (3) == 1000":
double: 1
-float: 2
idouble: 1
-ifloat: 2
Test "exp10 (36) == 1.0e36":
double: 1
idouble: 1
@@ -659,6 +650,26 @@ Test "expm1 (500.0) == 1.4035922178528374107397703328409120821806e+217":
double: 1
idouble: 1
+# fma
+Test "fma (-0x1.fffffffffffffp-711, 0x1.fffffffffffffp-275, 0x1.fffffe00007ffp-983) == 0x1.7ffffe00007ffp-983":
+double: 1
+idouble: 1
+Test "fma (0x1.0000002p+0, 0x1.ffffffcp-1, -0x1p-300) == 0x1.fffffffffffffp-1":
+double: 1
+idouble: 1
+Test "fma (0x1.153d650bb9f06p-907, 0x1.2d01230d48407p-125, -0x0.b278d5acfc3cp-1022) == -0x0.b22757123bbe9p-1022":
+double: 1
+idouble: 1
+Test "fma (0x1.4000004p-967, 0x1p-106, 0x0.000001p-1022) == 0x0.0000010000003p-1022":
+double: 1
+idouble: 1
+Test "fma (0x1.7ff8p+13, 0x1.000002p+0, 0x1.ffffp-24) == 0x1.7ff802p+13":
+float: 1
+ifloat: 1
+Test "fma (0x1.7fffff8p-968, 0x1p-106, 0x0.000001p-1022) == 0x0.0000010000001p-1022":
+double: 1
+idouble: 1
+
# hypot
Test "hypot (-0.7, -12.4) == 12.419742348374220601176836866763271":
float: 1
@@ -811,9 +822,7 @@ float: 1
idouble: 3
ifloat: 1
Test "jn (3, 2.0) == 0.128943249474402051098793332969239835":
-double: 1
float: 1
-idouble: 1
ifloat: 1
Test "jn (3, 2.4048255576957729) == 0.19899990535769083404042146764530813":
double: 3
@@ -1243,9 +1252,7 @@ ifloat: 1
Function: "exp10":
double: 1
-float: 2
idouble: 1
-ifloat: 2
Function: "expm1":
double: 1
@@ -1253,6 +1260,12 @@ float: 1
idouble: 1
ifloat: 1
+Function: "fma":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+
Function: "hypot":
float: 1
ifloat: 1
http://sources.redhat.com/git/gitweb.cgi?p=glibc-ports.git;a=commitdiff;h=ac9182e7532b7a903afa1b86545dd9f1cc308a74
commit ac9182e7532b7a903afa1b86545dd9f1cc308a74
Author: Chris Metcalf <cmetcalf@tilera.com>
Date: Thu May 17 11:27:36 2012 -0400
tile: use ieee754/dbl-64 version of fma() and fmaf()
It turns out that even if you stub out the rounding and exception
support and use the ieee754 version, it's still much better than
the generic version that just uses normal multiply and add.
The resulting functions have only 1 ULP of error according to the tests.
diff --git a/ChangeLog.tile b/ChangeLog.tile
index b800112..7d3c7bd 100644
--- a/ChangeLog.tile
+++ b/ChangeLog.tile
@@ -1,3 +1,8 @@
+2012-05-17 Chris Metcalf <cmetcalf@tilera.com>
+
+ * sysdeps/tile/s_fma.c: Use ieee754/dbl-64 without rounding or
+ exception support; it's still much better than the generic version.
+
2012-05-16 Chris Metcalf <cmetcalf@tilera.com>
* sysdeps/unix/sysv/linux/tile/ucontext_i: Fix tilegx32 offset bug.
diff --git a/sysdeps/tile/s_fma.c b/sysdeps/tile/s_fma.c
index 355b4ed..5be5865 100644
--- a/sysdeps/tile/s_fma.c
+++ b/sysdeps/tile/s_fma.c
@@ -1,3 +1,8 @@
-/* Although tile uses ieee754/dbl-64, it does not support the
- rounding modes required to use the standard dbl-64 s_fma.c. */
-#include <math/s_fma.c>
+/* tile does not support the rounding modes required by the ieee754/dbl-64
+ implementation, but it's still better than the generic implementation. */
+
+#define libc_feholdexcept_setround(e, x) do { (void) (e); } while (0)
+#define libc_feupdateenv_test(e, x) ((void) (e), 0)
+#define libc_fetestexcept(x) 0
+
+#include <sysdeps/ieee754/dbl-64/s_fma.c>
diff --git a/sysdeps/tile/s_fmaf.c b/sysdeps/tile/s_fmaf.c
index caa8e40..92d66b2 100644
--- a/sysdeps/tile/s_fmaf.c
+++ b/sysdeps/tile/s_fmaf.c
@@ -1,3 +1,8 @@
-/* Although tile uses ieee754/dbl-64, it does not support the
- rounding modes required to use the standard dbl-64 s_fmaf.c. */
-#include <math/s_fmaf.c>
+/* tile does not support the rounding modes required by the ieee754/dbl-64
+ implementation, but it's still better than the generic implementation. */
+
+#define libc_feholdexcept_setround(e, x) do { (void) (e); } while (0)
+#define libc_feupdateenv_test(e, x) ((void) (e), 0)
+#define libc_fetestexcept(x) 0
+
+#include <sysdeps/ieee754/dbl-64/s_fmaf.c>
-----------------------------------------------------------------------
Summary of changes:
ChangeLog.tile | 7 +++++++
sysdeps/tile/libm-test-ulps | 39 ++++++++++++++++++++++++++-------------
sysdeps/tile/s_fma.c | 11 ++++++++---
sysdeps/tile/s_fmaf.c | 11 ++++++++---
4 files changed, 49 insertions(+), 19 deletions(-)
hooks/post-receive
--
Community source repository for glibc add-on ports