java.lang.Math .
| Modifier and Type | Field and Description |
|---|---|
| pack-priv static final double[] | |
| private static final double | |
| pack-priv static final int | |
| private static final double | |
| private static final double | |
| private static final double | |
| private static final double |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| private static double | |
| public static double | |
| public static int | fuzzyCompare(double a, double b, double tolerance)
Compares |
| public static boolean | fuzzyEquals(double a, double b, double tolerance)
Returns |
| public static boolean | |
| public static boolean | |
| public static double | |
| public static int | log2(double x, RoundingMode mode)
Returns the base 2 logarithm of a double value, rounded with the specified rounding mode to an
|
| public static double | mean(double...
a nonempty series of values values)
Deprecated
Use
Returns the arithmetic mean of
Stats#meanOf instead, noting the less strict handling of non-finite
values.
values.
|
| public static double | mean(int...
a nonempty series of values values)
Deprecated
Use
Returns the arithmetic mean of
Stats#meanOf instead, noting the less strict handling of non-finite
values.
values.
|
| public static double | mean(long...
a nonempty series of values, which will be converted to values)double values
(this may cause loss of precision for longs of magnitude over 2^53 (slightly over 9e15))
Deprecated
Use
Returns the arithmetic mean of
Stats#meanOf instead, noting the less strict handling of non-finite
values.
values.
|
| public static double | mean(Iterable<? extends Number>
a nonempty series of values, which will be converted to values)double values
(this may cause loss of precision)
Deprecated
Use
Returns the arithmetic mean of
Stats#meanOf instead, noting the less strict handling of non-finite
values.
values.
|
| public static double | mean(Iterator<? extends Number>
a nonempty series of values, which will be converted to values)double values
(this may cause loss of precision)
Deprecated
Use
Returns the arithmetic mean of
Stats#meanOf instead, noting the less strict handling of non-finite
values.
values.
|
| pack-priv static double | |
| public static BigInteger | roundToBigInteger(double x, RoundingMode mode)
Returns the |
| public static int | roundToInt(double x, RoundingMode mode)
Returns the |
| public static long | roundToLong(double x, RoundingMode mode)
Returns the |
| everySixteenthFactorial | back to summary |
|---|---|
| pack-priv static final double[] everySixteenthFactorial
| |
| LN_2 | back to summary |
|---|---|
| private static final double LN_2 | |
| MAX_FACTORIAL | back to summary |
|---|---|
| pack-priv static final int MAX_FACTORIAL
| |
| MAX_INT_AS_DOUBLE | back to summary |
|---|---|
| private static final double MAX_INT_AS_DOUBLE | |
| MAX_LONG_AS_DOUBLE_PLUS_ONE | back to summary |
|---|---|
| private static final double MAX_LONG_AS_DOUBLE_PLUS_ONE | |
| MIN_INT_AS_DOUBLE | back to summary |
|---|---|
| private static final double MIN_INT_AS_DOUBLE | |
| MIN_LONG_AS_DOUBLE | back to summary |
|---|---|
| private static final double MIN_LONG_AS_DOUBLE | |
| DoubleMath | back to summary |
|---|---|
| private DoubleMath() | |
| checkFinite | back to summary |
|---|---|
private static double checkFinite(double argument)
| |
| factorial | back to summary |
|---|---|
| public static double factorial(int n) Returns The result is within 1 ulp of the true value.
| |
| fuzzyCompare | back to summary |
|---|---|
| public static int fuzzyCompare(double a, double b, double tolerance) Compares This method is equivalent to This is not a total ordering and is not suitable for use in
| |
| fuzzyEquals | back to summary |
|---|---|
| public static boolean fuzzyEquals(double a, double b, double tolerance) Returns Technically speaking, this is equivalent to Notable special cases include:
This is reflexive and symmetric, but not transitive, so it is not an
equivalence relation and not suitable for use in
| |
| isMathematicalInteger | back to summary |
|---|---|
| public static boolean isMathematicalInteger(double x) Returns This is equivalent to, but not necessarily implemented as, the expression
| |
| isPowerOfTwo | back to summary |
|---|---|
| public static boolean isPowerOfTwo(double x) Returns
| |
| log2 | back to summary |
|---|---|
| public static double log2(double x) Returns the base 2 logarithm of a double value. Special cases:
The computed result is within 1 ulp of the exact result. If the result of this method will be immediately rounded to an | |
| log2 | back to summary |
|---|---|
| public static int log2(double x, RoundingMode mode) Returns the base 2 logarithm of a double value, rounded with the specified rounding mode to an
Regardless of the rounding mode, this is faster than
| |
| mean | back to summary |
|---|---|
| public static double mean(double... values)
Deprecated Use Returns the arithmetic mean of
If these values are a sample drawn from a population, this is also an unbiased estimator of the arithmetic mean of the population.
| |
| mean | back to summary |
|---|---|
| public static double mean(int... values)
Deprecated Use Returns the arithmetic mean of
If these values are a sample drawn from a population, this is also an unbiased estimator of the arithmetic mean of the population.
| |
| mean | back to summary |
|---|---|
| public static double mean(long... values)
Deprecated Use Returns the arithmetic mean of
If these values are a sample drawn from a population, this is also an unbiased estimator of the arithmetic mean of the population.
| |
| mean | back to summary |
|---|---|
| public static double mean(Iterable<? extends Number> values)
Deprecated Use Returns the arithmetic mean of
If these values are a sample drawn from a population, this is also an unbiased estimator of the arithmetic mean of the population.
| |
| mean | back to summary |
|---|---|
| public static double mean(Iterator<? extends Number> values)
Deprecated Use Returns the arithmetic mean of
If these values are a sample drawn from a population, this is also an unbiased estimator of the arithmetic mean of the population.
| |
| roundIntermediate | back to summary |
|---|---|
pack-priv static double roundIntermediate(double x, RoundingMode mode)
| |
| roundToBigInteger | back to summary |
|---|---|
| public static BigInteger roundToBigInteger(double x, RoundingMode mode) Returns the
| |
| roundToInt | back to summary |
|---|---|
| public static int roundToInt(double x, RoundingMode mode) Returns the
| |
| roundToLong | back to summary |
|---|---|
| public static long roundToLong(double x, RoundingMode mode) Returns the
| |