Lines Matching defs:random
31 static char sccsid[] = "@(#)random.c 8.2 (Berkeley) 5/19/95";
44 * random.c:
46 * An improved random number generation package. In addition to the standard
50 * then initialized to contain information for random number generation with
55 * information and generates far better random numbers than a linear
67 * The random number generation technique is a linear feedback shift register
74 * influenced by pseudo-random carries out of the lower bits. The total
95 * state information and generates far better random numbers than a linear
103 * For each of the currently supported random number generators, we have a
105 * many bytes of state info to support this random number generator), a degree
173 * could get away with just one pointer, but the code for random() is more
190 * of random(), we remember the first location of the state information, not
229 * Initialize the random number generator based on the given seed. If the
254 (void)random();
261 * This often causes problems. We seed the generator using pseudo-random
294 * random number generation. Based on the number of bytes we are given, and
402 * random:
410 * generated, reduced to 31 bits by throwing away the "least random" low bit.
416 * Returns a 31-bit random number.
419 random(void)
433 i = *f >> 1; /* chucking least random bit */