nicolewhite/algebra.js

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

daleyjem opened this issue · 1 comments

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?

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