JavaScript Expression Evaluator   This library is a modified
version of Raphael Graf’s ActionScript Expression Parser. When I
wrote the JavaScript Function Plotter, I wanted a better
alternative to using JavaScript’s eval function. There’s no
security risk currently, because you can only run code in your
own browser, but it’s not as convenient for math (Math.pow(2^x)
instead of 2^x, etc.).   Get the code from github.
Documentation (incomplete, of course)   Parser is the main class
in the library. It has “static” methods for parsing and
evaluating expressions.  Constructor. In most cases, you don’t
need this. Eventually, I’ll get around to documenting why you
would want to, but for now, you can figure it out by reading the
source ;-).  parse({expression: string}) Convert a mathematical
expression into an Expression object.  evaluate({expression:
string} [, {variables: object}]) Parse and immediately evaluate
an expression using the values/functions from the {variables}
object.  Parser.evaluate(expr, vars) is