(define approximate-sqrt
(lambda (x tolerance)
(define find-approximation-from
(lambda (starting-point)
(if (good-enough? starting-point)
starting-point
(find-approximation-from (improve starting-point)))))
(define good-enough?
(lambda (approximation)
(<= (- 1 tolerance)
(/ (square approximation) x)
(+ 1 tolerance))))
(define improve
(lambda (approximation)
(/ (+ (/ x approximation) approximation)
2)))
(find-approximation-from 1)))
(define square
(lambda (x)
(* x x)))