summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--demos/calc/calclex.c2
-rw-r--r--gen-fac.c4
-rw-r--r--mini-gmp/mini-gmp.c4
-rw-r--r--mpn/arm/arm-defs.m42
-rw-r--r--mpn/generic/broot.c2
-rw-r--r--mpn/generic/brootinv.c10
-rw-r--r--mpn/x86_64/bobcat/copyd.asm2
-rw-r--r--mpn/x86_64/bobcat/copyi.asm2
-rw-r--r--mpn/x86_64/fastsse/lshift-movdqu2.asm2
-rw-r--r--mpn/x86_64/fastsse/lshiftc-movdqu2.asm2
-rw-r--r--mpn/x86_64/fastsse/rshift-movdqu2.asm2
-rw-r--r--mpz/bin_uiui.c2
-rw-r--r--tests/mpn/t-brootinv.c2
-rw-r--r--tests/mpz/t-mfac_uiui.c10
-rw-r--r--tune/speed.c2
15 files changed, 25 insertions, 25 deletions
diff --git a/demos/calc/calclex.c b/demos/calc/calclex.c
index ebd1f0a1a..1d319ef94 100644
--- a/demos/calc/calclex.c
+++ b/demos/calc/calclex.c
@@ -112,7 +112,7 @@ extern FILE *yyin, *yyout;
* int a single C statement (which needs a semi-colon terminator). This
* avoids problems with code like:
*
- * if ( condition_holds )
+ * if ( condition_holds )
* yyless( 5 );
* else
* do_something_else();
diff --git a/gen-fac.c b/gen-fac.c
index 3e730d14d..6fc13ab6b 100644
--- a/gen-fac.c
+++ b/gen-fac.c
@@ -107,8 +107,8 @@ gen_consts (int numb, int nail, int limb)
{
for (a = b; (a & 1) == 0; a >>= 1);
if (a == b) {
- mpz_divexact_ui (y, y, a/2+1);
- mpz_mul_ui (y, y, a);
+ mpz_divexact_ui (y, y, a/2+1);
+ mpz_mul_ui (y, y, a);
} else
mpz_mul_2exp (y, y, 1);
if (mpz_sizeinbase (y, 2) > numb)
diff --git a/mini-gmp/mini-gmp.c b/mini-gmp/mini-gmp.c
index 3ddf2a844..009f3964a 100644
--- a/mini-gmp/mini-gmp.c
+++ b/mini-gmp/mini-gmp.c
@@ -2207,7 +2207,7 @@ mpz_tdiv_r (mpz_t r, const mpz_t n, const mpz_t d)
void
mpz_mod (mpz_t r, const mpz_t n, const mpz_t d)
{
- if (d->_mp_size >= 0)
+ if (d->_mp_size >= 0)
mpz_div_qr (NULL, r, n, d, DIV_FLOOR);
else
mpz_div_qr (NULL, r, n, d, DIV_CEIL);
@@ -3116,7 +3116,7 @@ mpz_rootrem (mpz_t x, mpz_t r, const mpz_t y, unsigned long z)
mpz_init (u);
mpz_setbit (t, mpz_sizeinbase (y, 2) / z + 1);
- if (z == 2) /* simplify sqrt loop: z-1 == 1 */
+ if (z == 2) /* simplify sqrt loop: z-1 == 1 */
do {
mpz_swap (u, t); /* u = x */
mpz_tdiv_q (t, y, u); /* t = y/x */
diff --git a/mpn/arm/arm-defs.m4 b/mpn/arm/arm-defs.m4
index 4fe5257c6..65d0ed22c 100644
--- a/mpn/arm/arm-defs.m4
+++ b/mpn/arm/arm-defs.m4
@@ -51,7 +51,7 @@ deflit(pc,r15)
define(`lea_num',0)
dnl LEA(reg,gmp_symbol)
-dnl
+dnl
dnl Load the address of gmp_symbol into a register. The gmp_symbol must be
dnl either local or protected/hidden, since we assume it has a fixed distance
dnl from the point of use.
diff --git a/mpn/generic/broot.c b/mpn/generic/broot.c
index 53009f52e..93d3292b7 100644
--- a/mpn/generic/broot.c
+++ b/mpn/generic/broot.c
@@ -125,7 +125,7 @@ mpn_broot_invm1 (mp_ptr rp, mp_srcptr ap, mp_size_t n, mp_limb_t k)
return;
}
- /* For odd k, (k+1)/2 = k/2+1, and the latter avoids overflow. */
+ /* For odd k, (k+1)/2 = k/2+1, and the latter avoids overflow. */
kp1h = k/2 + 1;
/* FIXME: Special case for two limb iteration. */
diff --git a/mpn/generic/brootinv.c b/mpn/generic/brootinv.c
index b1a4a63d7..d2a1e34ed 100644
--- a/mpn/generic/brootinv.c
+++ b/mpn/generic/brootinv.c
@@ -46,7 +46,7 @@ powlimb (mp_limb_t a, mp_limb_t e)
Works just for odd k. Else the Hensel lifting degenerates.
FIXME:
-
+
(1) Make it work for k == GMP_LIMB_MAX (k+1 below overflows).
(2) Rewrite iteration as
@@ -78,15 +78,15 @@ mpn_brootinv (mp_ptr rp, mp_srcptr yp, mp_size_t bn, mp_limb_t k, mp_ptr tp)
binvert_limb (kinv, k);
/* 4-bit initial approximation:
-
- y%16 | 1 3 5 7 9 11 13 15,
+
+ y%16 | 1 3 5 7 9 11 13 15,
k%4 +-----------------------------
1 | 1 11 13 7 9 3 5 15
3 | 1 3 5 7 9 11 13 15
*/
y0 = yp[0];
-
+
r0 = y0 ^ (((y0 << 1) ^ (y0 << 2)) & ~(k << 2) & 8); /* 4 bits */
r0 = kinv * (k2 * r0 - y0 * powlimb(r0, k2 & 0x7f)); /* 8 bits */
r0 = kinv * (k2 * r0 - y0 * powlimb(r0, k2 & 0xffff)); /* 16 bits */
@@ -106,7 +106,7 @@ mpn_brootinv (mp_ptr rp, mp_srcptr yp, mp_size_t bn, mp_limb_t k, mp_ptr tp)
rp[0] = r0;
if (bn == 1)
return;
-
+
d = 0;
for (; bn > 1; bn = (bn + 1) >> 1)
order[d++] = bn;
diff --git a/mpn/x86_64/bobcat/copyd.asm b/mpn/x86_64/bobcat/copyd.asm
index 11cc0ee36..ca47bbd80 100644
--- a/mpn/x86_64/bobcat/copyd.asm
+++ b/mpn/x86_64/bobcat/copyd.asm
@@ -21,7 +21,7 @@ include(`../config.m4')
C cycles/limb
C AMD K8,K9 1
-C AMD K10 1-2 (alignment fluctuations)
+C AMD K10 1-2 (alignment fluctuations)
C AMD bd1 ?
C AMD bobcat 1.5
C Intel P4 2.8
diff --git a/mpn/x86_64/bobcat/copyi.asm b/mpn/x86_64/bobcat/copyi.asm
index e361e5092..7ce0811d1 100644
--- a/mpn/x86_64/bobcat/copyi.asm
+++ b/mpn/x86_64/bobcat/copyi.asm
@@ -21,7 +21,7 @@ include(`../config.m4')
C cycles/limb
C AMD K8,K9 1
-C AMD K10 1-2 (alignment fluctuations)
+C AMD K10 1-2 (alignment fluctuations)
C AMD bd1 ?
C AMD bobcat 1.5
C Intel P4 2.8
diff --git a/mpn/x86_64/fastsse/lshift-movdqu2.asm b/mpn/x86_64/fastsse/lshift-movdqu2.asm
index f2b0e8655..ea34b394b 100644
--- a/mpn/x86_64/fastsse/lshift-movdqu2.asm
+++ b/mpn/x86_64/fastsse/lshift-movdqu2.asm
@@ -40,7 +40,7 @@ C and bottom-most writes might need 8-byte operations.
C
C This variant rely on fast load movdqu, and uses it even for aligned operands,
C in order to avoid the need for two separate loops.
-C
+C
C TODO
C * Could 2-limb wind-down code be simplified?
C * Improve basecase code, using shld/shrd for SBR, discrete integer shifts
diff --git a/mpn/x86_64/fastsse/lshiftc-movdqu2.asm b/mpn/x86_64/fastsse/lshiftc-movdqu2.asm
index d05171cf0..7e816ac2c 100644
--- a/mpn/x86_64/fastsse/lshiftc-movdqu2.asm
+++ b/mpn/x86_64/fastsse/lshiftc-movdqu2.asm
@@ -40,7 +40,7 @@ C and bottom-most writes might need 8-byte operations.
C
C This variant rely on fast load movdqu, and uses it even for aligned operands,
C in order to avoid the need for two separate loops.
-C
+C
C TODO
C * Could 2-limb wind-down code be simplified?
C * Improve basecase code, using shld/shrd for SBR, discrete integer shifts
diff --git a/mpn/x86_64/fastsse/rshift-movdqu2.asm b/mpn/x86_64/fastsse/rshift-movdqu2.asm
index eb178315d..158124e43 100644
--- a/mpn/x86_64/fastsse/rshift-movdqu2.asm
+++ b/mpn/x86_64/fastsse/rshift-movdqu2.asm
@@ -40,7 +40,7 @@ C and bottom-most writes might need 8-byte operations.
C
C This variant rely on fast load movdqu, and uses it even for aligned operands,
C in order to avoid the need for two separate loops.
-C
+C
C TODO
C * Could 2-limb wind-down code be simplified?
C * Improve basecase code, using shld/shrd for SBR, discrete integer shifts
diff --git a/mpz/bin_uiui.c b/mpz/bin_uiui.c
index a0b988fd5..d86fb298e 100644
--- a/mpz/bin_uiui.c
+++ b/mpz/bin_uiui.c
@@ -375,7 +375,7 @@ bc_bin_uiui (unsigned int n, unsigned int k)
(with inverses).
*/
-/* bin2kk[i - ODD_CENTRAL_BINOMIAL_OFFSET] =
+/* bin2kk[i - ODD_CENTRAL_BINOMIAL_OFFSET] =
binomial(i*2,i)/2^t (where t is chosen so that it is odd). */
static const mp_limb_t bin2kk[] = { ONE_LIMB_ODD_CENTRAL_BINOMIAL_TABLE };
diff --git a/tests/mpn/t-brootinv.c b/tests/mpn/t-brootinv.c
index 294e22315..5b6745a9a 100644
--- a/tests/mpn/t-brootinv.c
+++ b/tests/mpn/t-brootinv.c
@@ -84,7 +84,7 @@ main (int argc, char **argv)
mpn_brootinv (rp, ap, n, k, scratch);
mpn_powlo (pp, rp, &k, 1, n, scratch);
mpn_mullo_n (app, ap, pp, n);
-
+
if (app[0] != 1 || !mpn_zero_p (app+1, n-1))
{
gmp_fprintf (stderr,
diff --git a/tests/mpz/t-mfac_uiui.c b/tests/mpz/t-mfac_uiui.c
index 1b8f75f94..bf351d2ae 100644
--- a/tests/mpz/t-mfac_uiui.c
+++ b/tests/mpz/t-mfac_uiui.c
@@ -62,7 +62,7 @@ main (int argc, char *argv[])
m2 = 0;
for (n = 0; n <= limit;)
{
- mpz_mfac_uiui (res, n, MULTIFAC_WHEEL);
+ mpz_mfac_uiui (res, n, MULTIFAC_WHEEL);
MPZ_CHECK_FORMAT (res);
if (mpz_cmp (ref[m], res) != 0)
{
@@ -71,7 +71,7 @@ main (int argc, char *argv[])
printf (" want "); mpz_out_str (stdout, 10, ref[m]); printf("\n");
abort ();
}
- mpz_mfac_uiui (res, n, MULTIFAC_WHEEL2);
+ mpz_mfac_uiui (res, n, MULTIFAC_WHEEL2);
MPZ_CHECK_FORMAT (res);
if (mpz_cmp (ref2[m2], res) != 0)
{
@@ -91,7 +91,7 @@ main (int argc, char *argv[])
else n += step;
}
mpz_fac_ui (ref[0], n);
- mpz_mfac_uiui (res, n, 1);
+ mpz_mfac_uiui (res, n, 1);
MPZ_CHECK_FORMAT (res);
if (mpz_cmp (ref[0], res) != 0)
{
@@ -102,7 +102,7 @@ main (int argc, char *argv[])
}
mpz_2fac_ui (ref[0], n);
- mpz_mfac_uiui (res, n, 2);
+ mpz_mfac_uiui (res, n, 2);
MPZ_CHECK_FORMAT (res);
if (mpz_cmp (ref[0], res) != 0)
{
@@ -114,7 +114,7 @@ main (int argc, char *argv[])
n++;
mpz_2fac_ui (ref[0], n);
- mpz_mfac_uiui (res, n, 2);
+ mpz_mfac_uiui (res, n, 2);
MPZ_CHECK_FORMAT (res);
if (mpz_cmp (ref[0], res) != 0)
{
diff --git a/tune/speed.c b/tune/speed.c
index 0ccd4a818..3cbde8cbf 100644
--- a/tune/speed.c
+++ b/tune/speed.c
@@ -373,7 +373,7 @@ const struct routine_t {
{ "mpn_broot", speed_mpn_broot, FLAG_R },
{ "mpn_broot_invm1", speed_mpn_broot_invm1, FLAG_R },
{ "mpn_brootinv", speed_mpn_brootinv, FLAG_R },
-
+
{ "mpn_get_str", speed_mpn_get_str, FLAG_R_OPTIONAL },
{ "mpn_set_str", speed_mpn_set_str, FLAG_R_OPTIONAL },
{ "mpn_set_str_basecase", speed_mpn_bc_set_str, FLAG_R_OPTIONAL },