Two simple options:
Or,
Be very careful though. If x is negative, it will return a complex number, because there are indeed THREE cube roots of a negative number. Two of them are complex. nthroot will give you the root you would expect however.
(-2)^(1/3)
ans =
0.62996 + 1.0911i
nthroot(-2,3)
ans =
-1.2599
In your case, it is not relevant, since the number will be non-negative.
Best Answer