nicolewhite / algebra.js

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

Negative coefficient of variable does not parse #41

Closed calvinw closed 8 years ago

calvinw commented 9 years ago

In 0.2.4 I have noticed this:

var algebra = require("algebra.js")

This works: algebra.parse("(-2)_x+3_y=4");

but this does not: algebra.parse("-2_x+3_y=4"); SyntaxError: Unbalanced Parenthesis

This is a great library...! I am using it and enjoying it tons! Thanks so much for creating this.

calvinw commented 9 years ago

Also with stars (*) for multiplication

-2x + 3y = 4 does not parse

but

(-2)x + 3y = 4 does parse

timrach commented 8 years ago

Hey, I fixed this bug in #42.