Pseudo-random numbers/Middle-square method: Difference between revisions
Content added Content deleted
m (→{{header|Quackery}}: Added some more commentary) |
m (→{{header|Quackery}}: typo) |
||
Line 724: | Line 724: | ||
(Adding one zero at a time irks me. If I wasn't sticking strictly to the pseudo-code I'd have written <code>12 over size - char 0 swap of join</code> instead of the <code>while</code> loop – i.e. calculate how many 0s are required and add that many in one hit. |
(Adding one zero at a time irks me. If I wasn't sticking strictly to the pseudo-code I'd have written <code>12 over size - char 0 swap of join</code> instead of the <code>while</code> loop – i.e. calculate how many 0s are required and add that many in one hit. |
||
Or even " |
Or even "add more than enough 0s and then truncate". <code>$ "000000000000" join 12 split drop</code>.) |
||
<syntaxhighlight lang="Quackery"> [ dip [ split nip ] |
<syntaxhighlight lang="Quackery"> [ dip [ split nip ] |