Raise a complex number to a power or find all nth roots via polar form.
Input
Answer
Steps
Why it works
De Moivre’s theorem says powers multiply angles and raise moduli: [r(cos θ + i sin θ)]ⁿ = rⁿ(cos nθ + i sin nθ). Roots reverse this: n distinct roots share modulus ⁿ√r and sit evenly spaced around a circle, angles (θ+360°k)/n.