std.random and mersenne twister

Andrea Fontana nospam at example.com
Tue Jul 24 15:01:03 PDT 2012


On Tuesday, 24 July 2012 at 16:09:15 UTC, monarch_dodra wrote:
> 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

I see there's an implementation in tango for d1, with params too 
:)
Have you looked for Marsaglia's paper?




More information about the Digitalmars-d mailing list