pspp-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Normal RNG


From: Ben Pfaff
Subject: Re: Normal RNG
Date: Thu, 11 Nov 2004 08:56:33 -0800
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux)

Jason Stover <address@hidden> writes:

> The rng inside random.c uses a byte-swapping
> algorithm to get uniform random numbers. GSL's
> default random number generator is the Mersenne
> Twister, which looks more 'random'.

The Mersenne Twister is a fine RNG, but so is RC4.

I'll take a look tonight, but it's more likely a bug in the RNG
or normal-distribution implementation than a problem in the RNG
algorithm.  We use RC4 encryption to generate random numbers.
That's high-quality enough that it shouldn't be distinguishable
from true random numbers without reading out perhaps 2**32
(perhaps a lot more?) bytes.

However, now that we've switched over pretty thoroughly to GSL,
there's probably no reason to retain our internal RNG.  We will
definitely want to use GSL for generating the more "difficult"
distributions, so I see no reason not to use it for all our
random numbers.
-- 
"The sound of peacocks being shredded can't possibly be
 any worse than the sound of peacocks not being shredded."
Tanuki the Raccoon-dog in the Monastery




reply via email to

[Prev in Thread] Current Thread [Next in Thread]