in reply to Largest integer in 64-bit perl
The max value for 64 bit representation will be about 2**63-1, because you need one bit for the sign in signed integers.
This has already been discussed many times.
NB: all values probably off by one, (UPDATED -1 because one slot will be occupied by zero.)
I'm not going to look up the correct values for you, if you're too lazy¹ to supersearch or Google, so am I.
FWIW: Your linear search is not terribly clever, use a binary search and you'll have finished before pronouncing the s in stupid.
Cheers Rolf
(addicted to the Perl Programming Language :)
see Wikisyntax for the Monastery
¹) quote: > "stored in IEEE-754 format internally. Whatever that means."
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Largest integer in 64-bit perl
by ikegami (Patriarch) on May 18, 2025 at 04:07 UTC | |
by LanX (Saint) on May 18, 2025 at 11:56 UTC | |
by syphilis (Archbishop) on May 19, 2025 at 04:09 UTC | |
by LanX (Saint) on May 19, 2025 at 10:01 UTC |