Formatting numbers
Marcin 'Qrczak' Kowalczyk
qrczak at knm.org.pl
Wed May 2 04:36:52 EDT 2001
Wed, 02 May 2001 01:04:50 GMT, Rainer Deyke <root at rainerdeyke.com> pisze:
>> >>> str(12345/100.0)
>> '123.45'
>
> You got lucky. Never, ever use floating point if you want an exact number.
As long as there number of significant digits is not too large and
previous computations were done on integers, this is OK.
--
__("< Marcin Kowalczyk * qrczak at knm.org.pl http://qrczak.ids.net.pl/
\__/
^^ SYGNATURA ZASTĘPCZA
QRCZAK
More information about the Python-list
mailing list