Integer
+ + + + + + + + + + + + + + + + + + + + + + + + + +Constructor Summary
Public Constructor | ||
+ public + + + + + | +
+
+
+ + + + + constructor() + +
+
+
+
+
+ |
+ + + + | +
Member Summary
Private Members | ||
+ private + + + + + | +
+
+
+ + + + + _base: * + +
+
+
+
+
+ |
+ + + + | +
+ private + + + + + | +
+
+
+ + + + + _is_negative: * + +
+
+
+
+
+ |
+ + + + | +
+ private + + + + + | +
+
+
+ + + + + _limbs: * + +
+
+
+
+
+ |
+ + + + | +
Method Summary
Public Methods | ||
+ public + + + + + | +
+
+
+ + + + + abs(): * + +
+
+
+
+
+ |
+ + + + | +
+ public + + + + + | +
+
+
+ + + + + add(other: *): * + +
+
+
+
+
+ |
+ + + + | +
+ public + + + + + | +
+
+
+ + + + + addn(number: *): * + +
+
+
+
+
+ |
+ + + + | +
+ public + + + + + | +
+
+
+ + + + + bin(): * + +
+
+
+
+
+ |
+ + + + | +
+ public + + + + + | +
+
+
+ + + + + bits(): * + +
+
+
+
+
+ |
+ + + + | +
+ public + + + + + | +
+
+
+ + + + + clone(): * + +
+
+
+
+
+ |
+ + + + | +
+ public + + + + + | +
+
+
+ + + + + cmp(other: *): * + +
+
+
+
+
+ |
+ + + + | +
+ public + + + + + | +
+
+
+ + + + + cmpn(number: *): * + +
+
+
+
+
+ |
+ + + + | +
+ public + + + + + | +
+
+
+ + + + + digits(base: *): * + +
+
+
+
+
+ |
+ + + + | +
+ public + + + + + | +
+
+
+ + + + + div(other: *): * + +
+
+
+
+
+ |
+ + + + | +
+ public + + + + + | +
+
+
+ + + + + divide_knowing_divisible_by(other: *): * + +
+
+
+
+
+ |
+ + + + | +
+ public + + + + + | +
+
+
+ + + + + divides(other: *): * + +
+
+
+
+
+ |
+ + + + | +
+ public + + + + + | +
+
+
+
+
+
+
+ |
+ + + + | +
+ public + + + + + | +
+
+
+ + + + + divmodn(number: *): * + +
+
+
+
+
+ |
+ + + + | +
+ public + + + + + | +
+
+
+ + + + + divn(number: *): * + +
+
+
+
+
+ |
+ + + + | +
+ public + + + + + | +
+
+
+ + + + + divround(other: *): * + +
+
+
+
+
+ |
+ + + + | +
+ public + + + + + | +
+
+
+ + + + + egcd(other: *): {"gcd": *, "x": *, "y": *, "u": *, "v": *} + +
+
+
+
+
+ |
+ + + + | +
+ public + + + + + | +
+
+
+ + + + + eq(other: *): * + +
+
+
+
+
+ |
+ + + + | +
+ public + + + + + | +
+
+
+ + + + + eqn(number: *): * + +
+
+
+
+
+ |
+ + + + | +
+ public + + + + + | +
+
+
+ + + + + gcd(other: *): * + +
+
+
+
+
+ |
+ + + + | +
+ public + + + + + | +
+
+
+ + + + + ge(other: *): * + +
+
+
+
+
+ |
+ + + + | +
+ public + + + + + | +
+
+
+ + + + + gen(number: *): * + +
+
+
+
+
+ |
+ + + + | +
+ public + + + + + | +
+
+
+ + + + + gt(other: *): * + +
+
+
+
+
+ |
+ + + + | +
+ public + + + + + | +
+
+
+ + + + + gtn(number: *): * + +
+
+
+
+
+ |
+ + + + | +
+ public + + + + + | +
+
+
+ + + + + hex(): * + +
+
+
+
+
+ |
+ + + + | +
+ public + + + + + | +
+
+
+ + + + + iabs(): * + +
+
+
+
+
+ |
+ + + + | +
+ public + + + + + | +
+
+
+ + + + + iadd(other: *): * + +
+
+
+
+
+ |
+ + + + | +
+ public + + + + + | +
+
+
+ + + + + iaddn(number: *): * + +
+
+
+
+
+ |
+ + + + | +
+ public + + + + + | +
+
+
+ + + + + idiv(other: *): * + +
+
+
+
+
+ |
+ + + + | +
+ public + + + + + | +
+
+
+
+
+
+
+ |
+ + + + | +
+ public + + + + + | +
+
+
+
+
+
+
+ |
+ + + + | +
+ public + + + + + | +
+
+
+ + + + + idivn(number: *): * + +
+
+
+
+
+ |
+ + + + | +
+ public + + + + + | +
+
+
+ + + + + imod(other: *): * + +
+
+
+
+
+ |
+ + + + | +
+ public + + + + + | +
+
+
+ + + + + imodn(number: *): * + +
+
+
+
+
+ |
+ + + + | +
+ public + + + + + | +
+
+
+ + + + + imul(other: *): * + +
+
+
+
+
+ |
+ + + + | +
+ public + + + + + | +
+
+
+ + + + + imuln(number: *): * + +
+
+
+
+
+ |
+ + + + | +
+ public + + + + + | +
+
+
+ + + + + ipow(other: *): * + +
+
+
+
+
+ |
+ + + + | +
+ public + + + + + | +
+
+
+ + + + + ipown(number: *): * + +
+
+
+
+
+ |
+ + + + | +
+ public + + + + + | +
+
+
+ + + + + iseven(): * + +
+
+
+
+
+ |
+ + + + | +
+ public + + + + + | +
+
+
+ + + + + isnegative(): * + +
+
+
+
+
+ |
+ + + + | +
+ public + + + + + | +
+
+
+ + + + + isnonnegative(): * + +
+
+
+
+
+ |
+ + + + | +
+ public + + + + + | +
+
+
+ + + + + isnonpositive(): * + +
+
+
+
+
+ |
+ + + + | +
+ public + + + + + | +
+
+
+ + + + + isnonzero(): * + +
+
+
+
+
+ |
+ + + + | +
+ public + + + + + | +
+
+
+ + + + + isodd(): * + +
+
+
+
+
+ |
+ + + + | +
+ public + + + + + | +
+
+
+ + + + + isone(): * + +
+
+
+
+
+ |
+ + + + | +
+ public + + + + + | +
+
+
+ + + + + ispositive(): * + +
+
+
+
+
+ |
+ + + + | +
+ public + + + + + | +
+
+
+ + + + + isquare(): * + +
+
+
+
+
+ |
+ + + + | +
+ public + + + + + | +
+
+
+ + + + + isub(other: *): * + +
+
+
+
+
+ |
+ + + + | +
+ public + + + + + | +
+
+
+ + + + + isubn(number: *): * + +
+
+
+
+
+ |
+ + + + | +
+ public + + + + + | +
+
+
+ + + + + iszero(): * + +
+
+
+
+
+ |
+ + + + | +
+ public + + + + + | +
+
+
+ + + + + le(other: *): * + +
+
+
+
+
+ |
+ + + + | +
+ public + + + + + | +
+
+
+ + + + + len(number: *): * + +
+
+
+
+
+ |
+ + + + | +
+ public + + + + + | +
+
+
+ + + + + lt(other: *): * + +
+
+
+
+
+ |
+ + + + | +
+ public + + + + + | +
+
+
+ + + + + ltn(number: *): * + +
+
+
+
+
+ |
+ + + + | +
+ public + + + + + | +
+
+
+ + + + + mod(other: *): * + +
+
+
+
+
+ |
+ + + + | +
+ public + + + + + | +
+
+
+ + + + + modn(number: *): * + +
+
+
+
+
+ |
+ + + + | +
+ public + + + + + | +
+
+
+ + + + + move(other: *): * + +
+
+
+
+
+ |
+ + + + | +
+ public + + + + + | +
+
+
+ + + + + mul(other: *): * + +
+
+
+
+
+ |
+ + + + | +
+ public + + + + + | +
+
+
+ + + + + muln(number: *): * + +
+
+
+
+
+ |
+ + + + | +
+ public + + + + + | +
+
+
+ + + + + ne(other: *): * + +
+
+
+
+
+ |
+ + + + | +
+ public + + + + + | +
+
+
+ + + + + negate(): * + +
+
+
+
+
+ |
+ + + + | +
+ public + + + + + | +
+
+
+ + + + + nen(number: *): * + +
+
+
+
+
+ |
+ + + + | +
+ public + + + + + | +
+
+
+ + + + + oct(): * + +
+
+
+
+
+ |
+ + + + | +
+ public + + + + + | +
+
+
+ + + + + opposite(): * + +
+
+
+
+
+ |
+ + + + | +
+ public + + + + + | +
+
+
+ + + + + parity(): * + +
+
+
+
+
+ |
+ + + + | +
+ public + + + + + | +
+
+
+ + + + + pow(other: *): * + +
+
+
+
+
+ |
+ + + + | +
+ public + + + + + | +
+
+
+
+
+
+ Computes |
+ + + + | +
+ public + + + + + | +
+
+
+ + + + + sign(): * + +
+
+
+
+
+ |
+ + + + | +
+ public + + + + + | +
+
+
+ + + + + square(): * + +
+
+
+
+
+ |
+ + + + | +
+ public + + + + + | +
+
+
+ + + + + sub(other: *): * + +
+
+
+
+
+ |
+ + + + | +
+ public + + + + + | +
+
+
+ + + + + subn(number: *): * + +
+
+
+
+
+ |
+ + + + | +
+ public + + + + + | +
+
+
+ + + + + toJSON(): * + +
+
+
+
+
+ |
+ + + + | +
+ public + + + + + | +
+
+
+ + + + + toNumber(): * + +
+
+
+
+
+ |
+ + + + | +
+ public + + + + + | +
+
+
+ + + + + toString(base: *): * + +
+
+
+
+
+ |
+ + + + | +
+ public + + + + + | +
+
+
+ + + + + valueOf(): * + +
+
+
+
+
+ |
+ + + + | +
Private Methods | ||
+ private + + + + + | +
+
+
+ + + + + _limbs_in_base(base: *): * + +
+
+
+
+
+ |
+ + + + | +
Public Constructors
+ ++ public + + + + + + constructor() + + + + source + +
+ + + + + + + + +Private Members
+ ++ private + + + + + + _base: * + + + + source + +
+ + + + + + + + ++ private + + + + + + _is_negative: * + + + + source + +
+ + + + + + + + ++ private + + + + + + _limbs: * + + + + source + +
+ + + + + + + + +Public Methods
+ ++ public + + + + + + abs(): * + + + + source + +
+ + + + + + + + +Return:
+* | + +
+ public + + + + + + add(other: *): * + + + + source + +
+ + + + + + + + +Params:
+Name | Type | Attribute | Description |
other | +* | ++ | + |
Return:
+* | + +
+ public + + + + + + addn(number: *): * + + + + source + +
+ + + + + + + + +Params:
+Name | Type | Attribute | Description |
number | +* | ++ | + |
Return:
+* | + +
+ public + + + + + + bin(): * + + + + source + +
+ + + + + + + + +Return:
+* | + +
+ public + + + + + + bits(): * + + + + source + +
+ + + + + + + + +Return:
+* | + +
+ public + + + + + + clone(): * + + + + source + +
+ + + + + + + + +Return:
+* | + +
+ public + + + + + + cmp(other: *): * + + + + source + +
+ + + + + + + + +Params:
+Name | Type | Attribute | Description |
other | +* | ++ | + |
Return:
+* | + +
+ public + + + + + + cmpn(number: *): * + + + + source + +
+ + + + + + + + +Params:
+Name | Type | Attribute | Description |
number | +* | ++ | + |
Return:
+* | + +
+ public + + + + + + digits(base: *): * + + + + source + +
+ + + + + + + + +Params:
+Name | Type | Attribute | Description |
base | +* | +
|
+ + |
Return:
+* | + +
+ public + + + + + + div(other: *): * + + + + source + +
+ + + + + + + + +Params:
+Name | Type | Attribute | Description |
other | +* | ++ | + |
Return:
+* | + +
+ public + + + + + + divide_knowing_divisible_by(other: *): * + + + + source + +
+ + + + + + + + +Params:
+Name | Type | Attribute | Description |
other | +* | ++ | + |
Return:
+* | + +
+ public + + + + + + divides(other: *): * + + + + source + +
+ + + + + + + + +Params:
+Name | Type | Attribute | Description |
other | +* | ++ | + |
Return:
+* | + +
+ public + + + + + + divmod(other: *): undefined[] + + + + source + +
+ + + + + + + + +Params:
+Name | Type | Attribute | Description |
other | +* | ++ | + |
+ public + + + + + + divmodn(number: *): * + + + + source + +
+ + + + + + + + +Params:
+Name | Type | Attribute | Description |
number | +* | ++ | + |
Return:
+* | + +
+ public + + + + + + divn(number: *): * + + + + source + +
+ + + + + + + + +Params:
+Name | Type | Attribute | Description |
number | +* | ++ | + |
Return:
+* | + +
+ public + + + + + + divround(other: *): * + + + + source + +
+ + + + + + + + +Params:
+Name | Type | Attribute | Description |
other | +* | ++ | + |
Return:
+* | + +
+ public + + + + + + egcd(other: *): {"gcd": *, "x": *, "y": *, "u": *, "v": *} + + + + source + +
+ + + + + + + + +Params:
+Name | Type | Attribute | Description |
other | +* | ++ | + |
Return:
+{"gcd": *, "x": *, "y": *, "u": *, "v": *} | + +
+ public + + + + + + eq(other: *): * + + + + source + +
+ + + + + + + + +Params:
+Name | Type | Attribute | Description |
other | +* | ++ | + |
Return:
+* | + +
+ public + + + + + + eqn(number: *): * + + + + source + +
+ + + + + + + + +Params:
+Name | Type | Attribute | Description |
number | +* | ++ | + |
Return:
+* | + +
+ public + + + + + + gcd(other: *): * + + + + source + +
+ + + + + + + + +Params:
+Name | Type | Attribute | Description |
other | +* | ++ | + |
Return:
+* | + +
+ public + + + + + + ge(other: *): * + + + + source + +
+ + + + + + + + +Params:
+Name | Type | Attribute | Description |
other | +* | ++ | + |
Return:
+* | + +
+ public + + + + + + gen(number: *): * + + + + source + +
+ + + + + + + + +Params:
+Name | Type | Attribute | Description |
number | +* | ++ | + |
Return:
+* | + +
+ public + + + + + + gt(other: *): * + + + + source + +
+ + + + + + + + +Params:
+Name | Type | Attribute | Description |
other | +* | ++ | + |
Return:
+* | + +
+ public + + + + + + gtn(number: *): * + + + + source + +
+ + + + + + + + +Params:
+Name | Type | Attribute | Description |
number | +* | ++ | + |
Return:
+* | + +
+ public + + + + + + hex(): * + + + + source + +
+ + + + + + + + +Return:
+* | + +
+ public + + + + + + iabs(): * + + + + source + +
+ + + + + + + + +Return:
+* | + +
+ public + + + + + + iadd(other: *): * + + + + source + +
+ + + + + + + + +Params:
+Name | Type | Attribute | Description |
other | +* | ++ | + |
Return:
+* | + +
+ public + + + + + + iaddn(number: *): * + + + + source + +
+ + + + + + + + +Params:
+Name | Type | Attribute | Description |
number | +* | ++ | + |
Return:
+* | + +
+ public + + + + + + idiv(other: *): * + + + + source + +
+ + + + + + + + +Params:
+Name | Type | Attribute | Description |
other | +* | ++ | + |
Return:
+* | + +
+ public + + + + + + idivmod(other: *): undefined[] + + + + source + +
+ + + + + + + + +Params:
+Name | Type | Attribute | Description |
other | +* | ++ | + |
+ public + + + + + + idivmodn(number: *): undefined[] + + + + source + +
+ + + + + + + + +Params:
+Name | Type | Attribute | Description |
number | +* | ++ | + |
+ public + + + + + + idivn(number: *): * + + + + source + +
+ + + + + + + + +Params:
+Name | Type | Attribute | Description |
number | +* | ++ | + |
Return:
+* | + +
+ public + + + + + + imod(other: *): * + + + + source + +
+ + + + + + + + +Params:
+Name | Type | Attribute | Description |
other | +* | ++ | + |
Return:
+* | + +
+ public + + + + + + imodn(number: *): * + + + + source + +
+ + + + + + + + +Params:
+Name | Type | Attribute | Description |
number | +* | ++ | + |
Return:
+* | + +
+ public + + + + + + imul(other: *): * + + + + source + +
+ + + + + + + + +Params:
+Name | Type | Attribute | Description |
other | +* | ++ | + |
Return:
+* | + +
+ public + + + + + + imuln(number: *): * + + + + source + +
+ + + + + + + + +Params:
+Name | Type | Attribute | Description |
number | +* | ++ | + |
Return:
+* | + +
+ public + + + + + + ipow(other: *): * + + + + source + +
+ + + + + + + + +Params:
+Name | Type | Attribute | Description |
other | +* | ++ | + |
Return:
+* | + +
+ public + + + + + + ipown(number: *): * + + + + source + +
+ + + + + + + + +Params:
+Name | Type | Attribute | Description |
number | +* | ++ | + |
Return:
+* | + +
+ public + + + + + + iseven(): * + + + + source + +
+ + + + + + + + +Return:
+* | + +
+ public + + + + + + isnegative(): * + + + + source + +
+ + + + + + + + +Return:
+* | + +
+ public + + + + + + isnonnegative(): * + + + + source + +
+ + + + + + + + +Return:
+* | + +
+ public + + + + + + isnonpositive(): * + + + + source + +
+ + + + + + + + +Return:
+* | + +
+ public + + + + + + isnonzero(): * + + + + source + +
+ + + + + + + + +Return:
+* | + +
+ public + + + + + + isodd(): * + + + + source + +
+ + + + + + + + +Return:
+* | + +
+ public + + + + + + isone(): * + + + + source + +
+ + + + + + + + +Return:
+* | + +
+ public + + + + + + ispositive(): * + + + + source + +
+ + + + + + + + +Return:
+* | + +
+ public + + + + + + isquare(): * + + + + source + +
+ + + + + + + + +Return:
+* | + +
+ public + + + + + + isub(other: *): * + + + + source + +
+ + + + + + + + +Params:
+Name | Type | Attribute | Description |
other | +* | ++ | + |
Return:
+* | + +
+ public + + + + + + isubn(number: *): * + + + + source + +
+ + + + + + + + +Params:
+Name | Type | Attribute | Description |
number | +* | ++ | + |
Return:
+* | + +
+ public + + + + + + iszero(): * + + + + source + +
+ + + + + + + + +Return:
+* | + +
+ public + + + + + + le(other: *): * + + + + source + +
+ + + + + + + + +Params:
+Name | Type | Attribute | Description |
other | +* | ++ | + |
Return:
+* | + +
+ public + + + + + + len(number: *): * + + + + source + +
+ + + + + + + + +Params:
+Name | Type | Attribute | Description |
number | +* | ++ | + |
Return:
+* | + +
+ public + + + + + + lt(other: *): * + + + + source + +
+ + + + + + + + +Params:
+Name | Type | Attribute | Description |
other | +* | ++ | + |
Return:
+* | + +
+ public + + + + + + ltn(number: *): * + + + + source + +
+ + + + + + + + +Params:
+Name | Type | Attribute | Description |
number | +* | ++ | + |
Return:
+* | + +
+ public + + + + + + mod(other: *): * + + + + source + +
+ + + + + + + + +Params:
+Name | Type | Attribute | Description |
other | +* | ++ | + |
Return:
+* | + +
+ public + + + + + + modn(number: *): * + + + + source + +
+ + + + + + + + +Params:
+Name | Type | Attribute | Description |
number | +* | ++ | + |
Return:
+* | + +
+ public + + + + + + move(other: *): * + + + + source + +
+ + + + + + + + +Params:
+Name | Type | Attribute | Description |
other | +* | ++ | + |
Return:
+* | + +
+ public + + + + + + mul(other: *): * + + + + source + +
+ + + + + + + + +Params:
+Name | Type | Attribute | Description |
other | +* | ++ | + |
Return:
+* | + +
+ public + + + + + + muln(number: *): * + + + + source + +
+ + + + + + + + +Params:
+Name | Type | Attribute | Description |
number | +* | ++ | + |
Return:
+* | + +
+ public + + + + + + ne(other: *): * + + + + source + +
+ + + + + + + + +Params:
+Name | Type | Attribute | Description |
other | +* | ++ | + |
Return:
+* | + +
+ public + + + + + + negate(): * + + + + source + +
+ + + + + + + + +Return:
+* | + +
+ public + + + + + + nen(number: *): * + + + + source + +
+ + + + + + + + +Params:
+Name | Type | Attribute | Description |
number | +* | ++ | + |
Return:
+* | + +
+ public + + + + + + oct(): * + + + + source + +
+ + + + + + + + +Return:
+* | + +
+ public + + + + + + opposite(): * + + + + source + +
+ + + + + + + + +Return:
+* | + +
+ public + + + + + + parity(): * + + + + source + +
+ + + + + + + + +Return:
+* | + +
+ public + + + + + + pow(other: *): * + + + + source + +
+ + + + + + + + +Params:
+Name | Type | Attribute | Description |
other | +* | ++ | + |
Return:
+* | + +
+ public + + + + + + pown(x: Number): Integer + + + + source + +
+ + + + +Computes this
raised to the x
th power.
+x
is a double smaller or equal to 2^53.
Params:
+Name | Type | Attribute | Description |
x | +Number | ++ | The power to raise |
+
+ public + + + + + + sign(): * + + + + source + +
+ + + + + + + + +Return:
+* | + +
+ public + + + + + + square(): * + + + + source + +
+ + + + + + + + +Return:
+* | + +
+ public + + + + + + sub(other: *): * + + + + source + +
+ + + + + + + + +Params:
+Name | Type | Attribute | Description |
other | +* | ++ | + |
Return:
+* | + +
+ public + + + + + + subn(number: *): * + + + + source + +
+ + + + + + + + +Params:
+Name | Type | Attribute | Description |
number | +* | ++ | + |
Return:
+* | + +
+ public + + + + + + toJSON(): * + + + + source + +
+ + + + + + + + +Return:
+* | + +
+ public + + + + + + toNumber(): * + + + + source + +
+ + + + + + + + +Return:
+* | + +
+ public + + + + + + toString(base: *): * + + + + source + +
+ + + + + + + + +Params:
+Name | Type | Attribute | Description |
base | +* | +
|
+ + |
Return:
+* | + +
+ public + + + + + + valueOf(): * + + + + source + +
+ + + + + + + + +Return:
+* | + +
Private Methods
+ ++ private + + + + + + _limbs_in_base(base: *): * + + + + source + +
+ + + + + + + + +Params:
+Name | Type | Attribute | Description |
base | +* | ++ | + |
Return:
+* | + +