Leon, I guess my sarcasm didn't get through, ASCII is such a low bandwidth medium (I refuse to engage in smileys and such). Anyhow, the pedigree on this particular RNG is documented in Modern Applied Statistics with Splus W.N. Venables & B.D. Ripley page 124 It is claimed to have a period of 6.6 * 10^14, no word on serial correlation. No doubt Knuth is a good reference though a bit weighty for finding algorithms, another good reference is the Numerical Recipes in C/Pascal/Fortran series. Matt > > Here is a random number generator written in C. It is the > >same one used in the statistics package S-plus and since that is a > >commercial package it must be good right? I use it too and have never ... > > I'd be very careful about using a random number generator that hadn't > been properly tested. Just because it is used commercially doesn't mean > that it is any good! Have a look at Knuth, The Art of Computer > Programming, for good random number generator algorithms. /*****************************************/ /* Matt Calder, Dept. of Statistics, CSU */ /* http://www.stat.colostate.edu/~calder */ /*****************************************/