Added logn power for exponentiation