How Are Unlimited Precision Integers Accomplished?

Michael Chermside mcherm at destiny.com
Thu May 23 10:01:20 EDT 2002


Uncle_Alias writes:
 > This [unlimited precision integers] is amazing to me that it can
 > calculate integers to unlimited precision. How is this done?

Martin v. Loewis responds:
 > It uses more memory for larger numbers.
    ...
 > Of course, you can't use processor instructions for operations on
 > these numbers (directly), so Python implements its own +, -, *, /,
 > etc.

For those of whose interest was piqued by this question, can someone 
elaborate with a simple summary of the data structure that is used, the 
algorithms for performing the operations, and what senarios these are 
optimized for?

-- Michael Chermside






More information about the Python-list mailing list