So for my class i have to make a java program that deals with complex numbers. I finished getting the root and power and i was wondering how to do a method that deals with powers such as 2.56. Now im not exactly sure how to take a complex number to the power of 2.56 and whether i would use the same method of De Moivres Formula. I was thinking that taking something to the power of 2.56 is the same as taking it to the power of 256 and then taking the 100th root of it, but im not sure if that will work for complex numbers or if it will work in java.
Anyways any help would be appreciated...i barely remember anything about complex numbers...
Any complex number $z = x + iy$ can be written in the form $z = r e^{i \theta}$, where $r = \sqrt{x^2 + y^2}$ and $\tan \theta = \frac{y}{x}$. ($0 \leq \theta < 2 \pi$) Thus, you may use $z^{\alpha} = r^{\alpha} e^{i \alpha \theta}$ for any $\alpha \in \mathbb{R}$.