Read. This is a duplicate of a million other questions.
Stefan Kendall
2010-03-10 00:50:42
Floating point arithmetic in computers is an approximation of the value.
see http://en.wikipedia.org/wiki/Floating_point#Problems_with_floating-point
The definitive article to read is
What Every Computer Scientist Should Know About Floating-Point Arithmetic