You are in my Digital Garden.
Random Number Generators
Last modified: Feb 24th, 2024
-
PCG Family - supposedly the best
- PCG64 DXSM - the latest and greatest 64-bit flavour, used by Go and Numpy
-
xorshift - simple and very efficient
- Paper (PDF)
- 16-bit versions
-
http://www.retroprogramming.com/2017/07/xorshift-pseudorandom-numbers-in-z80.html
- “returns the next number in a 65,535-long sequence, which is never zero but every other 16-bit number appears once before the sequence repeats”
-
http://b2d-f9r.blogspot.com/2010/08/16-bit-xorshift-rng-now-with-more.html
- “returns the next number in a (2^32-1)-long sequence”
- Implemented for uxn in the main repo in the file
projects/examples/old/prng.tal
-
http://www.retroprogramming.com/2017/07/xorshift-pseudorandom-numbers-in-z80.html