En Perl6, ça fonctionne :D
#!/usr/bin/env perl6 my @values = 76923076923, 1428.5714285714284, 1250000.0, 8333.333333333332, 125000000.0, 7142857.142857143; my @sorted_values = @values.sort; my ($sum, $sum_sorted) = (0, 0); for @values -> $num { $sum += $num; } for @sorted_values -> $num { $sum_sorted += $num; } say "sum " ~ $sum; say "sum sorted " ~ $sum_sorted; say "equality " ~ ($sum == $sum_sorted); say "difference " ~ ($sum_sorted - $sum);
La sortie :
sum 77056479542.0476190477604 sum sorted 77056479542.0476190477604 equality True difference 0
Nananèreeeeu ! :P
En Perl6, ça fonctionne :D
La sortie :
Nananèreeeeu ! :P