myfactor

版本 1.0.0.0 (2.2 KB) 作者: John T. McCarthy
This function finds the factors of very large numbers (up to 10^14)
849.0 次下载
更新时间 2008/5/29

查看许可证

To find the prime factors of any number up to 2^32 (about 4.3*10^9), you can use MATLAB's built-in function factor.m

For integers greater than 2^32, try this program, which guarantees a result up to 10^14, thus extending the domain of inputs 23,000-fold.

(This file is an adaptation of MATLAB's function primes.m)

Example:

myfactor(2^32+1)
ans = [1 641 6700417]

引用格式

John T. McCarthy (2024). myfactor (https://www.mathworks.com/matlabcentral/fileexchange/20059-myfactor), MATLAB Central File Exchange. 检索来源 .

MATLAB 版本兼容性
创建方式 R2006a
兼容任何版本
平台兼容性
Windows macOS Linux
类别
Help CenterMATLAB Answers 中查找有关 Elementary Math 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
版本 已发布 发行说明
1.0.0.0

Attempt to improve presentation, following John D'Errico's review.