标签:style blog color ar sp div log bs ef
练习1.6
new-if的三个参数会先被执行,这样就会无限循环下去
练习1.7
(define (sqrt-iter last-guess guess x) (if (good-enough? last-guess guess) guess (sqrt-iter guess (improve guess x) x))
另一种解法:
(define (good-enough? guess x)
(< (/ (abs (- (square guess) x)) guess) (* guess 0.0001)))
标签:style blog color ar sp div log bs ef
原文地址:http://www.cnblogs.com/TLightSky/p/4089509.html