?

Average Accuracy: 59.4% → 85.2%
Time: 17.1s
Precision: binary64
Cost: 20432

?

\[\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{\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)}\\ \mathbf{if}\;y.re \leq -6.2 \cdot 10^{+147}:\\ \;\;\;\;\frac{x.re}{y.re} + \frac{\frac{x.im}{y.re}}{\frac{y.re}{y.im}}\\ \mathbf{elif}\;y.re \leq -2 \cdot 10^{-175}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;y.re \leq 8 \cdot 10^{-127}:\\ \;\;\;\;\frac{x.im}{y.im} + x.re \cdot \frac{\frac{y.re}{y.im}}{y.im}\\ \mathbf{elif}\;y.re \leq 2.6 \cdot 10^{+121}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{x.re}{y.re} + \frac{x.im}{y.re} \cdot \frac{y.im}{y.re}\\ \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
         (/
          (/ (fma x.re y.re (* x.im y.im)) (hypot y.re y.im))
          (hypot y.re y.im))))
   (if (<= y.re -6.2e+147)
     (+ (/ x.re y.re) (/ (/ x.im y.re) (/ y.re y.im)))
     (if (<= y.re -2e-175)
       t_0
       (if (<= y.re 8e-127)
         (+ (/ x.im y.im) (* x.re (/ (/ y.re y.im) y.im)))
         (if (<= y.re 2.6e+121)
           t_0
           (+ (/ x.re y.re) (* (/ x.im y.re) (/ y.im y.re)))))))))
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 = (fma(x_46_re, y_46_re, (x_46_im * y_46_im)) / hypot(y_46_re, y_46_im)) / hypot(y_46_re, y_46_im);
	double tmp;
	if (y_46_re <= -6.2e+147) {
		tmp = (x_46_re / y_46_re) + ((x_46_im / y_46_re) / (y_46_re / y_46_im));
	} else if (y_46_re <= -2e-175) {
		tmp = t_0;
	} else if (y_46_re <= 8e-127) {
		tmp = (x_46_im / y_46_im) + (x_46_re * ((y_46_re / y_46_im) / y_46_im));
	} else if (y_46_re <= 2.6e+121) {
		tmp = t_0;
	} else {
		tmp = (x_46_re / y_46_re) + ((x_46_im / y_46_re) * (y_46_im / y_46_re));
	}
	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(Float64(fma(x_46_re, y_46_re, Float64(x_46_im * y_46_im)) / hypot(y_46_re, y_46_im)) / hypot(y_46_re, y_46_im))
	tmp = 0.0
	if (y_46_re <= -6.2e+147)
		tmp = Float64(Float64(x_46_re / y_46_re) + Float64(Float64(x_46_im / y_46_re) / Float64(y_46_re / y_46_im)));
	elseif (y_46_re <= -2e-175)
		tmp = t_0;
	elseif (y_46_re <= 8e-127)
		tmp = Float64(Float64(x_46_im / y_46_im) + Float64(x_46_re * Float64(Float64(y_46_re / y_46_im) / y_46_im)));
	elseif (y_46_re <= 2.6e+121)
		tmp = t_0;
	else
		tmp = Float64(Float64(x_46_re / y_46_re) + Float64(Float64(x_46_im / y_46_re) * Float64(y_46_im / y_46_re)));
	end
	return 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[(N[(N[(x$46$re * y$46$re + N[(x$46$im * y$46$im), $MachinePrecision]), $MachinePrecision] / N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision]), $MachinePrecision] / N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -6.2e+147], N[(N[(x$46$re / y$46$re), $MachinePrecision] + N[(N[(x$46$im / y$46$re), $MachinePrecision] / N[(y$46$re / y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, -2e-175], t$95$0, If[LessEqual[y$46$re, 8e-127], N[(N[(x$46$im / y$46$im), $MachinePrecision] + N[(x$46$re * N[(N[(y$46$re / y$46$im), $MachinePrecision] / y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 2.6e+121], t$95$0, N[(N[(x$46$re / y$46$re), $MachinePrecision] + N[(N[(x$46$im / y$46$re), $MachinePrecision] * N[(y$46$im / y$46$re), $MachinePrecision]), $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{\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)}\\
\mathbf{if}\;y.re \leq -6.2 \cdot 10^{+147}:\\
\;\;\;\;\frac{x.re}{y.re} + \frac{\frac{x.im}{y.re}}{\frac{y.re}{y.im}}\\

\mathbf{elif}\;y.re \leq -2 \cdot 10^{-175}:\\
\;\;\;\;t_0\\

\mathbf{elif}\;y.re \leq 8 \cdot 10^{-127}:\\
\;\;\;\;\frac{x.im}{y.im} + x.re \cdot \frac{\frac{y.re}{y.im}}{y.im}\\

\mathbf{elif}\;y.re \leq 2.6 \cdot 10^{+121}:\\
\;\;\;\;t_0\\

\mathbf{else}:\\
\;\;\;\;\frac{x.re}{y.re} + \frac{x.im}{y.re} \cdot \frac{y.im}{y.re}\\


\end{array}

Error?

Derivation?

  1. Split input into 4 regimes
  2. if y.re < -6.2000000000000001e147

    1. Initial program 29.0%

      \[\frac{x.re \cdot y.re + x.im \cdot y.im}{y.re \cdot y.re + y.im \cdot y.im} \]
    2. Taylor expanded in y.re around inf 75.6%

      \[\leadsto \color{blue}{\frac{x.re}{y.re} + \frac{y.im \cdot x.im}{{y.re}^{2}}} \]
    3. Simplified88.5%

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

      [Start]75.6

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

      unpow2 [=>]75.6

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

      times-frac [=>]88.5

      \[ \frac{x.re}{y.re} + \color{blue}{\frac{y.im}{y.re} \cdot \frac{x.im}{y.re}} \]
    4. Applied egg-rr88.3%

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

      [Start]88.5

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

      *-commutative [=>]88.5

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

      clear-num [=>]88.3

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

      un-div-inv [=>]88.3

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

    if -6.2000000000000001e147 < y.re < -2e-175 or 8.0000000000000002e-127 < y.re < 2.5999999999999999e121

    1. Initial program 75.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-rr82.7%

      \[\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)}} \]
      Proof

      [Start]75.0

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

      *-un-lft-identity [=>]75.0

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

      add-sqr-sqrt [=>]75.0

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

      times-frac [=>]75.0

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

      hypot-def [=>]75.0

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

      fma-def [=>]75.0

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

      hypot-def [=>]82.7

      \[ \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)}{\color{blue}{\mathsf{hypot}\left(y.re, y.im\right)}} \]
    3. Applied egg-rr82.9%

      \[\leadsto \color{blue}{\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)}} \]
      Proof

      [Start]82.7

      \[ \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)} \]

      associate-*l/ [=>]82.9

      \[ \color{blue}{\frac{1 \cdot \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)}} \]

      *-un-lft-identity [<=]82.9

      \[ \frac{\color{blue}{\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)} \]

    if -2e-175 < y.re < 8.0000000000000002e-127

    1. Initial program 62.6%

      \[\frac{x.re \cdot y.re + x.im \cdot y.im}{y.re \cdot y.re + y.im \cdot y.im} \]
    2. Taylor expanded in y.re around 0 84.8%

      \[\leadsto \color{blue}{\frac{x.re \cdot y.re}{{y.im}^{2}} + \frac{x.im}{y.im}} \]
    3. Simplified83.0%

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

      [Start]84.8

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

      +-commutative [=>]84.8

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

      unpow2 [=>]84.8

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

      associate-/l* [=>]83.0

      \[ \frac{x.im}{y.im} + \color{blue}{\frac{x.re}{\frac{y.im \cdot y.im}{y.re}}} \]
    4. Applied egg-rr89.7%

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

      [Start]83.0

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

      clear-num [=>]83.0

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

      associate-/r/ [=>]83.0

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

      clear-num [<=]83.2

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

      associate-/r* [=>]89.7

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

    if 2.5999999999999999e121 < y.re

    1. Initial program 35.9%

      \[\frac{x.re \cdot y.re + x.im \cdot y.im}{y.re \cdot y.re + y.im \cdot y.im} \]
    2. Taylor expanded in y.re around inf 73.5%

      \[\leadsto \color{blue}{\frac{x.re}{y.re} + \frac{y.im \cdot x.im}{{y.re}^{2}}} \]
    3. Simplified82.9%

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

      [Start]73.5

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

      unpow2 [=>]73.5

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

      times-frac [=>]82.9

      \[ \frac{x.re}{y.re} + \color{blue}{\frac{y.im}{y.re} \cdot \frac{x.im}{y.re}} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification85.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y.re \leq -6.2 \cdot 10^{+147}:\\ \;\;\;\;\frac{x.re}{y.re} + \frac{\frac{x.im}{y.re}}{\frac{y.re}{y.im}}\\ \mathbf{elif}\;y.re \leq -2 \cdot 10^{-175}:\\ \;\;\;\;\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)}\\ \mathbf{elif}\;y.re \leq 8 \cdot 10^{-127}:\\ \;\;\;\;\frac{x.im}{y.im} + x.re \cdot \frac{\frac{y.re}{y.im}}{y.im}\\ \mathbf{elif}\;y.re \leq 2.6 \cdot 10^{+121}:\\ \;\;\;\;\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)}\\ \mathbf{else}:\\ \;\;\;\;\frac{x.re}{y.re} + \frac{x.im}{y.re} \cdot \frac{y.im}{y.re}\\ \end{array} \]

Alternatives

Alternative 1
Accuracy78.7%
Cost7236
\[\begin{array}{l} \mathbf{if}\;y.re \leq -9.6 \cdot 10^{+76}:\\ \;\;\;\;\frac{\left(-x.re\right) - x.im \cdot \frac{y.im}{y.re}}{\mathsf{hypot}\left(y.re, y.im\right)}\\ \mathbf{elif}\;y.re \leq -2.4 \cdot 10^{-147}:\\ \;\;\;\;\frac{x.im \cdot y.im + y.re \cdot x.re}{y.re \cdot y.re + y.im \cdot y.im}\\ \mathbf{elif}\;y.re \leq 3.2 \cdot 10^{-59}:\\ \;\;\;\;\frac{x.im}{y.im} + x.re \cdot \frac{\frac{y.re}{y.im}}{y.im}\\ \mathbf{else}:\\ \;\;\;\;\frac{x.re}{y.re} + \frac{x.im}{y.re} \cdot \frac{y.im}{y.re}\\ \end{array} \]
Alternative 2
Accuracy72.5%
Cost1497
\[\begin{array}{l} t_0 := \frac{x.re}{y.re} + \frac{x.im}{y.re} \cdot \frac{y.im}{y.re}\\ \mathbf{if}\;y.re \leq -2.25 \cdot 10^{+123}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;y.re \leq -2.35 \cdot 10^{+110}:\\ \;\;\;\;\frac{x.im}{y.im}\\ \mathbf{elif}\;y.re \leq -5.6 \cdot 10^{-22}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;y.re \leq 3.3 \cdot 10^{-59}:\\ \;\;\;\;\frac{x.im}{y.im} + x.re \cdot \frac{\frac{y.re}{y.im}}{y.im}\\ \mathbf{elif}\;y.re \leq 6.2 \cdot 10^{+60} \lor \neg \left(y.re \leq 3.6 \cdot 10^{+114}\right):\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{x.im}{y.im} + \frac{x.re}{\frac{y.im \cdot y.im}{y.re}}\\ \end{array} \]
Alternative 3
Accuracy72.3%
Cost1496
\[\begin{array}{l} t_0 := \frac{x.re}{y.re} + \frac{x.im}{y.re} \cdot \frac{y.im}{y.re}\\ \mathbf{if}\;y.re \leq -2.4 \cdot 10^{+123}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;y.re \leq -1.8 \cdot 10^{+110}:\\ \;\;\;\;\frac{x.im}{y.im}\\ \mathbf{elif}\;y.re \leq -5 \cdot 10^{-26}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;y.re \leq 3.3 \cdot 10^{-59}:\\ \;\;\;\;\frac{x.im}{y.im} + x.re \cdot \frac{\frac{y.re}{y.im}}{y.im}\\ \mathbf{elif}\;y.re \leq 9.5 \cdot 10^{+59}:\\ \;\;\;\;\frac{x.re}{y.re} + y.im \cdot \frac{\frac{x.im}{y.re}}{y.re}\\ \mathbf{elif}\;y.re \leq 3.4 \cdot 10^{+114}:\\ \;\;\;\;\frac{x.im}{y.im} + \frac{x.re}{\frac{y.im \cdot y.im}{y.re}}\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 4
Accuracy72.3%
Cost1496
\[\begin{array}{l} t_0 := \frac{x.re}{y.re} + \frac{x.im}{y.re} \cdot \frac{y.im}{y.re}\\ \mathbf{if}\;y.re \leq -2.25 \cdot 10^{+123}:\\ \;\;\;\;\frac{x.re}{y.re} + \frac{\frac{x.im}{y.re}}{\frac{y.re}{y.im}}\\ \mathbf{elif}\;y.re \leq -2.35 \cdot 10^{+110}:\\ \;\;\;\;\frac{x.im}{y.im}\\ \mathbf{elif}\;y.re \leq -1.75 \cdot 10^{-23}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;y.re \leq 3.15 \cdot 10^{-59}:\\ \;\;\;\;\frac{x.im}{y.im} + x.re \cdot \frac{\frac{y.re}{y.im}}{y.im}\\ \mathbf{elif}\;y.re \leq 1.1 \cdot 10^{+60}:\\ \;\;\;\;\frac{x.re}{y.re} + y.im \cdot \frac{\frac{x.im}{y.re}}{y.re}\\ \mathbf{elif}\;y.re \leq 3.4 \cdot 10^{+114}:\\ \;\;\;\;\frac{x.im}{y.im} + \frac{x.re}{\frac{y.im \cdot y.im}{y.re}}\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 5
Accuracy72.2%
Cost1496
\[\begin{array}{l} \mathbf{if}\;y.re \leq -2.25 \cdot 10^{+123}:\\ \;\;\;\;\frac{x.re}{y.re} + \frac{\frac{x.im}{y.re}}{\frac{y.re}{y.im}}\\ \mathbf{elif}\;y.re \leq -2.35 \cdot 10^{+107}:\\ \;\;\;\;\frac{x.im}{y.im}\\ \mathbf{elif}\;y.re \leq -4.1 \cdot 10^{-26}:\\ \;\;\;\;\frac{x.re}{\frac{y.re \cdot y.re + y.im \cdot y.im}{y.re}}\\ \mathbf{elif}\;y.re \leq 3.3 \cdot 10^{-59}:\\ \;\;\;\;\frac{x.im}{y.im} + x.re \cdot \frac{\frac{y.re}{y.im}}{y.im}\\ \mathbf{elif}\;y.re \leq 6.2 \cdot 10^{+60}:\\ \;\;\;\;\frac{x.re}{y.re} + y.im \cdot \frac{\frac{x.im}{y.re}}{y.re}\\ \mathbf{elif}\;y.re \leq 5.4 \cdot 10^{+114}:\\ \;\;\;\;\frac{x.im}{y.im} + \frac{x.re}{\frac{y.im \cdot y.im}{y.re}}\\ \mathbf{else}:\\ \;\;\;\;\frac{x.re}{y.re} + \frac{x.im}{y.re} \cdot \frac{y.im}{y.re}\\ \end{array} \]
Alternative 6
Accuracy78.1%
Cost1488
\[\begin{array}{l} t_0 := \frac{x.re}{y.re} + \frac{x.im}{y.re} \cdot \frac{y.im}{y.re}\\ \mathbf{if}\;y.re \leq -2.25 \cdot 10^{+123}:\\ \;\;\;\;\frac{x.re}{y.re} + \frac{\frac{x.im}{y.re}}{\frac{y.re}{y.im}}\\ \mathbf{elif}\;y.re \leq -2.35 \cdot 10^{+110}:\\ \;\;\;\;\frac{x.im}{y.im}\\ \mathbf{elif}\;y.re \leq -7.6 \cdot 10^{+74}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;y.re \leq -1.4 \cdot 10^{-145}:\\ \;\;\;\;\frac{x.im \cdot y.im + y.re \cdot x.re}{y.re \cdot y.re + y.im \cdot y.im}\\ \mathbf{elif}\;y.re \leq 3.3 \cdot 10^{-59}:\\ \;\;\;\;\frac{x.im}{y.im} + x.re \cdot \frac{\frac{y.re}{y.im}}{y.im}\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 7
Accuracy69.3%
Cost969
\[\begin{array}{l} \mathbf{if}\;y.im \leq -3.4 \cdot 10^{+32} \lor \neg \left(y.im \leq 2.5 \cdot 10^{-62}\right):\\ \;\;\;\;\frac{x.im}{y.im} + \frac{y.re}{y.im} \cdot \frac{x.re}{y.im}\\ \mathbf{else}:\\ \;\;\;\;\frac{x.re}{y.re}\\ \end{array} \]
Alternative 8
Accuracy63.2%
Cost456
\[\begin{array}{l} \mathbf{if}\;y.im \leq -3.4 \cdot 10^{+47}:\\ \;\;\;\;\frac{x.im}{y.im}\\ \mathbf{elif}\;y.im \leq 2.5 \cdot 10^{-62}:\\ \;\;\;\;\frac{x.re}{y.re}\\ \mathbf{else}:\\ \;\;\;\;\frac{x.im}{y.im}\\ \end{array} \]
Alternative 9
Accuracy41.8%
Cost324
\[\begin{array}{l} \mathbf{if}\;y.re \leq -1.8 \cdot 10^{+153}:\\ \;\;\;\;\frac{x.im}{y.re}\\ \mathbf{else}:\\ \;\;\;\;\frac{x.im}{y.im}\\ \end{array} \]
Alternative 10
Accuracy41.4%
Cost192
\[\frac{x.im}{y.im} \]

Error

Reproduce?

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