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

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

[Octave-bug-tracker] [bug #54342] rand() produces different results on o


From: Dan Sebald
Subject: [Octave-bug-tracker] [bug #54342] rand() produces different results on octave 4.4.0 compared to earlier versions
Date: Sun, 22 Jul 2018 18:52:51 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:55.0) Gecko/20100101 Firefox/55.0

Follow-up Comment #19, bug #54342 (project octave):

Yes, muddled.  That's why I wouldn't be worried about compatibility with its
v5 syntax.

The complicated part--and I'm not saying that this is a issue here, for the
reason I just stated--is that I thought I had read that Matlab's recent
behavior is to have just one r.n.g. for all such functions.  Conflating
compatibility across the board will mean


octave:6> rand("state",0)
octave:7> randn("state",0)
octave:8> x1 = rand()
x1 =  0.84442
octave:9> x2 = rand()
x2 =  0.75795
octave:10> rand("state",0)
octave:11> x1 = rand()
x1 =  0.84442
octave:12> y1 = randn()
y1 = -1.2248
octave:13> x2 = rand()
x2 =  0.75795


isn't consistent; the calling of y1=randn() should alter the next outcome of
x2=rand().

    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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