Computing the power of a given number
Given a base and it’s exponent, how do we efficiently evaluate it? In other way, how do implement a pow() function which is typically provided by a library. For example 210 = 1024. The simplest method that comes to our mind is multiply the base with 1 in a loop for exponent times. double result…