wormwood_3 wrote:
>>>> 1.1
> 1.1000000000000001

> The second case is, of course, what is throwing me. By having a
> decimal point, "1.1" is a float type, and apparently it cannot be
> represented by binary floating point numbers accurately. I must admit
> that I do not understand why this is the case. Would anyone be able
> to enlighten me?

http://docs.python.org/tut/node16.html
http://effbot.org/pyfaq/why-are-floating-point-calculations-so-inaccurate.htm

Kent
_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to