Class: bigint

bigint

Arbitrary Sized Integer

Constructor

new bigint()

Source:
Requires:
  • module:BigInteger

Requires

  • module:BigInteger

Members

(static, readonly) ONE

One, the multiplicative identity
Properties:
Name Type Description
ONE
Source:

(static, readonly) ZERO

Zero, the additive identity
Properties:
Name Type Description
ZERO
Source:

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
Source:
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
Source:
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
Source:
Returns:
out
Type
bigint

(static) create() → {bigint}

Creates a new, empty bigint
Source:
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
Source:
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
Source:
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
Source:
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
Source:
Returns:
an integer or Infinity when the max size is exceeded
Type
Integer