Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Add test for issue 2811: (1/(1-t)).subs(t,1) returns zoo after a078ac2 #2967

merged 1 commit into from

4 participants


IMHO, issue 2811 can be closed.




Nice. And atan(1/(1 - x)).subs(x, 1) is no longer wrong either.


Should we add atan test as well?

or I will merge in 24hr.


The atan substitution is just a symptom of the problem that has been fixed, so I don't think it's necessary to add the test. Thanks for this work. It's in.

@smichr smichr merged commit 3e706a2 into sympy:master

1 check passed

Details default The Travis CI build passed
@skirpichev skirpichev deleted the unknown repository branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 10 additions and 1 deletion.
  1. +10 −1 sympy/core/tests/
11 sympy/core/tests/
@@ -2,7 +2,7 @@
from sympy import (Symbol, Wild, sin, cos, exp, sqrt, pi, Function, Derivative,
abc, Integer, Eq, symbols, Add, I, Float, log, Rational, Lambda, atan2,
cse, cot, tan, S, Tuple, Basic, Dict, Piecewise, oo, Mul,
- factor, nsimplify)
+ factor, nsimplify, zoo)
from sympy.core.basic import _aresame
from sympy.utilities.pytest import XFAIL
from import x, y
@@ -615,3 +615,12 @@ def r(a,b,c):
return factor(a*x**2 + b*x + c)
e = r(5/6, 10, 5)
assert nsimplify(e) == 5*x**2/6 + 10*x + 5
+def test_issue_2811():
+ t = Symbol('t')
+ assert (1/(1 - t)).subs(t, 1) == zoo
+ n = t
+ d = t - 1
+ assert (n/d).subs(t, 1) == zoo
+ assert (-n/-d).subs(t, 1) == zoo
Something went wrong with that request. Please try again.