List of utility methods to do Number Power
int | pow(int number, int power) pow int result = 1; for (int i = 0; i < power; ++i) result *= number; return result; |
int | pow(int value, int exp) pow return value == 2 ? 1 << exp : (int) Math.pow(value, exp); |
int | pow(int x, int y) Positive integer powers. if ((x >= 0) && (x < 50) && (y < 50)) { return INTEGER_POWERS[x][y]; } else { switch (y) { case 0: return 1; case 1: return x; ... |
void | pow(int[] arr, double p) POW all elements of the specified primitive type array. for (int i = 0, l = arr.length; i < l; i++) { arr[i] = (int) Math.pow(arr[i], p); |
double | pow(Integer a, Integer b) Pow. return Math.pow(a.doubleValue(), b.doubleValue());
|
long | pow(long base, long exp) Convenience method to calculate the power. return (long) Math.pow(base, exp); |
long | pow(long n, long pow) pow if (pow == 0) { return 1; long retval = n; for (long i = 2; i <= pow; i++) { retval *= n; return retval; ... |
long | pow(long value, long pow) pow long tmpValue = 1; for (int i = 0; i < pow; i++) { tmpValue *= value; return tmpValue; |
double | pow(Number x, Number exponent) pow return Math.pow(x.doubleValue(), exponent.doubleValue());
|
String | pow(String str, int n) Power-function in the free Monoid over Characters (AKA "Strings"). StringBuilder b = new StringBuilder(); for (int i = 0; i < n; i++) { b.append(str); return b.toString(); |