| 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 Real |
Real.NaN
Holds a Not-a-Number instance (infinite error).
|
static Real |
Real.ONE
Holds the exact ONE instance.
|
static Real |
Real.ZERO
Holds the exact ZERO instance.
|
| Modifier and Type | Method and Description |
|---|---|
Real |
Real.abs()
Returns the absolute value of this real number.
|
Real |
Real.copy() |
Real |
Real.divide(long divisor)
Returns this real number divided by the specified
int
divisor. |
Real |
Real.divide(Real that)
Returns this real number divided by the one specified.
|
Real |
Real.inverse()
Returns the reciprocal (or inverse) of this real number.
|
Real |
Real.minus(Real that)
Returns the difference between this real number and the one
specified.
|
Real |
Real.opposite()
Returns the negation of this real number.
|
Real |
Real.plus(Real that)
Returns the sum of this real number with the one specified.
|
Real |
Real.sqrt()
Returns the square root of this real number, the more accurate is this
real number, the more accurate the square root.
|
Real |
Real.times(long multiplier)
Returns the product of this real number with the specified
long multiplier. |
Real |
Real.times(Real that)
Returns the product of this real number with the one specified.
|
static Real |
Real.valueOf(CharSequence chars)
Returns the real for the specified character sequence.
|
static Real |
Real.valueOf(double doubleValue)
Returns the real number (inexact except for
0.0)
corresponding to the specified double value. |
static Real |
Real.valueOf(LargeInteger significand,
int error,
int exponent)
Returns a real having the specified significand, error and exponent values.
|
static Real |
Real.valueOf(long longValue)
Returns the exact real number corresponding to the specified
long value (convenience method). |
| Modifier and Type | Method and Description |
|---|---|
boolean |
Real.approximates(Real that)
Indicates if this real approximates the one specified.
|
int |
Real.compareTo(Real that)
Compares two real numbers numerically.
|
Real |
Real.divide(Real that)
Returns this real number divided by the one specified.
|
boolean |
Real.isLargerThan(Real that)
Compares the absolute value of two real numbers.
|
Real |
Real.minus(Real that)
Returns the difference between this real number and the one
specified.
|
Real |
Real.plus(Real that)
Returns the sum of this real number with the one specified.
|
Real |
Real.times(Real that)
Returns the product of this real number with the one specified.
|