?

Average Error: 26.5 → 3.9
Time: 15.0s
Precision: binary64
Cost: 20616

?

\[\frac{x.re \cdot y.re + x.im \cdot y.im}{y.re \cdot y.re + y.im \cdot y.im} \]
\[\begin{array}{l} t_0 := \frac{1}{\mathsf{hypot}\left(y.re, y.im\right)}\\ t_1 := x.im \cdot \frac{y.im}{\mathsf{hypot}\left(y.re, y.im\right)}\\ \mathbf{if}\;y.re \leq -6.5 \cdot 10^{+160}:\\ \;\;\;\;\frac{x.re}{y.re} + \frac{\frac{y.im}{\frac{y.re}{x.im}}}{y.re}\\ \mathbf{elif}\;y.re \leq 1.62 \cdot 10^{+72}:\\ \;\;\;\;t_0 \cdot \left(t_1 + \frac{y.re \cdot x.re}{\mathsf{hypot}\left(y.re, y.im\right)}\right)\\ \mathbf{else}:\\ \;\;\;\;t_0 \cdot \left(x.re + t_1\right)\\ \end{array} \]
(FPCore (x.re x.im y.re y.im)
 :precision binary64
 (/ (+ (* x.re y.re) (* x.im y.im)) (+ (* y.re y.re) (* y.im y.im))))
(FPCore (x.re x.im y.re y.im)
 :precision binary64
 (let* ((t_0 (/ 1.0 (hypot y.re y.im)))
        (t_1 (* x.im (/ y.im (hypot y.re y.im)))))
   (if (<= y.re -6.5e+160)
     (+ (/ x.re y.re) (/ (/ y.im (/ y.re x.im)) y.re))
     (if (<= y.re 1.62e+72)
       (* t_0 (+ t_1 (/ (* y.re x.re) (hypot y.re y.im))))
       (* t_0 (+ x.re t_1))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
	return ((x_46_re * y_46_re) + (x_46_im * y_46_im)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im));
}
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
	double t_0 = 1.0 / hypot(y_46_re, y_46_im);
	double t_1 = x_46_im * (y_46_im / hypot(y_46_re, y_46_im));
	double tmp;
	if (y_46_re <= -6.5e+160) {
		tmp = (x_46_re / y_46_re) + ((y_46_im / (y_46_re / x_46_im)) / y_46_re);
	} else if (y_46_re <= 1.62e+72) {
		tmp = t_0 * (t_1 + ((y_46_re * x_46_re) / hypot(y_46_re, y_46_im)));
	} else {
		tmp = t_0 * (x_46_re + t_1);
	}
	return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
	return ((x_46_re * y_46_re) + (x_46_im * y_46_im)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im));
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
	double t_0 = 1.0 / Math.hypot(y_46_re, y_46_im);
	double t_1 = x_46_im * (y_46_im / Math.hypot(y_46_re, y_46_im));
	double tmp;
	if (y_46_re <= -6.5e+160) {
		tmp = (x_46_re / y_46_re) + ((y_46_im / (y_46_re / x_46_im)) / y_46_re);
	} else if (y_46_re <= 1.62e+72) {
		tmp = t_0 * (t_1 + ((y_46_re * x_46_re) / Math.hypot(y_46_re, y_46_im)));
	} else {
		tmp = t_0 * (x_46_re + t_1);
	}
	return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im):
	return ((x_46_re * y_46_re) + (x_46_im * y_46_im)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im))
def code(x_46_re, x_46_im, y_46_re, y_46_im):
	t_0 = 1.0 / math.hypot(y_46_re, y_46_im)
	t_1 = x_46_im * (y_46_im / math.hypot(y_46_re, y_46_im))
	tmp = 0
	if y_46_re <= -6.5e+160:
		tmp = (x_46_re / y_46_re) + ((y_46_im / (y_46_re / x_46_im)) / y_46_re)
	elif y_46_re <= 1.62e+72:
		tmp = t_0 * (t_1 + ((y_46_re * x_46_re) / math.hypot(y_46_re, y_46_im)))
	else:
		tmp = t_0 * (x_46_re + t_1)
	return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im)
	return Float64(Float64(Float64(x_46_re * y_46_re) + Float64(x_46_im * y_46_im)) / Float64(Float64(y_46_re * y_46_re) + Float64(y_46_im * y_46_im)))
end
function code(x_46_re, x_46_im, y_46_re, y_46_im)
	t_0 = Float64(1.0 / hypot(y_46_re, y_46_im))
	t_1 = Float64(x_46_im * Float64(y_46_im / hypot(y_46_re, y_46_im)))
	tmp = 0.0
	if (y_46_re <= -6.5e+160)
		tmp = Float64(Float64(x_46_re / y_46_re) + Float64(Float64(y_46_im / Float64(y_46_re / x_46_im)) / y_46_re));
	elseif (y_46_re <= 1.62e+72)
		tmp = Float64(t_0 * Float64(t_1 + Float64(Float64(y_46_re * x_46_re) / hypot(y_46_re, y_46_im))));
	else
		tmp = Float64(t_0 * Float64(x_46_re + t_1));
	end
	return tmp
end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im)
	tmp = ((x_46_re * y_46_re) + (x_46_im * y_46_im)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im));
end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im)
	t_0 = 1.0 / hypot(y_46_re, y_46_im);
	t_1 = x_46_im * (y_46_im / hypot(y_46_re, y_46_im));
	tmp = 0.0;
	if (y_46_re <= -6.5e+160)
		tmp = (x_46_re / y_46_re) + ((y_46_im / (y_46_re / x_46_im)) / y_46_re);
	elseif (y_46_re <= 1.62e+72)
		tmp = t_0 * (t_1 + ((y_46_re * x_46_re) / hypot(y_46_re, y_46_im)));
	else
		tmp = t_0 * (x_46_re + t_1);
	end
	tmp_2 = tmp;
end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[(N[(N[(x$46$re * y$46$re), $MachinePrecision] + N[(x$46$im * y$46$im), $MachinePrecision]), $MachinePrecision] / N[(N[(y$46$re * y$46$re), $MachinePrecision] + N[(y$46$im * y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(1.0 / N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x$46$im * N[(y$46$im / N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -6.5e+160], N[(N[(x$46$re / y$46$re), $MachinePrecision] + N[(N[(y$46$im / N[(y$46$re / x$46$im), $MachinePrecision]), $MachinePrecision] / y$46$re), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 1.62e+72], N[(t$95$0 * N[(t$95$1 + N[(N[(y$46$re * x$46$re), $MachinePrecision] / N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[(x$46$re + t$95$1), $MachinePrecision]), $MachinePrecision]]]]]
\frac{x.re \cdot y.re + x.im \cdot y.im}{y.re \cdot y.re + y.im \cdot y.im}
\begin{array}{l}
t_0 := \frac{1}{\mathsf{hypot}\left(y.re, y.im\right)}\\
t_1 := x.im \cdot \frac{y.im}{\mathsf{hypot}\left(y.re, y.im\right)}\\
\mathbf{if}\;y.re \leq -6.5 \cdot 10^{+160}:\\
\;\;\;\;\frac{x.re}{y.re} + \frac{\frac{y.im}{\frac{y.re}{x.im}}}{y.re}\\

\mathbf{elif}\;y.re \leq 1.62 \cdot 10^{+72}:\\
\;\;\;\;t_0 \cdot \left(t_1 + \frac{y.re \cdot x.re}{\mathsf{hypot}\left(y.re, y.im\right)}\right)\\

\mathbf{else}:\\
\;\;\;\;t_0 \cdot \left(x.re + t_1\right)\\


\end{array}

Error?

Try it out?

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation?

  1. Split input into 3 regimes
  2. if y.re < -6.4999999999999995e160

    1. Initial program 46.4

      \[\frac{x.re \cdot y.re + x.im \cdot y.im}{y.re \cdot y.re + y.im \cdot y.im} \]
    2. Applied egg-rr30.3

      \[\leadsto \color{blue}{\frac{1}{\mathsf{hypot}\left(y.re, y.im\right)} \cdot \frac{\mathsf{fma}\left(x.re, y.re, x.im \cdot y.im\right)}{\mathsf{hypot}\left(y.re, y.im\right)}} \]
    3. Applied egg-rr30.3

      \[\leadsto \frac{1}{\mathsf{hypot}\left(y.re, y.im\right)} \cdot \color{blue}{\left(\frac{x.re \cdot y.re}{\mathsf{hypot}\left(y.re, y.im\right)} + \frac{x.im \cdot y.im}{\mathsf{hypot}\left(y.re, y.im\right)}\right)} \]
    4. Simplified25.1

      \[\leadsto \frac{1}{\mathsf{hypot}\left(y.re, y.im\right)} \cdot \color{blue}{\left(\frac{x.im}{\frac{\mathsf{hypot}\left(y.re, y.im\right)}{y.im}} + \frac{y.re \cdot x.re}{\mathsf{hypot}\left(y.re, y.im\right)}\right)} \]
      Proof

      [Start]30.3

      \[ \frac{1}{\mathsf{hypot}\left(y.re, y.im\right)} \cdot \left(\frac{x.re \cdot y.re}{\mathsf{hypot}\left(y.re, y.im\right)} + \frac{x.im \cdot y.im}{\mathsf{hypot}\left(y.re, y.im\right)}\right) \]

      +-commutative [<=]30.3

      \[ \frac{1}{\mathsf{hypot}\left(y.re, y.im\right)} \cdot \color{blue}{\left(\frac{x.im \cdot y.im}{\mathsf{hypot}\left(y.re, y.im\right)} + \frac{x.re \cdot y.re}{\mathsf{hypot}\left(y.re, y.im\right)}\right)} \]

      associate-/l* [=>]25.1

      \[ \frac{1}{\mathsf{hypot}\left(y.re, y.im\right)} \cdot \left(\color{blue}{\frac{x.im}{\frac{\mathsf{hypot}\left(y.re, y.im\right)}{y.im}}} + \frac{x.re \cdot y.re}{\mathsf{hypot}\left(y.re, y.im\right)}\right) \]

      *-commutative [=>]25.1

      \[ \frac{1}{\mathsf{hypot}\left(y.re, y.im\right)} \cdot \left(\frac{x.im}{\frac{\mathsf{hypot}\left(y.re, y.im\right)}{y.im}} + \frac{\color{blue}{y.re \cdot x.re}}{\mathsf{hypot}\left(y.re, y.im\right)}\right) \]
    5. Taylor expanded in y.re around inf 14.6

      \[\leadsto \color{blue}{\frac{x.re}{y.re} + \frac{y.im \cdot x.im}{{y.re}^{2}}} \]
    6. Simplified5.6

      \[\leadsto \color{blue}{\frac{x.re}{y.re} + \frac{\frac{y.im}{\frac{y.re}{x.im}}}{y.re}} \]
      Proof

      [Start]14.6

      \[ \frac{x.re}{y.re} + \frac{y.im \cdot x.im}{{y.re}^{2}} \]

      *-commutative [=>]14.6

      \[ \frac{x.re}{y.re} + \frac{\color{blue}{x.im \cdot y.im}}{{y.re}^{2}} \]

      unpow2 [=>]14.6

      \[ \frac{x.re}{y.re} + \frac{x.im \cdot y.im}{\color{blue}{y.re \cdot y.re}} \]

      associate-/r* [=>]10.9

      \[ \frac{x.re}{y.re} + \color{blue}{\frac{\frac{x.im \cdot y.im}{y.re}}{y.re}} \]

      *-commutative [<=]10.9

      \[ \frac{x.re}{y.re} + \frac{\frac{\color{blue}{y.im \cdot x.im}}{y.re}}{y.re} \]

      associate-/l* [=>]5.6

      \[ \frac{x.re}{y.re} + \frac{\color{blue}{\frac{y.im}{\frac{y.re}{x.im}}}}{y.re} \]

    if -6.4999999999999995e160 < y.re < 1.62000000000000008e72

    1. Initial program 19.5

      \[\frac{x.re \cdot y.re + x.im \cdot y.im}{y.re \cdot y.re + y.im \cdot y.im} \]
    2. Applied egg-rr12.1

      \[\leadsto \color{blue}{\frac{1}{\mathsf{hypot}\left(y.re, y.im\right)} \cdot \frac{\mathsf{fma}\left(x.re, y.re, x.im \cdot y.im\right)}{\mathsf{hypot}\left(y.re, y.im\right)}} \]
    3. Applied egg-rr12.1

      \[\leadsto \frac{1}{\mathsf{hypot}\left(y.re, y.im\right)} \cdot \color{blue}{\left(\frac{x.re \cdot y.re}{\mathsf{hypot}\left(y.re, y.im\right)} + \frac{x.im \cdot y.im}{\mathsf{hypot}\left(y.re, y.im\right)}\right)} \]
    4. Simplified3.3

      \[\leadsto \frac{1}{\mathsf{hypot}\left(y.re, y.im\right)} \cdot \color{blue}{\left(\frac{x.im}{\frac{\mathsf{hypot}\left(y.re, y.im\right)}{y.im}} + \frac{y.re \cdot x.re}{\mathsf{hypot}\left(y.re, y.im\right)}\right)} \]
      Proof

      [Start]12.1

      \[ \frac{1}{\mathsf{hypot}\left(y.re, y.im\right)} \cdot \left(\frac{x.re \cdot y.re}{\mathsf{hypot}\left(y.re, y.im\right)} + \frac{x.im \cdot y.im}{\mathsf{hypot}\left(y.re, y.im\right)}\right) \]

      +-commutative [<=]12.1

      \[ \frac{1}{\mathsf{hypot}\left(y.re, y.im\right)} \cdot \color{blue}{\left(\frac{x.im \cdot y.im}{\mathsf{hypot}\left(y.re, y.im\right)} + \frac{x.re \cdot y.re}{\mathsf{hypot}\left(y.re, y.im\right)}\right)} \]

      associate-/l* [=>]3.3

      \[ \frac{1}{\mathsf{hypot}\left(y.re, y.im\right)} \cdot \left(\color{blue}{\frac{x.im}{\frac{\mathsf{hypot}\left(y.re, y.im\right)}{y.im}}} + \frac{x.re \cdot y.re}{\mathsf{hypot}\left(y.re, y.im\right)}\right) \]

      *-commutative [=>]3.3

      \[ \frac{1}{\mathsf{hypot}\left(y.re, y.im\right)} \cdot \left(\frac{x.im}{\frac{\mathsf{hypot}\left(y.re, y.im\right)}{y.im}} + \frac{\color{blue}{y.re \cdot x.re}}{\mathsf{hypot}\left(y.re, y.im\right)}\right) \]
    5. Applied egg-rr3.3

      \[\leadsto \frac{1}{\mathsf{hypot}\left(y.re, y.im\right)} \cdot \left(\color{blue}{\frac{y.im}{\mathsf{hypot}\left(y.re, y.im\right)} \cdot x.im} + \frac{y.re \cdot x.re}{\mathsf{hypot}\left(y.re, y.im\right)}\right) \]

    if 1.62000000000000008e72 < y.re

    1. Initial program 37.0

      \[\frac{x.re \cdot y.re + x.im \cdot y.im}{y.re \cdot y.re + y.im \cdot y.im} \]
    2. Applied egg-rr25.2

      \[\leadsto \color{blue}{\frac{1}{\mathsf{hypot}\left(y.re, y.im\right)} \cdot \frac{\mathsf{fma}\left(x.re, y.re, x.im \cdot y.im\right)}{\mathsf{hypot}\left(y.re, y.im\right)}} \]
    3. Applied egg-rr25.2

      \[\leadsto \frac{1}{\mathsf{hypot}\left(y.re, y.im\right)} \cdot \color{blue}{\left(\frac{x.re \cdot y.re}{\mathsf{hypot}\left(y.re, y.im\right)} + \frac{x.im \cdot y.im}{\mathsf{hypot}\left(y.re, y.im\right)}\right)} \]
    4. Simplified20.2

      \[\leadsto \frac{1}{\mathsf{hypot}\left(y.re, y.im\right)} \cdot \color{blue}{\left(\frac{x.im}{\frac{\mathsf{hypot}\left(y.re, y.im\right)}{y.im}} + \frac{y.re \cdot x.re}{\mathsf{hypot}\left(y.re, y.im\right)}\right)} \]
      Proof

      [Start]25.2

      \[ \frac{1}{\mathsf{hypot}\left(y.re, y.im\right)} \cdot \left(\frac{x.re \cdot y.re}{\mathsf{hypot}\left(y.re, y.im\right)} + \frac{x.im \cdot y.im}{\mathsf{hypot}\left(y.re, y.im\right)}\right) \]

      +-commutative [<=]25.2

      \[ \frac{1}{\mathsf{hypot}\left(y.re, y.im\right)} \cdot \color{blue}{\left(\frac{x.im \cdot y.im}{\mathsf{hypot}\left(y.re, y.im\right)} + \frac{x.re \cdot y.re}{\mathsf{hypot}\left(y.re, y.im\right)}\right)} \]

      associate-/l* [=>]20.2

      \[ \frac{1}{\mathsf{hypot}\left(y.re, y.im\right)} \cdot \left(\color{blue}{\frac{x.im}{\frac{\mathsf{hypot}\left(y.re, y.im\right)}{y.im}}} + \frac{x.re \cdot y.re}{\mathsf{hypot}\left(y.re, y.im\right)}\right) \]

      *-commutative [=>]20.2

      \[ \frac{1}{\mathsf{hypot}\left(y.re, y.im\right)} \cdot \left(\frac{x.im}{\frac{\mathsf{hypot}\left(y.re, y.im\right)}{y.im}} + \frac{\color{blue}{y.re \cdot x.re}}{\mathsf{hypot}\left(y.re, y.im\right)}\right) \]
    5. Applied egg-rr20.2

      \[\leadsto \frac{1}{\mathsf{hypot}\left(y.re, y.im\right)} \cdot \left(\color{blue}{\frac{y.im}{\mathsf{hypot}\left(y.re, y.im\right)} \cdot x.im} + \frac{y.re \cdot x.re}{\mathsf{hypot}\left(y.re, y.im\right)}\right) \]
    6. Taylor expanded in y.re around inf 5.1

      \[\leadsto \frac{1}{\mathsf{hypot}\left(y.re, y.im\right)} \cdot \left(\frac{y.im}{\mathsf{hypot}\left(y.re, y.im\right)} \cdot x.im + \color{blue}{x.re}\right) \]
  3. Recombined 3 regimes into one program.
  4. Final simplification3.9

    \[\leadsto \begin{array}{l} \mathbf{if}\;y.re \leq -6.5 \cdot 10^{+160}:\\ \;\;\;\;\frac{x.re}{y.re} + \frac{\frac{y.im}{\frac{y.re}{x.im}}}{y.re}\\ \mathbf{elif}\;y.re \leq 1.62 \cdot 10^{+72}:\\ \;\;\;\;\frac{1}{\mathsf{hypot}\left(y.re, y.im\right)} \cdot \left(x.im \cdot \frac{y.im}{\mathsf{hypot}\left(y.re, y.im\right)} + \frac{y.re \cdot x.re}{\mathsf{hypot}\left(y.re, y.im\right)}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\mathsf{hypot}\left(y.re, y.im\right)} \cdot \left(x.re + x.im \cdot \frac{y.im}{\mathsf{hypot}\left(y.re, y.im\right)}\right)\\ \end{array} \]

Alternatives

Alternative 1
Error8.7
Cost20560
\[\begin{array}{l} t_0 := \frac{1}{\mathsf{hypot}\left(y.re, y.im\right)}\\ t_1 := t_0 \cdot \frac{\mathsf{fma}\left(x.re, y.re, y.im \cdot x.im\right)}{\mathsf{hypot}\left(y.re, y.im\right)}\\ \mathbf{if}\;y.re \leq -3.8 \cdot 10^{+142}:\\ \;\;\;\;\frac{x.re}{y.re} + \frac{\frac{y.im}{\frac{y.re}{x.im}}}{y.re}\\ \mathbf{elif}\;y.re \leq -1.35 \cdot 10^{-194}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y.re \leq 10^{-110}:\\ \;\;\;\;\frac{x.im}{y.im} + \frac{y.re}{y.im} \cdot \frac{x.re}{y.im}\\ \mathbf{elif}\;y.re \leq 2.4 \cdot 10^{+68}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_0 \cdot \left(x.re + x.im \cdot \frac{y.im}{\mathsf{hypot}\left(y.re, y.im\right)}\right)\\ \end{array} \]
Alternative 2
Error10.6
Cost14028
\[\begin{array}{l} \mathbf{if}\;y.re \leq -5 \cdot 10^{+136}:\\ \;\;\;\;\frac{x.re}{y.re} + \frac{\frac{y.im}{\frac{y.re}{x.im}}}{y.re}\\ \mathbf{elif}\;y.re \leq -4 \cdot 10^{-127}:\\ \;\;\;\;\frac{y.im \cdot x.im + y.re \cdot x.re}{y.re \cdot y.re + y.im \cdot y.im}\\ \mathbf{elif}\;y.re \leq 1.08 \cdot 10^{-104}:\\ \;\;\;\;\frac{x.im}{y.im} + \frac{y.re}{y.im} \cdot \frac{x.re}{y.im}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\mathsf{hypot}\left(y.re, y.im\right)} \cdot \left(x.re + x.im \cdot \frac{y.im}{\mathsf{hypot}\left(y.re, y.im\right)}\right)\\ \end{array} \]
Alternative 3
Error11.8
Cost1488
\[\begin{array}{l} t_0 := \frac{y.im \cdot x.im + y.re \cdot x.re}{y.re \cdot y.re + y.im \cdot y.im}\\ t_1 := \frac{x.re}{y.re} + \frac{\frac{y.im}{\frac{y.re}{x.im}}}{y.re}\\ \mathbf{if}\;y.re \leq -5.5 \cdot 10^{+134}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y.re \leq -1.2 \cdot 10^{-127}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;y.re \leq 2.65 \cdot 10^{-73}:\\ \;\;\;\;\frac{x.im}{y.im} + \frac{y.re}{y.im} \cdot \frac{x.re}{y.im}\\ \mathbf{elif}\;y.re \leq 2.05 \cdot 10^{+126}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 4
Error17.2
Cost969
\[\begin{array}{l} \mathbf{if}\;y.im \leq -3600000000 \lor \neg \left(y.im \leq 3.7 \cdot 10^{-9}\right):\\ \;\;\;\;\frac{x.im}{y.im} + \frac{y.re}{y.im} \cdot \frac{x.re}{y.im}\\ \mathbf{else}:\\ \;\;\;\;\frac{x.re}{y.re + \frac{y.im \cdot y.im}{y.re}}\\ \end{array} \]
Alternative 5
Error15.4
Cost969
\[\begin{array}{l} \mathbf{if}\;y.im \leq -2800000000 \lor \neg \left(y.im \leq 1.35 \cdot 10^{-24}\right):\\ \;\;\;\;\frac{x.im}{y.im} + \frac{y.re}{y.im} \cdot \frac{x.re}{y.im}\\ \mathbf{else}:\\ \;\;\;\;\frac{x.re}{y.re} + \frac{x.im}{y.re} \cdot \frac{y.im}{y.re}\\ \end{array} \]
Alternative 6
Error15.1
Cost969
\[\begin{array}{l} \mathbf{if}\;y.im \leq -2400000000 \lor \neg \left(y.im \leq 6.6 \cdot 10^{-25}\right):\\ \;\;\;\;\frac{x.im}{y.im} + \frac{y.re}{y.im} \cdot \frac{x.re}{y.im}\\ \mathbf{else}:\\ \;\;\;\;\frac{x.re}{y.re} + \frac{\frac{y.im}{\frac{y.re}{x.im}}}{y.re}\\ \end{array} \]
Alternative 7
Error20.3
Cost840
\[\begin{array}{l} \mathbf{if}\;y.im \leq -2 \cdot 10^{+34}:\\ \;\;\;\;\frac{x.im}{y.im}\\ \mathbf{elif}\;y.im \leq 7 \cdot 10^{+31}:\\ \;\;\;\;\frac{x.re}{y.re + \frac{y.im \cdot y.im}{y.re}}\\ \mathbf{else}:\\ \;\;\;\;\frac{x.im}{y.im}\\ \end{array} \]
Alternative 8
Error22.7
Cost456
\[\begin{array}{l} \mathbf{if}\;y.im \leq -28000000:\\ \;\;\;\;\frac{x.im}{y.im}\\ \mathbf{elif}\;y.im \leq 3.2 \cdot 10^{-22}:\\ \;\;\;\;\frac{x.re}{y.re}\\ \mathbf{else}:\\ \;\;\;\;\frac{x.im}{y.im}\\ \end{array} \]
Alternative 9
Error37.4
Cost192
\[\frac{x.im}{y.im} \]

Error

Reproduce?

herbie shell --seed 2023045 
(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))))