Skip to content

Commit

Permalink
assess factor_terms form in simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
smichr committed Mar 14, 2024
1 parent 31d6332 commit 33a3bf1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions sympy/core/tests/test_expand.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ def test_expand_frac():
assert eq.expand(numer=True, exact=True) == ans
assert expand_numer(eq) != ans
assert expand_numer(eq, exact=True) == ans
assert eq.simplify() == ans


def test_issue_6121():
Expand Down
2 changes: 1 addition & 1 deletion sympy/simplify/simplify.py
Original file line number Diff line number Diff line change
Expand Up @@ -642,7 +642,7 @@ def done(e):
expr = _bottom_up(expr, lambda w: getattr(w, 'normal', lambda: w)())
expr = Mul(*powsimp(expr).as_content_primitive())
_e = cancel(expr)
expr1 = shorter(_e, _mexpand(_e).cancel()) # issue 6829
expr1 = shorter(_e, (_ex:=_mexpand(_e)).cancel(), factor_terms(_ex)) # issues 6829, 26329
expr2 = shorter(together(expr, deep=True), together(expr1, deep=True))

if ratio is S.Infinity:
Expand Down

0 comments on commit 33a3bf1

Please sign in to comment.