pow and abs in the bigInt wrapper
This commit is contained in:
parent
83bca745d0
commit
3cbc29caf1
@ -177,6 +177,14 @@ if (typeof(BigInt) != "undefined") {
|
|||||||
return this % c;
|
return this % c;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
wBigInt.prototype.pow = function(c) {
|
||||||
|
return this ** c;
|
||||||
|
};
|
||||||
|
|
||||||
|
wBigInt.prototype.abs = function() {
|
||||||
|
return (this > wBigInt.zero) ? this : -this;
|
||||||
|
};
|
||||||
|
|
||||||
wBigInt.prototype.modPow = function(e, m) {
|
wBigInt.prototype.modPow = function(e, m) {
|
||||||
let acc = wBigInt.one;
|
let acc = wBigInt.one;
|
||||||
let exp = this;
|
let exp = this;
|
||||||
|
Loading…
Reference in New Issue
Block a user