[Improvement] Added implementation of Exponentiation by squaring.