; Ex 1.8(define improve-cube-root (lambda (x y) (/ (+ (/ x (* y y)) (* 2 y)) 3)))

(define cube-root-iter (lambda (guess x ) (define next-guess ( / ( + (/ x (* guess guess)) (* 2 guess)) 3)) (if (good-enough-2? next-guess guess) next-guess (cube-root-iter next-guess x))))

(define cube-root (lambda (x) (cube-root-iter 1.0 x)))

This entry was posted on Monday, January 25th, 2010 at 11:46 pm and is filed under Programming, Scheme. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

Fill in your details below or click an icon to log in:

You are commenting using your WordPress.com account. ( Log Out / Change )

You are commenting using your Google+ account. ( Log Out / Change )

You are commenting using your Twitter account. ( Log Out / Change )

You are commenting using your Facebook account. ( Log Out / Change )

Connecting to %s

Notify me of new comments via email.