But all this will still not solve the problem that the following loop
does not work as expected:
> for k=1,2,1/6 do print(k) end
1.0
1.1666666666667
1.3333333333333
1.5
1.6666666666667
1.8333333333333
>
IMO, this loop works "as expected".
6*(1/6) ~= 1, and everybody reading this list is aware of it ;-)
Float-comparison is a red herring which prevents you from seeing the main idea of the post.
I assume that user knows EVERYTHING about Lua numeric datatypes (floats, integers).
But anyway, Lua could make a surprise due to weird internal logic of numeric "for"-loop.