2013-03-07 Siddhesh Poyarekar <siddhesh@redhat.com>
+ * sysdeps/powerpc/powerpc32/power4/fpu/mpa.c (__mul): Use
+ intermediate variable to calculate exponent.
+ (__sqr): Likewise.
+ * sysdeps/powerpc/powerpc64/power4/fpu/mpa.c (__mul):
+ Likewise.
+ (__sqr): Likewise.
+
* sysdeps/ieee754/dbl-64/mpa.c [!NO__MUL]: Define __mul.
[!NO__SQR]: Define __sqr.
* sysdeps/powerpc/powerpc32/power4/fpu/mpa.c: define NO__MUL
}
Z[k] = zk;
+ int e = EX + EY;
/* Is there a carry beyond the most significant digit? */
if (Z[1] == ZERO)
{
for (i = 1; i <= p2; i++)
Z[i] = Z[i + 1];
- EZ = EX + EY - 1;
+ e--;
}
- else
- EZ = EX + EY;
+ EZ = e;
Z[0] = X[0] * Y[0];
}
/* Squares are always positive. */
Y[0] = 1.0;
- EY = 2 * EX;
+ int e = EX * 2;
/* Is there a carry beyond the most significant digit? */
if (__glibc_unlikely (Y[1] == ZERO))
{
for (i = 1; i <= p; i++)
Y[i] = Y[i + 1];
- EY--;
+ e--;
}
+ EY = e;
}
}
Z[k] = zk;
+ int e = EX + EY;
/* Is there a carry beyond the most significant digit? */
if (Z[1] == ZERO)
{
for (i = 1; i <= p2; i++)
Z[i] = Z[i + 1];
- EZ = EX + EY - 1;
+ e--;
}
- else
- EZ = EX + EY;
+ EZ = e;
Z[0] = X[0] * Y[0];
}
/* Squares are always positive. */
Y[0] = 1.0;
- EY = 2 * EX;
+ int e = EX * 2;
/* Is there a carry beyond the most significant digit? */
if (__glibc_unlikely (Y[1] == ZERO))
{
for (i = 1; i <= p; i++)
Y[i] = Y[i + 1];
- EY--;
+ e--;
}
+ EY = e;
}