Replies: 1 comment
-
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.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
When I use the
simplify
method of themathjs
library 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