continued-fractions

Why the bleep isn't my continued fraction approximating properly?

Reading through more SICP and I'm stuck on exercise 1.3.8. My code works properly for approximating 1/phi, but doesn't work for approximating e - 2. (define (cont-frac n d k) (define (frac n d k) (if (= k 0) 1.0 (+ (d k) (/ (n (+ k 1)) (frac n d (- k 1)))))) (/ (n 1) (frac n d k))) (define (eulers-...