PickBASIC / FlashBASIC
pwr() function
.mdThe pwr() function raises a value contained in an expression to the power of the value of a second expression.
Syntax
pwr(num.exp, power.exp)Parameter(s)
| num.exp | Value to raise to the power of the value of power.exp. |
| power.exp | Value whose power is applied to the value of num.exp. |
Description
Example(s)
This statement prints a 9, the result of 3 taken to the power of 2.
print pwr(3,2)
In this statement, 3^2 is identical to pwr(3,2).
print 3^2
This statement prints the square root of the value stored
in the variable xyz. This is equivalent to: print sqrt(xyz)
print pwr(xyz,.5)
Raise to a power
print pwr(2, 10) ;* 1024
See also
Referenced by
3 topics mention pwr() function in its description.