![]() |
|
Perl Monk, Perl Meditation | |
PerlMonks |
Re^3: Largest integer in 64-bit perlby LanX (Saint) |
on May 18, 2025 at 11:56 UTC ( [id://11165054]=note: print w/replies, xml ) | Need Help?? |
I would try to test the OP's problem that predecessor or successor are identical in numerical comparison.
this will break at 2**64 when I stay purely integer NB: I didn't implement the full binary search, since there is no backtracking yet But I'm getting weird conversion results when leaving the realm of integer (see the "modes"), these are most likely side-effects of starting with a float (or bugs). Probably better to use Hex-strings.
YMMV...
Cheers Rolf
UpdateIn hindsight, the cleanest approach would be to only rely on addition and substraction of integers. No multiplications or exponentions (which might be implemented as approximation) Since the last safe interval is guaranteed to be an integer too.
In Section
Seekers of Perl Wisdom
|
|