Python BUG?

François Pinard pinard at iro.umontreal.ca
Wed Jan 19 16:03:36 EST 2000


"Tim Peters" <tim_one at email.msn.com> writes:

> Conversion to decimal is a quadratic-time (in the number of bits) process.

This is why `bc' and some other tools work in base-(10**N), for some suitable
N, when it is known that decimal printing will often be needed.  Such a
choice does not imply much slowdown in long integer computations.  Even if
unlikely to occur, Python was offering some way for the user to specify
the preferred base for printing, and choosing super-digits accordingly.
This might avoid quadratic behaviour in practice, but speaking practice,
I wonder if people handling huge numbers really need to print them :-).

-- 
François Pinard   http://www.iro.umontreal.ca/~pinard






More information about the Python-list mailing list