fork download
  1. (define (f n)
  2. (define (aux m x y)
  3. (or
  4. (and (< n m) y)
  5. (and (= m 0) (aux 1 y 4))
  6. (and (= m 1) (aux 2 y (/ 17 4)))
  7. (aux (+ m 1) y (+ (- 108 (/ 815 y)) (/ 1500 (* y x))))))
  8. (aux 0 0 0))
  9. (define (p e)
  10. (print (list e (exact->inexact e))))
  11. (p (f 0))
  12. (p (f 1))
  13. (p (f 2))
  14. (p (f 3))
  15. (p (f 80))
  16.  
Success #stdin #stdout 0.01s 7700KB
stdin
Standard input is empty
stdout
(4 4.0)
(4.25 4.25)
(4.47058823529413 4.47058823529413)
(4.64473684210556 4.64473684210556)
(100.0 100.0)