From: Kbwms AT aol DOT com Message-ID: <173b7616.365163e8@aol.com> Date: Tue, 17 Nov 1998 06:54:16 EST To: eliz AT is DOT elta DOT co DOT il Cc: djgpp-workers AT delorie DOT com Mime-Version: 1.0 Subject: Re: src/libc/ansi/stdlib/rand.c Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7bit X-Mailer: AOL 3.0 16-bit for Windows sub 38 Reply-To: djgpp-workers AT delorie DOT com Subj: Re: src/libc/ansi/stdlib/rand.c To: eliz AT is DOT elta DOT co DOT il (Eli Zaretskii) CC: djgpp-workers AT delorie DOT com Dear Eli Zaretskii, On 11-17-98 at 04:07:29 EST you wrote: > > The rationale behind this requirement, as I understand it, is that > once your application starts a random sequence, it should have total > control on the produced sequence. If some library function calls > `rand', some of the generated random numbers will be ``stolen'' and > won't be seen by the application. > Function `rand' is a full-period generator which means that it repeats after its full complement of variates has been generated. The period of DJGPP `rand' is 2^64-1. If one variate per microsecond could be generated, the period would last beyond the year 3100, give or take a millennium, starting now. Further, the fact that the generator is cyclic means that the numbers ``stolen'' at the beginning of the sequence must eventually reappear. K.B. Williams