Math irregularity ... is this normal?

Some One Else nospam at any.time
Thu Jul 4 20:54:56 EDT 2002


Thank you Richard & Emile for your speedy responses!

Still strange that a great book like LP showed a clean calculation ...

Thanks!
-s.o.e.

Richard Jones wrote:

> 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