|
|
◆ Seed48()
| Sub Seed48 |
( |
Xseed() As |
Integer | ) |
|
Initialization with 48-bit seed for drand48, lrand48 and mrand48 (Linear congruential method)
- Purpose
- This routine initializes seed for Drand48, Lrand48 and Mrand48. Also resets the parameters of linear congruential method, multiplicand a and addend c, to the default values.
- Parameters
-
| [in] | Xseed() | Array Xseed(2)
48-bit (16-bit x 3) seed.
Function call with the following arguments is equivalent to calling Srand48(Seed).
Xseed(0) = &H330E
Xseed(1) = Lower 16 bits of Seed
Xseed(2) = Upper 16 bits of Seed |
- Note
- If the random number generator is called without an initialization by Seed48() or Srand48(), it will be automatically initialized by using Xseed(0) = &H330E, Xseed(1) = &HABCD, and Xseed(2) = &H1234 as the seed.
The multiplicand a and the addend c, set up by Lcong48(), will be reset to the default values.
- Example Program
- See example of Drand48 and Erand48.
|