e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\begin{array}{l}
\mathbf{if}\;x.re \le -3.566576781276111012185154762547093345551 \cdot 10^{-310}:\\
\;\;\;\;e^{\log \left(-x.re\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{{x.re}^{y.re}}}{\sqrt[3]{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}} \cdot \sqrt[3]{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}} \cdot \frac{\sqrt{{x.re}^{y.re}}}{\sqrt[3]{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}}\\
\end{array}double f(double x_re, double x_im, double y_re, double y_im) {
double r21089 = x_re;
double r21090 = r21089 * r21089;
double r21091 = x_im;
double r21092 = r21091 * r21091;
double r21093 = r21090 + r21092;
double r21094 = sqrt(r21093);
double r21095 = log(r21094);
double r21096 = y_re;
double r21097 = r21095 * r21096;
double r21098 = atan2(r21091, r21089);
double r21099 = y_im;
double r21100 = r21098 * r21099;
double r21101 = r21097 - r21100;
double r21102 = exp(r21101);
double r21103 = r21095 * r21099;
double r21104 = r21098 * r21096;
double r21105 = r21103 + r21104;
double r21106 = cos(r21105);
double r21107 = r21102 * r21106;
return r21107;
}
double f(double x_re, double x_im, double y_re, double y_im) {
double r21108 = x_re;
double r21109 = -3.5665767812761e-310;
bool r21110 = r21108 <= r21109;
double r21111 = -r21108;
double r21112 = log(r21111);
double r21113 = y_re;
double r21114 = r21112 * r21113;
double r21115 = x_im;
double r21116 = atan2(r21115, r21108);
double r21117 = y_im;
double r21118 = r21116 * r21117;
double r21119 = r21114 - r21118;
double r21120 = exp(r21119);
double r21121 = pow(r21108, r21113);
double r21122 = sqrt(r21121);
double r21123 = exp(r21118);
double r21124 = cbrt(r21123);
double r21125 = r21124 * r21124;
double r21126 = r21122 / r21125;
double r21127 = r21122 / r21124;
double r21128 = r21126 * r21127;
double r21129 = r21110 ? r21120 : r21128;
return r21129;
}



Bits error versus x.re



Bits error versus x.im



Bits error versus y.re



Bits error versus y.im
Results
if x.re < -3.5665767812761e-310Initial program 32.0
Taylor expanded around 0 17.1
rmApplied add-cbrt-cube22.8
Simplified22.8
Taylor expanded around -inf 5.7
Simplified5.7
if -3.5665767812761e-310 < x.re Initial program 35.2
Taylor expanded around 0 21.4
Taylor expanded around inf 11.7
Simplified14.9
rmApplied add-cube-cbrt14.9
Applied add-sqr-sqrt14.9
Applied times-frac14.9
Final simplification10.4
herbie shell --seed 2019323
(FPCore (x.re x.im y.re y.im)
:name "powComplex, real part"
:precision binary64
(* (exp (- (* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.re) (* (atan2 x.im x.re) y.im))) (cos (+ (* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.im) (* (atan2 x.im x.re) y.re)))))