From 26105034da4fcce7ac883c899d781f016559310d Mon Sep 17 00:00:00 2001 From: ruki Date: Thu, 8 Nov 2018 00:38:48 +0800 Subject: switch to vuepress --- .../math-expression-evaluator/src/math_function.js | 120 +++++++++++++++++++++ 1 file changed, 120 insertions(+) create mode 100755 node_modules/math-expression-evaluator/src/math_function.js (limited to 'node_modules/math-expression-evaluator/src/math_function.js') diff --git a/node_modules/math-expression-evaluator/src/math_function.js b/node_modules/math-expression-evaluator/src/math_function.js new file mode 100755 index 00000000..18d46ed6 --- /dev/null +++ b/node_modules/math-expression-evaluator/src/math_function.js @@ -0,0 +1,120 @@ + var Mexp=function(parsed){ + this.value=parsed; + + }; + + Mexp.math={ + isDegree:true, //mode of calculator + acos:function(x){ + return (Mexp.math.isDegree?180/Math.PI*Math.acos(x):Math.acos(x)); + }, + add:function(a,b){ + return a+b; + }, + asin:function(x){ + return (Mexp.math.isDegree?180/Math.PI*Math.asin(x):Math.asin(x)); + }, + atan:function(x){ + return (Mexp.math.isDegree?180/Math.PI*Math.atan(x):Math.atan(x)); + }, + acosh:function(x){ + return Math.log(x+Math.sqrt(x*x-1)); + }, + asinh:function(x){ + return Math.log(x+Math.sqrt(x*x+1)); + }, + atanh:function(x){ + return Math.log((1+x)/(1-x)); + }, + C:function(n,r){ + var pro=1,other=n-r,choice=r; + if(choice