SICP

# SICP 1.3.3 Exercises

November 19, 2013 12:25

There is more math to be done in this section, but there isn’t that much mathematical knowledge required to work the exercises. Still, if you are unfamiliar with continued fractions, it might be worthwhile to brush up on them. Solutions to a problem by finding a fixed point is also brought up, although it is covered a bit better in the text.

Both finding fixed points and continued fractions are recursive processes (or iterative, depending on your view) by nature, so this section will also revisit the concepts of iterative and recursive approaches to finding a solution. What’s new in this case is that we’re applying a generic method in order to figure out any kind of problem of this sort. Since mathematical expressions need to be also calculated by a procedure, this is no different from passing a procedure into a generic process.

There isn’t as much required to test this. At this point, it’s easy enough to simply count the steps required for comparison, or to determine the necessary number of steps by trail and error with different numbers. Given that any number of values can be calculated using the math expressions here, I’d suggest adding a few of your own to test the limits of numerical solvers.