Top Description Fields Constructors Methods
com.google.common.math

pack-priv final Class DoubleUtils

extends Object
Class Inheritance
Annotations
@GwtIncompatible
@ElementTypesAreNonnullByDefault
Static Imports
com.google.common.base.Preconditions.checkArgument, java.lang.Double.MAX_EXPONENT, .Double.MIN_EXPONENT, .Double.POSITIVE_INFINITY, .Double.doubleToRawLongBits, .Double.isNaN, .Double.longBitsToDouble, .Math.getExponent

Utilities for double primitives.
Author
Louis Wasserman

Field Summary

Modifier and TypeField and Description
pack-priv static final int
pack-priv static final long
pack-priv static final long
IMPLICIT_BIT

The implicit 1 bit that is omitted in significands of normal doubles.

pack-priv static final long
pack-priv static final long
pack-priv static final int
pack-priv static final long

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
pack-priv static double
pack-priv static double
ensureNonNegative(double value)

Returns its argument if it is non-negative, zero if it is negative.

pack-priv static long
getSignificand(double d)

pack-priv static boolean
isFinite(double d)

pack-priv static boolean
isNormal(double d)

pack-priv static double
nextDown(double d)

pack-priv static double
scaleNormalize(double x)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

EXPONENT_BIASback to summary
pack-priv static final int EXPONENT_BIAS
EXPONENT_MASKback to summary
pack-priv static final long EXPONENT_MASK
IMPLICIT_BITback to summary
pack-priv static final long IMPLICIT_BIT

The implicit 1 bit that is omitted in significands of normal doubles.

ONE_BITSback to summary
pack-priv static final long ONE_BITS
Annotations
@VisibleForTesting
SIGN_MASKback to summary
pack-priv static final long SIGN_MASK
SIGNIFICAND_BITSback to summary
pack-priv static final int SIGNIFICAND_BITS
SIGNIFICAND_MASKback to summary
pack-priv static final long SIGNIFICAND_MASK

Constructor Detail

DoubleUtilsback to summary
private DoubleUtils()

Method Detail

bigToDoubleback to summary
pack-priv static double bigToDouble(BigInteger x)
ensureNonNegativeback to summary
pack-priv static double ensureNonNegative(double value)

Returns its argument if it is non-negative, zero if it is negative.

getSignificandback to summary
pack-priv static long getSignificand(double d)
isFiniteback to summary
pack-priv static boolean isFinite(double d)
isNormalback to summary
pack-priv static boolean isNormal(double d)
nextDownback to summary
pack-priv static double nextDown(double d)
scaleNormalizeback to summary
pack-priv static double scaleNormalize(double x)