Add fast exponentiation algorithm (repeated squaring)