[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #41742] The rand function occasionally returns
[Octave-bug-tracker] [bug #41742] The rand function occasionally returns unexpected results.
Mon, 17 Mar 2014 20:22:29 +0000
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:27.0) Gecko/20100101 Firefox/27.0
Follow-up Comment #1, bug #41742 (project octave):
This is fixed with patch #8389. As per jwe's recommendation, I'm re-attaching
it here once more. A bit of discussion is available in the mailing list
Specifically, can the fact that randu32() makes the underlying generator skip
values be a problem? I can't come up with good arguments either for or
against, but to me it seems better than "compressing" 0:2^32-1 to [0+small1,
1-small2]. By multiplying 2^-32 with integers, it's at least possible to state
(say, with a short mathematical expression) which numbers are sampled at all.
That doesn't seem so straightforward with the current code (or, rather "the
code that uses the same idea as the current one, but is correct").
Additional Item Attachment:
File name: randu32_no_exact_1.patch Size:1 KB
Reply to this item at:
Message sent via/by Savannah