myfactor
Versione 1.0.0.0 (2,24 KB) da
John T. McCarthy
This function finds the factors of very large numbers (up to 10^14)
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]
Cita come
John T. McCarthy (2024). myfactor (https://www.mathworks.com/matlabcentral/fileexchange/20059-myfactor), MATLAB Central File Exchange. Recuperato .
Compatibilità della release di MATLAB
Creato con
R2006a
Compatibile con qualsiasi release
Compatibilità della piattaforma
Windows macOS LinuxCategorie
- MATLAB > Mathematics > Elementary Math >
Scopri di più su Elementary Math in Help Center e MATLAB Answers
Tag
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Scopri Live Editor
Crea script con codice, output e testo formattato in un unico documento eseguibile.
Versione | Pubblicato | Note della release | |
---|---|---|---|
1.0.0.0 | Attempt to improve presentation, following John D'Errico's review. |