summaryrefslogtreecommitdiff
path: root/src/mul.c
diff options
context:
space:
mode:
authorzimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4>2010-11-10 20:17:17 +0000
committerzimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4>2010-11-10 20:17:17 +0000
commitfdfa1662463b701d4eafe5ff73f0a9fa7499cd37 (patch)
tree22d93ab1664fba277188c9cb6bd3d7a924208c82 /src/mul.c
parent40eb9f6f13f8143c034593909d268aab6207aab4 (diff)
downloadmpfr-fdfa1662463b701d4eafe5ff73f0a9fa7499cd37.tar.gz
[mul.c] fixed bug introduced in revision 7183, and reported by Brian Gladman
on Windows, where mpfr_exp_t has 32 bits and mpfr_limb_t has 64 bits git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@7260 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'src/mul.c')
-rw-r--r--src/mul.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mul.c b/src/mul.c
index cabb02e6c..8d81587c2 100644
--- a/src/mul.c
+++ b/src/mul.c
@@ -473,7 +473,7 @@ mpfr_mul (mpfr_ptr a, mpfr_srcptr b, mpfr_srcptr c, mpfr_rnd_t rnd_mode)
mpfr_sqrhigh_n (tmp + k - 2 * n, bp, n);
/* now tmp[0]..tmp[k-1] contains the product of both mantissa,
with tmp[k-1]>=2^(GMP_NUMB_BITS-2) */
- b1 = MPFR_LIMB_MSB(tmp[k-1]); /* msb from the product */
+ b1 = tmp[k-1] >> (GMP_NUMB_BITS - 1); /* msb from the product */
/* If the mantissas of b and c are uniformly distributed in (1/2, 1],
then their product is in (1/4, 1/2] with probability 2*ln(2)-1