[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[patches] [2.3] lrint backports



I've applied this backport of some lrint fixes to EGLIBC 2.3 branch.  
(These fixes went on mainline shortly after some lrint fixes of mine went 
there; EGLIBC 2.3 had my fixes but not the followups.)

Index: sysdeps/ieee754/ldbl-128/s_lrintl.c
===================================================================
--- sysdeps/ieee754/ldbl-128/s_lrintl.c	(revision 1640)
+++ sysdeps/ieee754/ldbl-128/s_lrintl.c	(working copy)
@@ -50,7 +50,7 @@
     {
       w = two112[sx] + x;
       t = w - two112[sx];
-      GET_LDOUBLE_WORDS64 (i0, i1, x);
+      GET_LDOUBLE_WORDS64 (i0, i1, t);
       j0 = ((i0 >> 48) & 0x7fff) - 0x3fff;
       i0 &= 0x0000ffffffffffffLL;
       i0 |= 0x0001000000000000LL;
@@ -65,7 +65,7 @@
 	{
 	  w = two112[sx] + x;
 	  t = w - two112[sx];
-	  GET_LDOUBLE_WORDS64 (i0, i1, x);
+	  GET_LDOUBLE_WORDS64 (i0, i1, t);
 	  j0 = ((i0 >> 48) & 0x7fff) - 0x3fff;
 	  i0 &= 0x0000ffffffffffffLL;
 	  i0 |= 0x0001000000000000LL;
Index: math/libm-test.inc
===================================================================
--- math/libm-test.inc	(revision 1640)
+++ math/libm-test.inc	(working copy)
@@ -3264,7 +3264,7 @@
       TEST_f_l (lrint, 1071930.0008, 1071931);
       TEST_f_l (lrint, 1073741824.01, 1073741825);
 # if LONG_MAX > 281474976710656 && defined (TEST_LDOUBLE)
-      TEST_f_l (lrint, 281474976710656.025, 28147497671065);
+      TEST_f_l (lrint, 281474976710656.025, 281474976710656);
 # endif
 #endif
     }
Index: ChangeLog.eglibc
===================================================================
--- ChangeLog.eglibc	(revision 1640)
+++ ChangeLog.eglibc	(working copy)
@@ -1,3 +1,12 @@
+2007-03-05  Joseph Myers  <joseph@xxxxxxxxxxxxxxxx>
+
+	Backport from mainline.
+	2006-09-24  Jakub Jelinek  <jakub@xxxxxxxxxx>
+	* sysdeps/ieee754/ldbl-128/s_lrintl.c (__lrintl): Fix 2 typos.
+
+	2006-09-20  Andreas Jaeger  <aj@xxxxxxx>
+	* math/libm-test.inc (lrint_test_upward): Fix typo.
+
 2007-02-27  Joseph Myers  <joseph@xxxxxxxxxxxxxxxx>
 
 	* configure.in: Also pass -isystem option for GCC's include-fixed

-- 
Joseph S. Myers
joseph@xxxxxxxxxxxxxxxx