in reply to Re^7: Largest integer in 64-bit perl
in thread Largest integer in 64-bit perl
Really? That's surprising me a bit... can you provide evidence for this?
From my experience is Python "more" typed than Perl, leading to 3/2==1 because it assumes that's an integer operation only.
:~$ python3 Python 3.12.3 (main, Feb 4 2025, 14:48:35) [GCC 13.3.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> 3/2 1.5 >>> (2**4711+1)-2**4711 1 >>>
LOL, I suppose nobody is perfect...
>>> (2**(128/2)+1)-2**64 0.0 >>> (2**(64)+1)-2**64 1 >>> (2**(128//2)+1)-2**64 1 >>>
Seems like 128/2 being a float, breaks the workaround xD
Cheers Rolf
(addicted to the Perl Programming Language :)
see Wikisyntax for the Monastery
|
---|