Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
comp.lang.ruby
Re: Uniform Random Number Generator
Rick DeNatale
5/22/2007 7:54:00 PM
On 5/22/07, Roland Mai <roland.mai@gmail.com> wrote:
> I need a random number generator that generates random numbers with a
> uniform distribution.
>
> I am not sure what rand does in ruby and I can't seem to find it online
> either. My initial assumption is that it follows a uniform distribution, but
> I can't tell.
>
> Any ideas?
>
According to the source code for random.c, Ruby's implementation of
rand uses the Mersenne Twister MT19937 which according to:
http://en.wikipedia.org/wiki/Mersen...
has "a very high order
of dimensional equidistribution."
HTH
--
Rick DeNatale
My blog on Ruby
http://talklikeaduck.denh...
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
Re: Uniform Random Number Generator
Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te
Il servizio è completamente GRATUITO!
x
Login to ForumsZone
Login with Google
Login with E-Mail & Password