Random numbers

Jim Richardson warlock at eskimo.com
Tue May 23 01:59:36 EDT 2000


On Mon, 22 May 2000 22:20:57 -0400, 
 Tim Peters, in the persona of <tim_one at email.msn.com>,
 brought forth the following words...:

>[Russell Wallace]
>> Is there any difference between the random number generator in the
>> 'random' module and that in the 'whrandom' one?
>
>No, but you shouldn't use whrandom:  whrandom is an interal implementation
>detail of random.py.  whrandom.py should probably be renamed to _whrandom.py
>(or something) to stop people from tripping over it.
>
>> What's the quality
>
>If you know enough about random numbers to understand an answer to that
>question, then telling you it's the standard Wichman-Hill (that's where "wh"
>comes from) generator is all the answer you need <wink>.  Seriously, test it
>and determine whether it's adequate for your application; if you can't test
>it objectively, then you have no way of knowing whether any other package is
>adequate either (and neither does anyone else, so don't ask).
>
>Ivan Frohne wrote a very nice package of stronger generators, which should
>be available from his Starship page.  But unless you're doing extreme work,
>WH should be adequate for a start.  Any serious program relying on random
>numbers should be tested with at least two distinct generators, though, and
>Ivan's pkg is great for that.
>
>nothing-random-about-generating-random-numbers-ly y'rs  - tim
>
>
>

As an aside, for those using linux, then /dev/random and /dev/urandom
are good reseources for (very nearly) random numbers.

-- 
Jim Richardson
	Anarchist, pagan and proud of it
WWW.eskimo.com/~warlock
	Linux, because life's too short for a buggy OS.




More information about the Python-list mailing list