18
Exercise 1.18: Using the results of Exercise 1.16 and Exercise 1.17, devise a procedure that generates an iterative process for multiplying two integers in terms of adding, doubling, and halving and uses a logarithmic number of steps.
Assume b is even first:
The process is iterative because:
For b is not even, we subtract 1 from it:
Last updated
Was this helpful?