summaryrefslogtreecommitdiff
path: root/const_catalan.c
diff options
context:
space:
mode:
authorzimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4>2007-02-19 03:52:30 +0000
committerzimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4>2007-02-19 03:52:30 +0000
commit177eda24dfc9c95af80aeb8bfb4b2d51a891da45 (patch)
tree91fd1500cc012795930a2473c2b589756c090dc6 /const_catalan.c
parent4c9e9473ec7f62cbfda1a6f72db816ad0eb67627 (diff)
downloadmpfr-177eda24dfc9c95af80aeb8bfb4b2d51a891da45.tar.gz
fixed error in generic error for the logarithm, and propagated new bound
in algorithms.tex and source files git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@4372 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'const_catalan.c')
-rw-r--r--const_catalan.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/const_catalan.c b/const_catalan.c
index 33c1f735a..c118d58df 100644
--- a/const_catalan.c
+++ b/const_catalan.c
@@ -112,8 +112,7 @@ mpfr_const_catalan_internal (mpfr_ptr g, mp_rnd_t rnd_mode)
Found 27 '1' at 51752950
*/
pg = MPFR_PREC (g);
- p = pg + 8; /* pg + 7 avoids failure up for pg < 912
- pg + 8 gives no failure up to pg = 10000 */
+ p = pg + 9;
p += MPFR_INT_CEIL_LOG2 (p);
MPFR_GROUP_INIT_3 (group, p, x, y, z);
@@ -136,7 +135,7 @@ mpfr_const_catalan_internal (mpfr_ptr g, mp_rnd_t rnd_mode)
mpfr_add (x, x, y, GMP_RNDN);
mpfr_div_2ui (x, x, 3, GMP_RNDN);
- if (MPFR_LIKELY (MPFR_CAN_ROUND (x, p - 4, pg, rnd_mode)))
+ if (MPFR_LIKELY (MPFR_CAN_ROUND (x, p - 5, pg, rnd_mode)))
break;
/* Fixme: Is it possible? */
MPFR_ZIV_NEXT (loop, p);