6 ms·
Drepper was correct to close the bug, but for the wrong reason. The correct reason to close the bug is that the original version (the one that produces the non-
by tzs 16y ago
Drepper was correct to close the bug, but for the wrong reason. The correct reason to close the bug is that the original version (the one that produces the non-uniform distribution of permutations) is how the function is documented as working. From the strfry man page:
strfry creates a pseudorandom anagram of a string, replacing
the input with the anagram in place. For each position in the
string, strfry swaps it with a position in the string selected
at random (from a uniform distribution).
This only produces a uniform distribution of permutations if n^n/n! is an integer, where n is the length of the string. This is only true for n = 1 and n = 2.
(At least that is what the current man page says...I don't know if it said that in 2007 when the bug was filed).