计算机科学 > 数据结构与算法
[提交于 2020年4月14日 (v1),最后修订于 2022年3月13日 (此版本, v7)]
标题:Squares: A Fast Counter-Based RNG
查看原文 PDF 中文 PDF (下批处理) EasyResearch 阅读摘要:In this article, we propose a new counter-based implementation of John von Neumann's middle-square random number generator (RNG). Several rounds of squaring are applied to a counter to produce a random output. We discovered that four rounds are sufficient to provide satisfactory data. Two versions of the RNG are presented, a 4-round version with 32-bit output and a 5-round version with 64-bit output. Both pass stringent tests of randomness and may be the fastest counter-based generators.