Anonymous user
Random Number Generator: Difference between revisions
m
fixed unencyclopedic tone
[unchecked revision] | [unchecked revision] |
No edit summary |
m (fixed unencyclopedic tone) |
||
Line 91:
=== Fibonacci random number ===
▲[[User:Mariuszp|My]] OS uses a special "remake" of the Fibonacci sequence to generate random numbers. This is done by having 4 "seeds", which start off as really weird values (e.g. 45, 80, 22, 32).
▲I implemented a seed() function which adds a new seed to the end of the sequence, and erases the first one (the seeds are referred to as A, B, C and D). The rand() function just returns the sum of the seeds, and calls seed() with the result.
=== Linear feedback shift register ===
|