Package com.google.common.math
Class BigIntegerMath.BigIntegerToDoubleRounder
- java.lang.Object
-
- com.google.common.math.ToDoubleRounder<java.math.BigInteger>
-
- com.google.common.math.BigIntegerMath.BigIntegerToDoubleRounder
-
- Enclosing class:
- BigIntegerMath
private static class BigIntegerMath.BigIntegerToDoubleRounder extends ToDoubleRounder<java.math.BigInteger>
-
-
Field Summary
Fields Modifier and Type Field Description (package private) static BigIntegerMath.BigIntegerToDoubleRounderINSTANCE
-
Constructor Summary
Constructors Modifier Constructor Description privateBigIntegerToDoubleRounder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) java.math.BigIntegerminus(java.math.BigInteger a, java.math.BigInteger b)Returns a - b, guaranteed that both arguments are nonnegative.(package private) doubleroundToDoubleArbitrarily(java.math.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) intsign(java.math.BigInteger bigInteger)Returns the sign of x: either -1, 0, or 1.(package private) java.math.BigIntegertoX(double d, java.math.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 Detail
-
INSTANCE
static final BigIntegerMath.BigIntegerToDoubleRounder INSTANCE
-
-
Method Detail
-
roundToDoubleArbitrarily
double roundToDoubleArbitrarily(java.math.BigInteger bigInteger)
Description copied from class:ToDoubleRounderReturns 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:
roundToDoubleArbitrarilyin classToDoubleRounder<java.math.BigInteger>
-
sign
int sign(java.math.BigInteger bigInteger)
Description copied from class:ToDoubleRounderReturns the sign of x: either -1, 0, or 1.- Specified by:
signin classToDoubleRounder<java.math.BigInteger>
-
toX
java.math.BigInteger toX(double d, java.math.RoundingMode mode)Description copied from class:ToDoubleRounderReturns d's value as an X, rounded with the specified mode.- Specified by:
toXin classToDoubleRounder<java.math.BigInteger>
-
minus
java.math.BigInteger minus(java.math.BigInteger a, java.math.BigInteger b)Description copied from class:ToDoubleRounderReturns a - b, guaranteed that both arguments are nonnegative.- Specified by:
minusin classToDoubleRounder<java.math.BigInteger>
-
-