<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
  <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
  <META NAME="GENERATOR" CONTENT="GtkHTML/4.2.2">
</HEAD>
<BODY>
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.<BR>
<BR>
He also developed the "Marsiglia's Theorem" where he demonstrate that LCG (that is the default algorithm for many languages  for ex: glibc and vc++ lib, ...) has big issues.<BR>
LCG is very widespread but d doesn't use it (phew!). If a user know difference between PRNG algorithms can use MT, but as default for people that use weak C rand() function as default (that neither passes diehard tests) it can just be a good improvement (why should we give them MT that is slower than CMWC if they neither know default rand() weakness?) <BR>
<BR>
MT has a complex implementation, I hope std.random MT was tested :) <BR>
<BR>
Il giorno ven, 20/07/2012 alle 13.16 +0200, monarch_dodra ha scritto:
<BLOCKQUOTE TYPE=CITE>
<PRE>
On Friday, 20 July 2012 at 09:47:52 UTC, Andrea Fontana wrote:
> I read that default RNG in phobos is Mersenne Twister.
>
> I think it would be a good idea to replace it with
> complementary-multiply-with-carry (cmwc). CMWC is faster (use 
> simpler
> math), has a longer period (standard implementation has a 
> 2^131104
> period vs 2^19937 of current MT implementation in phobos) and 
> passed
> diehard tests (mt passes them too)
>
> And of course it's very easy to implement:
> <A HREF="http://en.wikipedia.org/wiki/Multiply-with-carry#Implementation">http://en.wikipedia.org/wiki/Multiply-with-carry#Implementation</A>

I'd say the problem is that it is not a very widespread or known 
PRNG.

While I wouldn't be against adding it to the library ("I see no 
reason not to add it"), making it the _default_ PRNG is a whole 
other story.

Users that choose "default" want something reliable, documented, 
trustworthy etc...

Multiply With Carry seems like it is Cutting Edge to me, not yet 
widespread, known or tested. I'd say it should only be used by 
those that explicitly request it's usage.
</PRE>
</BLOCKQUOTE>
<BR>
</BODY>
</HTML>