You should probably learn more about floating-point. Read e.g., http://en.wikipedia.org/wiki/Floating_point and in particular "Representable numbers, conversion and rounding". -- Torbjörn