10.2.3 Rounding Numbers

The way printf and sprintf()
(see Printf)
perform rounding often depends upon the system’s C sprintf()
subroutine. On many machines, sprintf() rounding is unbiased,
which means it doesn’t always round a trailing .5 up, contrary
to naive expectations. In unbiased rounding, .5 rounds to even,
rather than always up, so 1.5 rounds to 2 but 4.5 rounds to 4. This means
that if you are using a format that does rounding (e.g., "%.0f"),
you should check what your system does. The following function does
traditional rounding; it might be useful if your awk’s printf
does unbiased rounding: