Daniel Lemire personal blog

How many floating-point numbers are in the interval [0,1]?

Most commodity processors support single-precision IEEE 754 floating-point numbers. Though they are ubiquitous, they are often misunderstood. One of my readers left a comment suggesting that picking an integer in [0,232) at random and dividing it by 232, was equivalent to picking a number at random in [0,1). I am not…
Points
200
HN comments
219
Submissions
2
Cited by
4 commenters

Math & AlgorithmsSoftware Engineering2017

On Hacker News

SubmittedTitle on HNPointsComments
Feb 28, 2017How many floating-point numbers are in the interval [0,1]? by mgdo200153
Apr 15, 2023How many floating-point numbers are in the interval [0,1]? (2017) by burntcaramel11366

Cited in comments

Linked from 5 Hacker News comments by 4 different people, from Mar 2017 to Jun 2025.

Most recent:

Search every comment that links here →

More from Daniel Lemire

All 87 posts →

Related posts from the same era