Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Continued Fractions

Name: Anonymous 2009-05-29 20:56

(define collapse-cf
  (λ(rep)
    (let ((local-rep (reverse rep)))
      (define collapse
        (λ(accum x)
          (if (empty? (cdr x))
              (+ (car x) (/ 1 accum))
              (collapse (+ (car x) (/ 1 accum)) (cdr x)))))
      (collapse (car local-rep) (cdr local-rep))))))

The continued fraction of (1; 1) is the golden mean.

The continued fraction of (1; 2) is the square root of 2.

The continued fraction (88888888; 88888888) is just 88888888.

YOU CALL CARE

Name: OP 2009-05-29 21:17

The continued fraction (88888888; 88888888) is just 88888888.
This is a lie.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List