From: Richard Kreckel Date: Sun, 18 Dec 2005 23:36:36 +0000 (+0000) Subject: * Fix signed/unsigned bug in bernoulli function. X-Git-Tag: release_1-4-0~123 X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?p=ginac.git;a=commitdiff_plain;h=d78a4bcc9d7df44cc20fa8400a66cc628866d4aa;ds=inline * Fix signed/unsigned bug in bernoulli function. --- diff --git a/ginac/numeric.cpp b/ginac/numeric.cpp index f62b0d25..8825bdb9 100644 --- a/ginac/numeric.cpp +++ b/ginac/numeric.cpp @@ -1708,7 +1708,7 @@ const numeric bernoulli(const numeric &nn) results.reserve(n/2); for (unsigned p=next_r; p<=n; p+=2) { cln::cl_I c = 1; // seed for binonmial coefficients - cln::cl_RA b = cln::cl_RA(1-p)/2; + cln::cl_RA b = cln::cl_RA(p-1)/-2; const unsigned p3 = p+3; const unsigned pm = p-2; unsigned i, k, p_2;