std-prime-factorization | ![]() |
Factorizes the number into all prime multiplicants of descending order.
A prime number always returns a list of a single number.
(std-prime-factorization 7) => (7) (std-prime-factorization 8) => (2 2 2) (std-prime-factorization 1118) => (43 13 2) (std-prime-factorization 1000000)
=> (5 5 5 5 5 5 2 2 2 2 2 2)
num: Any positive integer number.
A descending list of positive integer numbers.
Stores a intermediate list of prime numbers in the global symbol *PRIMES* to speed up further calculations and uses the global variable *LASTDIV* stored by a helper function.
(std-require 'PRIMES)
Defined in PRIMES.LSP