The algorithm finds only one factor. More factors can be found by dividing by the found one and recursively applying the function again. Works with symbolic and double.
Example:
x = sym("2");
y = nextprime(x^20);
z = nextprime(y+10000);
PollardsRho(y*z)
ans =
1058591
OR:
PollardsRho(1517)
ans =
37
引用格式
Thomas (2024). Two versions of Pollard's rho factorization algorithm (https://www.mathworks.com/matlabcentral/fileexchange/113465-two-versions-of-pollard-s-rho-factorization-algorithm), MATLAB Central File Exchange. 检索时间: .
MATLAB 版本兼容性
创建方式
R2020a
兼容任何版本
平台兼容性
Windows macOS Linux标签
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!版本 | 已发布 | 发行说明 | |
---|---|---|---|
1.0.0 |