Author steven.daprano
Recipients mark.dickinson, serhiy.storchaka, steven.daprano, tim.peters, trrhodes
Date 2020-03-21.14:25:26
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1584800726.33.0.107983167368.issue40028@roundup.psfhosted.org>
In-reply-to
Content
Ross: 

"implement this logic for a limited range of non-negative n, imposing an upper limit (suggestions welcome) to make sure all provided input can be safely processed. We can then build from there to support larger n going forward if the demand is out there."

Urgh, please no! Arbitrary limits are horrible. Whatever maximum limit N you guess, somebody will want to factorise N+1. Consider this evidence of demand :-)

On what basis would you choose that limit? Basing it on the size of n is the wrong answer: factorising 2**10000000 is easy, and will be found by trial division almost instantly, even though it's a large number with over three million digits.

Another question: since factorization can take a long time, should it be a generator that yields the factors as they are found?
History
Date User Action Args
2020-03-21 14:25:26steven.dapranosetrecipients: + steven.daprano, tim.peters, mark.dickinson, serhiy.storchaka, trrhodes
2020-03-21 14:25:26steven.dapranosetmessageid: <1584800726.33.0.107983167368.issue40028@roundup.psfhosted.org>
2020-03-21 14:25:26steven.dapranolinkissue40028 messages
2020-03-21 14:25:26steven.dapranocreate