00001 void mcell_ran4_init(); 00002 double mcell_ran4(); 00003 unsigned int mcell_iran4(); 00004 double mcell_ran4_64(); 00005 unsigned int mcell_iran4_64(); 00006 00007 /* 00008 Michael Hines added the prefix mcell to the global names. 00009 These functions were obtained from Tom Bartol <bartol@salk.edu> 00010 who uses them in his mcell program. 00011 He comments: 00012 For MCell, Ran4 has the distinct advantage of generating 00013 streams of random bits not just random numbers. This means that you can 00014 break the 32 bits of a single returned random number into several smaller 00015 chunks without fear of correlations between the chunks. Ran4 is not the 00016 fastest generator in the universe but it's pretty fast (16 million 00017 floating point random numbers per second on my 1GHz Intel PIII and 20 00018 million integer random numbers per second) and of near cryptographic 00019 quality. I've modified it so that a given seed will generate the same 00020 sequence on Intel, Alpha, RS6000, PowerPC, and MIPS architectures (and 00021 probably anything else out there). It's also been modified to generate 00022 arbitrary length vectors of random numbers. This makes generating numbers 00023 more efficient because you can generate many numbers per function call. 00024 MCell generates them in chunks of 10000 at a time. 00025 */