Thus spake Eric Hodel <[EMAIL PROTECTED]>:
> David Schultz ([EMAIL PROTECTED]) wrote:
> 
> > Rather than me showing you more semi-meaningful numbers from
> > Marsaglia's tests, why don't you look at the following sequence,
> > which I get by taking the lowest four bits of the 201st number in
> > the rand() sequence for seeds of (0, 1, 2, ...).
> > 
> 
> f c 9 6 2 f c 8 5 2 e b 8 4 1 e b 7 4 1 d a 7 3 0 d 9 6 3
> f c 9 6 2 f c 8 5 2 e b 8 4 1 e b 7 4 1 d a 7 3 0 d 9 6 3
> f c 9 6 2 f c 8 5 2 e b 8 4 1 e a 7 4 1 d a 7 3 0 d 9 6 3
> f c 9 6 2 f c 8 5 2 e b 8 4 1 e a 7 4 1 d a 7 3 0 d 9 6 3
> f c 9 5 2 f c 8 5 2 e b 8 4 1 e a 7 4 1 d a 7 3 0 d 9 6 3
> f c 9 5 2 f c 8 5 2 e b 8 4 1 e a 7 4 0 d a 7 3 0 d 9 6 3
> f c 9 5 2 f c 8 5 2 e b 8 4 1 e a 7 4 0 d a 7 3 0 d 9 6 3
> f c 9 5 2 f b 8 5 2 e b 8 4 1 e a 7 4 0 d a 7 3 0 d 9 6 3
> f c 9 5 2 f b 8 5 2 e b 8 4 1 e a 7 4 0 d a 7 3 0 d 9 6 3
> f c 9 5 2 f b 8 5 2 e b 8 4 1 e a 7 4 0 d a 6 3 0 d 9 6 3
> f c 9 5 2 f b 8 5 2 e b 8 4 1 e a 7 4 0 d a 6 3 0 d 9 6 3
> f 
> 
> > Notice that 'f c 9' repeats in regular intervals and is always
> > followed by a 5 or 6.  There is a similar pattern for 'e a 7'.  I
> > think this pretty much demonstrates that the algorithm isn't good
> > enough to generate high-quality randomness with respect to
> > different seed values.  I'm not suggesting that it absolutely must
> > be replaced, since most rand() implementations aren't very good in
> > the first place, but I'm pointing out that to do a good job of
> > fixing it once and for all is harder than you might think.
> 
> A littele modification shows just how similar these sequences are :)

Yeah, I saw the periodicity when I asked less(1) to select
particular subsequences.  I guess it's a bit more impressive when
you select the right modulus.  ;-)

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to