teeshift wrote:

/ ...

> and the output is...(as following) quite odd.  Anyone can explain it?

Floating-point numbers are almost always represented internally in binary
(base 2). For display, they are converted to base ten, but numbers with
fractional parts cannot be displayed perfectly after conversion to base
ten.

For example, the base-ten number 0.1 has no finite representation in base 2
-- it is a continuing, nonterminating fraction, sort of like the decimal
equivalent of 1/3 in base ten.

0.1 in base ten = 0.00011001100110011001101... (forever) in base 2

This is a rite of passage. Everyone goes through this while learning about
computers.

-- 
Paul Lutus
http://www.arachnoid.com