| Line 1: |
Line 1: |
| − | <includeonly>{{#ifexpr:{{{2}}}>0|{{#expr:{{{1}}}{{loop|{{#expr:{{{2}}}-1}}|*{{{1}}}}}}}}}{{#ifexpr:{{{2}}}=0|1}}{{#ifexpr:{{{2}}}<0|{{#expr:1/({{{1}}}{{loop|{{#expr:{{abs|{{{2}}}}}-1}}|*{{{1}}}}})}}}}</includeonly><noinclude> | + | <includeonly>{{#ifexpr:{{#expr:{{{2}}}}}>0|{{#expr:{{#expr:{{{1}}}}}{{loop|{{#expr:{{#expr:{{{2}}}}}-1}}|*{{#expr:{{{1}}}}}}}}}}}{{#ifexpr:{{#expr:{{{2}}}}}=0|1}}{{#ifexpr:{{#expr:{{{2}}}}}<0|{{#expr:1/({{#expr:{{{1}}}}}{{loop|{{#expr:{{abs|{{#expr:{{{2}}}}}}}-1}}|*{{#expr:{{{1}}}}}}})}}}}</includeonly><noinclude> |
| − | Allows a number be raised to an ''integer'' power from -150 to 150. Powers of greater than 150 are treated as 150 and those less than -150 as -150.
| + | {{pp-template|small=yes}} |
| − | <pre>Usage:
| + | {{template doc}} |
| − | {{pow|<base>|<power>}}</pre> | |
| − | <pre>Example:
| |
| − | {{pow|2|4}}</pre> = {{pow|2|4}}
| |
| − | | |
| − | [[Category:Templates using ParserFunctions|{{PAGENAME}}]]
| |
| − | [[Category:Mathematical templates|{{PAGENAME}}]]
| |
| − | | |
| | </noinclude> | | </noinclude> |