This is the mail archive of the
glibc-cvs@sourceware.org
mailing list for the glibc project.
GNU C Library master sources branch, master, updated. glibc-2.15-1154-g6043738
- From: azanella at sourceware dot org
- To: glibc-cvs at sourceware dot org
- Date: 5 Jun 2012 13:43:58 -0000
- Subject: GNU C Library master sources branch, master, updated. glibc-2.15-1154-g6043738
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 "GNU C Library master sources".
The branch, master has been updated
via 6043738b3692bd542fc47596628aefc8dba75523 (commit)
from 34ae0b3270c67cae0c54ac98b693fdf7d010a206 (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.git;a=commitdiff;h=6043738b3692bd542fc47596628aefc8dba75523
commit 6043738b3692bd542fc47596628aefc8dba75523
Author: Adhemerval Zanella <azanella@linux.vnet.ibm.com>
Date: Tue Jun 5 10:42:49 2012 -0300
Fix spurious undeflow for ldbl-128ibm erfl
For values higher than 25.6283 erflc underflow, so adjust erfl
to return a constant value based argument sign.
diff --git a/ChangeLog b/ChangeLog
index 925e986..dc61b0d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2012-06-05 Adhemerval Zanella <azanella@linux.vnet.ibm.com>
+
+ * sysdeps/ieee754/ldbl-128ibm/s_erfl.c: Fix spurious underflow for
+ values higher than 25.6283.
+
2012-06-04 Adhemerval Zanella <azanella@linux.vnet.ibm.com>
* sysdeps/ieee754/ldbl-128ibm/e_fmodl.c (__ieee754_fmodl): Fix
diff --git a/sysdeps/ieee754/ldbl-128ibm/s_erfl.c b/sysdeps/ieee754/ldbl-128ibm/s_erfl.c
index f91a00f..6a4475e 100644
--- a/sysdeps/ieee754/ldbl-128ibm/s_erfl.c
+++ b/sysdeps/ieee754/ldbl-128ibm/s_erfl.c
@@ -72,6 +72,8 @@
* z=1/x^2
* The interval is partitioned into several segments
* of width 1/8 in 1/x.
+ * erf(x) = 1.0 - erfc(x) if x < 25.6283 else
+ * erf(x) = sign(x)*(1.0 - tiny)
*
* Note1:
* To compute exp(-x*x-0.5625+R/S), let s be a single
@@ -85,6 +87,9 @@
* erfc(x) ~ ---------- * ( 1 + Poly(1/x^2) )
* x*sqrt(pi)
*
+ * Note3:
+ * For x higher than 25.6283, erf(x) underflows.
+ *
* 5. For inf > x >= 107
* erf(x) = sign(x) *(1 - tiny) (raise inexact)
* erfc(x) = tiny*tiny (raise underflow) if x > 0
@@ -770,9 +775,19 @@ __erfl (long double x)
if (ix >= 0x3ff00000) /* |x| >= 1.0 */
{
- y = __erfcl (x);
- return (one - y);
- /* return (one - __erfcl (x)); */
+ if (ix >= 0x4039A0DE)
+ {
+ /* __erfcl (x) underflows if x > 25.6283 */
+ if (sign)
+ return one-tiny;
+ else
+ return tiny-one;
+ }
+ else
+ {
+ y = __erfcl (x);
+ return (one - y);
+ }
}
u.parts32.w0 = ix;
a = u.value;
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 5 +++++
sysdeps/ieee754/ldbl-128ibm/s_erfl.c | 21 ++++++++++++++++++---
2 files changed, 23 insertions(+), 3 deletions(-)
hooks/post-receive
--
GNU C Library master sources