List of utility methods to do Number Power
int | powInt(int base, int exponent) pow Int assert exponent >= 0; int result = 1; for (int i = 0; i < exponent; i++) { result *= base; return result; |
double[] | powLLL(double[] a, double b) pow LLL return pow(a, b, a);
|
double | powSqrt(double x, double y) pow Sqrt int den = 1024, num = (int) (y * den), iterations = 10; double n = Double.MAX_VALUE; while (n >= Double.MAX_VALUE && iterations > 1) { n = x; for (int i = 1; i < num; i++) n *= x; if (n >= Double.MAX_VALUE) { iterations--; ... |