diff options
author | zimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4> | 2010-11-10 20:17:17 +0000 |
---|---|---|
committer | zimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4> | 2010-11-10 20:17:17 +0000 |
commit | fdfa1662463b701d4eafe5ff73f0a9fa7499cd37 (patch) | |
tree | 22d93ab1664fba277188c9cb6bd3d7a924208c82 /src/mul.c | |
parent | 40eb9f6f13f8143c034593909d268aab6207aab4 (diff) | |
download | mpfr-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.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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 |