Javascript math parser library

前端 未结 4 693
轮回少年
轮回少年 2020-12-16 21:14

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,

4条回答
  •  执笔经年
    2020-12-16 21:54

    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.

提交回复
热议问题