In order to raise a number to a power, the math library contains a two-parameter function called pow. This function takes two parameters and treats the first as a base and the second as an exponent. Consider the following example:
double f = pow(3.0,2.0);
The function will take the value of 3 and square it, producing 9.0 which is then assigned to f.
Another way to obtain the square root is to raise a number to the one half power:
f = pow(x,0.5);
which is equivalent to:
f = sqrt(x);
However, there is no cube root function. You could use:
f = pow(x,1.0/3.0);
Links:
Calling square root function
Calling the delay function
Function Call Examples