Open GoogleCodeExporter opened 9 years ago
Hi Jan, thanks for the bug report.
I'm not sure if the proposed fix is sufficient, and it would slow down
convergence of the direct method for well-behaved series.
I think there is a fairly easy workaround: explicitly add several terms at a
time, say three: instead of
nsum(f, [1,inf])
do
nsum(lambda n: f(3*n-2) + f(3*n-1) + f(3*n), [1,inf])
Original comment by fredrik....@gmail.com
on 21 Mar 2013 at 11:10
Hi Fredrik,
Thank you for the workaround. However, there is still problem, that
tolerance has different meaning in direct method and in extrapolation
method. In the first case you measure only magnitude of terms in the
second case you measure difference between individual steps.
If you woldn't touch convergence speed of direct method what about
average over updated terms, this has straightforward counterpart in
extrapolation methods. The average has advantage that the meaning of
tolerance is "independent" of the value of steps.
Jan
Original comment by jbrezm...@gmail.com
on 21 Mar 2013 at 1:34
Original issue reported on code.google.com by
jbrezm...@gmail.com
on 21 Mar 2013 at 10:52