Hacker News new | ask | show | jobs
by alnsn 4111 days ago
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