# BigInteger

An arbitrary-size integer. All methods accepting a number as a parameter accept either a BigInteger instance, an integer, or a string representing an arbitrary size integer.
extends Brick\Math\BigNumber
Methods Summary
``` protected ```
# `__construct( string \$value )`
Protected constructor. Use a factory method to obtain an instance.
``` public static ```
# `of( \BigNumber|\number|string \$value )`
Creates a BigInteger of the given value.

## Overrides

``` Brick\Math\BigNumber::of() ```
``` public static ```
# `parse( string \$number , int \$base = 10 )`
Parses a string containing an integer in an arbitrary base. The string can optionally be prefixed with the `+` or `-` sign.
``` public static ```
# `zero( )`
Returns a BigInteger representing zero.
``` public static ```
# `one( )`
Returns a BigInteger representing one.
``` public static ```
# `ten( )`
Returns a BigInteger representing ten.
``` public ```
# `plus( \BigNumber|\number|string \$that )`
Returns the sum of this number and the given one.
``` public ```
# `minus( \BigNumber|\number|string \$that )`
Returns the difference of this number and the given one.
``` public ```
# `multipliedBy( \BigNumber|\number|string \$that )`
Returns the product of this number and the given one.
``` public ```
# `dividedBy( \BigNumber|\number|string \$that , int \$roundingMode = 0 )`
Returns the result of the division of this number by the given one.
``` public ```
# `power( int \$exponent )`
Returns this number exponentiated to the given value.
``` public ```
# `quotient( \BigNumber|\number|string \$that )`
Returns the quotient of the division of this number by the given one.
``` public ```
# `remainder( \BigNumber|\number|string \$that )`
Returns the remainder of the division of this number by the given one.
``` public ```
# `quotientAndRemainder( \BigNumber|\number|string \$that )`
Returns the quotient and remainder of the division of this number by the given one.
``` public ```
# `gcd( \BigNumber|\number|string \$that )`
Returns the greatest common divisor of this number and the given one. The GCD is always positive, unless both operands are zero, in which case it is zero.
``` public ```
# `abs( )`
Returns the absolute value of this number.
``` public ```
# `negated( )`
Returns the inverse of this number.
``` public ```
# `compareTo( \$that )`
{@inheritdoc}
``` public ```
# `getSign( )`
{@inheritdoc}
``` public ```
# `toBigInteger( )`
{@inheritdoc}
``` public ```
# `toBigDecimal( )`
{@inheritdoc}
``` public ```
# `toBigRational( )`
{@inheritdoc}
``` public ```
# `toScale( int \$scale , int \$roundingMode = 0 )`
{@inheritdoc}
``` public ```
# `toInt( )`
{@inheritdoc}
``` public ```
# `toFloat( )`
{@inheritdoc}
``` public ```
# `toBase( int \$base )`
Returns a string representation of this number in the given base.
``` public ```
# `__toString( )`
{@inheritdoc}
Methods inherited from Brick\Math\BigNumber
`of()`, `min()`, `max()`, `isEqualTo()`, `isLessThan()`, `isLessThanOrEqualTo()`, `isGreaterThan()`, `isGreaterThanOrEqualTo()`, `isZero()`, `isNegative()`, `isNegativeOrZero()`, `isPositive()`, `isPositiveOrZero()`, `getSign()`, `compareTo()`, `toBigInteger()`, `toBigDecimal()`, `toBigRational()`, `toScale()`, `toInt()`, `toFloat()`, `__toString()`, `jsonSerialize()`