[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Calculation issue with octave (data unexpectedly go to zero at some
From: |
ghaverla |
Subject: |
Re: Calculation issue with octave (data unexpectedly go to zero at some point) |
Date: |
Fri, 28 Feb 2014 12:15:56 -0700 |
On Fri, 28 Feb 2014 13:46:57 -0500
Przemek Klosowski <address@hidden> wrote:
> 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.
I think what Octave does by default, is what Perl can do optionally,
and that is replace the rand() in libc, with a Mersenne-Twister.
I would disagree with using /dev/urandom. Switching to a long period
RNG is a better solution.
But, the OP now knows how to query the system for how much entropy it
has stored up.
Gord
- Re: Calculation issue with octave (data unexpectedly go to zero at some point), (continued)
- Re: Calculation issue with octave (data unexpectedly go to zero at some point), Michael Goffioul, 2014/02/23
- Re: Calculation issue with octave (data unexpectedly go to zero at some point), rchretien, 2014/02/27
- Re: Calculation issue with octave (data unexpectedly go to zero at some point), Juan Pablo Carbajal, 2014/02/27
- Re: Calculation issue with octave (data unexpectedly go to zero at some point), Michael Goffioul, 2014/02/27
- Re: Calculation issue with octave (data unexpectedly go to zero at some point), Ozzy Lash, 2014/02/27
- Re: Calculation issue with octave (data unexpectedly go to zero at some point), rchretien, 2014/02/27
- Re: Calculation issue with octave (data unexpectedly go to zero at some point), ghaverla, 2014/02/27
- Re: Calculation issue with octave (data unexpectedly go to zero at some point), rchretien, 2014/02/28
- Re: Calculation issue with octave (data unexpectedly go to zero at some point), Juan Pablo Carbajal, 2014/02/28
- Re: Calculation issue with octave (data unexpectedly go to zero at some point), Przemek Klosowski, 2014/02/28
- Re: Calculation issue with octave (data unexpectedly go to zero at some point),
ghaverla <=
- Re: Calculation issue with octave (data unexpectedly go to zero at some point), Juan Pablo Carbajal, 2014/02/27
- Re: Calculation issue with octave (data unexpectedly go to zero at some point), Ozzy Lash, 2014/02/27
- Re: Calculation issue with octave (data unexpectedly go to zero at some point), Ozzy Lash, 2014/02/27
- Re: Calculation issue with octave (data unexpectedly go to zero at some point), Dmitri A. Sergatskov, 2014/02/27
- Re: Calculation issue with octave (data unexpectedly go to zero at some point), Brian Kaczynski, 2014/02/27
- Re: Calculation issue with octave (data unexpectedly go to zero at some point), Dmitri A. Sergatskov, 2014/02/27
- Re: Calculation issue with octave (data unexpectedly go to zero at some point), Ben Abbott, 2014/02/27
- Re: Calculation issue with octave (data unexpectedly go to zero at some point), Dmitri A. Sergatskov, 2014/02/27
- Re: Calculation issue with octave (data unexpectedly go to zero at some point), Ben Abbott, 2014/02/27
- Re: Calculation issue with octave (data unexpectedly go to zero at some point), Dmitri A. Sergatskov, 2014/02/27