Pseudo-random numbers/Middle-square method: Difference between revisions

→‎BQN: add alternative
(→‎BQN: add)
(→‎BQN: add alternative)
Line 606:
=={{header|BQN}}==
<syntaxhighlight lang="bqn">1e6 |⟜(⌊∘÷⟜1e3 ט)⍟(1+↕5) 675248</syntaxhighlight>
Or:
<syntaxhighlight lang="bqn">675248 (1e6 | ט⊸(⌊÷))` 5 ⥊ 1e3</syntaxhighlight>
{{out}}
<pre>⟨ 959861 333139 981593 524817 432883 ⟩</pre>
559

edits