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
Incorrect result of reduce_inequalities
involving pi
and abs
#25738
Comments
After conducting a detailed analysis of the source code, I found differing behaviors in the two inequalities at /solvers/inequalities.py#L260: if not (domain.is_ZZ or domain.is_QQ):
expr = numer/denom
expr = Relational(expr, 0, rel)
solution &= solve_univariate_inequality(expr, gen, relational=False)
else:
_eqs.append(((numer, denom), rel)) In the case of |
N.B.: this function can accept ORed sets of equations. Closes sympy/sympy#25738
N.B.: this function can accept ORed sets of equations. Closes sympy/sympy#25738
If you print out the >>> reduce_inequalities(pi < abs(m))
[[_m - pi > 0, _m >= 0], [-_m - pi > 0, _m < 0]] The intersections of the sublist solutions are the arguments for the union of the whole solution. |
sympy v1.12:
The text was updated successfully, but these errors were encountered: