Last active
November 7, 2016 15:35
-
-
Save cgrand/d5dbc75d14b46108215fdd5af0e30609 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defn mid [a b] (/ (+ a b) 2.0)) | |
(count (take-while #(not= 1.0 %) (iterate #(mid 1 %) 2))) | |
=> 53 | |
; 53 is not random but tied to the fact that the fraction part of a double is stored on 52 bits |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment