Mersenne Twister Seeding and UUIDs

Johannes Pfau nospam at example.com
Mon Jun 11 10:15:45 PDT 2012


Am Sun, 10 Jun 2012 00:24 +0100
schrieb Andrew Talbot <andrew.talbot at talbotville.com>:

> Forgive what may be the unintelligible ramblings of an ignorant
> hobbyist, but, if I am not mistaken, the Mersenne Twister
> implementation in std.random currently can be seeded only with a
> 32-bit unsigned integer, which I presume gives it 2^32 starting
> points, whereas I believe there should also be an alternative option
> to seed it with an array of up to 624 uintS, so that potentially it
> can be started in any one of its 19,937 internal states. I may be
> wrong, but I believe that to have instant access to enough of the
> "state space" to be able to generate a large number of unique random
> UUIDs this second seeding option may be necessary.
> 

Could someone who's familiar with RNGs answer this question? This seems
to be important for st.uuid, we should get this right.


More information about the Digitalmars-d mailing list