Cool, and even cooler that the idea is due to Knuth.
I found this typo entertaining:
Technically it could be replaced by any other large prime number. The most important thing is that it must have few factors, and be large enough to distribute information into the higher value bits when the integer overflows.
Surely any prime number has "few factors", i.e. none other than itself and 1? I guess the "prime" in the first sentence is a typo, since the second sentence reads as if the first one didn't say "prime".
I noticed that too, I think he may be referring to the fact that generating super large actual prime numbers is hard, so people use probabilistic algorithms to generate probably almost primes
I'm glad that the author included a disclaimer: this is fine for generating pleasing pictures, but should not be used for anything serious (such as crypto, or even Monte Carlo simulations etc.)
(and does that need the outer parentheses?) I doubt the first passes dieharder, as (if my C isn't too rusty) it alternates between odd and even numbers.
unwind|9 years ago
I found this typo entertaining:
Technically it could be replaced by any other large prime number. The most important thing is that it must have few factors, and be large enough to distribute information into the higher value bits when the integer overflows.
Surely any prime number has "few factors", i.e. none other than itself and 1? I guess the "prime" in the first sentence is a typo, since the second sentence reads as if the first one didn't say "prime".
FabHK|9 years ago
quinnftw|9 years ago
FabHK|9 years ago
peff|9 years ago
eutectic|9 years ago
joegosse|9 years ago
https://www.phy.duke.edu/~rgb/General/dieharder.php
Someone|9 years ago
jcahill84|9 years ago
joegosse|9 years ago