Nearest floatto 16.67- 16.6700000762939453125.
Nearest floatto 10.02-100.01999664306640625
Adding the first to yourself 5 times is not quite equal to the last, so they will not compare equal ones.
In this particular case, compared to the tolerance in the order of 1e-6, probably the way to go.
user6551188
source
share