Random number generators discussion

Random number generators | www.agner.org

Generate ALL float numbers in RNG?
Author: Agner Date: 2004-06-18 06:52
The result is double precision. The smallest double is 2^-1022 = 10^-307. The probability of reaching a number between 0 and 10^-307 from a perfect uniform distribution would be so small that it would never happen if all the computers in the world did nothing but generating random numbers until doomsday!!!

You have a choice between the resolutions 2^-32, 2^-52, and 2^-63 = 10^-19. That's more than enough for any application you could ever think of.

I think you are confusing range and resolution. The range of floating point numbers is defined by the minimum/maximum exponent. The resolution is defined by the maximum number of decimals. A double can distinguish between 0 and 10^-307, but not between 1 and 1+10^-307.

 
thread Generate ALL float numbers in RNG? new - Hangzai Luo - 2004-06-16
last replythread Generate ALL float numbers in RNG? - Agner - 2004-06-18
last replythread Generate ALL float numbers in RNG? new - Hangzai Luo - 2004-06-18
last reply Generate ALL float numbers in RNG? new - Agner - 2004-06-19