| Modifier and Type | Method and Description |
|---|---|
static long |
multiply(DecimalArithmetic arith,
DecimalRounding rounding,
long uDecimal1,
long uDecimal2)
Calculates the multiple
uDecimal1 * uDecimal2 / scaleFactor
applying the specified rounding if necessary. |
static long |
multiply(DecimalArithmetic arith,
long uDecimal1,
long uDecimal2)
Calculates the multiple
uDecimal1 * uDecimal2 / scaleFactor
without rounding. |
static long |
multiplyByUnscaled(DecimalRounding rounding,
long uDecimal,
long unscaled,
int scale)
Calculates unchecked multiplication by an unscaled value with the given
scale with rounding.
|
static long |
multiplyByUnscaled(long uDecimal,
long unscaled,
int scale)
Calculates unchecked multiplication by an unscaled value with the given scale
without rounding.
|
static long |
multiplyByUnscaledChecked(DecimalArithmetic arith,
DecimalRounding rounding,
long uDecimal,
long unscaled,
int scale)
Calculates checked multiplication by an unscaled value with the given
scale with rounding.
|
static long |
multiplyByUnscaledChecked(DecimalArithmetic arith,
long uDecimal,
long unscaled,
int scale)
Calculates checked multiplication by an unscaled value with the given scale
without rounding.
|
static long |
multiplyChecked(DecimalArithmetic arith,
DecimalRounding rounding,
long uDecimal1,
long uDecimal2)
Calculates the multiple
uDecimal1 * uDecimal2 / scaleFactor
with rounding. |
static long |
multiplyChecked(DecimalArithmetic arith,
long uDecimal1,
long uDecimal2)
Calculates the multiple
uDecimal1 * uDecimal2 / scaleFactor
without rounding checking for overflows. |
public static final long multiply(DecimalArithmetic arith, long uDecimal1, long uDecimal2)
uDecimal1 * uDecimal2 / scaleFactor
without rounding.arith - the arithmetic with access to scale metrics etc.uDecimal1 - the first unscaled decimal factoruDecimal2 - the second unscaled decimal factorpublic static final long multiplyByUnscaled(long uDecimal, long unscaled, int scale)
uDecimal - the unscaled decimal factorunscaled - the second unscaled factorscale - the scale of the second factorpublic static final long multiply(DecimalArithmetic arith, DecimalRounding rounding, long uDecimal1, long uDecimal2)
uDecimal1 * uDecimal2 / scaleFactor
applying the specified rounding if necessary.arith - the arithmetic with access to scale metrics etc.rounding - the rounding to apply if necessaryuDecimal1 - the first unscaled decimal factoruDecimal2 - the second unscaled decimal factorpublic static final long multiplyByUnscaled(DecimalRounding rounding, long uDecimal, long unscaled, int scale)
rounding - the rounding to applyuDecimal - the unscaled decimal factorunscaled - the second unscaled factorscale - the scale of the second factorpublic static final long multiplyChecked(DecimalArithmetic arith, long uDecimal1, long uDecimal2)
uDecimal1 * uDecimal2 / scaleFactor
without rounding checking for overflows.arith - the arithmetic with access to scale metrics etc.uDecimal1 - the first unscaled decimal factoruDecimal2 - the second unscaled decimal factorpublic static final long multiplyByUnscaledChecked(DecimalArithmetic arith, long uDecimal, long unscaled, int scale)
arith - the decimal arithmetics associated with the first factoruDecimal - the unscaled decimal factorunscaled - the second unscaled factorscale - the scale of the second factorpublic static final long multiplyChecked(DecimalArithmetic arith, DecimalRounding rounding, long uDecimal1, long uDecimal2)
uDecimal1 * uDecimal2 / scaleFactor
with rounding.arith - the arithmetic with access to scale metrics etc.rounding - the rounding to apply for truncated decimalsuDecimal1 - the first unscaled decimal factoruDecimal2 - the second unscaled decimal factorpublic static final long multiplyByUnscaledChecked(DecimalArithmetic arith, DecimalRounding rounding, long uDecimal, long unscaled, int scale)
arith - the arithmetics associated with uDecimalrounding - the rounding to applyuDecimal - the unscaled decimal factorunscaled - the second unscaled factorscale - the scale of the second factor