Enigma is using bad random numbers |
Message boards : Number crunching : Enigma is using bad random numbers
Author | Message |
---|---|
blub Send message Joined: 17 May 14 Posts: 7 Credit: 1,148,207 RAC: 0 |
just found this great line of code in the Enigma source: i = rand() % (count+1); 1: this does not produce a unifor distribution in [0:count] 2: rand produces very poor output |
numbermaniac Send message Joined: 28 Mar 14 Posts: 4 Credit: 11,545 RAC: 0 |
This is more like finding the modulus of randomly generated numbers. I'm not sure how the rest of this works, but that doesn't look too bad... |
Message boards :
Number crunching :
Enigma is using bad random numbers