I am no expert at all about numerical algorithms, and I probably have unrealistic expectations.
The word "wrong" is used in the documentation, though: "You should realize that with sufficiently pathological summands, the algorithms used by NSum
can give wrong answers."
NSum
was last updated in 2007. Maybe it is time for a revamp. For example, it could discover by itself that the series has alternating signs, and it could find reasonable error estimates.
As for Python, it may do something like this:
Plus @@ Table[
N[(16 - 32 k -
4 (-1)^k (4 k - 3) (16 k^2 - 1))/((2 k - 1) (4 k -
3) (16 k^2 - 1))], {k, 1, 1000000}] // FullForm
which is much more precise and much slower than NSum
, which takes shortcuts.