mirror of
git://sourceware.org/git/glibc.git
synced 2024-12-09 04:11:27 +08:00
Copy comment about inner loop from powerpc mpa.c to the default one
This commit is contained in:
parent
92945b5261
commit
20cd7fb3ae
@ -1,3 +1,11 @@
|
|||||||
|
2013-02-20 Siddhesh Poyarekar <siddhesh@redhat.com>
|
||||||
|
|
||||||
|
* sysdeps/ieee754/dbl-64/mpa.c (__sqr): Copy over comment from
|
||||||
|
powerpc mpa.c.
|
||||||
|
* sysdeps/powerpc/powerpc32/power4/fpu/mpa.c (__mul): Fix
|
||||||
|
comment formatting.
|
||||||
|
* sysdeps/powerpc/powerpc64/power4/fpu/mpa.c (__mul): Likewise.
|
||||||
|
|
||||||
2013-02-19 Joseph Myers <joseph@codesourcery.com>
|
2013-02-19 Joseph Myers <joseph@codesourcery.com>
|
||||||
|
|
||||||
[BZ #13550]
|
[BZ #13550]
|
||||||
|
@ -749,6 +749,15 @@ __sqr (const mp_no *x, mp_no *y, int p)
|
|||||||
if (k % 2 == 0)
|
if (k % 2 == 0)
|
||||||
yk += X[lim] * X[lim];
|
yk += X[lim] * X[lim];
|
||||||
|
|
||||||
|
/* In __mul, this loop (and the one within the next while loop) run
|
||||||
|
between a range to calculate the mantissa as follows:
|
||||||
|
|
||||||
|
Z[k] = X[k] * Y[n] + X[k+1] * Y[n-1] ... + X[n-1] * Y[k+1]
|
||||||
|
+ X[n] * Y[k]
|
||||||
|
|
||||||
|
For X == Y, we can get away with summing halfway and doubling the
|
||||||
|
result. For cases where the range size is even, the mid-point needs
|
||||||
|
to be added separately (above). */
|
||||||
for (i = k - p, j = p; i < j; i++, j--)
|
for (i = k - p, j = p; i < j; i++, j--)
|
||||||
yk2 += X[i] * X[j];
|
yk2 += X[i] * X[j];
|
||||||
|
|
||||||
@ -769,6 +778,7 @@ __sqr (const mp_no *x, mp_no *y, int p)
|
|||||||
if (k % 2 == 0)
|
if (k % 2 == 0)
|
||||||
yk += X[lim] * X[lim];
|
yk += X[lim] * X[lim];
|
||||||
|
|
||||||
|
/* Likewise for this loop. */
|
||||||
for (i = 1, j = k - 1; i < j; i++, j--)
|
for (i = 1, j = k - 1; i < j; i++, j--)
|
||||||
yk2 += X[i] * X[j];
|
yk2 += X[i] * X[j];
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user