Difference between revisions of "Template:Pow"

MyWikiBiz, Author Your Legacy — Friday December 27, 2024
Jump to navigationJump to search
(New page: <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}}|*{{...)
 
m (1 revision(s))
(One intermediate revision by the same user not shown)
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>

Revision as of 19:55, 17 March 2008