diff options
author | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2010-01-08 21:36:26 +0000 |
---|---|---|
committer | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2010-01-08 21:36:26 +0000 |
commit | e77ab9365d2b9771c80e851ddc63dda142613188 (patch) | |
tree | 70f1d98c129b9f3ffda65d5d5b690cbe3e19e836 /urandomb.c | |
parent | fbc1bcfac594b04268c66729bf4a023910be578a (diff) | |
download | mpfr-e77ab9365d2b9771c80e851ddc63dda142613188.tar.gz |
Replaced GMP_LIMB_BITS by GMP_NUMB_BITS to use only one of these macros.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@6646 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'urandomb.c')
-rw-r--r-- | urandomb.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/urandomb.c b/urandomb.c index 521a669de..40a52c9c2 100644 --- a/urandomb.c +++ b/urandomb.c @@ -54,10 +54,10 @@ mpfr_urandomb (mpfr_ptr rop, gmp_randstate_t rstate) MPFR_SET_POS (rop); /* Uniform non-normalized significand */ - mpfr_rand_raw (rp, rstate, nlimbs * GMP_LIMB_BITS); + mpfr_rand_raw (rp, rstate, nlimbs * GMP_NUMB_BITS); - /* If nbits isn't a multiple of GMP_LIMB_BITS, mask the low bits */ - cnt = nlimbs * GMP_LIMB_BITS - nbits; + /* If nbits isn't a multiple of GMP_NUMB_BITS, mask the low bits */ + cnt = nlimbs * GMP_NUMB_BITS - nbits; if (MPFR_LIKELY (cnt != 0)) rp[0] &= ~MPFR_LIMB_MASK (cnt); @@ -68,7 +68,7 @@ mpfr_urandomb (mpfr_ptr rop, gmp_randstate_t rstate) { k ++; nlimbs --; - exp -= GMP_LIMB_BITS; + exp -= GMP_NUMB_BITS; } if (MPFR_LIKELY (nlimbs != 0)) /* otherwise value is zero */ |