std.random and mersenne twister

monarch_dodra monarchdodra at gmail.com
Tue Jul 24 09:09:14 PDT 2012


On Saturday, 21 July 2012 at 16:32:56 UTC, Andrei Alexandrescu 
wrote:
> On 7/21/12 6:28 AM, monarch_dodra wrote:
>> On Friday, 20 July 2012 at 21:45:17 UTC, Andrei Alexandrescu 
>> wrote:
>>> On 7/20/12 8:51 AM, Andrea Fontana wrote:
>>>> CMWC is proven to be a valid method and it passes diehard 
>>>> tests. It was
>>>> written by prof. George Marsiglia (he developed xorshift too 
>>>> - included
>>>> in std.random). He was one of the best experts in PRNG.
>>>
>>> Would be great if you wanted to contribute an implementation 
>>> of CMWC
>>> to std.random.
>>>
>>> Thanks,
>>>
>>> Andrei
>>
>> That's something I could undertake confidently.
>>
>> Writing both an actual engine, and creating aliases for 
>> pre-optimized
>> schemes.
>>
>> I'd just have to wait to finish my current development (I 
>> don't know how
>> to have parallel forks).
>
> That would be awesome (both RNG and getting fluent with 
> parallel forks).
>
> Andrei

I gave it a shot, but I just couldn't find enough documentation 
on CMWC to write a correctly parametrizable engine. I honestly 
don't have much to go by other than wikipedia's example. I could 
force the implementation, but I'd have zero faith in it's 
reliability.

That said, I don't think it would be a bad idea to add a Lagged 
Fibonacci generator first. The generator already exists in boost, 
and is much more documented. The actual development would just 
require a port.

I'll try to get *that* done, but for CMWC, I'm out. Sorry.

The bright side is I learned to parallel fork :D


More information about the Digitalmars-d mailing list