Lines Matching defs:random

31 static char sccsid[] = "@(#)random.c	8.2 (Berkeley) 5/19/95";
45 * random.c:
47 * An improved random number generation package. In addition to the standard
51 * then initialized to contain information for random number generation with
56 * information and generates far better random numbers than a linear
68 * The random number generation technique is a linear feedback shift register
75 * influenced by pseudo-random carries out of the lower bits. The total
96 * state information and generates far better random numbers than a linear
104 * For each of the currently supported random number generators, we have a
106 * many bytes of state info to support this random number generator), a degree
168 /* The random sequences do not vary much with the seed */
189 * could get away with just one pointer, but the code for random() is more
206 * of random(), we remember the first location of the state information, not
224 * The random sequences do not vary much with the seed,
254 * Initialize the random number generator based on the given seed. If the
279 (void)random();
286 * This often causes problems. We seed the generator using pseudo-random
319 * random number generation. Based on the number of bytes we are given, and
350 "random: not enough state (%ld bytes); ignored.\n", n);
427 "random: state info corrupted; not changed.\n");
439 * random:
447 * generated, reduced to 31 bits by throwing away the "least random" low bit.
453 * Returns a 31-bit random number.
456 random(void)
470 i = (*f >> 1) & 0x7fffffff; /* chucking least random bit */