in reply to Re^4: Problem with a sort result
in thread Problem with a sort result
using big nums give me incorrect ordering using subtraction when one number is ten digits or more:perl -e "print join qq(\n),sort {$a - $b} @ARGV" 33 1 2 99 1 2 33 99 # same result using <=> or -
perl -e "print join qq(\n),sort {$a - $b} @ARGV" 10000000000 3 2 10000000000 2 3
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: Problem with a sort result: weird subtraction behaviour?
by kzwix (Sexton) on Jan 27, 2016 at 14:32 UTC | |
by choroba (Cardinal) on Jan 27, 2016 at 18:47 UTC |