"Terry Reedy" <[EMAIL PROTECTED]> writes: > "I.V. Aprameya Rao" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > i have been wondering, how does python store its very long integers and > > perform aritmetic on it.
Well, up until fair recently it used "high school" arithmetic in base 2**15. Now it uses Karatsuba multiplication and some very mild tricks for exponentiation, I believe. > The only real documention for stuff like this, other than random posts on > c.l.p., is the source code itself. It is generally pretty readable. Unfortunately, longobject.c is not one of the most readable bits :-( It's not too bad, but it's no work of art. Cheers, mwh -- <etrepum> Jokes around here tend to get followed by implementations. -- from Twisted.Quotes -- http://mail.python.org/mailman/listinfo/python-list