Modifier and Type | Method and Description |
---|---|
static long |
pow(DecimalArithmetic arith,
DecimalRounding rounding,
long uDecimalBase,
int exponent)
Power function for checked or unchecked arithmetic.
|
static long |
powLong(DecimalArithmetic arith,
DecimalRounding rounding,
long lBase,
int exponent)
Calculates the power (lBaseexponent).
|
static long |
powLongChecked(DecimalArithmetic arith,
DecimalRounding rounding,
long lBase,
int exponent)
Calculates the power (lBaseexponent).
|
public static final long powLong(DecimalArithmetic arith, DecimalRounding rounding, long lBase, int exponent)
arith
- the arithmetic associated with lBase
rounding
- the rounding to apply if rounding is necessary for negative
exponentslBase
- the unscaled decimal base valueexponent
- the exponentArithmeticException
- if lBase==0
and the exponent is negative or if
roundingMode==UNNECESSARY
and rounding is necessarypublic static final long powLongChecked(DecimalArithmetic arith, DecimalRounding rounding, long lBase, int exponent)
arith
- the arithmetic associated with lBase
rounding
- the rounding to apply if rounding is necessary for negative
exponentslBase
- the unscaled decimal base valueexponent
- the exponentArithmeticException
- if lBase==0
and the exponent is negative, if
roundingMode==UNNECESSARY
and rounding is necessary
or if an overflow occurs and the arithmetic's
OverflowMode
is set to throw an exceptionpublic static final long pow(DecimalArithmetic arith, DecimalRounding rounding, long uDecimalBase, int exponent)
arith
- the arithmeticrounding
- the rounding to applyuDecimalBase
- the unscaled baseexponent
- the exponentuDecimalbase ^ exponent