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^{\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(\left(\sqrt[3]{\log \left(1 \cdot \mathsf{hypot}\left(x.re, x.im\right)\right)} \cdot \sqrt[3]{\log \left(1 \cdot \mathsf{hypot}\left(x.re, x.im\right)\right)}\right) \cdot \left(\left(\sqrt[3]{\sqrt[3]{\log \left(1 \cdot \mathsf{hypot}\left(x.re, x.im\right)\right)} \cdot \sqrt[3]{\log \left(1 \cdot \mathsf{hypot}\left(x.re, x.im\right)\right)}} \cdot \sqrt[3]{\sqrt[3]{\log \left(1 \cdot \mathsf{hypot}\left(x.re, x.im\right)\right)}}\right) \cdot y.im\right) + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)double f(double x_re, double x_im, double y_re, double y_im) {
double r15919 = x_re;
double r15920 = r15919 * r15919;
double r15921 = x_im;
double r15922 = r15921 * r15921;
double r15923 = r15920 + r15922;
double r15924 = sqrt(r15923);
double r15925 = log(r15924);
double r15926 = y_re;
double r15927 = r15925 * r15926;
double r15928 = atan2(r15921, r15919);
double r15929 = y_im;
double r15930 = r15928 * r15929;
double r15931 = r15927 - r15930;
double r15932 = exp(r15931);
double r15933 = r15925 * r15929;
double r15934 = r15928 * r15926;
double r15935 = r15933 + r15934;
double r15936 = sin(r15935);
double r15937 = r15932 * r15936;
return r15937;
}
double f(double x_re, double x_im, double y_re, double y_im) {
double r15938 = x_re;
double r15939 = x_im;
double r15940 = hypot(r15938, r15939);
double r15941 = log(r15940);
double r15942 = y_re;
double r15943 = r15941 * r15942;
double r15944 = atan2(r15939, r15938);
double r15945 = y_im;
double r15946 = r15944 * r15945;
double r15947 = r15943 - r15946;
double r15948 = exp(r15947);
double r15949 = 1.0;
double r15950 = r15949 * r15940;
double r15951 = log(r15950);
double r15952 = cbrt(r15951);
double r15953 = r15952 * r15952;
double r15954 = cbrt(r15953);
double r15955 = cbrt(r15952);
double r15956 = r15954 * r15955;
double r15957 = r15956 * r15945;
double r15958 = r15953 * r15957;
double r15959 = r15944 * r15942;
double r15960 = r15958 + r15959;
double r15961 = sin(r15960);
double r15962 = r15948 * r15961;
return r15962;
}



Bits error versus x.re



Bits error versus x.im



Bits error versus y.re



Bits error versus y.im
Results
Initial program 32.9
rmApplied *-un-lft-identity32.9
Applied sqrt-prod32.9
Simplified32.9
Simplified19.3
rmApplied hypot-def3.3
rmApplied add-cube-cbrt3.5
Applied associate-*l*3.6
rmApplied add-cube-cbrt3.6
Applied cbrt-prod3.6
Final simplification3.6
herbie shell --seed 2020034 +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)))))