Files
processing4/mobile/web/reference/API/pow.xml
2005-01-27 06:48:42 +00:00

59 lines
1.2 KiB
XML

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<root>
<name>pow()</name>
<category>Math</category>
<subcategory>Calculation</subcategory>
<usage>Web &amp; Application</usage>
<example>
<image></image>
<code>
float a = pow( 1, 3); // Sets "a" to 1*1*1 = 1
float b = pow( 3, 5); // Sets "b" to 3*3*3*3*3 = 243
float c = pow( 3,-5); // Sets "c" to 1 / 3*3*3*3*3 = 1 / 243 = .0041
float d = pow(-3, 5); // Sets "d" to -3*-3*-3*-3*-3 = -243
</code>
</example>
<description>
Facilitates exponential expressions. The <b>pow()</b> function is an efficient way of multiplying numbers by themselves (or their reciprocal) in large quantities. For example, <b>pow(3, 5)</b> is equivalent to the expression 3*3*3*3*3 and <b>pow(3, -5)</b> is equivalent to 1 / 3*3*3*3*3.
</description>
<syntax>
pow(<c>base</c>, <c>exponent</c>)
</syntax>
<parameter>
<label>base</label>
<description>int or float: base of the exponential expression</description>
</parameter>
<parameter>
<label>exponent</label>
<description>int or float: power of which to raise the base </description>
</parameter>
<returns>float</returns>
<related>
sqrt()
</related>
<availability>1.0</availability>
<type>Function</type>
<partof>PDE</partof>
</root>