Exercise 2.12 of SICP

Exercise 2.12: Define a constructor make-center-percent that takes a center and a percentage tolerance and produces the desired interval. You must also define a selector percent that produces the percentage tolerance for a given interval. The center selector is the same as the one shown above.

> (print (make-center-percent 10 12))
[8.8,11.2]
> (percent (make-center-percent 10 12))
11.999999999999993

Leave a Reply