as jeruku stated, it's a common precision bug.
It can be experienced with the ingame sliders aswell when using decimal values.
In my opinion, your best option to display the value is replacing %d with %.0f
You might want to use math.ceil to check the actual number, as jeruku suggested.
The overheat is minimal compared to the much better readability and usability.
see
https://stackoverflow.com/questions/...581943#3581943 for reference