diff options
Diffstat (limited to 'Build/source/libs/mpfr/mpfr-src/src/const_euler.c')
-rw-r--r-- | Build/source/libs/mpfr/mpfr-src/src/const_euler.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Build/source/libs/mpfr/mpfr-src/src/const_euler.c b/Build/source/libs/mpfr/mpfr-src/src/const_euler.c index 677c98584f8..9e3b88ac518 100644 --- a/Build/source/libs/mpfr/mpfr-src/src/const_euler.c +++ b/Build/source/libs/mpfr/mpfr-src/src/const_euler.c @@ -1,6 +1,6 @@ /* mpfr_const_euler -- Euler's constant -Copyright 2001-2019 Free Software Foundation, Inc. +Copyright 2001-2020 Free Software Foundation, Inc. Contributed by Fredrik Johansson. This file is part of the GNU MPFR Library. @@ -192,7 +192,7 @@ mpfr_const_euler_internal (mpfr_t x, mpfr_rnd_t rnd) MPFR_ZIV_DECL (loop); prec = mpfr_get_prec (x); - wp = prec + 24; + wp = prec + MPFR_INT_CEIL_LOG2 (prec) + 5; mpfr_init2 (y, wp); mpfr_const_euler_bs_init (sum); @@ -251,9 +251,9 @@ mpfr_const_euler_internal (mpfr_t x, mpfr_rnd_t rnd) mpfr_set_ui (y, n, MPFR_RNDZ); /* exact */ mpfr_log (y, y, MPFR_RNDZ); /* error < 2^-wp */ - mpfr_mul_2exp (y, y, wp, MPFR_RNDZ); + mpfr_mul_2ui (y, y, wp, MPFR_RNDZ); mpfr_z_sub (y, v, y, MPFR_RNDZ); - mpfr_div_2exp (y, y, wp, MPFR_RNDZ); + mpfr_div_2ui (y, y, wp, MPFR_RNDZ); /* rounding error from the last subtraction < 2^-wp */ /* so y = gamma with error < 5*2^-wp */ |