Leaklens

sympy__sympy-17318

sqrtdenest raises IndexError

Verdict: the fix is stated in the issue (Tier A).

- if all((x**2).is_Rational for x in pargs): + sqargs = [x**2 for x in pargs] + if all(sq.is_Rational and sq.is_positive for sq in sqargs):

The text states the fix: “- if all((x**2).is_Rational for x in pargs): + sqargs = [x**2 for x in pargs] + if all(sq.is_Rational and sq.is_positive for sq in sqargs):”

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