|
|
| File Information |
| Description |
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] |
| MATLAB release |
MATLAB 7.2 (R2006a)
|
|
Tags for This File
|
| Everyone's Tags |
|
| Tags I've Applied |
|
| Add New Tags |
Please login to tag files.
|
| Comments and Ratings (1) |
| 28 May 2008 |
John D'Errico
|
|
|
| Updates |
| 28 May 2008 |
Add more keywords |
| 29 May 2008 |
Attempt to improve presentation, following John D'Errico's review. |
|
Contact us at files@mathworks.com