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.17-470-gfbbe2b9
- From: azanella at sourceware dot org
- To: glibc-cvs at sourceware dot org
- Date: 28 Mar 2013 12:57:21 -0000
- Subject: GNU C Library master sources branch master updated. glibc-2.17-470-gfbbe2b9
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 fbbe2b9a1f04c00ea0f8820a545bd4ca780ffa30 (commit)
from 7a86be6e5f18ba99b25d75c555ce56fe1fcea325 (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://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=fbbe2b9a1f04c00ea0f8820a545bd4ca780ffa30
commit fbbe2b9a1f04c00ea0f8820a545bd4ca780ffa30
Author: Adhemerval Zanella <azanella@linux.vnet.ibm.com>
Date: Thu Mar 28 09:52:48 2013 -0300
Fix e_logl (128ibm) spurious underflow
diff --git a/ChangeLog b/ChangeLog
index 7c1543c..390c5cb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2013-03-28 Adhemerval Zanella <azanella@linux.vnet.ibm.com>
+
+ [BZ #15214]
+ * sysdeps/ieee754/ldbl-128ibm/e_logl.c (__ieee754_logl): Fix spurious
+ underflow.
+ * sysdeps/powerpc/fpu/libm-test-ulps: Update.
+
2013-03-28 Siddhesh Poyarekar <siddhesh@redhat.com>
[BZ #15304]
diff --git a/NEWS b/NEWS
index 0902478..0682b19 100644
--- a/NEWS
+++ b/NEWS
@@ -11,8 +11,8 @@ Version 2.18
11120, 11561, 12723, 13550, 13889, 13951, 14142, 14176, 14200, 14317,
14327, 14496, 14812, 14920, 14964, 14981, 14982, 14985, 14994, 14996,
- 15003, 15006, 15020, 15023, 15036, 15054, 15055, 15062, 15078, 15160,
- 15232, 15234, 15283, 15285, 15287, 15304, 15307.
+ 15003, 15006, 15020, 15023, 15036, 15054, 15055, 15062, 15078, 15124,
+ 15160, 15232, 15234, 15283, 15285, 15287, 15304, 15307.
* Add support for calling C++11 thread_local object destructors on thread
and program exit. This needs compiler support for offloading C++11
diff --git a/sysdeps/ieee754/ldbl-128ibm/e_logl.c b/sysdeps/ieee754/ldbl-128ibm/e_logl.c
index 14f47eb..15b5edf 100644
--- a/sysdeps/ieee754/ldbl-128ibm/e_logl.c
+++ b/sysdeps/ieee754/ldbl-128ibm/e_logl.c
@@ -182,6 +182,9 @@ static const long double
ln2a = 6.93145751953125e-1L,
ln2b = 1.4286068203094172321214581765680755001344E-6L;
+static const long double
+ ldbl_epsilon = 0x1p-106L;
+
long double
__ieee754_logl(long double x)
{
@@ -258,7 +261,12 @@ __ieee754_logl(long double x)
}
/* Series expansion of log(1+z). */
w = z * z;
- y = ((((((((((((l15 * z
+ /* Avoid spurious underflows. */
+ if (__glibc_unlikely(w <= ldbl_epsilon))
+ y = 0.0L;
+ else
+ {
+ y = ((((((((((((l15 * z
+ l14) * z
+ l13) * z
+ l12) * z
@@ -271,7 +279,8 @@ __ieee754_logl(long double x)
+ l5) * z
+ l4) * z
+ l3) * z * w;
- y -= 0.5 * w;
+ y -= 0.5 * w;
+ }
y += e * ln2b; /* Base 2 exponent offset times ln(2). */
y += z;
y += logtbl[k-26]; /* log(t) - (t-1) */
diff --git a/sysdeps/powerpc/fpu/libm-test-ulps b/sysdeps/powerpc/fpu/libm-test-ulps
index 4221967..5072190 100644
--- a/sysdeps/powerpc/fpu/libm-test-ulps
+++ b/sysdeps/powerpc/fpu/libm-test-ulps
@@ -243,9 +243,11 @@ idouble: 1
Test "Real part of: cacos (-0.5 + +0 i) == 2.094395102393195492308428922186335256131 - 0 i":
double: 1
idouble: 1
+ldouble: 1
Test "Real part of: cacos (-0.5 - 0 i) == 2.094395102393195492308428922186335256131 + +0 i":
double: 1
idouble: 1
+ldouble: 1
Test "Imaginary part of: cacos (-1.5 + +0 i) == pi - 0.9624236501192068949955178268487368462704 i":
double: 1
float: 1
@@ -265,6 +267,10 @@ double: 1
float: 1
idouble: 1
ifloat: 1
+Test "Imaginary part of: cacos (0x1.fp1023 + 0x1.fp1023 i) == 7.853981633974483096156608458198757210493e-1 - 7.107906849659093345062145442726115449315e2 i":
+ldouble: 1
+Test "Imaginary part of: cacos (0x1.fp127 + 0x1.fp127 i) == 7.853981633974483096156608458198757210493e-1 - 8.973081118419833726837456344608533993585e1 i":
+ldouble: 1
# cacosh
Test "Real part of: cacosh (+0 + 0.5 i) == 0.4812118250596034474977589134243684231352 + pi/2 i":
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 7 +++++++
NEWS | 4 ++--
sysdeps/ieee754/ldbl-128ibm/e_logl.c | 13 +++++++++++--
sysdeps/powerpc/fpu/libm-test-ulps | 6 ++++++
4 files changed, 26 insertions(+), 4 deletions(-)
hooks/post-receive
--
GNU C Library master sources