so, the highest that returned a result greater than 0 was with only 11 items in the list where the script returned 0.000003%
or roughly 1 chance in 33,333,340
if I am right the number of permutations is something like
//echo -s $calc(11 * 10 * 9 * 8 * 7 * 6 * 5 * 4 * 3 * 2 * 1) = 39916800
roughly 1 in 40,000,000
so if I have say a list of 571 songs, while the odds are mathematically low, it Could play them in order, randomly....... and with caos, it might only take one attempt?
some math
odds {
var %number = $$1
var %reps = %number - 1
var %i = 1
var %math = %number
while (%reps) {
var %math = %math $!chr(42) $calc(%number - %i)
inc %i
dec %reps
}
echo -s $+($,calc) $+ ( $(%math,2) ) = $calc($(%math,2))
}
(largest number I could get a result on was 79)