summaryrefslogtreecommitdiff
path: root/set_uj.c
diff options
context:
space:
mode:
authorzimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4>2010-01-08 19:13:48 +0000
committerzimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4>2010-01-08 19:13:48 +0000
commit1f7f06d17a7f5bacaa40d8cea4237ffe094ef433 (patch)
tree97fdc324d0ae9640c439df546f625d8a15ad50fe /set_uj.c
parent8f36df5d6bf5f20f4c4e60e9ac22e9d4d4a6508e (diff)
downloadmpfr-1f7f06d17a7f5bacaa40d8cea4237ffe094ef433.tar.gz
BITS_PER_MP_LIMB -> GMP_LIMB_BITS
got rid of BYTES_PER_MP_LIMB in configure.in (no longer defined by GMP) Note[VL] (mpfr-impl.h): a mpn_sqr_n() macro is defined to use mpn_mul if it is not already defined (in gmp-impl.h from GMP 4.x). git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@6644 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'set_uj.c')
-rw-r--r--set_uj.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/set_uj.c b/set_uj.c
index 0a5c98113..7151e2e4f 100644
--- a/set_uj.c
+++ b/set_uj.c
@@ -59,7 +59,7 @@ mpfr_set_uj_2exp (mpfr_t x, uintmax_t j, intmax_t e, mpfr_rnd_t rnd)
mp_limb_t yp[sizeof(uintmax_t) / sizeof(mp_limb_t)];
mpfr_t y;
unsigned long uintmax_bit_size = sizeof(uintmax_t) * CHAR_BIT;
- unsigned long bpml = BITS_PER_MP_LIMB % uintmax_bit_size;
+ unsigned long bpml = GMP_LIMB_BITS % uintmax_bit_size;
/* Special case */
if (j == 0)
@@ -78,9 +78,9 @@ mpfr_set_uj_2exp (mpfr_t x, uintmax_t j, intmax_t e, mpfr_rnd_t rnd)
limb = yp[0] = j;
else
{
- /* Note: either BITS_PER_MP_LIMB = uintmax_bit_size, then k = 1 the
- shift j >>= bpml is never done, or BITS_PER_MP_LIMB < uintmax_bit_size
- and bpml = BITS_PER_MP_LIMB. */
+ /* Note: either GMP_LIMB_BITS = uintmax_bit_size, then k = 1 the
+ shift j >>= bpml is never done, or GMP_LIMB_BITS < uintmax_bit_size
+ and bpml = GMP_LIMB_BITS. */
for (i = 0; i < k; i++, j >>= bpml)
yp[i] = j; /* Only the low bits are copied */
@@ -110,7 +110,7 @@ mpfr_set_uj_2exp (mpfr_t x, uintmax_t j, intmax_t e, mpfr_rnd_t rnd)
else
MPN_ZERO (yp, len); /* Zeroing the last limbs */
}
- e += k * BITS_PER_MP_LIMB - cnt; /* Update Expo */
+ e += k * GMP_LIMB_BITS - cnt; /* Update Expo */
MPFR_ASSERTD (MPFR_LIMB_MSB(yp[numberof (yp) - 1]) != 0);
/* Check expo underflow / overflow (can't use mpfr_check_range) */