analysis/
mg_factor.pro
top source 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: | Thu May 17 10:39:19 2012 |
Lines: | 42 |
Docformat: | rst rst |
Contact me if you have enhancement requests or bug fixes.