Hello! In Chapter 3 cycles with Floating Point written code:

Code:

for (double x = 0.0; x!= 1.0; x+= 0.2)
cout << x;

The author says that this cycle will never end, but it is not so!

I know about the error of real numbers, but why she is not taking place? (That is if you put x != 2.0, then there will be an infinite loop)