New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Regression in solveset for quadratic with symbolic coefficients #22058
Labels
Milestone
Comments
The problem is these lines: sympy/sympy/solvers/solveset.py Lines 865 to 875 in 9cb75ab
Here it is assumed that if the result is not Complement or ConditionSet then it must be iterable. Maybe if result.is_iterable and result.is_finite_set: |
Where did you find that test? |
The example is a simplified version of the problem in #20370 |
skirpichev
added a commit
to skirpichev/diofant
that referenced
this issue
Sep 10, 2021
oscarbenjamin
added a commit
to oscarbenjamin/sympy
that referenced
this issue
Sep 11, 2021
Since Poly can handle symbolic coefficients, it is not necessary to remove powers in them with unrad: passing the variable of interest will allow a lower order polynomial to be solved. e.g. unrad(sqrt(t)*x, x) is unchanged while unrad(sqrt(t)*x) is t*x**2 Also, only explicitly check solutions of FiniteSet. Cherry-picked from bf9b489
oscarbenjamin
pushed a commit
to oscarbenjamin/sympy
that referenced
this issue
Sep 11, 2021
Since Poly can handle symbolic coefficients, it is not necessary to remove powers in them with unrad: passing the variable of interest will allow a lower order polynomial to be solved. e.g. unrad(sqrt(t)*x, x) is unchanged while unrad(sqrt(t)*x) is t*x**2 Also, only explicitly check solutions of FiniteSet. Cherry-picked from bf9b489
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is a regression since sympy 1.8. On 1.8 we have:
However on master that's:
There is a bug in
solveset
attempting to iterate over anIntersection(FiniteSet(sol1, sol2), Reals)
.Bisected to 651595d from #21276.
CC @smichr
The text was updated successfully, but these errors were encountered: