/* global BigInt */ const bigInt = require("big-integer"); if (typeof(BigInt) != "undefined") { const wBigInt = BigInt; wBigInt.prototype.modInv = function (q) { let t = wBigInt.zero; let r = q; let newt = wBigInt.one; let newr = this; while (newr!=wBigInt.zero) { let q = r/newr; [t, newt] = [newt, t-q*newt]; [r, newr] = [newr, r-q*newr]; } if (t> wBigInt(f); }; wBigInt.prototype.greaterOrEquals = function(b) { return this >= b; }; wBigInt.prototype.lesserOrEquals = function(b) { return this <= b; }; wBigInt.prototype.equals = function(b) { return this == b; }; wBigInt.one = BigInt(1); wBigInt.zero = BigInt(0); module.exports = wBigInt; } else { module.exports = bigInt; }