Hi Davy

> When I type 3.0/5.0, the result is 0.59999...

try:

>>> print (3.0/5.0)
0.6

> Is there some precision loss? And how to overcome it?

Make sure the result gets piped
through some floating point con-
version  (like print, %s etc.)

BTW, the 0.59999999999999998 value
is the "exact" calculated value
corresponding to your floating point
accuracy (34/2 digits).


Regards

Mirco
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to