How Are Unlimited Precision Integers Accomplished?

John Baxter jwbaxter at spamcop.net
Thu May 23 11:29:51 EDT 2002


In article <e1eff209.0205221515.6135fc6f at posting.google.com>,
 zephinilium at yahoo.com (Uncle_Alias) wrote:

> I was playing around with computing powers of 2 the other night, and
> was watching Python spit out numbers. When I tested the output by
> dividing it by 2 repeatedly, it seemed to be accurate and not a
> rounded out number. This is amazing to me that it can calculate
> integers to unlimited precision. How is this done? (Please keep the
> explanation simple, for I am a mere amateur coder).

You're using the terms as commonly used.  However...

I don't think it's "unlimited precision;" I think it's "unlimited 
magnitude without loss of precision".

(And of course, it's not unlimited, unless your hardware supports 
spilling memory contents to disk and plugging in more disks forever, or 
some other fanciful memory extension tricks.  Just "so big I don't care 
about the limit.")

Tune in next week for my comments about monitor "resolution."  ;-)

  --John



More information about the Python-list mailing list