Page 1 of 1

Random Number Generator?

PostPosted: Sun Aug 07, 2005 1:01 pm
by Slater
I find random number generation useful often... only problem is that I hate having to use my TI-83 to generate them. So my question... are there any good RNG programs out there?

PostPosted: Sun Aug 07, 2005 1:32 pm
by Syaoran
Yes your head....I am not kidding...you can randomly pick nummbers faster then any progam out here.

PostPosted: Sun Aug 07, 2005 1:40 pm
by Slater
yeah, but I prefer an external source

PostPosted: Sun Aug 07, 2005 3:29 pm
by Technomancer
It depends on what you're doing, and what you plan to be working with, and what kind of probability distribution you need. The C-function rand for example works fine, but only gives you a uniform distribution. GNU Scientific Library (more C) also has a number of different random number generators, which seem to work well enough and also covers a number of different distributions (e.g. Gaussian, Cauchy, etc, etc). I believe the book 'Numerical Recipes in C' also covers some of the programming aspects.

The basic RNG's in MATLAB only cover uniform, Gaussian and Poisson distributions, but again you should be able to program other pdfs with a little bit of work. MATLAB is easy to use, but personally I'm not very satisfied with their RNG, since it outputs the same results in sequence each time you load the program.

Another alternative is to simply look in books of scientific/engineering tables, which frequently have tables of random numbers generated according to some distributions. While they can be convenient at times, these books are also fairly hard to find these days owing to the appearance of digital computers.

PostPosted: Sun Aug 07, 2005 3:45 pm
by shooraijin
And then there's PGP (and gpg)'s RNG, which seeds itself off entropy from you banging keys at random (both the keys and the interval between keypresses at high resolution).

PostPosted: Sun Aug 07, 2005 3:54 pm
by Slater
thanx guys, I'll try to find those and test them out. The PGP one sounds very kewl...

PostPosted: Sun Aug 07, 2005 3:56 pm
by shooraijin
It's in the source for the key generator. Pretty easy to understand.

PostPosted: Sun Aug 07, 2005 4:06 pm
by Syaoran
Do you know about this little chart.

(1)

(1)(1)

(1)(2)(1)

(1)(3)(3)(1)

(1)(4)(6)(4)(1)

(1)(5)(10)(10)(5)(1)

and so on

It helps for when you use CnR

Why use a machiane when you can use your head.
But you don't have to lessin to me.....I am just puting my 2 cents in.

PostPosted: Sun Aug 07, 2005 6:30 pm
by Slater
that chart's called a pascal triangle... hmm... come to think of it, I was wondering if there's a PT generator out there either... helpful with math.

PostPosted: Sun Aug 07, 2005 6:37 pm
by Shadowchild
ha ha I have a TI84 lol. dude you are so last year.

PostPosted: Sun Aug 07, 2005 9:57 pm
by Technomancer
Syaoran wrote:Why use a machiane when you can use your head.
But you don't have to lessin to me.....I am just puting my 2 cents in.


Well, if you can pull numbers from a Cauchy or Laplacian distribution out of your head... Realistically though, most numbers that you pull from your head aren't really that random, and tend to follow a distribution that may be less than useful. If you need lots of numbers or numbers pulled from a particular kind of probability distribution you really don't have much of choice but to use some kind of RNG.

PostPosted: Sun Aug 07, 2005 11:36 pm
by Slater
I'm currently using SuperCool RNG. It's... well, super cool. You can let it chose a random seed which it uses to chose random numbers within a specified range, or you can chose the seed yourself. Also has a random name generator, so I don't have to bust my head thinking of new names for minor characters when I roleplay :D

PostPosted: Mon Aug 08, 2005 5:08 am
by Technomancer
Out of curiosity, what are you using it for? My own line of work (signal processing) depends pretty heavily on having a good RNG for testing and simulation purposes.