Integer multiplication overflow.

Alex Martelli aleaxit at yahoo.com
Sun Oct 8 17:00:44 EDT 2000


"Tim Peters" <tim_one at email.msn.com> wrote in message
news:mailman.971030898.19290.python-list at python.org...
    [snip]
> "sophisticated" algorithms compute results in lowest terms directly; since
> multiplication and division of longs in Python take time quadratic in the
> number of bits, this can make a huge difference in runtime.

Indeed...!  Unfortunately, as usual in numerical fields, "sophisticated"
also means "tricky and easy to get wrong"...:-(.


> I've got a suitably convoluted Rational package under development,
including
> a huge number of options for exact and rounded I/O (also necessary for
> serious work), but haven't had time to even look at it since April.

Oh my -- a *really* advanced Rational package, now THAT would be
a dream indeed...!  Any chance one could take a peek at pre-alpha
code, and perhaps contribute...?  Wouldn't it be wonderful if 2.1 had
a *truly powerful* Rational facility...


Alex






More information about the Python-list mailing list