You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
kscheff edited this page Oct 24, 2017
·
1 revision
Syntax
POW(a,b)
Description
The POW(A,B) function rises A to the power of B. The two parameters A and B are expressed in fixed point.
The upper 16 bits are the integer part, the lower 16 bits are fractional part. The result is expressed in same fixed point format.
Example
// calculate the square root of 5.25
10 A = 344064 // 5.25 * 65536
20 B = 32768 // 0.5 * 65536
30 C = POW(A,B)
40 PRINT C>>16,".",(C & 0xFFF)*1000/65536
RUN
2.291
OK