User:Arseniiv/Factorization/Doc: Difference between revisions

Arseniiv (talk | contribs)
m subst was a bad idea as all other functions weren’t substituted :D
Arseniiv (talk | contribs)
m add a heading here
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
== How to use this template ==
This template outputs prime factorization in a pleasant form, given a plain-text expression.
This template outputs prime factorization in a pleasant form, given a plain-text expression.


For multiplication use <code>*</code> or simply space. For exponentiation use <code>**</code> or <code>^</code>. You can add extra spaces around all these, just not between <code>-</code> and an exponent.
For multiplication use <code>*</code>. For exponentiation use <code>**</code> or <code>^</code>. You can add extra spaces around all these, just not between <code>-</code> and an exponent.


One of good choices to write a readable source text is using spaces between factors and no space around exponentiation (the first two examples below).
One of good choices to write a readable source text is using spaces between factors and no space around exponentiation (the first two examples below).
Line 9: Line 11:
! Output
! Output
|-
|-
| <pre>{{Factorization|2^3 5 23^-3 31}}</pre>
| <pre>{{Factorization|2^3 * 5 * 23^-3 * 31}}</pre>
| {{Factorization|2^3 5 23^-3 31}}
| {{Factorization|2^3 * 5 * 23^-3 * 31}}
|-
|-
| <pre>{{Factorization| 2**3 * 5 * 7**-5 * 11**9 19**-4 }}</pre>
| <pre>{{Factorization| 2**3 * 5 * 7**-5 * 11**9 * 19**-4 }}</pre>
| {{Factorization| 2**3 * 5 * 7**-5 * 11**9 * 19**-4 }}
| {{Factorization| 2**3 * 5 * 7**-5 * 11**9 * 19**-4 }}
|-
|-
| <pre>{{Factorization|3*7^-2*11*13^-1}}</pre>
| <pre>{{Factorization|3*7^-2*11*13^-1}}</pre>
| {{Factorization|3*7^-2*11 13^-1}}
| {{Factorization|3*7^-2*11*13^-1}}
|-
|-
| <pre>{{Factorization}}</pre>
| <pre>{{Factorization}}</pre>
| {{Factorization}}
| {{Factorization}}
|}
|}