==========================================================================
Exercise
==========================================================================
1. A trace diagram of a function call illustrates the computational
process generated by the function.
Review the function trace diagram for (my-sqrt 4).
Trace Diagram
Assume epsilon = 0.5 and the initial guess = 1.
(my-sqrt 4)
(sqrt-iter 4 1)
(sqrt-iter 4 2.5)
(sqrt-iter 4 2.05)
2.05
Draw a trace diagram for (my-sqrt 4) with epsilon = 0.01 and the
initial guess = 1.
2. Using heron.ss as a model, build cube.ss, that contains the function
(cbrt x) to compute the cubed root of x.
You should write auxiliary functions that are called within (cbrt x).
To generate a better guess use the formula:
better-guess(x,g) = (x/(g*g)) + 2g
--------------
3
* g is the current guess
You can test (cbrt x) against the built in function (expt x k).
Here's the contract for expt
;; Number Nubmer -> Number
(expt x k) -> return x to the kth power.
3. Draw a user defined function decomposition diagram for (cbrt x).