This repository was archived by the owner on Aug 29, 2024. It is now read-only.
remove unnecessary parens before solving equations#205
Merged
Conversation
evykassirer
reviewed
Jul 18, 2017
| // Remove unnecessary parentheses here, before doing the find roots check | ||
| // If we have roots, we return early and do not go through simplification, | ||
| // so we can't rely on that flow for parentheses removal | ||
| // e.g. x^(2) = 0 |
Contributor
There was a problem hiding this comment.
e.g. x^(2) = 0 -> x^2 = 0
evykassirer
approved these changes
Jul 18, 2017
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Previously unnecessary parens were removed when we simplified left/right sides of an equation. But now that we have this alternate "find roots" flow, that doesn't always happen. e.g.
x^(2) = 0solvesx = 0only, soxis simplified and0is simplified, but neverx^2. So instead let's simplify an equation right away to be safe.