diff options
author | Kevin Ryde <user42@zip.com.au> | 2002-02-08 22:49:38 +0100 |
---|---|---|
committer | Kevin Ryde <user42@zip.com.au> | 2002-02-08 22:49:38 +0100 |
commit | 63acee91cd62262abc9fdf2bedbc467670d8ce88 (patch) | |
tree | f6585ae9b6aa404ee78c095308775fcfd56e5adb /mpz/tstbit.c | |
parent | cb859a0701946974ba6e353ca6d7255d0d2dee10 (diff) | |
download | gmp-63acee91cd62262abc9fdf2bedbc467670d8ce88.tar.gz |
* mpz/array_init.c, mpz/cfdiv_q_2exp.c, mpz/cfdiv_r_2exp.c,
mpz/cong_2exp.c, mpz/divis_2exp.c, mpz/hamdist.c, mpz/init2.c,
mpz/mul_2exp.c, mpz/realloc2.c, mpz/scan0.c, mpz/scan1.c,
mpz/setbit.c, mpz/tdiv_q_2exp.c, mpz/tdiv_r_2exp.c, mpz/tstbit.c,
mpz/urandomb.c: Use GMP_NUMB_BITS.
Diffstat (limited to 'mpz/tstbit.c')
-rw-r--r-- | mpz/tstbit.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/mpz/tstbit.c b/mpz/tstbit.c index 5b4492f42..1fb521a52 100644 --- a/mpz/tstbit.c +++ b/mpz/tstbit.c @@ -1,6 +1,6 @@ /* mpz_tstbit -- test a specified bit. -Copyright 2000 Free Software Foundation, Inc. +Copyright 2000, 2002 Free Software Foundation, Inc. This file is part of the GNU MP Library. @@ -45,7 +45,7 @@ mpz_tstbit (mpz_srcptr u, unsigned long bit_index) mp_srcptr u_ptr = PTR(u); int size = SIZ(u); unsigned abs_size = ABS(size); - unsigned long limb_index = bit_index / BITS_PER_MP_LIMB; + unsigned long limb_index = bit_index / GMP_NUMB_BITS; mp_srcptr p = u_ptr + limb_index; mp_limb_t limb; @@ -68,5 +68,5 @@ mpz_tstbit (mpz_srcptr u, unsigned long bit_index) } } - return (limb >> (bit_index % BITS_PER_MP_LIMB)) & 1; + return (limb >> (bit_index % GMP_NUMB_BITS)) & 1; } |