Lines Matching refs:random

31 static char sccsid[] = "@(#)random.c	8.2 (Berkeley) 5/19/95";
47 * random.c:
49 * An improved random number generation package. In addition to the standard
53 * then initialized to contain information for random number generation with
58 * information and generates far better random numbers than a linear
70 * The random number generation technique is a linear feedback shift register
77 * influenced by pseudo-random carries out of the lower bits. The total
98 * state information and generates far better random numbers than a linear
106 * For each of the currently supported random number generators, we have a
108 * many bytes of state info to support this random number generator), a degree
170 /* The random sequences do not vary much with the seed */
191 * could get away with just one pointer, but the code for random() is more
208 * of random(), we remember the first location of the state information, not
227 * The random sequences do not vary much with the seed,
257 * Initialize the random number generator based on the given seed. If the
281 (void)random();
290 * secure random(4) interface. Note that this particular seeding
307 fd = _open("/dev/random", O_RDONLY, 0);
334 * random number generation. Based on the number of bytes we are given, and
367 "random: not enough state (%ld bytes); ignored.\n", n);
444 "random: state info corrupted; not changed.\n");
456 * random:
464 * generated, reduced to 31 bits by throwing away the "least random" low bit.
470 * Returns a 31-bit random number.
472 long random(void)
486 i = (*f >> 1) & 0x7fffffff; /* chucking least random bit */