Don't display decimals when the number doesn't need them.

Changed the formatter so float numbers are displayed
without any decimals when they only have an
integer part.