Skip to content

Commit

Permalink
XXX fix expansion for f0 in (S.Zero, S.Infinity, S.NegativeInfinity)
Browse files Browse the repository at this point in the history
  • Loading branch information
skirpichev committed Dec 6, 2015
1 parent 6749a87 commit 776b71d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions sympy/core/power.py
Expand Up @@ -1265,9 +1265,11 @@ def _taylor(expr, x, n):
f0 = b.limit(x, 0)
a = e

if f0 is S.Zero:
if f0 in (S.Zero, S.Infinity, S.NegativeInfinity):
lt = b.as_leading_term(x)
return lt**a*((b/lt)*a)._eval_nseries(x, n, logx)
if f0 == S.NegativeInfinity:
lt = -lt
return (lt**a*((b/lt).expand(mul=True)**a)._eval_nseries(x, n, logx)).expand(mul=True)

from sympy.functions.combinatorial.factorials import factorial, binomial
from sympy.functions.elementary.complexes import arg
Expand Down

0 comments on commit 776b71d

Please sign in to comment.