Tim Peters <t...@python.org> added the comment:
Good idea, but yet another that really belongs in an `imath` module (which doesn't yet exist). How ambitious should it be? Sympy supplies a `factorint()` function for this, which uses 4 approaches under the covers: perfect power, trial division, Pollard rho, and Pollard p-1. All relatively simple to code with trivial memory burden, but not really practical (too slow) for "hard" composites well within the practical range of advanced methods. But I'd be happy enough to settle for that. ---------- components: +Library (Lib) nosy: +tim.peters stage: -> needs patch type: -> enhancement _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue40028> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com