Don't be so lazy, follow the two links posted by LanX++.
Alexander
--
Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)
| [reply] |
We can almost always ignore floating-point errors and round our results with printf. Unfortunately there is no "simplistic" way to recognize the rare cases where this is a bad idea (Or what to do about it if you really have one). The documents already cited are not easy to read! Be assured that they to not require knowledge of any math beyond elementary algabra - only a commitment to learn.
| [reply] |
The OP probably has the same off-by-one error as your second reference. The floating-point accuracy issue clearly applies to the current question.
| [reply] |