5.5. Random Numbers
Random numbers used by programmers are usually pseudo-random numbers. That is, you have a function that takes a starting value, the seed, and each call to the function returns a new result. Most of the pseudo-random-number generators (usually just called RNG) return a floating-point fraction value between 0.00 and 0.9999... at whatever precision your SQL engine has. The choice of a seed to start the generator can be a constant or a constantly changing value like the system clock—given the same seed, it will always generate the same sequence.
This is obviously “mathematical heresy,” and there are RNGs that were later found not to pass statistical tests for randomness. However, a good RNG will have desirable properties, such ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access