Package com.google.common.math
Class DoubleUtils
java.lang.Object
com.google.common.math.DoubleUtils
Utilities for
double
primitives.-
Field Summary
FieldsModifier and TypeFieldDescription(package private) static final int
(package private) static final long
(package private) static final long
The implicit 1 bit that is omitted in significands of normal doubles.(package private) static final long
(package private) static final long
(package private) static final int
(package private) static final long
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) static double
(package private) static double
ensureNonNegative
(double value) Returns its argument if it is non-negative, zero if it is negative.(package private) static long
getSignificand
(double d) (package private) static boolean
isFinite
(double d) (package private) static boolean
isNormal
(double d) (package private) static double
nextDown
(double d) (package private) static double
scaleNormalize
(double x)
-
Field Details
-
SIGNIFICAND_MASK
static final long SIGNIFICAND_MASK- See Also:
-
EXPONENT_MASK
static final long EXPONENT_MASK- See Also:
-
SIGN_MASK
static final long SIGN_MASK- See Also:
-
SIGNIFICAND_BITS
static final int SIGNIFICAND_BITS- See Also:
-
EXPONENT_BIAS
static final int EXPONENT_BIAS- See Also:
-
IMPLICIT_BIT
static final long IMPLICIT_BITThe implicit 1 bit that is omitted in significands of normal doubles.- See Also:
-
ONE_BITS
static final long ONE_BITS- See Also:
-
-
Constructor Details
-
DoubleUtils
private DoubleUtils()
-
-
Method Details
-
nextDown
static double nextDown(double d) -
getSignificand
static long getSignificand(double d) -
isFinite
static boolean isFinite(double d) -
isNormal
static boolean isNormal(double d) -
scaleNormalize
static double scaleNormalize(double x) -
bigToDouble
-
ensureNonNegative
static double ensureNonNegative(double value) Returns its argument if it is non-negative, zero if it is negative.
-