<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Middle-Square Weyl Sequence RNG · HackerPapers discussions</title><link>https://hackerpaper.kaipfister.de/p/1704.00358/</link><description>Collected HN comments and submissions linking this paper.</description><language>en</language><lastBuildDate>Mon, 02 Nov 2026 11:16:22 GMT</lastBuildDate><atom:link href="https://hackerpaper.kaipfister.de/p/1704.00358/feed.xml" rel="self" type="application/rss+xml" /><item><title>Middle-Square Weyl Sequence RNG — HN submission</title><link>https://news.ycombinator.com/item?id=45746081</link><guid isPermaLink="false">urn:hackerpapers:submission:1704.00358:45746081</guid><pubDate>Wed, 29 Oct 2025 12:42:04 GMT</pubDate><description>&lt;p&gt;Middle-square Weyl sequence PRNG&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;2 points; 0 discussion replies on HN. &lt;a href="https://hackerpaper.kaipfister.de/p/1704.00358/"&gt;Paper and source history&lt;/a&gt;. A submission is not an endorsement.&lt;/p&gt;</description><category>cs.CR</category></item><item><title>Middle-Square Weyl Sequence RNG — mentioned by camel-cdr</title><link>https://news.ycombinator.com/item?id=45734654</link><guid isPermaLink="false">urn:hackerpapers:mention:1704.00358:45734654</guid><pubDate>Tue, 28 Oct 2025 16:03:55 GMT</pubDate><description>&lt;p&gt;A history about random number generation isn&amp;#x27;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 fact, one of the earliest methods for generating random mumbers, the middle square method, actually still passes all moderm statistical randomness test suites, if you hook up a weyl sequence to it: https://arxiv.org/abs/1704.00358 This, the middle square weyl sequence PRNG is my favoeite PRNG, because it&amp;#x27;s simple enough to…&lt;/p&gt;&lt;p&gt;&lt;a href="https://hackerpaper.kaipfister.de/p/1704.00358/"&gt;Paper and discussion history&lt;/a&gt;. A mention is not an endorsement.&lt;/p&gt;</description><category>cs.CR</category></item><item><title>Middle-Square Weyl Sequence RNG — mentioned by camel-cdr</title><link>https://news.ycombinator.com/item?id=39738872</link><guid isPermaLink="false">urn:hackerpapers:mention:1704.00358:39738872</guid><pubDate>Sun, 17 Mar 2024 23:05:39 GMT</pubDate><description>&lt;p&gt;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 &amp;gt;&amp;gt; 32) | (x &amp;lt;&amp;lt; 32); } And now Collatz, just add a weyl sequence to it, and all statistical tests stop failing [1] __uint128_t x; uint64_t a, weyl; __uint128_t CWG128_64(void) { x = (x | 1) * ((a += x) &amp;gt;&amp;gt; 1) ^ (weyl += 0xB5AD4ECEDA1CE2A9); return a &amp;gt;&amp;gt; 48 ^ x; } The fun part is that the constant used in the weyl sequence is pretty much…&lt;/p&gt;&lt;p&gt;&lt;a href="https://hackerpaper.kaipfister.de/p/1704.00358/"&gt;Paper and discussion history&lt;/a&gt;. A mention is not an endorsement.&lt;/p&gt;</description><category>cs.CR</category></item><item><title>Middle-Square Weyl Sequence RNG — mentioned by camel-cdr</title><link>https://news.ycombinator.com/item?id=39640466</link><guid isPermaLink="false">urn:hackerpapers:mention:1704.00358:39640466</guid><pubDate>Fri, 08 Mar 2024 12:32:47 GMT</pubDate><description>&lt;p&gt;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 &amp;gt;&amp;gt; 32) | (x &amp;lt;&amp;lt; 32); } And now Collatz, just add a weyl sequence to it, and all statistical tests stop failing [1] __uint128_t x; uint64_t a, weyl; __uint128_t CWG128_64(void) { x = (x | 1) * ((a += x) &amp;gt;&amp;gt; 1) ^ (weyl += 0xB5AD4ECEDA1CE2A9); return a &amp;gt;&amp;gt; 48 ^ x; } The fun part is that the constant used in the weyl sequence is pretty much…&lt;/p&gt;&lt;p&gt;&lt;a href="https://hackerpaper.kaipfister.de/p/1704.00358/"&gt;Paper and discussion history&lt;/a&gt;. A mention is not an endorsement.&lt;/p&gt;</description><category>cs.CR</category></item><item><title>Middle-Square Weyl Sequence RNG — mentioned by camel-cdr</title><link>https://news.ycombinator.com/item?id=34833318</link><guid isPermaLink="false">urn:hackerpapers:mention:1704.00358:34833318</guid><pubDate>Fri, 17 Feb 2023 11:14:42 GMT</pubDate><description>&lt;p&gt;A history of PRNGs without mentioning George Marsaglia is heresy. Also, PCG didn&amp;#x27;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 PRNGs and sfc [1], and tylov&amp;#x27;s sfc derivative [2]. Another thing that would be nice to mention is that we went full circle, the good old middle square method already used by von Neumann, has been found to work very well if you scale it up and add a weyl sequence. [3] Edit: And how could I forget, there has also been a…&lt;/p&gt;&lt;p&gt;&lt;a href="https://hackerpaper.kaipfister.de/p/1704.00358/"&gt;Paper and discussion history&lt;/a&gt;. A mention is not an endorsement.&lt;/p&gt;</description><category>cs.CR</category></item></channel></rss>
