semantic-math / math-rules

Manipulate math-ast ASTs based on algebraic rules
MIT License
4 stars 1 forks source link

[IMPORTANT] Issues with Simplify Rules #17

Closed aliang8 closed 7 years ago

aliang8 commented 7 years ago

Found a few issues with the current set of rules we have. They are mostly trivial and easy to fix.

Needs fixing:

removeAdditionOfZero 2 + 0 + x (should evaluate to 2 + x)

removeMultiplicationByNegativeOne 2x * 2 * -1 -> 2 * x * -2 (we should keep the implicit)

removeMultiplicationByOne 2*1*z^2 (should evaluate to 2*z^2)