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: Rik
Subject: [Octave-bug-tracker] [bug #58800] BIST for rng sometimes fails
Date: Thu, 23 Jul 2020 18:45:31 -0400 (EDT)
User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko

Update of bug #58800 (project octave):

                  Status:                    None => Confirmed              

    _______________________________________________________

Follow-up Comment #14:

Long term, it would be good to use industry standard, cross platform libraries
for random numbers.  The Octave Projects page
(https://wiki.octave.org/Projects) has this one under the Numerical topic:


Use C++11 <random> libraries for random number generation. Write link between
Octave functions (rand, randi, randn, rande) and C++ API. Implement RandStream
objects as Matlab does.


However, this isn't going to happen in the short term due to the size of the
change and a lack of coders.

I ran the following test on Matlab


N = 100;

r = zeros (N,1);
for i = 1:N
  rng ("shuffle"), s1 = rng ();
  rng ("shuffle"), s2 = rng ();
  r(i) = ~ isequal (s1, s2);
end


All random number states were different so, either Matlab is using a higher
quality time source or they have implemented a different method to ensure that
every call to "rng ('shuffle')" results in a different state.  Octave should
have equivalent behavior.  



    _______________________________________________________

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]