From 0a4ea9786aee41f05973188e27187fa6dbb8fe88 Mon Sep 17 00:00:00 2001 From: Kevin Ryde Date: Tue, 23 Apr 2002 02:26:35 +0200 Subject: * mpn/generic/divis.c, mpz/cong_2exp.c: Nailify. --- mpz/cong_2exp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mpz/cong_2exp.c b/mpz/cong_2exp.c index aa205be8e..e4a637557 100644 --- a/mpz/cong_2exp.c +++ b/mpz/cong_2exp.c @@ -89,7 +89,7 @@ mpz_congruent_2exp_p (mpz_srcptr a, mpz_srcptr c, unsigned long d) ASSERT (i < csize); /* always have a non-zero limb on c */ alimb = ap[i]; climb = cp[i]; - sum = alimb + climb; + sum = (alimb + climb) & GMP_NUMB_MASK; if (i >= dlimbs) return (sum & dmask) == 0; @@ -111,7 +111,7 @@ mpz_congruent_2exp_p (mpz_srcptr a, mpz_srcptr c, unsigned long d) alimb = ap[i]; climb = cp[i]; - sum = alimb + climb + 1; + sum = (alimb + climb + 1) & GMP_NUMB_MASK; if (i >= dlimbs) return (sum & dmask) == 0; @@ -129,7 +129,7 @@ mpz_congruent_2exp_p (mpz_srcptr a, mpz_srcptr c, unsigned long d) /* whole limbs */ for ( ; i < dlimbs; i++) - if (ap[i] + 1 != 0) + if (ap[i] != GMP_NUMB_MAX) return 0; /* if only whole limbs, no further fetches from a */ -- cgit v1.2.1