On 02/27/2014 05:57 PM, ghaverla wrote:
>From what I read, Octave is supposed to make use of a Mersenne-Twister
for its core 0-1 RNG. And I am guessing you are drawing random numbers
from somewhere in your calculations. If somehow you are getting random
numbers from /dev/random instead of the Mersenne-Twister, you could be
depleting your system of entropy, and hence every random you generate
ends up being 0. /proc/sys/kernel/random/entropy_avail can help. My
description assumes Linux, I don't know how this might translate to
other hardware/OS.
But I have seen entirely too many project descriptions, such as a
playing card game, where they are drawing random numbers
from /dev/random (directly or indirectly).
That could be a possible explanation, and if so, a simple solution
would be to use /dev/urandom instead. /dev/urandom does not exhaust
the entropy because it just runs a PRNG off the /dev/random seed.
|