\frac{x.re \cdot y.re + x.im \cdot y.im}{y.re \cdot y.re + y.im \cdot y.im}-\frac{\frac{\mathsf{fma}\left(y.re, x.re, \left(y.im \cdot x.im\right)\right)}{\mathsf{hypot}\left(y.im, y.re\right)}}{-\mathsf{hypot}\left(y.im, y.re\right)}double f(double x_re, double x_im, double y_re, double y_im) {
double r2179560 = x_re;
double r2179561 = y_re;
double r2179562 = r2179560 * r2179561;
double r2179563 = x_im;
double r2179564 = y_im;
double r2179565 = r2179563 * r2179564;
double r2179566 = r2179562 + r2179565;
double r2179567 = r2179561 * r2179561;
double r2179568 = r2179564 * r2179564;
double r2179569 = r2179567 + r2179568;
double r2179570 = r2179566 / r2179569;
return r2179570;
}
double f(double x_re, double x_im, double y_re, double y_im) {
double r2179571 = y_re;
double r2179572 = x_re;
double r2179573 = y_im;
double r2179574 = x_im;
double r2179575 = r2179573 * r2179574;
double r2179576 = fma(r2179571, r2179572, r2179575);
double r2179577 = hypot(r2179573, r2179571);
double r2179578 = r2179576 / r2179577;
double r2179579 = -r2179577;
double r2179580 = r2179578 / r2179579;
double r2179581 = -r2179580;
return r2179581;
}



Bits error versus x.re



Bits error versus x.im



Bits error versus y.re



Bits error versus y.im
Initial program 25.9
Simplified25.9
rmApplied add-sqr-sqrt25.9
Applied associate-/r*25.8
rmApplied div-inv25.9
rmApplied fma-udef25.9
Applied hypot-def25.9
rmApplied frac-2neg25.9
Simplified25.8
Simplified16.7
Final simplification16.7
herbie shell --seed 2019129 +o rules:numerics
(FPCore (x.re x.im y.re y.im)
:name "_divideComplex, real part"
(/ (+ (* x.re y.re) (* x.im y.im)) (+ (* y.re y.re) (* y.im y.im))))