Method Summary |
|
public FloatingPoint | abs() Returns the absolute value of this floating point number. |
public int | compareTo(FloatingPoint that) Compares two floating point number numerically.
Parameters: that - the floating point number to compare with. |
public FloatingPoint | copy() |
public FloatingPoint | divide(FloatingPoint that) Returns this floating point number divided by the one specified.
Parameters: that - the FloatingPoint number divisor. |
public double | doubleValue() Returns the value of this floating point number as a double . |
public boolean | equals(Object that) Compares this floating point number against the specified object.
Parameters: that - the object to compare with. |
public static int | getDigits() Returns the
javolution.context.LocalContext local number of
digits used during calculations (default 20 digits). |
public int | getExponent() Returns the decimal exponent. |
public LargeInteger | getSignificand() Returns the significand value. |
public int | hashCode() Returns the hash code for this floating point number. |
public FloatingPoint | inverse() Returns the inverse of this floating point number. |
public boolean | isLargerThan(FloatingPoint that) Compares the absolute value of two FloatingPoint numbers.
Parameters: that - the FloatingPoint number to be compared with. |
public boolean | isNaN() Indicates if this floating point is Not-a-Number. |
public boolean | isNegative() Indicates if this rational number is less than zero. |
public boolean | isPositive() Indicates if this floating point number is greater than zero. |
public boolean | isZero() Indicates if this floating point number is equal to zero. |
public long | longValue() Returns the value of this floating point number as a long . |
public FloatingPoint | minus(FloatingPoint that) Returns the difference between this FloatingPoint number and the one
specified.
Parameters: that - the floating point number to be subtracted. |
public FloatingPoint | opposite() Returns the opposite of this floating point number. |
public FloatingPoint | plus(FloatingPoint that) Returns the sum of this floating point number with the one specified.
Parameters: that - the floating point number to be added. |
public LargeInteger | round() Returns the closest integer to this floating point number. |
public static void | setDigits(int digits) Sets the
javolution.context.LocalContext local number of digits
to be used during calculations. |
public FloatingPoint | sqrt() Returns the square root of this floating point number. |
public FloatingPoint | times(long multiplier) Returns the product of this floating point number with the specified
long multiplier.
Parameters: multiplier - the long multiplier. |
public FloatingPoint | times(FloatingPoint that) Returns the product of this floating point number with the one specified.
Parameters: that - the floating point number multiplier. |
public Text | toText() Returns the decimal text representation of this number. |
public static FloatingPoint | valueOf(LargeInteger significand, int exponent) Returns the floating point number for the specified
LargeInteger significand and power of two exponent. |
public static FloatingPoint | valueOf(long significand, int exponent) Returns the floating point number for the specified long
significand and power of two exponent (convenience method). |
public static FloatingPoint | valueOf(long longValue) Returns the floating point number for the specified long
value (convenience method). |
public static FloatingPoint | valueOf(double doubleValue) Returns the floating point number for the specified double
value (convenience method). |
public static FloatingPoint | valueOf(CharSequence chars) Returns the floating point number for the specified character sequence.
The number of digits
Parameters: chars - the character sequence. |