Exercise 1.38

Read Exercise 1.38 ~ Solution


(define (euler-e)
  (+ 2
     (cont-frac-iter (lambda (i) 1.0)
                     (lambda (i) 
                       (if (= (remainder i 3) 2)
                           (* (quotient (+ i 1) 3) 2)
                           1))
                     100)))

(euler-e)
2.7182818284590455

Leave a comment