Developer Documentation Library > UNICOM Intelligence Function Library > Mathematical functions > Pow
 
Pow
Returns the value of a number raised to a power.
Syntax
Pow(<value1>, <value2>)
Parameters
<value1>
Type: Double
The base value.
<value2>
Type: Double
The exponent value.
(return)
Type: Double
<value1> to the power of <value2>.
Notes
If <value1> is 0.0, the return value is 0.0. If the current data value is NULL, <value1> is 0.0 and the return value is 0.0. If <value1> is < 0, an error occurs if <value2> is not an integer value.
When <value1> or <value2> are large numbers, the return value can have more digits than can be accurately represented by the Double data type. However, the function does not check for this and does not issue an error when this happens.
Example
The following mrScriptBasic example uses the Pow function to return the result of 10 raised to the power of 3:
Dim MyVariable
MyVariable = Pow(10, 3) ' Returns 1000
See also
Mathematical functions