]> sourceware.org Git - glibc.git/commitdiff
Fix determination of lower precision in __mul
authorSiddhesh Poyarekar <siddhesh@redhat.com>
Fri, 15 Feb 2013 18:26:20 +0000 (23:56 +0530)
committerSiddhesh Poyarekar <siddhesh@redhat.com>
Fri, 15 Feb 2013 18:26:20 +0000 (23:56 +0530)
ChangeLog
sysdeps/ieee754/dbl-64/mpa.c

index bb84e32b5f29e68fb592fbf4d0c3e3710a719465..012fce4f69b835b18410ce5774473e948b88f490 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2013-02-15  Siddhesh Poyarekar  <siddhesh@redhat.com>
+
+       * sysdeps/ieee754/dbl-64/mpa.c (__mul): Fix determination of
+       the lower precision input.
+
 2013-02-15  Joseph Myers  <joseph@codesourcery.com>
 
        [BZ #13550]
index 542d81bdccbfec3da62b66b4dc7d7e77fbd8d45b..25f52f65c6a04621aef1b872d94e856930fd8b5f 100644 (file)
@@ -612,6 +612,7 @@ __mul (const mp_no *x, const mp_no *y, mp_no *z, int p)
 {
   int i, j, k, ip, ip2;
   double u, zk;
+  const mp_no *a;
 
   /* Is z=0?  */
   if (__glibc_unlikely (X[0] * Y[0] == ZERO))
@@ -626,9 +627,11 @@ __mul (const mp_no *x, const mp_no *y, mp_no *z, int p)
     if (X[ip2] != ZERO || Y[ip2] != ZERO)
       break;
 
+  a = X[ip2] != ZERO ? y : x;
+
   /* ... and here, at least one of them is still zero.  */
   for (ip = ip2; ip > 0; ip--)
-    if (X[ip] * Y[ip] != ZERO)
+    if (a->d[ip] != ZERO)
       break;
 
   /* The product looks like this for p = 3 (as an example):
This page took 0.106385 seconds and 5 git commands to generate.