Module:Utils/doc: Difference between revisions

ArrowHead294 (talk | contribs)
No edit summary
ArrowHead294 (talk | contribs)
No edit summary
Line 29: Line 29:
: Returns <code>x</code> rounded to a precision of <code>prec</code> significant figures. Parameter <code>prec</code> defaults to 6 if it is omitted.
: Returns <code>x</code> rounded to a precision of <code>prec</code> significant figures. Parameter <code>prec</code> defaults to 6 if it is omitted.


; <code>is_prime(n)</code> returns <code>true</code> if the given integer <code>n</code> is a prime number. This function is designed to be used by other modules only; it cannot be called with <code>{{((}}#invoke:{{))}}</code>.
; <code>is_prime(n)</code>
: Returns <code>true</code> if the given integer <code>n</code> is a prime number. This function is designed to be used by other modules only; it cannot be called with <code>{{((}}#invoke:{{))}}</code>.


; <code>prime_factorization(n)</code> returns the prime factorization of the given integer <code>n</code> using the exponential form (in wikitext).
; <code>prime_factorization(n)</code>
: Returns the prime factorization of the given integer <code>n</code> using the exponential form (in wikitext).


; <code>prime_factorization_raw(n)</code> returns a table encoding the prime factorization of <code>n</code>. This function is designed to be used by other modules only; it cannot be called with <code>{{((}}#invoke:{{))}}</code>.
; <code>prime_factorization_raw(n)</code>
: Returns a table encoding the prime factorization of <code>n</code>. This function is designed to be used by other modules only; it cannot be called with <code>{{((}}#invoke:{{))}}</code>.


; <code>signum(x)</code>
; <code>signum(x)</code>