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}\;y.re \le -6.3846056748134043 \cdot 10^{81} \lor \neg \left(y.re \le 7.1591786557106491 \cdot 10^{162} \lor \neg \left(y.re \le 2.46354771067311571 \cdot 10^{232}\right)\right):\\
\;\;\;\;e^{\left(\left(\sqrt[3]{y.re} \cdot \sqrt[3]{y.re}\right) \cdot \left(1 \cdot \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\right)\right) \cdot \sqrt[3]{y.re} - 0}\\
\mathbf{else}:\\
\;\;\;\;e^{\left(\left(\sqrt[3]{y.re} \cdot \sqrt[3]{y.re}\right) \cdot \left(1 \cdot \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\right)\right) \cdot \sqrt[3]{y.re} - \mathsf{expm1}\left(\mathsf{log1p}\left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\right)\right)}\\
\end{array}double f(double x_re, double x_im, double y_re, double y_im) {
double r19037 = x_re;
double r19038 = r19037 * r19037;
double r19039 = x_im;
double r19040 = r19039 * r19039;
double r19041 = r19038 + r19040;
double r19042 = sqrt(r19041);
double r19043 = log(r19042);
double r19044 = y_re;
double r19045 = r19043 * r19044;
double r19046 = atan2(r19039, r19037);
double r19047 = y_im;
double r19048 = r19046 * r19047;
double r19049 = r19045 - r19048;
double r19050 = exp(r19049);
double r19051 = r19043 * r19047;
double r19052 = r19046 * r19044;
double r19053 = r19051 + r19052;
double r19054 = cos(r19053);
double r19055 = r19050 * r19054;
return r19055;
}
double f(double x_re, double x_im, double y_re, double y_im) {
double r19056 = y_re;
double r19057 = -6.384605674813404e+81;
bool r19058 = r19056 <= r19057;
double r19059 = 7.159178655710649e+162;
bool r19060 = r19056 <= r19059;
double r19061 = 2.4635477106731157e+232;
bool r19062 = r19056 <= r19061;
double r19063 = !r19062;
bool r19064 = r19060 || r19063;
double r19065 = !r19064;
bool r19066 = r19058 || r19065;
double r19067 = cbrt(r19056);
double r19068 = r19067 * r19067;
double r19069 = 1.0;
double r19070 = x_re;
double r19071 = x_im;
double r19072 = hypot(r19070, r19071);
double r19073 = log(r19072);
double r19074 = r19069 * r19073;
double r19075 = r19068 * r19074;
double r19076 = r19075 * r19067;
double r19077 = 0.0;
double r19078 = r19076 - r19077;
double r19079 = exp(r19078);
double r19080 = atan2(r19071, r19070);
double r19081 = y_im;
double r19082 = r19080 * r19081;
double r19083 = log1p(r19082);
double r19084 = expm1(r19083);
double r19085 = r19076 - r19084;
double r19086 = exp(r19085);
double r19087 = r19066 ? r19079 : r19086;
return r19087;
}



Bits error versus x.re



Bits error versus x.im



Bits error versus y.re



Bits error versus y.im
Results
if y.re < -6.384605674813404e+81 or 7.159178655710649e+162 < y.re < 2.4635477106731157e+232Initial program 34.9
Taylor expanded around 0 1.0
rmApplied add-cube-cbrt1.0
Applied associate-*r*1.0
Simplified0
rmApplied expm1-log1p-u9.5
Taylor expanded around inf 2.9
if -6.384605674813404e+81 < y.re < 7.159178655710649e+162 or 2.4635477106731157e+232 < y.re Initial program 32.2
Taylor expanded around 0 25.0
rmApplied add-cube-cbrt25.0
Applied associate-*r*25.0
Simplified5.5
rmApplied expm1-log1p-u6.5
Final simplification5.6
herbie shell --seed 2020021 +o rules:numerics
(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)))))