From: FMGCFMGC <FMG...@te...> - 2004-09-23 09:36:04
|
Hello! Only for the record here are two simple-to-use random number generators Marsaglia-Multicarry: --------------------- You have a C implementation in the file src/nmath/standalone/sunif.c of R-1.9.1 source (under the GPL). Very easy to use, and of good quality at the time it was proposed: The output of the R command (R-1.8.1 patched): > help(RNGkind) gives: "Marsaglia-Multicarry"': A _multiply-with-carry_ RNG is used, as recommended by George Marsaglia in his post to the mailing list 'sci.stat.math'. It has a period of more than 2^60 and has passed all tests (according to Marsaglia). The seed is two integers (all values allowed) Here is the reference (again from the output of 'help(RNGkind)'): Marsaglia, G. (1997) _A random number generator for C._ Discussion paper, posting on Usenet newsgroup 'sci.stat.math' on September 29, 1997. Mersenne-Twister: ----------------- http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/emt.html It's is the default RNG in R-1.8.1. Originally released under the GPL, but the authors decided to let MT be used in commercial products freely. <quote> we decided to let MT be used for any purpose, including commercial use </quote> See: http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/MT2002/elicense.html Hope it helps! Francisco |