From 23aee50b1c406071e04ce710bec431f116fb6f11 Mon Sep 17 00:00:00 2001 From: bugwheels94 Date: Mon, 18 Nov 2024 03:53:44 +0000 Subject: [PATCH] fix: fix issue 61 fix #91 --- dist/browser/math-expression-evaluator.min.js | 2 +- src/lexer.ts | 2 +- test/issue91.js | 12 ++++++++++++ 3 files changed, 14 insertions(+), 2 deletions(-) create mode 100644 test/issue91.js diff --git a/dist/browser/math-expression-evaluator.min.js b/dist/browser/math-expression-evaluator.min.js index 7efea94..c275e91 100644 --- a/dist/browser/math-expression-evaluator.min.js +++ b/dist/browser/math-expression-evaluator.min.js @@ -1 +1 @@ -!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).Mexp=t()}(this,(function(){"use strict";function e(){return e=Object.assign?Object.assign.bind():function(e){for(var t=1;ti.length-2?i.length-1:t.length-u;a>0;a--)if(void 0!==i[a])for(o=0;o0&&Eh)u.push(t);else{for(;h>=r&&!l||l&&r1)throw new Error("Uncaught Syntax error");return parseFloat(h[0].value.toFixed(15))}var A=function(){function t(){var t;this.toPostfix=f,this.addToken=E,this.lex=v,this.postfixEval=y,this.math=(t=this,{isDegree:!0,acos:function(e){return t.math.isDegree?180/Math.PI*Math.acos(e):Math.acos(e)},add:function(e,t){return e+t},asin:function(e){return t.math.isDegree?180/Math.PI*Math.asin(e):Math.asin(e)},atan:function(e){return t.math.isDegree?180/Math.PI*Math.atan(e):Math.atan(e)},acosh:function(e){return Math.log(e+Math.sqrt(e*e-1))},asinh:function(e){return Math.log(e+Math.sqrt(e*e+1))},atanh:function(e){return Math.log((1+e)/(1-e))},C:function(e,n){var a=1,o=e-n,h=n;hi.length-2?i.length-1:t.length-u;a>0;a--)if(void 0!==i[a])for(o=0;o0&&Eh)u.push(t);else{for(;h>=r&&!l||l&&r1)throw new Error("Uncaught Syntax error");return parseFloat(h[0].value.toFixed(15))}var A=function(){function t(){var t;this.toPostfix=f,this.addToken=E,this.lex=v,this.postfixEval=y,this.math=(t=this,{isDegree:!0,acos:function(e){return t.math.isDegree?180/Math.PI*Math.acos(e):Math.acos(e)},add:function(e,t){return e+t},asin:function(e){return t.math.isDegree?180/Math.PI*Math.asin(e):Math.asin(e)},atan:function(e){return t.math.isDegree?180/Math.PI*Math.atan(e):Math.atan(e)},acosh:function(e){return Math.log(e+Math.sqrt(e*e-1))},asinh:function(e){return Math.log(e+Math.sqrt(e*e+1))},atanh:function(e){return Math.log((1+e)/(1-e))},C:function(e,n){var a=1,o=e-n,h=n;h