Skip to content

Commit

Permalink
expand exp(1 + b)->E*exp(b)
Browse files Browse the repository at this point in the history
  • Loading branch information
smichr committed Nov 28, 2021
1 parent 05610d1 commit cf625c3
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions sympy/series/gruntz.py
Original file line number Diff line number Diff line change
Expand Up @@ -500,6 +500,13 @@ def calculate_series(e, x, logx=None):
t = factor_terms(cancel(t, expand=False))
# XXX try t = bottom_up(t, lambda x: cancel(x, expand=False)) instead of the two calls

# not sure if the has to be generalized to expand all exp
# but it is sufficient for the failing test of
# limit((2*exp(3*x)/(exp(2*x) + 1))**(1/x), x, oo) == E
if isinstance(t, exp):
from sympy.core.function import expand_power_exp, expand_mul
t = expand_power_exp(t.func(expand_mul(t.exp)))

if t.has(exp) and t.has(log):
t = powdenest(t)

Expand Down

0 comments on commit cf625c3

Please sign in to comment.