in reply to Re^3: Infinity and Inf? (MAX_INT)
in thread Infinity and Inf?
You are mistaken. We were talking about the maximum value that can be used in a range, and it's not even close to 2**50.
(By the way, the largest positive integer that can be stored without loss of precision in a double-precision float is 2**53.)
I was wrong too, though. I thought it was the largest native unsigned integer, but it's the largest native signed integer.
$ perl -e'1 for 2147483647..2147483647' $ perl -e'1 for 2147483647..2147483648' Range iterator outside integer range at -e line 1.
That limit be obtained using the following:
use constant MAX_RANGE => (~0)>>1;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Infinity and Inf? (MAX_INT)
by LanX (Saint) on Sep 01, 2010 at 16:36 UTC | |
by ikegami (Patriarch) on Sep 01, 2010 at 19:16 UTC |