From: Richard Kreckel Date: Thu, 9 Mar 2000 18:29:17 +0000 (+0000) Subject: - Added warning about too much optimism for Bernoulli numbers. X-Git-Tag: release_0-5-4~13 X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?a=commitdiff_plain;h=83c1a0ba18b918a02fea05272d6e9e514880b707;p=ginac.git - Added warning about too much optimism for Bernoulli numbers. --- diff --git a/ginac/numeric.cpp b/ginac/numeric.cpp index e1d96b13..e4124f7c 100644 --- a/ginac/numeric.cpp +++ b/ginac/numeric.cpp @@ -1443,9 +1443,11 @@ const numeric bernoulli(const numeric & nn) return _num0(); // Until somebody has the Blues and comes up with a much better idea and // codes it (preferably in CLN) we make this a remembering function which - // computes its results using the formula + // computes its results using the defining formula // B(nn) == - 1/(nn+1) * sum_{k=0}^{nn-1}(binomial(nn+1,k)*B(k)) // whith B(0) == 1. + // Be warned, though: the Bernoulli numbers are probably computationally + // very expensive anyhow and you shouldn't expect miracles to happen. static vector results; static int highest_result = -1; int n = nn.sub(_num2()).div(_num2()).to_int();