Hacker News new | ask | show | jobs
by MrJohz 740 days ago
Unfortunately in Python, integers have no fixed maximum size and can grow indefinitely, so your algorithm would need to be long enough to cover all the numbers that can conceivably fit in a computer's memory. I guess there's still a finite size there, but I'm not sure how the memory usage scales with digit length, so I don't know what the largest number would be.
1 comments

Good point, I was thinking in Python 2 (where there are integer limits)
Not since python 2.5 if I recall correctly. Python has had unlimited size integers for a long time now.