Just futzing around and I tried this:
$ perl -le'print ~0' 18446744073709551615 $ perl -Mbigint -le'print +( 2 ** 64 ) - 1' 18446744073709551615 $ perl -le'print +( 2 ** 64 ) - 1' 1.84467440737096e+19
And also:
$ perl -le'print 2 ** 49' 562949953421312 $ perl -le'print 2 ** 50' 1.12589990684262e+15
So why does perl convert a number that will obviously fit inside a 64 bit integer to floating point?
(Yes I read perlnumber.)
In reply to Non-integer print output??? by jwkrahn
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |