Package com.google.common.math
Class BigIntegerMath.BigIntegerToDoubleRounder
java.lang.Object
com.google.common.math.ToDoubleRounder<BigInteger>
com.google.common.math.BigIntegerMath.BigIntegerToDoubleRounder
- Enclosing class:
BigIntegerMath
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) static final BigIntegerMath.BigIntegerToDoubleRounder
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) BigInteger
minus
(BigInteger a, BigInteger b) Returns a - b, guaranteed that both arguments are nonnegative.(package private) double
roundToDoubleArbitrarily
(BigInteger bigInteger) Returns x rounded to either the greatest double less than or equal to the precise value of x, or the least double greater than or equal to the precise value of x.(package private) int
sign
(BigInteger bigInteger) Returns the sign of x: either -1, 0, or 1.(package private) BigInteger
toX
(double d, RoundingMode mode) Returns d's value as an X, rounded with the specified mode.Methods inherited from class com.google.common.math.ToDoubleRounder
roundToDouble
-
Field Details
-
INSTANCE
-
-
Constructor Details
-
BigIntegerToDoubleRounder
private BigIntegerToDoubleRounder()
-
-
Method Details
-
roundToDoubleArbitrarily
Description copied from class:ToDoubleRounder
Returns x rounded to either the greatest double less than or equal to the precise value of x, or the least double greater than or equal to the precise value of x.- Specified by:
roundToDoubleArbitrarily
in classToDoubleRounder<BigInteger>
-
sign
Description copied from class:ToDoubleRounder
Returns the sign of x: either -1, 0, or 1.- Specified by:
sign
in classToDoubleRounder<BigInteger>
-
toX
Description copied from class:ToDoubleRounder
Returns d's value as an X, rounded with the specified mode.- Specified by:
toX
in classToDoubleRounder<BigInteger>
-
minus
Description copied from class:ToDoubleRounder
Returns a - b, guaranteed that both arguments are nonnegative.- Specified by:
minus
in classToDoubleRounder<BigInteger>
-