summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorzimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4>2020-05-19 20:01:02 +0000
committerzimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4>2020-05-19 20:01:02 +0000
commit5e7b964196755a62a08e0134cd16f2003555a4ca (patch)
tree57cdf2dbd2c6efbed00ff88f5d709ac6eb00c543 /src
parent1291a42f9dcbe76e2e109b52f775fea415e2a46d (diff)
downloadmpfr-5e7b964196755a62a08e0134cd16f2003555a4ca.tar.gz
[src/bernoulli.c] fix bug with non-regression test added in r13907
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@13910 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'src')
-rw-r--r--src/bernoulli.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/bernoulli.c b/src/bernoulli.c
index 0c7b78fa5..b8a517ea7 100644
--- a/src/bernoulli.c
+++ b/src/bernoulli.c
@@ -80,7 +80,7 @@ mpfr_bernoulli_internal (mpz_t *b, unsigned long n)
prec = __gmpfr_ceil_log2 (7.0 * (double) n); /* bound 2*pi by 7 */
prec = (prec + 1) >> 1; /* sqrt(2*pi*n) <= 2^prec */
mpfr_init2 (z, 53);
- mpfr_set_ui_2exp (z, 251685084, -32, MPFR_RNDU); /* 1/e/2/pi <= z */
+ mpfr_set_ui_2exp (z, 251469612, -32, MPFR_RNDU); /* 1/e/2/pi <= z */
mpfr_mul_ui (z, z, n, MPFR_RNDU);
mpfr_log2 (z, z, MPFR_RNDU);
mpfr_mul_ui (z, z, n, MPFR_RNDU);
@@ -184,7 +184,6 @@ mpfr_bernoulli_internal (mpz_t *b, unsigned long n)
mpz_mul_ui (t, t, n + 1);
mpz_divexact (t, t, den); /* t was still n! */
mpz_mul (num, num, t);
- mpz_set_ui (den, 1);
mpfr_clear (y);
mpfr_clear (z);