You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I found a different (simpler) version of MWC256 that George Marsaglia himself posted on the internet. It has the same 2^8222 period and Marsaglia vetted the quality of the PRNG as well. The version that we currently use comes from Feb 25, 2003 https://groups.google.com/d/msg/sci.math/k3kVM8KwR-s/jxPdZl8XWZkJ:
static unsigned long Q[256],c=362436;
unsigned long MWC256(void){
unsigned long long t,a=1540315826LL;
unsigned long x;
static unsigned char i=255;
t=a*Q[++i]+c; c=(t>>32);
x=t+c; if(x<c){x++;c++;}
return(Q[i]=x); }
static unsigned long Q[256],c=362436; /* choose random initial c<809430660 and */
/* 256 random 32-bit integers for Q[] */
unsigned long MWC256(void){
unsigned long long t,a=809430660LL;
static unsigned char i=255;
t=a*Q[++i]+c; c=(t>>32);
return(Q[i]=t); }
Why was the first version chosen for mwc-random?
The text was updated successfully, but these errors were encountered:
I found a different (simpler) version of MWC256 that George Marsaglia himself posted on the internet. It has the same 2^8222 period and Marsaglia vetted the quality of the PRNG as well. The version that we currently use comes from Feb 25, 2003 https://groups.google.com/d/msg/sci.math/k3kVM8KwR-s/jxPdZl8XWZkJ:
Another version comes from May 13, 2003 https://groups.google.com/d/msg/comp.lang.c/qZFQgKRCQGg/rmPkaRHqxOMJ:
Why was the first version chosen for mwc-random?
The text was updated successfully, but these errors were encountered: