Lines Matching full:random

33  * $FreeBSD: src/lib/libc/stdlib/random.c,v 1.4.2.2 1999/09/05 11:16:45 peter Exp $
38 static char sccsid[] = "@(#)random.c 8.2 (Berkeley) 5/19/95";
53 * random.c:
55 * An improved random number generation package. In addition to the standard
59 * then initialized to contain information for random number generation with
64 * information and generates far better random numbers than a linear
76 * The random number generation technique is a linear feedback shift register
83 * influenced by pseudo-random carries out of the lower bits. The total
104 * state information and generates far better random numbers than a linear
112 * For each of the currently supported random number generators, we have a
114 * many bytes of state info to support this random number generator), a degree
163 /* The random sequences do not vary much with the seed */
184 * could get away with just one pointer, but the code for random() is more
201 * of random(), we remember the first location of the state information, not
223 * The random sequences do not vary much with the seed, in good_rand()
232 * From "Random number generators: good ones are hard to find", in good_rand()
250 * Initialize the random number generator based on the given seed. If the
328 * random number generation. Based on the number of bytes we are given, and
363 "random: not enough state (%ld bytes); ignored.\n", n); in ntp_initstate()
442 "random: state info corrupted; not changed.\n"); in ntp_setstate()
456 * random:
464 * generated, reduced to 31 bits by throwing away the "least random" low bit.
470 * Returns a 31-bit random number.
487 i = (*f >> 1) & 0x7fffffff; /* chucking least random bit */ in ntp_random()
504 * Generate a Uniform-distributed Unity based random number. Replaces a