Thank you, I was able to get my code to compile.
You can write (a+bi)^(c+di) as exp(log(r)(c+id)+iθ(c+id)), where r and theta are the norm and arg of the a+bi. then write that out in pure complex and real part; the real part give you a simple exp(real) and exp(complex) give you a rotation.