|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectptolemy.math.ExtendedMath
public class ExtendedMath
ExtendedMath is a library of additional mathematical operations beyond those provided by the Java Math class.
Red (cxh) |
Yellow (ctsay) |
Field Summary | |
---|---|
private static double |
_ONEOVERLN10
|
private static double |
_ONEOVERLN2
|
static double |
DOUBLE_PRECISION_SIGNIFICAND_ONLY
The constant value of a double representation that has all bits as 1 except the sign bit, where only the significand contributes to the value. |
static double |
DOUBLE_PRECISION_SMALLEST_NORMALIZED_POSITIVE_DOUBLE
The smallest, normalized, positive double value with a double precision. |
static double |
ONE_OVER_SQRT_2
1 / sqrt(2). |
static double |
PI_OVER_2
PI / 2. |
static double |
PI_OVER_4
PI / 4. |
static double |
SINGLE_PRECISION_SIGNIFICAND_ONLY
The constant value of a double representation that has all bits as 1 except the sign bit, where only the significand contributes to the value. |
static double |
SINGLE_PRECISION_SMALLEST_NORMALIZED_POSITIVE_DOUBLE
The smallest, normalized, positive double value with a single precision. |
static double |
SQRT_2
sqrt(2). |
Constructor Summary | |
---|---|
ExtendedMath()
|
Method Summary | |
---|---|
static double |
acosh(double x)
Return the inverse hyperbolic cosine of the argument. |
static double |
asinh(double x)
Return the inverse hyperbolic sine of the argument. |
static double |
cosh(double x)
Return the hyperbolic cosine of the argument. |
static int |
gcd(int u,
int v)
Implement Euclid's method for finding the Greatest Common Divisor (GCD) of two numbers. |
static double |
log10(double x)
Return the base-10 logarithm of the argument. |
static double |
log2(double x)
Return the base-2 logarithm of the argument. |
static double |
remainder(double f1,
double f2)
Compute the remainder after dividing the first argument by the second argument as prescribed by the IEEE 754 standard. |
static int |
roundToInt(double x)
Round to the nearest integer. |
static int |
sgn(double x)
If the argument is less than zero, return -1, otherwise return 1. |
static double |
sinh(double x)
Return the hyperbolic sine of the argument. |
static double |
tanh(double x)
Return the hyperbolic tangent of the argument. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final double SQRT_2
public static final double ONE_OVER_SQRT_2
public static final double PI_OVER_2
public static final double PI_OVER_4
public static final double SINGLE_PRECISION_SMALLEST_NORMALIZED_POSITIVE_DOUBLE
public static final double DOUBLE_PRECISION_SMALLEST_NORMALIZED_POSITIVE_DOUBLE
public static final double DOUBLE_PRECISION_SIGNIFICAND_ONLY
public static final double SINGLE_PRECISION_SIGNIFICAND_ONLY
private static final double _ONEOVERLN2
private static final double _ONEOVERLN10
Constructor Detail |
---|
public ExtendedMath()
Method Detail |
---|
public static final double acosh(double x)
public static final double asinh(double x)
public static final double cosh(double x)
public static int gcd(int u, int v)
public static final double log10(double x)
public static final double log2(double x)
public static double remainder(double f1, double f2)
"The remainder value is mathematically equal to f1 - f2 × n, where n is the mathematical integer closest to the exact mathematical value of the quotient f1/f2, and if two mathematical integers are equally close to f1/f2, then n is the integer that is even. If the remainder is zero, its sign is the same as the sign of the first argument. Special cases:
public static final int roundToInt(double x)
x
- The number to round.
public static final int sgn(double x)
public static final double sinh(double x)
public static final double tanh(double x)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |