Top Description Fields Constructors Methods
org.jruby.ext.bigdecimal

pack-priv Class Multiplication

extends Object
Class Inheritance
Imports
java.math.BigInteger

Static library that provides all multiplication of BigInteger methods.

Field Summary

Modifier and TypeField and Description
pack-priv static final BigInteger[]
bigTenPows

An array with the first powers of ten in BigInteger version.

pack-priv static final BigInteger

Constructor Summary

AccessConstructor and Description
private
Multiplication()

Just to denote that this class can't be instantiated.

Method Summary

Modifier and TypeMethod and Description
pack-priv static BigInteger

Returns:

a BigInteger with value 10<sup>exp</sup>.
powerOf10
(long
the exponent of power of ten, it must be positive.
exp
)

It calculates a power of ten, which exponent could be out of 32-bit range.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

bigTenPowsback to summary
pack-priv static final BigInteger[] bigTenPows

An array with the first powers of ten in BigInteger version. (10^0,10^1,...,10^31)

FIVEback to summary
pack-priv static final BigInteger FIVE

Constructor Detail

Multiplicationback to summary
private Multiplication()

Just to denote that this class can't be instantiated.

Method Detail

powerOf10back to summary
pack-priv static BigInteger powerOf10(long exp)

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:long

the exponent of power of ten, it must be positive.

Returns:BigInteger

a BigInteger with value 10<sup>exp</sup>.