diff --git a/README.md b/README.md index 3f57e72..d2e5d24 100644 --- a/README.md +++ b/README.md @@ -46,7 +46,7 @@ var BigNumber = require('bignumber.js'); To load with AMD loader libraries such as [requireJS](http://requirejs.org/): ```javascript -require(['path/to/bignumber'], function(BigNumber) { +require(['path/to/bignumber'], function(BigNumber) { // Use BigNumber here in local scope. No global BigNumber. }); ``` @@ -76,10 +76,10 @@ y = new BigNumber('zz.9', 36) // "1295.25" z = x.plus(y) // "1306.25" ``` -A BigNumber is immutable in the sense that it is not changed by its methods. +A BigNumber is immutable in the sense that it is not changed by its methods. ```javascript -0.3 - 0.1 // 0.19999999999999998 +0.3 - 0.1 // 0.19999999999999998 x = new BigNumber(0.3) x.minus(0.1) // "0.2" x // "0.3" @@ -202,9 +202,9 @@ To test a single method, e.g. $ node test/toFraction -For the browser, see *every-test.html* and *single-test.html* in the *test/browser* directory. +For the browser, see *every-test.html* and *single-test.html* in the *test/browser* directory. -*bignumber-vs-number.html* enables some of the methods of bignumber.js to be compared with those of JavaScript's number type. +*bignumber-vs-number.html* enables some of the methods of bignumber.js to be compared with those of JavaScript's number type. ## Versions @@ -230,7 +230,7 @@ A source map will also be created in the root directory. ## Feedback -Open an issue, or email +Open an issue, or email Michael @@ -244,6 +244,10 @@ See [LICENCE](https://github.com/MikeMcl/bignumber.js/blob/master/LICENCE). ## Change Log +####2.3.0 +* 07/03/2016 +* #86 Add modulus parameter to `toPower`. + ####2.2.0 * 03/03/2016 * #91 Permit larger JS integers. @@ -344,7 +348,7 @@ See [LICENCE](https://github.com/MikeMcl/bignumber.js/blob/master/LICENCE). ####1.1.0 * 1/8/2013 -* Allow numbers with trailing radix point. +* Allow numbers with trailing radix point. ####1.0.1 * Bugfix: error messages with incorrect method name diff --git a/bignumber.js b/bignumber.js index 66c976d..c2641a5 100644 --- a/bignumber.js +++ b/bignumber.js @@ -7,7 +7,7 @@ bignumber.js v2.2.0 A JavaScript library for arbitrary-precision arithmetic. https://github.com/MikeMcl/bignumber.js - Copyright (c) 2015 Michael Mclaughlin + Copyright (c) 2016 Michael Mclaughlin MIT Expat Licence */ @@ -2363,50 +2363,85 @@ /* * Return a BigNumber whose value is the value of this BigNumber raised to the power n. + * If m is present, return the result modulo m. * If n is negative round according to DECIMAL_PLACES and ROUNDING_MODE. - * If POW_PRECISION is not 0, round to POW_PRECISION using ROUNDING_MODE. + * If POW_PRECISION is non-zero and m is not present, round to POW_PRECISION using + * ROUNDING_MODE. * - * n {number} Integer, -9007199254740992 to 9007199254740992 inclusive. - * (Performs 54 loop iterations for n of 9007199254740992.) + * The modular power operation works efficiently when x, n, and m are positive integers, + * otherwise it is equivalent to calculating x.toPower(n).modulo(m) (with POW_PRECISION 0). + * + * n {number} Integer, -MAX_SAFE_INTEGER to MAX_SAFE_INTEGER inclusive. + * [m] {number|string|BigNumber} The modulus. * * 'pow() exponent not an integer: {n}' * 'pow() exponent out of range: {n}' + * + * Performs 54 loop iterations for n of 9007199254740991. */ - P.toPower = P.pow = function (n) { - var k, y, + P.toPower = P.pow = function ( n, m ) { + var k, y, z, i = mathfloor( n < 0 ? -n : +n ), x = this; + if ( m != null ) { + id = 23; + m = new BigNumber(m); + } + // Pass ±Infinity to Math.pow if exponent is out of range. if ( !isValidInt( n, -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER, 23, 'exponent' ) && ( !isFinite(n) || i > MAX_SAFE_INTEGER && ( n /= 0 ) || - parseFloat(n) != n && !( n = NaN ) ) ) { - return new BigNumber( Math.pow( +x, n ) ); + parseFloat(n) != n && !( n = NaN ) ) || n == 0 ) { + k = Math.pow( +x, n ); + return new BigNumber( m ? k % m : k ); + } + + if (m) { + if ( n > 1 && x.gt(ONE) && x.isInt() && m.gt(ONE) && m.isInt() ) { + x = x.mod(m); + } else { + z = m; + + // Nullify m so only a single mod operation is performed at the end. + m = null; + } + } else if (POW_PRECISION) { + + // Truncating each coefficient array to a length of k after each multiplication + // equates to truncating significant digits to POW_PRECISION + [28, 41], + // i.e. there will be a minimum of 28 guard digits retained. + // (Using + 1.5 would give [9, 21] guard digits.) + k = mathceil( POW_PRECISION / LOG_BASE + 2 ); } - // Truncating each coefficient array to a length of k after each multiplication equates - // to truncating significant digits to POW_PRECISION + [28, 41], i.e. there will be a - // minimum of 28 guard digits retained. (Using + 1.5 would give [9, 21] guard digits.) - k = POW_PRECISION ? mathceil( POW_PRECISION / LOG_BASE + 2 ) : 0; y = new BigNumber(ONE); for ( ; ; ) { - if ( i % 2 ) { y = y.times(x); if ( !y.c ) break; - if ( k && y.c.length > k ) y.c.length = k; + if (k) { + if ( y.c.length > k ) y.c.length = k; + } else if (m) { + y = y.mod(m); + } } i = mathfloor( i / 2 ); if ( !i ) break; - x = x.times(x); - if ( k && x.c && x.c.length > k ) x.c.length = k; + if (k) { + if ( x.c && x.c.length > k ) x.c.length = k; + } else if (m) { + x = x.mod(m); + } } + if (m) return y; if ( n < 0 ) y = ONE.div(y); - return k ? round( y, POW_PRECISION, ROUNDING_MODE ) : y; + + return z ? y.mod(z) : k ? round( y, POW_PRECISION, ROUNDING_MODE ) : y; }; diff --git a/bignumber.js.map b/bignumber.js.map index 2eaf4a4..27f146a 100644 --- a/bignumber.js.map +++ b/bignumber.js.map @@ -1 +1 @@ -{"version":3,"file":"bignumber.min.js","sources":["bignumber.js"],"names":["globalObj","constructorFactory","configObj","BigNumber","n","b","c","e","i","num","len","str","x","this","ERRORS","raise","isValidInt","id","round","DECIMAL_PLACES","ROUNDING_MODE","RegExp","ALPHABET","slice","test","parseNumeric","s","replace","length","tooManyDigits","charCodeAt","convertBase","isNumeric","indexOf","search","substring","MAX_SAFE_INTEGER","mathfloor","MAX_EXP","MIN_EXP","LOG_BASE","push","baseOut","baseIn","sign","d","k","r","xc","y","dp","rm","toLowerCase","POW_PRECISION","pow","toBaseOut","toFixedPoint","coeffToString","pop","div","unshift","charAt","format","caller","c0","ne","roundingMode","toString","TO_EXP_NEG","toExponential","maxOrMin","args","method","m","isArray","call","intValidatorWithErrors","min","max","name","truncate","normalise","j","msg","val","error","Error","sd","ni","rd","pows10","POWS_TEN","out","mathceil","BASE","P","prototype","ONE","TO_EXP_POS","CRYPTO","MODULO_MODE","FORMAT","decimalSeparator","groupSeparator","groupSize","secondaryGroupSize","fractionGroupSeparator","fractionGroupSize","another","ROUND_UP","ROUND_DOWN","ROUND_CEIL","ROUND_FLOOR","ROUND_HALF_UP","ROUND_HALF_DOWN","ROUND_HALF_EVEN","ROUND_HALF_CEIL","ROUND_HALF_FLOOR","EUCLID","config","v","p","a","arguments","o","has","hasOwnProperty","MAX","intValidatorNoErrors","notBool","cryptoObj","lt","gt","random","pow2_53","random53bitInt","Math","rand","getRandomValues","Uint32Array","randomBytes","copy","shift","multiply","base","temp","xlo","xhi","carry","klo","SQRT_BASE","khi","compare","aL","bL","cmp","subtract","more","prod","prodL","q","qc","rem","remL","rem0","xi","xL","yc0","yL","yz","yc","NaN","bitFloor","basePrefix","dotAfter","dotBefore","isInfinityOrNaN","whitespaceOrPlus","isNaN","p1","p2","absoluteValue","abs","ceil","comparedTo","decimalPlaces","dividedBy","dividedToIntegerBy","divToInt","equals","eq","floor","greaterThan","greaterThanOrEqualTo","gte","isFinite","isInteger","isInt","isNegative","isNeg","isZero","lessThan","lessThanOrEqualTo","lte","minus","sub","t","xLTy","plus","xe","ye","reverse","modulo","mod","times","negated","neg","add","precision","z","squareRoot","sqrt","rep","half","mul","xcL","ycL","ylo","yhi","zc","sqrtBase","toDigits","toFixed","toFormat","arr","split","g1","g2","intPart","fractionPart","intDigits","substr","toFraction","md","d0","d2","exp","n0","n1","d1","toNumber","toPower","parseFloat","toPrecision","truncated","trunc","valueOf","toJSON","l","obj","Object","arrL","crypto","define","amd","module","exports","require","self","Function"],"mappings":";CAEC,SAAWA,GACR,YAuCA,SAASC,GAAmBC,GAiHxB,QAASC,GAAWC,EAAGC,GACnB,GAAIC,GAAGC,EAAGC,EAAGC,EAAKC,EAAKC,EACnBC,EAAIC,IAGR,MAAQD,YAAaT,IAIjB,MADIW,IAAQC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A,EAI/B,QAASiD,GAAc7C,EAAKJ,GACxB,GAAIG,GAAKiN,CAGT,IAAS,EAAJpN,EAAQ,CAGT,IAAMoN,EAAI,OAAQpN,EAAGoN,GAAK,KAC1BhN,EAAMgN,EAAIhN,MAOV,IAHAD,EAAMC,EAAIiB,SAGHrB,EAAIG,EAAM,CACb,IAAMiN,EAAI,IAAKpN,GAAKG,IAAOH,EAAGoN,GAAK,KACnChN,GAAOgN,MACKjN,GAAJH,IACRI,EAAMA,EAAIY,MAAO,EAAGhB,GAAM,IAAMI,EAAIY,MAAMhB,GAIlD,OAAOI,GAIX,QAASqE,GAAS5E,GAEd,MADAA,GAAIwP,WAAWxP,GACJ,EAAJA,EAAQyF,EAASzF,GAAKiC,EAAUjC,GApmF3C,GAAI8H,GAAWzG,EACXO,EAAY,uCACZ6D,EAAW2C,KAAK+C,KAChBlJ,EAAYmG,KAAKuD,MACjB9D,EAAU,iCACV/D,EAAe,gBACfrC,EAAgB,kDAChBP,EAAW,mEACXwE,EAAO,KACPtD,EAAW,GACXJ,EAAmB,iBAEnBuD,GAAY,EAAG,GAAI,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,KAAM,KAAM,KAAM,MAC7E2D,EAAY,IAOZvB,EAAM,GAwlFV,IAtlFsB,mBAAVuI,UAAwBpI,EAAYoI,QAslF1B,kBAAVC,SAAwBA,OAAOC,IACvCD,OAAQ,WAAc,MAAOtQ,WAG1B,IAAsB,mBAAVwQ,SAAyBA,OAAOC,SAI/C,GAHAD,OAAOC,QAAUzQ,KAGXiI,EAAY,IAAMA,EAAYyI,QAAQ,UAAkB,MAAOpQ,SAI/DP,KAAYA,EAA2B,mBAAR4Q,MAAsBA,KAAOC,SAAS,kBAC3E7Q,EAAUG,UAAYF,KAE3BY"} \ No newline at end of file +{"version":3,"file":"bignumber.min.js","sources":["bignumber.js"],"names":["globalObj","constructorFactory","configObj","BigNumber","n","b","c","e","i","num","len","str","x","this","ERRORS","raise","isValidInt","id","round","DECIMAL_PLACES","ROUNDING_MODE","RegExp","ALPHABET","slice","test","parseNumeric","s","replace","length","tooManyDigits","charCodeAt","convertBase","isNumeric","indexOf","search","substring","MAX_SAFE_INTEGER","mathfloor","MAX_EXP","MIN_EXP","LOG_BASE","push","baseOut","baseIn","sign","d","k","r","xc","y","dp","rm","toLowerCase","POW_PRECISION","pow","toBaseOut","toFixedPoint","coeffToString","pop","div","unshift","charAt","format","caller","c0","ne","roundingMode","toString","TO_EXP_NEG","toExponential","maxOrMin","args","method","m","isArray","call","intValidatorWithErrors","min","max","name","truncate","normalise","j","msg","val","error","Error","sd","ni","rd","pows10","POWS_TEN","out","mathceil","BASE","P","prototype","ONE","TO_EXP_POS","CRYPTO","MODULO_MODE","FORMAT","decimalSeparator","groupSeparator","groupSize","secondaryGroupSize","fractionGroupSeparator","fractionGroupSize","another","ROUND_UP","ROUND_DOWN","ROUND_CEIL","ROUND_FLOOR","ROUND_HALF_UP","ROUND_HALF_DOWN","ROUND_HALF_EVEN","ROUND_HALF_CEIL","ROUND_HALF_FLOOR","EUCLID","config","v","p","a","arguments","o","has","hasOwnProperty","MAX","intValidatorNoErrors","notBool","cryptoObj","lt","gt","random","pow2_53","random53bitInt","Math","rand","getRandomValues","Uint32Array","randomBytes","copy","shift","multiply","base","temp","xlo","xhi","carry","klo","SQRT_BASE","khi","compare","aL","bL","cmp","subtract","more","prod","prodL","q","qc","rem","remL","rem0","xi","xL","yc0","yL","yz","yc","NaN","bitFloor","basePrefix","dotAfter","dotBefore","isInfinityOrNaN","whitespaceOrPlus","isNaN","p1","p2","absoluteValue","abs","ceil","comparedTo","decimalPlaces","dividedBy","dividedToIntegerBy","divToInt","equals","eq","floor","greaterThan","greaterThanOrEqualTo","gte","isFinite","isInteger","isInt","isNegative","isNeg","isZero","lessThan","lessThanOrEqualTo","lte","minus","sub","t","xLTy","plus","xe","ye","reverse","modulo","mod","times","negated","neg","add","precision","z","squareRoot","sqrt","rep","half","mul","xcL","ycL","ylo","yhi","zc","sqrtBase","toDigits","toFixed","toFormat","arr","split","g1","g2","intPart","fractionPart","intDigits","substr","toFraction","md","d0","d2","exp","n0","n1","d1","toNumber","toPower","parseFloat","toPrecision","truncated","trunc","valueOf","toJSON","l","obj","Object","arrL","crypto","define","amd","module","exports","require","self","Function"],"mappings":";CAEC,SAAWA,GACR,YAuCA,SAASC,GAAmBC,GAiHxB,QAASC,GAAWC,EAAGC,GACnB,GAAIC,GAAGC,EAAGC,EAAGC,EAAKC,EAAKC,EACnBC,EAAIC,IAGR,MAAQD,YAAaT,IAIjB,MADIW,IAAQC,EAAO,GAAI,+BAAgCX,GAChD,GAAID,GAAWC,EAAGC,EAK7B,IAAU,MAALA,GAAcW,EAAYX,EAAG,EAAG,GAAIY,EAAI,QA4BtC,CAMH,GALAZ,EAAQ,EAAJA,EACJM,EAAMP,EAAI,GAIA,IAALC,EAED,MADAO,GAAI,GAAIT,GAAWC,YAAaD,GAAYC,EAAIO,GACzCO,EAAON,EAAGO,EAAiBP,EAAEL,EAAI,EAAGa,EAK/C,KAAOX,EAAkB,gBAALL,KAAuB,EAAJA,GAAS,IAC7C,GAAMiB,QAAQ,OAAUf,EAAI,IAAMgB,EAASC,MAAO,EAAGlB,GAAM,MAC1D,SAAWC,EAAI,MAAU,GAAJD,EAAS,IAAM,IAAOmB,KAAKb,GAChD,MAAOc,GAAcb,EAAGD,EAAKF,EAAKJ,EAGlCI,IACAG,EAAEc,EAAY,EAAR,EAAItB,GAAUO,EAAMA,EAAIY,MAAM,GAAI,IAAO,EAE1CT,GAAUH,EAAIgB,QAAS,YAAa,IAAKC,OAAS,IAGnDb,EAAOE,EAAIY,EAAezB,GAI9BK,GAAM,GAENG,EAAEc,EAA0B,KAAtBf,EAAImB,WAAW,IAAcnB,EAAMA,EAAIY,MAAM,GAAI,IAAO,EAGlEZ,EAAMoB,EAAapB,EAAK,GAAIN,EAAGO,EAAEc,OA9DmB,CAGpD,GAAKtB,YAAaD,GAKd,MAJAS,GAAEc,EA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,GAAKiC,EAAUjC,GAvoF3C,GAAI8H,GAAWzG,EACXO,EAAY,uCACZ6D,EAAW2C,KAAK+C,KAChBlJ,EAAYmG,KAAKuD,MACjB9D,EAAU,iCACV/D,EAAe,gBACfrC,EAAgB,kDAChBP,EAAW,mEACXwE,EAAO,KACPtD,EAAW,GACXJ,EAAmB,iBAEnBuD,GAAY,EAAG,GAAI,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,KAAM,KAAM,KAAM,MAC7E2D,EAAY,IAOZvB,EAAM,GA2nFV,IAznFsB,mBAAVuI,UAAwBpI,EAAYoI,QAynF1B,kBAAVC,SAAwBA,OAAOC,IACvCD,OAAQ,WAAc,MAAOtQ,WAG1B,IAAsB,mBAAVwQ,SAAyBA,OAAOC,SAI/C,GAHAD,OAAOC,QAAUzQ,KAGXiI,EAAY,IAAMA,EAAYyI,QAAQ,UAAkB,MAAOpQ,SAI/DP,KAAYA,EAA2B,mBAAR4Q,MAAsBA,KAAOC,SAAS,kBAC3E7Q,EAAUG,UAAYF,KAE3BY"} \ No newline at end of file diff --git a/bignumber.min.js b/bignumber.min.js index 7998513..fd148c3 100644 --- a/bignumber.min.js +++ b/bignumber.min.js @@ -1,3 +1,3 @@ /* bignumber.js v2.2.0 https://github.com/MikeMcl/bignumber.js/LICENCE */ -!function(e){"use strict";function n(e){function E(e,n){var t,r,i,o,u,s,f=this;if(!(f instanceof E))return j&&L(26,"constructor call without new",e),new E(e,n);if(null!=n&&H(n,2,64,M,"base")){if(n=0|n,s=e+"",10==n)return f=new E(e instanceof E?e:s),U(f,P+f.e+1,k);if((o="number"==typeof e)&&0*e!=0||!new RegExp("^-?"+(t="["+N.slice(0,n)+"]+")+"(?:\\."+t+")?$",37>n?"i":"").test(s))return h(f,s,o,n);o?(f.s=0>1/e?(s=s.slice(1),-1):1,j&&s.replace(/^0\.0*|\./,"").length>15&&L(M,v,e),o=!1):f.s=45===s.charCodeAt(0)?(s=s.slice(1),-1):1,s=D(s,10,n,f.s)}else{if(e instanceof E)return f.s=e.s,f.e=e.e,f.c=(e=e.c)?e.slice():e,void(M=0);if((o="number"==typeof e)&&0*e==0){if(f.s=0>1/e?(e=-e,-1):1,e===~~e){for(r=0,i=e;i>=10;i/=10,r++);return f.e=r,f.c=[e],void(M=0)}s=e+""}else{if(!g.test(s=e+""))return h(f,s,o);f.s=45===s.charCodeAt(0)?(s=s.slice(1),-1):1}}for((r=s.indexOf("."))>-1&&(s=s.replace(".","")),(i=s.search(/e/i))>0?(0>r&&(r=i),r+=+s.slice(i+1),s=s.substring(0,i)):0>r&&(r=s.length),i=0;48===s.charCodeAt(i);i++);for(u=s.length;48===s.charCodeAt(--u););if(s=s.slice(i,u+1))if(u=s.length,o&&j&&u>15&&(e>y||e!==d(e))&&L(M,v,f.s*e),r=r-i-1,r>z)f.c=f.e=null;else if(G>r)f.c=[f.e=0];else{if(f.e=r,f.c=[],i=(r+1)%O,0>r&&(i+=O),u>i){for(i&&f.c.push(+s.slice(0,i)),u-=O;u>i;)f.c.push(+s.slice(i,i+=O));s=s.slice(i),i=O-s.length}else i-=u;for(;i--;s+="0");f.c.push(+s)}else f.c=[f.e=0];M=0}function D(e,n,t,i){var o,u,f,c,a,h,g,p=e.indexOf("."),d=P,m=k;for(37>t&&(e=e.toLowerCase()),p>=0&&(f=J,J=0,e=e.replace(".",""),g=new E(t),a=g.pow(e.length-p),J=f,g.c=s(l(r(a.c),a.e),10,n),g.e=g.c.length),h=s(e,t,n),u=f=h.length;0==h[--f];h.pop());if(!h[0])return"0";if(0>p?--u:(a.c=h,a.e=u,a.s=i,a=C(a,g,d,m,n),h=a.c,c=a.r,u=a.e),o=u+d+1,p=h[o],f=n/2,c=c||0>o||null!=h[o+1],c=4>m?(null!=p||c)&&(0==m||m==(a.s<0?3:2)):p>f||p==f&&(4==m||c||6==m&&1&h[o-1]||m==(a.s<0?8:7)),1>o||!h[0])e=c?l("1",-d):"0";else{if(h.length=o,c)for(--n;++h[--o]>n;)h[o]=0,o||(++u,h.unshift(1));for(f=h.length;!h[--f];);for(p=0,e="";f>=p;e+=N.charAt(h[p++]));e=l(e,u)}return e}function F(e,n,t,i){var o,u,s,c,a;if(t=null!=t&&H(t,0,8,i,w)?0|t:k,!e.c)return e.toString();if(o=e.c[0],s=e.e,null==n)a=r(e.c),a=19==i||24==i&&B>=s?f(a,s):l(a,s);else if(e=U(new E(e),n,t),u=e.e,a=r(e.c),c=a.length,19==i||24==i&&(u>=n||B>=u)){for(;n>c;a+="0",c++);a=f(a,u)}else if(n-=s,a=l(a,u),u+1>c){if(--n>0)for(a+=".";n--;a+="0");}else if(n+=u-c,n>0)for(u+1==c&&(a+=".");n--;a+="0");return e.s<0&&o?"-"+a:a}function _(e,n){var t,r,i=0;for(u(e[0])&&(e=e[0]),t=new E(e[0]);++ie||e>t||e!=c(e))&&L(r,(i||"decimal places")+(n>e||e>t?" out of range":" not an integer"),e),!0}function I(e,n,t){for(var r=1,i=n.length;!n[--i];n.pop());for(i=n[0];i>=10;i/=10,r++);return(t=r+t*O-1)>z?e.c=e.e=null:G>t?e.c=[e.e=0]:(e.e=t,e.c=n),e}function L(e,n,t){var r=new Error(["new BigNumber","cmp","config","div","divToInt","eq","gt","gte","lt","lte","minus","mod","plus","precision","random","round","shift","times","toDigits","toExponential","toFixed","toFormat","toFraction","pow","toPrecision","toString","BigNumber"][e]+"() "+n+": "+t);throw r.name="BigNumber Error",M=0,r}function U(e,n,t,r){var i,o,u,s,f,l,c,a=e.c,h=S;if(a){e:{for(i=1,s=a[0];s>=10;s/=10,i++);if(o=n-i,0>o)o+=O,u=n,f=a[l=0],c=f/h[i-u-1]%10|0;else if(l=p((o+1)/O),l>=a.length){if(!r)break e;for(;a.length<=l;a.push(0));f=c=0,i=1,o%=O,u=o-O+1}else{for(f=s=a[l],i=1;s>=10;s/=10,i++);o%=O,u=o-O+i,c=0>u?0:f/h[i-u-1]%10|0}if(r=r||0>n||null!=a[l+1]||(0>u?f:f%h[i-u-1]),r=4>t?(c||r)&&(0==t||t==(e.s<0?3:2)):c>5||5==c&&(4==t||r||6==t&&(o>0?u>0?f/h[i-u]:0:a[l-1])%10&1||t==(e.s<0?8:7)),1>n||!a[0])return a.length=0,r?(n-=e.e+1,a[0]=h[(O-n%O)%O],e.e=-n||0):a[0]=e.e=0,e;if(0==o?(a.length=l,s=1,l--):(a.length=l+1,s=h[O-o],a[l]=u>0?d(f/h[i-u]%h[u])*s:0),r)for(;;){if(0==l){for(o=1,u=a[0];u>=10;u/=10,o++);for(u=a[0]+=s,s=1;u>=10;u/=10,s++);o!=s&&(e.e++,a[0]==b&&(a[0]=1));break}if(a[l]+=s,a[l]!=b)break;a[l--]=0,s=1}for(o=a.length;0===a[--o];a.pop());}e.e>z?e.c=e.e=null:e.et?null!=(e=i[t++]):void 0};return f(n="DECIMAL_PLACES")&&H(e,0,A,2,n)&&(P=0|e),r[n]=P,f(n="ROUNDING_MODE")&&H(e,0,8,2,n)&&(k=0|e),r[n]=k,f(n="EXPONENTIAL_AT")&&(u(e)?H(e[0],-A,0,2,n)&&H(e[1],0,A,2,n)&&(B=0|e[0],$=0|e[1]):H(e,-A,A,2,n)&&(B=-($=0|(0>e?-e:e)))),r[n]=[B,$],f(n="RANGE")&&(u(e)?H(e[0],-A,-1,2,n)&&H(e[1],1,A,2,n)&&(G=0|e[0],z=0|e[1]):H(e,-A,A,2,n)&&(0|e?G=-(z=0|(0>e?-e:e)):j&&L(2,n+" cannot be zero",e))),r[n]=[G,z],f(n="ERRORS")&&(e===!!e||1===e||0===e?(M=0,H=(j=!!e)?x:o):j&&L(2,n+m,e)),r[n]=j,f(n="CRYPTO")&&(e===!!e||1===e||0===e?(V=!(!e||!a),e&&!V&&j&&L(2,"crypto unavailable",a)):j&&L(2,n+m,e)),r[n]=V,f(n="MODULO_MODE")&&H(e,0,9,2,n)&&(W=0|e),r[n]=W,f(n="POW_PRECISION")&&H(e,0,A,2,n)&&(J=0|e),r[n]=J,f(n="FORMAT")&&("object"==typeof e?X=e:j&&L(2,n+" not an object",e)),r[n]=X,r},E.max=function(){return _(arguments,T.lt)},E.min=function(){return _(arguments,T.gt)},E.random=function(){var e=9007199254740992,n=Math.random()*e&2097151?function(){return d(Math.random()*e)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)};return function(e){var t,r,i,o,u,s=0,f=[],l=new E(q);if(e=null!=e&&H(e,0,A,14)?0|e:P,o=p(e/O),V)if(a&&a.getRandomValues){for(t=a.getRandomValues(new Uint32Array(o*=2));o>s;)u=131072*t[s]+(t[s+1]>>>11),u>=9e15?(r=a.getRandomValues(new Uint32Array(2)),t[s]=r[0],t[s+1]=r[1]):(f.push(u%1e14),s+=2);s=o/2}else if(a&&a.randomBytes){for(t=a.randomBytes(o*=7);o>s;)u=281474976710656*(31&t[s])+1099511627776*t[s+1]+4294967296*t[s+2]+16777216*t[s+3]+(t[s+4]<<16)+(t[s+5]<<8)+t[s+6],u>=9e15?a.randomBytes(7).copy(t,s):(f.push(u%1e14),s+=7);s=o/7}else j&&L(14,"crypto unavailable",a);if(!s)for(;o>s;)u=n(),9e15>u&&(f[s++]=u%1e14);for(o=f[--s],e%=O,o&&e&&(u=S[O-e],f[s]=d(o/u)*u);0===f[s];f.pop(),s--);if(0>s)f=[i=0];else{for(i=-1;0===f[0];f.shift(),i-=O);for(s=1,u=f[0];u>=10;u/=10,s++);O>s&&(i-=O-s)}return l.e=i,l.c=f,l}}(),C=function(){function e(e,n,t){var r,i,o,u,s=0,f=e.length,l=n%R,c=n/R|0;for(e=e.slice();f--;)o=e[f]%R,u=e[f]/R|0,r=c*o+u*l,i=l*o+r%R*R+s,s=(i/t|0)+(r/R|0)+c*u,e[f]=i%t;return s&&e.unshift(s),e}function n(e,n,t,r){var i,o;if(t!=r)o=t>r?1:-1;else for(i=o=0;t>i;i++)if(e[i]!=n[i]){o=e[i]>n[i]?1:-1;break}return o}function r(e,n,t,r){for(var i=0;t--;)e[t]-=i,i=e[t]1;e.shift());}return function(i,o,u,s,f){var l,c,a,h,g,p,m,w,v,N,y,S,R,A,D,F,_,x=i.s==o.s?1:-1,I=i.c,L=o.c;if(!(I&&I[0]&&L&&L[0]))return new E(i.s&&o.s&&(I?!L||I[0]!=L[0]:L)?I&&0==I[0]||!L?0*x:x/0:NaN);for(w=new E(x),v=w.c=[],c=i.e-o.e,x=u+c+1,f||(f=b,c=t(i.e/O)-t(o.e/O),x=x/O|0),a=0;L[a]==(I[a]||0);a++);if(L[a]>(I[a]||0)&&c--,0>x)v.push(1),h=!0;else{for(A=I.length,F=L.length,a=0,x+=2,g=d(f/(L[0]+1)),g>1&&(L=e(L,g,f),I=e(I,g,f),F=L.length,A=I.length),R=F,N=I.slice(0,F),y=N.length;F>y;N[y++]=0);_=L.slice(),_.unshift(0),D=L[0],L[1]>=f/2&&D++;do{if(g=0,l=n(L,N,F,y),0>l){if(S=N[0],F!=y&&(S=S*f+(N[1]||0)),g=d(S/D),g>1)for(g>=f&&(g=f-1),p=e(L,g,f),m=p.length,y=N.length;1==n(p,N,m,y);)g--,r(p,m>F?_:L,m,f),m=p.length,l=1;else 0==g&&(l=g=1),p=L.slice(),m=p.length;if(y>m&&p.unshift(0),r(N,p,y,f),y=N.length,-1==l)for(;n(L,N,F,y)<1;)g++,r(N,y>F?_:L,y,f),y=N.length}else 0===l&&(g++,N=[0]);v[a++]=g,N[0]?N[y++]=I[R]||0:(N=[I[R]],y=1)}while((R++=10;x/=10,a++);U(w,u+(w.e=a+c*O-1)+1,s,h)}else w.e=c,w.r=+h;return w}}(),h=function(){var e=/^(-?)0([xbo])(?=\w[\w.]*$)/i,n=/^([^.]+)\.$/,t=/^\.([^.]+)$/,r=/^-?(Infinity|NaN)$/,i=/^\s*\+(?=[\w.])|^\s+|\s+$/g;return function(o,u,s,f){var l,c=s?u:u.replace(i,"");if(r.test(c))o.s=isNaN(c)?null:0>c?-1:1;else{if(!s&&(c=c.replace(e,function(e,n,t){return l="x"==(t=t.toLowerCase())?16:"b"==t?2:8,f&&f!=l?e:n}),f&&(l=f,c=c.replace(n,"$1").replace(t,"0.$1")),u!=c))return new E(c,l);j&&L(M,"not a"+(f?" base "+f:"")+" number",u),o.s=null}o.c=o.e=null,M=0}}(),T.absoluteValue=T.abs=function(){var e=new E(this);return e.s<0&&(e.s=1),e},T.ceil=function(){return U(new E(this),this.e+1,2)},T.comparedTo=T.cmp=function(e,n){return M=1,i(this,new E(e,n))},T.decimalPlaces=T.dp=function(){var e,n,r=this.c;if(!r)return null;if(e=((n=r.length-1)-t(this.e/O))*O,n=r[n])for(;n%10==0;n/=10,e--);return 0>e&&(e=0),e},T.dividedBy=T.div=function(e,n){return M=3,C(this,new E(e,n),P,k)},T.dividedToIntegerBy=T.divToInt=function(e,n){return M=4,C(this,new E(e,n),0,1)},T.equals=T.eq=function(e,n){return M=5,0===i(this,new E(e,n))},T.floor=function(){return U(new E(this),this.e+1,3)},T.greaterThan=T.gt=function(e,n){return M=6,i(this,new E(e,n))>0},T.greaterThanOrEqualTo=T.gte=function(e,n){return M=7,1===(n=i(this,new E(e,n)))||0===n},T.isFinite=function(){return!!this.c},T.isInteger=T.isInt=function(){return!!this.c&&t(this.e/O)>this.c.length-2},T.isNaN=function(){return!this.s},T.isNegative=T.isNeg=function(){return this.s<0},T.isZero=function(){return!!this.c&&0==this.c[0]},T.lessThan=T.lt=function(e,n){return M=8,i(this,new E(e,n))<0},T.lessThanOrEqualTo=T.lte=function(e,n){return M=9,-1===(n=i(this,new E(e,n)))||0===n},T.minus=T.sub=function(e,n){var r,i,o,u,s=this,f=s.s;if(M=10,e=new E(e,n),n=e.s,!f||!n)return new E(NaN);if(f!=n)return e.s=-n,s.plus(e);var l=s.e/O,c=e.e/O,a=s.c,h=e.c;if(!l||!c){if(!a||!h)return a?(e.s=-n,e):new E(h?s:NaN);if(!a[0]||!h[0])return h[0]?(e.s=-n,e):new E(a[0]?s:3==k?-0:0)}if(l=t(l),c=t(c),a=a.slice(),f=l-c){for((u=0>f)?(f=-f,o=a):(c=l,o=h),o.reverse(),n=f;n--;o.push(0));o.reverse()}else for(i=(u=(f=a.length)<(n=h.length))?f:n,f=n=0;i>n;n++)if(a[n]!=h[n]){u=a[n]0)for(;n--;a[r++]=0);for(n=b-1;i>f;){if(a[--i]0?(s=u,r=l):(o=-o,r=f),r.reverse();o--;r.push(0));r.reverse()}for(o=f.length,n=l.length,0>o-n&&(r=l,l=f,f=r,n=o),o=0;n;)o=(f[--n]=f[n]+l[n]+o)/b|0,f[n]%=b;return o&&(f.unshift(o),++s),I(e,f,s)},T.precision=T.sd=function(e){var n,t,r=this,i=r.c;if(null!=e&&e!==!!e&&1!==e&&0!==e&&(j&&L(13,"argument"+m,e),e!=!!e&&(e=null)),!i)return null;if(t=i.length-1,n=t*O+1,t=i[t]){for(;t%10==0;t/=10,n--);for(t=i[0];t>=10;t/=10,n++);}return e&&r.e+1>n&&(n=r.e+1),n},T.round=function(e,n){var t=new E(this);return(null==e||H(e,0,A,15))&&U(t,~~e+this.e+1,null!=n&&H(n,0,8,15,w)?0|n:k),t},T.shift=function(e){var n=this;return H(e,-y,y,16,"argument")?n.times("1e"+c(e)):new E(n.c&&n.c[0]&&(-y>e||e>y)?n.s*(0>e?0:1/0):n)},T.squareRoot=T.sqrt=function(){var e,n,i,o,u,s=this,f=s.c,l=s.s,c=s.e,a=P+4,h=new E("0.5");if(1!==l||!f||!f[0])return new E(!l||0>l&&(!f||f[0])?NaN:f?s:1/0);if(l=Math.sqrt(+s),0==l||l==1/0?(n=r(f),(n.length+c)%2==0&&(n+="0"),l=Math.sqrt(n),c=t((c+1)/2)-(0>c||c%2),l==1/0?n="1e"+c:(n=l.toExponential(),n=n.slice(0,n.indexOf("e")+1)+c),i=new E(n)):i=new E(l+""),i.c[0])for(c=i.e,l=c+a,3>l&&(l=0);;)if(u=i,i=h.times(u.plus(C(s,u,a,1))),r(u.c).slice(0,l)===(n=r(i.c)).slice(0,l)){if(i.el&&(d=N,N=y,y=d,o=l,l=h,h=o),o=l+h,d=[];o--;d.push(0));for(m=b,w=R,o=h;--o>=0;){for(r=0,g=y[o]%w,p=y[o]/w|0,s=l,u=o+s;u>o;)c=N[--s]%w,a=N[s]/w|0,f=p*c+a*g,c=g*c+f%w*w+d[u]+r,r=(c/m|0)+(f/w|0)+p*a,d[u--]=c%m;d[u]=r}return r?++i:d.shift(),I(e,d,i)},T.toDigits=function(e,n){var t=new E(this);return e=null!=e&&H(e,1,A,18,"precision")?0|e:null,n=null!=n&&H(n,0,8,18,w)?0|n:k,e?U(t,e,n):t},T.toExponential=function(e,n){return F(this,null!=e&&H(e,0,A,19)?~~e+1:null,n,19)},T.toFixed=function(e,n){return F(this,null!=e&&H(e,0,A,20)?~~e+this.e+1:null,n,20)},T.toFormat=function(e,n){var t=F(this,null!=e&&H(e,0,A,21)?~~e+this.e+1:null,n,21);if(this.c){var r,i=t.split("."),o=+X.groupSize,u=+X.secondaryGroupSize,s=X.groupSeparator,f=i[0],l=i[1],c=this.s<0,a=c?f.slice(1):f,h=a.length;if(u&&(r=o,o=u,u=r,h-=r),o>0&&h>0){for(r=h%o||o,f=a.substr(0,r);h>r;r+=o)f+=s+a.substr(r,o);u>0&&(f+=s+a.slice(r)),c&&(f="-"+f)}t=l?f+X.decimalSeparator+((u=+X.fractionGroupSize)?l.replace(new RegExp("\\d{"+u+"}\\B","g"),"$&"+X.fractionGroupSeparator):l):f}return t},T.toFraction=function(e){var n,t,i,o,u,s,f,l,c,a=j,h=this,g=h.c,p=new E(q),d=t=new E(q),m=f=new E(q);if(null!=e&&(j=!1,s=new E(e),j=a,(!(a=s.isInt())||s.lt(q))&&(j&&L(22,"max denominator "+(a?"out of range":"not an integer"),e),e=!a&&s.c&&U(s,s.e+1,1).gte(q)?s:null)),!g)return h.toString();for(c=r(g),o=p.e=c.length-h.e-1,p.c[0]=S[(u=o%O)<0?O+u:u],e=!e||s.cmp(p)>0?o>0?p:d:s,u=z,z=1/0,s=new E(c),f.c[0]=0;l=C(s,p,0,1),i=t.plus(l.times(m)),1!=i.cmp(e);)t=m,m=i,d=f.plus(l.times(i=d)),f=i,p=s.minus(l.times(i=p)),s=i;return i=C(e.minus(t),m,0,1),f=f.plus(i.times(d)),t=t.plus(i.times(m)),f.s=d.s=h.s,o*=2,n=C(d,m,o,k).minus(h).abs().cmp(C(f,t,o,k).minus(h).abs())<1?[d.toString(),m.toString()]:[f.toString(),t.toString()],z=u,n},T.toNumber=function(){return+this},T.toPower=T.pow=function(e){var n,t,r=d(0>e?-e:+e),i=this;if(!H(e,-y,y,23,"exponent")&&(!isFinite(e)||r>y&&(e/=0)||parseFloat(e)!=e&&!(e=NaN)))return new E(Math.pow(+i,e));for(n=J?p(J/O+2):0,t=new E(q);;){if(r%2){if(t=t.times(i),!t.c)break;n&&t.c.length>n&&(t.c.length=n)}if(r=d(r/2),!r)break;i=i.times(i),n&&i.c&&i.c.length>n&&(i.c.length=n)}return 0>e&&(t=q.div(t)),n?U(t,J,k):t},T.toPrecision=function(e,n){return F(this,null!=e&&H(e,1,A,24,"precision")?0|e:null,n,24)},T.toString=function(e){var n,t=this,i=t.s,o=t.e;return null===o?i?(n="Infinity",0>i&&(n="-"+n)):n="NaN":(n=r(t.c),n=null!=e&&H(e,2,64,25,"base")?D(l(n,o),0|e,10,i):B>=o||o>=$?f(n,o):l(n,o),0>i&&t.c[0]&&(n="-"+n)),n},T.truncated=T.trunc=function(){return U(new E(this),this.e+1,1)},T.valueOf=T.toJSON=function(){var e,n=this,t=n.e;return null===t?n.toString():(e=r(n.c),e=B>=t||t>=$?f(e,t):l(e,t),n.s<0?"-"+e:e)},null!=e&&E.config(e),E}function t(e){var n=0|e;return e>0||e===n?n:n-1}function r(e){for(var n,t,r=1,i=e.length,o=e[0]+"";i>r;){for(n=e[r++]+"",t=O-n.length;t--;n="0"+n);o+=n}for(i=o.length;48===o.charCodeAt(--i););return o.slice(0,i+1||1)}function i(e,n){var t,r,i=e.c,o=n.c,u=e.s,s=n.s,f=e.e,l=n.e;if(!u||!s)return null;if(t=i&&!i[0],r=o&&!o[0],t||r)return t?r?0:-s:u;if(u!=s)return u;if(t=0>u,r=f==l,!i||!o)return r?0:!i^t?1:-1;if(!r)return f>l^t?1:-1;for(s=(f=i.length)<(l=o.length)?f:l,u=0;s>u;u++)if(i[u]!=o[u])return i[u]>o[u]^t?1:-1;return f==l?0:f>l^t?1:-1}function o(e,n,t){return(e=c(e))>=n&&t>=e}function u(e){return"[object Array]"==Object.prototype.toString.call(e)}function s(e,n,t){for(var r,i,o=[0],u=0,s=e.length;s>u;){for(i=o.length;i--;o[i]*=n);for(o[r=0]+=N.indexOf(e.charAt(u++));rt-1&&(null==o[r+1]&&(o[r+1]=0),o[r+1]+=o[r]/t|0,o[r]%=t)}return o.reverse()}function f(e,n){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(0>n?"e":"e+")+n}function l(e,n){var t,r;if(0>n){for(r="0.";++n;r+="0");e=r+e}else if(t=e.length,++n>t){for(r="0",n-=t;--n;r+="0");e+=r}else t>n&&(e=e.slice(0,n)+"."+e.slice(n));return e}function c(e){return e=parseFloat(e),0>e?p(e):d(e)}var a,h,g=/^-?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,p=Math.ceil,d=Math.floor,m=" not a boolean or binary digit",w="rounding mode",v="number type has more than 15 significant digits",N="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_",b=1e14,O=14,y=9007199254740991,S=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],R=1e7,A=1e9;if("undefined"!=typeof crypto&&(a=crypto),"function"==typeof define&&define.amd)define(function(){return n()});else if("undefined"!=typeof module&&module.exports){if(module.exports=n(),!a)try{a=require("crypto")}catch(E){}}else e||(e="undefined"!=typeof self?self:Function("return this")()),e.BigNumber=n()}(this); +!function(e){"use strict";function n(e){function E(e,n){var t,r,i,o,u,s,f=this;if(!(f instanceof E))return j&&L(26,"constructor call without new",e),new E(e,n);if(null!=n&&H(n,2,64,M,"base")){if(n=0|n,s=e+"",10==n)return f=new E(e instanceof E?e:s),U(f,P+f.e+1,k);if((o="number"==typeof e)&&0*e!=0||!new RegExp("^-?"+(t="["+N.slice(0,n)+"]+")+"(?:\\."+t+")?$",37>n?"i":"").test(s))return h(f,s,o,n);o?(f.s=0>1/e?(s=s.slice(1),-1):1,j&&s.replace(/^0\.0*|\./,"").length>15&&L(M,v,e),o=!1):f.s=45===s.charCodeAt(0)?(s=s.slice(1),-1):1,s=D(s,10,n,f.s)}else{if(e instanceof E)return f.s=e.s,f.e=e.e,f.c=(e=e.c)?e.slice():e,void(M=0);if((o="number"==typeof e)&&0*e==0){if(f.s=0>1/e?(e=-e,-1):1,e===~~e){for(r=0,i=e;i>=10;i/=10,r++);return f.e=r,f.c=[e],void(M=0)}s=e+""}else{if(!g.test(s=e+""))return h(f,s,o);f.s=45===s.charCodeAt(0)?(s=s.slice(1),-1):1}}for((r=s.indexOf("."))>-1&&(s=s.replace(".","")),(i=s.search(/e/i))>0?(0>r&&(r=i),r+=+s.slice(i+1),s=s.substring(0,i)):0>r&&(r=s.length),i=0;48===s.charCodeAt(i);i++);for(u=s.length;48===s.charCodeAt(--u););if(s=s.slice(i,u+1))if(u=s.length,o&&j&&u>15&&(e>y||e!==d(e))&&L(M,v,f.s*e),r=r-i-1,r>z)f.c=f.e=null;else if(G>r)f.c=[f.e=0];else{if(f.e=r,f.c=[],i=(r+1)%O,0>r&&(i+=O),u>i){for(i&&f.c.push(+s.slice(0,i)),u-=O;u>i;)f.c.push(+s.slice(i,i+=O));s=s.slice(i),i=O-s.length}else i-=u;for(;i--;s+="0");f.c.push(+s)}else f.c=[f.e=0];M=0}function D(e,n,t,i){var o,u,f,c,a,h,g,p=e.indexOf("."),d=P,m=k;for(37>t&&(e=e.toLowerCase()),p>=0&&(f=J,J=0,e=e.replace(".",""),g=new E(t),a=g.pow(e.length-p),J=f,g.c=s(l(r(a.c),a.e),10,n),g.e=g.c.length),h=s(e,t,n),u=f=h.length;0==h[--f];h.pop());if(!h[0])return"0";if(0>p?--u:(a.c=h,a.e=u,a.s=i,a=C(a,g,d,m,n),h=a.c,c=a.r,u=a.e),o=u+d+1,p=h[o],f=n/2,c=c||0>o||null!=h[o+1],c=4>m?(null!=p||c)&&(0==m||m==(a.s<0?3:2)):p>f||p==f&&(4==m||c||6==m&&1&h[o-1]||m==(a.s<0?8:7)),1>o||!h[0])e=c?l("1",-d):"0";else{if(h.length=o,c)for(--n;++h[--o]>n;)h[o]=0,o||(++u,h.unshift(1));for(f=h.length;!h[--f];);for(p=0,e="";f>=p;e+=N.charAt(h[p++]));e=l(e,u)}return e}function F(e,n,t,i){var o,u,s,c,a;if(t=null!=t&&H(t,0,8,i,w)?0|t:k,!e.c)return e.toString();if(o=e.c[0],s=e.e,null==n)a=r(e.c),a=19==i||24==i&&B>=s?f(a,s):l(a,s);else if(e=U(new E(e),n,t),u=e.e,a=r(e.c),c=a.length,19==i||24==i&&(u>=n||B>=u)){for(;n>c;a+="0",c++);a=f(a,u)}else if(n-=s,a=l(a,u),u+1>c){if(--n>0)for(a+=".";n--;a+="0");}else if(n+=u-c,n>0)for(u+1==c&&(a+=".");n--;a+="0");return e.s<0&&o?"-"+a:a}function _(e,n){var t,r,i=0;for(u(e[0])&&(e=e[0]),t=new E(e[0]);++ie||e>t||e!=c(e))&&L(r,(i||"decimal places")+(n>e||e>t?" out of range":" not an integer"),e),!0}function I(e,n,t){for(var r=1,i=n.length;!n[--i];n.pop());for(i=n[0];i>=10;i/=10,r++);return(t=r+t*O-1)>z?e.c=e.e=null:G>t?e.c=[e.e=0]:(e.e=t,e.c=n),e}function L(e,n,t){var r=new Error(["new BigNumber","cmp","config","div","divToInt","eq","gt","gte","lt","lte","minus","mod","plus","precision","random","round","shift","times","toDigits","toExponential","toFixed","toFormat","toFraction","pow","toPrecision","toString","BigNumber"][e]+"() "+n+": "+t);throw r.name="BigNumber Error",M=0,r}function U(e,n,t,r){var i,o,u,s,f,l,c,a=e.c,h=S;if(a){e:{for(i=1,s=a[0];s>=10;s/=10,i++);if(o=n-i,0>o)o+=O,u=n,f=a[l=0],c=f/h[i-u-1]%10|0;else if(l=p((o+1)/O),l>=a.length){if(!r)break e;for(;a.length<=l;a.push(0));f=c=0,i=1,o%=O,u=o-O+1}else{for(f=s=a[l],i=1;s>=10;s/=10,i++);o%=O,u=o-O+i,c=0>u?0:f/h[i-u-1]%10|0}if(r=r||0>n||null!=a[l+1]||(0>u?f:f%h[i-u-1]),r=4>t?(c||r)&&(0==t||t==(e.s<0?3:2)):c>5||5==c&&(4==t||r||6==t&&(o>0?u>0?f/h[i-u]:0:a[l-1])%10&1||t==(e.s<0?8:7)),1>n||!a[0])return a.length=0,r?(n-=e.e+1,a[0]=h[(O-n%O)%O],e.e=-n||0):a[0]=e.e=0,e;if(0==o?(a.length=l,s=1,l--):(a.length=l+1,s=h[O-o],a[l]=u>0?d(f/h[i-u]%h[u])*s:0),r)for(;;){if(0==l){for(o=1,u=a[0];u>=10;u/=10,o++);for(u=a[0]+=s,s=1;u>=10;u/=10,s++);o!=s&&(e.e++,a[0]==b&&(a[0]=1));break}if(a[l]+=s,a[l]!=b)break;a[l--]=0,s=1}for(o=a.length;0===a[--o];a.pop());}e.e>z?e.c=e.e=null:e.et?null!=(e=i[t++]):void 0};return f(n="DECIMAL_PLACES")&&H(e,0,A,2,n)&&(P=0|e),r[n]=P,f(n="ROUNDING_MODE")&&H(e,0,8,2,n)&&(k=0|e),r[n]=k,f(n="EXPONENTIAL_AT")&&(u(e)?H(e[0],-A,0,2,n)&&H(e[1],0,A,2,n)&&(B=0|e[0],$=0|e[1]):H(e,-A,A,2,n)&&(B=-($=0|(0>e?-e:e)))),r[n]=[B,$],f(n="RANGE")&&(u(e)?H(e[0],-A,-1,2,n)&&H(e[1],1,A,2,n)&&(G=0|e[0],z=0|e[1]):H(e,-A,A,2,n)&&(0|e?G=-(z=0|(0>e?-e:e)):j&&L(2,n+" cannot be zero",e))),r[n]=[G,z],f(n="ERRORS")&&(e===!!e||1===e||0===e?(M=0,H=(j=!!e)?x:o):j&&L(2,n+m,e)),r[n]=j,f(n="CRYPTO")&&(e===!!e||1===e||0===e?(V=!(!e||!a),e&&!V&&j&&L(2,"crypto unavailable",a)):j&&L(2,n+m,e)),r[n]=V,f(n="MODULO_MODE")&&H(e,0,9,2,n)&&(W=0|e),r[n]=W,f(n="POW_PRECISION")&&H(e,0,A,2,n)&&(J=0|e),r[n]=J,f(n="FORMAT")&&("object"==typeof e?X=e:j&&L(2,n+" not an object",e)),r[n]=X,r},E.max=function(){return _(arguments,T.lt)},E.min=function(){return _(arguments,T.gt)},E.random=function(){var e=9007199254740992,n=Math.random()*e&2097151?function(){return d(Math.random()*e)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)};return function(e){var t,r,i,o,u,s=0,f=[],l=new E(q);if(e=null!=e&&H(e,0,A,14)?0|e:P,o=p(e/O),V)if(a&&a.getRandomValues){for(t=a.getRandomValues(new Uint32Array(o*=2));o>s;)u=131072*t[s]+(t[s+1]>>>11),u>=9e15?(r=a.getRandomValues(new Uint32Array(2)),t[s]=r[0],t[s+1]=r[1]):(f.push(u%1e14),s+=2);s=o/2}else if(a&&a.randomBytes){for(t=a.randomBytes(o*=7);o>s;)u=281474976710656*(31&t[s])+1099511627776*t[s+1]+4294967296*t[s+2]+16777216*t[s+3]+(t[s+4]<<16)+(t[s+5]<<8)+t[s+6],u>=9e15?a.randomBytes(7).copy(t,s):(f.push(u%1e14),s+=7);s=o/7}else j&&L(14,"crypto unavailable",a);if(!s)for(;o>s;)u=n(),9e15>u&&(f[s++]=u%1e14);for(o=f[--s],e%=O,o&&e&&(u=S[O-e],f[s]=d(o/u)*u);0===f[s];f.pop(),s--);if(0>s)f=[i=0];else{for(i=-1;0===f[0];f.shift(),i-=O);for(s=1,u=f[0];u>=10;u/=10,s++);O>s&&(i-=O-s)}return l.e=i,l.c=f,l}}(),C=function(){function e(e,n,t){var r,i,o,u,s=0,f=e.length,l=n%R,c=n/R|0;for(e=e.slice();f--;)o=e[f]%R,u=e[f]/R|0,r=c*o+u*l,i=l*o+r%R*R+s,s=(i/t|0)+(r/R|0)+c*u,e[f]=i%t;return s&&e.unshift(s),e}function n(e,n,t,r){var i,o;if(t!=r)o=t>r?1:-1;else for(i=o=0;t>i;i++)if(e[i]!=n[i]){o=e[i]>n[i]?1:-1;break}return o}function r(e,n,t,r){for(var i=0;t--;)e[t]-=i,i=e[t]1;e.shift());}return function(i,o,u,s,f){var l,c,a,h,g,p,m,w,v,N,y,S,R,A,D,F,_,x=i.s==o.s?1:-1,I=i.c,L=o.c;if(!(I&&I[0]&&L&&L[0]))return new E(i.s&&o.s&&(I?!L||I[0]!=L[0]:L)?I&&0==I[0]||!L?0*x:x/0:NaN);for(w=new E(x),v=w.c=[],c=i.e-o.e,x=u+c+1,f||(f=b,c=t(i.e/O)-t(o.e/O),x=x/O|0),a=0;L[a]==(I[a]||0);a++);if(L[a]>(I[a]||0)&&c--,0>x)v.push(1),h=!0;else{for(A=I.length,F=L.length,a=0,x+=2,g=d(f/(L[0]+1)),g>1&&(L=e(L,g,f),I=e(I,g,f),F=L.length,A=I.length),R=F,N=I.slice(0,F),y=N.length;F>y;N[y++]=0);_=L.slice(),_.unshift(0),D=L[0],L[1]>=f/2&&D++;do{if(g=0,l=n(L,N,F,y),0>l){if(S=N[0],F!=y&&(S=S*f+(N[1]||0)),g=d(S/D),g>1)for(g>=f&&(g=f-1),p=e(L,g,f),m=p.length,y=N.length;1==n(p,N,m,y);)g--,r(p,m>F?_:L,m,f),m=p.length,l=1;else 0==g&&(l=g=1),p=L.slice(),m=p.length;if(y>m&&p.unshift(0),r(N,p,y,f),y=N.length,-1==l)for(;n(L,N,F,y)<1;)g++,r(N,y>F?_:L,y,f),y=N.length}else 0===l&&(g++,N=[0]);v[a++]=g,N[0]?N[y++]=I[R]||0:(N=[I[R]],y=1)}while((R++=10;x/=10,a++);U(w,u+(w.e=a+c*O-1)+1,s,h)}else w.e=c,w.r=+h;return w}}(),h=function(){var e=/^(-?)0([xbo])(?=\w[\w.]*$)/i,n=/^([^.]+)\.$/,t=/^\.([^.]+)$/,r=/^-?(Infinity|NaN)$/,i=/^\s*\+(?=[\w.])|^\s+|\s+$/g;return function(o,u,s,f){var l,c=s?u:u.replace(i,"");if(r.test(c))o.s=isNaN(c)?null:0>c?-1:1;else{if(!s&&(c=c.replace(e,function(e,n,t){return l="x"==(t=t.toLowerCase())?16:"b"==t?2:8,f&&f!=l?e:n}),f&&(l=f,c=c.replace(n,"$1").replace(t,"0.$1")),u!=c))return new E(c,l);j&&L(M,"not a"+(f?" base "+f:"")+" number",u),o.s=null}o.c=o.e=null,M=0}}(),T.absoluteValue=T.abs=function(){var e=new E(this);return e.s<0&&(e.s=1),e},T.ceil=function(){return U(new E(this),this.e+1,2)},T.comparedTo=T.cmp=function(e,n){return M=1,i(this,new E(e,n))},T.decimalPlaces=T.dp=function(){var e,n,r=this.c;if(!r)return null;if(e=((n=r.length-1)-t(this.e/O))*O,n=r[n])for(;n%10==0;n/=10,e--);return 0>e&&(e=0),e},T.dividedBy=T.div=function(e,n){return M=3,C(this,new E(e,n),P,k)},T.dividedToIntegerBy=T.divToInt=function(e,n){return M=4,C(this,new E(e,n),0,1)},T.equals=T.eq=function(e,n){return M=5,0===i(this,new E(e,n))},T.floor=function(){return U(new E(this),this.e+1,3)},T.greaterThan=T.gt=function(e,n){return M=6,i(this,new E(e,n))>0},T.greaterThanOrEqualTo=T.gte=function(e,n){return M=7,1===(n=i(this,new E(e,n)))||0===n},T.isFinite=function(){return!!this.c},T.isInteger=T.isInt=function(){return!!this.c&&t(this.e/O)>this.c.length-2},T.isNaN=function(){return!this.s},T.isNegative=T.isNeg=function(){return this.s<0},T.isZero=function(){return!!this.c&&0==this.c[0]},T.lessThan=T.lt=function(e,n){return M=8,i(this,new E(e,n))<0},T.lessThanOrEqualTo=T.lte=function(e,n){return M=9,-1===(n=i(this,new E(e,n)))||0===n},T.minus=T.sub=function(e,n){var r,i,o,u,s=this,f=s.s;if(M=10,e=new E(e,n),n=e.s,!f||!n)return new E(NaN);if(f!=n)return e.s=-n,s.plus(e);var l=s.e/O,c=e.e/O,a=s.c,h=e.c;if(!l||!c){if(!a||!h)return a?(e.s=-n,e):new E(h?s:NaN);if(!a[0]||!h[0])return h[0]?(e.s=-n,e):new E(a[0]?s:3==k?-0:0)}if(l=t(l),c=t(c),a=a.slice(),f=l-c){for((u=0>f)?(f=-f,o=a):(c=l,o=h),o.reverse(),n=f;n--;o.push(0));o.reverse()}else for(i=(u=(f=a.length)<(n=h.length))?f:n,f=n=0;i>n;n++)if(a[n]!=h[n]){u=a[n]0)for(;n--;a[r++]=0);for(n=b-1;i>f;){if(a[--i]0?(s=u,r=l):(o=-o,r=f),r.reverse();o--;r.push(0));r.reverse()}for(o=f.length,n=l.length,0>o-n&&(r=l,l=f,f=r,n=o),o=0;n;)o=(f[--n]=f[n]+l[n]+o)/b|0,f[n]%=b;return o&&(f.unshift(o),++s),I(e,f,s)},T.precision=T.sd=function(e){var n,t,r=this,i=r.c;if(null!=e&&e!==!!e&&1!==e&&0!==e&&(j&&L(13,"argument"+m,e),e!=!!e&&(e=null)),!i)return null;if(t=i.length-1,n=t*O+1,t=i[t]){for(;t%10==0;t/=10,n--);for(t=i[0];t>=10;t/=10,n++);}return e&&r.e+1>n&&(n=r.e+1),n},T.round=function(e,n){var t=new E(this);return(null==e||H(e,0,A,15))&&U(t,~~e+this.e+1,null!=n&&H(n,0,8,15,w)?0|n:k),t},T.shift=function(e){var n=this;return H(e,-y,y,16,"argument")?n.times("1e"+c(e)):new E(n.c&&n.c[0]&&(-y>e||e>y)?n.s*(0>e?0:1/0):n)},T.squareRoot=T.sqrt=function(){var e,n,i,o,u,s=this,f=s.c,l=s.s,c=s.e,a=P+4,h=new E("0.5");if(1!==l||!f||!f[0])return new E(!l||0>l&&(!f||f[0])?NaN:f?s:1/0);if(l=Math.sqrt(+s),0==l||l==1/0?(n=r(f),(n.length+c)%2==0&&(n+="0"),l=Math.sqrt(n),c=t((c+1)/2)-(0>c||c%2),l==1/0?n="1e"+c:(n=l.toExponential(),n=n.slice(0,n.indexOf("e")+1)+c),i=new E(n)):i=new E(l+""),i.c[0])for(c=i.e,l=c+a,3>l&&(l=0);;)if(u=i,i=h.times(u.plus(C(s,u,a,1))),r(u.c).slice(0,l)===(n=r(i.c)).slice(0,l)){if(i.el&&(d=N,N=y,y=d,o=l,l=h,h=o),o=l+h,d=[];o--;d.push(0));for(m=b,w=R,o=h;--o>=0;){for(r=0,g=y[o]%w,p=y[o]/w|0,s=l,u=o+s;u>o;)c=N[--s]%w,a=N[s]/w|0,f=p*c+a*g,c=g*c+f%w*w+d[u]+r,r=(c/m|0)+(f/w|0)+p*a,d[u--]=c%m;d[u]=r}return r?++i:d.shift(),I(e,d,i)},T.toDigits=function(e,n){var t=new E(this);return e=null!=e&&H(e,1,A,18,"precision")?0|e:null,n=null!=n&&H(n,0,8,18,w)?0|n:k,e?U(t,e,n):t},T.toExponential=function(e,n){return F(this,null!=e&&H(e,0,A,19)?~~e+1:null,n,19)},T.toFixed=function(e,n){return F(this,null!=e&&H(e,0,A,20)?~~e+this.e+1:null,n,20)},T.toFormat=function(e,n){var t=F(this,null!=e&&H(e,0,A,21)?~~e+this.e+1:null,n,21);if(this.c){var r,i=t.split("."),o=+X.groupSize,u=+X.secondaryGroupSize,s=X.groupSeparator,f=i[0],l=i[1],c=this.s<0,a=c?f.slice(1):f,h=a.length;if(u&&(r=o,o=u,u=r,h-=r),o>0&&h>0){for(r=h%o||o,f=a.substr(0,r);h>r;r+=o)f+=s+a.substr(r,o);u>0&&(f+=s+a.slice(r)),c&&(f="-"+f)}t=l?f+X.decimalSeparator+((u=+X.fractionGroupSize)?l.replace(new RegExp("\\d{"+u+"}\\B","g"),"$&"+X.fractionGroupSeparator):l):f}return t},T.toFraction=function(e){var n,t,i,o,u,s,f,l,c,a=j,h=this,g=h.c,p=new E(q),d=t=new E(q),m=f=new E(q);if(null!=e&&(j=!1,s=new E(e),j=a,(!(a=s.isInt())||s.lt(q))&&(j&&L(22,"max denominator "+(a?"out of range":"not an integer"),e),e=!a&&s.c&&U(s,s.e+1,1).gte(q)?s:null)),!g)return h.toString();for(c=r(g),o=p.e=c.length-h.e-1,p.c[0]=S[(u=o%O)<0?O+u:u],e=!e||s.cmp(p)>0?o>0?p:d:s,u=z,z=1/0,s=new E(c),f.c[0]=0;l=C(s,p,0,1),i=t.plus(l.times(m)),1!=i.cmp(e);)t=m,m=i,d=f.plus(l.times(i=d)),f=i,p=s.minus(l.times(i=p)),s=i;return i=C(e.minus(t),m,0,1),f=f.plus(i.times(d)),t=t.plus(i.times(m)),f.s=d.s=h.s,o*=2,n=C(d,m,o,k).minus(h).abs().cmp(C(f,t,o,k).minus(h).abs())<1?[d.toString(),m.toString()]:[f.toString(),t.toString()],z=u,n},T.toNumber=function(){return+this},T.toPower=T.pow=function(e,n){var t,r,i,o=d(0>e?-e:+e),u=this;if(null!=n&&(M=23,n=new E(n)),!H(e,-y,y,23,"exponent")&&(!isFinite(e)||o>y&&(e/=0)||parseFloat(e)!=e&&!(e=NaN))||0==e)return t=Math.pow(+u,e),new E(n?t%n:t);for(n?e>1&&u.gt(q)&&u.isInt()&&n.gt(q)&&n.isInt()?u=u.mod(n):(i=n,n=null):J&&(t=p(J/O+2)),r=new E(q);;){if(o%2){if(r=r.times(u),!r.c)break;t?r.c.length>t&&(r.c.length=t):n&&(r=r.mod(n))}if(o=d(o/2),!o)break;u=u.times(u),t?u.c&&u.c.length>t&&(u.c.length=t):n&&(u=u.mod(n))}return n?r:(0>e&&(r=q.div(r)),i?r.mod(i):t?U(r,J,k):r)},T.toPrecision=function(e,n){return F(this,null!=e&&H(e,1,A,24,"precision")?0|e:null,n,24)},T.toString=function(e){var n,t=this,i=t.s,o=t.e;return null===o?i?(n="Infinity",0>i&&(n="-"+n)):n="NaN":(n=r(t.c),n=null!=e&&H(e,2,64,25,"base")?D(l(n,o),0|e,10,i):B>=o||o>=$?f(n,o):l(n,o),0>i&&t.c[0]&&(n="-"+n)),n},T.truncated=T.trunc=function(){return U(new E(this),this.e+1,1)},T.valueOf=T.toJSON=function(){var e,n=this,t=n.e;return null===t?n.toString():(e=r(n.c),e=B>=t||t>=$?f(e,t):l(e,t),n.s<0?"-"+e:e)},null!=e&&E.config(e),E}function t(e){var n=0|e;return e>0||e===n?n:n-1}function r(e){for(var n,t,r=1,i=e.length,o=e[0]+"";i>r;){for(n=e[r++]+"",t=O-n.length;t--;n="0"+n);o+=n}for(i=o.length;48===o.charCodeAt(--i););return o.slice(0,i+1||1)}function i(e,n){var t,r,i=e.c,o=n.c,u=e.s,s=n.s,f=e.e,l=n.e;if(!u||!s)return null;if(t=i&&!i[0],r=o&&!o[0],t||r)return t?r?0:-s:u;if(u!=s)return u;if(t=0>u,r=f==l,!i||!o)return r?0:!i^t?1:-1;if(!r)return f>l^t?1:-1;for(s=(f=i.length)<(l=o.length)?f:l,u=0;s>u;u++)if(i[u]!=o[u])return i[u]>o[u]^t?1:-1;return f==l?0:f>l^t?1:-1}function o(e,n,t){return(e=c(e))>=n&&t>=e}function u(e){return"[object Array]"==Object.prototype.toString.call(e)}function s(e,n,t){for(var r,i,o=[0],u=0,s=e.length;s>u;){for(i=o.length;i--;o[i]*=n);for(o[r=0]+=N.indexOf(e.charAt(u++));rt-1&&(null==o[r+1]&&(o[r+1]=0),o[r+1]+=o[r]/t|0,o[r]%=t)}return o.reverse()}function f(e,n){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(0>n?"e":"e+")+n}function l(e,n){var t,r;if(0>n){for(r="0.";++n;r+="0");e=r+e}else if(t=e.length,++n>t){for(r="0",n-=t;--n;r+="0");e+=r}else t>n&&(e=e.slice(0,n)+"."+e.slice(n));return e}function c(e){return e=parseFloat(e),0>e?p(e):d(e)}var a,h,g=/^-?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,p=Math.ceil,d=Math.floor,m=" not a boolean or binary digit",w="rounding mode",v="number type has more than 15 significant digits",N="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_",b=1e14,O=14,y=9007199254740991,S=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],R=1e7,A=1e9;if("undefined"!=typeof crypto&&(a=crypto),"function"==typeof define&&define.amd)define(function(){return n()});else if("undefined"!=typeof module&&module.exports){if(module.exports=n(),!a)try{a=require("crypto")}catch(E){}}else e||(e="undefined"!=typeof self?self:Function("return this")()),e.BigNumber=n()}(this); //# sourceMappingURL=bignumber.js.map \ No newline at end of file diff --git a/doc/API.html b/doc/API.html index c269184..1c082a2 100644 --- a/doc/API.html +++ b/doc/API.html @@ -590,7 +590,8 @@ BigNumber.config({ MODULO_MODE: 9 }) // equivalent Default value: 100
- The maximum number of significant digits of the result of the power operation. + The maximum number of significant digits of the result of the power operation + (unless a modulus is specified).
If set to 0, the number of signifcant digits will not be limited.
See toPower.
@@ -1601,14 +1602,15 @@ z = new BigNumber(-0) -
toPower.pow(n) ⇒ BigNumber
+
toPower.pow(n [, m]) ⇒ BigNumber

n: number: integer, - -9007199254740991 to 9007199254740991 inclusive + -9007199254740991 to 9007199254740991 inclusive
+ m: number|string|BigNumber

Returns a BigNumber whose value is the value of this BigNumber raised to the power - n. + n, and optionally modulo a modulus m.

If n is negative the result is rounded according to the current @@ -1632,7 +1634,7 @@ z = new BigNumber(-0) e.g. 123.45610000 has over 50000 digits, the number of significant digits calculated is limited to the value of the POW_PRECISION setting (default value: - 100). + 100) unless a modulus m is specified.

Set POW_PRECISION to 0 for an @@ -1644,6 +1646,13 @@ z = new BigNumber(-0) DECIMAL_PLACES (but not to more than POW_PRECISION significant digits).

+

+ If m is specified and the value of m, n and this + BigNumber are positive integers, then a fast modular exponentiation algorithm is used, + otherwise if any of the values is not a positive integer the operation will simply be + performed as x.toPower(n).modulo(m) with a + POW_PRECISION of 0. +

 Math.pow(0.7, 2)                // 0.48999999999999994
 x = new BigNumber(0.7)
diff --git a/test/pow.js b/test/pow.js
index d5ae018..cf2065a 100644
--- a/test/pow.js
+++ b/test/pow.js
@@ -50,9 +50,9 @@ var count = (function pow(BigNumber) {
         }
     }
 
-    function T(expected, n, exp) {
-        assert(String(expected), String(new BigNumber(n).pow(exp)))
-    }
+    var T = function (expected, n, exp) {
+        assert(String(expected), String(new BigNumber(n).pow(exp)));
+    };
 
     log('\n Testing pow...');
 
@@ -735,7 +735,7 @@ var count = (function pow(BigNumber) {
     T('-155568095557812224', '-14', 15);
     T('2.18753957001465798602093911444285519704647324430365134831536108015616e+44', '4954.46', 12);
 
-    BigNumber.config({ EXPONENTIAL_AT: 0 });
+    BigNumber.config({EXPONENTIAL_AT: 0});
 
     T('2e+0', 2, '1.0');
     T('1.6e+1', 2, '4.00000000');
@@ -918,8 +918,8 @@ var count = (function pow(BigNumber) {
     assertException(function () {new BigNumber('2').pow('-Infinity')}, ".pow('-Infinity')");
 
     assertException(function () {new BigNumber(1).pow(MAX_POWER + 1)}, ".pow(MAX_POWER + 1)");
-    T(1, 1, MAX_POWER);
 
+    T(1, 1, MAX_POWER);
     T('16', 2, '4.00000000');
     T('0.0625', 2, -4);
 
@@ -1142,6 +1142,1125 @@ var count = (function pow(BigNumber) {
     T('0e+0', '-8645', -30);
     T('0e+0', '7.24173993', -23);
 
+    // toPower with modulus
+
+    BigNumber.config({EXPONENTIAL_AT: 1E9, ERRORS: false, DECIMAL_PLACES: 17, ROUNDING_MODE: 4});
+
+    T = function (expected, n, exp, mod) {
+        assert(String(expected), String(new BigNumber(n).pow(exp, mod)));
+    };
+
+    T('0', '-1', -1, '-1');
+    T('-1', '-1', -1, '-3');
+    T('-1', '-1', -1, '-5.7');
+    T('-1', '-1', -1, '-Infinity');
+    T('NaN', '-1', -1, '0');
+    T('0', '-1', -1, '1');
+    T('-1', '-1', -1, '3');
+    T('-1', '-1', -1, '5.7');
+    T('-1', '-1', -1, 'Infinity');
+    T('NaN', '-1', -1, 'NaN');
+    T('0', '-1', -3, '-1');
+    T('-1', '-1', -3, '-3');
+    T('-1', '-1', -3, '-5.7');
+    T('-1', '-1', -3, '-Infinity');
+    T('NaN', '-1', -3, '0');
+    T('0', '-1', -3, '1');
+    T('-1', '-1', -3, '3');
+    T('-1', '-1', -3, '5.7');
+    T('-1', '-1', -3, 'Infinity');
+    T('NaN', '-1', -3, 'NaN');
+    T('0', '-1', -5.7, '-1');
+    T('-1', '-1', -5.7, '-3');
+    T('-1', '-1', -5.7, '-5.7');
+    T('-1', '-1', -5.7, '-Infinity');
+    T('NaN', '-1', -5.7, '0');
+    T('0', '-1', -5.7, '1');
+    T('-1', '-1', -5.7, '3');
+    T('-1', '-1', -5.7, '5.7');
+    T('-1', '-1', -5.7, 'Infinity');
+    T('NaN', '-1', -5.7, 'NaN');
+    T('NaN', '-1', -Infinity, '-1');
+    T('NaN', '-1', -Infinity, '-3');
+    T('NaN', '-1', -Infinity, '-5.7');
+    T('NaN', '-1', -Infinity, '-Infinity');
+    T('NaN', '-1', -Infinity, '0');
+    T('NaN', '-1', -Infinity, '1');
+    T('NaN', '-1', -Infinity, '3');
+    T('NaN', '-1', -Infinity, '5.7');
+    T('NaN', '-1', -Infinity, 'Infinity');
+    T('NaN', '-1', -Infinity, 'NaN');
+    T('0', '-1', 0, '-1');
+    T('1', '-1', 0, '-3');
+    T('1', '-1', 0, '-5.7');
+    T('1', '-1', 0, '-Infinity');
+    T('NaN', '-1', 0, '0');
+    T('0', '-1', 0, '1');
+    T('1', '-1', 0, '3');
+    T('1', '-1', 0, '5.7');
+    T('1', '-1', 0, 'Infinity');
+    T('NaN', '-1', 0, 'NaN');
+    T('0', '-1', 1, '-1');
+    T('-1', '-1', 1, '-3');
+    T('-1', '-1', 1, '-5.7');
+    T('-1', '-1', 1, '-Infinity');
+    T('NaN', '-1', 1, '0');
+    T('0', '-1', 1, '1');
+    T('-1', '-1', 1, '3');
+    T('-1', '-1', 1, '5.7');
+    T('-1', '-1', 1, 'Infinity');
+    T('NaN', '-1', 1, 'NaN');
+    T('0', '-1', 3, '-1');
+    T('-1', '-1', 3, '-3');
+    T('-1', '-1', 3, '-5.7');
+    T('-1', '-1', 3, '-Infinity');
+    T('NaN', '-1', 3, '0');
+    T('0', '-1', 3, '1');
+    T('-1', '-1', 3, '3');
+    T('-1', '-1', 3, '5.7');
+    T('-1', '-1', 3, 'Infinity');
+    T('NaN', '-1', 3, 'NaN');
+    T('0', '-1', 5.7, '-1');
+    T('-1', '-1', 5.7, '-3');
+    T('-1', '-1', 5.7, '-5.7');
+    T('-1', '-1', 5.7, '-Infinity');
+    T('NaN', '-1', 5.7, '0');
+    T('0', '-1', 5.7, '1');
+    T('-1', '-1', 5.7, '3');
+    T('-1', '-1', 5.7, '5.7');
+    T('-1', '-1', 5.7, 'Infinity');
+    T('NaN', '-1', 5.7, 'NaN');
+    T('NaN', '-1', Infinity, '-1');
+    T('NaN', '-1', Infinity, '-3');
+    T('NaN', '-1', Infinity, '-5.7');
+    T('NaN', '-1', Infinity, '-Infinity');
+    T('NaN', '-1', Infinity, '0');
+    T('NaN', '-1', Infinity, '1');
+    T('NaN', '-1', Infinity, '3');
+    T('NaN', '-1', Infinity, '5.7');
+    T('NaN', '-1', Infinity, 'Infinity');
+    T('NaN', '-1', Infinity, 'NaN');
+    T('NaN', '-1', NaN, '-1');
+    T('NaN', '-1', NaN, '-3');
+    T('NaN', '-1', NaN, '-5.7');
+    T('NaN', '-1', NaN, '-Infinity');
+    T('NaN', '-1', NaN, '0');
+    T('NaN', '-1', NaN, '1');
+    T('NaN', '-1', NaN, '3');
+    T('NaN', '-1', NaN, '5.7');
+    T('NaN', '-1', NaN, 'Infinity');
+    T('NaN', '-1', NaN, 'NaN');
+    T('-0.33333333333333333', '-3', -1, '-1');
+    T('-0.33333333333333333', '-3', -1, '-3');
+    T('-0.33333333333333333', '-3', -1, '-5.7');
+    T('-0.33333333333333333', '-3', -1, '-Infinity');
+    T('NaN', '-3', -1, '0');
+    T('-0.33333333333333333', '-3', -1, '1');
+    T('-0.33333333333333333', '-3', -1, '3');
+    T('-0.33333333333333333', '-3', -1, '5.7');
+    T('-0.33333333333333333', '-3', -1, 'Infinity');
+    T('NaN', '-3', -1, 'NaN');
+    T('-0.03703703703703704', '-3', -3, '-1');
+    T('-0.03703703703703704', '-3', -3, '-3');
+    T('-0.03703703703703704', '-3', -3, '-5.7');
+    T('-0.03703703703703704', '-3', -3, '-Infinity');
+    T('NaN', '-3', -3, '0');
+    T('-0.03703703703703704', '-3', -3, '1');
+    T('-0.03703703703703704', '-3', -3, '3');
+    T('-0.03703703703703704', '-3', -3, '5.7');
+    T('-0.03703703703703704', '-3', -3, 'Infinity');
+    T('NaN', '-3', -3, 'NaN');
+    T('-0.00411522633744856', '-3', -5.7, '-1');
+    T('-0.00411522633744856', '-3', -5.7, '-3');
+    T('-0.00411522633744856', '-3', -5.7, '-5.7');
+    T('-0.00411522633744856', '-3', -5.7, '-Infinity');
+    T('NaN', '-3', -5.7, '0');
+    T('-0.00411522633744856', '-3', -5.7, '1');
+    T('-0.00411522633744856', '-3', -5.7, '3');
+    T('-0.00411522633744856', '-3', -5.7, '5.7');
+    T('-0.00411522633744856', '-3', -5.7, 'Infinity');
+    T('NaN', '-3', -5.7, 'NaN');
+    T('0', '-3', -Infinity, '-1');
+    T('0', '-3', -Infinity, '-3');
+    T('0', '-3', -Infinity, '-5.7');
+    T('0', '-3', -Infinity, '-Infinity');
+    T('NaN', '-3', -Infinity, '0');
+    T('0', '-3', -Infinity, '1');
+    T('0', '-3', -Infinity, '3');
+    T('0', '-3', -Infinity, '5.7');
+    T('0', '-3', -Infinity, 'Infinity');
+    T('NaN', '-3', -Infinity, 'NaN');
+    T('0', '-3', 0, '-1');
+    T('1', '-3', 0, '-3');
+    T('1', '-3', 0, '-5.7');
+    T('1', '-3', 0, '-Infinity');
+    T('NaN', '-3', 0, '0');
+    T('0', '-3', 0, '1');
+    T('1', '-3', 0, '3');
+    T('1', '-3', 0, '5.7');
+    T('1', '-3', 0, 'Infinity');
+    T('NaN', '-3', 0, 'NaN');
+    T('0', '-3', 1, '-1');
+    T('0', '-3', 1, '-3');
+    T('-3', '-3', 1, '-5.7');
+    T('-3', '-3', 1, '-Infinity');
+    T('NaN', '-3', 1, '0');
+    T('0', '-3', 1, '1');
+    T('0', '-3', 1, '3');
+    T('-3', '-3', 1, '5.7');
+    T('-3', '-3', 1, 'Infinity');
+    T('NaN', '-3', 1, 'NaN');
+    T('0', '-3', 3, '-1');
+    T('0', '-3', 3, '-3');
+    T('-4.2', '-3', 3, '-5.7');
+    T('-27', '-3', 3, '-Infinity');
+    T('NaN', '-3', 3, '0');
+    T('0', '-3', 3, '1');
+    T('0', '-3', 3, '3');
+    T('-4.2', '-3', 3, '5.7');
+    T('-27', '-3', 3, 'Infinity');
+    T('NaN', '-3', 3, 'NaN');
+    T('0', '-3', 5.7, '-1');
+    T('0', '-3', 5.7, '-3');
+    T('-3.6', '-3', 5.7, '-5.7');
+    T('-243', '-3', 5.7, '-Infinity');
+    T('NaN', '-3', 5.7, '0');
+    T('0', '-3', 5.7, '1');
+    T('0', '-3', 5.7, '3');
+    T('-3.6', '-3', 5.7, '5.7');
+    T('-243', '-3', 5.7, 'Infinity');
+    T('NaN', '-3', 5.7, 'NaN');
+    T('NaN', '-3', Infinity, '-1');
+    T('NaN', '-3', Infinity, '-3');
+    T('NaN', '-3', Infinity, '-5.7');
+    T('NaN', '-3', Infinity, '-Infinity');
+    T('NaN', '-3', Infinity, '0');
+    T('NaN', '-3', Infinity, '1');
+    T('NaN', '-3', Infinity, '3');
+    T('NaN', '-3', Infinity, '5.7');
+    T('NaN', '-3', Infinity, 'Infinity');
+    T('NaN', '-3', Infinity, 'NaN');
+    T('NaN', '-3', NaN, '-1');
+    T('NaN', '-3', NaN, '-3');
+    T('NaN', '-3', NaN, '-5.7');
+    T('NaN', '-3', NaN, '-Infinity');
+    T('NaN', '-3', NaN, '0');
+    T('NaN', '-3', NaN, '1');
+    T('NaN', '-3', NaN, '3');
+    T('NaN', '-3', NaN, '5.7');
+    T('NaN', '-3', NaN, 'Infinity');
+    T('NaN', '-3', NaN, 'NaN');
+    T('-0.17543859649122807', '-5.7', -1, '-1');
+    T('-0.17543859649122807', '-5.7', -1, '-3');
+    T('-0.17543859649122807', '-5.7', -1, '-5.7');
+    T('-0.17543859649122807', '-5.7', -1, '-Infinity');
+    T('NaN', '-5.7', -1, '0');
+    T('-0.17543859649122807', '-5.7', -1, '1');
+    T('-0.17543859649122807', '-5.7', -1, '3');
+    T('-0.17543859649122807', '-5.7', -1, '5.7');
+    T('-0.17543859649122807', '-5.7', -1, 'Infinity');
+    T('NaN', '-5.7', -1, 'NaN');
+    T('-0.00539977212961613', '-5.7', -3, '-1');
+    T('-0.00539977212961613', '-5.7', -3, '-3');
+    T('-0.00539977212961613', '-5.7', -3, '-5.7');
+    T('-0.00539977212961613', '-5.7', -3, '-Infinity');
+    T('NaN', '-5.7', -3, '0');
+    T('-0.00539977212961613', '-5.7', -3, '1');
+    T('-0.00539977212961613', '-5.7', -3, '3');
+    T('-0.00539977212961613', '-5.7', -3, '5.7');
+    T('-0.00539977212961613', '-5.7', -3, 'Infinity');
+    T('NaN', '-5.7', -3, 'NaN');
+    T('-0.00016619797259514', '-5.7', -5.7, '-1');
+    T('-0.00016619797259514', '-5.7', -5.7, '-3');
+    T('-0.00016619797259514', '-5.7', -5.7, '-5.7');
+    T('-0.00016619797259514', '-5.7', -5.7, '-Infinity');
+    T('NaN', '-5.7', -5.7, '0');
+    T('-0.00016619797259514', '-5.7', -5.7, '1');
+    T('-0.00016619797259514', '-5.7', -5.7, '3');
+    T('-0.00016619797259514', '-5.7', -5.7, '5.7');
+    T('-0.00016619797259514', '-5.7', -5.7, 'Infinity');
+    T('NaN', '-5.7', -5.7, 'NaN');
+    T('0', '-5.7', -Infinity, '-1');
+    T('0', '-5.7', -Infinity, '-3');
+    T('0', '-5.7', -Infinity, '-5.7');
+    T('0', '-5.7', -Infinity, '-Infinity');
+    T('NaN', '-5.7', -Infinity, '0');
+    T('0', '-5.7', -Infinity, '1');
+    T('0', '-5.7', -Infinity, '3');
+    T('0', '-5.7', -Infinity, '5.7');
+    T('0', '-5.7', -Infinity, 'Infinity');
+    T('NaN', '-5.7', -Infinity, 'NaN');
+    T('0', '-5.7', 0, '-1');
+    T('1', '-5.7', 0, '-3');
+    T('1', '-5.7', 0, '-5.7');
+    T('1', '-5.7', 0, '-Infinity');
+    T('NaN', '-5.7', 0, '0');
+    T('0', '-5.7', 0, '1');
+    T('1', '-5.7', 0, '3');
+    T('1', '-5.7', 0, '5.7');
+    T('1', '-5.7', 0, 'Infinity');
+    T('NaN', '-5.7', 0, 'NaN');
+    T('-0.7', '-5.7', 1, '-1');
+    T('-2.7', '-5.7', 1, '-3');
+    T('0', '-5.7', 1, '-5.7');
+    T('-5.7', '-5.7', 1, '-Infinity');
+    T('NaN', '-5.7', 1, '0');
+    T('-0.7', '-5.7', 1, '1');
+    T('-2.7', '-5.7', 1, '3');
+    T('0', '-5.7', 1, '5.7');
+    T('-5.7', '-5.7', 1, 'Infinity');
+    T('NaN', '-5.7', 1, 'NaN');
+    T('-0.193', '-5.7', 3, '-1');
+    T('-2.193', '-5.7', 3, '-3');
+    T('-2.793', '-5.7', 3, '-5.7');
+    T('-185.193', '-5.7', 3, '-Infinity');
+    T('NaN', '-5.7', 3, '0');
+    T('-0.193', '-5.7', 3, '1');
+    T('-2.193', '-5.7', 3, '3');
+    T('-2.793', '-5.7', 3, '5.7');
+    T('-185.193', '-5.7', 3, 'Infinity');
+    T('NaN', '-5.7', 3, 'NaN');
+    T('-0.92057', '-5.7', 5.7, '-1');
+    T('-1.92057', '-5.7', 5.7, '-3');
+    T('-3.42057', '-5.7', 5.7, '-5.7');
+    T('-6016.92057', '-5.7', 5.7, '-Infinity');
+    T('NaN', '-5.7', 5.7, '0');
+    T('-0.92057', '-5.7', 5.7, '1');
+    T('-1.92057', '-5.7', 5.7, '3');
+    T('-3.42057', '-5.7', 5.7, '5.7');
+    T('-6016.92057', '-5.7', 5.7, 'Infinity');
+    T('NaN', '-5.7', 5.7, 'NaN');
+    T('NaN', '-5.7', Infinity, '-1');
+    T('NaN', '-5.7', Infinity, '-3');
+    T('NaN', '-5.7', Infinity, '-5.7');
+    T('NaN', '-5.7', Infinity, '-Infinity');
+    T('NaN', '-5.7', Infinity, '0');
+    T('NaN', '-5.7', Infinity, '1');
+    T('NaN', '-5.7', Infinity, '3');
+    T('NaN', '-5.7', Infinity, '5.7');
+    T('NaN', '-5.7', Infinity, 'Infinity');
+    T('NaN', '-5.7', Infinity, 'NaN');
+    T('NaN', '-5.7', NaN, '-1');
+    T('NaN', '-5.7', NaN, '-3');
+    T('NaN', '-5.7', NaN, '-5.7');
+    T('NaN', '-5.7', NaN, '-Infinity');
+    T('NaN', '-5.7', NaN, '0');
+    T('NaN', '-5.7', NaN, '1');
+    T('NaN', '-5.7', NaN, '3');
+    T('NaN', '-5.7', NaN, '5.7');
+    T('NaN', '-5.7', NaN, 'Infinity');
+    T('NaN', '-5.7', NaN, 'NaN');
+    T('0', '-Infinity', -1, '-1');
+    T('0', '-Infinity', -1, '-3');
+    T('0', '-Infinity', -1, '-5.7');
+    T('0', '-Infinity', -1, '-Infinity');
+    T('NaN', '-Infinity', -1, '0');
+    T('0', '-Infinity', -1, '1');
+    T('0', '-Infinity', -1, '3');
+    T('0', '-Infinity', -1, '5.7');
+    T('0', '-Infinity', -1, 'Infinity');
+    T('NaN', '-Infinity', -1, 'NaN');
+    T('0', '-Infinity', -3, '-1');
+    T('0', '-Infinity', -3, '-3');
+    T('0', '-Infinity', -3, '-5.7');
+    T('0', '-Infinity', -3, '-Infinity');
+    T('NaN', '-Infinity', -3, '0');
+    T('0', '-Infinity', -3, '1');
+    T('0', '-Infinity', -3, '3');
+    T('0', '-Infinity', -3, '5.7');
+    T('0', '-Infinity', -3, 'Infinity');
+    T('NaN', '-Infinity', -3, 'NaN');
+    T('0', '-Infinity', -5.7, '-1');
+    T('0', '-Infinity', -5.7, '-3');
+    T('0', '-Infinity', -5.7, '-5.7');
+    T('0', '-Infinity', -5.7, '-Infinity');
+    T('NaN', '-Infinity', -5.7, '0');
+    T('0', '-Infinity', -5.7, '1');
+    T('0', '-Infinity', -5.7, '3');
+    T('0', '-Infinity', -5.7, '5.7');
+    T('0', '-Infinity', -5.7, 'Infinity');
+    T('NaN', '-Infinity', -5.7, 'NaN');
+    T('0', '-Infinity', -Infinity, '-1');
+    T('0', '-Infinity', -Infinity, '-3');
+    T('0', '-Infinity', -Infinity, '-5.7');
+    T('0', '-Infinity', -Infinity, '-Infinity');
+    T('NaN', '-Infinity', -Infinity, '0');
+    T('0', '-Infinity', -Infinity, '1');
+    T('0', '-Infinity', -Infinity, '3');
+    T('0', '-Infinity', -Infinity, '5.7');
+    T('0', '-Infinity', -Infinity, 'Infinity');
+    T('NaN', '-Infinity', -Infinity, 'NaN');
+    T('0', '-Infinity', 0, '-1');
+    T('1', '-Infinity', 0, '-3');
+    T('1', '-Infinity', 0, '-5.7');
+    T('1', '-Infinity', 0, '-Infinity');
+    T('NaN', '-Infinity', 0, '0');
+    T('0', '-Infinity', 0, '1');
+    T('1', '-Infinity', 0, '3');
+    T('1', '-Infinity', 0, '5.7');
+    T('1', '-Infinity', 0, 'Infinity');
+    T('NaN', '-Infinity', 0, 'NaN');
+    T('NaN', '-Infinity', 1, '-1');
+    T('NaN', '-Infinity', 1, '-3');
+    T('NaN', '-Infinity', 1, '-5.7');
+    T('NaN', '-Infinity', 1, '-Infinity');
+    T('NaN', '-Infinity', 1, '0');
+    T('NaN', '-Infinity', 1, '1');
+    T('NaN', '-Infinity', 1, '3');
+    T('NaN', '-Infinity', 1, '5.7');
+    T('NaN', '-Infinity', 1, 'Infinity');
+    T('NaN', '-Infinity', 1, 'NaN');
+    T('NaN', '-Infinity', 3, '-1');
+    T('NaN', '-Infinity', 3, '-3');
+    T('NaN', '-Infinity', 3, '-5.7');
+    T('NaN', '-Infinity', 3, '-Infinity');
+    T('NaN', '-Infinity', 3, '0');
+    T('NaN', '-Infinity', 3, '1');
+    T('NaN', '-Infinity', 3, '3');
+    T('NaN', '-Infinity', 3, '5.7');
+    T('NaN', '-Infinity', 3, 'Infinity');
+    T('NaN', '-Infinity', 3, 'NaN');
+    T('NaN', '-Infinity', 5.7, '-1');
+    T('NaN', '-Infinity', 5.7, '-3');
+    T('NaN', '-Infinity', 5.7, '-5.7');
+    T('NaN', '-Infinity', 5.7, '-Infinity');
+    T('NaN', '-Infinity', 5.7, '0');
+    T('NaN', '-Infinity', 5.7, '1');
+    T('NaN', '-Infinity', 5.7, '3');
+    T('NaN', '-Infinity', 5.7, '5.7');
+    T('NaN', '-Infinity', 5.7, 'Infinity');
+    T('NaN', '-Infinity', 5.7, 'NaN');
+    T('NaN', '-Infinity', Infinity, '-1');
+    T('NaN', '-Infinity', Infinity, '-3');
+    T('NaN', '-Infinity', Infinity, '-5.7');
+    T('NaN', '-Infinity', Infinity, '-Infinity');
+    T('NaN', '-Infinity', Infinity, '0');
+    T('NaN', '-Infinity', Infinity, '1');
+    T('NaN', '-Infinity', Infinity, '3');
+    T('NaN', '-Infinity', Infinity, '5.7');
+    T('NaN', '-Infinity', Infinity, 'Infinity');
+    T('NaN', '-Infinity', Infinity, 'NaN');
+    T('NaN', '-Infinity', NaN, '-1');
+    T('NaN', '-Infinity', NaN, '-3');
+    T('NaN', '-Infinity', NaN, '-5.7');
+    T('NaN', '-Infinity', NaN, '-Infinity');
+    T('NaN', '-Infinity', NaN, '0');
+    T('NaN', '-Infinity', NaN, '1');
+    T('NaN', '-Infinity', NaN, '3');
+    T('NaN', '-Infinity', NaN, '5.7');
+    T('NaN', '-Infinity', NaN, 'Infinity');
+    T('NaN', '-Infinity', NaN, 'NaN');
+    T('NaN', '0', -1, '-1');
+    T('NaN', '0', -1, '-3');
+    T('NaN', '0', -1, '-5.7');
+    T('NaN', '0', -1, '-Infinity');
+    T('NaN', '0', -1, '0');
+    T('NaN', '0', -1, '1');
+    T('NaN', '0', -1, '3');
+    T('NaN', '0', -1, '5.7');
+    T('NaN', '0', -1, 'Infinity');
+    T('NaN', '0', -1, 'NaN');
+    T('NaN', '0', -3, '-1');
+    T('NaN', '0', -3, '-3');
+    T('NaN', '0', -3, '-5.7');
+    T('NaN', '0', -3, '-Infinity');
+    T('NaN', '0', -3, '0');
+    T('NaN', '0', -3, '1');
+    T('NaN', '0', -3, '3');
+    T('NaN', '0', -3, '5.7');
+    T('NaN', '0', -3, 'Infinity');
+    T('NaN', '0', -3, 'NaN');
+    T('NaN', '0', -5.7, '-1');
+    T('NaN', '0', -5.7, '-3');
+    T('NaN', '0', -5.7, '-5.7');
+    T('NaN', '0', -5.7, '-Infinity');
+    T('NaN', '0', -5.7, '0');
+    T('NaN', '0', -5.7, '1');
+    T('NaN', '0', -5.7, '3');
+    T('NaN', '0', -5.7, '5.7');
+    T('NaN', '0', -5.7, 'Infinity');
+    T('NaN', '0', -5.7, 'NaN');
+    T('NaN', '0', -Infinity, '-1');
+    T('NaN', '0', -Infinity, '-3');
+    T('NaN', '0', -Infinity, '-5.7');
+    T('NaN', '0', -Infinity, '-Infinity');
+    T('NaN', '0', -Infinity, '0');
+    T('NaN', '0', -Infinity, '1');
+    T('NaN', '0', -Infinity, '3');
+    T('NaN', '0', -Infinity, '5.7');
+    T('NaN', '0', -Infinity, 'Infinity');
+    T('NaN', '0', -Infinity, 'NaN');
+    T('0', '0', 0, '-1');
+    T('1', '0', 0, '-3');
+    T('1', '0', 0, '-5.7');
+    T('1', '0', 0, '-Infinity');
+    T('NaN', '0', 0, '0');
+    T('0', '0', 0, '1');
+    T('1', '0', 0, '3');
+    T('1', '0', 0, '5.7');
+    T('1', '0', 0, 'Infinity');
+    T('NaN', '0', 0, 'NaN');
+    T('0', '0', 1, '-1');
+    T('0', '0', 1, '-3');
+    T('0', '0', 1, '-5.7');
+    T('0', '0', 1, '-Infinity');
+    T('NaN', '0', 1, '0');
+    T('0', '0', 1, '1');
+    T('0', '0', 1, '3');
+    T('0', '0', 1, '5.7');
+    T('0', '0', 1, 'Infinity');
+    T('NaN', '0', 1, 'NaN');
+    T('0', '0', 3, '-1');
+    T('0', '0', 3, '-3');
+    T('0', '0', 3, '-5.7');
+    T('0', '0', 3, '-Infinity');
+    T('NaN', '0', 3, '0');
+    T('0', '0', 3, '1');
+    T('0', '0', 3, '3');
+    T('0', '0', 3, '5.7');
+    T('0', '0', 3, 'Infinity');
+    T('NaN', '0', 3, 'NaN');
+    T('0', '0', 5.7, '-1');
+    T('0', '0', 5.7, '-3');
+    T('0', '0', 5.7, '-5.7');
+    T('0', '0', 5.7, '-Infinity');
+    T('NaN', '0', 5.7, '0');
+    T('0', '0', 5.7, '1');
+    T('0', '0', 5.7, '3');
+    T('0', '0', 5.7, '5.7');
+    T('0', '0', 5.7, 'Infinity');
+    T('NaN', '0', 5.7, 'NaN');
+    T('0', '0', Infinity, '-1');
+    T('0', '0', Infinity, '-3');
+    T('0', '0', Infinity, '-5.7');
+    T('0', '0', Infinity, '-Infinity');
+    T('NaN', '0', Infinity, '0');
+    T('0', '0', Infinity, '1');
+    T('0', '0', Infinity, '3');
+    T('0', '0', Infinity, '5.7');
+    T('0', '0', Infinity, 'Infinity');
+    T('NaN', '0', Infinity, 'NaN');
+    T('NaN', '0', NaN, '-1');
+    T('NaN', '0', NaN, '-3');
+    T('NaN', '0', NaN, '-5.7');
+    T('NaN', '0', NaN, '-Infinity');
+    T('NaN', '0', NaN, '0');
+    T('NaN', '0', NaN, '1');
+    T('NaN', '0', NaN, '3');
+    T('NaN', '0', NaN, '5.7');
+    T('NaN', '0', NaN, 'Infinity');
+    T('NaN', '0', NaN, 'NaN');
+    T('0', '1', -1, '-1');
+    T('1', '1', -1, '-3');
+    T('1', '1', -1, '-5.7');
+    T('1', '1', -1, '-Infinity');
+    T('NaN', '1', -1, '0');
+    T('0', '1', -1, '1');
+    T('1', '1', -1, '3');
+    T('1', '1', -1, '5.7');
+    T('1', '1', -1, 'Infinity');
+    T('NaN', '1', -1, 'NaN');
+    T('0', '1', -3, '-1');
+    T('1', '1', -3, '-3');
+    T('1', '1', -3, '-5.7');
+    T('1', '1', -3, '-Infinity');
+    T('NaN', '1', -3, '0');
+    T('0', '1', -3, '1');
+    T('1', '1', -3, '3');
+    T('1', '1', -3, '5.7');
+    T('1', '1', -3, 'Infinity');
+    T('NaN', '1', -3, 'NaN');
+    T('0', '1', -5.7, '-1');
+    T('1', '1', -5.7, '-3');
+    T('1', '1', -5.7, '-5.7');
+    T('1', '1', -5.7, '-Infinity');
+    T('NaN', '1', -5.7, '0');
+    T('0', '1', -5.7, '1');
+    T('1', '1', -5.7, '3');
+    T('1', '1', -5.7, '5.7');
+    T('1', '1', -5.7, 'Infinity');
+    T('NaN', '1', -5.7, 'NaN');
+    T('NaN', '1', -Infinity, '-1');
+    T('NaN', '1', -Infinity, '-3');
+    T('NaN', '1', -Infinity, '-5.7');
+    T('NaN', '1', -Infinity, '-Infinity');
+    T('NaN', '1', -Infinity, '0');
+    T('NaN', '1', -Infinity, '1');
+    T('NaN', '1', -Infinity, '3');
+    T('NaN', '1', -Infinity, '5.7');
+    T('NaN', '1', -Infinity, 'Infinity');
+    T('NaN', '1', -Infinity, 'NaN');
+    T('0', '1', 0, '-1');
+    T('1', '1', 0, '-3');
+    T('1', '1', 0, '-5.7');
+    T('1', '1', 0, '-Infinity');
+    T('NaN', '1', 0, '0');
+    T('0', '1', 0, '1');
+    T('1', '1', 0, '3');
+    T('1', '1', 0, '5.7');
+    T('1', '1', 0, 'Infinity');
+    T('NaN', '1', 0, 'NaN');
+    T('0', '1', 1, '-1');
+    T('1', '1', 1, '-3');
+    T('1', '1', 1, '-5.7');
+    T('1', '1', 1, '-Infinity');
+    T('NaN', '1', 1, '0');
+    T('0', '1', 1, '1');
+    T('1', '1', 1, '3');
+    T('1', '1', 1, '5.7');
+    T('1', '1', 1, 'Infinity');
+    T('NaN', '1', 1, 'NaN');
+    T('0', '1', 3, '-1');
+    T('1', '1', 3, '-3');
+    T('1', '1', 3, '-5.7');
+    T('1', '1', 3, '-Infinity');
+    T('NaN', '1', 3, '0');
+    T('0', '1', 3, '1');
+    T('1', '1', 3, '3');
+    T('1', '1', 3, '5.7');
+    T('1', '1', 3, 'Infinity');
+    T('NaN', '1', 3, 'NaN');
+    T('0', '1', 5.7, '-1');
+    T('1', '1', 5.7, '-3');
+    T('1', '1', 5.7, '-5.7');
+    T('1', '1', 5.7, '-Infinity');
+    T('NaN', '1', 5.7, '0');
+    T('0', '1', 5.7, '1');
+    T('1', '1', 5.7, '3');
+    T('1', '1', 5.7, '5.7');
+    T('1', '1', 5.7, 'Infinity');
+    T('NaN', '1', 5.7, 'NaN');
+    T('NaN', '1', Infinity, '-1');
+    T('NaN', '1', Infinity, '-3');
+    T('NaN', '1', Infinity, '-5.7');
+    T('NaN', '1', Infinity, '-Infinity');
+    T('NaN', '1', Infinity, '0');
+    T('NaN', '1', Infinity, '1');
+    T('NaN', '1', Infinity, '3');
+    T('NaN', '1', Infinity, '5.7');
+    T('NaN', '1', Infinity, 'Infinity');
+    T('NaN', '1', Infinity, 'NaN');
+    T('NaN', '1', NaN, '-1');
+    T('NaN', '1', NaN, '-3');
+    T('NaN', '1', NaN, '-5.7');
+    T('NaN', '1', NaN, '-Infinity');
+    T('NaN', '1', NaN, '0');
+    T('NaN', '1', NaN, '1');
+    T('NaN', '1', NaN, '3');
+    T('NaN', '1', NaN, '5.7');
+    T('NaN', '1', NaN, 'Infinity');
+    T('NaN', '1', NaN, 'NaN');
+    T('0.33333333333333333', '3', -1, '-1');
+    T('0.33333333333333333', '3', -1, '-3');
+    T('0.33333333333333333', '3', -1, '-5.7');
+    T('0.33333333333333333', '3', -1, '-Infinity');
+    T('NaN', '3', -1, '0');
+    T('0.33333333333333333', '3', -1, '1');
+    T('0.33333333333333333', '3', -1, '3');
+    T('0.33333333333333333', '3', -1, '5.7');
+    T('0.33333333333333333', '3', -1, 'Infinity');
+    T('NaN', '3', -1, 'NaN');
+    T('0.03703703703703704', '3', -3, '-1');
+    T('0.03703703703703704', '3', -3, '-3');
+    T('0.03703703703703704', '3', -3, '-5.7');
+    T('0.03703703703703704', '3', -3, '-Infinity');
+    T('NaN', '3', -3, '0');
+    T('0.03703703703703704', '3', -3, '1');
+    T('0.03703703703703704', '3', -3, '3');
+    T('0.03703703703703704', '3', -3, '5.7');
+    T('0.03703703703703704', '3', -3, 'Infinity');
+    T('NaN', '3', -3, 'NaN');
+    T('0.00411522633744856', '3', -5.7, '-1');
+    T('0.00411522633744856', '3', -5.7, '-3');
+    T('0.00411522633744856', '3', -5.7, '-5.7');
+    T('0.00411522633744856', '3', -5.7, '-Infinity');
+    T('NaN', '3', -5.7, '0');
+    T('0.00411522633744856', '3', -5.7, '1');
+    T('0.00411522633744856', '3', -5.7, '3');
+    T('0.00411522633744856', '3', -5.7, '5.7');
+    T('0.00411522633744856', '3', -5.7, 'Infinity');
+    T('NaN', '3', -5.7, 'NaN');
+    T('0', '3', -Infinity, '-1');
+    T('0', '3', -Infinity, '-3');
+    T('0', '3', -Infinity, '-5.7');
+    T('0', '3', -Infinity, '-Infinity');
+    T('NaN', '3', -Infinity, '0');
+    T('0', '3', -Infinity, '1');
+    T('0', '3', -Infinity, '3');
+    T('0', '3', -Infinity, '5.7');
+    T('0', '3', -Infinity, 'Infinity');
+    T('NaN', '3', -Infinity, 'NaN');
+    T('0', '3', 0, '-1');
+    T('1', '3', 0, '-3');
+    T('1', '3', 0, '-5.7');
+    T('1', '3', 0, '-Infinity');
+    T('NaN', '3', 0, '0');
+    T('0', '3', 0, '1');
+    T('1', '3', 0, '3');
+    T('1', '3', 0, '5.7');
+    T('1', '3', 0, 'Infinity');
+    T('NaN', '3', 0, 'NaN');
+    T('0', '3', 1, '-1');
+    T('0', '3', 1, '-3');
+    T('3', '3', 1, '-5.7');
+    T('3', '3', 1, '-Infinity');
+    T('NaN', '3', 1, '0');
+    T('0', '3', 1, '1');
+    T('0', '3', 1, '3');
+    T('3', '3', 1, '5.7');
+    T('3', '3', 1, 'Infinity');
+    T('NaN', '3', 1, 'NaN');
+    T('0', '3', 3, '-1');
+    T('0', '3', 3, '-3');
+    T('4.2', '3', 3, '-5.7');
+    T('27', '3', 3, '-Infinity');
+    T('NaN', '3', 3, '0');
+    T('0', '3', 3, '1');
+    T('0', '3', 3, '3');
+    T('4.2', '3', 3, '5.7');
+    T('27', '3', 3, 'Infinity');
+    T('NaN', '3', 3, 'NaN');
+    T('0', '3', 5.7, '-1');
+    T('0', '3', 5.7, '-3');
+    T('3.6', '3', 5.7, '-5.7');
+    T('243', '3', 5.7, '-Infinity');
+    T('NaN', '3', 5.7, '0');
+    T('0', '3', 5.7, '1');
+    T('0', '3', 5.7, '3');
+    T('3.6', '3', 5.7, '5.7');
+    T('243', '3', 5.7, 'Infinity');
+    T('NaN', '3', 5.7, 'NaN');
+    T('NaN', '3', Infinity, '-1');
+    T('NaN', '3', Infinity, '-3');
+    T('NaN', '3', Infinity, '-5.7');
+    T('NaN', '3', Infinity, '-Infinity');
+    T('NaN', '3', Infinity, '0');
+    T('NaN', '3', Infinity, '1');
+    T('NaN', '3', Infinity, '3');
+    T('NaN', '3', Infinity, '5.7');
+    T('NaN', '3', Infinity, 'Infinity');
+    T('NaN', '3', Infinity, 'NaN');
+    T('NaN', '3', NaN, '-1');
+    T('NaN', '3', NaN, '-3');
+    T('NaN', '3', NaN, '-5.7');
+    T('NaN', '3', NaN, '-Infinity');
+    T('NaN', '3', NaN, '0');
+    T('NaN', '3', NaN, '1');
+    T('NaN', '3', NaN, '3');
+    T('NaN', '3', NaN, '5.7');
+    T('NaN', '3', NaN, 'Infinity');
+    T('NaN', '3', NaN, 'NaN');
+    T('0.17543859649122807', '5.7', -1, '-1');
+    T('0.17543859649122807', '5.7', -1, '-3');
+    T('0.17543859649122807', '5.7', -1, '-5.7');
+    T('0.17543859649122807', '5.7', -1, '-Infinity');
+    T('NaN', '5.7', -1, '0');
+    T('0.17543859649122807', '5.7', -1, '1');
+    T('0.17543859649122807', '5.7', -1, '3');
+    T('0.17543859649122807', '5.7', -1, '5.7');
+    T('0.17543859649122807', '5.7', -1, 'Infinity');
+    T('NaN', '5.7', -1, 'NaN');
+    T('0.00539977212961613', '5.7', -3, '-1');
+    T('0.00539977212961613', '5.7', -3, '-3');
+    T('0.00539977212961613', '5.7', -3, '-5.7');
+    T('0.00539977212961613', '5.7', -3, '-Infinity');
+    T('NaN', '5.7', -3, '0');
+    T('0.00539977212961613', '5.7', -3, '1');
+    T('0.00539977212961613', '5.7', -3, '3');
+    T('0.00539977212961613', '5.7', -3, '5.7');
+    T('0.00539977212961613', '5.7', -3, 'Infinity');
+    T('NaN', '5.7', -3, 'NaN');
+    T('0.00016619797259514', '5.7', -5.7, '-1');
+    T('0.00016619797259514', '5.7', -5.7, '-3');
+    T('0.00016619797259514', '5.7', -5.7, '-5.7');
+    T('0.00016619797259514', '5.7', -5.7, '-Infinity');
+    T('NaN', '5.7', -5.7, '0');
+    T('0.00016619797259514', '5.7', -5.7, '1');
+    T('0.00016619797259514', '5.7', -5.7, '3');
+    T('0.00016619797259514', '5.7', -5.7, '5.7');
+    T('0.00016619797259514', '5.7', -5.7, 'Infinity');
+    T('NaN', '5.7', -5.7, 'NaN');
+    T('0', '5.7', -Infinity, '-1');
+    T('0', '5.7', -Infinity, '-3');
+    T('0', '5.7', -Infinity, '-5.7');
+    T('0', '5.7', -Infinity, '-Infinity');
+    T('NaN', '5.7', -Infinity, '0');
+    T('0', '5.7', -Infinity, '1');
+    T('0', '5.7', -Infinity, '3');
+    T('0', '5.7', -Infinity, '5.7');
+    T('0', '5.7', -Infinity, 'Infinity');
+    T('NaN', '5.7', -Infinity, 'NaN');
+    T('0', '5.7', 0, '-1');
+    T('1', '5.7', 0, '-3');
+    T('1', '5.7', 0, '-5.7');
+    T('1', '5.7', 0, '-Infinity');
+    T('NaN', '5.7', 0, '0');
+    T('0', '5.7', 0, '1');
+    T('1', '5.7', 0, '3');
+    T('1', '5.7', 0, '5.7');
+    T('1', '5.7', 0, 'Infinity');
+    T('NaN', '5.7', 0, 'NaN');
+    T('0.7', '5.7', 1, '-1');
+    T('2.7', '5.7', 1, '-3');
+    T('0', '5.7', 1, '-5.7');
+    T('5.7', '5.7', 1, '-Infinity');
+    T('NaN', '5.7', 1, '0');
+    T('0.7', '5.7', 1, '1');
+    T('2.7', '5.7', 1, '3');
+    T('0', '5.7', 1, '5.7');
+    T('5.7', '5.7', 1, 'Infinity');
+    T('NaN', '5.7', 1, 'NaN');
+    T('0.193', '5.7', 3, '-1');
+    T('2.193', '5.7', 3, '-3');
+    T('2.793', '5.7', 3, '-5.7');
+    T('185.193', '5.7', 3, '-Infinity');
+    T('NaN', '5.7', 3, '0');
+    T('0.193', '5.7', 3, '1');
+    T('2.193', '5.7', 3, '3');
+    T('2.793', '5.7', 3, '5.7');
+    T('185.193', '5.7', 3, 'Infinity');
+    T('NaN', '5.7', 3, 'NaN');
+    T('0.92057', '5.7', 5.7, '-1');
+    T('1.92057', '5.7', 5.7, '-3');
+    T('3.42057', '5.7', 5.7, '-5.7');
+    T('6016.92057', '5.7', 5.7, '-Infinity');
+    T('NaN', '5.7', 5.7, '0');
+    T('0.92057', '5.7', 5.7, '1');
+    T('1.92057', '5.7', 5.7, '3');
+    T('3.42057', '5.7', 5.7, '5.7');
+    T('6016.92057', '5.7', 5.7, 'Infinity');
+    T('NaN', '5.7', 5.7, 'NaN');
+    T('NaN', '5.7', Infinity, '-1');
+    T('NaN', '5.7', Infinity, '-3');
+    T('NaN', '5.7', Infinity, '-5.7');
+    T('NaN', '5.7', Infinity, '-Infinity');
+    T('NaN', '5.7', Infinity, '0');
+    T('NaN', '5.7', Infinity, '1');
+    T('NaN', '5.7', Infinity, '3');
+    T('NaN', '5.7', Infinity, '5.7');
+    T('NaN', '5.7', Infinity, 'Infinity');
+    T('NaN', '5.7', Infinity, 'NaN');
+    T('NaN', '5.7', NaN, '-1');
+    T('NaN', '5.7', NaN, '-3');
+    T('NaN', '5.7', NaN, '-5.7');
+    T('NaN', '5.7', NaN, '-Infinity');
+    T('NaN', '5.7', NaN, '0');
+    T('NaN', '5.7', NaN, '1');
+    T('NaN', '5.7', NaN, '3');
+    T('NaN', '5.7', NaN, '5.7');
+    T('NaN', '5.7', NaN, 'Infinity');
+    T('NaN', '5.7', NaN, 'NaN');
+    T('0', 'Infinity', -1, '-1');
+    T('0', 'Infinity', -1, '-3');
+    T('0', 'Infinity', -1, '-5.7');
+    T('0', 'Infinity', -1, '-Infinity');
+    T('NaN', 'Infinity', -1, '0');
+    T('0', 'Infinity', -1, '1');
+    T('0', 'Infinity', -1, '3');
+    T('0', 'Infinity', -1, '5.7');
+    T('0', 'Infinity', -1, 'Infinity');
+    T('NaN', 'Infinity', -1, 'NaN');
+    T('0', 'Infinity', -3, '-1');
+    T('0', 'Infinity', -3, '-3');
+    T('0', 'Infinity', -3, '-5.7');
+    T('0', 'Infinity', -3, '-Infinity');
+    T('NaN', 'Infinity', -3, '0');
+    T('0', 'Infinity', -3, '1');
+    T('0', 'Infinity', -3, '3');
+    T('0', 'Infinity', -3, '5.7');
+    T('0', 'Infinity', -3, 'Infinity');
+    T('NaN', 'Infinity', -3, 'NaN');
+    T('0', 'Infinity', -5.7, '-1');
+    T('0', 'Infinity', -5.7, '-3');
+    T('0', 'Infinity', -5.7, '-5.7');
+    T('0', 'Infinity', -5.7, '-Infinity');
+    T('NaN', 'Infinity', -5.7, '0');
+    T('0', 'Infinity', -5.7, '1');
+    T('0', 'Infinity', -5.7, '3');
+    T('0', 'Infinity', -5.7, '5.7');
+    T('0', 'Infinity', -5.7, 'Infinity');
+    T('NaN', 'Infinity', -5.7, 'NaN');
+    T('0', 'Infinity', -Infinity, '-1');
+    T('0', 'Infinity', -Infinity, '-3');
+    T('0', 'Infinity', -Infinity, '-5.7');
+    T('0', 'Infinity', -Infinity, '-Infinity');
+    T('NaN', 'Infinity', -Infinity, '0');
+    T('0', 'Infinity', -Infinity, '1');
+    T('0', 'Infinity', -Infinity, '3');
+    T('0', 'Infinity', -Infinity, '5.7');
+    T('0', 'Infinity', -Infinity, 'Infinity');
+    T('NaN', 'Infinity', -Infinity, 'NaN');
+    T('0', 'Infinity', 0, '-1');
+    T('1', 'Infinity', 0, '-3');
+    T('1', 'Infinity', 0, '-5.7');
+    T('1', 'Infinity', 0, '-Infinity');
+    T('NaN', 'Infinity', 0, '0');
+    T('0', 'Infinity', 0, '1');
+    T('1', 'Infinity', 0, '3');
+    T('1', 'Infinity', 0, '5.7');
+    T('1', 'Infinity', 0, 'Infinity');
+    T('NaN', 'Infinity', 0, 'NaN');
+    T('NaN', 'Infinity', 1, '-1');
+    T('NaN', 'Infinity', 1, '-3');
+    T('NaN', 'Infinity', 1, '-5.7');
+    T('NaN', 'Infinity', 1, '-Infinity');
+    T('NaN', 'Infinity', 1, '0');
+    T('NaN', 'Infinity', 1, '1');
+    T('NaN', 'Infinity', 1, '3');
+    T('NaN', 'Infinity', 1, '5.7');
+    T('NaN', 'Infinity', 1, 'Infinity');
+    T('NaN', 'Infinity', 1, 'NaN');
+    T('NaN', 'Infinity', 3, '-1');
+    T('NaN', 'Infinity', 3, '-3');
+    T('NaN', 'Infinity', 3, '-5.7');
+    T('NaN', 'Infinity', 3, '-Infinity');
+    T('NaN', 'Infinity', 3, '0');
+    T('NaN', 'Infinity', 3, '1');
+    T('NaN', 'Infinity', 3, '3');
+    T('NaN', 'Infinity', 3, '5.7');
+    T('NaN', 'Infinity', 3, 'Infinity');
+    T('NaN', 'Infinity', 3, 'NaN');
+    T('NaN', 'Infinity', 5.7, '-1');
+    T('NaN', 'Infinity', 5.7, '-3');
+    T('NaN', 'Infinity', 5.7, '-5.7');
+    T('NaN', 'Infinity', 5.7, '-Infinity');
+    T('NaN', 'Infinity', 5.7, '0');
+    T('NaN', 'Infinity', 5.7, '1');
+    T('NaN', 'Infinity', 5.7, '3');
+    T('NaN', 'Infinity', 5.7, '5.7');
+    T('NaN', 'Infinity', 5.7, 'Infinity');
+    T('NaN', 'Infinity', 5.7, 'NaN');
+    T('NaN', 'Infinity', Infinity, '-1');
+    T('NaN', 'Infinity', Infinity, '-3');
+    T('NaN', 'Infinity', Infinity, '-5.7');
+    T('NaN', 'Infinity', Infinity, '-Infinity');
+    T('NaN', 'Infinity', Infinity, '0');
+    T('NaN', 'Infinity', Infinity, '1');
+    T('NaN', 'Infinity', Infinity, '3');
+    T('NaN', 'Infinity', Infinity, '5.7');
+    T('NaN', 'Infinity', Infinity, 'Infinity');
+    T('NaN', 'Infinity', Infinity, 'NaN');
+    T('NaN', 'Infinity', NaN, '-1');
+    T('NaN', 'Infinity', NaN, '-3');
+    T('NaN', 'Infinity', NaN, '-5.7');
+    T('NaN', 'Infinity', NaN, '-Infinity');
+    T('NaN', 'Infinity', NaN, '0');
+    T('NaN', 'Infinity', NaN, '1');
+    T('NaN', 'Infinity', NaN, '3');
+    T('NaN', 'Infinity', NaN, '5.7');
+    T('NaN', 'Infinity', NaN, 'Infinity');
+    T('NaN', 'Infinity', NaN, 'NaN');
+    T('NaN', 'NaN', -1, '-1');
+    T('NaN', 'NaN', -1, '-3');
+    T('NaN', 'NaN', -1, '-5.7');
+    T('NaN', 'NaN', -1, '-Infinity');
+    T('NaN', 'NaN', -1, '0');
+    T('NaN', 'NaN', -1, '1');
+    T('NaN', 'NaN', -1, '3');
+    T('NaN', 'NaN', -1, '5.7');
+    T('NaN', 'NaN', -1, 'Infinity');
+    T('NaN', 'NaN', -1, 'NaN');
+    T('NaN', 'NaN', -3, '-1');
+    T('NaN', 'NaN', -3, '-3');
+    T('NaN', 'NaN', -3, '-5.7');
+    T('NaN', 'NaN', -3, '-Infinity');
+    T('NaN', 'NaN', -3, '0');
+    T('NaN', 'NaN', -3, '1');
+    T('NaN', 'NaN', -3, '3');
+    T('NaN', 'NaN', -3, '5.7');
+    T('NaN', 'NaN', -3, 'Infinity');
+    T('NaN', 'NaN', -3, 'NaN');
+    T('NaN', 'NaN', -5.7, '-1');
+    T('NaN', 'NaN', -5.7, '-3');
+    T('NaN', 'NaN', -5.7, '-5.7');
+    T('NaN', 'NaN', -5.7, '-Infinity');
+    T('NaN', 'NaN', -5.7, '0');
+    T('NaN', 'NaN', -5.7, '1');
+    T('NaN', 'NaN', -5.7, '3');
+    T('NaN', 'NaN', -5.7, '5.7');
+    T('NaN', 'NaN', -5.7, 'Infinity');
+    T('NaN', 'NaN', -5.7, 'NaN');
+    T('NaN', 'NaN', -Infinity, '-1');
+    T('NaN', 'NaN', -Infinity, '-3');
+    T('NaN', 'NaN', -Infinity, '-5.7');
+    T('NaN', 'NaN', -Infinity, '-Infinity');
+    T('NaN', 'NaN', -Infinity, '0');
+    T('NaN', 'NaN', -Infinity, '1');
+    T('NaN', 'NaN', -Infinity, '3');
+    T('NaN', 'NaN', -Infinity, '5.7');
+    T('NaN', 'NaN', -Infinity, 'Infinity');
+    T('NaN', 'NaN', -Infinity, 'NaN');
+    T('0', 'NaN', 0, '-1');
+    T('1', 'NaN', 0, '-3');
+    T('1', 'NaN', 0, '-5.7');
+    T('1', 'NaN', 0, '-Infinity');
+    T('NaN', 'NaN', 0, '0');
+    T('0', 'NaN', 0, '1');
+    T('1', 'NaN', 0, '3');
+    T('1', 'NaN', 0, '5.7');
+    T('1', 'NaN', 0, 'Infinity');
+    T('NaN', 'NaN', 0, 'NaN');
+    T('NaN', 'NaN', 1, '-1');
+    T('NaN', 'NaN', 1, '-3');
+    T('NaN', 'NaN', 1, '-5.7');
+    T('NaN', 'NaN', 1, '-Infinity');
+    T('NaN', 'NaN', 1, '0');
+    T('NaN', 'NaN', 1, '1');
+    T('NaN', 'NaN', 1, '3');
+    T('NaN', 'NaN', 1, '5.7');
+    T('NaN', 'NaN', 1, 'Infinity');
+    T('NaN', 'NaN', 1, 'NaN');
+    T('NaN', 'NaN', 3, '-1');
+    T('NaN', 'NaN', 3, '-3');
+    T('NaN', 'NaN', 3, '-5.7');
+    T('NaN', 'NaN', 3, '-Infinity');
+    T('NaN', 'NaN', 3, '0');
+    T('NaN', 'NaN', 3, '1');
+    T('NaN', 'NaN', 3, '3');
+    T('NaN', 'NaN', 3, '5.7');
+    T('NaN', 'NaN', 3, 'Infinity');
+    T('NaN', 'NaN', 3, 'NaN');
+    T('NaN', 'NaN', 5.7, '-1');
+    T('NaN', 'NaN', 5.7, '-3');
+    T('NaN', 'NaN', 5.7, '-5.7');
+    T('NaN', 'NaN', 5.7, '-Infinity');
+    T('NaN', 'NaN', 5.7, '0');
+    T('NaN', 'NaN', 5.7, '1');
+    T('NaN', 'NaN', 5.7, '3');
+    T('NaN', 'NaN', 5.7, '5.7');
+    T('NaN', 'NaN', 5.7, 'Infinity');
+    T('NaN', 'NaN', 5.7, 'NaN');
+    T('NaN', 'NaN', Infinity, '-1');
+    T('NaN', 'NaN', Infinity, '-3');
+    T('NaN', 'NaN', Infinity, '-5.7');
+    T('NaN', 'NaN', Infinity, '-Infinity');
+    T('NaN', 'NaN', Infinity, '0');
+    T('NaN', 'NaN', Infinity, '1');
+    T('NaN', 'NaN', Infinity, '3');
+    T('NaN', 'NaN', Infinity, '5.7');
+    T('NaN', 'NaN', Infinity, 'Infinity');
+    T('NaN', 'NaN', Infinity, 'NaN');
+    T('NaN', 'NaN', NaN, '-1');
+    T('NaN', 'NaN', NaN, '-3');
+    T('NaN', 'NaN', NaN, '-5.7');
+    T('NaN', 'NaN', NaN, '-Infinity');
+    T('NaN', 'NaN', NaN, '0');
+    T('NaN', 'NaN', NaN, '1');
+    T('NaN', 'NaN', NaN, '3');
+    T('NaN', 'NaN', NaN, '5.7');
+    T('NaN', 'NaN', NaN, 'Infinity');
+    T('NaN', 'NaN', NaN, 'NaN');
+
+    T('1', '8431', 398674124, '6');
+    T('7110', '1929384198', 564, '12627');
+    T('1', '421', 969026510, '50');
+    T('18279', '503236662', 7865967220250664, '146017');
+    T('212243931', '26283', 559977785516, '438161990');
+    T('3986011', '309905614', 303248194641, '6707349');
+    T('18', '255', 235075187670817, '33');
+    T('757606', '85279549', 1, '4971879');
+    T('493022001', '1221', 339684, '1227120430');
+    T('4928', '308', 862705533, '245399');
+
+    T('1', '2655619', 712076, '33');
+    T('3249', '36597', 10, '4814');
+    T('24693574779382', '64756899620069', 929, '31837505671417');
+    T('4', '16138', 25, '6');
+    T('803688476775598957', '23434498424', 1004504153400006, '1552170429770308303');
+    T('2372169341110', '626', 2909120945494472, '2627700430731');
+    T('763331421', '8920455', 5401, '887776639');
+    T('43484276', '95602644', 47268, '79441540');
+    T('5184', '552490380863549826', 771646862212, '48411');
+    T('249062220104231038', '8165474757220190', 48336800, '275469974740761006');
+
+    T('4533624538711', '71095', 84895497, '8511056291816');
+    T('179616962799673689600', '30', 5993842570087, '3846357299605272267200');
+    T('2635639014', '948664855786186969995462', 991073259299, '6492710818');
+    T('25207202', '7062946640447932397849934745', 9179924349024, '131689081');
+    T('46215552578796', '9226321147260318', 465662072, '82890635248305');
+    T('2381', '67677914606828678309445778836', 379808346, '6545');
+    T('3194', '9430054', 33266765435198, '8086');
+    T('489391901079659061061615631695', '61', 532791104437751, '575349759754184186263817284386');
+    T('53895639062204578043630854379', '7625677354305052466464542', 384495887925, '92309679232802956732606796453');
+    T('2556', '2556', 474, '4260');
+
+    T('7454833596345226', '6627640799561604435379549901208146893914', 738172551780, '9927201293379475');
+    T('180534305804480057935271006266', '30118923384576', 1724057305, '217106906249791126796683884757');
+    T('40198606849673093876708023432368286', '46018377546879392378', 9583035, '97268554010071292786749920599930246');
+    T('119594913310192', '3876146908085398', 6310557700917, '460635614054751');
+    T('124164038822218003447569', '6324437543304', 5145398258501, '185457603447664741003595');
+    T('3090727470454298372533496615424', '9043956512017564199358', 812419, '24686499729814129954773423938808');
+    T('196432807299128', '85644819061206872677771002', 2149475, '2390467883263880');
+    T('21038128225272112935718937889', '10201699689699', 975439792, '552736938894180564012881397228');
+    T('48815091877022922', '819772006700', 27, '92801123950463822');
+    T('3428327713', '4783442049811351657', 763298409739419, '4611091548');
+
+    T('13332959', '50223861853248559483171199', 433657796167153, '14302445');
+    T('1671780604656974600625', '5262390185', 237568007998, '2996619244329632717320');
+    T('163214427140868907633628729899294561', '69729', 5547, '348074057682137097650725573316845631');
+    T('1431482931095017928787410350478464311370783', '324036022719', 741179, '1926651417082887424580613612432908230284256');
+    T('2066482089348451048557491058810559698377957', '485499449712405070079531', 26619244686, '5198031511981114390451723050087908159382379');
+    T('230132104292091', '51108', 72, '300839508488483');
+    T('77425469643841456', '683612', 1358712956, '87679547089722516');
+    T('19704951483426394285654701761857', '648220087103027691231', 951, '51871772124455644390524635948707');
+    T('49664718770671', '90754235859251032779427547330178026902879259879149', 56465, '88662672119247');
+    T('5850177638872804389781733677', '43833993637925773026276875024526870636161009', 18680, '7143233335762749555439764903');
+
+    T('148766490582493984', '637303893625341624581231866', 80158754948186, '277200469688808288');
+    T('461156083195', '7410440324698529628156609999534999680075097798739066525', 5, '497057036562');
+    T('64916883599108541736776193', '612994182961138850333413794352070459841441623351', 60767786944, '98752274335195294154105792');
+    T('10540459703800', '64273975302329668592061012520727877789083279767399625069872', 47928, '11135116378808');
+    T('51323389055913840647', '8812207212196306768767581580252769675186591389274669815', 318348861090, '64421250202609658903');
+    T('29757808741764208562941153498135845503485664433483002816', '867758291086087441092815266', 87972360, '35296135515471412857388210439806001268345767694668654815');
+    T('12216915747251127577023017426296915245567146', '5', 630681763, '99691500608302115525875055527858805680711469');
+    T('39256229035626291077932595741439945459', '884788691267481486036549962208626653751575112606547', 395, '74611250766351101157218135270578882456');
+    T('1566585758309290833383165985121', '5518513093291031', 84076954280784, '3268027301397216624639210698650');
+    T('23244239019466456', '726961684629206', 44302850171068, '25825428077885724');
+
+    T('576202045348', '2', 86, '1993487574093');
+    T('214887739391325311421203390352640473539330809857', '530920695787544208524163946341577905732500119397445776874457', 92074232456, '298234073905137329443605619833742500919938582584');
+    T('65987551079170180991', '15727645504455027240711713610867307628685087714766285006179', 5415994008046072, '98093654946405312851');
+    T('235755348', '97895915562280371546579179382663613522080', 6864027244330, '2914481959');
+    T('25', '2385833031024324749500218699098192497329791351618465248', 76, '43');
+    T('60978709428230482055794', '633426981727026457056243235', 2573352678, '68892104926357370406321');
+    T('2205305143872260015', '68666113504059034715448345087743557663421209680169', 966912, '91335033334933977914');
+    T('1773010325526997630667956162969199', '50236266447725', 1011051, '1815196566132403387261756476229021');
+    T('21651713309307397647418967909940906495359918883652297119748967664610', '2116690032950796724931519528504418', 56377918425202, '72530284342935017506382060155224822052591722104751066167988598475621');
+    T('424342025184319173350839545801827251126937962398522383162485691860', '7887123908856684587220682858582136758248493694412325668235690671821222', 78263291426, '606621751096553135780007544328033731512868463777097140904367236076');
+
+    T('263494656066740331512505119529952169855176897305760218583136', '66196629771558316669009697587278986920237144718211014622', 82975788577, '276995756096460875347969999989044425131478330494164864612372');
+    T('3233881936397621380726', '54662037196287984527444181218823835370969115893018818932457726246761952463863247', 7978980, '8616858825085971720675');
+    T('638258565634367399562728805308653408227469872980835260151', '271260887707883899257906058181413820', 83084825904971, '911022277353533247041821679426958551977223586921062184599');
+    T('4929004454697476334020070969568981614084143361021890853851227932576', '52595660817705323426336739112374', 82, '84588413633625400636331211734490327208866927410873351741019781325200');
+    T('1318', '52222440815620913414283909971331735692219726452073974', 31969869852707, '1743');
+    T('14198375573817127297631', '8216191940103223703953921417098533793768836648251711587683532494485283139', 1148021101052, '33840057260506501760990');
+    T('21060027143743696716588231173430226739686253140085459901957546396844213341461', '929861823123874973319343426480313452550331811680088489136411', 2724613045067, '41704674452090069450347101739468855285700640202119997571378502239544273783510');
+    T('4443992', '15541126534638718868684758085506345122523183909428377824025206962', 260040175408, '25089386');
+    T('69108491603450670146194732329929457413687007477897110583837256484', '403009613248326350380989310363291291192333753504', 62476, '79005045873240215031140013298308923107449817612581444589282697702');
+    T('17236718288049536002844483635703049705951027651789224052123191026028473', '2094473204798008783226910505910335184920132719939788443730442642435545859265', 45508995, '82091072999723696400188424215432751998089672273801746338001474566467528');
+
+    T('789232110429757050346575421789740938023359099985821439285059579046301609631489', '81969532915716492451825251138141557551221798800067', 9374132001566, '6151970522916703120074639237189829128382929132326931047111863128679908831947160');
+    T('309967512158129367241503417', '5036401011755282976501651891', 8, '579409771218647975769237062');
+    T('1005177723064444533676930215329318398408005233744147409253092051884720439872045691', '34143228467709965637133329397909447638094686489341571291939014959027173', 5908294874, '1948118218782552504717113674377900788819505447144982442644571967109889114978555094');
+    T('2674983886895543103385933707806021292069592798960403352624723368307164005844515', '630121260445826051', 543924007975, '5393527392056050378946327047321386307679397116474720103645794120383930696591597');
+    T('34282424398363091595264858358407576878748130711657', '2465523511004443813182991155444943123114440980033643073427530034623', 40040, '53406881113973714252481843982237377938283267787704');
+    T('56697362235159637435394616', '13578442879343644788292568854324', 3213346, '64112922323162194609121303');
+    T('1719024107812073742324652892209591438916478681803041822032', '741729184', 15707757516391, '2841684181135919788850393385226690862963456286187597289743');
+    T('77235876127631492414224275788312346586010414227977024436242959514761441403681', '9779956774206680777933282330040609', 848907522, '80469529418181750667389985753151188249008367167903257882428958848063106959425');
+    T('818237407', '8647307267571638478062009936214941341887730783', 72115, '868503288');
+    T('16656646685269365251966621943766388357818276618200', '90718594921015553491234286035964355061165665', 413647015, '3608930136060789794621435623631749086641253604872025');
+
+    T('4200771934599417598043614250678407408742790405352069', '13887167479352054887893441108734976256983355293630326688937701987456059128531183047285855439', 4878021, '5174782460386365636916415446777806773439498506957659');
+    T('229321232335228179325607264299805007162580253510', '88842733861662854338989696299185544317548185717287774', 1884553431751485, '511271768851992491206847877157605201694070726149');
+    T('2782154434549194158424475393312481728934235', '548551139346831388798410342333799565824514031', 21440165013, '28690744453818561525474569067146373783311411');
+    T('231885589525566300', '41452536764738341533654876175985845652783844060455944861412', 504, '882872312288902804');
+    T('3526070056991550931813749027', '67955640858421297373955388629490294119793212927955296181464396292269', 56248954153, '30688081810027133462513567962');
+    T('131014', '2089950142999411392048663', 51275898, '658471');
+    T('1563352013492150412336688693007169330972429493240982436018814920117063643496545477705204209349110', '9397910631929603594996958575220998774', 84406064, '4909019378673255436084701488614137765928330710577696608363266704298169838609295204783331338958374');
+    T('1044297548212903', '42525084216745706252327916418', 42291, '6457910534907511');
+    T('405167196487546464980337225371932484221676531564558020674296714011859111057380', '3400756652952034869667491286822430771347620199472', 26886850142633, '611549802518085362254974981183236948088206027646591513228667566697306287449399');
+    T('7794452159255315351790298031593675', '3374396899581350491330711739601350455629429581990670970624900984868802087092615683985175', 4600499328250313, '9412479648183932289355382618210050');
+
     log('\n ' + passed + ' of ' + total + ' tests passed in ' + (+new Date() - start) + ' ms \n');
     return [passed, total];
 })(this.BigNumber);