analysis/
mg_factor.pro
Routines
top mg_factor
result = mg_factor(n)
Returns the prime factorization of a given integer value n
. If the input
is prime, returns the value itself.
Return value
integer array of factors, the same type as the input n
Parameters
- n in required type=integer type
value to factor
Examples
The following are factorizations of values:
IDL> print, mg_factor(2*27*5)
2 3 3 3 5
IDL> print, mg_factor(13)
13
File attributes
Modification date: | Wed May 14 15:07:14 2014 |
Lines: | 18 |
Docformat: | rst rst |
Contact me if you have enhancement requests or bug fixes.