| Package | Description |
|---|---|
| org.jscience.mathematics.number |
Provides common types of numbers most of them implementing the
field interface. |
| Modifier and Type | Field and Description |
|---|---|
static LargeInteger |
LargeInteger.ONE
The large integer representing the multiplicative identity.
|
static LargeInteger |
LargeInteger.ZERO
The large integer representing the additive identity.
|
| Modifier and Type | Method and Description |
|---|---|
LargeInteger |
LargeInteger.abs()
Returns the absolute value of this large integer.
|
LargeInteger |
LargeInteger.copy() |
LargeInteger |
LargeInteger.divide(int divisor)
Returns this large integer divided by the specified
int
divisor. |
LargeInteger |
LargeInteger.divide(LargeInteger that)
Returns this large integer divided by the one specified (integer
division).
|
LargeInteger |
LargeInteger.gcd(LargeInteger that)
Returns the greatest common divisor of this large integer and
the one specified.
|
LargeInteger |
Rational.getDividend()
Returns the smallest dividend of the fraction representing this
rational number.
|
LargeInteger |
Rational.getDivisor()
Returns the smallest divisor of the fraction representing this
rational (always positive).
|
static LargeInteger |
ModuloInteger.getModulus()
Returns the
local modulus
for modular arithmetic or null if the arithmetic operations
are non-modular (default). |
LargeInteger |
LargeInteger.getRemainder()
Returns the final undivided part after division that is less or of
lower degree than the divisor.
|
LargeInteger |
FloatingPoint.getSignificand()
Returns the significand value.
|
LargeInteger |
Real.getSignificand()
Returns this real
significand value.
|
LargeInteger |
LargeInteger.inverseScaled(int precision)
Returns a scaled approximation of
1 / this. |
LargeInteger |
LargeInteger.minus(LargeInteger that)
Returns the difference between this large integer and the one
specified.
|
LargeInteger |
LargeInteger.minus(long value)
Returns the difference between this large integer and the specified
value
|
LargeInteger |
LargeInteger.mod(LargeInteger m)
Returns this large integer modulo the specified large integer.
|
LargeInteger |
LargeInteger.modInverse(LargeInteger m)
Returns the large integer whose value is
(this-1 mod m)
. |
LargeInteger |
LargeInteger.modPow(LargeInteger exp,
LargeInteger m)
Returns this large integer raised at the specified exponent modulo
the specified modulus.
|
LargeInteger |
ModuloInteger.moduloValue()
Returns the current modulo value of this number.
|
LargeInteger |
LargeInteger.opposite()
Returns the opposite of this large integer.
|
static LargeInteger |
LargeInteger.parse(CharSequence csq,
int radix,
javolution.text.TextFormat.Cursor cursor)
Parses the specified character sequence from the specified position
as a large integer in the specified radix.
|
LargeInteger |
LargeInteger.plus(LargeInteger that)
Returns the sum of this large integer with the one specified.
|
LargeInteger |
LargeInteger.plus(long value)
Returns the sum of this large integer with the specified
long integer (convenience method) |
LargeInteger |
LargeInteger.remainder(LargeInteger that)
Returns the remainder of the division of this large integer with
the one specified (convenience method equivalent to
this.divide(that).getRemainder()). |
LargeInteger |
FloatingPoint.round()
Returns the closest integer to this floating point number.
|
LargeInteger |
Rational.round()
Returns the closest integer value to this rational number.
|
LargeInteger |
Real.round()
Returns the closest integer value to this rational number.
|
LargeInteger |
LargeInteger.shiftLeft(int n)
Returns the value of this large integer after performing a binary
shift to left.
|
LargeInteger |
LargeInteger.shiftRight(int n)
Returns the value of this large integer after performing a binary
shift to right with sign extension
(-1 >> 1 == -1). |
LargeInteger |
LargeInteger.sqrt()
Returns the integer square root of this integer.
|
LargeInteger |
LargeInteger.times(LargeInteger that)
Returns the product of this large integer with the one specified.
|
LargeInteger |
LargeInteger.times(long multiplier)
Returns the product of this large integer with the specified
long multiplier. |
LargeInteger |
LargeInteger.times10pow(int n)
Returns the value of this large integer after multiplication by
a power of ten.
|
LargeInteger |
LargeInteger.times2pow(int n)
Returns the value of this large integer after multiplication by
a power of two.
|
static LargeInteger |
LargeInteger.valueOf(BigInteger bigInteger)
Returns the large integer corresponding to the specified
java.math.BigInteger instance. |
static LargeInteger |
LargeInteger.valueOf(byte[] bytes,
int offset,
int length)
Returns the large integer of specified two's-complement binary
representation.
|
static LargeInteger |
LargeInteger.valueOf(CharSequence csq)
Returns the large integer for the specified character sequence
using the current
format. |
static LargeInteger |
LargeInteger.valueOf(CharSequence csq,
int radix)
Returns the large integer for the specified character sequence in
the specified radix.
|
static LargeInteger |
LargeInteger.valueOf(long value)
Returns the large integer of specified
long value. |
| Modifier and Type | Method and Description |
|---|---|
int |
LargeInteger.compareTo(LargeInteger that)
Compares two large integers numerically.
|
LargeInteger |
LargeInteger.divide(LargeInteger that)
Returns this large integer divided by the one specified (integer
division).
|
static Appendable |
LargeInteger.format(LargeInteger li,
int radix,
Appendable out)
Formats the specified large integer in the specified radix and into
the specified
Appendable argument. |
LargeInteger |
LargeInteger.gcd(LargeInteger that)
Returns the greatest common divisor of this large integer and
the one specified.
|
boolean |
LargeInteger.isLargerThan(LargeInteger that)
Indicates if this large integer is larger than the one
specified in absolute value.
|
LargeInteger |
LargeInteger.minus(LargeInteger that)
Returns the difference between this large integer and the one
specified.
|
LargeInteger |
LargeInteger.mod(LargeInteger m)
Returns this large integer modulo the specified large integer.
|
LargeInteger |
LargeInteger.modInverse(LargeInteger m)
Returns the large integer whose value is
(this-1 mod m)
. |
LargeInteger |
LargeInteger.modPow(LargeInteger exp,
LargeInteger m)
Returns this large integer raised at the specified exponent modulo
the specified modulus.
|
LargeInteger |
LargeInteger.plus(LargeInteger that)
Returns the sum of this large integer with the one specified.
|
LargeInteger |
LargeInteger.remainder(LargeInteger that)
Returns the remainder of the division of this large integer with
the one specified (convenience method equivalent to
this.divide(that).getRemainder()). |
static void |
ModuloInteger.setModulus(LargeInteger modulus)
Sets the
local modulus
for modular arithmetic. |
LargeInteger |
LargeInteger.times(LargeInteger that)
Returns the product of this large integer with the one specified.
|
static ModuloInteger |
ModuloInteger.valueOf(LargeInteger value)
Returns the modulo integer having the specified value (independently of
the current modulo).
|
static FloatingPoint |
FloatingPoint.valueOf(LargeInteger significand,
int exponent)
Returns the floating point number for the specified
LargeInteger significand and power of two exponent. |
static Real |
Real.valueOf(LargeInteger significand,
int error,
int exponent)
Returns a real having the specified significand, error and exponent values.
|
static Rational |
Rational.valueOf(LargeInteger dividend,
LargeInteger divisor)
Returns the rational number for the specified large integer
dividend and divisor.
|