How to get decimal form of largest known prime?
Irmen de Jong
irmen at -nospam-remove-this-xs4all.nl
Sun Jun 13 15:47:59 EDT 2004
Tim Peters wrote:
> [Irmen de Jong]
>
>>In fact, what algorithm is Python itself using when you try to:
>>
>> >>> print 2**24036583 - 1
>>
>>??
>
>
> Recent Pythons convert to base 10000 internally by repeated division, along
> the lines of
[... interesting comments....]
To me it sounds as if Python's default long-to-decimal-string code
is heavily optimized already. So then why this discussion about a
fast algorithm to print very large longs? How could it be better than
just a simple:
>>> print myHugeLong
--Irmen
More information about the Python-list
mailing list