nicolewhite / algebra.js

Build, display, and solve algebraic equations.
http://algebra.js.org
MIT License
1.34k stars 111 forks source link

Side-by-side number operations in expression throw an error #54

Open daleyjem opened 8 years ago

daleyjem commented 8 years ago

var eq = algebra.parse("3 * -8 + x = 1") ...throws Uncaught TypeError: Cannot read property 'toString' of undefined(…)

While var eq = algebra.parse("-24 + x = 1") does not.

Is this a bug, or an expected behavior that an operation can't be performed on 2 side-by-side numbers within an expression?

ranode commented 8 years ago

var eq = algebra.parse("-8 * 3 + x = 1") works just fine.. is it just a problem with - followed by *?