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(1 \cdot \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(\sqrt[3]{\tan^{-1}_* \frac{x.im}{x.re}} \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 r15161 = x_re;
double r15162 = r15161 * r15161;
double r15163 = x_im;
double r15164 = r15163 * r15163;
double r15165 = r15162 + r15164;
double r15166 = sqrt(r15165);
double r15167 = log(r15166);
double r15168 = y_re;
double r15169 = r15167 * r15168;
double r15170 = atan2(r15163, r15161);
double r15171 = y_im;
double r15172 = r15170 * r15171;
double r15173 = r15169 - r15172;
double r15174 = exp(r15173);
double r15175 = r15167 * r15171;
double r15176 = r15170 * r15168;
double r15177 = r15175 + r15176;
double r15178 = sin(r15177);
double r15179 = r15174 * r15178;
return r15179;
}
double f(double x_re, double x_im, double y_re, double y_im) {
double r15180 = 1.0;
double r15181 = x_re;
double r15182 = x_im;
double r15183 = hypot(r15181, r15182);
double r15184 = r15180 * r15183;
double r15185 = log(r15184);
double r15186 = y_re;
double r15187 = r15185 * r15186;
double r15188 = atan2(r15182, r15181);
double r15189 = cbrt(r15188);
double r15190 = r15189 * r15189;
double r15191 = y_im;
double r15192 = r15189 * r15191;
double r15193 = r15190 * r15192;
double r15194 = r15187 - r15193;
double r15195 = exp(r15194);
double r15196 = log(r15183);
double r15197 = r15196 * r15191;
double r15198 = r15188 * r15186;
double r15199 = r15197 + r15198;
double r15200 = sin(r15199);
double r15201 = r15195 * r15200;
return r15201;
}



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.9
rmApplied *-un-lft-identity19.9
Applied sqrt-prod19.9
Simplified19.9
Simplified3.4
rmApplied add-cube-cbrt3.4
Applied associate-*l*3.4
Final simplification3.4
herbie shell --seed 2019362 +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)))))