Math errors in python

Paul Rubin http
Sun Sep 19 04:07:01 EDT 2004


Peter Otten <__peter__ at web.de> writes:
> Starting with Python 2.4 there will be the 'decimal' module supporting
> "arithmetic the way you know it":
> 
> >>> from decimal import *
> >>> Decimal("12.10") + Decimal("8.30")

I haven't tried 2.4 yet.  After

    a = Decimal("1") / Decimal("3")
    b = a * Decimal("3")
    print b

What happens?  Is that arithmetic as the way I know it?



More information about the Python-list mailing list