Python3, JavaScript, Ruby, Java (and probably others) don’t always output 17 decimal digits: they output as few digits as possible while still ensuring that parsing back the output yields the original number. This sounds like the smart thing to do.
I just found out that Python2 makes a similar, but much worse, mistake: it rounds at 12 digits! It’s good to see that Python3 fixed this particular wart; too bad Perl6 kept the weird Perl5 behavior, here.
I should’ve made it clearer that I was looking for explanations to all these things, not just the last one. What’s your take on the second-to-last example, where $a < $b, and yet Num($a) > Num($b)? (update: you updated your post while I was typing, and now it partly addresses this, yay!)
In reply to Re^2: Perl6 discoveries — floating-point
by Grimy
in thread Perl6 discoveries — floating-point
by Grimy
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |