The SDL Component Suite is an industry leading collection of components supporting scientific and engineering computing. Please visit the SDL Web site for more information....



LongRand


Unit:SDL_math1
Class: None
Declaration: function LongRand (seed: longint): double;

For many applications (e.g. data encryption) it would be necessary to have a portable random generator of sufficient period length. The random generator used in LongRand is based on three combined linear congruential generators which are designed in such a way that the period length of the resulting pseudo-random sequence is about 3.47*10E17.

The random generator can be initialized by setting the parameter seed to a non-zero value. For normal operation seed has to be zero; the random generator then produces a pseudo-random sequence of floating point numbers in the interval of [0.0,1.0].



Last Update: 2012-Oct-20