Math irregularity ... is this normal?

Richard Jones rjones at ekit-inc.com
Thu Jul 4 20:19:36 EDT 2002


On Fri, 5 Jul 2002 10:10 am, Some One Else wrote:
> Hello!
>
> I just compiled and installed Python 2.2.1 on Linux-Mandrake 8.0.  When I
>
> do the following:
> >>> 2/5.0
>
> 0.40000000000000002
>
> In  'Learning Python', a similar example says I should get the more logical
> answer of 0.4.  Did I install something wrong? I can see where this could
> result in creeping math errors.

Yes, this is normal :)

   http://www.python.org/cgi-bin/faqw.py?req=show&file=faq04.098.htp


     Richard






More information about the Python-list mailing list