Underlying Idea
Using the following observation, one can create a recursive algorithm that computes xn for an integer n using squaring and multiplication:

A brief analysis shows that such an algorithm uses log2n squarings and at most log2n multiplications. For n > about 4 this is computationally more efficient than naïvely multiplying the base with itself repeatedly.
Read more about this topic: Exponentiation By Squaring
Famous quotes containing the words underlying and/or idea:
“Comedy deflates the sense precisely so that the underlying lubricity and malice may bubble to the surface.”
—Paul Goodman (19111972)
“The idea which man forms of beauty imprints itself throughout his attire, rumples or stiffens his garments, rounds off or aligns his gestures, and, finally, even subtly penetrates the features of his face.”
—Charles Baudelaire (18211867)