diff options
author | Kevin Ryde <user42@zip.com.au> | 2003-01-03 01:07:42 +0100 |
---|---|---|
committer | Kevin Ryde <user42@zip.com.au> | 2003-01-03 01:07:42 +0100 |
commit | 67119c6ac0a54e762dbfd855a808c8de8c8b2f9d (patch) | |
tree | 992a5d93e830607ebd5220704efb887c86411f08 /mpfr/mul_ui.c | |
parent | 67bc637ee70b73d8b1fa788003a28af59adb8663 (diff) | |
download | gmp-67119c6ac0a54e762dbfd855a808c8de8c8b2f9d.tar.gz |
* mpfr/*: Update to mpfr cvs 2003-01-03.
Diffstat (limited to 'mpfr/mul_ui.c')
-rw-r--r-- | mpfr/mul_ui.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/mpfr/mul_ui.c b/mpfr/mul_ui.c index f655071a5..d248d1c55 100644 --- a/mpfr/mul_ui.c +++ b/mpfr/mul_ui.c @@ -78,6 +78,7 @@ mpfr_mul_ui (mpfr_ptr y, mpfr_srcptr x, unsigned long int u, mp_rnd_t rnd_mode) if (yn < xn + 1) yp = (mp_ptr) TMP_ALLOC ((size_t) (xn + 1) * BYTES_PER_MP_LIMB); + MPFR_ASSERTN(u == (mp_limb_t) u); yp[xn] = mpn_mul_1 (yp, MPFR_MANT(x), xn, u); /* x * u is stored in yp[xn], ..., yp[0] */ @@ -85,7 +86,7 @@ mpfr_mul_ui (mpfr_ptr y, mpfr_srcptr x, unsigned long int u, mp_rnd_t rnd_mode) /* since the case u=1 was treated above, we have u >= 2, thus yp[xn] >= 1 since x was msb-normalized */ MPFR_ASSERTN(yp[xn] != 0); - if ((yp[xn] & GMP_LIMB_HIGHBIT) == 0) + if ((yp[xn] & MPFR_LIMB_HIGHBIT) == 0) { count_leading_zeros(cnt, yp[xn]); mpn_lshift (yp, yp, xn + 1, cnt); @@ -105,13 +106,13 @@ mpfr_mul_ui (mpfr_ptr y, mpfr_srcptr x, unsigned long int u, mp_rnd_t rnd_mode) if (c) /* rounded result is 1.0000000000000000... */ { - old_yp[yn-1] = GMP_LIMB_HIGHBIT; + old_yp[yn-1] = MPFR_LIMB_HIGHBIT; cnt++; } TMP_FREE(marker); - if (__mpfr_emax < MPFR_EMAX_MIN + cnt || MPFR_EXP(x) > __mpfr_emax - cnt) + if (__gmpfr_emax < MPFR_EMAX_MIN + cnt || MPFR_EXP(x) > __gmpfr_emax - cnt) return mpfr_set_overflow(y, rnd_mode, MPFR_SIGN(x)); MPFR_EXP(y) = MPFR_EXP(x) + cnt; |