]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Fix comparison in sqrtl for IBM long double 128.
authorLuis Machado <luisgpm@br.ibm.com>
Wed, 10 Nov 2010 21:15:05 +0000 (16:15 -0500)
committerPetr Baudis <pasky@suse.cz>
Mon, 15 Nov 2010 17:27:04 +0000 (18:27 +0100)
(cherry picked from commit da93d21475878725c9e0cb2b6e650bd8d3628435)

ChangeLog
sysdeps/ieee754/ldbl-128ibm/e_sqrtl.c

index 6c9908056ede22abc6d681c40d60db3828b89aab..c0dc1da01e1cfcfefdc3a19f11db946f2f333be5 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2010-11-10  Luis Machado  <luisgpm@br.ibm.com>
+
+       * sysdeps/ieee754/ldbl-128ibm/e_sqrtl.c (__ieee754_sqrtl): Force
+         signed comparison.
+
 2010-11-08  Ulrich Drepper  <drepper@gmail.com>
 
        [BZ #12194]
index 1f533cae42257fe527019bd330ffef9f749b5752..fe6bb55b072b55281a24cb0b1a90401a5057eef7 100644 (file)
@@ -73,9 +73,9 @@ long double __ieee754_sqrtl(long double x)
        m = ((a.i[2] >> 20) & 0x7ff) - 54;
       }
       m += n;
-      if (m > 0)
+      if ((int) m > 0)
        a.i[2] = (a.i[2] & 0x800fffff) | (m << 20);
-      else if (m <= -54) {
+      else if ((int) m <= -54) {
        a.i[2] &= 0x80000000;
        a.i[3] = 0;
       } else {