Like what others said, use the Decimal class to avoid this.
from decimal import Decimal
x=Decimal(5)
x/=2
x*=Decimal("11.4")
print x
# 28.50On Mon, May 26, 2008 at 1:28 AM, <[EMAIL PROTECTED]> wrote: > >>> x = 5 > >>> x /= 2 > >>> x > 2 > >>> x *=11.4 > >>> x > 22.800000000000001 > > ok where does the 1 in the come from? > -- > http://mail.python.org/mailman/listinfo/python-list > -- Harsh J www.harshj.com
-- http://mail.python.org/mailman/listinfo/python-list
