var_dump(abs($onethird + $fivethirds - $half + $threehalf) < 0.00001);
see: http://www.cygnus-software.com/papers/comparingfloats/comparingfloats.htm
also: http://docs.sun.com/source/806-3568/ncg_goldberg.html
This is true in all programming languages.
I have not yet come accross any language where this is done automatically when programmers want equality of floats. Someone should come up with a new operator, perhaps =~= for float equality which would automatically do the comparison of diff with epsilon:
if ($float1 =~= $float2) {...
It is annoying that every year, since I graduated in 2000, around this time of the year some newbie will ask this question on some newsgroup, forum or mailing list. Just last month I answered this on comp.lang.tcl. And it's not just newbies, two months ago I had to explain this to my coworker who has been developing software for over 5 years asking me why his Perl code is doesn't work.