Not very elegant, but it'll work. I don't suppose there is a >> function for determining the number of digits after the decimal, is it? > > It looks like you are trying to avoid rounding errors in decimal arithmetic. > You might be interested in Python's decimal.Decimal type then.
That's right, I had never heard of decimal.Decimal. I'll check it up. > >> Also, anybody knows the maximum and/or minimum integer python will accept? > > Integers in Python (*) are "unlimited" > >>>> 10**1000 -1 > 9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999 99 > 99999999 > 99 > > In practice the amount of available memory will be the limit, but you are > unlikely to reach that. > > (*) Python 2 had int and long where values that could not represented by > machine integers were automatically propagated to long. In Python 3 the int > and long have been united as int. Thank you very much, _______________________________________________ Tutor maillist - [email protected] To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor
