In the manual on page 902, it says that
Normally, when a list item ... is encountered, there should already have been two list items before it, which where numbers.
Examples of numbers are 1, -10, or -0.24. Let us call these numbers x and y and let
d:=y−xbe their difference. Next, there should also be one number following the three dots, let us call this numberz.In this situation, the part of the list reading
x,y,...,zis replaced byx,x+d,x+2d,x+3d,...,x+mdwhere the last dots are semantic dots, not syntactic dots. The value m is the largest number such thatx+md≤zifd is positiveor such thatx+md ≥ zifd is negative.Perhaps it is best to explain this by some examples: The following < list> have the same effects:
\foreach \x in {0,0.1,...,0.5} {\x, }yields0,0.1,0.20001,0.30002,0.40002,
As here x=0, we deduce that 2d=0.20001 and therefore only d=0.100005.
Edit: 3d=0.30002 and therefore d=0.10000666666...
Edit: Then, in this case, 0 is subtracted from a 0.1 entry and this 0.1 entry is modified. How is this possible since nothing is subtracted from 0.1 at all?
Does this mean that subtracting 0 subtracts something from the number 0.1?
- Is it due to binary subtraction in base 2 with
TeX? withpgffor? - is it because of the binary coding of the number 0 in
TeX?withpgffor? - How does
pgfforcalculate the increment in a foreach loop?
Translated with www.DeepL.com/Translator

\dimen0= 0.100005pt \showthe\dimen0, you get0.1pt. If you add\advance\dimen0 by 0.1pt \showthe\dimen0you get0.20001pt. PGF uses dimen registers, which are bound to the conversions to and from binary arithmetic. – egreg Aug 14 '18 at 16:252d=0.20001and3d=0.30002. It remains to be seen why not subtract nothing (subtract0) subtracts something! – AndréC Aug 14 '18 at 16:39d := y - xbe their difference” is meant to be read by humans. Computers have their own way of being implemented and realizing humans’ goals. – Ruixi Zhang Aug 14 '18 at 16:500.1-0=0.1. But for TeX lengths,0.1+0.1=0.20001, as I said. Fixed point addition is different from “arithmetic” addition. – egreg Aug 14 '18 at 16:52