Requires
- module:BigInteger
Members
(static, readonly) ONE
One, the multiplicative identity
Properties:
Name | Type | Description |
---|---|---|
ONE |
(static, readonly) ZERO
Zero, the additive identity
Properties:
Name | Type | Description |
---|---|---|
ZERO |
Methods
(static) abs(out, a) → {bigint}
Absolute value of a bigint
Parameters:
Name | Type | Description |
---|---|---|
out |
bigint | the receiving number |
a |
bigint | number to take the absolute value of |
Returns:
out
- Type
- bigint
(static) clone(a) → {bigint}
Creates a new bigint initialized with values from an existing number
Parameters:
Name | Type | Description |
---|---|---|
a |
bigint | number to clone |
Returns:
a new bigintional number
- Type
- bigint
(static) copy(out, a) → {bigint}
Copy the values from one bigint to another
Parameters:
Name | Type | Description |
---|---|---|
out |
bigint | the receiving number |
a |
bigint | the source number |
Returns:
out
- Type
- bigint
(static) create() → {bigint}
Creates a new, empty bigint
Returns:
a new bigint
- Type
- bigint
(static) fromInteger(out, integer) → {bigint}
Returns a bigint from an integer
Parameters:
Name | Type | Description |
---|---|---|
out |
bigint | the receiving number |
integer |
Integer |
Returns:
out
- Type
- bigint
(static) greatest_common_divisor(a, b) → {BigInteger}
Find the greatest common divisor of two big integers
Parameters:
Name | Type | Description |
---|---|---|
a |
BigInteger | the first operand |
b |
BigInteger | the second operand |
Returns:
greatest common divisor
- Type
- BigInteger
(static) str(a) → {String}
Returns a string representation
Parameters:
Name | Type | Description |
---|---|---|
a |
bigint | number to represent as a string |
Returns:
string representation of the number
- Type
- String
(static) toInteger(a) → {Integer}
Returns an integer to it's native type
Parameters:
Name | Type | Description |
---|---|---|
a |
bigint | number to return as an integer |
Returns:
an integer or Infinity when the max size is exceeded
- Type
- Integer