XLPack 7.0
XLPack Numerical Library (C API) Reference Manual
Loading...
Searching...
No Matches

◆ lcong48()

void lcong48 ( unsigned short  p[])

Set up parameters for random number generators (Linear congruential method)

Purpose
Set up parameters for rand48 series random number generators.
Parameters
[in]p[])Array p[7] For linear congruential method Xn+1 = (a*Xn + c) mod m, sets up the multiplicand a and the addend c (m = 2^48). Further, seed value for drand48, lrand48 and mrand48 is initialized.
  p[0]〜p[2]: Seed value.
  p[3]〜p[5]: Multiplicand a. (default = 25214903917)
  p[6]: Addend c. (default = 11)
Note
This routine is provided for Windows version.