Formula for Random

6k Views Asked by At

Since computers work off formulas, without greater knowledge one would assume that it would come up with the same answer for a set formula. However, you're able to tell it to generate a random number. IE: php rand(). What's the formula that's used to get a random number? How can there be anything "random" in an algebraic expression?

Been wondering for a while, hopefully it's not blatantly obvious.

2

There are 2 best solutions below

3
On BEST ANSWER

There is a discussion in Wikipedia and many books on the subject. The numbers are deterministic but scattered. You hope that in the ways you use them, they "act like" they are truly random.

0
On

There are also hardware circuits that can produce random numbers.