

How to generate a double-precision floating-point number in [0, 1] (2014) - danieldk
http://mumble.net/~campbell/2014/04/28/uniform-random-float

======
alnsn
Why [0, 1] interval is so popular in random number generators? It's one of the
worst intervals possible imo because it includes subnormal numbers. The
interval [1, 2] is much nicer. Some implementations generate random numbers in
[1, 2] and subtract 1.0:
[http://permalink.gmane.org/gmane.comp.lang.lua.luajit/3051](http://permalink.gmane.org/gmane.comp.lang.lua.luajit/3051)

