Namely, awk's printf("%d") doing what it's supposed to do, cast it's operand to (int), which screws up large numbers. The fix is simple, although it mostly just pushes the problem under the rug; using %.0f instead of %d.