public static long pow(final long b, final long e) {
		long base = b;
		long exp = e;
		long result = 1;

		while (exp != 0) {
			if ((exp & 1) != 0) {
				result *= base;
			}
			exp >>>= 1;
			base *= base;
		}

		return result;
	}
Binary exponentiation algorithm.

@param b the base number.
@param e the exponent.
@return {@code b^e}.
jenetics/src/main/java/io/jenetics/internal/math/Basics.java