Changes in Version 2.0 ---------------------- Using the previous version of SPRNG, a user can use only one of the SPRNG generators in one run of the program. The objective of the new version is to combine the current random number generators (RNGs) into a single library so that a user can use all of them in a single program at a same time. The user now is able to and needs to specify the type of RNG when a random number stream is initialized. We add one integer argument rng_type to the front of the argument list of the function init_sprng. int *init_sprng(int rng_type, int stream_number, int nstreams, int seed, int rng_parameter) SPRNG_POINTER init_sprng(integer rng_type, integer streamnum, integer nstreams, integer seed, integer param) User can sprcify one of the follows for rng_type: SPRNG_LFG SPRNG_LCG SPRNG_LCG64 SPRNG_CMRG SPRNG_MLFG SPRNG_PMLCG The following macros are added to sprng.h and sprng_f.h: #define SPRNG_LFG 0 #define SPRNG_LCG 1 #define SPRNG_LCG64 2 #define SPRNG_CMRG 3 #define SPRNG_MLFG 4 #define SPRNG_PMLCG 5 For simple interface, a user can only have one random number stream at one time since he doesn't specify stream ID. The default generator is "SPRNG_LFG". User still can change RNG at runtime by calling init_sprng: int *init_sprng(int rng_type, int seed, int rng_parameter) SPRNG_POINTER init_sprng(integer rng_type, integer seed, integer param) Changes in Version 1.0 ---------------------- Changes to version 0.5 1. Fortran stream_number in calls to init_sprng now starts from 0 instead of from 1. ****** VERY IMPORTANT ****** -------------- 2. A parallel Multiplicative Lagged Fibonacci Generator (mlfg) has been implemented. 3. Default parameter to init_sprng is called SPRNG_DEFAULT instead of DEFAULT. 4. Several functions inlined, to improve speed. 5. Directory 'include' contains the headers, and 'lib' the SPRNG libraries, instead of using 'SRC' and '.' respectively. If you have untarred SPRNG into a location where an old version is present, please remove your old interface.h, sprng.h, and sprng_f.h files in SRC and either make links to those in the 'include' directory, or copy them to SRC. 6. SRC/make.GENERIC helps in installation on new machines. 7. 'pack_sprng' now returns the state of a stream in a machine independent format that can be unpacked with 'unpack_sprng' (except for pmlcg, which still stores numbers in a machine dependent format). It may be incompatible with data stored in the beta version's format. 8. lcg64 and cmrg use larger primes as addends. So the random number sequences will now be different from those in Version 0.5. Changes to Version 1.0 Beta --------------------------- 1. Fixed a memory leak bug in mlfg.