newbie floating point question
Gerson Kurz
gerson.kurz at t-online.de
Thu Feb 21 14:04:09 EST 2002
On Thu, 21 Feb 2002 19:47:20 GMT, Alex <alexhelder at R191.net> wrote:
>Why does this happen ?
>
>>>> .2
>0.20000000000000001
>
>Is this the correct behavior for the Python 2.2 interpreter ? (version info
>is printed below )
>
Yes. For a very good explanation see
http://www.python.org/doc/current/tut/node14.html
It also explains the difference between str(float) and repr(float),
which I found out the hard way ;)
More information about the Python-list
mailing list