If you change your first %d to %f, you'll see that it also can display it correctly as well. You've asked for the impossible: display this number as a decimal integer, when it's larger than any integer on your machine. However, Perl knows that, and converts the first integer constant immediately to a floating-point value, which is carried forward for the rest of the calculation. At no time except for your coercion was it ever an integer.