Returns a specified base value raised to a specified power.
...Math.Pow(base, exponent )
Prerequisites
None
Parameters
base
A required expression that evaluates to any numerical data type, e.g. Integer, Single, Double.
exponent
A required expression that evaluates to any numerical data type, e.g. Integer, Single, Double.
Remarks
Returns the value of base raised to the exponent power (i.e. base^exponent). The base cannot be negative if the exponent is a fractional value. Also, the base cannot be zero if the exponent is less than or equal to zero.
Examples
Dim p_val As Single
p_val = Math.Pow(2, 3) ' Sets p_val to 8
p_val = Math.Pow(3, -2.2) ' Sets p_val to 0.08919
p_val = Math.Pow(Math.E, Math.Log(17.1))' Sets p_val to 17.1
See Also