nicolewhite / algebra.js

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

Parser should accept negative numbers #15

Closed nicolewhite closed 9 years ago

nicolewhite commented 9 years ago

The parser throws Missing operand when there is a negative number.

var eq = algebra.parse("x^2 + 4 * x = -4");
Uncaught Error: Missing operand
    at o.construct_expression 
timrach commented 9 years ago

Is fixed in #17

sjorsvanheuveln commented 6 years ago

var eq = algebra.parse("5 +- 1");

This it also can't handle and throws missing operand!