EASYPROF.util.BigNumber=function(e,c,b){var d=this,a;if(e!=undefined&&(e._zeroes!=null)&&(typeof e._zeroes=="function")){for(a in {precision:0,roundType:0,_s:0,_f:0}){d[a]=e[a]}d._d=Array();d._d=d._d.concat(e._d);return}d.precision=isNaN(c=Math.abs(c))?EASYPROF.util.BigNumber.defaultPrecision:c;d.roundType=isNaN(b=Math.abs(b))?EASYPROF.util.BigNumber.defaultRoundType:b;d._s=(e+="").charAt(0)=="-";d._f=((e=e.replace(/[^\d.]/g,"").split(".",2))[0]=e[0].replace(/^0+/,"")||"0").length;for(a=(e=d._d=(e.join("")||"0").split("")).length;a;e[--a]=+e[a]){}d.round()};with({$:EASYPROF.util.BigNumber,o:EASYPROF.util.BigNumber.prototype}){$.ROUND_HALF_EVEN=($.ROUND_HALF_DOWN=($.ROUND_HALF_UP=($.ROUND_FLOOR=($.ROUND_CEIL=($.ROUND_DOWN=($.ROUND_UP=0)+1)+1)+1)+1)+1)+1;$.defaultPrecision=40;$.defaultRoundType=$.ROUND_HALF_UP;o.add=function(k){if(this._s!=(k=new EASYPROF.util.BigNumber(k))._s){return k._s^=1,this.subtract(k)}var j=new EASYPROF.util.BigNumber(this),d=j._d,c=k._d,h=j._f,g=k._f,k=Math.max(h,g),e,f;h!=g&&((g=h-g)>0?j._zeroes(c,g,1):j._zeroes(d,-g,1));e=(h=d.length)==(g=c.length)?d.length:((g=h-g)>0?j._zeroes(c,g):j._zeroes(d,-g)).length;for(f=0;e;f=(d[--e]=d[e]+c[e]+f)/10>>>0,d[e]%=10){}return f&&++k&&d.unshift(f),j._f=k,j.round()};o.subtract=function(g){if(this._s!=(g=new EASYPROF.util.BigNumber(g))._s){return g._s^=1,this.add(g)}var e=new EASYPROF.util.BigNumber(this),p=e.abs().compare(g.abs())+1,r=p?e:g,q=p?g:e,h=r._f,f=q._f,m=h,l,k;r=r._d,q=q._d,h!=f&&((f=h-f)>0?e._zeroes(q,f,1):e._zeroes(r,-f,1));for(l=(h=r.length)==(f=q.length)?r.length:((f=h-f)>0?e._zeroes(q,f):e._zeroes(r,-f)).length;l;){if(r[--l]=(f=new EASYPROF.util.BigNumber(f))._d.length,m=(c?d:f)._d,l=(c?f:d)._d,g=m.length,e=l.length,p=new EASYPROF.util.BigNumber,k,h,q;for(k=e;k;c&&q.unshift(c),p.set(p.add(new EASYPROF.util.BigNumber(q.join(""))))){for(q=(new Array(e- --k)).join("0").split(""),c=0,h=g;h;c+=m[--h]*l[k],q.unshift(c%10),c=(c/10)>>>0){}}return d._s=d._s!=f._s,d._f=((c=g+e-d._f-f._f)>=(h=(d._d=p._d).length)?this._zeroes(d._d,c-h+1,1).length:h)-c,d.round()};o.divide=function(k){if((k=new EASYPROF.util.BigNumber(k))=="0"){throw new Error("Division by 0")}else{if(this=="0"){return new EASYPROF.util.BigNumber}}var g=new EASYPROF.util.BigNumber(this),z=g._d,x=k._d,m=z.length-g._f,h=x.length-k._f,d=new EASYPROF.util.BigNumber,t=0,q,A,p,u=1,w=0,v=0;d._s=g._s!=k._s,d.precision=Math.max(g.precision,k.precision),d._f=+d._d.pop(),m!=h&&g._zeroes(m>h?x:z,Math.abs(m-h));k._f=x.length,x=k,x._s=false,x=x.round();for(k=new EASYPROF.util.BigNumber;z[0]=="0";z.shift()){}out:do{for(p=w=0,k=="0"&&(k._d=[],k._f=0);t1||(v=p&&k=="0"&&z[t]=="0")))&&(d._f==d._d.length&&++d._f,d._d.push(0));(z[t]=="0"&&k=="0")||(k._d.push(z[t]),++k._f);if(v){break out}if((p&&k.compare(x)==-1&&(d._f==d._d.length&&++d._f,1))||(p=0)){while(d._d.push(0),k._d.push(0),++k._f,k.compare(x)==-1){}}}if(u=0,k.compare(x)==-1&&!(p=0)){while(p?d._d.push(0):p=1,k._d.push(0),++k._f,k.compare(x)==-1){}}for(A=new EASYPROF.util.BigNumber,q=0;k.compare(y=A.add(x))+1&&++q;A.set(y)){}k.set(k.subtract(A)),!p&&d._f==d._d.length&&++d._f,d._d.push(q)}while((th)^e._s]}for(j=(e=e._d).length,h=(c=c._d).length,f=-1,d=Math.min(j,h);++fc[f])^e._s]}}return j!=h?g[(j>h)^e._s]:0};o.negate=function(){var a=new EASYPROF.util.BigNumber(this);return a._s^=1,a};o.abs=function(){var a=new EASYPROF.util.BigNumber(this);return a._s=0,a};o.intPart=function(){return new EASYPROF.util.BigNumber((this._s?"-":"")+(this._d.slice(0,this._f).join("")||"0"))};o.valueOf=o.toString=function(){var a=this;return(a._s?"-":"")+(a._d.slice(0,a._f).join("")||"0")+(a._f!=a._d.length?"."+a._d.slice(a._f).join(""):"")};o._zeroes=function(d,a,b){var c=["push","unshift"][b||0];for(++a;--a;d[c](0)){}return d};o.round=function(){if("_rounding" in this){return this}var f=EASYPROF.util.BigNumber,e=this.roundType,c=this._d,h,g,i,a;for(this._rounding=true;this._f>1&&!c[0];--this._f,c.shift()){}for(h=this._f,g=this.precision+h,i=c[g];c.length>h&&!c[c.length-1];c.pop()){}a=(this._s?"-":"")+(g-h?"0."+this._zeroes([],g-h-1).join(""):"")+1;if(c.length>g){i&&(e==f.DOWN?false:e==f.UP?true:e==f.CEIL?!this._s:e==f.FLOOR?this._s:e==f.HALF_UP?i>=5:e==f.HALF_DOWN?i>5:e==f.HALF_EVEN?i>=5&&c[g-1]&1:false)&&this.add(a); c.splice(g,c.length-g)}return delete this._rounding,this}};