diff options
author | zimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4> | 2016-12-12 17:32:09 +0000 |
---|---|---|
committer | zimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4> | 2016-12-12 17:32:09 +0000 |
commit | ed8cf60e5755ada028226fd32f4296728a73b524 (patch) | |
tree | 851abce87d2c3aec86e8ca4880df80d9b8aa291f /src/exp_2.c | |
parent | 5b5002d48d93a08993accb6d762c3795692ceb04 (diff) | |
download | mpfr-ed8cf60e5755ada028226fd32f4296728a73b524.tar.gz |
[cos.c,exp_2.c,log.c] improved initial precision for Ziv's strategy
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@11031 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'src/exp_2.c')
-rw-r--r-- | src/exp_2.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/exp_2.c b/src/exp_2.c index cfa81083f..d0ea7a20d 100644 --- a/src/exp_2.c +++ b/src/exp_2.c @@ -159,7 +159,7 @@ mpfr_exp_2 (mpfr_ptr y, mpfr_srcptr x, mpfr_rnd_t rnd_mode) l = (precy - 1) / K + 1; err = K + MPFR_INT_CEIL_LOG2 (2 * l + 18); /* add K extra bits, i.e. failure probability <= 1/2^K = O(1/precy) */ - q = precy + err + K + 8; + q = precy + err + K + 10; /* if |x| >> 1, take into account the cancelled bits */ if (expx > 0) q += expx; @@ -255,7 +255,6 @@ mpfr_exp_2 (mpfr_ptr y, mpfr_srcptr x, mpfr_rnd_t rnd_mode) break; } } - MPFR_ZIV_NEXT (loop, q); MPFR_GROUP_REPREC_2(group, q+error_r, r, s); } |