Random Numbers Generation in large scale.

Hey guys,

I am looking for a method (or a library) to create "special" random numbers generation.

1) I need it to be larger the scale of normal rand() function. (RAND_MAX is only 2^15, I need something like 0-4G)

2) I am looking for an easy way to get it also in Gaussian distribution (rand() gives random numbers in unifomal distribution).

3)I am also looking for other types of distributions.

Thanks!
1.
lineair regression is very easy to implement. Marsenne Twister is a better one, but it's harder to implement. However there are other people having created a Marsenne Twister implmentation.

linear regression
r[n+1] = (r[n] * a + b) % M

Check wikipedia for suitable values for a, b and M.
Also check out this web page for an RNG that has a much larger period than a linear congruential RNG.

http://burtleburtle.net/bob/rand/isaacafa.html

Topic archived. No new replies allowed.