sicp-ex-1.25


The modified version of expmod computes huge intermediate results.

Scheme is able to handle arbitrary-precision arithmetic, but arithmetic with arbitrarily long numbers is computationally expensive. This means that we get the same (correct) results, but it takes considerably longer.


<< Previous exercise (1.24) | sicp-solutions | Next exercise (1.26) >>