Algorithms Binary Exponentiation:pow(base, exp) in Logarithmic Multiplies Square the base and consume the exponent bit by bit — O(log exp) multiplies instead of a loop of exp products, for integers or modular pow. Read More →