-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
math.simplify reorders operations #933
Comments
I have no idea why the legacy simplify does what you saw, but I added your sensible simplification to simplifyCore since it can be done in a single pass. I added a new test that replicated your output and fixed it as suggested. I think the optimization is benign since the precedence of binary + and - are the same--but I'm only 98.1% sure. 😄 |
Nice! Thank you! |
@jos will determine next steps. |
This should be fixed now in |
gives
"x - 1 + y"
The order of operations gets changed. Is it an issue?
Is there any way to just simplify signs (
'+-n' => '-n'
,'--n' => 'n'
) without node tree getting rearranged so drastically (and getx + y - 1
in my example)?The text was updated successfully, but these errors were encountered: