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)\frac{\cos \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \cdot \sin \left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im\right) + \sin \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \cdot \cos \left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im\right)}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im - \sqrt[3]{\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.re} \cdot \left(\sqrt[3]{\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.re} \cdot \sqrt[3]{\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.re}\right)}}double f(double x_re, double x_im, double y_re, double y_im) {
double r1102839 = x_re;
double r1102840 = r1102839 * r1102839;
double r1102841 = x_im;
double r1102842 = r1102841 * r1102841;
double r1102843 = r1102840 + r1102842;
double r1102844 = sqrt(r1102843);
double r1102845 = log(r1102844);
double r1102846 = y_re;
double r1102847 = r1102845 * r1102846;
double r1102848 = atan2(r1102841, r1102839);
double r1102849 = y_im;
double r1102850 = r1102848 * r1102849;
double r1102851 = r1102847 - r1102850;
double r1102852 = exp(r1102851);
double r1102853 = r1102845 * r1102849;
double r1102854 = r1102848 * r1102846;
double r1102855 = r1102853 + r1102854;
double r1102856 = sin(r1102855);
double r1102857 = r1102852 * r1102856;
return r1102857;
}
double f(double x_re, double x_im, double y_re, double y_im) {
double r1102858 = x_im;
double r1102859 = x_re;
double r1102860 = atan2(r1102858, r1102859);
double r1102861 = y_re;
double r1102862 = r1102860 * r1102861;
double r1102863 = cos(r1102862);
double r1102864 = hypot(r1102859, r1102858);
double r1102865 = log(r1102864);
double r1102866 = y_im;
double r1102867 = r1102865 * r1102866;
double r1102868 = sin(r1102867);
double r1102869 = r1102863 * r1102868;
double r1102870 = sin(r1102862);
double r1102871 = cos(r1102867);
double r1102872 = r1102870 * r1102871;
double r1102873 = r1102869 + r1102872;
double r1102874 = r1102860 * r1102866;
double r1102875 = r1102865 * r1102861;
double r1102876 = cbrt(r1102875);
double r1102877 = r1102876 * r1102876;
double r1102878 = r1102876 * r1102877;
double r1102879 = r1102874 - r1102878;
double r1102880 = exp(r1102879);
double r1102881 = r1102873 / r1102880;
return r1102881;
}



Bits error versus x.re



Bits error versus x.im



Bits error versus y.re



Bits error versus y.im
Results
Initial program 32.5
Simplified3.5
rmApplied add-cube-cbrt3.5
rmApplied fma-udef3.5
Applied sin-sum3.5
Final simplification3.5
herbie shell --seed 2019162 +o rules:numerics
(FPCore (x.re x.im y.re y.im)
:name "powComplex, imaginary part"
(* (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)))))