sicp/1_38.sch

12 lines
208 B
Scheme

(load "1_37.sch") ; for cont-frac-rec and cont-frac-iter
(define (n i) 1.0)
(define (d i)
(if (= (remainder i 3) 2)
(* (+ (quotient i 3) 1) 2)
1))
(define e
(+ 2 (cont-frac-rec n d 20)))