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:
“Every age develops its own peculiar forms of pathology, which express in exaggerated form its underlying character structure.”
—Christopher Lasch (b. 1932)
“It is very iniquitous to make me pay my debtsyou have no idea of the pain it gives one.”
—George Gordon Noel Byron (17881824)
Related Phrases
Related Words