| Bytes | Lang | Time | Link |
|---|---|---|---|
| 071 | APL Dyalog Unicode | 240521T183929Z | Adá |
| 115 | Python + numpy | 240522T122039Z | Stef |
| 089 | Python 3 | 240522T123855Z | dr.me123 |
| 107 | Python | 240522T114229Z | corvus_1 |
| 087 | Google Sheets | 240522T062401Z | z.. |
| 091 | Google Sheets | 240521T205307Z | doubleun |
| 094 | JavaScript ES7 | 240521T224652Z | Arnauld |
APL (Dyalog Unicode), 87 71 bytes
Anonymous infix lambda taking [a,b] as left argument, [c,d] as right argument, and returning [x,y] for \$x+yi\$.
{(*-/⍵×⌽p)×2 1○+/⍵×p←({0=⍺:○.5××⍵⋄(¯3○⍵÷⍺)+○(0>⍺)ׯ1*0>⍵}/⍺),.5×⍟+/⍺×⍺}
{…} is an anonymous lambda with ⍺ as left argument and ⍵ as right argument.
The only operations used (and only on reals) are:
×multiplication- infix
+addition - prefix
⍟natural logarithm - infix
×multiplication - infix
,concatenation f/f-reduction- …
:…⋄… ternary (if … then … else …) - infix
=equality - prefix
×sign - prefix
○pi times - infix
>greater than - infix
*exponentiation - infix
÷division - prefix
¯3○arctangent - infix
←assignment - prefix
2 1○cosine and sine - prefix
⌽reverse list - infix
-subtraction - prefix
*exponential
Note that there's no atan2 on the list. I implement it as \$\text{atan2}(a,b)=\big(\tan^{-1}\frac{b}a\big)+\pi\Big(\frac{(1-2[0>b])\,\text{sgn}\,a}2-[0>b]\Big)\$
Python + numpy, 115 bytes
-9 bytes thanks to corvus_192
lambda x,y:[(e:=exp(linalg.det([y,t:=[arctan2(*x[::-1]),log(hypot(*x))]])))*cos(y@t),e*sin(y@t)]
from numpy import*
If someone has a trick to remove a few of these 12 pairs of brackets...
Explanation
To compute (a + i b) ** (c + i d), it is helpful to have the two quantities
c log(norm(a,b)) - d atan2(b,a)
c atan2(b,a) + d log(norm(a,b))
It turns out that withy = (c,d) and t = (atan2(b,a), log(norm(a,b))):
- the first is the determinant
det([y,t]), and - the second is the dot product
y@t.
Python 3, 89 bytes
import math
e=lambda a,b,c,d:math.e**((c+1j*d)*(math.log(a**2+b**2)/2+1j*math.atan2(b,a)))
Python, 107 bytes
lambda a,b,c,d:[g(c*(p:=atan2(b,a))+d*log(h:=hypot(a,b)))*h**c/exp(d*p)for g in[cos,sin]]
from math import*
A port of Arnaulds JS answer
Google Sheets, 87 bytes
Expects \$a\$, \$b\$, \$c\$, \$d\$ in \$A1\$, \$B1\$, \$C1\$, \$D1\$ respectively and it returns the result in two horizontally adjacent cells.
=LET(a,LN(A1^2+B1^2)/2,b,ATAN2(A1,B1),c,EXP(C1*a-D1*b),d,C1*b+D1*a,{c*COS(d),c*SIN(d)})
Google Sheets, 91 bytes
=let(s,A1^2+B1^2,a,atan2(A1,B1),r,s^(C1/2)/exp(D1*a),u,C1*a+D1*ln(s)/2,{r*cos(u),r*sin(u)})
Put the four coefficients in cells A1:D1 and the formula in cell E1.
Returns the real and imaginary parts as a two-element array. To get an actual complex number, replace the final { array expression } with complex() (98 bytes) or text() (119 bytes, see the edits). The latter gives negative imaginary part with unary plus, as in -0.266+-0.082i, which is a valid complex number format in Google Sheets as well.

Ungolfed:
=let(
s, A1^2 + B1^2,
a, atan2(A1, B1),
r, s^(C1 / 2) / exp(D1 * a),
u, C1 * a + D1 * ln(s) / 2,
{ r * cos(u), r * sin(u) }
)
-5 bytes thanks to Arnauld.
The same in JavaScript (non-competing, 102 bytes):
with(Math)f=(a,b,c,d,s=a*a+b*b,p=atan2(b,a),r=s**(c/2)/exp(d*p),u=c*p+d*log(s)/2)=>[r*cos(u),r*sin(u)]
JavaScript (ES7), 94 bytes
Returns [real, img].
This is essentially the formula used by doubleunary, except I'm computing \$\sqrt{a^2+b^2}\$ (with hypot) instead of \$a^2+b^2\$ to get rid of both divisions by 2.
with(Math)f=(a,b,c,d,p=atan2(b,a))=>[cos,sin].map(g=>g(c*p+d*log(h=hypot(a,b)))*h**c/exp(d*p))
