[erlang-questions] New random module?

Richard O'Keefe ok@REDACTED
Thu Nov 25 00:31:52 CET 2010


On 24/11/2010, at 9:41 PM, Kenji Rikitake wrote:

> In the message <20101124080025.GA40466@REDACTED>
> dated Wed, Nov 24, 2010 at 05:00:01PM +0900,
> Kenji Rikitake <kenji.rikitake@REDACTED> writes:
>> * XORshift 7 stage (Panneton-L'Ecuyer, 2005[1], state: 8 bytes, period: 2^256-1)
> 
> [1] Francis Panneton and Pierre L'ecuyer. 2005. On the xorshift random
> number generators. ACM Trans. Model. Comput. Simul. 15, 4 (October
> 2005), 346-361. DOI=10.1145/1113316.1113319 http://doi.acm.org/10.1145/1113316.1113319

The C code for the 7 stage Xorshift generator displayed in figure 1
of that paper has 32 bytes of state, not 8.  The 'doubles' you get
from it have only 32 bits worth of randomness; the bottom 21 bits
are 0.  The paper concludes by saying "These generators are fast,
but not reliable, according to our analysis."  They don't report the
results of tests on the 7 stage generator.




More information about the erlang-questions mailing list