summaryrefslogtreecommitdiff
path: root/mul.c
diff options
context:
space:
mode:
authorzimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4>2000-08-16 09:05:15 +0000
committerzimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4>2000-08-16 09:05:15 +0000
commita5dc53c8d3acf9f0a7ec38895df3d6676845b162 (patch)
tree8c1545e2cae10aaa5afac38683f352ed6aadbebc /mul.c
parentf322bdb378f55d02a41a5d73f3a467d201f74741 (diff)
downloadmpfr-a5dc53c8d3acf9f0a7ec38895df3d6676845b162.tar.gz
replaced mp_bits_per_limb by BITS_PER_MP_LIMB (constant)
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@701 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'mul.c')
-rw-r--r--mul.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/mul.c b/mul.c
index ffef0c1b6..e829f1cc4 100644
--- a/mul.c
+++ b/mul.c
@@ -50,9 +50,9 @@ mpfr_mul(a, b, c, rnd_mode)
if (!NOTZERO(b) || !NOTZERO(c)) { SET_ZERO(a); return; }
sign_product = MPFR_SIGN(b) * MPFR_SIGN(c);
- bn = (PREC(b)-1)/mp_bits_per_limb+1; /* number of significant limbs of b */
- cn = (PREC(c)-1)/mp_bits_per_limb+1; /* number of significant limbs of c */
- tn = (PREC(c)+PREC(b)-1)/mp_bits_per_limb+1;
+ bn = (PREC(b)-1)/BITS_PER_MP_LIMB+1; /* number of significant limbs of b */
+ cn = (PREC(c)-1)/BITS_PER_MP_LIMB+1; /* number of significant limbs of c */
+ tn = (PREC(c)+PREC(b)-1)/BITS_PER_MP_LIMB+1;
k = bn+cn; /* effective nb of limbs used by b*c */
TMP_MARK(marker);
tmp = (mp_limb_t*) TMP_ALLOC(k*BYTES_PER_MP_LIMB);
@@ -61,9 +61,9 @@ mpfr_mul(a, b, c, rnd_mode)
b1 = (bn>=cn) ? mpn_mul(tmp, bp, bn, cp, cn) : mpn_mul(tmp, cp, cn, bp, bn);
/* now tmp[0]..tmp[k-1] contains the product of both mantissa,
- with tmp[k-1]>=2^(mp_bits_per_limb-2) */
- an = (PREC(a)-1)/mp_bits_per_limb+1; /* number of significant limbs of a */
- b1 >>= mp_bits_per_limb-1; /* msb from the product */
+ with tmp[k-1]>=2^(BITS_PER_MP_LIMB-2) */
+ an = (PREC(a)-1)/BITS_PER_MP_LIMB+1; /* number of significant limbs of a */
+ b1 >>= BITS_PER_MP_LIMB-1; /* msb from the product */
if (b1==0) mpn_lshift(tmp, tmp, k, 1);
cc = mpfr_round_raw(ap, tmp+bn+cn-tn,