Module:Utils: Difference between revisions
Improve the algorithm of sigfig |
Factorization is inapplicable for n < 2 |
||
Line 115: | Line 115: | ||
function p._prime_factorization(n) | function p._prime_factorization(n) | ||
if n <= 1 then | if n <= 1 then | ||
return | return "n/a" | ||
end | end | ||
local factors, powers = {}, {} | local factors, powers = {}, {} |