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-719-gce9c5b3


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  ce9c5b3e955746a9187ffde9b16feea4a357c86a (commit)
      from  3a6e988706d1ce2c88c933619d1f312098698ecd (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=ce9c5b3e955746a9187ffde9b16feea4a357c86a

commit ce9c5b3e955746a9187ffde9b16feea4a357c86a
Author: Joseph Myers <joseph@codesourcery.com>
Date:   Mon Jun 30 17:38:16 2014 +0000

    Fix ldbl-128 expm1l spurious underflow (bug 16539).
    
    This patch fixes spurious underflows from ldbl-128 expm1l, as reported
    in <https://sourceware.org/ml/libc-alpha/2014-06/msg00835.html> and
    exposed by the tests added for such a bug in the x86 / x86-64
    version.  The bug and fix are essentially the same, so no separate bug
    is filed in Bugzilla.
    
    Tested for mips64.
    
    	[BZ #16539]
    	* sysdeps/ieee754/ldbl-128/s_expm1l.c: Include <float.h>.
    	(__expm1l): Return argument unchanged when small but not
    	subnormal.

diff --git a/ChangeLog b/ChangeLog
index 2ef0a74..8897d9c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2014-06-30  Joseph Myers  <joseph@codesourcery.com>
 
+	[BZ #16539]
+	* sysdeps/ieee754/ldbl-128/s_expm1l.c: Include <float.h>.
+	(__expm1l): Return argument unchanged when small but not
+	subnormal.
+
 	* soft-fp/op-1.h (_FP_UNPACK_RAW_1): Rename local variables to
 	include macro name.
 	(_FP_UNPACK_RAW_1_P): Likewise.
diff --git a/sysdeps/ieee754/ldbl-128/s_expm1l.c b/sysdeps/ieee754/ldbl-128/s_expm1l.c
index 1c12109..f708af5 100644
--- a/sysdeps/ieee754/ldbl-128/s_expm1l.c
+++ b/sysdeps/ieee754/ldbl-128/s_expm1l.c
@@ -54,6 +54,7 @@
 
 
 #include <errno.h>
+#include <float.h>
 #include <math.h>
 #include <math_private.h>
 
@@ -136,6 +137,10 @@ __expm1l (long double x)
   if (x < minarg)
     return (4.0/big - 1.0L);
 
+  /* Avoid internal underflow when result does not underflow.  */
+  if (fabsl (x) < 0x1p-113L && fabsl (x) >= LDBL_MIN)
+    return x;
+
   /* Express x = ln 2 (k + remainder), remainder not exceeding 1/2. */
   xx = C1 + C2;			/* ln 2. */
   px = __floorl (0.5 + x / xx);

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

Summary of changes:
 ChangeLog                           |    5 +++++
 sysdeps/ieee754/ldbl-128/s_expm1l.c |    5 +++++
 2 files changed, 10 insertions(+), 0 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]