complex powers
We know what z^2 or z^3 means by repeated multiplication, but what could z^i or 2^(1+i) mean? There is no way to multiply z by itself i times. The way out is the same trick that defines real powers like 2^pi: route everything through the exponential and the logarithm.
Define z^a = e^(a log z) for a non-zero z and any complex exponent a. Because log z is multi-valued (it carries the +2 pi i k ambiguity), so is z^a in general: different choices of log z give z^a values that differ by the factor e^(2 pi i k a). To get a single number you use a chosen branch of log, and with the principal branch you get the principal value z^a = e^(a Log z). Concretely, to compute z^a: write z = r e^(i theta), take Log z = ln r + i theta with theta the principal argument, multiply by a, and exponentiate. The famous i^i is a clean test case: Log i = i pi/2, so i^i = e^(i (i pi/2)) = e^(-pi/2) = 0.2079..., a real number (and there are other values e^(-pi/2 + 2 pi k) for other branches).
Roots are the special case where a is a reciprocal integer: z^(1/n) = e^((1/n) log z) gives exactly the n distinct n-th roots as k ranges over 0, 1, ..., n-1, after which the values repeat. So nth roots, square roots, and cube roots all live inside this one definition. Beware: the familiar law (z w)^a = z^a w^a and (z^a)^b = z^(a b) can fail by a factor of e^(2 pi i (integer) a) once branches are involved; treat such identities as needing a branch check, not as automatic.
Principal value of (-1)^(1/2): Log(-1) = i pi, so (-1)^(1/2) = e^((1/2) i pi) = e^(i pi/2) = i. The other root -i comes from the next branch of the log.
The principal square root of -1 is +i; the second root needs the next log branch.
z^a is multi-valued whenever a is not an integer, so writing it as one number always hides a branch choice. The expression e^z (base e) is different and is single-valued, because e^z is defined directly, not via e^(z log e).