HackerPapers

arXiv:1704.00358cs.CR

Middle-Square Weyl Sequence RNG

Bernard Widynski

Early discovery. Linked by one identifiable commenter. This paper is outside the main ranking; a mention is not an endorsement.

Abstract

In this article, we propose a new implementation of John von Neumann's middle-square random number generator (RNG). A Weyl sequence keeps the generator running through a long period.

arXiv comments
A software package with example programs is available at http://mswsrng.wixsite.com/rand
Journal reference
DOI
Subjects
cs.CRCryptography and Security

On Hacker News

Linked by 1 identifiable commenter in 4 comments across 4 threads, from Feb 2023 to Oct 2025. Found in 1 HN submission from Oct 2025 to Oct 2025. Open submission discussions.

Comments linking this paper, per year.

Discussed in comments4 threads

    • A history about random number generation isn't complete without mentioning George Marsaglias work. He is responsible for multiply-with-carry, xorshift (the original version), KISS (a high quality generator predating the mersene twister) , the Ziggurat algorithm, diehard Fun…

      camel-cdrView on HNParent context

    • I like how the earliest and easiest PRNGs are making a comeback: First middle square method, just add a weyl sequence to it, and all statistical tests stop failing [0] uint64_t x, weyl; uint32_t msws(void) { x = x * x + (weyl += 0xB5AD4ECEDA1CE2A9); return x = (x >> 32) | (x <<…

      camel-cdrView on HNParent context

  1. A Primer on Randomness 1 comment
    • I like how the earliest and easiest PRNGs are making a comeback: First middle square method, just add a weyl sequence to it, and all statistical tests stop failing [0] uint64_t x, weyl; uint32_t msws(void) { x = x * x + (weyl += 0xB5AD4ECEDA1CE2A9); return x = (x >> 32) | (x <<…

      camel-cdrView on HNParent context

    • A history of PRNGs without mentioning George Marsaglia is heresy. Also, PCG didn't stop the development. Nowadays, modern PRNGs explore the usage of chaotic PRNGs (without a fixed period), which are often faster than non-chaotic ones. Notable examples are the Romu family [0] of…

      camel-cdrView on HNParent context

Submitted to Hacker News

Connected through shared HN threads, not inferred similarity or a recommendation.