Expanding $(x+yi)^c$ to series

58 Views Asked by At

I need to evaluate a complex expression $f(x,y)=(x+yi)^c$, where $x,y,c\in\mathbb{R}$, in double-precision arithmetic on the GPU.

It is done in a usual way, i.e., computing $\exp(c \log(x + yi))$. Eventually, it boils down to evaluating such functions like: $\exp$, $\log$, $\arctan$, $\sqrt{x}$, $\sin$ and $\cos$. Since GPU anyway has very limited support for transcendental math, these functions are evaluated using some sort of power series in double-precision arithmetic (which is quite expensive).

My question is: is there any way to compute $f(x,y)$ more efficiently ? I.e., expanding it into some power series for variables $x$ and $y$ ?

1

There are 1 best solutions below

9
On

How about trying;

\begin{eqnarray} (x+yi)^{c} &=& \sum_{m=1}^{\infty} \binom{c}{m}x^{c-m}(yi)^{m} \\ &=& \sum_{m=1}^{\infty} \binom{c}{m}x^{c-m}y^{m}i^{m} \\ &=& \sum_{m=1}^{\infty} \binom{c}{m}x^{c-m}y^{m} e^{i m \pi/2} \end{eqnarray}

And proceeding from there?