From 83c1a0ba18b918a02fea05272d6e9e514880b707 Mon Sep 17 00:00:00 2001 From: Richard Kreckel Date: Thu, 9 Mar 2000 18:29:17 +0000 Subject: [PATCH] - Added warning about too much optimism for Bernoulli numbers. --- ginac/numeric.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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(); -- 2.46.2