Good news for PPC Random-Number Generator
|
05-17-2021, 11:35 PM
Post: #7
|
|||
|
|||
RE: Good news for PPC Random-Number Generator
(05-17-2021 11:03 PM)Craig Bladow Wrote: Matlab uses double precision floating point by default, does the algorithm still pass if limited to single precision or HP-41 precision? Algorithm is really LCG, disguised as floating points. Example, we can rewrite it this way (initial seed in units of millionth) Code: function make_rnd(seed) lua> rnd = make_rnd(123456) -- seed 0.123456 lua> rnd(), rnd(), rnd(), rnd(), rnd() 0.672703 0.82749 0.990617 0.060884 0.153091 Seed calculations are integer based, without rounding errors. |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)