in reply to sprintf values
95/100 is a periodic number in binary just like 1/3 is a periodic number in decimal. Storing it as a float would require infinite storage, so the number isn't stored exactly.
You need to round the number (%010.f) instead of truncating it (%010d).
|
|---|