| 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 Rational |
Rational.ONE
The
Rational representing the multiplicative identity. |
static Rational |
Rational.ZERO
The
Rational representing the additive identity. |
| Modifier and Type | Method and Description |
|---|---|
Rational |
Rational.abs()
Returns the absolute value of this rational number.
|
Rational |
Rational.copy() |
Rational |
Rational.divide(Rational that)
Returns this rational number divided by the one specified.
|
Rational |
Rational.inverse()
Returns the inverse of this rational number.
|
Rational |
Rational.minus(Rational that)
Returns the difference between this rational number and the one
specified.
|
Rational |
Rational.opposite()
Returns the opposite of this rational number.
|
Rational |
Rational.plus(Rational that)
Returns the sum of this rational number with the one specified.
|
Rational |
Rational.times(long multiplier)
Returns the product of this rational number with the specified
long multiplier. |
Rational |
Rational.times(Rational that)
Returns the product of this rational number with the one specified.
|
static Rational |
Rational.valueOf(CharSequence chars)
Returns the rational number for the specified character sequence.
|
static Rational |
Rational.valueOf(LargeInteger dividend,
LargeInteger divisor)
Returns the rational number for the specified large integer
dividend and divisor.
|
static Rational |
Rational.valueOf(long dividend,
long divisor)
Returns the rational number for the specified integer dividend and
divisor.
|
| Modifier and Type | Method and Description |
|---|---|
int |
Rational.compareTo(Rational that)
Compares two rational number numerically.
|
Rational |
Rational.divide(Rational that)
Returns this rational number divided by the one specified.
|
boolean |
Rational.isLargerThan(Rational that)
Compares the absolute value of two rational numbers.
|
Rational |
Rational.minus(Rational that)
Returns the difference between this rational number and the one
specified.
|
Rational |
Rational.plus(Rational that)
Returns the sum of this rational number with the one specified.
|
Rational |
Rational.times(Rational that)
Returns the product of this rational number with the one specified.
|