Делаю простейший цикл
for($n=0; $n<100; $n=$n+0.1){
echo $n."<br>";
}
Вывод таков
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
1.1
1.2
.................
53.5
53.6
53.7
53.8
53.9
54
54.1
54.200000000001
54.300000000001
54.400000000001
54.500000000001
.................
66.300000000001
66.400000000001
66.5
66.6
66.7
66.8
66.9
67
67.1
.................
83.7
83.8
83.9
84
84.099999999999
84.199999999999
84.299999999999
84.399999999999
84.499999999999
84.599999999999
84.699999999999
84.799999999999
84.899999999999
84.999999999999
Почему так? Ведь я всегда прибавляю 0.1...