Iteration Count for Russian

From this little aside, it is apparent that the number of iterations it takes to square a is tex2html_wrap_inline199 .

To be more precise, the exact number of iterations is tex2html_wrap_inline201 .

Here, the ``floor'' function, tex2html_wrap_inline203 is the largest integer not exceeding x (rounding down). This is in contrast to the ``ceiling'' function tex2html_wrap_inline207 , which rounds up.

We will prove this bound in a moment. But first, let's look at an alternate way of writing the algorithm.


next up previous
Next: RECURSION Up: EFFICIENCY ANALYSIS Previous: Fun With Logarithms