"undefined"==typeof MathUtil&&(MathUtil={}); (function(){MathUtil.decimal={};MathUtil.decimal.createDecimalSet=function(a,b,c){for(var d=[];a<=b;a=MathUtil.decimal.add(a,c))d.push(a);return d};MathUtil.decimal.add=function(a,b){if(null==a||0==a.length)a=0;if(null==b||0==b.length)b=0;try{var c=a.toString().split(".")[1].length}catch(e){c=0}try{var d=b.toString().split(".")[1].length}catch(e){d=0}c=Math.pow(10,Math.max(c,d));return(f(a,c)+f(b,c))/c};MathUtil.decimal.subtract=function(a,b){if(null==a||0==a.length)a=0;if(null==b||0==b.length)b= 0;try{var c=a.toString().split(".")[1].length}catch(e){c=0}try{var d=b.toString().split(".")[1].length}catch(e){d=0}c=Math.pow(10,Math.max(c,d));return(f(a,c)-f(b,c))/c};MathUtil.decimal.multiply=function(a,b){if(null==a||0==a.length)a=0;if(null==b||0==b.length)b=0;return f(a,b)};MathUtil.decimal.divide=function(a,b){var c=0,d=0;try{c=a.toString().split(".")[1].length}catch(e){}try{d=b.toString().split(".")[1].length}catch(e){}a=Number(a.toString().replace(".",""));b=Number(b.toString().replace(".", ""));return f(a/b,Math.pow(10,d-c))};MathUtil.isInteger=function(a){return/^\d+$/.test(a)};MathUtil.isNegativeInteger=function(a){return/^-\d+$/.test(a)};MathUtil.isNumeric=function(a,b,c){var d=!0,e=0,h="0123456789";b&&(h+=".");c&&(h+="-");if(0==a.length)return!1;for(var g=0;ga};MathUtil.roundp=function(a,b){b=Math.pow(10,b);return Math.round(a*b)/b};MathUtil.floorp=function(a,b){b=Math.pow(10,b);return Math.floor(a*b)/b};MathUtil.outOfScale=function(a,b){a=(""+a).split(".");return 1b};var f=function(a,b){var c=0,d=0;a=a.toString();var e=b.toString();try{c=a.split(".")[1].length}catch(h){}try{d=e.split(".")[1].length}catch(h){}b= Number(a.toString().replace(".",""));a=Number(e.toString().replace(".",""));return b*a/Math.pow(10,c+d)};MathUtil.kFormatter=function(a){return 999