Skip to content
This repository was archived by the owner on Jan 30, 2023. It is now read-only.

Commit 4b525bb

Browse files
author
Thierry Monteil
committed
#21801 : a doctest to prevent the bug to reappear.
1 parent 7a36941 commit 4b525bb

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/sage/symbolic/expression.pyx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11989,6 +11989,17 @@ cdef class Expression(CommutativeRingElement):
1198911989
sage: n = var('n')
1199011990
sage: sum(log(1-1/n^2),n,2,oo)
1199111991
-log(2)
11992+
11993+
Check that :trac:`21801` is fixed::
11994+
11995+
sage: n = SR.var('n')
11996+
sage: sum(1/((n+1)*(2*n-1)), n, 0, oo)
11997+
2/3*log(2) - 2/3
11998+
sage: _.n()
11999+
-0.204568546293370
12000+
sage: f(n) = (-1)^(n+1)/(3*n+6*(-1)^n)
12001+
sage: sum(f(2*n)+f(2*n+1), n, 0, oo)
12002+
1/3*log(2) - 1/3
1199212003
"""
1199312004
from sage.calculus.calculus import symbolic_sum
1199412005
return symbolic_sum(self, *args, **kwds)

0 commit comments

Comments
 (0)