|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.math.Multiplication
class Multiplication
Static library that provides all multiplication of BigInteger methods.
| Field Summary | |
|---|---|
(package private) static BigInteger[] |
bigFivePows
An array with the first powers of five in BigInteger version. |
(package private) static BigInteger[] |
bigTenPows
An array with the first powers of ten in BigInteger version. |
(package private) static int[] |
fivePows
An array with powers of five that fit in the type int. |
(package private) static int[] |
tenPows
An array with powers of ten that fit in the type int. |
| Method Summary | |
|---|---|
(package private) static BigInteger |
multiplyByFivePow(BigInteger val,
int exp)
Multiplies a number by a power of five. |
(package private) static BigInteger |
multiplyByPositiveInt(BigInteger val,
int factor)
Multiplies a number by a positive integer. |
(package private) static BigInteger |
multiplyByTenPow(BigInteger val,
long exp)
Multiplies a number by a power of ten. |
(package private) static BigInteger |
powerOf10(long exp)
It calculates a power of ten, which exponent could be out of 32-bit range. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
static final int[] tenPows
int.
(10^0,10^1,...,10^9)
static final int[] fivePows
int.
(5^0,5^1,...,5^13)
static final BigInteger[] bigTenPows
BigInteger version.
(10^0,10^1,...,10^31)
static final BigInteger[] bigFivePows
BigInteger version.
(5^0,5^1,...,5^31)
| Method Detail |
|---|
static BigInteger multiplyByPositiveInt(BigInteger val,
int factor)
val - an arbitrary BigIntegerfactor - a positive int number
val * factor
static BigInteger multiplyByTenPow(BigInteger val,
long exp)
BigDecimal class.
val - the number to be multipliedexp - a positive long exponent
val * 10<sup>exp</sup>static BigInteger powerOf10(long exp)
Integer.MAX_VALUE - Integer.MIN_VALUE.
exp - the exponent of power of ten, it must be positive.
BigInteger with value 10<sup>exp</sup>.
static BigInteger multiplyByFivePow(BigInteger val,
int exp)
BigDecimal class.
val - the number to be multipliedexp - a positive int exponent
val * 5<sup>exp</sup>
|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||