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)e^{\left(y.re \cdot \log \left(\sqrt[3]{\mathsf{hypot}\left(x.re, x.im\right)}\right) + \log \left(\sqrt[3]{\mathsf{hypot}\left(x.re, x.im\right)} \cdot \sqrt[3]{\mathsf{hypot}\left(x.re, x.im\right)}\right) \cdot y.re\right) - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \mathsf{log1p}\left(\mathsf{expm1}\left(\cos \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, \sqrt[3]{\tan^{-1}_* \frac{x.im}{x.re}} \cdot \left(\left(\sqrt[3]{\tan^{-1}_* \frac{x.im}{x.re}} \cdot \sqrt[3]{\tan^{-1}_* \frac{x.im}{x.re}}\right) \cdot y.re\right)\right)\right)\right)\right)double f(double x_re, double x_im, double y_re, double y_im) {
double r741268 = x_re;
double r741269 = r741268 * r741268;
double r741270 = x_im;
double r741271 = r741270 * r741270;
double r741272 = r741269 + r741271;
double r741273 = sqrt(r741272);
double r741274 = log(r741273);
double r741275 = y_re;
double r741276 = r741274 * r741275;
double r741277 = atan2(r741270, r741268);
double r741278 = y_im;
double r741279 = r741277 * r741278;
double r741280 = r741276 - r741279;
double r741281 = exp(r741280);
double r741282 = r741274 * r741278;
double r741283 = r741277 * r741275;
double r741284 = r741282 + r741283;
double r741285 = cos(r741284);
double r741286 = r741281 * r741285;
return r741286;
}
double f(double x_re, double x_im, double y_re, double y_im) {
double r741287 = y_re;
double r741288 = x_re;
double r741289 = x_im;
double r741290 = hypot(r741288, r741289);
double r741291 = cbrt(r741290);
double r741292 = log(r741291);
double r741293 = r741287 * r741292;
double r741294 = r741291 * r741291;
double r741295 = log(r741294);
double r741296 = r741295 * r741287;
double r741297 = r741293 + r741296;
double r741298 = atan2(r741289, r741288);
double r741299 = y_im;
double r741300 = r741298 * r741299;
double r741301 = r741297 - r741300;
double r741302 = exp(r741301);
double r741303 = log(r741290);
double r741304 = cbrt(r741298);
double r741305 = r741304 * r741304;
double r741306 = r741305 * r741287;
double r741307 = r741304 * r741306;
double r741308 = fma(r741303, r741299, r741307);
double r741309 = cos(r741308);
double r741310 = expm1(r741309);
double r741311 = log1p(r741310);
double r741312 = r741302 * r741311;
return r741312;
}



Bits error versus x.re



Bits error versus x.im



Bits error versus y.re



Bits error versus y.im
Initial program 32.5
Simplified3.4
rmApplied add-cube-cbrt3.4
Applied log-prod3.4
Applied distribute-rgt-in3.4
rmApplied add-cube-cbrt3.4
Applied associate-*r*3.4
rmApplied log1p-expm1-u3.4
Simplified3.4
rmApplied add-cube-cbrt3.4
Applied associate-*r*3.4
Final simplification3.4
herbie shell --seed 2019152 +o rules:numerics
(FPCore (x.re x.im y.re y.im)
:name "powComplex, real part"
(* (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)))))