\frac{x.re \cdot y.re + x.im \cdot y.im}{y.re \cdot y.re + y.im \cdot y.im}\begin{array}{l}
\mathbf{if}\;y.re \le -3.77697139995080395 \cdot 10^{155}:\\
\;\;\;\;\frac{-1 \cdot x.re}{\mathsf{hypot}\left(y.re, y.im\right) \cdot 1}\\
\mathbf{elif}\;y.re \le 3.559188999299462 \cdot 10^{84}:\\
\;\;\;\;\frac{\frac{\mathsf{fma}\left(x.re, y.re, x.im \cdot y.im\right)}{\mathsf{hypot}\left(y.re, y.im\right)}}{\mathsf{hypot}\left(y.re, y.im\right) \cdot 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{x.re}{\mathsf{hypot}\left(y.re, y.im\right) \cdot 1}\\
\end{array}double f(double x_re, double x_im, double y_re, double y_im) {
double r57202 = x_re;
double r57203 = y_re;
double r57204 = r57202 * r57203;
double r57205 = x_im;
double r57206 = y_im;
double r57207 = r57205 * r57206;
double r57208 = r57204 + r57207;
double r57209 = r57203 * r57203;
double r57210 = r57206 * r57206;
double r57211 = r57209 + r57210;
double r57212 = r57208 / r57211;
return r57212;
}
double f(double x_re, double x_im, double y_re, double y_im) {
double r57213 = y_re;
double r57214 = -3.776971399950804e+155;
bool r57215 = r57213 <= r57214;
double r57216 = -1.0;
double r57217 = x_re;
double r57218 = r57216 * r57217;
double r57219 = y_im;
double r57220 = hypot(r57213, r57219);
double r57221 = 1.0;
double r57222 = r57220 * r57221;
double r57223 = r57218 / r57222;
double r57224 = 3.559188999299462e+84;
bool r57225 = r57213 <= r57224;
double r57226 = x_im;
double r57227 = r57226 * r57219;
double r57228 = fma(r57217, r57213, r57227);
double r57229 = r57228 / r57220;
double r57230 = r57229 / r57222;
double r57231 = r57217 / r57222;
double r57232 = r57225 ? r57230 : r57231;
double r57233 = r57215 ? r57223 : r57232;
return r57233;
}



Bits error versus x.re



Bits error versus x.im



Bits error versus y.re



Bits error versus y.im
if y.re < -3.776971399950804e+155Initial program 45.9
rmApplied add-sqr-sqrt45.9
Applied *-un-lft-identity45.9
Applied times-frac45.9
Simplified45.9
Simplified28.9
rmApplied associate-*r/28.9
Simplified28.9
Taylor expanded around -inf 14.2
if -3.776971399950804e+155 < y.re < 3.559188999299462e+84Initial program 18.7
rmApplied add-sqr-sqrt18.7
Applied *-un-lft-identity18.7
Applied times-frac18.7
Simplified18.7
Simplified11.7
rmApplied associate-*r/11.7
Simplified11.6
if 3.559188999299462e+84 < y.re Initial program 39.4
rmApplied add-sqr-sqrt39.4
Applied *-un-lft-identity39.4
Applied times-frac39.4
Simplified39.4
Simplified26.8
rmApplied associate-*r/26.8
Simplified26.8
Taylor expanded around inf 17.6
Final simplification13.1
herbie shell --seed 2020056 +o rules:numerics
(FPCore (x.re x.im y.re y.im)
:name "_divideComplex, real part"
:precision binary64
(/ (+ (* x.re y.re) (* x.im y.im)) (+ (* y.re y.re) (* y.im y.im))))