coreutils icon indicating copy to clipboard operation
coreutils copied to clipboard

the implementation of `factor` is horrible

Open kspalaiologos opened this issue 4 years ago • 1 comments

the current implementation of factor is laughably bad; consider using Floyd's cycle-finding algorithm with Brent's algorithms to somehow faciliate optimised Pollard's rho algorithm. It seems to be what coreutils do (+ trial division i guess), except I can't be bothered to check what kind of cycle finding algorithm do they use, since the code is, as usual for GNU, obfuscated.

kspalaiologos avatar Jul 10 '21 16:07 kspalaiologos

PRs are welcomed.

spytheman avatar Jul 11 '21 14:07 spytheman