octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #58800] BIST for rng sometimes fails


From: Hg200
Subject: [Octave-bug-tracker] [bug #58800] BIST for rng sometimes fails
Date: Wed, 22 Jul 2020 11:51:49 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0

Follow-up Comment #2, bug #58800 (project octave):

The documentation is a bit vague about 'rng ("shuffle")' and 'rand ("state",
"reset")': 'By default, the generator is initialized from /dev/urandom if it
is available, otherwise from CPU time, wall clock time, and the current
fraction of a second.'

In deed on my linux system 'rng ("shuffle")' forces a read from urandom in
'randmtzig.cc':

++
void init_mersenne_twister (void)
    FILE *urandom = std::fopen ("/dev/urandom", "rb");
    if (urandom)
--

I don't know what is happening on Win. Probably there is no urandom and then
entropy is gathered from the clock. But i can't influence this. This is hard -
C code. Only idea i have is to add a 'pause()' into the BIST.


    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?58800>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]