Package com.google.common.math
Class DoubleUtils
- java.lang.Object
-
- com.google.common.math.DoubleUtils
-
final class DoubleUtils extends java.lang.Object
Utilities fordouble
primitives.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) static int
EXPONENT_BIAS
(package private) static long
EXPONENT_MASK
(package private) static long
IMPLICIT_BIT
The implicit 1 bit that is omitted in significands of normal doubles.(package private) static long
ONE_BITS
(package private) static long
SIGN_MASK
(package private) static int
SIGNIFICAND_BITS
(package private) static long
SIGNIFICAND_MASK
-
Constructor Summary
Constructors Modifier Constructor Description private
DoubleUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description (package private) static double
bigToDouble(java.math.BigInteger x)
(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 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.
-
-