Permutations/Rank of a permutation: Difference between revisions

Content added Content deleted
m (→‎{{header|Quackery}}: addled commentary)
Line 1,823: Line 1,823:
=={{header|Quackery}}==
=={{header|Quackery}}==


Stretch goal: The words defined here would handle the limitations of the Stack Exchange question with ease, as Quackery numbers are BigInts. The only inconvenience would be generating random numbers in the range 0 to 144! - 1, as the built-in PRNG is limited to 64 bits.
Stretch goal: The words defined here would handle the limitations of the Stack Exchange question with ease, as Quackery numbers are BigInts. The only inconvenience would be generating random numbers in the range 0 to 144! - 1(*), as the built-in PRNG is limited to 64 bits.

(*) This would generate an arbitrary permutation of the numbers 0 to 143, <code>144 identity shuffle</code>. You ''could'' use that permutation to generate a number in the range 0 to 144! - 1 with <code>perm->rank</code> but it has a whiff of circular reasoning. <shrug>


<syntaxhighlight lang="Quackery">
<syntaxhighlight lang="Quackery">