Replies: 1 comment 1 reply
-
|
Thanks for reporting. Are you using the latest version of mathjs? I tried with the latest version of mathjs, this gives: console.log(math.simplify('-2x + 3 - 2').toString()) // 1 - 2 * x
console.log(math.simplify('2x + 2').toString()) // 2 * (x + 1)So it looks like the first case works ok but the second doesn't make much sense. To solve this we have to tune the rules of Anyone able to help out here? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
When I use the
simplifymethod of themathjslibrary to simplify the expression-2x + 3 - 2, I expect to get-2x + 1, but instead I get3−2(x+1). How can I prevent that factorization?Here is an example of the code I have:
I am also having a similar issue with the expression
2x + 2, which is being simplified to2(x+1).Beta Was this translation helpful? Give feedback.
All reactions