Enigma is using bad random numbers

log in

Advanced search

Message boards : Number crunching : Enigma is using bad random numbers

Author Message
blub
Send message
Joined: 17 May 14
Posts: 7
Credit: 1,148,101
RAC: 56

Message 3617 - Posted: 20 Oct 2015, 16:15:00 UTC

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

Message 3631 - Posted: 25 Oct 2015, 23:58:50 UTC - in response to Message 3617.

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...


Post to thread

Message boards : Number crunching : Enigma is using bad random numbers


Return to Enigma@Home main page


Copyright © 2017 TJM