# Simplified way of finding a complex number raised to another complex number

This question here has the answer but I'm still in school and I don't understand any of it. I'm writing a computer program that takes a complex number a + ib and raises it to c + id and I need to return the resulting complex number x + iy.

My Question is: What do I get when I raise (a + ib) to (c + id) to get an answer in the form (x + iy)?

I don't need to understand it all I just need to set

realPart = ....

and

imaginaryPart = ...

If there are multiple possible values then which one do I want? and how many possible values?

-
The answers in the other question provide equations for the power. Perhaps you would elaborate exactly what you don't understand about them. Also, as mentioned, you will have many different values for the the power, you need to select a range for the answer to fall. – EuYu Nov 21 '12 at 7:21
There will be infinitely many possible values. Which one you need will depend on what you need it for, most of the time the principal branch will suffice. – EuYu Nov 21 '12 at 7:37
I'm trying to work out the complex root of a complex number to make a fractal similar to the mandelbrot. but instead of z^2 + c, the zth root of c – Jordan Brown Nov 21 '12 at 8:08

The definition of exponentiation is $$a^b = \exp({b \log a})$$

You can compute $\exp$ and $\log$ using the power series

• $$\exp_N(z) = \sum_{n=0}^N \frac{z^2}{n!}$$
• $$\log_N(z+1) = -\sum_{n=1}^N \frac{(-1)^n z^n}{n}$$

where you make $N$ as bigger to get more accurate results.

If you already know how get the real and imaginary parts of sums and products of complex numbers you should be able to use these series to get the real and imaginary parts of $a^b$.

-
when you set i = 0, do you mean n? – Jordan Brown Nov 22 '12 at 4:45
@JordanBrown, yes my mistake both i's should have been n's. – sperners lemma Nov 22 '12 at 13:33
Also, I'm still in highschool, could you simplify that a bit more. specificaly the exp() and the z^n, thanks :) – Jordan Brown Nov 23 '12 at 5:21