summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortege <tege@gmplib.org>2002-04-23 16:04:53 +0200
committertege <tege@gmplib.org>2002-04-23 16:04:53 +0200
commit96ea27148f72eea5098fe0402eb327c9822f1a7f (patch)
treedc5d5b4b1efbc79baa7f15ac00452249d3ac54b4
parent9927fcd017e83339c4229a7b9f7af881e1ecc384 (diff)
downloadgmp-96ea27148f72eea5098fe0402eb327c9822f1a7f.tar.gz
Nailify.
-rw-r--r--mpz/jacobi.c4
-rw-r--r--mpz/kronsz.c4
-rw-r--r--mpz/kronuz.c4
3 files changed, 6 insertions, 6 deletions
diff --git a/mpz/jacobi.c b/mpz/jacobi.c
index 5711b10ce..d89208f01 100644
--- a/mpz/jacobi.c
+++ b/mpz/jacobi.c
@@ -137,7 +137,7 @@ mpz_jacobi (mpz_srcptr a, mpz_srcptr b)
{
bsecond = bsrcp[1];
if (btwos != 0)
- blow |= bsecond << (BITS_PER_MP_LIMB-btwos);
+ blow |= (bsecond << (GMP_NUMB_BITS - btwos)) & GMP_NUMB_MASK;
}
/* account for effect of sign of a, then ignore it */
@@ -174,7 +174,7 @@ mpz_jacobi (mpz_srcptr a, mpz_srcptr b)
{
asecond = asrcp[1];
if (atwos != 0)
- alow |= asecond << (BITS_PER_MP_LIMB-atwos);
+ alow |= (asecond << (GMP_NUMB_BITS - atwos)) & GMP_NUMB_MASK;
}
/* (a/2)=(2/a) with a odd */
diff --git a/mpz/kronsz.c b/mpz/kronsz.c
index 2d31f0803..9c014279b 100644
--- a/mpz/kronsz.c
+++ b/mpz/kronsz.c
@@ -93,12 +93,12 @@ mpz_si_kronecker (long a, mpz_srcptr b)
MPN_STRIP_LOW_ZEROS_NOT_ZERO (b_ptr, b_abs_size, b_low);
if ((b_low & 1) == 0)
{
- if (b_low == MP_LIMB_T_HIGHBIT)
+ if (b_low == GMP_NUMB_HIGHBIT)
{
if (b_abs_size == 1)
{
/* (a/0x80000000) = (a/2)^(BPML-1) */
- result_bit1 ^= JACOBI_TWOS_U_BIT1 (BITS_PER_MP_LIMB-1, a);
+ result_bit1 ^= JACOBI_TWOS_U_BIT1 (GMP_NUMB_BITS - 1, a);
return JACOBI_BIT1_TO_PN (result_bit1);
}
diff --git a/mpz/kronuz.c b/mpz/kronuz.c
index 01cf03a24..3a1fbb64d 100644
--- a/mpz/kronuz.c
+++ b/mpz/kronuz.c
@@ -69,10 +69,10 @@ mpz_ui_kronecker (unsigned long a, mpz_srcptr b)
MPN_STRIP_LOW_ZEROS_NOT_ZERO (b_ptr, b_abs_size, b_low);
if (! (b_low & 1))
{
- if (b_low == MP_LIMB_T_HIGHBIT)
+ if (b_low == GMP_NUMB_HIGHBIT)
{
if (b_abs_size == 1) /* (a/0x80000000) == (a/2)^(BPML-1) */
- return JACOBI_TWOS_U (BITS_PER_MP_LIMB-1, a);
+ return JACOBI_TWOS_U (GMP_NUMB_BITS-1, a);
/* b_abs_size > 1 */
b_low = b_ptr[1] << 1;