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.15-715-g4f9d04a


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  4f9d04aa8fcc5008995409d524086121e9a840dc (commit)
      from  f5a01ca927f9141606276b05ad87974593a608a1 (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=4f9d04aa8fcc5008995409d524086121e9a840dc

commit 4f9d04aa8fcc5008995409d524086121e9a840dc
Author: Adhemerval Zanella <azanella@linux.vnet.ibm.com>
Date:   Wed May 2 15:14:17 2012 +0200

    Fix nexttoward bugs
    
            [BZ #2550]
            [BZ #2570]
            * sysdeps/ieee754/ldbl-128ibm/s_nexttoward.c: Use floating-point
            comparisons to determine direction to adjust input.

diff --git a/ChangeLog b/ChangeLog
index 66deec2..4b36557 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2012-05-02  Adhemerval Zanella  <azanella@linux.vnet.ibm.com>
+
+        [BZ #2550]
+        [BZ #2570]
+        * sysdeps/ieee754/ldbl-128ibm/s_nexttoward.c: Use floating-point
+        comparisons to determine direction to adjust input.
+
 2012-05-01  Roland McGrath  <roland@hack.frob.com>
 
 	* elf/Makefile ($(objpfx)check-localplt.out): Redirect the test's
diff --git a/sysdeps/ieee754/ldbl-128ibm/s_nexttoward.c b/sysdeps/ieee754/ldbl-128ibm/s_nexttoward.c
index 9ecfef1..40f0c46 100644
--- a/sysdeps/ieee754/ldbl-128ibm/s_nexttoward.c
+++ b/sysdeps/ieee754/ldbl-128ibm/s_nexttoward.c
@@ -57,11 +57,7 @@ double __nexttoward(double x, long double y)
 	    return x;
 	}
 	if(hx>=0) {				/* x > 0 */
-	    if (hy<0||(ix>>20)>(iy>>52)
-		|| ((ix>>20)==(iy>>52)
-		    && (((((int64_t)hx)<<32)|(lx))>(hy&0x000fffffffffffffLL)
-			|| (((((int64_t)hx)<<32)|(lx))==(hy&0x000fffffffffffffLL)
-			    )))) {	/* x > y, x -= ulp */
+	    if (x > y) {			/* x > 0 */
 		if(lx==0) hx -= 1;
 		lx -= 1;
 	    } else {				/* x < y, x += ulp */
@@ -69,11 +65,7 @@ double __nexttoward(double x, long double y)
 		if(lx==0) hx += 1;
 	    }
 	} else {				/* x < 0 */
-	    if (hy>=0||(ix>>20)>(iy>>52)
-		|| ((ix>>20)==(iy>>52)
-		    && (((((int64_t)hx)<<32)|(lx))>(hy&0x000fffffffffffffLL)
-			|| (((((int64_t)hx)<<32)|(lx))==(hy&0x000fffffffffffffLL)
-			   )))) {	/* x < y, x -= ulp */
+	    if (x < y) {			/* x < 0 */
 		if(lx==0) hx -= 1;
 		lx -= 1;
 	    } else {				/* x > y, x += ulp */

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

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