Code

#lang racket

(require math/base)

;; Fixed points

(define tolerance 0.00001)

(define (fixed-point f first-guess)
  (define (close-enough? v1 v2)
    (< (abs (- v1 v2)) tolerance))
  (define (try guess)
    (let ((next (f guess)))
      (if (close-enough? guess next)
          next
          (try next))))
  (try first-guess))

; tests

(display "calculated")
(newline)
(fixed-point (lambda (x) (+ 1 (/ 1.0 x))) 1)

(display "exact")
(newline)
phi.0 ; exact

Output

calculated
1.6180327868852458
exact
1.618033988749895