From 505278b6e40d13c8e70439fa0c2d00249987eba7 Mon Sep 17 00:00:00 2001 From: hanrot Date: Mon, 10 Sep 2001 16:21:42 +0000 Subject: Zorgs. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@1188 280ebfd0-de03-0410-8827-d642c229c3f4 --- set_d.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'set_d.c') diff --git a/set_d.c b/set_d.c index ac387aa57..1bc1dbdc4 100644 --- a/set_d.c +++ b/set_d.c @@ -276,6 +276,7 @@ mpfr_set_d (r, d, rnd_mode) } sizer = (MPFR_PREC(r)-1)/BITS_PER_MP_LIMB + 1; + if (sizer < MPFR_LIMBS_PER_DOUBLE) { tmp = TMP_ALLOC(sizeof(mpfr_ptr)); @@ -290,7 +291,7 @@ mpfr_set_d (r, d, rnd_mode) /* warning: __mpfr_extract_double requires at least two limbs */ if (sizer < MPFR_LIMBS_PER_DOUBLE) - MPFR_EXP(tmp) = __mpfr_extract_double (MPFR_MANT(tmp), d, 0); + MPFR_EXP(tmp) = __mpfr_extract_double (MPFR_MANT(tmp), d, 1); else MPFR_EXP(tmp) = __mpfr_extract_double (MPFR_MANT(tmp) + sizer - MPFR_LIMBS_PER_DOUBLE, d, 1); -- cgit v1.2.1