Leaklens

sympy__sympy-21379

Unexpected `PolynomialError` when using simple `subs()` for particular expressions

Verdict: the issue text repeats lines of the gold patch (Tier C).

+ try: + G = gcd(p, q) + if G != 1: + p, q = [gcd_terms(i/G, clear=False, fraction=False) + for i in (p, q)] + except PolynomialError: + G = S.One

2 of 3 added patch lines appear in the issue or discussion.

All SWE-bench Verified tasks · more sympy/sympy tasks · How the check works