Package org.jruby.ext.bigdecimal
Class Multiplication
java.lang.Object
org.jruby.ext.bigdecimal.Multiplication
Static library that provides all multiplication of
BigInteger methods.-
Field Summary
FieldsModifier and TypeFieldDescription(package private) static final BigInteger[]An array with the first powers of ten inBigIntegerversion.(package private) static final BigInteger -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateJust to denote that this class can't be instantiated. -
Method Summary
Modifier and TypeMethodDescription(package private) static BigIntegerpowerOf10(long exp) It calculates a power of ten, which exponent could be out of 32-bit range.
-
Field Details
-
FIVE
-
bigTenPows
An array with the first powers of ten inBigIntegerversion. (10^0,10^1,...,10^31)
-
-
Constructor Details
-
Multiplication
private Multiplication()Just to denote that this class can't be instantiated.
-
-
Method Details
-
powerOf10
It calculates a power of ten, which exponent could be out of 32-bit range. Note that internally this method will be used in the worst case with an exponent equals to:Integer.MAX_VALUE - Integer.MIN_VALUE.- Parameters:
exp- the exponent of power of ten, it must be positive.- Returns:
- a
BigIntegerwith value10<sup>exp</sup>.
-