Skip to content

Comment on Xorshift

Comments

xorshift are my goto all round PRNG for anything non-serious or where n-dimensional uniformity is not super important. They are just so insanely small and simple to code for the quality of randomness you get. Here's my tiny yet hardly golfed JS example along with a unit interval conversion (float from 0-1), it's smaller than the wikipedia pseudo code!

https://www.dwitter.net/d/21668

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.