basic.pwr Function/BASIC Program

basic.pwr

Command basic.pwr Function/BASIC Program
Applicable release versions: AP, R83
Category BASIC Program (486)
Description raises a value contained in an expression to the power of the value of a second expression.

A "power.expression" of 0 (zero) always returns a "1" (one). A "num.expression" of 0 (zero) returns zero.
Syntax pwr(num.expression,power.expression)
Options
Example
print pwr(3,2)

This statement prints a 9, the result of 3 taken to the power of 2.

print 3^2

In this statement "3^2" is identical to pwr(3,2).

print pwr(xyz,.5)

This prints the square root of the value stored in the variable 
"xyz". This is equivalent to:

print sqrt(xyz)
Purpose
Related basic.^
basic.statements
basic.functions