Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
function prob_f64(n)
s = 0
for _ in 1:n
z_i = rand(UInt)
x_i = reinterpret(Float64, z_i)
s += Int(x_i == x_i + 1.0)
end
s, n
end
prob_f64(1_000_000)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment