I have made it better.
Added:
-Control of the number of parenthesis
-Syntax case is unsensitive for the javascript Object Math
- allow instructions without Math.
db "E",0,"PI",0"abs",0,"ceil",0,"floor",0,"round",0,"max",0,"min",0
db "pow",0,"random",0,"sqrt",0,"exp",0,"LN2",0,"LN10",0,"log",0
db "LOG2E",0,"SQRT1_2",0,"SQRT2",0,"sin",0,"asin",0,"cos",0,"acos",0
db "tan",0,"atan",0,0
See first post to download