Lines Matching defs:random
50 * random.c:
51 * An improved random number generation package. In addition to the standard
55 * initialized to contain information for random number generation with that
60 * generates far better random numbers than a linear congruential generator.
70 * The random number generation technique is a linear feedback shift register
77 * by pseudo-random carries out of the lower bits. The total period of the
89 * For each of the currently supported random number generators, we have a
91 * many bytes of state info to support this random number generator), a degree
137 * away with just one pointer, but the code for random() is more efficient this
149 * Note that for efficiency of random(), we remember the first location of
208 * future random number generation. Based on the number of bytes we
345 * random:
352 * reduced to 31 bits by throwing away the "least random" low bit.
356 * Returns a 31-bit random number.
360 random(void)
371 i = (*rp->fptr >> 1)&0x7fffffff; /* chucking least random bit */
384 * Initialize the random number generator based on the given seed. If the
412 for (i = 0; i < 10*rp->rand_deg; i++) (void)random();