This happens because Float numbers cannot be represented exactly on a system.
A Floating Point number is represented on 32bit Architecture using this format.
http://en.wikipedia.org/wiki/Single-precision_floating-point_format
While on a 64bit architechture using this format.
http://en.wikipedia.org/wiki/Double-precision_floating-point_format
Representation of the number in the above two format results in loss of precision. Thus a number such as 0.15 can come up weirdly as 0.149999999998.
When you convert 0.15 to it's binary representation it gives you a recurring number which is 0.0010011001100....
10 however has a binary representation which is not recurring hence can be exactly represented on the above two systems.
0.15 however has some it's bits removed so as to fit in the above architecture where the precision loss happens.
Check the exact mathematics on how to convert a floating point number to a binary which will better help you understand where the precision loss is happening.
http://sandbox.mc.edu/~bennet/cs110/flt/dtof.html