cortex-js / compute-engine

An engine for symbolic manipulation and numeric evaluation of math formulas expressed with MathJSON
https://cortexjs.io
MIT License
370 stars 45 forks source link

Simplify expression with -- #173

Closed remiangot closed 3 months ago

remiangot commented 3 months ago

Description

Simplification with -- or ++ doesn't work

Steps to Reproduce

const expr1 = engine.parse('3--5') expr1.simplify() console.log(expr1.latex)

const expr2 = engine.parse('3++5') expr2.simplify() console.log(expr2.latex)

Actual Behavior

3--\times5 3++\times5

Expected Behavior

3+5 3+5

arnog commented 3 months ago

It works now.