semantic-math / math-rules

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

Rearrange Coefficients and Fractional Polynomials #32

Closed aliang8 closed 7 years ago

aliang8 commented 7 years ago

2x/3 -> 2 / 3 x and y^3 * 5 -> 5 y^3

Fractional Polynomial can possibly be represented by :

export const FRACTIONAL_POLYNOMIALS =
    defineRuleString('#a #b / #c', '#a / #c #b', {a: query.isNumber, b: query.isIdentifier, c: query.isNumber})
kevinbarabash commented 7 years ago

You'll have to rebase before I can merge.