Talk:Proper divisors: Difference between revisions

Content deleted Content added
Line 150:
print(max([(len(pd), v) for (v,pd) in enumerate(prop_divs(500000, 550001), 500000)]))</lang>
:: at least until you run out of memory. But the above code fares horribly if you try to factor a single large number, say <code>12345678901234567</code> (I'm not saying it'd do better when factorizing ''many'' huge numbers, it's just that other methods listed here would then be equally bad, if not worse). I think we don't need to look too hard for a "best" method, just something that's easy to understand and uses a sound algorithm (that being said, my own code tends to be quite unreadable -- doing the right thing is harder than advocating it). After all, if running time is the absolute priority, I wouldn't use Python to begin with. --[[User:Ledrug|Ledrug]] ([[User talk:Ledrug|talk]]) 08:35, 23 December 2014 (UTC)
 
:::I too don't think that run time alone should dictate what python solution should be preferred for this ''set'' of tasks. If a good looking solution is one of the fastest then it would make an easy choice. --[[User:Paddy3118|Paddy3118]] ([[User talk:Paddy3118|talk]]) 15:38, 23 December 2014 (UTC)
Return to "Proper divisors" page.