aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuis Machado <luisgpm@br.ibm.com>2010-11-10 16:15:05 -0500
committerAndreas Schwab <schwab@redhat.com>2010-12-01 15:35:17 +0100
commit4838fdcfdc95f0dacda6463c2dd81d11ee9e0414 (patch)
tree35cd78d9d46847f12c9f0b17145d1d3ae9ed1eda
parentde2ef7733cb48305e5955ee601cd1d168b27c017 (diff)
downloadglibc-4838fdcfdc95f0dacda6463c2dd81d11ee9e0414.zip
glibc-4838fdcfdc95f0dacda6463c2dd81d11ee9e0414.tar.gz
glibc-4838fdcfdc95f0dacda6463c2dd81d11ee9e0414.tar.bz2
Fix comparison in sqrtl for IBM long double 128.
(cherry picked from commit da93d21475878725c9e0cb2b6e650bd8d3628435)
-rw-r--r--ChangeLog5
-rw-r--r--sysdeps/ieee754/ldbl-128ibm/e_sqrtl.c4
2 files changed, 7 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 34bbdc9..b2d31d9 100644
--- 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]
diff --git a/sysdeps/ieee754/ldbl-128ibm/e_sqrtl.c b/sysdeps/ieee754/ldbl-128ibm/e_sqrtl.c
index 1f533ca..fe6bb55 100644
--- a/sysdeps/ieee754/ldbl-128ibm/e_sqrtl.c
+++ b/sysdeps/ieee754/ldbl-128ibm/e_sqrtl.c
@@ -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 {