P is for Practical | |
PerlMonks |
Re^4: Number too big to fit in integerby syphilis (Archbishop) |
on Jan 01, 2023 at 02:00 UTC ( [id://11149243]=note: print w/replies, xml ) | Need Help?? |
I get the same with 5.36.0 as I did with 5.26.1. Oh, I see. You were adding powers of 2 to the original value of 2**64. I get the same as you when I run the code you provided. I was incrementing by one: Of course, this particular perl configuration sees 18446744073709553665 and 18446744073709554600 as the same value, anyway: However, that your 5.26.1 regards 18446744073709554600 and 18446744073709554599 as different values is a bug in 5.26.1. (I see the same bug in my Windows build of 5.26.0.) I believe that perl should regard those two values as equivalent for all IV and NV configurations. For me, that fails to output 'ok' on 5.26.0. (If 5.26.0 has been built with -Duselongdouble, then 5.26.0 does get it right and outputs 'ok'.) Cheers, Rob
In Section
Seekers of Perl Wisdom
|
|