[erlang-questions] RNG algorithm choice for uniform natural numbers
Thu Aug 2 19:49:39 CEST 2018
a "uniform sequence of natural numbers". There are infinitely many natural
numbers. The generators you mention
produce integers of fixed size. What exactly is it you want? Do you want
On 3 August 2018 at 00:19, Krzysztof Jurewicz <krzysztof.jurewicz@REDACTED>
> I’m looking for an algorithm to perform a transparent, reproducible
> generation of an uniform sequence of natural numbers. There are three RNG
> algorithms documented in the rand module:
> • Xoroshiro116+. According to the linked page at
> http://xoshiro.di.unimi.it/ , it is suitable only for floating point
> numbers, so it doesn’t fit. Moreover, the page actually describes an
> algorithm with 64-bit precision, while rand implements a variant with
> 56-bit precision. It looks like the latter is implemented only in Erlang,
> so there is little practical interoperability between languages.
> • Xorshift1024*. It fails the BigCrush test according to
> number-generator-fails-bigcrush/ .
> • Xorshift116+. The comment about 58-bit precision being rare applies
> (according to https://github.com/jj1bdx/emprng/ , “the original exsplus
> was Xorshift128+”). Xorshift128+ fails the BigCrush test, so I presume that
> xorshift116+ fails it too.
> So… is there any particular reason for the rand module to not implement
> xoshiro256**, which is more widespread than 58-bit precision algorithms
> and, according to its creators, “has excellent (sub-ns) speed, a state
> space (256 bits) that is large enough for any parallel application, and it
> passes all tests we are aware of”?
> erlang-questions mailing list
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-questions