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.18-766-g4c327f2


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  4c327f2ad89cff8e1fb6f7fe09b398119783553a (commit)
      from  6e067a5128c08f9a34ff4f69db02546d75dfa15c (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=4c327f2ad89cff8e1fb6f7fe09b398119783553a

commit 4c327f2ad89cff8e1fb6f7fe09b398119783553a
Author: Joseph Myers <joseph@codesourcery.com>
Date:   Wed Jan 8 13:32:39 2014 +0000

    Fix ldbl-128ibm expm1l on large arguments (bug 16408).
    
    This patch fixes bug 16408, ldbl-128ibm expm1l returning NaN for some
    large arguments.
    
    The basic problem is that the approach of converting the exponent to
    the form n * log(2) + y, where -0.5 <= y <= 0.5, then computing 2^n *
    expm1(y) + (2^n - 1) falls over when 2^n overflows (starting slightly
    before the point where expm1 overflows, when y is negative and n is
    the least integer for which 2^n overflows).  The ldbl-128 code, and
    the x86/x86_64 code, make expm1l fall back to expl for large positive
    arguments to avoid this issue.  This patch makes the ldbl-128ibm code
    do the same.  (The problem appears for the particular argument in the
    testsuite because the ldbl-128ibm code also uses an overflow threshold
    that's for ldbl-128 and is too big for ldbl-128ibm, but the problem
    described applies for large non-overflowing cases as well, although
    during the freeze is not a suitable time for making the expm1 tests
    cover cases close to overflow more thoroughly.)
    
    This leaves some code for large positive arguments in expm1l that is
    now dead.  To keep the code for ldbl-128 and ldbl-128ibm similar, and
    to avoid unnecessary changes during the freeze, the patch doesn't
    remove it; instead I propose to file a bug in Bugzilla as a reminder
    that this code (for overflow, including errno setting, and for
    arguments of +Inf) is no longer needed and should be removed from both
    those expm1l implementations.
    
    Tested powerpc32.
    
    	* sysdeps/ieee754/ldbl-128ibm/s_expm1l.c (__expm1l): Use __expl
    	for large positive arguments.

diff --git a/ChangeLog b/ChangeLog
index 7aa8791..f27a4eb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2014-01-08  Joseph Myers  <joseph@codesourcery.com>
+
+	[BZ #16408]
+	* sysdeps/ieee754/ldbl-128ibm/s_expm1l.c (__expm1l): Use __expl
+	for large positive arguments.
+
 2014-01-07  Joseph Myers  <joseph@codesourcery.com>
 
 	* sysdeps/powerpc/nofpu/libm-test-ulps: Regenerated.
diff --git a/NEWS b/NEWS
index 366e1d4..486e892 100644
--- a/NEWS
+++ b/NEWS
@@ -24,7 +24,7 @@ Version 2.19
   16103, 16112, 16143, 16144, 16146, 16150, 16151, 16153, 16167, 16172,
   16195, 16214, 16245, 16271, 16274, 16283, 16289, 16293, 16314, 16316,
   16330, 16337, 16338, 16356, 16365, 16366, 16369, 16372, 16375, 16379,
-  16384, 16385, 16386, 16387, 16390, 16400, 16407.
+  16384, 16385, 16386, 16387, 16390, 16400, 16407, 16408.
 
 * Slovenian translations for glibc messages have been contributed by the
   Translation Project's Slovenian team of translators.
diff --git a/sysdeps/ieee754/ldbl-128ibm/s_expm1l.c b/sysdeps/ieee754/ldbl-128ibm/s_expm1l.c
index 007e785..0464f79 100644
--- a/sysdeps/ieee754/ldbl-128ibm/s_expm1l.c
+++ b/sysdeps/ieee754/ldbl-128ibm/s_expm1l.c
@@ -101,6 +101,8 @@ __expm1l (long double x)
   EXTRACT_WORDS (ix, lx, xhi);
   sign = ix & 0x80000000;
   ix &= 0x7fffffff;
+  if (!sign && ix >= 0x40600000)
+    return __expl (x);
   if (ix >= 0x7ff00000)
     {
       /* Infinity. */

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

Summary of changes:
 ChangeLog                              |    6 ++++++
 NEWS                                   |    2 +-
 sysdeps/ieee754/ldbl-128ibm/s_expm1l.c |    2 ++
 3 files changed, 9 insertions(+), 1 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]