|
|
| Think about Loose Coupling | |
| PerlMonks |
Re^5: Largest integer in 64-bit perlby syphilis (Archbishop) |
| on May 30, 2025 at 00:41 UTC ( [id://11165163]=note: print w/replies, xml ) | Need Help?? |
|
Perl does this by switching to double floats ... Rather, perl switches to "NV" floats. Of course, I'm nitpicking, but it's a nitpick that does have some significance. On a perl whose ivsize=8, && whose nvtype is either 'long double' or '__float 128', I get: But on a perl where ivsize=8 and nvtype is 'double' and you get: Now that particular configuration (ivsize==8 and nvtype is 'double') is the only perl configuration that produces that nonsense - and yet it's the most commonly used configuration !! If you use either an ivsize of 4, or an nvtype that is not double, then you can ignore that particular weirdness because it's not going to happen. Note: That "nonsense" doesn't just happen with (~0) + 1. It happens for (~0) + $x for all $x in the range 1..2048. That's mainly why I think of it as an insane configuration. (It's still a configuration that I regularly use ;-) Cheers, Rob
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||||||||||||||||||||||||