Skip to content
This repository was archived by the owner on Aug 29, 2024. It is now read-only.

remove unnecessary parens before solving equations#205

Merged
ldworkin merged 3 commits intomasterfrom
ld_parens_fix
Jul 18, 2017
Merged

remove unnecessary parens before solving equations#205
ldworkin merged 3 commits intomasterfrom
ld_parens_fix

Conversation

@ldworkin
Copy link
Copy Markdown
Contributor

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) = 0 solves x = 0 only, so x is simplified and 0 is simplified, but never x^2. So instead let's simplify an equation right away to be safe.

Comment thread lib/solveEquation/stepThrough.js Outdated
// 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
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

e.g. x^(2) = 0 -> x^2 = 0

@ldworkin ldworkin merged commit 97e3526 into master Jul 18, 2017
@ldworkin ldworkin deleted the ld_parens_fix branch July 18, 2017 17:59
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants