I don't have an answer for you, but I find this interesting. I note the same issue in 64bit up near 18446744073709551615 I'm guessing the guy who wrote Math::BigInt may have the answer. Mike On 11/13/2018 8:07 AM, Tetsuo Handa wrote:
Hello. I want to represent up to a few hundreds gigabytes for file size. On 32bits platform, I noticed that my $value = ...; printf("%u\n", $value); prints 4294967295 if $value >= 4294967295 whereas my $value = ...; printf("%s\n", $value); and use Math::BigInt; my $value = ...; printf("%s\n", Math::BigInt->new($value)->bstr()); print correct value even when $value >= 4294967295. Is it guaranteed (e.g. described as language specification) that printf("%s\n", $value) will print correct value for any environment?
-- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/