SURVO MM Help System (web edition)

The rnd() function is a adopted as such as the Microsoft C Library
function rand. It is based on a mixed congruential algorithm
     U(n)=214013U(n-1)+2531011 mod 2^31 .
According to certain empirical tests with an optional RNDTEST operation
of Survo, these numbers are rather good but not as good as those
generated by the rand() function described below.

rand(n) where 1<=n<=2^32-1=4294967295 generates random numbers
according to a Combined Tausworthe generator presented by Shu Tetsuoka
and Pierre L'Ecuyer (ACM Transactions on Modelling and Computer Simulation,
Vol.1, No.2, 1991). The first one of the proposed three generators is
implemented as rand().
The period length of rand() is about 10^18. In more serious simulation
experiments where several long non-overlapping series of random numbers
are to be guaranteed, special INSEED and OUTSEED specifications are
available in VAR. The OUTSEED=<seed_number_file> specification
saves the last two seed numbers used by rand(). To continue from this
point onwards in a new experiment, enter these seed numbers by a
corresponding INSEED=<seed_number_file> specification.
When INSEED is given, the parameter n in rand(n) has no importance.


Another alternative is the urand() function which corresponds to the
classical prime modulus multiplicative linear congruential generator
     U(n)=16807*U(n-1) mod 2^31-1
suggested by Lewis, Goodman and Miller in 1969 and praised by Park
and Miller as a minimal standard generator (see their paper "Random
number generators: good ones are hard to find" in Communications of
ACM, October 1988).
The period length is only 2^31-1=2147483647 (2*10^9).

A new alternative is the mrand() function using the Mersenne Twister
algorithm by Takuji Nishimura and Makoto Matsumoto (1998, modified
2002). It has a huge period 2^19937-1 (a Mersenne prime),
i.e. about 10^6000.
Currently mrand() is available in operations VAR, TRANSFORM BY #UNIFORM,
MAT #TRANSFORM, MNSIMUL.

  V = More information on VAR operation 


More information on Survo from www.survo.fi
Copyright © Survo Systems 2001-2012.
webmaster'at'survo.fi