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

Commit 5f3154b

Browse files
committed
Trac 13526: add doctest for Maxima limit computation
1 parent a130eed commit 5f3154b

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/sage/interfaces/maxima_lib.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -842,14 +842,22 @@ def sr_limit(self,expr,v,a,dir=None):
842842
[]
843843
844844
The second limit below was computed incorrectly prior to
845-
maxima-5.24 (:trac:`10868`)::
845+
Maxima 5.24 (:trac:`10868`)::
846846
847847
sage: f(n) = 2 + 1/factorial(n)
848848
sage: limit(f(n), n=infinity)
849849
2
850850
sage: limit(1/f(n), n=infinity)
851851
1/2
852852
853+
The limit below was computed incorrectly prior to Maxima 5.30
854+
(see :trac:`13526`)::
855+
856+
sage: n = var('n')
857+
sage: l = (3^n + (-2)^n) / (3^(n+1) + (-2)^(n+1))
858+
sage: l.limit(n=oo)
859+
1/3
860+
853861
"""
854862
try:
855863
L=[sr_to_max(SR(a)) for a in [expr,v,a]]

0 commit comments

Comments
 (0)