Lines Matching refs:num

28288 Node.prototype.explicit = function explicit(num) {
28291 state.explicit = num;
28295 Node.prototype.implicit = function implicit(num) {
28298 state.implicit = num;
29315 return this.reporter.error('Values map doesn\'t contain: ' + JSON.stringify(num));
29318 num = values[num];
29322 if (typeof num !== 'number' && !Buffer.isBuffer(num)) {
29323 var numArray = num.toArray();
29325 if (!num.sign && numArray[0] & 0x80) {
29329 num = Buffer.from(numArray);
29332 if (Buffer.isBuffer(num)) {
29333 var _size = num.length;
29334 if (num.length === 0) _size++;
29338 num.copy(_out);
29339 if (num.length === 0) _out[0] = 0;
29343 if (num < 0x80) return this._createEncoderBuffer(num);
29344 if (num < 0x100) return this._createEncoderBuffer([0, num]);
29347 for (var i = num; i >= 0x100; i >>= 8) {
29354 out[_i5] = num & 0xff;
29355 num >>= 8;
29495 BN.isBN = function isBN(num) {
29496 if (num instanceof BN) {
29500 …return num !== null && _typeof(num) === 'object' && num.constructor.wordSize === BN.wordSize && Ar…
30044 function toBitArray(num) {
30045 var w = new Array(num.bitLength());
30050 w[bit] = (num.words[off] & 1 << wbit) >>> wbit;
30109 BN.prototype.iuor = function iuor(num) {
30110 while (this.length < num.length) {
30114 for (var i = 0; i < num.length; i++) {
30115 this.words[i] = this.words[i] | num.words[i];
30121 BN.prototype.ior = function ior(num) {
30122 assert((this.negative | num.negative) === 0);
30123 return this.iuor(num);
30127 BN.prototype.or = function or(num) {
30128 if (this.length > num.length) return this.clone().ior(num);
30129 return num.clone().ior(this);
30132 BN.prototype.uor = function uor(num) {
30133 if (this.length > num.length) return this.clone().iuor(num);
30134 return num.clone().iuor(this);
30138 BN.prototype.iuand = function iuand(num) {
30142 if (this.length > num.length) {
30143 b = num;
30149 this.words[i] = this.words[i] & num.words[i];
30156 BN.prototype.iand = function iand(num) {
30157 assert((this.negative | num.negative) === 0);
30158 return this.iuand(num);
30162 BN.prototype.and = function and(num) {
30163 if (this.length > num.length) return this.clone().iand(num);
30164 return num.clone().iand(this);
30167 BN.prototype.uand = function uand(num) {
30168 if (this.length > num.length) return this.clone().iuand(num);
30169 return num.clone().iuand(this);
30173 BN.prototype.iuxor = function iuxor(num) {
30178 if (this.length > num.length) {
30180 b = num;
30182 a = num;
30200 BN.prototype.ixor = function ixor(num) {
30201 assert((this.negative | num.negative) === 0);
30202 return this.iuxor(num);
30206 BN.prototype.xor = function xor(num) {
30207 if (this.length > num.length) return this.clone().ixor(num);
30208 return num.clone().ixor(this);
30211 BN.prototype.uxor = function uxor(num) {
30212 if (this.length > num.length) return this.clone().iuxor(num);
30213 return num.clone().iuxor(this);
30264 BN.prototype.iadd = function iadd(num) {
30267 if (this.negative !== 0 && num.negative === 0) {
30269 r = this.isub(num);
30272 } else if (this.negative === 0 && num.negative !== 0) {
30273 num.negative = 0;
30274 r = this.isub(num);
30275 num.negative = 1;
30282 if (this.length > num.length) {
30284 b = num;
30286 a = num;
30319 BN.prototype.add = function add(num) {
30322 if (num.negative !== 0 && this.negative === 0) {
30323 num.negative = 0;
30324 res = this.sub(num);
30325 num.negative ^= 1;
30327 } else if (num.negative === 0 && this.negative !== 0) {
30329 res = num.sub(this);
30334 if (this.length > num.length) return this.clone().iadd(num);
30335 return num.clone().iadd(this);
30339 BN.prototype.isub = function isub(num) {
30341 if (num.negative !== 0) {
30342 num.negative = 0;
30343 var r = this.iadd(num);
30344 num.negative = 1;
30348 this.iadd(num);
30354 var cmp = this.cmp(num); // Optimization - zeroify
30368 b = num;
30370 a = num;
30405 BN.prototype.sub = function sub(num) {
30406 return this.clone().isub(num);
30409 function smallMulTo(self, num, out) {
30410 out.negative = num.negative ^ self.negative;
30411 var len = self.length + num.length | 0;
30416 var b = num.words[0] | 0;
30427 var maxJ = Math.min(k, num.length - 1);
30432 b = num.words[j] | 0;
30454 var comb10MulTo = function comb10MulTo(self, num, out) {
30456 var b = num.words;
30522 out.negative = self.negative ^ num.negative;
31052 function bigMulTo(self, num, out) {
31053 out.negative = num.negative ^ self.negative;
31054 out.length = self.length + num.length;
31064 var maxJ = Math.min(k, num.length - 1);
31069 var b = num.words[j] | 0;
31094 function jumboMulTo(self, num, out) {
31096 return fftm.mulp(self, num, out);
31099 BN.prototype.mulTo = function mulTo(num, out) {
31101 var len = this.length + num.length;
31103 if (this.length === 10 && num.length === 10) {
31104 res = comb10MulTo(this, num, out);
31106 res = smallMulTo(this, num, out);
31108 res = bigMulTo(this, num, out);
31110 res = jumboMulTo(this, num, out);
31299 BN.prototype.mul = function mul(num) {
31301 out.words = new Array(this.length + num.length);
31302 return this.mulTo(num, out);
31306 BN.prototype.mulf = function mulf(num) {
31308 out.words = new Array(this.length + num.length);
31309 return jumboMulTo(this, num, out);
31313 BN.prototype.imul = function imul(num) {
31314 return this.clone().mulTo(num, this);
31317 BN.prototype.imuln = function imuln(num) {
31318 assert(typeof num === 'number');
31319 assert(num < 0x4000000); // Carry
31324 var w = (this.words[i] | 0) * num;
31341 BN.prototype.muln = function muln(num) {
31342 return this.clone().imuln(num);
31356 BN.prototype.pow = function pow(num) {
31357 var w = toBitArray(num);
31550 BN.prototype.iaddn = function iaddn(num) {
31551 assert(typeof num === 'number');
31552 assert(num < 0x4000000);
31553 if (num < 0) return this.isubn(-num); // Possible sign change
31556 if (this.length === 1 && (this.words[0] | 0) < num) {
31557 this.words[0] = num - (this.words[0] | 0);
31563 this.isubn(num);
31569 return this._iaddn(num);
31572 BN.prototype._iaddn = function _iaddn(num) {
31573 this.words[0] += num; // Carry
31590 BN.prototype.isubn = function isubn(num) {
31591 assert(typeof num === 'number');
31592 assert(num < 0x4000000);
31593 if (num < 0) return this.iaddn(-num);
31597 this.iaddn(num);
31602 this.words[0] -= num;
31618 BN.prototype.addn = function addn(num) {
31619 return this.clone().iaddn(num);
31622 BN.prototype.subn = function subn(num) {
31623 return this.clone().isubn(num);
31635 BN.prototype._ishlnsubmul = function _ishlnsubmul(num, mul, shift) {
31636 var len = num.length + shift;
31644 for (i = 0; i < num.length; i++) {
31646 var right = (num.words[i] | 0) * mul;
31673 BN.prototype._wordDiv = function _wordDiv(num, mode) {
31674 var shift = this.length - num.length;
31676 var b = num; // Normalize
31758 BN.prototype.divmod = function divmod(num, mode, positive) {
31759 assert(!num.isZero());
31770 if (this.negative !== 0 && num.negative === 0) {
31771 res = this.neg().divmod(num, mode);
31781 mod.iadd(num);
31791 if (this.negative === 0 && num.negative !== 0) {
31792 res = this.divmod(num.neg(), mode);
31804 if ((this.negative & num.negative) !== 0) {
31805 res = this.neg().divmod(num.neg(), mode);
31811 mod.isub(num);
31823 if (num.length > this.length || this.cmp(num) < 0) {
31831 if (num.length === 1) {
31834 div: this.divn(num.words[0]),
31842 mod: new BN(this.modn(num.words[0]))
31847 div: this.divn(num.words[0]),
31848 mod: new BN(this.modn(num.words[0]))
31852 return this._wordDiv(num, mode);
31856 BN.prototype.div = function div(num) {
31857 return this.divmod(num, 'div', false).div;
31861 BN.prototype.mod = function mod(num) {
31862 return this.divmod(num, 'mod', false).mod;
31865 BN.prototype.umod = function umod(num) {
31866 return this.divmod(num, 'mod', true).mod;
31870 BN.prototype.divRound = function divRound(num) {
31871 var dm = this.divmod(num); // Fast case - exact division
31874 var mod = dm.div.negative !== 0 ? dm.mod.isub(num) : dm.mod;
31875 var half = num.ushrn(1);
31876 var r2 = num.andln(1);
31884 BN.prototype.modn = function modn(num) {
31885 assert(num <= 0x3ffffff);
31886 var p = (1 << 26) % num;
31890 acc = (p * acc + (this.words[i] | 0)) % num;
31897 BN.prototype.idivn = function idivn(num) {
31898 assert(num <= 0x3ffffff);
31903 this.words[i] = w / num | 0;
31904 carry = w % num;
31910 BN.prototype.divn = function divn(num) {
31911 return this.clone().idivn(num);
32074 BN.prototype.gcd = function gcd(num) {
32075 if (this.isZero()) return num.abs();
32076 if (num.isZero()) return this.abs();
32078 var b = num.clone();
32114 BN.prototype.invm = function invm(num) {
32115 return this.egcd(num).a.umod(num);
32127 BN.prototype.andln = function andln(num) {
32128 return this.words[0] & num;
32168 BN.prototype.cmpn = function cmpn(num) {
32169 var negative = num < 0;
32179 num = -num;
32182 assert(num <= 0x3ffffff, 'Number is too big');
32184 res = w === num ? 0 : w < num ? -1 : 1;
32195 BN.prototype.cmp = function cmp(num) {
32196 if (this.negative !== 0 && num.negative === 0) return -1;
32197 if (this.negative === 0 && num.negative !== 0) return 1;
32198 var res = this.ucmp(num);
32204 BN.prototype.ucmp = function ucmp(num) {
32206 if (this.length > num.length) return 1;
32207 if (this.length < num.length) return -1;
32212 var b = num.words[i] | 0;
32227 BN.prototype.gtn = function gtn(num) {
32228 return this.cmpn(num) === 1;
32231 BN.prototype.gt = function gt(num) {
32232 return this.cmp(num) === 1;
32235 BN.prototype.gten = function gten(num) {
32236 return this.cmpn(num) >= 0;
32239 BN.prototype.gte = function gte(num) {
32240 return this.cmp(num) >= 0;
32243 BN.prototype.ltn = function ltn(num) {
32244 return this.cmpn(num) === -1;
32247 BN.prototype.lt = function lt(num) {
32248 return this.cmp(num) === -1;
32251 BN.prototype.lten = function lten(num) {
32252 return this.cmpn(num) <= 0;
32255 BN.prototype.lte = function lte(num) {
32256 return this.cmp(num) <= 0;
32259 BN.prototype.eqn = function eqn(num) {
32260 return this.cmpn(num) === 0;
32263 BN.prototype.eq = function eq(num) {
32264 return this.cmp(num) === 0;
32271 BN.red = function red(num) {
32272 return new Red(num);
32296 BN.prototype.redAdd = function redAdd(num) {
32298 return this.red.add(this, num);
32301 BN.prototype.redIAdd = function redIAdd(num) {
32303 return this.red.iadd(this, num);
32306 BN.prototype.redSub = function redSub(num) {
32308 return this.red.sub(this, num);
32311 BN.prototype.redISub = function redISub(num) {
32313 return this.red.isub(this, num);
32316 BN.prototype.redShl = function redShl(num) {
32318 return this.red.shl(this, num);
32321 BN.prototype.redMul = function redMul(num) {
32324 this.red._verify2(this, num);
32326 return this.red.mul(this, num);
32329 BN.prototype.redIMul = function redIMul(num) {
32332 this.red._verify2(this, num);
32334 return this.red.imul(this, num);
32379 BN.prototype.redPow = function redPow(num) {
32380 assert(this.red && !num.red, 'redPow(normalNum)');
32384 return this.red.pow(this, num);
32410 MPrime.prototype.ireduce = function ireduce(num) {
32413 var r = num;
32447 MPrime.prototype.imulK = function imulK(num) {
32448 return num.imul(this.k);
32494 K256.prototype.imulK = function imulK(num) {
32496 num.words[num.length] = 0;
32497 num.words[num.length + 1] = 0;
32498 num.length += 2; // bounded at: 0x40 * 0x3ffffff + 0x3d0 = 0x100000390
32502 for (var i = 0; i < num.length; i++) {
32503 var w = num.words[i] | 0;
32505 num.words[i] = lo & 0x3ffffff;
32510 if (num.words[num.length - 1] === 0) {
32511 num.length--;
32513 if (num.words[num.length - 1] === 0) {
32514 num.length--;
32518 return num;
32540 P25519.prototype.imulK = function imulK(num) {
32544 for (var i = 0; i < num.length; i++) {
32545 var hi = (num.words[i] | 0) * 0x13 + carry;
32548 num.words[i] = lo;
32553 num.words[num.length++] = carry;
32556 return num;
32668 Red.prototype.shl = function shl(a, num) {
32671 return this.imod(a.ushln(num));
32762 Red.prototype.pow = function pow(a, num) {
32763 if (num.isZero()) return new BN(1).toRed(this);
32764 if (num.cmpn(1) === 0) return a.clone();
32777 var start = num.bitLength() % 26;
32783 for (i = num.length - 1; i >= 0; i--) {
32784 var word = num.words[i];
32813 Red.prototype.convertTo = function convertTo(num) {
32814 var r = num.umod(this.m);
32815 return r === num ? r.clone() : r;
32818 Red.prototype.convertFrom = function convertFrom(num) {
32819 var res = num.clone();
32827 BN.mont = function mont(num) {
32828 return new Mont(num);
32849 Mont.prototype.convertTo = function convertTo(num) {
32850 return this.imod(num.ushln(this.shift));
32853 Mont.prototype.convertFrom = function convertFrom(num) {
32854 var r = this.imod(num.mul(this.rinv));
32983 function tripletToBase64(num) {
32984 …return lookup[num >> 18 & 0x3F] + lookup[num >> 12 & 0x3F] + lookup[num >> 6 & 0x3F] + lookup[num
33084 BN.isBN = function isBN(num) {
33085 if (num instanceof BN) {
33089 …return num !== null && _typeof(num) === 'object' && num.constructor.wordSize === BN.wordSize && Ar…
33728 function toBitArray(num) {
33729 var w = new Array(num.bitLength());
33734 w[bit] = num.words[off] >>> wbit & 0x01;
33793 BN.prototype.iuor = function iuor(num) {
33794 while (this.length < num.length) {
33798 for (var i = 0; i < num.length; i++) {
33799 this.words[i] = this.words[i] | num.words[i];
33805 BN.prototype.ior = function ior(num) {
33806 assert((this.negative | num.negative) === 0);
33807 return this.iuor(num);
33811 BN.prototype.or = function or(num) {
33812 if (this.length > num.length) return this.clone().ior(num);
33813 return num.clone().ior(this);
33816 BN.prototype.uor = function uor(num) {
33817 if (this.length > num.length) return this.clone().iuor(num);
33818 return num.clone().iuor(this);
33822 BN.prototype.iuand = function iuand(num) {
33826 if (this.length > num.length) {
33827 b = num;
33833 this.words[i] = this.words[i] & num.words[i];
33840 BN.prototype.iand = function iand(num) {
33841 assert((this.negative | num.negative) === 0);
33842 return this.iuand(num);
33846 BN.prototype.and = function and(num) {
33847 if (this.length > num.length) return this.clone().iand(num);
33848 return num.clone().iand(this);
33851 BN.prototype.uand = function uand(num) {
33852 if (this.length > num.length) return this.clone().iuand(num);
33853 return num.clone().iuand(this);
33857 BN.prototype.iuxor = function iuxor(num) {
33862 if (this.length > num.length) {
33864 b = num;
33866 a = num;
33884 BN.prototype.ixor = function ixor(num) {
33885 assert((this.negative | num.negative) === 0);
33886 return this.iuxor(num);
33890 BN.prototype.xor = function xor(num) {
33891 if (this.length > num.length) return this.clone().ixor(num);
33892 return num.clone().ixor(this);
33895 BN.prototype.uxor = function uxor(num) {
33896 if (this.length > num.length) return this.clone().iuxor(num);
33897 return num.clone().iuxor(this);
33948 BN.prototype.iadd = function iadd(num) {
33951 if (this.negative !== 0 && num.negative === 0) {
33953 r = this.isub(num);
33956 } else if (this.negative === 0 && num.negative !== 0) {
33957 num.negative = 0;
33958 r = this.isub(num);
33959 num.negative = 1;
33966 if (this.length > num.length) {
33968 b = num;
33970 a = num;
34003 BN.prototype.add = function add(num) {
34006 if (num.negative !== 0 && this.negative === 0) {
34007 num.negative = 0;
34008 res = this.sub(num);
34009 num.negative ^= 1;
34011 } else if (num.negative === 0 && this.negative !== 0) {
34013 res = num.sub(this);
34018 if (this.length > num.length) return this.clone().iadd(num);
34019 return num.clone().iadd(this);
34023 BN.prototype.isub = function isub(num) {
34025 if (num.negative !== 0) {
34026 num.negative = 0;
34027 var r = this.iadd(num);
34028 num.negative = 1;
34032 this.iadd(num);
34038 var cmp = this.cmp(num); // Optimization - zeroify
34052 b = num;
34054 a = num;
34089 BN.prototype.sub = function sub(num) {
34090 return this.clone().isub(num);
34093 function smallMulTo(self, num, out) {
34094 out.negative = num.negative ^ self.negative;
34095 var len = self.length + num.length | 0;
34100 var b = num.words[0] | 0;
34111 var maxJ = Math.min(k, num.length - 1);
34116 b = num.words[j] | 0;
34138 var comb10MulTo = function comb10MulTo(self, num, out) {
34140 var b = num.words;
34206 out.negative = self.negative ^ num.negative;
34736 function bigMulTo(self, num, out) {
34737 out.negative = num.negative ^ self.negative;
34738 out.length = self.length + num.length;
34748 var maxJ = Math.min(k, num.length - 1);
34753 var b = num.words[j] | 0;
34778 function jumboMulTo(self, num, out) {
34782 return bigMulTo(self, num, out);
34785 BN.prototype.mulTo = function mulTo(num, out) {
34787 var len = this.length + num.length;
34789 if (this.length === 10 && num.length === 10) {
34790 res = comb10MulTo(this, num, out);
34792 res = smallMulTo(this, num, out);
34794 res = bigMulTo(this, num, out);
34796 res = jumboMulTo(this, num, out);
34985 BN.prototype.mul = function mul(num) {
34987 out.words = new Array(this.length + num.length);
34988 return this.mulTo(num, out);
34992 BN.prototype.mulf = function mulf(num) {
34994 out.words = new Array(this.length + num.length);
34995 return jumboMulTo(this, num, out);
34999 BN.prototype.imul = function imul(num) {
35000 return this.clone().mulTo(num, this);
35003 BN.prototype.imuln = function imuln(num) {
35004 var isNegNum = num < 0;
35005 if (isNegNum) num = -num;
35006 assert(typeof num === 'number');
35007 assert(num < 0x4000000); // Carry
35012 var w = (this.words[i] | 0) * num;
35029 BN.prototype.muln = function muln(num) {
35030 return this.clone().imuln(num);
35044 BN.prototype.pow = function pow(num) {
35045 var w = toBitArray(num);
35238 BN.prototype.iaddn = function iaddn(num) {
35239 assert(typeof num === 'number');
35240 assert(num < 0x4000000);
35241 if (num < 0) return this.isubn(-num); // Possible sign change
35244 if (this.length === 1 && (this.words[0] | 0) <= num) {
35245 this.words[0] = num - (this.words[0] | 0);
35251 this.isubn(num);
35257 return this._iaddn(num);
35260 BN.prototype._iaddn = function _iaddn(num) {
35261 this.words[0] += num; // Carry
35278 BN.prototype.isubn = function isubn(num) {
35279 assert(typeof num === 'number');
35280 assert(num < 0x4000000);
35281 if (num < 0) return this.iaddn(-num);
35285 this.iaddn(num);
35290 this.words[0] -= num;
35306 BN.prototype.addn = function addn(num) {
35307 return this.clone().iaddn(num);
35310 BN.prototype.subn = function subn(num) {
35311 return this.clone().isubn(num);
35323 BN.prototype._ishlnsubmul = function _ishlnsubmul(num, mul, shift) {
35324 var len = num.length + shift;
35332 for (i = 0; i < num.length; i++) {
35334 var right = (num.words[i] | 0) * mul;
35361 BN.prototype._wordDiv = function _wordDiv(num, mode) {
35362 var shift = this.length - num.length;
35364 var b = num; // Normalize
35447 BN.prototype.divmod = function divmod(num, mode, positive) {
35448 assert(!num.isZero());
35459 if (this.negative !== 0 && num.negative === 0) {
35460 res = this.neg().divmod(num, mode);
35470 mod.iadd(num);
35480 if (this.negative === 0 && num.negative !== 0) {
35481 res = this.divmod(num.neg(), mode);
35493 if ((this.negative & num.negative) !== 0) {
35494 res = this.neg().divmod(num.neg(), mode);
35500 mod.isub(num);
35512 if (num.length > this.length || this.cmp(num) < 0) {
35520 if (num.length === 1) {
35523 div: this.divn(num.words[0]),
35531 mod: new BN(this.modrn(num.words[0]))
35536 div: this.divn(num.words[0]),
35537 mod: new BN(this.modrn(num.words[0]))
35541 return this._wordDiv(num, mode);
35545 BN.prototype.div = function div(num) {
35546 return this.divmod(num, 'div', false).div;
35550 BN.prototype.mod = function mod(num) {
35551 return this.divmod(num, 'mod', false).mod;
35554 BN.prototype.umod = function umod(num) {
35555 return this.divmod(num, 'mod', true).mod;
35559 BN.prototype.divRound = function divRound(num) {
35560 var dm = this.divmod(num); // Fast case - exact division
35563 var mod = dm.div.negative !== 0 ? dm.mod.isub(num) : dm.mod;
35564 var half = num.ushrn(1);
35565 var r2 = num.andln(1);
35573 BN.prototype.modrn = function modrn(num) {
35574 var isNegNum = num < 0;
35575 if (isNegNum) num = -num;
35576 assert(num <= 0x3ffffff);
35577 var p = (1 << 26) % num;
35581 acc = (p * acc + (this.words[i] | 0)) % num;
35588 BN.prototype.modn = function modn(num) {
35589 return this.modrn(num);
35593 BN.prototype.idivn = function idivn(num) {
35594 var isNegNum = num < 0;
35595 if (isNegNum) num = -num;
35596 assert(num <= 0x3ffffff);
35601 this.words[i] = w / num | 0;
35602 carry = w % num;
35610 BN.prototype.divn = function divn(num) {
35611 return this.clone().idivn(num);
35774 BN.prototype.gcd = function gcd(num) {
35775 if (this.isZero()) return num.abs();
35776 if (num.isZero()) return this.abs();
35778 var b = num.clone();
35814 BN.prototype.invm = function invm(num) {
35815 return this.egcd(num).a.umod(num);
35827 BN.prototype.andln = function andln(num) {
35828 return this.words[0] & num;
35868 BN.prototype.cmpn = function cmpn(num) {
35869 var negative = num < 0;
35881 num = -num;
35884 assert(num <= 0x3ffffff, 'Number is too big');
35886 res = w === num ? 0 : w < num ? -1 : 1;
35897 BN.prototype.cmp = function cmp(num) {
35898 if (this.negative !== 0 && num.negative === 0) return -1;
35899 if (this.negative === 0 && num.negative !== 0) return 1;
35900 var res = this.ucmp(num);
35906 BN.prototype.ucmp = function ucmp(num) {
35908 if (this.length > num.length) return 1;
35909 if (this.length < num.length) return -1;
35914 var b = num.words[i] | 0;
35929 BN.prototype.gtn = function gtn(num) {
35930 return this.cmpn(num) === 1;
35933 BN.prototype.gt = function gt(num) {
35934 return this.cmp(num) === 1;
35937 BN.prototype.gten = function gten(num) {
35938 return this.cmpn(num) >= 0;
35941 BN.prototype.gte = function gte(num) {
35942 return this.cmp(num) >= 0;
35945 BN.prototype.ltn = function ltn(num) {
35946 return this.cmpn(num) === -1;
35949 BN.prototype.lt = function lt(num) {
35950 return this.cmp(num) === -1;
35953 BN.prototype.lten = function lten(num) {
35954 return this.cmpn(num) <= 0;
35957 BN.prototype.lte = function lte(num) {
35958 return this.cmp(num) <= 0;
35961 BN.prototype.eqn = function eqn(num) {
35962 return this.cmpn(num) === 0;
35965 BN.prototype.eq = function eq(num) {
35966 return this.cmp(num) === 0;
35973 BN.red = function red(num) {
35974 return new Red(num);
35998 BN.prototype.redAdd = function redAdd(num) {
36000 return this.red.add(this, num);
36003 BN.prototype.redIAdd = function redIAdd(num) {
36005 return this.red.iadd(this, num);
36008 BN.prototype.redSub = function redSub(num) {
36010 return this.red.sub(this, num);
36013 BN.prototype.redISub = function redISub(num) {
36015 return this.red.isub(this, num);
36018 BN.prototype.redShl = function redShl(num) {
36020 return this.red.shl(this, num);
36023 BN.prototype.redMul = function redMul(num) {
36026 this.red._verify2(this, num);
36028 return this.red.mul(this, num);
36031 BN.prototype.redIMul = function redIMul(num) {
36034 this.red._verify2(this, num);
36036 return this.red.imul(this, num);
36081 BN.prototype.redPow = function redPow(num) {
36082 assert(this.red && !num.red, 'redPow(normalNum)');
36086 return this.red.pow(this, num);
36112 MPrime.prototype.ireduce = function ireduce(num) {
36115 var r = num;
36149 MPrime.prototype.imulK = function imulK(num) {
36150 return num.imul(this.k);
36196 K256.prototype.imulK = function imulK(num) {
36198 num.words[num.length] = 0;
36199 num.words[num.length + 1] = 0;
36200 num.length += 2; // bounded at: 0x40 * 0x3ffffff + 0x3d0 = 0x100000390
36204 for (var i = 0; i < num.length; i++) {
36205 var w = num.words[i] | 0;
36207 num.words[i] = lo & 0x3ffffff;
36212 if (num.words[num.length - 1] === 0) {
36213 num.length--;
36215 if (num.words[num.length - 1] === 0) {
36216 num.length--;
36220 return num;
36242 P25519.prototype.imulK = function imulK(num) {
36246 for (var i = 0; i < num.length; i++) {
36247 var hi = (num.words[i] | 0) * 0x13 + carry;
36250 num.words[i] = lo;
36255 num.words[num.length++] = carry;
36258 return num;
36371 Red.prototype.shl = function shl(a, num) {
36374 return this.imod(a.ushln(num));
36465 Red.prototype.pow = function pow(a, num) {
36466 if (num.isZero()) return new BN(1).toRed(this);
36467 if (num.cmpn(1) === 0) return a.clone();
36480 var start = num.bitLength() % 26;
36486 for (i = num.length - 1; i >= 0; i--) {
36487 var word = num.words[i];
36516 Red.prototype.convertTo = function convertTo(num) {
36517 var r = num.umod(this.m);
36518 return r === num ? r.clone() : r;
36521 Red.prototype.convertFrom = function convertFrom(num) {
36522 var res = num.clone();
36530 BN.mont = function mont(num) {
36531 return new Mont(num);
36552 Mont.prototype.convertTo = function convertTo(num) {
36553 return this.imod(num.ushln(this.shift));
36556 Mont.prototype.convertFrom = function convertFrom(num) {
36557 var r = this.imod(num.mul(this.rinv));
45124 exports.r28shl = function r28shl(num, shift) {
45125 return num << shift & 0xfffffff | num >>> 28 - shift;
45195 exports.permute = function permute(num) {
45200 out |= num >>> permuteTable[i] & 0x1;
45206 exports.padSplit = function padSplit(num, size, group) {
45207 var str = num.toString(2);
45555 var num, n2;
45558 num = new BN(randomBytes(Math.ceil(bits / 8)));
45560 while (num.bitLength() > bits) {
45561 num.ishrn(1);
45564 if (num.isEven()) {
45565 num.iadd(ONE);
45568 if (!num.testn(1)) {
45569 num.iadd(TWO);
45573 while (num.mod(TWENTYFOUR).cmp(ELEVEN)) {
45574 num.iadd(FOUR);
45577 while (num.mod(TEN).cmp(THREE)) {
45578 num.iadd(FOUR);
45582 n2 = num.shrn(1);
45584 …(simpleSieve(n2) && simpleSieve(num) && fermatTest(n2) && fermatTest(num) && millerRabin.test(n2) …
45585 return num;
46034 EdwardsCurve.prototype._mulA = function _mulA(num) {
46035 if (this.mOneA) return num.redNeg();else return this.a.redMul(num);
46038 EdwardsCurve.prototype._mulC = function _mulC(num) {
46039 if (this.oneC) return num;else return this.c.redMul(num);
46648 ShortCurve.prototype._getEndoRoots = function _getEndoRoots(num) {
46652 var red = num === this.p ? this.red : BN.mont(num);
48175 EDDSA.prototype.encodeInt = function encodeInt(num) {
48176 return num.toArray('le', this.encodingLength);
48369 function getNAF(num, w, bits) {
48370 var naf = new Array(Math.max(num.bitLength(), bits) + 1);
48373 var k = num.clone();
50359 function rotr64_hi(ah, al, num) {
50360 var r = al << 32 - num | ah >>> num;
50366 function rotr64_lo(ah, al, num) {
50367 var r = ah << 32 - num | al >>> num;
50373 function shr64_hi(ah, al, num) {
50374 return ah >>> num;
50379 function shr64_lo(ah, al, num) {
50380 var r = ah << 32 - num | al >>> num;
71077 var num;
71085 num = cache[cur++];
71087 if (num) {
71088 out[i++] = num;
78072 var num = NaN;
78075 num = parseInt(entity.slice(2), 16);
78077 num = parseInt(entity.slice(1), 10);
78081 if (!this.isChar(num)) {
78086 return String.fromCodePoint(num);
78272 function rotl5(num) {
78273 return num << 5 | num >>> 27;
78276 function rotl30(num) {
78277 return num << 30 | num >>> 2;
78368 function rotl1(num) {
78369 return num << 1 | num >>> 31;
78372 function rotl5(num) {
78373 return num << 5 | num >>> 27;
78376 function rotl30(num) {
78377 return num << 30 | num >>> 2;
82721 function bitRotateLeft(num, cnt) {
82722 return num << cnt | num >>> 32 - cnt;