Re:14 Character Random Number Generator in C
by eutectic on Wednesday February 08, 2017 @11:46AM
(#13599685)
A 15 character 64 to 32-bit generator I devised which passes dieharder:
[ Parent
| on HN ]
Re:14 Character Random Number Generator in C
by joegosse on Wednesday February 08, 2017 @12:32PM
(#13600164)
Is dieharder considered as the industry standard tool for testing randomness? Is it commonly used by experts?
Re:14 Character Random Number Generator in C
by eutectic on Wednesday February 08, 2017 @12:37PM
(#13600216)
Dieharder works OK, and you can easily install it on Ubuntu as a command-line tool. PractRand and TestU01 are more stringent and give you more knobs to play with.
Re:14 Character Random Number Generator in C
by Someone on Wednesday February 08, 2017 @03:13PM
(#13601591)
That can be made shorter:
x+=x*x+9;
Are you sure you don't mean x+=((x*x+9)>>32);
(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.