Random Number Generator: Uniform Distribution

Open discussion regarding features, bugs, issues, vendors, etc.

Random Number Generator: Uniform Distribution

Postby DavidB » Fri May 19, 2006 1:07 pm

Hello.

I am seeking a random number generator (real numbers).
The distribution should be uniform over whatever interval I might specify (for example, over the interval 3 - 9, 100 - 200, etc.).

I did a search on the NETLIB site for random numbers and about 200 results showed up, with many of them having identical descriptions, so I'm not sure which one I am best off using.

Recommendations are welcome.
DavidB
 
Posts: 38
Joined: Thu Dec 15, 2005 1:49 pm
Location: Vancouver, B.C. Canada

Postby Julien Langou » Mon May 22, 2006 1:57 pm

LAPACK provides some random number generators.
In praticular, you can use:
SLARNV / CLARNV / DLARNV / ZLARNV
to get vectors with elements with uniform or normal distribution.
See for example:
http://www.netlib.org/lapack/double/dlarnv.f
Julien
Julien Langou
 
Posts: 834
Joined: Thu Dec 09, 2004 12:32 pm
Location: Denver, CO, USA

Postby DavidB » Wed May 24, 2006 12:54 pm

Thanks, Julien.

I took a look at DLARNV and did not see mention of a period. Would you know the periods of these functions (i.e. - how many numbers can they generate before they start repeating)? I have come across a Mersenne Twister Pseudo-random Number Generator (http://www.bedaux.net/mtrand/), which claims to have a period of a period of 2^19937 - 1, and the Boost Random Number Library (http://boost.org/libs/random/index.html), and I am trying to get an idea how they compare.

Thanks.


David
DavidB
 
Posts: 38
Joined: Thu Dec 15, 2005 1:49 pm
Location: Vancouver, B.C. Canada

Postby Julien Langou » Wed May 24, 2006 5:55 pm

Sorry, I have no idea. I'd say at most 2^48 since we are using modulus 2^48 (see DLARUV) but I am not even sure about that. If you get the answer, let me know.
Julien.
Julien Langou
 
Posts: 834
Joined: Thu Dec 09, 2004 12:32 pm
Location: Denver, CO, USA


Return to User Discussion

Who is online

Users browsing this forum: No registered users and 7 guests