in reply to Why does printf() do this to big numbers?
Because that's what you asked for.
%d is asking for a signed int. On pretty much any platform out there, int is 32 bits. 2.8 billion is larger than can be represented in a signed int, ergo wraparound.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Why does printf() do this to big numbers?
by almut (Canon) on Mar 17, 2010 at 09:26 UTC | |
by fullermd (Priest) on Mar 18, 2010 at 00:25 UTC | |
Re^2: Why does printf() do this to big numbers?
by Anonymous Monk on Mar 18, 2010 at 05:01 UTC |
In Section
Seekers of Perl Wisdom