comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: How good is Randomu?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: How good is Randomu? [message #57931] Mon, 07 January 2008 02:32 Go to previous message
wita is currently offline  wita
Messages: 43
Registered: January 2005
Member
On Jan 4, 5:17 pm, john.cop...@nist.gov wrote:
> Many thanks to those of you who responded to my posting entitled "
> Bizarre (?) behavior of randomu". Your comments have been very useful.
>
> I now have a different question. How good is Randomu? I am developing
> some code to calculate multiple neutron scattering intensities and
> typically in any given run I would expect to invoke randomu (or some
> other IDL procedure that generates uniformly distributed pseudo-random
> numbers between 0 and 1) several hundred to several thousand times,
> each time obtaining of order 1 million numbers, in other words
> generating 10^9 or more random numbers in any given run. Is randomu up
> to the task, or do I need something better?
>
> If I need something better what should I use? I have come across
> exotica such as the "MT19937 generator of Makoto Matsumoto and Takuji
> Nishimura [which] is a variant of the twisted generalized feedback
> shift-register algorithm" and "has a Mersenne prime period of 2^19937
> - 1 (about 10^6000) and is equi-distributed in 623 dimensions" but
> that sounds like overkill. On the other hand the so-called Wichmann-
> Hill algorithm looks interesting and it is supposedly very easy to
> code.
>
> Thoughts, anyone?
> Many thanks
> John

Dear John,

I am also not a statistician and have no experience with periodicity
for that large amount of random numbers. What may be of interest to
you is that a fairly sophisticated random number generators was built
in Numeric Python (www.numpy.org), I quote from the manual: "The
fundamental random number generator is the Mersenne Twister based on
code written by Makoto Matsumoto and Takuji Nishimura (and modified
for Python by Raymond Hettinger)". Since NumPy is open source and
written in C or Fortran, you might be able to take that code and
modify it to suit your needs. That has the advantage that the code has
already been fairly well tested by the python community.

with best regards,

Allard
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: FILE_SEARCH bug ?
Next Topic: Re: How to clean the memory?

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 10:16:32 PDT 2025

Total time taken to generate the page: 0.88059 seconds