Programmers on all sorts of platforms get this wrong all the time (I admit having done this in bad ways myself too). In short: Don’t expect floating point values in a computer to be represented as decimals. Rob Kennedy wrote a very nice answer on this: The exact value 87.285 is not ...
More...