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 \sin \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(\sqrt[3]{\log \left(1 \cdot \mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.re} \cdot \sqrt[3]{\log \left(1 \cdot \mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.re}\right) \cdot \sqrt[3]{\log \left(1 \cdot \mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.re} - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \mathsf{log1p}\left(\mathsf{expm1}\left(\sin \left(\log \left(1 \cdot \mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\right)\right)double f(double x_re, double x_im, double y_re, double y_im) {
double r18630 = x_re;
double r18631 = r18630 * r18630;
double r18632 = x_im;
double r18633 = r18632 * r18632;
double r18634 = r18631 + r18633;
double r18635 = sqrt(r18634);
double r18636 = log(r18635);
double r18637 = y_re;
double r18638 = r18636 * r18637;
double r18639 = atan2(r18632, r18630);
double r18640 = y_im;
double r18641 = r18639 * r18640;
double r18642 = r18638 - r18641;
double r18643 = exp(r18642);
double r18644 = r18636 * r18640;
double r18645 = r18639 * r18637;
double r18646 = r18644 + r18645;
double r18647 = sin(r18646);
double r18648 = r18643 * r18647;
return r18648;
}
double f(double x_re, double x_im, double y_re, double y_im) {
double r18649 = 1.0;
double r18650 = x_re;
double r18651 = x_im;
double r18652 = hypot(r18650, r18651);
double r18653 = r18649 * r18652;
double r18654 = log(r18653);
double r18655 = y_re;
double r18656 = r18654 * r18655;
double r18657 = cbrt(r18656);
double r18658 = r18657 * r18657;
double r18659 = r18658 * r18657;
double r18660 = atan2(r18651, r18650);
double r18661 = y_im;
double r18662 = r18660 * r18661;
double r18663 = r18659 - r18662;
double r18664 = exp(r18663);
double r18665 = r18654 * r18661;
double r18666 = r18660 * r18655;
double r18667 = r18665 + r18666;
double r18668 = sin(r18667);
double r18669 = expm1(r18668);
double r18670 = log1p(r18669);
double r18671 = r18664 * r18670;
return r18671;
}



Bits error versus x.re



Bits error versus x.im



Bits error versus y.re



Bits error versus y.im
Results
Initial program 33.3
rmApplied *-un-lft-identity33.3
Applied sqrt-prod33.3
Simplified33.3
Simplified19.2
rmApplied *-un-lft-identity19.2
Applied sqrt-prod19.2
Simplified19.2
Simplified3.0
rmApplied add-cube-cbrt3.0
rmApplied log1p-expm1-u3.0
Final simplification3.0
herbie shell --seed 2020047 +o rules:numerics
(FPCore (x.re x.im y.re y.im)
:name "powComplex, imaginary part"
:precision binary64
(* (exp (- (* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.re) (* (atan2 x.im x.re) y.im))) (sin (+ (* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.im) (* (atan2 x.im x.re) y.re)))))