3 ms·
A simple PRNG I used on programmable calculators back in the 1970's. Four steps: 1. Recall seed from register (a number between 0.0 and 1.0) 2. Take reciproc
by DannyB2 9y ago
A simple PRNG I used on programmable calculators back in the 1970's. Four steps:
1. Recall seed from register (a number between 0.0 and 1.0)
2. Take reciprocal
3. Chop off the part to left of decimal point (eg, "frac" key)
4. Store back in register as next seed
At this point you have a number between 0.0 and 1.0 in the calculator. (eg, in the X register if RPN)
Every step counted, that was the simplest PRNG I could devise back in the day.
The initial seed in the register was created by hitting the decimal point key and a string of digits filling the calculator display.