Average Error: 26.3 → 13.5
Time: 6.9s
Precision: binary64
\[\frac{x.im \cdot y.re - x.re \cdot y.im}{y.re \cdot y.re + y.im \cdot y.im} \]
\[\begin{array}{l} t_0 := y.re \cdot x.im - x.re \cdot y.im\\ t_1 := \frac{1}{\mathsf{hypot}\left(y.im, y.re\right)}\\ \mathbf{if}\;y.re \leq -1.9259002861513078 \cdot 10^{+208}:\\ \;\;\;\;\frac{x.im}{y.re}\\ \mathbf{elif}\;y.re \leq -6.426786380723436 \cdot 10^{-198}:\\ \;\;\;\;\frac{\frac{t_0}{\mathsf{hypot}\left(y.im, y.re\right)}}{\mathsf{hypot}\left(y.im, y.re\right)}\\ \mathbf{elif}\;y.re \leq 3.0839218551021475 \cdot 10^{-116}:\\ \;\;\;\;-\frac{x.re}{y.im}\\ \mathbf{elif}\;y.re \leq 2.723673641056143 \cdot 10^{+98}:\\ \;\;\;\;\frac{t_0 \cdot t_1}{\mathsf{hypot}\left(y.im, y.re\right)}\\ \mathbf{else}:\\ \;\;\;\;t_1 \cdot \left(x.im - \frac{x.re \cdot y.im}{y.re}\right)\\ \end{array} \]
(FPCore (x.re x.im y.re y.im)
 :precision binary64
 (/ (- (* x.im y.re) (* x.re y.im)) (+ (* y.re y.re) (* y.im y.im))))
(FPCore (x.re x.im y.re y.im)
 :precision binary64
 (let* ((t_0 (- (* y.re x.im) (* x.re y.im))) (t_1 (/ 1.0 (hypot y.im y.re))))
   (if (<= y.re -1.9259002861513078e+208)
     (/ x.im y.re)
     (if (<= y.re -6.426786380723436e-198)
       (/ (/ t_0 (hypot y.im y.re)) (hypot y.im y.re))
       (if (<= y.re 3.0839218551021475e-116)
         (- (/ x.re y.im))
         (if (<= y.re 2.723673641056143e+98)
           (/ (* t_0 t_1) (hypot y.im y.re))
           (* t_1 (- x.im (/ (* x.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_im * y_46_re) - (x_46_re * 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 = (y_46_re * x_46_im) - (x_46_re * y_46_im);
	double t_1 = 1.0 / hypot(y_46_im, y_46_re);
	double tmp;
	if (y_46_re <= -1.9259002861513078e+208) {
		tmp = x_46_im / y_46_re;
	} else if (y_46_re <= -6.426786380723436e-198) {
		tmp = (t_0 / hypot(y_46_im, y_46_re)) / hypot(y_46_im, y_46_re);
	} else if (y_46_re <= 3.0839218551021475e-116) {
		tmp = -(x_46_re / y_46_im);
	} else if (y_46_re <= 2.723673641056143e+98) {
		tmp = (t_0 * t_1) / hypot(y_46_im, y_46_re);
	} else {
		tmp = t_1 * (x_46_im - ((x_46_re * y_46_im) / y_46_re));
	}
	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_im * y_46_re) - (x_46_re * 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 = (y_46_re * x_46_im) - (x_46_re * y_46_im);
	double t_1 = 1.0 / Math.hypot(y_46_im, y_46_re);
	double tmp;
	if (y_46_re <= -1.9259002861513078e+208) {
		tmp = x_46_im / y_46_re;
	} else if (y_46_re <= -6.426786380723436e-198) {
		tmp = (t_0 / Math.hypot(y_46_im, y_46_re)) / Math.hypot(y_46_im, y_46_re);
	} else if (y_46_re <= 3.0839218551021475e-116) {
		tmp = -(x_46_re / y_46_im);
	} else if (y_46_re <= 2.723673641056143e+98) {
		tmp = (t_0 * t_1) / Math.hypot(y_46_im, y_46_re);
	} else {
		tmp = t_1 * (x_46_im - ((x_46_re * y_46_im) / y_46_re));
	}
	return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im):
	return ((x_46_im * y_46_re) - (x_46_re * 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 = (y_46_re * x_46_im) - (x_46_re * y_46_im)
	t_1 = 1.0 / math.hypot(y_46_im, y_46_re)
	tmp = 0
	if y_46_re <= -1.9259002861513078e+208:
		tmp = x_46_im / y_46_re
	elif y_46_re <= -6.426786380723436e-198:
		tmp = (t_0 / math.hypot(y_46_im, y_46_re)) / math.hypot(y_46_im, y_46_re)
	elif y_46_re <= 3.0839218551021475e-116:
		tmp = -(x_46_re / y_46_im)
	elif y_46_re <= 2.723673641056143e+98:
		tmp = (t_0 * t_1) / math.hypot(y_46_im, y_46_re)
	else:
		tmp = t_1 * (x_46_im - ((x_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_im * y_46_re) - Float64(x_46_re * 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(y_46_re * x_46_im) - Float64(x_46_re * y_46_im))
	t_1 = Float64(1.0 / hypot(y_46_im, y_46_re))
	tmp = 0.0
	if (y_46_re <= -1.9259002861513078e+208)
		tmp = Float64(x_46_im / y_46_re);
	elseif (y_46_re <= -6.426786380723436e-198)
		tmp = Float64(Float64(t_0 / hypot(y_46_im, y_46_re)) / hypot(y_46_im, y_46_re));
	elseif (y_46_re <= 3.0839218551021475e-116)
		tmp = Float64(-Float64(x_46_re / y_46_im));
	elseif (y_46_re <= 2.723673641056143e+98)
		tmp = Float64(Float64(t_0 * t_1) / hypot(y_46_im, y_46_re));
	else
		tmp = Float64(t_1 * Float64(x_46_im - Float64(Float64(x_46_re * y_46_im) / y_46_re)));
	end
	return tmp
end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im)
	tmp = ((x_46_im * y_46_re) - (x_46_re * 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 = (y_46_re * x_46_im) - (x_46_re * y_46_im);
	t_1 = 1.0 / hypot(y_46_im, y_46_re);
	tmp = 0.0;
	if (y_46_re <= -1.9259002861513078e+208)
		tmp = x_46_im / y_46_re;
	elseif (y_46_re <= -6.426786380723436e-198)
		tmp = (t_0 / hypot(y_46_im, y_46_re)) / hypot(y_46_im, y_46_re);
	elseif (y_46_re <= 3.0839218551021475e-116)
		tmp = -(x_46_re / y_46_im);
	elseif (y_46_re <= 2.723673641056143e+98)
		tmp = (t_0 * t_1) / hypot(y_46_im, y_46_re);
	else
		tmp = t_1 * (x_46_im - ((x_46_re * y_46_im) / y_46_re));
	end
	tmp_2 = tmp;
end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[(N[(N[(x$46$im * y$46$re), $MachinePrecision] - N[(x$46$re * 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[(y$46$re * x$46$im), $MachinePrecision] - N[(x$46$re * y$46$im), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(1.0 / N[Sqrt[y$46$im ^ 2 + y$46$re ^ 2], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -1.9259002861513078e+208], N[(x$46$im / y$46$re), $MachinePrecision], If[LessEqual[y$46$re, -6.426786380723436e-198], N[(N[(t$95$0 / N[Sqrt[y$46$im ^ 2 + y$46$re ^ 2], $MachinePrecision]), $MachinePrecision] / N[Sqrt[y$46$im ^ 2 + y$46$re ^ 2], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 3.0839218551021475e-116], (-N[(x$46$re / y$46$im), $MachinePrecision]), If[LessEqual[y$46$re, 2.723673641056143e+98], N[(N[(t$95$0 * t$95$1), $MachinePrecision] / N[Sqrt[y$46$im ^ 2 + y$46$re ^ 2], $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[(x$46$im - N[(N[(x$46$re * y$46$im), $MachinePrecision] / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\frac{x.im \cdot y.re - x.re \cdot y.im}{y.re \cdot y.re + y.im \cdot y.im}
\begin{array}{l}
t_0 := y.re \cdot x.im - x.re \cdot y.im\\
t_1 := \frac{1}{\mathsf{hypot}\left(y.im, y.re\right)}\\
\mathbf{if}\;y.re \leq -1.9259002861513078 \cdot 10^{+208}:\\
\;\;\;\;\frac{x.im}{y.re}\\

\mathbf{elif}\;y.re \leq -6.426786380723436 \cdot 10^{-198}:\\
\;\;\;\;\frac{\frac{t_0}{\mathsf{hypot}\left(y.im, y.re\right)}}{\mathsf{hypot}\left(y.im, y.re\right)}\\

\mathbf{elif}\;y.re \leq 3.0839218551021475 \cdot 10^{-116}:\\
\;\;\;\;-\frac{x.re}{y.im}\\

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

\mathbf{else}:\\
\;\;\;\;t_1 \cdot \left(x.im - \frac{x.re \cdot y.im}{y.re}\right)\\


\end{array}

Error

Bits error versus x.re

Bits error versus x.im

Bits error versus y.re

Bits error versus y.im

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Split input into 5 regimes
  2. if y.re < -1.9259002861513078e208

    1. Initial program 43.9

      \[\frac{x.im \cdot y.re - x.re \cdot y.im}{y.re \cdot y.re + y.im \cdot y.im} \]
    2. Simplified43.9

      \[\leadsto \color{blue}{\frac{x.im \cdot y.re - x.re \cdot y.im}{\mathsf{fma}\left(y.re, y.re, y.im \cdot y.im\right)}} \]
    3. Applied add-sqr-sqrt_binary6443.9

      \[\leadsto \frac{x.im \cdot y.re - x.re \cdot y.im}{\color{blue}{\sqrt{\mathsf{fma}\left(y.re, y.re, y.im \cdot y.im\right)} \cdot \sqrt{\mathsf{fma}\left(y.re, y.re, y.im \cdot y.im\right)}}} \]
    4. Applied *-un-lft-identity_binary6443.9

      \[\leadsto \frac{\color{blue}{1 \cdot \left(x.im \cdot y.re - x.re \cdot y.im\right)}}{\sqrt{\mathsf{fma}\left(y.re, y.re, y.im \cdot y.im\right)} \cdot \sqrt{\mathsf{fma}\left(y.re, y.re, y.im \cdot y.im\right)}} \]
    5. Applied times-frac_binary6443.9

      \[\leadsto \color{blue}{\frac{1}{\sqrt{\mathsf{fma}\left(y.re, y.re, y.im \cdot y.im\right)}} \cdot \frac{x.im \cdot y.re - x.re \cdot y.im}{\sqrt{\mathsf{fma}\left(y.re, y.re, y.im \cdot y.im\right)}}} \]
    6. Simplified43.9

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

      \[\leadsto \frac{1}{\mathsf{hypot}\left(y.im, y.re\right)} \cdot \color{blue}{\frac{y.re \cdot x.im - x.re \cdot y.im}{\mathsf{hypot}\left(y.im, y.re\right)}} \]
    8. Applied add-sqr-sqrt_binary6436.2

      \[\leadsto \frac{1}{\mathsf{hypot}\left(y.im, y.re\right)} \cdot \frac{y.re \cdot x.im - x.re \cdot y.im}{\color{blue}{\sqrt{\mathsf{hypot}\left(y.im, y.re\right)} \cdot \sqrt{\mathsf{hypot}\left(y.im, y.re\right)}}} \]
    9. Applied associate-/r*_binary6436.2

      \[\leadsto \frac{1}{\mathsf{hypot}\left(y.im, y.re\right)} \cdot \color{blue}{\frac{\frac{y.re \cdot x.im - x.re \cdot y.im}{\sqrt{\mathsf{hypot}\left(y.im, y.re\right)}}}{\sqrt{\mathsf{hypot}\left(y.im, y.re\right)}}} \]
    10. Applied pow1_binary6436.2

      \[\leadsto \frac{1}{\mathsf{hypot}\left(y.im, y.re\right)} \cdot \color{blue}{{\left(\frac{\frac{y.re \cdot x.im - x.re \cdot y.im}{\sqrt{\mathsf{hypot}\left(y.im, y.re\right)}}}{\sqrt{\mathsf{hypot}\left(y.im, y.re\right)}}\right)}^{1}} \]
    11. Applied pow1_binary6436.2

      \[\leadsto \color{blue}{{\left(\frac{1}{\mathsf{hypot}\left(y.im, y.re\right)}\right)}^{1}} \cdot {\left(\frac{\frac{y.re \cdot x.im - x.re \cdot y.im}{\sqrt{\mathsf{hypot}\left(y.im, y.re\right)}}}{\sqrt{\mathsf{hypot}\left(y.im, y.re\right)}}\right)}^{1} \]
    12. Applied pow-prod-down_binary6436.2

      \[\leadsto \color{blue}{{\left(\frac{1}{\mathsf{hypot}\left(y.im, y.re\right)} \cdot \frac{\frac{y.re \cdot x.im - x.re \cdot y.im}{\sqrt{\mathsf{hypot}\left(y.im, y.re\right)}}}{\sqrt{\mathsf{hypot}\left(y.im, y.re\right)}}\right)}^{1}} \]
    13. Simplified43.9

      \[\leadsto {\color{blue}{\left(\frac{y.re \cdot x.im - x.re \cdot y.im}{{\left(\sqrt{\mathsf{hypot}\left(y.im, y.re\right)}\right)}^{4}}\right)}}^{1} \]
    14. Taylor expanded in y.re around inf 10.2

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

    if -1.9259002861513078e208 < y.re < -6.42678638072343619e-198

    1. Initial program 22.6

      \[\frac{x.im \cdot y.re - x.re \cdot y.im}{y.re \cdot y.re + y.im \cdot y.im} \]
    2. Simplified22.6

      \[\leadsto \color{blue}{\frac{x.im \cdot y.re - x.re \cdot y.im}{\mathsf{fma}\left(y.re, y.re, y.im \cdot y.im\right)}} \]
    3. Applied add-sqr-sqrt_binary6422.6

      \[\leadsto \frac{x.im \cdot y.re - x.re \cdot y.im}{\color{blue}{\sqrt{\mathsf{fma}\left(y.re, y.re, y.im \cdot y.im\right)} \cdot \sqrt{\mathsf{fma}\left(y.re, y.re, y.im \cdot y.im\right)}}} \]
    4. Applied *-un-lft-identity_binary6422.6

      \[\leadsto \frac{\color{blue}{1 \cdot \left(x.im \cdot y.re - x.re \cdot y.im\right)}}{\sqrt{\mathsf{fma}\left(y.re, y.re, y.im \cdot y.im\right)} \cdot \sqrt{\mathsf{fma}\left(y.re, y.re, y.im \cdot y.im\right)}} \]
    5. Applied times-frac_binary6422.6

      \[\leadsto \color{blue}{\frac{1}{\sqrt{\mathsf{fma}\left(y.re, y.re, y.im \cdot y.im\right)}} \cdot \frac{x.im \cdot y.re - x.re \cdot y.im}{\sqrt{\mathsf{fma}\left(y.re, y.re, y.im \cdot y.im\right)}}} \]
    6. Simplified22.6

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

      \[\leadsto \frac{1}{\mathsf{hypot}\left(y.im, y.re\right)} \cdot \color{blue}{\frac{y.re \cdot x.im - x.re \cdot y.im}{\mathsf{hypot}\left(y.im, y.re\right)}} \]
    8. Applied associate-*l/_binary6414.0

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

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

    if -6.42678638072343619e-198 < y.re < 3.08392185510214748e-116

    1. Initial program 22.8

      \[\frac{x.im \cdot y.re - x.re \cdot y.im}{y.re \cdot y.re + y.im \cdot y.im} \]
    2. Simplified22.8

      \[\leadsto \color{blue}{\frac{x.im \cdot y.re - x.re \cdot y.im}{\mathsf{fma}\left(y.re, y.re, y.im \cdot y.im\right)}} \]
    3. Taylor expanded in y.re around 0 15.7

      \[\leadsto \color{blue}{-1 \cdot \frac{x.re}{y.im}} \]
    4. Simplified15.7

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

    if 3.08392185510214748e-116 < y.re < 2.723673641056143e98

    1. Initial program 16.3

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

      \[\leadsto \color{blue}{\frac{x.im \cdot y.re - x.re \cdot y.im}{\mathsf{fma}\left(y.re, y.re, y.im \cdot y.im\right)}} \]
    3. Applied add-sqr-sqrt_binary6416.3

      \[\leadsto \frac{x.im \cdot y.re - x.re \cdot y.im}{\color{blue}{\sqrt{\mathsf{fma}\left(y.re, y.re, y.im \cdot y.im\right)} \cdot \sqrt{\mathsf{fma}\left(y.re, y.re, y.im \cdot y.im\right)}}} \]
    4. Applied *-un-lft-identity_binary6416.3

      \[\leadsto \frac{\color{blue}{1 \cdot \left(x.im \cdot y.re - x.re \cdot y.im\right)}}{\sqrt{\mathsf{fma}\left(y.re, y.re, y.im \cdot y.im\right)} \cdot \sqrt{\mathsf{fma}\left(y.re, y.re, y.im \cdot y.im\right)}} \]
    5. Applied times-frac_binary6416.3

      \[\leadsto \color{blue}{\frac{1}{\sqrt{\mathsf{fma}\left(y.re, y.re, y.im \cdot y.im\right)}} \cdot \frac{x.im \cdot y.re - x.re \cdot y.im}{\sqrt{\mathsf{fma}\left(y.re, y.re, y.im \cdot y.im\right)}}} \]
    6. Simplified16.3

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

      \[\leadsto \frac{1}{\mathsf{hypot}\left(y.im, y.re\right)} \cdot \color{blue}{\frac{y.re \cdot x.im - x.re \cdot y.im}{\mathsf{hypot}\left(y.im, y.re\right)}} \]
    8. Applied associate-*r/_binary6411.3

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

    if 2.723673641056143e98 < y.re

    1. Initial program 39.8

      \[\frac{x.im \cdot y.re - x.re \cdot y.im}{y.re \cdot y.re + y.im \cdot y.im} \]
    2. Simplified39.8

      \[\leadsto \color{blue}{\frac{x.im \cdot y.re - x.re \cdot y.im}{\mathsf{fma}\left(y.re, y.re, y.im \cdot y.im\right)}} \]
    3. Applied add-sqr-sqrt_binary6439.8

      \[\leadsto \frac{x.im \cdot y.re - x.re \cdot y.im}{\color{blue}{\sqrt{\mathsf{fma}\left(y.re, y.re, y.im \cdot y.im\right)} \cdot \sqrt{\mathsf{fma}\left(y.re, y.re, y.im \cdot y.im\right)}}} \]
    4. Applied *-un-lft-identity_binary6439.8

      \[\leadsto \frac{\color{blue}{1 \cdot \left(x.im \cdot y.re - x.re \cdot y.im\right)}}{\sqrt{\mathsf{fma}\left(y.re, y.re, y.im \cdot y.im\right)} \cdot \sqrt{\mathsf{fma}\left(y.re, y.re, y.im \cdot y.im\right)}} \]
    5. Applied times-frac_binary6439.8

      \[\leadsto \color{blue}{\frac{1}{\sqrt{\mathsf{fma}\left(y.re, y.re, y.im \cdot y.im\right)}} \cdot \frac{x.im \cdot y.re - x.re \cdot y.im}{\sqrt{\mathsf{fma}\left(y.re, y.re, y.im \cdot y.im\right)}}} \]
    6. Simplified39.8

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y.re \leq -1.9259002861513078 \cdot 10^{+208}:\\ \;\;\;\;\frac{x.im}{y.re}\\ \mathbf{elif}\;y.re \leq -6.426786380723436 \cdot 10^{-198}:\\ \;\;\;\;\frac{\frac{y.re \cdot x.im - x.re \cdot y.im}{\mathsf{hypot}\left(y.im, y.re\right)}}{\mathsf{hypot}\left(y.im, y.re\right)}\\ \mathbf{elif}\;y.re \leq 3.0839218551021475 \cdot 10^{-116}:\\ \;\;\;\;-\frac{x.re}{y.im}\\ \mathbf{elif}\;y.re \leq 2.723673641056143 \cdot 10^{+98}:\\ \;\;\;\;\frac{\left(y.re \cdot x.im - x.re \cdot y.im\right) \cdot \frac{1}{\mathsf{hypot}\left(y.im, y.re\right)}}{\mathsf{hypot}\left(y.im, y.re\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\mathsf{hypot}\left(y.im, y.re\right)} \cdot \left(x.im - \frac{x.re \cdot y.im}{y.re}\right)\\ \end{array} \]

Reproduce

herbie shell --seed 2022131 
(FPCore (x.re x.im y.re y.im)
  :name "_divideComplex, imaginary part"
  :precision binary64
  (/ (- (* x.im y.re) (* x.re y.im)) (+ (* y.re y.re) (* y.im y.im))))