| SUMMARY: MODULE | CLASS | TYPE | PROC | VAR | CONST | DETAIL: TYPE | PROC | VAR | CONST |
For details on this algorithm take a look at Park S.K. and Miller K.W. (1988). "Random number generators, good ones are hard to find". Communications of the ACM, 31, 1192-1201.
| Procedure Summary | |
| GetSeed(VAR LONGINT) Returns the currently used seed value. | |
| PutSeed(LONGINT) Set seed as the new seed value. | |
| RND(LONGINT): LONGINT Calculates a new number. | |
| Random(): REAL Calculates a number `x' with `0.0 <= x < 1.0'. | |
| Constant Summary | |
| modulo | |
| Procedure Detail |
PROCEDURE GetSeed(VAR seed: LONGINT)
Returns the currently used seed value.
PROCEDURE PutSeed(seed: LONGINT)
Set seed as the new seed value. Any values for seed are allowed, but values beyond the intervall `[1..2^31-2]' will be mapped into this range.
PROCEDURE RND(range: LONGINT): LONGINT
Calculates a new number. range has to be in the intervall `[1..2^31-2]'. Result is a number from `0,1,..,range-1'.
PROCEDURE Random(): REAL
Calculates a number `x' with `0.0 <= x < 1.0'.
| Constant Detail |
CONST modulo