Package com.google.common.math
Class DoubleUtils
- java.lang.Object
-
- com.google.common.math.DoubleUtils
-
@GwtIncompatible final class DoubleUtils extends java.lang.Object
Utilities fordoubleprimitives.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) static intEXPONENT_BIAS(package private) static longEXPONENT_MASK(package private) static longIMPLICIT_BITThe implicit 1 bit that is omitted in significands of normal doubles.(package private) static longONE_BITS(package private) static longSIGN_MASK(package private) static intSIGNIFICAND_BITS(package private) static longSIGNIFICAND_MASK
-
Constructor Summary
Constructors Modifier Constructor Description privateDoubleUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description (package private) static doublebigToDouble(java.math.BigInteger x)(package private) static doubleensureNonNegative(double value)Returns its argument if it is non-negative, zero if it is negative.(package private) static longgetSignificand(double d)(package private) static booleanisFinite(double d)(package private) static booleanisNormal(double d)(package private) static doublenextDown(double d)(package private) static doublescaleNormalize(double x)
-
-
-
Field Detail
-
SIGNIFICAND_MASK
static final long SIGNIFICAND_MASK
- See Also:
- Constant Field Values
-
EXPONENT_MASK
static final long EXPONENT_MASK
- See Also:
- Constant Field Values
-
SIGN_MASK
static final long SIGN_MASK
- See Also:
- Constant Field Values
-
SIGNIFICAND_BITS
static final int SIGNIFICAND_BITS
- See Also:
- Constant Field Values
-
EXPONENT_BIAS
static final int EXPONENT_BIAS
- See Also:
- Constant Field Values
-
IMPLICIT_BIT
static final long IMPLICIT_BIT
The implicit 1 bit that is omitted in significands of normal doubles.- See Also:
- Constant Field Values
-
ONE_BITS
static final long ONE_BITS
- See Also:
- Constant Field Values
-
-
Method Detail
-
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
static double bigToDouble(java.math.BigInteger x)
-
ensureNonNegative
static double ensureNonNegative(double value)
Returns its argument if it is non-negative, zero if it is negative.
-
-