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(e^{\log \left(\mathsf{hypot}\left(x.re, x.im\right)\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 r14859 = x_re;
double r14860 = r14859 * r14859;
double r14861 = x_im;
double r14862 = r14861 * r14861;
double r14863 = r14860 + r14862;
double r14864 = sqrt(r14863);
double r14865 = log(r14864);
double r14866 = y_re;
double r14867 = r14865 * r14866;
double r14868 = atan2(r14861, r14859);
double r14869 = y_im;
double r14870 = r14868 * r14869;
double r14871 = r14867 - r14870;
double r14872 = exp(r14871);
double r14873 = r14865 * r14869;
double r14874 = r14868 * r14866;
double r14875 = r14873 + r14874;
double r14876 = sin(r14875);
double r14877 = r14872 * r14876;
return r14877;
}
double f(double x_re, double x_im, double y_re, double y_im) {
double r14878 = x_re;
double r14879 = x_im;
double r14880 = hypot(r14878, r14879);
double r14881 = log(r14880);
double r14882 = exp(r14881);
double r14883 = log(r14882);
double r14884 = y_re;
double r14885 = r14883 * r14884;
double r14886 = atan2(r14879, r14878);
double r14887 = cbrt(r14886);
double r14888 = r14887 * r14887;
double r14889 = cbrt(r14887);
double r14890 = r14889 * r14889;
double r14891 = r14890 * r14889;
double r14892 = y_im;
double r14893 = r14891 * r14892;
double r14894 = r14888 * r14893;
double r14895 = r14885 - r14894;
double r14896 = exp(r14895);
double r14897 = r14881 * r14892;
double r14898 = r14886 * r14884;
double r14899 = r14897 + r14898;
double r14900 = sin(r14899);
double r14901 = r14896 * r14900;
return r14901;
}



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 add-exp-log19.7
Simplified3.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)))))