Iterative process for multiplying two integers

Using the results of exercises 1.16 and 1.17 , devise a procedure mul-iter that generates an iterative process for multiplying two integers in terms of adding, doubling, and halving and uses a logarithmic number of steps.


There are no comments yet.

Authentication required

You must log in to post a comment.

Login
(check-equal? (mul-iter 1 1) 1)
(check-equal? (mul-iter 40 30) (* 40 30))
(check-equal? (mul-iter 5 0) 0)
(check-equal? (mul-iter 5 15) (* 5 15))