Date: 09/05/01
- Next message: Jeroen van Wolffelaar: "[PHP-DEV] Fw: Rand again"
- Previous message: Jeroen van Wolffelaar: "[PHP-DEV] Re: The rand() can of worms"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
News posts seem to be broken, this is a resent:
----- Original Message -----
From: <jeroen <email protected>>
Newsgroups: php.cvs
Sent: Thursday, September 06, 2001 12:03 AM
Subject: Re: [PHP-CVS] cvs: php4 /ext/standard rand_mt.c rand_sys.c
>
> "Andrei Zmievski" <andrei <email protected>> wrote in message
> news:20010905164801.G3305 <email protected>
> > On Wed, 05 Sep 2001, Jeroen van Wolffelaar wrote:
> > > Just look at the algorithm and you'll see at once it is bogus. Only in
> the
> > > special case that one single key is requested it is correct.
> > > Proving it's bogus is trivial, so I'll leave that as an exercise to
the
> > > reader (I'm serious).
>
> There are about 2**31 possibilities for randval. So already when picking
13
> elements out of an array, (which can be done in 13! ways), some
> possibilities are not even possible!
>
> Furthermore, it makes simply no sense, just look at the key point, every
> time r/R, where r and R decrease... that has a really high preference for
> 'neat' distributions.
>
> --Jeroen
>
>
>
> > A little less patronizing, please.
>
> I'm very sorry, but this again is an example of simply test things out
> without reasoning/thinking/proving. Which is IMO very bad.
> If you simply think about the algorithm, I'm sure you would have seen
> immediately what was wrong. I must say I didn't do any testing at all with
> that function, but that's not necessary!
>
>
-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe <email protected> For additional commands, e-mail: php-dev-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Jeroen van Wolffelaar: "[PHP-DEV] Fw: Rand again"
- Previous message: Jeroen van Wolffelaar: "[PHP-DEV] Re: The rand() can of worms"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

