Truncate non-integers for integer format.

Instead of ignoring any non-integer floats, we truncate so that small
floating point precision errors don’t affect integer formatting.  This
is consistent with Python’s "%d" format.