1 --- _SB/Libc/gen/FreeBSD/rand48.3 2004-11-25 11:38:01.000000000 -0800
2 +++ _SB/Libc/gen/FreeBSD/rand48.3.edit 2006-06-28 16:55:51.000000000 -0700
18 .Nd pseudo random number generators and initialization routines
29 -.Fn erand48 "unsigned short xseed[3]"
31 +.Fa "unsigned short xsubi[3]"
36 +.Fa "unsigned short xsubi[3]"
40 +.Fa "unsigned short param[7]"
43 -.Fn nrand48 "unsigned short xseed[3]"
53 -.Fn jrand48 "unsigned short xseed[3]"
55 -.Fn srand48 "long seed"
57 +.Fa "unsigned short xsubi[3]"
59 .Ft "unsigned short *"
60 -.Fn seed48 "unsigned short xseed[3]"
62 +.Fa "unsigned short seed16v[3]"
65 -.Fn lcong48 "unsigned short p[7]"
72 -family of functions generates pseudo-random numbers using a linear
73 +family of functions generates pseudo-random numbers, using a linear
74 congruential algorithm working on integers 48 bits in size.
76 particular formula employed is
77 -r(n+1) = (a * r(n) + c) mod m
78 -where the default values are
79 -for the multiplicand a = 0xfdeece66d = 25214903917 and
80 -the addend c = 0xb = 11.
81 +r(n+1) = (a * r(n) + c) mod m.
82 +The default value for the multiplicand `a' is 0xfdeece66d (25214903917).
83 +The default value for the the addend `c' is 0xb (11).
84 The modulo is always fixed at m = 2 ** 48.
85 r(n) is called the seed of the random number generator.
87 -For all the six generator routines described next, the first
88 +For the six generator routines described next, the first
89 computational step is to perform a single iteration of the algorithm.
98 such that the 32 bits of the seed value are copied into the upper 32 bits
99 of r(n), with the lower 16 bits of r(n) arbitrarily being set to 0x330e.
100 Additionally, the constant multiplicand and addend of the algorithm are
104 returns a pointer to an array of 3 shorts which contains the old seed.
105 -This array is statically allocated, thus its contents are lost after
106 +This array is statically allocated; thus, its contents are lost after