summaryrefslogtreecommitdiff
path: root/mpz
diff options
context:
space:
mode:
Diffstat (limited to 'mpz')
-rw-r--r--mpz/aorsmul_i.c2
-rw-r--r--mpz/bin_ui.c2
-rw-r--r--mpz/cong.c4
-rw-r--r--mpz/cong_2exp.c4
-rw-r--r--mpz/cong_ui.c2
-rw-r--r--mpz/divegcd.c4
-rw-r--r--mpz/divis.c2
-rw-r--r--mpz/divis_2exp.c2
-rw-r--r--mpz/fib_ui.c2
-rw-r--r--mpz/hamdist.c2
-rw-r--r--mpz/jacobi.c8
-rw-r--r--mpz/kronsz.c2
-rw-r--r--mpz/kronuz.c2
-rw-r--r--mpz/kronzs.c2
-rw-r--r--mpz/kronzu.c2
-rw-r--r--mpz/lcm.c4
-rw-r--r--mpz/lucnum_ui.c2
-rw-r--r--mpz/mul.c4
-rw-r--r--mpz/n_pow_ui.c15
-rw-r--r--mpz/powm_ui.c2
-rw-r--r--mpz/scan1.c2
21 files changed, 35 insertions, 36 deletions
diff --git a/mpz/aorsmul_i.c b/mpz/aorsmul_i.c
index 8fef90afd..239c0a823 100644
--- a/mpz/aorsmul_i.c
+++ b/mpz/aorsmul_i.c
@@ -126,7 +126,7 @@ mpz_aorsmul_1 (mpz_ptr w, mpz_srcptr x, mp_limb_t y, mp_size_t sub)
cy = cy2 + mpn_add_1 (wp, wp, dsize, cy);
}
#endif
-
+
wp[dsize] = cy;
new_wsize += (cy != 0);
}
diff --git a/mpz/bin_ui.c b/mpz/bin_ui.c
index a3ff12102..17beb11b5 100644
--- a/mpz/bin_ui.c
+++ b/mpz/bin_ui.c
@@ -48,7 +48,7 @@ mpz_bin_ui (mpz_ptr r, mpz_srcptr n, unsigned long int k)
mpz_t nacc;
mp_limb_t kacc;
mp_size_t negate;
-
+
if (mpz_sgn (n) < 0)
{
/* bin(n,k) = (-1)^k * bin(-n+k-1,k), and set ni = -n+k-1 - k = -n-1 */
diff --git a/mpz/cong.c b/mpz/cong.c
index faa8db15d..d7fa9fe0f 100644
--- a/mpz/cong.c
+++ b/mpz/cong.c
@@ -142,9 +142,9 @@ mpz_congruent_p (mpz_srcptr a, mpz_srcptr c, mpz_srcptr d)
is unnecessary, but the rest of that code is wanted. */
goto cong_1;
}
- }
+ }
}
-
+
TMP_MARK (marker);
xp = TMP_ALLOC_LIMBS (asize+1);
diff --git a/mpz/cong_2exp.c b/mpz/cong_2exp.c
index f0069b6b8..53556130f 100644
--- a/mpz/cong_2exp.c
+++ b/mpz/cong_2exp.c
@@ -70,12 +70,12 @@ mpz_congruent_2exp_p (mpz_srcptr a, mpz_srcptr c, unsigned long d)
/* if d covers all of a and c, then must be exactly equal */
if (asize <= dlimbs)
return asize == csize;
-
+
/* whole limbs zero */
for (i = csize; i < dlimbs; i++)
if (ap[i] != 0)
return 0;
-
+
/* partial limb zero */
return (ap[dlimbs] & dmask) == 0;
}
diff --git a/mpz/cong_ui.c b/mpz/cong_ui.c
index 416b1b853..2f3ea3f75 100644
--- a/mpz/cong_ui.c
+++ b/mpz/cong_ui.c
@@ -39,7 +39,7 @@ mpz_congruent_ui_p (mpz_srcptr a, unsigned long cu, unsigned long du)
mp_size_t asize;
mp_limb_t c, d, r;
- if (du == 0)
+ if (du == 0)
DIVIDE_BY_ZERO;
asize = SIZ(a);
diff --git a/mpz/divegcd.c b/mpz/divegcd.c
index 3b19c973d..0997abe1b 100644
--- a/mpz/divegcd.c
+++ b/mpz/divegcd.c
@@ -36,14 +36,14 @@ MA 02111-1307, USA. */
1 60.7%
2^k 20.2% (1<=k<32)
3*2^k 9.0% (1<=k<32)
- other 10.1%
+ other 10.1%
Only the low limb is examined for optimizations, since GCDs bigger than
2^32 (or 2^64) will occur very infrequently.
Future: This could change to an mpn_divexact_gcd, possibly partly
inlined, if/when the relevant mpq functions change to an mpn based
- implementation. */
+ implementation. */
static void
diff --git a/mpz/divis.c b/mpz/divis.c
index b071fce00..03333aeeb 100644
--- a/mpz/divis.c
+++ b/mpz/divis.c
@@ -30,7 +30,7 @@ mpz_divisible_p (mpz_srcptr a, mpz_srcptr d)
int dsize;
dsize = SIZ(d);
- if (dsize == 0)
+ if (dsize == 0)
DIVIDE_BY_ZERO;
return mpn_divisible_p (PTR(a), (mp_size_t) ABSIZ(a),
diff --git a/mpz/divis_2exp.c b/mpz/divis_2exp.c
index 9392fde33..e0552e067 100644
--- a/mpz/divis_2exp.c
+++ b/mpz/divis_2exp.c
@@ -45,7 +45,7 @@ mpz_divisible_2exp_p (mpz_srcptr a, unsigned long d)
for (i = 0; i < dlimbs; i++)
if (ap[i] != 0)
return 0;
-
+
/* left over bits must be zero */
dbits = d % BITS_PER_MP_LIMB;
dmask = (CNST_LIMB(1) << dbits) - 1;
diff --git a/mpz/fib_ui.c b/mpz/fib_ui.c
index 0514c13af..cc38a437a 100644
--- a/mpz/fib_ui.c
+++ b/mpz/fib_ui.c
@@ -117,7 +117,7 @@ mpz_fib_ui (mpz_ptr fn, unsigned long n)
ASSERT (c != MP_LIMB_T_MAX); /* because it's the high of a mul */
c += mpn_add_1 (fp, fp, size-1, CNST_LIMB(2));
fp[size-1] = c;
- }
+ }
#endif
}
else
diff --git a/mpz/hamdist.c b/mpz/hamdist.c
index 2c26934b6..1c4cfb4cd 100644
--- a/mpz/hamdist.c
+++ b/mpz/hamdist.c
@@ -135,7 +135,7 @@ mpz_hamdist (mpz_srcptr u, mpz_srcptr v)
popc_limb (twoscount, vlimb);
count += twoscount;
}
-
+
/* Overlapping part of u and v, if any. Ones complement both, so just
plain hamdist. */
step = MIN (usize, vsize);
diff --git a/mpz/jacobi.c b/mpz/jacobi.c
index 1afbe2e23..5711b10ce 100644
--- a/mpz/jacobi.c
+++ b/mpz/jacobi.c
@@ -143,7 +143,7 @@ mpz_jacobi (mpz_srcptr a, mpz_srcptr b)
/* account for effect of sign of a, then ignore it */
result_bit1 ^= JACOBI_ASGN_SU_BIT1 (asize, blow);
asize = ABS (asize);
-
+
if (bsize == 1 || (bsize == 2 && (bsecond >> btwos) == 0))
{
/* special case one limb b, use modexact and no copying */
@@ -153,7 +153,7 @@ mpz_jacobi (mpz_srcptr a, mpz_srcptr b)
if (blow == 1) /* (a/1)=1 always */
return JACOBI_BIT1_TO_PN (result_bit1);
-
+
JACOBI_MOD_OR_MODEXACT_1_ODD (result_bit1, alow, asrcp, asize, blow);
TRACE (printf ("base (%lu/%lu) with %d\n",
alow, blow, JACOBI_BIT1_TO_PN (result_bit1)));
@@ -176,7 +176,7 @@ mpz_jacobi (mpz_srcptr a, mpz_srcptr b)
if (atwos != 0)
alow |= asecond << (BITS_PER_MP_LIMB-atwos);
}
-
+
/* (a/2)=(2/a) with a odd */
result_bit1 ^= JACOBI_TWOS_U_BIT1 (btwos, alow);
@@ -189,7 +189,7 @@ mpz_jacobi (mpz_srcptr a, mpz_srcptr b)
/* b still has its twos, so cancel out their effect */
result_bit1 ^= JACOBI_TWOS_U_BIT1 (btwos, alow);
-
+
result_bit1 ^= JACOBI_RECIP_UU_BIT1 (alow, blow); /* now (b/a) */
JACOBI_MOD_OR_MODEXACT_1_ODD (result_bit1, blow, bsrcp, bsize, alow);
TRACE (printf ("base (%lu/%lu) with %d\n",
diff --git a/mpz/kronsz.c b/mpz/kronsz.c
index b36b1a047..990b1ec20 100644
--- a/mpz/kronsz.c
+++ b/mpz/kronsz.c
@@ -91,7 +91,7 @@ mpz_si_kronecker (long a, mpz_srcptr b)
result_bit1 ^= JACOBI_TWOS_U_BIT1 (BITS_PER_MP_LIMB-1, a);
return JACOBI_BIT1_TO_PN (result_bit1);
}
-
+
/* b_abs_size > 1 */
b_low = b_ptr[1] << 1;
}
diff --git a/mpz/kronuz.c b/mpz/kronuz.c
index a60e415b8..50920a4fe 100644
--- a/mpz/kronuz.c
+++ b/mpz/kronuz.c
@@ -65,7 +65,7 @@ mpz_ui_kronecker (unsigned long a, mpz_srcptr b)
{
if (b_abs_size == 1) /* (a/0x80000000) == (a/2)^(BPML-1) */
return JACOBI_TWOS_U (BITS_PER_MP_LIMB-1, a);
-
+
/* b_abs_size > 1 */
b_low = b_ptr[1] << 1;
}
diff --git a/mpz/kronzs.c b/mpz/kronzs.c
index 83adf07d3..d34f208b2 100644
--- a/mpz/kronzs.c
+++ b/mpz/kronzs.c
@@ -64,7 +64,7 @@ mpz_kronecker_si (mpz_srcptr a, long b)
return 0; /* (even/even)=0 */
/* (a/2)=(2/a) for a odd */
- count_trailing_zeros (twos, b_limb);
+ count_trailing_zeros (twos, b_limb);
b_limb >>= twos;
result_bit1 ^= JACOBI_TWOS_U_BIT1 (twos, a_low);
}
diff --git a/mpz/kronzu.c b/mpz/kronzu.c
index 646fe8db1..0d76ad74d 100644
--- a/mpz/kronzu.c
+++ b/mpz/kronzu.c
@@ -62,7 +62,7 @@ mpz_kronecker_ui (mpz_srcptr a, unsigned long b)
return 0; /* (even/even)=0 */
/* (a/2)=(2/a) for a odd */
- count_trailing_zeros (twos, b);
+ count_trailing_zeros (twos, b);
b >>= twos;
result_bit1 = (JACOBI_TWOS_U_BIT1 (twos, a_low)
^ JACOBI_ASGN_SU_BIT1 (a_size, b));
diff --git a/mpz/lcm.c b/mpz/lcm.c
index c9fd8d001..1aea24534 100644
--- a/mpz/lcm.c
+++ b/mpz/lcm.c
@@ -54,7 +54,7 @@ mpz_lcm (mpz_ptr r, mpz_srcptr u, mpz_srcptr v)
vl = PTR(v)[0];
gl = mpn_gcd_1 (up, usize, vl);
vl /= gl;
-
+
rp = PTR(r);
c = mpn_mul_1 (rp, up, usize, vl);
rp[usize] = c;
@@ -69,7 +69,7 @@ mpz_lcm (mpz_ptr r, mpz_srcptr u, mpz_srcptr v)
MPZ_SRCPTR_SWAP (u, v);
goto one;
}
-
+
TMP_MARK (marker);
size = MAX (usize, vsize);
MPZ_TMP_INIT (g, size);
diff --git a/mpz/lucnum_ui.c b/mpz/lucnum_ui.c
index 30d93304d..2af6b3e5f 100644
--- a/mpz/lucnum_ui.c
+++ b/mpz/lucnum_ui.c
@@ -25,7 +25,7 @@ MA 02111-1307, USA. */
/* change this to "#define TRACE(x) x" for diagnostics */
-#define TRACE(x)
+#define TRACE(x)
/* Notes:
diff --git a/mpz/mul.c b/mpz/mul.c
index c8c1916f3..329babe8b 100644
--- a/mpz/mul.c
+++ b/mpz/mul.c
@@ -77,7 +77,7 @@ mult (mpz_srcptr u, mpz_srcptr v, mpz_ptr w)
usize += (cy_limb != 0);
SIZ(w) = (sign_product >= 0 ? usize : -usize);
return;
- }
+ }
#else
if (vsize == 1)
{
@@ -88,7 +88,7 @@ mult (mpz_srcptr u, mpz_srcptr v, mpz_ptr w)
usize += (cy_limb != 0);
SIZ(w) = (sign_product >= 0 ? usize : -usize);
return;
- }
+ }
#endif
TMP_MARK (marker);
diff --git a/mpz/n_pow_ui.c b/mpz/n_pow_ui.c
index b7efa59a7..327c39281 100644
--- a/mpz/n_pow_ui.c
+++ b/mpz/n_pow_ui.c
@@ -398,7 +398,7 @@ mpz_n_pow_ui (mpz_ptr r, mp_srcptr bp, mp_size_t bsize, unsigned long int e)
the bit below the highest 1 (which will mean i==-1 if e==1). */
count_leading_zeros (cnt, e);
i = BITS_PER_MP_LIMB - cnt - 2;
-
+
#if HAVE_NATIVE_mpn_mul_2
if (bsize <= 2)
{
@@ -418,7 +418,7 @@ mpz_n_pow_ui (mpz_ptr r, mp_srcptr bp, mp_size_t bsize, unsigned long int e)
mult[0] = blimb_low;
mult[1] = blimb;
-
+
for ( ; i >= 0; i--)
{
TRACE (printf ("mul_2 loop i=%d e=0x%lX, rsize=%ld ralloc=%ld talloc=%ld\n",
@@ -462,7 +462,7 @@ mpz_n_pow_ui (mpz_ptr r, mp_srcptr bp, mp_size_t bsize, unsigned long int e)
if ((e & (1L << i)) != 0)
MPN_MUL_1 (rp, rsize, ralloc, blimb);
}
-
+
TRACE (mpn_trace ("mul_1 before rl, r", rp, rsize));
if (rl != 1)
MPN_MUL_1 (rp, rsize, ralloc, rl);
@@ -471,7 +471,7 @@ mpz_n_pow_ui (mpz_ptr r, mp_srcptr bp, mp_size_t bsize, unsigned long int e)
else
{
int parity;
-
+
/* Arrange the final result ends up in r, not in the temp space */
ULONG_PARITY (parity, e);
if (((parity ^ i) & 1) != 0)
@@ -479,7 +479,7 @@ mpz_n_pow_ui (mpz_ptr r, mp_srcptr bp, mp_size_t bsize, unsigned long int e)
MPN_COPY (rp, bp, bsize);
rsize = bsize;
-
+
for ( ; i >= 0; i--)
{
TRACE (printf ("mul loop i=%d e=0x%lX, rsize=%ld ralloc=%ld talloc=%ld\n",
@@ -494,14 +494,13 @@ mpz_n_pow_ui (mpz_ptr r, mp_srcptr bp, mp_size_t bsize, unsigned long int e)
SWAP_RP_TP;
}
}
-
- }
+ }
}
ASSERT (rp == PTR(r) + rtwos_limbs);
TRACE (mpn_trace ("end loop r", rp, rsize));
TMP_FREE (marker);
-
+
/* Apply any partial limb factors of 2. */
if (rtwos_bits != 0)
{
diff --git a/mpz/powm_ui.c b/mpz/powm_ui.c
index ceeaad684..6f7da8f2c 100644
--- a/mpz/powm_ui.c
+++ b/mpz/powm_ui.c
@@ -155,7 +155,7 @@ mpz_powm_ui (mpz_ptr r, mpz_srcptr b, unsigned long int el, mpz_srcptr m)
mp_limb_t cy;
cy = mpn_lshift (tp, xp, xn, m_zero_cnt);
tp[xn] = cy; xn += cy != 0;
-
+
if (xn < mn)
{
MPN_COPY (xp, tp, xn);
diff --git a/mpz/scan1.c b/mpz/scan1.c
index 038a07bca..4ec1d2a3a 100644
--- a/mpz/scan1.c
+++ b/mpz/scan1.c
@@ -111,7 +111,7 @@ mpz_scan1 (mpz_srcptr u, unsigned long starting_bit)
/* Adjust so ~limb implied by searching for 0 bit becomes -limb. */
limb--;
-
+
inverted:
/* Now seeking a 0 bit. */