diff options
author | pelissip <pelissip@280ebfd0-de03-0410-8827-d642c229c3f4> | 2005-03-04 17:40:53 +0000 |
---|---|---|
committer | pelissip <pelissip@280ebfd0-de03-0410-8827-d642c229c3f4> | 2005-03-04 17:40:53 +0000 |
commit | ca8aadf5c9ea5351151e8c7425d27388a4d7e5dc (patch) | |
tree | fba0ba2ff07c59bd6de66f18c8f53200eb1f32ee /exp_2.c | |
parent | 7c2a4276339fe8771cc879c9aa31139b90e6c3e1 (diff) | |
download | mpfr-ca8aadf5c9ea5351151e8c7425d27388a4d7e5dc.tar.gz |
Fix bug due to wrong estimation of (get_d (x) / LOG2).
TODO: Rexamine the algorithm of mpfr_exp_2!
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@3362 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'exp_2.c')
-rw-r--r-- | exp_2.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -144,7 +144,7 @@ mpfr_exp_2 (mpfr_ptr y, mpfr_srcptr x, mp_rnd_t rnd_mode) mpfr_sub (r, x, r, GMP_RNDU); /* possible cancellation here: the error on r is at most 3*2^(EXP(old_r)-EXP(new_r)) */ - if (MPFR_IS_NEG (r)) + while (MPFR_IS_NEG (r)) { /* initial approximation n was too large */ n--; mpfr_add (r, r, s, GMP_RNDU); |