From ae78097ba337250cd8e9bea9ae036d4b246b4ca3 Mon Sep 17 00:00:00 2001 From: pelissip Date: Wed, 23 Mar 2005 13:04:37 +0000 Subject: Don't use Mulder at n+1 for MPFR_MUL_THRESHOLD+1 git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@3401 280ebfd0-de03-0410-8827-d642c229c3f4 --- mul.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'mul.c') diff --git a/mul.c b/mul.c index 9d2ecdf80..a939988d2 100644 --- a/mul.c +++ b/mul.c @@ -366,7 +366,8 @@ mpfr_mul (mpfr_ptr a, mpfr_srcptr b, mpfr_srcptr c, mp_rnd_t rnd_mode) We may lost 1 bit due to RNDN, 1 due to final shift. */ if (MPFR_UNLIKELY (MPFR_PREC (a) > p - 5)) { - if (MPFR_UNLIKELY (MPFR_PREC (a) > p - 5 + BITS_PER_MP_LIMB)) + if (MPFR_UNLIKELY (MPFR_PREC (a) > p - 5 + BITS_PER_MP_LIMB + || bn <= MPFR_MUL_THRESHOLD+1)) { /* MulHigh can't produce a roundable result. */ MPFR_LOG_MSG (("mpfr_mulhigh can't be used (%lu VS %lu)\n", -- cgit v1.2.1