4 ms·
Here is a visualization of the number convergence: (loop [i 1 t [10N] v [1.0]] (if (> i 300) (map (fn [[a b]] (/ a b)) (partition 2 (interleave v t))
by xclojure 12y ago
Here is a visualization of the number convergence:
(loop [i 1 t [10N] v [1.0]]
(if (> i 300)
(map (fn [[a b]] (/ a b)) (partition 2 (interleave v t)))
(recur
(inc i)
(conj t (* 10 (last t)))
(conj v (+ (* 9 (last v)) (Math/pow 10 i))))))