This is the mail archive of the glibc-cvs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

GNU C Library master sources branch master updated. glibc-2.19-326-g2ca180e


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  2ca180e97a16f3ee3ec9e7e5a5fb7eda3d863a02 (commit)
      from  dc041bd4dbaf0f22b962647e0d0a1b8090d0e679 (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=2ca180e97a16f3ee3ec9e7e5a5fb7eda3d863a02

commit 2ca180e97a16f3ee3ec9e7e5a5fb7eda3d863a02
Author: Stefan Liebler <stli@linux.vnet.ibm.com>
Date:   Tue Apr 29 15:43:36 2014 +0200

    [BZ #16823] Fix log1pl returning wrong infinity sign

diff --git a/ChangeLog b/ChangeLog
index 4007295..803d114 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2014-04-29  Stefan Liebler  <stli@linux.vnet.ibm.com>
+
+	[BZ #16823]
+	* sysdeps/ieee754/ldbl-128/s_log1pl.c (__log1pl):
+	Always divide by positive zero when computing -Inf result.
+	* sysdeps/ieee754/dbl-64/s_log1p.c (__log1p): Likewise.
+	* sysdeps/ieee754/flt-32/s_log1pf.c (__log1pf): Likewise.
+
 2014-04-28  Adhemerval Zanella  <azanella@linux.vnet.ibm.com>
 
 	* sysdeps/powerpc/fpu/fclrexcpt.c (__feclearexcept): Do not update
diff --git a/sysdeps/ieee754/dbl-64/s_log1p.c b/sysdeps/ieee754/dbl-64/s_log1p.c
index fd4dce5..c922148 100644
--- a/sysdeps/ieee754/dbl-64/s_log1p.c
+++ b/sysdeps/ieee754/dbl-64/s_log1p.c
@@ -110,7 +110,7 @@ __log1p (double x)
       if (__glibc_unlikely (ax >= 0x3ff00000))           /* x <= -1.0 */
 	{
 	  if (x == -1.0)
-	    return -two54 / (x - x);            /* log1p(-1)=+inf */
+	    return -two54 / zero;               /* log1p(-1)=-inf */
 	  else
 	    return (x - x) / (x - x);           /* log1p(x<-1)=NaN */
 	}
diff --git a/sysdeps/ieee754/flt-32/s_log1pf.c b/sysdeps/ieee754/flt-32/s_log1pf.c
index 0307277..5f00feb 100644
--- a/sysdeps/ieee754/flt-32/s_log1pf.c
+++ b/sysdeps/ieee754/flt-32/s_log1pf.c
@@ -42,7 +42,7 @@ __log1pf(float x)
 	k = 1;
 	if (hx < 0x3ed413d7) {			/* x < 0.41422  */
 	    if(ax>=0x3f800000) {		/* x <= -1.0 */
-		if(x==(float)-1.0) return -two25/(x-x); /* log1p(-1)=+inf */
+		if(x==(float)-1.0) return -two25/zero; /* log1p(-1)=-inf */
 		else return (x-x)/(x-x);	/* log1p(x<-1)=NaN */
 	    }
 	    if(ax<0x31000000) {			/* |x| < 2**-29 */
diff --git a/sysdeps/ieee754/ldbl-128/s_log1pl.c b/sysdeps/ieee754/ldbl-128/s_log1pl.c
index d991e8a..d8d89f0 100644
--- a/sysdeps/ieee754/ldbl-128/s_log1pl.c
+++ b/sysdeps/ieee754/ldbl-128/s_log1pl.c
@@ -150,7 +150,7 @@ __log1pl (long double xm1)
   if (x <= 0.0L)
     {
       if (x == 0.0L)
-	return (-1.0L / (x - x));
+	return (-1.0L / zero);  /* log1p(-1) = -inf */
       else
 	return (zero / (x - x));
     }

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                           |    8 ++++++++
 sysdeps/ieee754/dbl-64/s_log1p.c    |    2 +-
 sysdeps/ieee754/flt-32/s_log1pf.c   |    2 +-
 sysdeps/ieee754/ldbl-128/s_log1pl.c |    2 +-
 4 files changed, 11 insertions(+), 3 deletions(-)


hooks/post-receive
-- 
GNU C Library master sources


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]