in reply to incrementation loop fails?
1/10 is a periodic number in binary just like 1/3 is a periodic number in decimal. It would take infinite storage to store it as floating point number.
You're magnifying the error by applying it numerous times. Just round the numbers using sprintf where needed.
|
|---|