Modifier and Type | Class and Description |
---|---|
class |
AbstractCompositeNumber
Abstract base class for
CompositeNumber implementations. |
class |
BasicDigitSet
Basic implementation of a
DigitSet . |
class |
BasicRationalNumber
Basic implementation of a rational number.
|
class |
BigIntegerNumber
Basic implementation of an integer number.
|
class |
CompositeNumber
A composite real number.
|
class |
DigitSet
A set of digits, having a radix and an exponent.
|
class |
IntegerNumber
An immutable integer number.
|
class |
Power
A power, consisting of a base and an exponent.
|
class |
Product
A product of two real numbers.
|
class |
RationalNumber
Rational number.
|
class |
SmallIntegerNumber
Implementation of an
IntegerNumber based on a
int value. |
class |
Sum
A sum of two real numbers.
|
Modifier and Type | Method and Description |
---|---|
RealNumber |
RealNumber.abs()
Computes |this|.
|
RealNumber |
IntegerNumber.abs() |
RealNumber |
RealNumber.add(RealNumber n)
Computes this + n, where n is a real number.
|
RealNumber |
RationalNumber.add(RealNumber n) |
RealNumber |
RealNumber.divide(RealNumber n)
Computes this/n, where n is a real number.
|
RealNumber |
RationalNumber.divide(RealNumber n) |
RealNumber |
Power.getBase()
Returns the base of this power.
|
RealNumber |
Sum.getElement(int n) |
abstract RealNumber |
CompositeNumber.getElement(int n)
Returns the nth operand.
|
RealNumber |
AbstractCompositeNumber.getElement(int n) |
RealNumber[] |
Sum.getElements() |
abstract RealNumber[] |
CompositeNumber.getElements()
Returns the operands.
|
RealNumber[] |
AbstractCompositeNumber.getElements() |
RealNumber |
Power.getExponent()
Returns the exponent of this power.
|
RealNumber[] |
CanNotCompareException.getNumbers()
Returns the numbers that could not be compared in a new array.
|
RealNumber |
RealNumber.invert()
Computes 1/this.
|
RealNumber |
RationalNumber.invert() |
RealNumber |
IntegerNumber.invert() |
RealNumber |
RealNumber.multiply(RealNumber n)
Computes this * n, where n is a real number.
|
RealNumber |
RationalNumber.multiply(RealNumber n) |
RealNumber |
RealNumber.negate()
Computes -this.
|
RealNumber |
RationalNumber.negate() |
RealNumber |
IntegerNumber.negate() |
RealNumber |
RealNumber.pow(RealNumber n)
Computes thisn, where n is a real number.
|
protected RealNumber |
RealNumber.powImpl(RealNumber n)
Computes thisn, where n is a real number,
second level.
|
RealNumber |
RationalNumber.powImpl(RealNumber n) |
RealNumber |
RealNumber.subtract(RealNumber n)
Computes this - n, where n is a real number.
|
RealNumber |
RationalNumber.subtract(RealNumber n) |
Modifier and Type | Method and Description |
---|---|
RealNumber |
RealNumber.add(RealNumber n)
Computes this + n, where n is a real number.
|
RealNumber |
RationalNumber.add(RealNumber n) |
static void |
NumberCentral.checkDivideByZero(RealNumber n)
Checks if dividing by the specified number would result in a division by
zero.
|
int |
RealNumber.compareTo(RealNumber n)
Compares this number with the specified number.
|
protected int |
Sum.compareToImpl(RealNumber n) |
protected int |
RealNumber.compareToImpl(RealNumber n)
Compares this number with the specified number, second level.
|
protected int |
RationalNumber.compareToImpl(RealNumber n)
Compares this number with the specified number, second level.
|
protected int |
RationalNumber.compareToImpl2(RealNumber n)
Compares this number with the specified number, third level.
|
static Sum |
Sum.createInstance(RealNumber a,
RealNumber b)
Returns a
Sum with the specified operands. |
static Product |
Product.createInstance(RealNumber a,
RealNumber b)
Returns a
Product with the specified operands. |
static Power |
Power.createInstance(RealNumber base,
RealNumber exponent)
Returns a
Power with the specified operands. |
protected static int |
Product.determineSign(RealNumber a,
RealNumber b)
Computes the sign of a product with the specified operands.
|
protected static int |
Power.determineSign(RealNumber base,
RealNumber exponent)
Computes the sign of a power with the specified operands.
|
RealNumber |
RealNumber.divide(RealNumber n)
Computes this/n, where n is a real number.
|
RealNumber |
RationalNumber.divide(RealNumber n) |
RealNumber |
RealNumber.multiply(RealNumber n)
Computes this * n, where n is a real number.
|
RealNumber |
RationalNumber.multiply(RealNumber n) |
RealNumber |
RealNumber.pow(RealNumber n)
Computes thisn, where n is a real number.
|
protected RealNumber |
RealNumber.powImpl(RealNumber n)
Computes thisn, where n is a real number,
second level.
|
RealNumber |
RationalNumber.powImpl(RealNumber n) |
boolean |
RoundingMode.round(RealNumber number,
int radix,
int digit)
Rounds the specified digit for a number in the specified base.
|
protected abstract boolean |
RoundingMode.roundImpl(RealNumber number,
int sign,
int radix,
int digit)
Actually rounds the specified digit for a number in the specified base.
|
RealNumber |
RealNumber.subtract(RealNumber n)
Computes this - n, where n is a real number.
|
RealNumber |
RationalNumber.subtract(RealNumber n) |
Constructor and Description |
---|
AbstractCompositeNumber(int sign,
java.lang.String asString,
RealNumber[] elements)
Constructs a new
AbstractCompositeNumber object. |
CanNotCompareException(RealNumber a,
RealNumber b)
Constructs a new
CanNotCompareException for a failed
comparison between the specified numbers. |
Power(RealNumber base,
RealNumber exponent)
Constructs a
Power with the specified base and exponent. |
Product(RealNumber a,
RealNumber b)
Constructs a
Product based on the 2 specified operands. |
Sum(RealNumber a,
RealNumber b)
Constructs a
Sum based on the 2 specified operands. |