diff options
author | hanrot <hanrot@280ebfd0-de03-0410-8827-d642c229c3f4> | 2001-09-10 16:21:42 +0000 |
---|---|---|
committer | hanrot <hanrot@280ebfd0-de03-0410-8827-d642c229c3f4> | 2001-09-10 16:21:42 +0000 |
commit | 505278b6e40d13c8e70439fa0c2d00249987eba7 (patch) | |
tree | 25f3edad7a5cdc56b05e9ee0412fe0804ed1ce95 /set_d.c | |
parent | d5d47e9e22e1fd2d5ef65ea0ab77ed4d0482da1e (diff) | |
download | mpfr-505278b6e40d13c8e70439fa0c2d00249987eba7.tar.gz |
Zorgs.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@1188 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'set_d.c')
-rw-r--r-- | set_d.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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); |