Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Javascript math parser library

Is there a good math parser in Javascript? I want to be able to parse something like:

LOG(3.14)+5^2+POW(2,LN(X*2,Y))

Thanks,

like image 864
Mark K Avatar asked Oct 14 '10 19:10

Mark K


People also ask

Is JavaScript math a library?

Math. js is an extensive math library for JavaScript and Node.

How can I download Math in JavaScript?

Math. js can be installed using various package managers like npm, or by just downloading the library from the website: https://mathjs.org/download.html.

How do you multiply in JavaScript?

An asterisk ( * ) is used to represent the multiplication operator.


1 Answers

Here is a brand new initiative:

http://mathjs.org

Comes with an extensive and easy to use parser which also supports assignment and usage of variables and functions like in your example expression.

like image 61
Jos de Jong Avatar answered Nov 02 '22 11:11

Jos de Jong