Package de.tilman_neumann.jml.powers
Class Pow
- java.lang.Object
-
- de.tilman_neumann.jml.powers.Pow
-
public class Pow extends Object
-
-
Constructor Summary
Constructors Constructor Description Pow()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static BigDecimal
pow(BigDecimal x, int n, Scale resultScale)
static BigDecimal
pow(BigDecimal x, BigInteger n, Precision prec)
Power function for large integer exponents (also negative)static BigDecimal
powJavaTrunc(BigDecimal x, int n, Precision resultPrecision)
-
-
-
Method Detail
-
pow
public static BigDecimal pow(BigDecimal x, BigInteger n, Precision prec)
Power function for large integer exponents (also negative)- Parameters:
x
- Basisn
- Exponentprec
- output precision in leading decimal digits- Returns:
- x^n
-
pow
public static BigDecimal pow(BigDecimal x, int n, Scale resultScale)
-
powJavaTrunc
public static BigDecimal powJavaTrunc(BigDecimal x, int n, Precision resultPrecision)
-
-