Sorki.
W koncu studia sie do czegos przydadza

Floaty sa zapisywane w systemie IEEE 754 (hehe), uzywa on systemu binarnego do zapisania liczby
(1)^(znak) * (znacznik) * 2 ^ (wykladnik) == 32 bity
0.2 w dziesietnym to bedzie
0011 1101 1100 1100 1100 1100 1100 1100b w syst zmiennoprzecinkowym pojedynczej precyzji ieee754
dzielenie 0.6 / 3 tez da ci liczbe z. p. p. ale moze sie troszeczke roznic:
0.6 = 0111 1111 0001 1001 1001 1001 1001 1001b
0.6/3 = 1,(1001)b x 2^(-3) d! =
0111 1101 1100 1100 1100 1100 1100 1100b, hmmm tyle samo
No dobra ja chce miec z tego tylko troje

, moze stosuja inny system zaokraglania, albo gdzies sie machnalem. Zasada jest prosta: 0.2 nie ma skonczonego rozwiniecia w systemi binarnym i 0.2 i 0.6/3 pewnie gdzies sie roznia na odleglym bicie ale przy wyswietlaniu pokazuje ze to takie same wartosci.
http://us4.php.net/operators.comparisonCytat
Concerning floats: It is simply pointless to compare a float with the value "0.3". The number 0.3 is not exactly representable in binary. Period. So is the number 0.1, and an infinite number of others numbers. Just like 1/3 is not exactly representable in decimal. How would you code the test for your float to be one third? Maybe $myFloat == 0.33333333333 Hmm: you see: Everyone would agree that this test is not accurate.
The test $myFloat == 0.3 is making exactly the same mistake.
So the float which you think should be 0.3 is really something very close to it; if you print it in decimal, the conversion will end up with the closest decimal representation, which may well be "0.3". But "0.3" is also the "right display decimal" for hundreds of float values.
The correct way to "compare" floats is: ( $myFloat - 0.3 ) < $EPSILON where $EPSILON is something like 1e-10, depending on your applic