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 - \left(\sqrt[3]{\tan^{-1}_* \frac{x.im}{x.re}} \cdot \sqrt[3]{\tan^{-1}_* \frac{x.im}{x.re}}\right) \cdot \left(\left(\left(\sqrt[3]{\sqrt[3]{\tan^{-1}_* \frac{x.im}{x.re}}} \cdot \sqrt[3]{\sqrt[3]{\tan^{-1}_* \frac{x.im}{x.re}}}\right) \cdot \sqrt[3]{\sqrt[3]{\tan^{-1}_* \frac{x.im}{x.re}}}\right) \cdot y.im\right)} \cdot \sin \left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im + \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 r14816 = x_re;
double r14817 = r14816 * r14816;
double r14818 = x_im;
double r14819 = r14818 * r14818;
double r14820 = r14817 + r14819;
double r14821 = sqrt(r14820);
double r14822 = log(r14821);
double r14823 = y_re;
double r14824 = r14822 * r14823;
double r14825 = atan2(r14818, r14816);
double r14826 = y_im;
double r14827 = r14825 * r14826;
double r14828 = r14824 - r14827;
double r14829 = exp(r14828);
double r14830 = r14822 * r14826;
double r14831 = r14825 * r14823;
double r14832 = r14830 + r14831;
double r14833 = sin(r14832);
double r14834 = r14829 * r14833;
return r14834;
}
double f(double x_re, double x_im, double y_re, double y_im) {
double r14835 = x_re;
double r14836 = x_im;
double r14837 = hypot(r14835, r14836);
double r14838 = log(r14837);
double r14839 = y_re;
double r14840 = r14838 * r14839;
double r14841 = atan2(r14836, r14835);
double r14842 = cbrt(r14841);
double r14843 = r14842 * r14842;
double r14844 = cbrt(r14842);
double r14845 = r14844 * r14844;
double r14846 = r14845 * r14844;
double r14847 = y_im;
double r14848 = r14846 * r14847;
double r14849 = r14843 * r14848;
double r14850 = r14840 - r14849;
double r14851 = exp(r14850);
double r14852 = r14838 * r14847;
double r14853 = r14841 * r14839;
double r14854 = r14852 + r14853;
double r14855 = sin(r14854);
double r14856 = r14851 * r14855;
return r14856;
}



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 hypot-def19.7
rmApplied hypot-def3.6
rmApplied add-cube-cbrt3.6
Applied associate-*l*3.6
rmApplied add-cube-cbrt3.6
Final simplification3.6
herbie shell --seed 2020036 +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)))))