This is to ensure that calls such as string(10) return "10" and not "10.0". It also saves integer -> float conversions when they're not needed.