1
0
How does a computer generate 'random' numbers?
How close to truly 'random' can a number generated by a computer actually be?
Is there software / programming language out that that might generate a more 'truly random' number than others?
1
0
How does a computer generate 'random' numbers?
How close to truly 'random' can a number generated by a computer actually be?
Is there software / programming language out that that might generate a more 'truly random' number than others?
4
Many common implementations of random number generators, are not truly random. Computers typically utilize Pseudorandom Number Generators, which means the computer uses a defined algorithm to generate a sequence of numbers that appear to be random.
In Python you can use the random
module to generate pseudorandom numbers. However, if you look at the docs, they include this note:
Warning The pseudo-random generators of this module should not be used for security purposes. Use os.urandom() or SystemRandom if you require a cryptographically secure pseudo-random number generator.
4@duDE, only half of the question is off-topic. I think the other half is completely on-topic and an interesting question. – heavyd – 2014-10-07T15:14:17.760
1
Related SU question: How are pseudorandom and truly random numbers different and why does it matter?
– Ƭᴇcʜιᴇ007 – 2014-10-07T16:16:13.220
http://stackoverflow.com/questions/3996904/generate-random-integers-between-0-and-9 – duDE – 2014-10-07T15:06:57.277
This question seems borderline off-topic. The second part for sure, is far better suited for StackOverflow than SuperUser. – Ajedi32 – 2014-10-07T15:43:56.013
1
As was commented below, this question How are pseudorandom and truly random numbers different and why does it matter? answers the randomness question very completely.
– heavyd – 2014-10-07T16:21:33.680