I need to take a complex number to a non integer power in some code I am writing and was wondering if there was a library out there that was capable of doing this. I have been deriving it myself to write the function but it is turning into a rather ugly math problem that would be convenient not to need to solve. My approach is basically to convert the normal a+i*b to the polar form A*e^(i*phi) raise that to a power then convert it back to Cartesian coordinates.
Thank you for your response, I was able to solve it. Part of the reason I was asking is that libraries often times have this sort of thing optimized better than I can do by hand as a non computer science phd (EG: any sort of BLAS or FFT library). And every operation counts when you are using this on a large dataset. Anyway here is the formula for anyone else with the same problem.
for (a+i*b)^n
Real component = (a^2+b^2)^(n/2)*cos(n*arctan(b/a))
Imaginary component =(a^2+b^2)^(n/2)*sin(n*arctan(b/a))
(Note: only use this when you need non integer exponents, the integer exponent solution is much faster)