4 ms·
Show HN: Simple PRNG from Btoa() and Xor
- ksaj 8y agoIs non-compressability a proper test for prng algorithms? One method I know of is to seed 0x00h (binary all zero) or 0x00h - 1 (binary all 1 bits), and then mapcar every sequential set of 3 pseudo random numbers to a function that plots them onto a 3D graph as XYZ coordinates. Then count how many of those triplets have to be generated before it produces a solid 3d cube with no holes. This often produces really interesting visual patterns for prngs that fail, and also directly tells you how efficient the algorithm is (or isn't, as the case may be).