A function that calculates a^b in O(log(b)) time