Comment

Comment by badmintonbaseba

Generalizing this to arbitrary intervals, not just [0, 1) looks tricky. Just scaling and shifting a perfect uniform result from [0, 1) doesn't result in a perfect random floating-point number.

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton