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

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

[Octave-bug-tracker] [bug #55421] Test for qr.cc randomly fails


From: Mike Miller
Subject: [Octave-bug-tracker] [bug #55421] Test for qr.cc randomly fails
Date: Tue, 8 Jan 2019 15:48:55 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36

Follow-up Comment #3, bug #55421 (project octave):

Since the tests use 'sprandn', I think you want to set both 'rand' and 'randn'
state initial values, isn't that right? At least that's what it takes for me
to get the same matrices out of successive calls to 'sprandn'. I think this is
because 'rand' is used to generate uniform random values for the indices to be
populated, while 'randn' is used for the contents.

And if you want something a little less intrusive you could use a %!shared
declaration to only save and restore the random states once for all of the
tests in the file. See rand.cc for example.


    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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