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:
“If the worker and his boss enjoy the same television program and visit the same resort places, if the typist is as attractively made up as the daughter of her employer, if the Negro owns a Cadillac, if they all read the same newspaper, then this assimilation indicates not the disappearance of classes, but the extent to which the needs and satisfactions that serve the preservation of the Establishment are shared by the underlying population.”
—Herbert Marcuse (18981979)
“I have no patience with this dreadful idea that whatever you have in you has to come out, that you cant suppress true talent. People can be destroyed; they can be bent, distorted, and completely crippled.”
—Katherine Anne Porter (18901980)