Operators - ^
Notes:For x^y this operator calculates x to the yth power. Please notice that the return type is always complex, if one of the operands is int,real or complex! If you have two real values (like in the previous example: -2^0.5), the result can be complex. So if you want to calculate x^2.5 (x is data type real), then I would recommend writing it as follows: x^(2+0.5) = x^2*x^0.5 = sqr(x)*sqrt(x) Examples:x^3 x^-4.3 -2^0.5 (=sqrt(-2) = i*sqrt(2)
|