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

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

[Octave-bug-tracker] [bug #53300] rand('state') at Octave start is not c


From: Mike Miller
Subject: [Octave-bug-tracker] [bug #53300] rand('state') at Octave start is not correct
Date: Wed, 7 Mar 2018 19:18:12 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:58.0) Gecko/20100101 Firefox/58.0

Follow-up Comment #1, bug #53300 (project octave):

And if a throwaway call to rand is made at the beginning, the state is
correct


>> format long
>> rand ();
>> init_state = rand ('state');
>> x = rand (4, 1)
x =

   1.651948679287887e-01
   8.401639052217452e-01
   3.216938522577400e-01
   9.753170943097341e-01

>> rand ('state', init_state);
>> y = rand (4, 1)
y =

   1.651948679287887e-01
   8.401639052217452e-01
   3.216938522577400e-01
   9.753170943097341e-01




    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?53300>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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