maximum integer length?

Grant Edwards grante at visi.com
Sun Jun 18 14:47:11 EDT 2006


On 2006-06-18, Grant Edwards <grante at visi.com> wrote:

>> Que? An integer is just a whole number without fraction. What are you
>> talking about?
>
> He's talking about decimal digits.  Each decimal digit takes up
> 3.322 bits.  A byte can hold about 2.4 digits.  400MB should be
> able to hold an integer with about 1,010,000,000 decimal
> digits.

Oops.  The real answer is 15/16 of that.  I didn't realize that
the integer representation only uses 15 of 16 bits.

-- 
Grant Edwards
grante at visi.com




More information about the Python-list mailing list