[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #53668] Matlab rand "state" vector is 35x1 ver
From: |
Rik |
Subject: |
[Octave-bug-tracker] [bug #53668] Matlab rand "state" vector is 35x1 versus Octave's 625x1 |
Date: |
Mon, 16 Apr 2018 11:23:08 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:55.0) Gecko/20100101 Firefox/55.0 |
Update of bug #53668 (project octave):
Category: None => Octave Function
Item Group: Incorrect Result => Matlab Compatibility
Status: None => Wont Fix
Open/Closed: Open => Closed
Summary: Wrong result of command => Matlab rand "state"
vector is 35x1 versus Octave's 625x1
_______________________________________________________
Follow-up Comment #1:
It's not wrong, it is just different.
The actual details of the internal state are not important, as long as a
programmer can save and restore the state of the random number generators in
order to get a consistent random number stream then the function is working
well enough.
Consider the example of adding 3 + 5. If you were doing this manually you
would keep the numbers in base10, write them down on a piece of paper, and
compute the result of 8, also in base10.
A computer, however, would first convert the number 3 to base2 "11" and the
number 5 to base2 "101". It would then add to get "1000" and finally convert
back to base10 result of 8. The fact that the computer has a completely
different representation of the numbers than you or I is unimportant. It is
only important that addition actually works correctly, as it indeed does.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?53668>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/