_divideComplex, real part

Percentage Accurate: 61.2% → 82.7%
Time: 4.8s
Alternatives: 8
Speedup: 1.6×

Specification

?
\[\begin{array}{l} \\ \frac{x.re \cdot y.re + x.im \cdot y.im}{y.re \cdot y.re + y.im \cdot y.im} \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))))
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));
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(x_46re, x_46im, y_46re, y_46im)
use fmin_fmax_functions
    real(8), intent (in) :: x_46re
    real(8), intent (in) :: x_46im
    real(8), intent (in) :: y_46re
    real(8), intent (in) :: y_46im
    code = ((x_46re * y_46re) + (x_46im * y_46im)) / ((y_46re * y_46re) + (y_46im * y_46im))
end function
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));
}
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))
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 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
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]
\begin{array}{l}

\\
\frac{x.re \cdot y.re + x.im \cdot y.im}{y.re \cdot y.re + y.im \cdot y.im}
\end{array}

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 8 alternatives:

AlternativeAccuracySpeedup
The accuracy (vertical axis) and speed (horizontal axis) of each alternatives. Up and to the right is better. The red square shows the initial program, and each blue circle shows an alternative.The line shows the best available speed-accuracy tradeoffs.

Initial Program: 61.2% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \frac{x.re \cdot y.re + x.im \cdot y.im}{y.re \cdot y.re + y.im \cdot y.im} \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))))
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));
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(x_46re, x_46im, y_46re, y_46im)
use fmin_fmax_functions
    real(8), intent (in) :: x_46re
    real(8), intent (in) :: x_46im
    real(8), intent (in) :: y_46re
    real(8), intent (in) :: y_46im
    code = ((x_46re * y_46re) + (x_46im * y_46im)) / ((y_46re * y_46re) + (y_46im * y_46im))
end function
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));
}
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))
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 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
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]
\begin{array}{l}

\\
\frac{x.re \cdot y.re + x.im \cdot y.im}{y.re \cdot y.re + y.im \cdot y.im}
\end{array}

Alternative 1: 82.7% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{\mathsf{fma}\left(y.im, x.im, y.re \cdot x.re\right)}{\mathsf{fma}\left(y.im, y.im, y.re \cdot y.re\right)}\\ t_1 := \frac{\mathsf{fma}\left(y.re, \frac{x.re}{y.im}, x.im\right)}{y.im}\\ \mathbf{if}\;y.im \leq -5.8 \cdot 10^{+106}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y.im \leq -6.8 \cdot 10^{-109}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;y.im \leq 8.5 \cdot 10^{-149}:\\ \;\;\;\;\frac{\mathsf{fma}\left(\frac{y.im}{y.re}, x.im, x.re\right)}{y.re}\\ \mathbf{elif}\;y.im \leq 6 \cdot 10^{+84}:\\ \;\;\;\;t\_0\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x.re x.im y.re y.im)
 :precision binary64
 (let* ((t_0 (/ (fma y.im x.im (* y.re x.re)) (fma y.im y.im (* y.re y.re))))
        (t_1 (/ (fma y.re (/ x.re y.im) x.im) y.im)))
   (if (<= y.im -5.8e+106)
     t_1
     (if (<= y.im -6.8e-109)
       t_0
       (if (<= y.im 8.5e-149)
         (/ (fma (/ y.im y.re) x.im x.re) y.re)
         (if (<= y.im 6e+84) t_0 t_1))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
	double t_0 = fma(y_46_im, x_46_im, (y_46_re * x_46_re)) / fma(y_46_im, y_46_im, (y_46_re * y_46_re));
	double t_1 = fma(y_46_re, (x_46_re / y_46_im), x_46_im) / y_46_im;
	double tmp;
	if (y_46_im <= -5.8e+106) {
		tmp = t_1;
	} else if (y_46_im <= -6.8e-109) {
		tmp = t_0;
	} else if (y_46_im <= 8.5e-149) {
		tmp = fma((y_46_im / y_46_re), x_46_im, x_46_re) / y_46_re;
	} else if (y_46_im <= 6e+84) {
		tmp = t_0;
	} else {
		tmp = t_1;
	}
	return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im)
	t_0 = Float64(fma(y_46_im, x_46_im, Float64(y_46_re * x_46_re)) / fma(y_46_im, y_46_im, Float64(y_46_re * y_46_re)))
	t_1 = Float64(fma(y_46_re, Float64(x_46_re / y_46_im), x_46_im) / y_46_im)
	tmp = 0.0
	if (y_46_im <= -5.8e+106)
		tmp = t_1;
	elseif (y_46_im <= -6.8e-109)
		tmp = t_0;
	elseif (y_46_im <= 8.5e-149)
		tmp = Float64(fma(Float64(y_46_im / y_46_re), x_46_im, x_46_re) / y_46_re);
	elseif (y_46_im <= 6e+84)
		tmp = t_0;
	else
		tmp = t_1;
	end
	return tmp
end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[(y$46$im * x$46$im + N[(y$46$re * x$46$re), $MachinePrecision]), $MachinePrecision] / N[(y$46$im * y$46$im + N[(y$46$re * y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(y$46$re * N[(x$46$re / y$46$im), $MachinePrecision] + x$46$im), $MachinePrecision] / y$46$im), $MachinePrecision]}, If[LessEqual[y$46$im, -5.8e+106], t$95$1, If[LessEqual[y$46$im, -6.8e-109], t$95$0, If[LessEqual[y$46$im, 8.5e-149], N[(N[(N[(y$46$im / y$46$re), $MachinePrecision] * x$46$im + x$46$re), $MachinePrecision] / y$46$re), $MachinePrecision], If[LessEqual[y$46$im, 6e+84], t$95$0, t$95$1]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \frac{\mathsf{fma}\left(y.im, x.im, y.re \cdot x.re\right)}{\mathsf{fma}\left(y.im, y.im, y.re \cdot y.re\right)}\\
t_1 := \frac{\mathsf{fma}\left(y.re, \frac{x.re}{y.im}, x.im\right)}{y.im}\\
\mathbf{if}\;y.im \leq -5.8 \cdot 10^{+106}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y.im \leq -6.8 \cdot 10^{-109}:\\
\;\;\;\;t\_0\\

\mathbf{elif}\;y.im \leq 8.5 \cdot 10^{-149}:\\
\;\;\;\;\frac{\mathsf{fma}\left(\frac{y.im}{y.re}, x.im, x.re\right)}{y.re}\\

\mathbf{elif}\;y.im \leq 6 \cdot 10^{+84}:\\
\;\;\;\;t\_0\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y.im < -5.8000000000000004e106 or 5.99999999999999992e84 < y.im

    1. Initial program 39.5%

      \[\frac{x.re \cdot y.re + x.im \cdot y.im}{y.re \cdot y.re + y.im \cdot y.im} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. lift-+.f64N/A

        \[\leadsto \frac{\color{blue}{x.re \cdot y.re + x.im \cdot y.im}}{y.re \cdot y.re + y.im \cdot y.im} \]
      2. +-commutativeN/A

        \[\leadsto \frac{\color{blue}{x.im \cdot y.im + x.re \cdot y.re}}{y.re \cdot y.re + y.im \cdot y.im} \]
      3. lift-*.f64N/A

        \[\leadsto \frac{\color{blue}{x.im \cdot y.im} + x.re \cdot y.re}{y.re \cdot y.re + y.im \cdot y.im} \]
      4. *-commutativeN/A

        \[\leadsto \frac{\color{blue}{y.im \cdot x.im} + x.re \cdot y.re}{y.re \cdot y.re + y.im \cdot y.im} \]
      5. lower-fma.f6439.5

        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(y.im, x.im, x.re \cdot y.re\right)}}{y.re \cdot y.re + y.im \cdot y.im} \]
      6. lift-*.f64N/A

        \[\leadsto \frac{\mathsf{fma}\left(y.im, x.im, \color{blue}{x.re \cdot y.re}\right)}{y.re \cdot y.re + y.im \cdot y.im} \]
      7. *-commutativeN/A

        \[\leadsto \frac{\mathsf{fma}\left(y.im, x.im, \color{blue}{y.re \cdot x.re}\right)}{y.re \cdot y.re + y.im \cdot y.im} \]
      8. lower-*.f6439.5

        \[\leadsto \frac{\mathsf{fma}\left(y.im, x.im, \color{blue}{y.re \cdot x.re}\right)}{y.re \cdot y.re + y.im \cdot y.im} \]
      9. lift-+.f64N/A

        \[\leadsto \frac{\mathsf{fma}\left(y.im, x.im, y.re \cdot x.re\right)}{\color{blue}{y.re \cdot y.re + y.im \cdot y.im}} \]
      10. +-commutativeN/A

        \[\leadsto \frac{\mathsf{fma}\left(y.im, x.im, y.re \cdot x.re\right)}{\color{blue}{y.im \cdot y.im + y.re \cdot y.re}} \]
      11. lift-*.f64N/A

        \[\leadsto \frac{\mathsf{fma}\left(y.im, x.im, y.re \cdot x.re\right)}{\color{blue}{y.im \cdot y.im} + y.re \cdot y.re} \]
      12. lower-fma.f6439.5

        \[\leadsto \frac{\mathsf{fma}\left(y.im, x.im, y.re \cdot x.re\right)}{\color{blue}{\mathsf{fma}\left(y.im, y.im, y.re \cdot y.re\right)}} \]
    4. Applied rewrites39.5%

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

      \[\leadsto \color{blue}{\frac{x.im}{y.im} + \frac{x.re \cdot y.re}{{y.im}^{2}}} \]
    6. Step-by-step derivation
      1. Applied rewrites80.7%

        \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\frac{y.re}{y.im}, x.re, x.im\right)}{y.im}} \]
      2. Step-by-step derivation
        1. Applied rewrites82.8%

          \[\leadsto \frac{\mathsf{fma}\left(y.re, \frac{x.re}{y.im}, x.im\right)}{y.im} \]

        if -5.8000000000000004e106 < y.im < -6.80000000000000023e-109 or 8.5000000000000006e-149 < y.im < 5.99999999999999992e84

        1. Initial program 83.5%

          \[\frac{x.re \cdot y.re + x.im \cdot y.im}{y.re \cdot y.re + y.im \cdot y.im} \]
        2. Add Preprocessing
        3. Step-by-step derivation
          1. lift-+.f64N/A

            \[\leadsto \frac{\color{blue}{x.re \cdot y.re + x.im \cdot y.im}}{y.re \cdot y.re + y.im \cdot y.im} \]
          2. +-commutativeN/A

            \[\leadsto \frac{\color{blue}{x.im \cdot y.im + x.re \cdot y.re}}{y.re \cdot y.re + y.im \cdot y.im} \]
          3. lift-*.f64N/A

            \[\leadsto \frac{\color{blue}{x.im \cdot y.im} + x.re \cdot y.re}{y.re \cdot y.re + y.im \cdot y.im} \]
          4. *-commutativeN/A

            \[\leadsto \frac{\color{blue}{y.im \cdot x.im} + x.re \cdot y.re}{y.re \cdot y.re + y.im \cdot y.im} \]
          5. lower-fma.f6483.6

            \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(y.im, x.im, x.re \cdot y.re\right)}}{y.re \cdot y.re + y.im \cdot y.im} \]
          6. lift-*.f64N/A

            \[\leadsto \frac{\mathsf{fma}\left(y.im, x.im, \color{blue}{x.re \cdot y.re}\right)}{y.re \cdot y.re + y.im \cdot y.im} \]
          7. *-commutativeN/A

            \[\leadsto \frac{\mathsf{fma}\left(y.im, x.im, \color{blue}{y.re \cdot x.re}\right)}{y.re \cdot y.re + y.im \cdot y.im} \]
          8. lower-*.f6483.6

            \[\leadsto \frac{\mathsf{fma}\left(y.im, x.im, \color{blue}{y.re \cdot x.re}\right)}{y.re \cdot y.re + y.im \cdot y.im} \]
          9. lift-+.f64N/A

            \[\leadsto \frac{\mathsf{fma}\left(y.im, x.im, y.re \cdot x.re\right)}{\color{blue}{y.re \cdot y.re + y.im \cdot y.im}} \]
          10. +-commutativeN/A

            \[\leadsto \frac{\mathsf{fma}\left(y.im, x.im, y.re \cdot x.re\right)}{\color{blue}{y.im \cdot y.im + y.re \cdot y.re}} \]
          11. lift-*.f64N/A

            \[\leadsto \frac{\mathsf{fma}\left(y.im, x.im, y.re \cdot x.re\right)}{\color{blue}{y.im \cdot y.im} + y.re \cdot y.re} \]
          12. lower-fma.f6483.6

            \[\leadsto \frac{\mathsf{fma}\left(y.im, x.im, y.re \cdot x.re\right)}{\color{blue}{\mathsf{fma}\left(y.im, y.im, y.re \cdot y.re\right)}} \]
        4. Applied rewrites83.6%

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

        if -6.80000000000000023e-109 < y.im < 8.5000000000000006e-149

        1. Initial program 65.9%

          \[\frac{x.re \cdot y.re + x.im \cdot y.im}{y.re \cdot y.re + y.im \cdot y.im} \]
        2. Add Preprocessing
        3. Taylor expanded in y.re around inf

          \[\leadsto \color{blue}{\frac{x.re + \frac{x.im \cdot y.im}{y.re}}{y.re}} \]
        4. Step-by-step derivation
          1. Applied rewrites95.1%

            \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\frac{y.im}{y.re}, x.im, x.re\right)}{y.re}} \]
        5. Recombined 3 regimes into one program.
        6. Final simplification86.7%

          \[\leadsto \begin{array}{l} \mathbf{if}\;y.im \leq -5.8 \cdot 10^{+106}:\\ \;\;\;\;\frac{\mathsf{fma}\left(y.re, \frac{x.re}{y.im}, x.im\right)}{y.im}\\ \mathbf{elif}\;y.im \leq -6.8 \cdot 10^{-109}:\\ \;\;\;\;\frac{\mathsf{fma}\left(y.im, x.im, y.re \cdot x.re\right)}{\mathsf{fma}\left(y.im, y.im, y.re \cdot y.re\right)}\\ \mathbf{elif}\;y.im \leq 8.5 \cdot 10^{-149}:\\ \;\;\;\;\frac{\mathsf{fma}\left(\frac{y.im}{y.re}, x.im, x.re\right)}{y.re}\\ \mathbf{elif}\;y.im \leq 6 \cdot 10^{+84}:\\ \;\;\;\;\frac{\mathsf{fma}\left(y.im, x.im, y.re \cdot x.re\right)}{\mathsf{fma}\left(y.im, y.im, y.re \cdot y.re\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{fma}\left(y.re, \frac{x.re}{y.im}, x.im\right)}{y.im}\\ \end{array} \]
        7. Add Preprocessing

        Alternative 2: 64.8% accurate, 0.7× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} t_0 := \mathsf{fma}\left(y.im, y.im, y.re \cdot y.re\right)\\ \mathbf{if}\;y.im \leq -4.8 \cdot 10^{+125}:\\ \;\;\;\;\frac{x.im}{y.im}\\ \mathbf{elif}\;y.im \leq -5.5 \cdot 10^{-129}:\\ \;\;\;\;\frac{x.im \cdot y.im}{t\_0}\\ \mathbf{elif}\;y.im \leq 2.7 \cdot 10^{-25}:\\ \;\;\;\;\frac{x.re}{y.re}\\ \mathbf{elif}\;y.im \leq 2.2 \cdot 10^{+125}:\\ \;\;\;\;\frac{y.im}{t\_0} \cdot x.im\\ \mathbf{else}:\\ \;\;\;\;\frac{x.im}{y.im}\\ \end{array} \end{array} \]
        (FPCore (x.re x.im y.re y.im)
         :precision binary64
         (let* ((t_0 (fma y.im y.im (* y.re y.re))))
           (if (<= y.im -4.8e+125)
             (/ x.im y.im)
             (if (<= y.im -5.5e-129)
               (/ (* x.im y.im) t_0)
               (if (<= y.im 2.7e-25)
                 (/ x.re y.re)
                 (if (<= y.im 2.2e+125) (* (/ y.im t_0) x.im) (/ x.im y.im)))))))
        double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
        	double t_0 = fma(y_46_im, y_46_im, (y_46_re * y_46_re));
        	double tmp;
        	if (y_46_im <= -4.8e+125) {
        		tmp = x_46_im / y_46_im;
        	} else if (y_46_im <= -5.5e-129) {
        		tmp = (x_46_im * y_46_im) / t_0;
        	} else if (y_46_im <= 2.7e-25) {
        		tmp = x_46_re / y_46_re;
        	} else if (y_46_im <= 2.2e+125) {
        		tmp = (y_46_im / t_0) * x_46_im;
        	} else {
        		tmp = x_46_im / y_46_im;
        	}
        	return tmp;
        }
        
        function code(x_46_re, x_46_im, y_46_re, y_46_im)
        	t_0 = fma(y_46_im, y_46_im, Float64(y_46_re * y_46_re))
        	tmp = 0.0
        	if (y_46_im <= -4.8e+125)
        		tmp = Float64(x_46_im / y_46_im);
        	elseif (y_46_im <= -5.5e-129)
        		tmp = Float64(Float64(x_46_im * y_46_im) / t_0);
        	elseif (y_46_im <= 2.7e-25)
        		tmp = Float64(x_46_re / y_46_re);
        	elseif (y_46_im <= 2.2e+125)
        		tmp = Float64(Float64(y_46_im / t_0) * x_46_im);
        	else
        		tmp = Float64(x_46_im / y_46_im);
        	end
        	return tmp
        end
        
        code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$im * y$46$im + N[(y$46$re * y$46$re), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -4.8e+125], N[(x$46$im / y$46$im), $MachinePrecision], If[LessEqual[y$46$im, -5.5e-129], N[(N[(x$46$im * y$46$im), $MachinePrecision] / t$95$0), $MachinePrecision], If[LessEqual[y$46$im, 2.7e-25], N[(x$46$re / y$46$re), $MachinePrecision], If[LessEqual[y$46$im, 2.2e+125], N[(N[(y$46$im / t$95$0), $MachinePrecision] * x$46$im), $MachinePrecision], N[(x$46$im / y$46$im), $MachinePrecision]]]]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        t_0 := \mathsf{fma}\left(y.im, y.im, y.re \cdot y.re\right)\\
        \mathbf{if}\;y.im \leq -4.8 \cdot 10^{+125}:\\
        \;\;\;\;\frac{x.im}{y.im}\\
        
        \mathbf{elif}\;y.im \leq -5.5 \cdot 10^{-129}:\\
        \;\;\;\;\frac{x.im \cdot y.im}{t\_0}\\
        
        \mathbf{elif}\;y.im \leq 2.7 \cdot 10^{-25}:\\
        \;\;\;\;\frac{x.re}{y.re}\\
        
        \mathbf{elif}\;y.im \leq 2.2 \cdot 10^{+125}:\\
        \;\;\;\;\frac{y.im}{t\_0} \cdot x.im\\
        
        \mathbf{else}:\\
        \;\;\;\;\frac{x.im}{y.im}\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 4 regimes
        2. if y.im < -4.7999999999999999e125 or 2.19999999999999991e125 < y.im

          1. Initial program 40.3%

            \[\frac{x.re \cdot y.re + x.im \cdot y.im}{y.re \cdot y.re + y.im \cdot y.im} \]
          2. Add Preprocessing
          3. Taylor expanded in y.re around 0

            \[\leadsto \color{blue}{\frac{x.im}{y.im}} \]
          4. Step-by-step derivation
            1. Applied rewrites73.7%

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

            if -4.7999999999999999e125 < y.im < -5.50000000000000023e-129

            1. Initial program 80.4%

              \[\frac{x.re \cdot y.re + x.im \cdot y.im}{y.re \cdot y.re + y.im \cdot y.im} \]
            2. Add Preprocessing
            3. Step-by-step derivation
              1. lift-+.f64N/A

                \[\leadsto \frac{\color{blue}{x.re \cdot y.re + x.im \cdot y.im}}{y.re \cdot y.re + y.im \cdot y.im} \]
              2. +-commutativeN/A

                \[\leadsto \frac{\color{blue}{x.im \cdot y.im + x.re \cdot y.re}}{y.re \cdot y.re + y.im \cdot y.im} \]
              3. lift-*.f64N/A

                \[\leadsto \frac{\color{blue}{x.im \cdot y.im} + x.re \cdot y.re}{y.re \cdot y.re + y.im \cdot y.im} \]
              4. *-commutativeN/A

                \[\leadsto \frac{\color{blue}{y.im \cdot x.im} + x.re \cdot y.re}{y.re \cdot y.re + y.im \cdot y.im} \]
              5. lower-fma.f6480.4

                \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(y.im, x.im, x.re \cdot y.re\right)}}{y.re \cdot y.re + y.im \cdot y.im} \]
              6. lift-*.f64N/A

                \[\leadsto \frac{\mathsf{fma}\left(y.im, x.im, \color{blue}{x.re \cdot y.re}\right)}{y.re \cdot y.re + y.im \cdot y.im} \]
              7. *-commutativeN/A

                \[\leadsto \frac{\mathsf{fma}\left(y.im, x.im, \color{blue}{y.re \cdot x.re}\right)}{y.re \cdot y.re + y.im \cdot y.im} \]
              8. lower-*.f6480.4

                \[\leadsto \frac{\mathsf{fma}\left(y.im, x.im, \color{blue}{y.re \cdot x.re}\right)}{y.re \cdot y.re + y.im \cdot y.im} \]
              9. lift-+.f64N/A

                \[\leadsto \frac{\mathsf{fma}\left(y.im, x.im, y.re \cdot x.re\right)}{\color{blue}{y.re \cdot y.re + y.im \cdot y.im}} \]
              10. +-commutativeN/A

                \[\leadsto \frac{\mathsf{fma}\left(y.im, x.im, y.re \cdot x.re\right)}{\color{blue}{y.im \cdot y.im + y.re \cdot y.re}} \]
              11. lift-*.f64N/A

                \[\leadsto \frac{\mathsf{fma}\left(y.im, x.im, y.re \cdot x.re\right)}{\color{blue}{y.im \cdot y.im} + y.re \cdot y.re} \]
              12. lower-fma.f6480.4

                \[\leadsto \frac{\mathsf{fma}\left(y.im, x.im, y.re \cdot x.re\right)}{\color{blue}{\mathsf{fma}\left(y.im, y.im, y.re \cdot y.re\right)}} \]
            4. Applied rewrites80.4%

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

              \[\leadsto \frac{\color{blue}{x.im \cdot y.im}}{\mathsf{fma}\left(y.im, y.im, y.re \cdot y.re\right)} \]
            6. Step-by-step derivation
              1. Applied rewrites64.0%

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

              if -5.50000000000000023e-129 < y.im < 2.70000000000000016e-25

              1. Initial program 69.5%

                \[\frac{x.re \cdot y.re + x.im \cdot y.im}{y.re \cdot y.re + y.im \cdot y.im} \]
              2. Add Preprocessing
              3. Taylor expanded in y.re around inf

                \[\leadsto \color{blue}{\frac{x.re}{y.re}} \]
              4. Step-by-step derivation
                1. Applied rewrites73.9%

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

                if 2.70000000000000016e-25 < y.im < 2.19999999999999991e125

                1. Initial program 74.4%

                  \[\frac{x.re \cdot y.re + x.im \cdot y.im}{y.re \cdot y.re + y.im \cdot y.im} \]
                2. Add Preprocessing
                3. Taylor expanded in x.re around 0

                  \[\leadsto \color{blue}{\frac{x.im \cdot y.im}{{y.im}^{2} + {y.re}^{2}}} \]
                4. Step-by-step derivation
                  1. Applied rewrites65.3%

                    \[\leadsto \color{blue}{\frac{y.im}{\mathsf{fma}\left(y.im, y.im, y.re \cdot y.re\right)} \cdot x.im} \]
                5. Recombined 4 regimes into one program.
                6. Add Preprocessing

                Alternative 3: 77.9% accurate, 0.9× speedup?

                \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y.im \leq -2.55 \cdot 10^{-22} \lor \neg \left(y.im \leq 2.65 \cdot 10^{+44}\right):\\ \;\;\;\;\frac{\mathsf{fma}\left(y.re, \frac{x.re}{y.im}, x.im\right)}{y.im}\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{fma}\left(\frac{y.im}{y.re}, x.im, x.re\right)}{y.re}\\ \end{array} \end{array} \]
                (FPCore (x.re x.im y.re y.im)
                 :precision binary64
                 (if (or (<= y.im -2.55e-22) (not (<= y.im 2.65e+44)))
                   (/ (fma y.re (/ x.re y.im) x.im) y.im)
                   (/ (fma (/ y.im y.re) x.im x.re) y.re)))
                double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
                	double tmp;
                	if ((y_46_im <= -2.55e-22) || !(y_46_im <= 2.65e+44)) {
                		tmp = fma(y_46_re, (x_46_re / y_46_im), x_46_im) / y_46_im;
                	} else {
                		tmp = fma((y_46_im / y_46_re), x_46_im, x_46_re) / y_46_re;
                	}
                	return tmp;
                }
                
                function code(x_46_re, x_46_im, y_46_re, y_46_im)
                	tmp = 0.0
                	if ((y_46_im <= -2.55e-22) || !(y_46_im <= 2.65e+44))
                		tmp = Float64(fma(y_46_re, Float64(x_46_re / y_46_im), x_46_im) / y_46_im);
                	else
                		tmp = Float64(fma(Float64(y_46_im / y_46_re), x_46_im, x_46_re) / y_46_re);
                	end
                	return tmp
                end
                
                code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[Or[LessEqual[y$46$im, -2.55e-22], N[Not[LessEqual[y$46$im, 2.65e+44]], $MachinePrecision]], N[(N[(y$46$re * N[(x$46$re / y$46$im), $MachinePrecision] + x$46$im), $MachinePrecision] / y$46$im), $MachinePrecision], N[(N[(N[(y$46$im / y$46$re), $MachinePrecision] * x$46$im + x$46$re), $MachinePrecision] / y$46$re), $MachinePrecision]]
                
                \begin{array}{l}
                
                \\
                \begin{array}{l}
                \mathbf{if}\;y.im \leq -2.55 \cdot 10^{-22} \lor \neg \left(y.im \leq 2.65 \cdot 10^{+44}\right):\\
                \;\;\;\;\frac{\mathsf{fma}\left(y.re, \frac{x.re}{y.im}, x.im\right)}{y.im}\\
                
                \mathbf{else}:\\
                \;\;\;\;\frac{\mathsf{fma}\left(\frac{y.im}{y.re}, x.im, x.re\right)}{y.re}\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 2 regimes
                2. if y.im < -2.55000000000000011e-22 or 2.65e44 < y.im

                  1. Initial program 49.8%

                    \[\frac{x.re \cdot y.re + x.im \cdot y.im}{y.re \cdot y.re + y.im \cdot y.im} \]
                  2. Add Preprocessing
                  3. Step-by-step derivation
                    1. lift-+.f64N/A

                      \[\leadsto \frac{\color{blue}{x.re \cdot y.re + x.im \cdot y.im}}{y.re \cdot y.re + y.im \cdot y.im} \]
                    2. +-commutativeN/A

                      \[\leadsto \frac{\color{blue}{x.im \cdot y.im + x.re \cdot y.re}}{y.re \cdot y.re + y.im \cdot y.im} \]
                    3. lift-*.f64N/A

                      \[\leadsto \frac{\color{blue}{x.im \cdot y.im} + x.re \cdot y.re}{y.re \cdot y.re + y.im \cdot y.im} \]
                    4. *-commutativeN/A

                      \[\leadsto \frac{\color{blue}{y.im \cdot x.im} + x.re \cdot y.re}{y.re \cdot y.re + y.im \cdot y.im} \]
                    5. lower-fma.f6449.8

                      \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(y.im, x.im, x.re \cdot y.re\right)}}{y.re \cdot y.re + y.im \cdot y.im} \]
                    6. lift-*.f64N/A

                      \[\leadsto \frac{\mathsf{fma}\left(y.im, x.im, \color{blue}{x.re \cdot y.re}\right)}{y.re \cdot y.re + y.im \cdot y.im} \]
                    7. *-commutativeN/A

                      \[\leadsto \frac{\mathsf{fma}\left(y.im, x.im, \color{blue}{y.re \cdot x.re}\right)}{y.re \cdot y.re + y.im \cdot y.im} \]
                    8. lower-*.f6449.8

                      \[\leadsto \frac{\mathsf{fma}\left(y.im, x.im, \color{blue}{y.re \cdot x.re}\right)}{y.re \cdot y.re + y.im \cdot y.im} \]
                    9. lift-+.f64N/A

                      \[\leadsto \frac{\mathsf{fma}\left(y.im, x.im, y.re \cdot x.re\right)}{\color{blue}{y.re \cdot y.re + y.im \cdot y.im}} \]
                    10. +-commutativeN/A

                      \[\leadsto \frac{\mathsf{fma}\left(y.im, x.im, y.re \cdot x.re\right)}{\color{blue}{y.im \cdot y.im + y.re \cdot y.re}} \]
                    11. lift-*.f64N/A

                      \[\leadsto \frac{\mathsf{fma}\left(y.im, x.im, y.re \cdot x.re\right)}{\color{blue}{y.im \cdot y.im} + y.re \cdot y.re} \]
                    12. lower-fma.f6449.8

                      \[\leadsto \frac{\mathsf{fma}\left(y.im, x.im, y.re \cdot x.re\right)}{\color{blue}{\mathsf{fma}\left(y.im, y.im, y.re \cdot y.re\right)}} \]
                  4. Applied rewrites49.8%

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

                    \[\leadsto \color{blue}{\frac{x.im}{y.im} + \frac{x.re \cdot y.re}{{y.im}^{2}}} \]
                  6. Step-by-step derivation
                    1. Applied rewrites75.8%

                      \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\frac{y.re}{y.im}, x.re, x.im\right)}{y.im}} \]
                    2. Step-by-step derivation
                      1. Applied rewrites77.4%

                        \[\leadsto \frac{\mathsf{fma}\left(y.re, \frac{x.re}{y.im}, x.im\right)}{y.im} \]

                      if -2.55000000000000011e-22 < y.im < 2.65e44

                      1. Initial program 75.3%

                        \[\frac{x.re \cdot y.re + x.im \cdot y.im}{y.re \cdot y.re + y.im \cdot y.im} \]
                      2. Add Preprocessing
                      3. Taylor expanded in y.re around inf

                        \[\leadsto \color{blue}{\frac{x.re + \frac{x.im \cdot y.im}{y.re}}{y.re}} \]
                      4. Step-by-step derivation
                        1. Applied rewrites83.7%

                          \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\frac{y.im}{y.re}, x.im, x.re\right)}{y.re}} \]
                      5. Recombined 2 regimes into one program.
                      6. Final simplification80.9%

                        \[\leadsto \begin{array}{l} \mathbf{if}\;y.im \leq -2.55 \cdot 10^{-22} \lor \neg \left(y.im \leq 2.65 \cdot 10^{+44}\right):\\ \;\;\;\;\frac{\mathsf{fma}\left(y.re, \frac{x.re}{y.im}, x.im\right)}{y.im}\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{fma}\left(\frac{y.im}{y.re}, x.im, x.re\right)}{y.re}\\ \end{array} \]
                      7. Add Preprocessing

                      Alternative 4: 76.5% accurate, 0.9× speedup?

                      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y.re \leq -4.6 \cdot 10^{+62} \lor \neg \left(y.re \leq 2.7 \cdot 10^{+88}\right):\\ \;\;\;\;\frac{\mathsf{fma}\left(\frac{y.im}{y.re}, x.im, x.re\right)}{y.re}\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{fma}\left(\frac{y.re}{y.im}, x.re, x.im\right)}{y.im}\\ \end{array} \end{array} \]
                      (FPCore (x.re x.im y.re y.im)
                       :precision binary64
                       (if (or (<= y.re -4.6e+62) (not (<= y.re 2.7e+88)))
                         (/ (fma (/ y.im y.re) x.im x.re) y.re)
                         (/ (fma (/ y.re y.im) x.re x.im) y.im)))
                      double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
                      	double tmp;
                      	if ((y_46_re <= -4.6e+62) || !(y_46_re <= 2.7e+88)) {
                      		tmp = fma((y_46_im / y_46_re), x_46_im, x_46_re) / y_46_re;
                      	} else {
                      		tmp = fma((y_46_re / y_46_im), x_46_re, x_46_im) / y_46_im;
                      	}
                      	return tmp;
                      }
                      
                      function code(x_46_re, x_46_im, y_46_re, y_46_im)
                      	tmp = 0.0
                      	if ((y_46_re <= -4.6e+62) || !(y_46_re <= 2.7e+88))
                      		tmp = Float64(fma(Float64(y_46_im / y_46_re), x_46_im, x_46_re) / y_46_re);
                      	else
                      		tmp = Float64(fma(Float64(y_46_re / y_46_im), x_46_re, x_46_im) / y_46_im);
                      	end
                      	return tmp
                      end
                      
                      code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[Or[LessEqual[y$46$re, -4.6e+62], N[Not[LessEqual[y$46$re, 2.7e+88]], $MachinePrecision]], N[(N[(N[(y$46$im / y$46$re), $MachinePrecision] * x$46$im + x$46$re), $MachinePrecision] / y$46$re), $MachinePrecision], N[(N[(N[(y$46$re / y$46$im), $MachinePrecision] * x$46$re + x$46$im), $MachinePrecision] / y$46$im), $MachinePrecision]]
                      
                      \begin{array}{l}
                      
                      \\
                      \begin{array}{l}
                      \mathbf{if}\;y.re \leq -4.6 \cdot 10^{+62} \lor \neg \left(y.re \leq 2.7 \cdot 10^{+88}\right):\\
                      \;\;\;\;\frac{\mathsf{fma}\left(\frac{y.im}{y.re}, x.im, x.re\right)}{y.re}\\
                      
                      \mathbf{else}:\\
                      \;\;\;\;\frac{\mathsf{fma}\left(\frac{y.re}{y.im}, x.re, x.im\right)}{y.im}\\
                      
                      
                      \end{array}
                      \end{array}
                      
                      Derivation
                      1. Split input into 2 regimes
                      2. if y.re < -4.59999999999999968e62 or 2.70000000000000016e88 < y.re

                        1. Initial program 47.5%

                          \[\frac{x.re \cdot y.re + x.im \cdot y.im}{y.re \cdot y.re + y.im \cdot y.im} \]
                        2. Add Preprocessing
                        3. Taylor expanded in y.re around inf

                          \[\leadsto \color{blue}{\frac{x.re + \frac{x.im \cdot y.im}{y.re}}{y.re}} \]
                        4. Step-by-step derivation
                          1. Applied rewrites88.1%

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

                          if -4.59999999999999968e62 < y.re < 2.70000000000000016e88

                          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. Add Preprocessing
                          3. Taylor expanded in y.re around 0

                            \[\leadsto \color{blue}{\frac{x.im}{y.im} + \frac{x.re \cdot y.re}{{y.im}^{2}}} \]
                          4. Step-by-step derivation
                            1. Applied rewrites75.6%

                              \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\frac{y.re}{y.im}, x.re, x.im\right)}{y.im}} \]
                          5. Recombined 2 regimes into one program.
                          6. Final simplification80.7%

                            \[\leadsto \begin{array}{l} \mathbf{if}\;y.re \leq -4.6 \cdot 10^{+62} \lor \neg \left(y.re \leq 2.7 \cdot 10^{+88}\right):\\ \;\;\;\;\frac{\mathsf{fma}\left(\frac{y.im}{y.re}, x.im, x.re\right)}{y.re}\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{fma}\left(\frac{y.re}{y.im}, x.re, x.im\right)}{y.im}\\ \end{array} \]
                          7. Add Preprocessing

                          Alternative 5: 71.1% accurate, 0.9× speedup?

                          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y.im \leq -2 \cdot 10^{+131} \lor \neg \left(y.im \leq 2.3 \cdot 10^{+133}\right):\\ \;\;\;\;\frac{x.im}{y.im}\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{fma}\left(\frac{y.im}{y.re}, x.im, x.re\right)}{y.re}\\ \end{array} \end{array} \]
                          (FPCore (x.re x.im y.re y.im)
                           :precision binary64
                           (if (or (<= y.im -2e+131) (not (<= y.im 2.3e+133)))
                             (/ x.im y.im)
                             (/ (fma (/ y.im y.re) x.im x.re) y.re)))
                          double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
                          	double tmp;
                          	if ((y_46_im <= -2e+131) || !(y_46_im <= 2.3e+133)) {
                          		tmp = x_46_im / y_46_im;
                          	} else {
                          		tmp = fma((y_46_im / y_46_re), x_46_im, x_46_re) / y_46_re;
                          	}
                          	return tmp;
                          }
                          
                          function code(x_46_re, x_46_im, y_46_re, y_46_im)
                          	tmp = 0.0
                          	if ((y_46_im <= -2e+131) || !(y_46_im <= 2.3e+133))
                          		tmp = Float64(x_46_im / y_46_im);
                          	else
                          		tmp = Float64(fma(Float64(y_46_im / y_46_re), x_46_im, x_46_re) / y_46_re);
                          	end
                          	return tmp
                          end
                          
                          code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[Or[LessEqual[y$46$im, -2e+131], N[Not[LessEqual[y$46$im, 2.3e+133]], $MachinePrecision]], N[(x$46$im / y$46$im), $MachinePrecision], N[(N[(N[(y$46$im / y$46$re), $MachinePrecision] * x$46$im + x$46$re), $MachinePrecision] / y$46$re), $MachinePrecision]]
                          
                          \begin{array}{l}
                          
                          \\
                          \begin{array}{l}
                          \mathbf{if}\;y.im \leq -2 \cdot 10^{+131} \lor \neg \left(y.im \leq 2.3 \cdot 10^{+133}\right):\\
                          \;\;\;\;\frac{x.im}{y.im}\\
                          
                          \mathbf{else}:\\
                          \;\;\;\;\frac{\mathsf{fma}\left(\frac{y.im}{y.re}, x.im, x.re\right)}{y.re}\\
                          
                          
                          \end{array}
                          \end{array}
                          
                          Derivation
                          1. Split input into 2 regimes
                          2. if y.im < -1.9999999999999998e131 or 2.2999999999999999e133 < y.im

                            1. Initial program 40.0%

                              \[\frac{x.re \cdot y.re + x.im \cdot y.im}{y.re \cdot y.re + y.im \cdot y.im} \]
                            2. Add Preprocessing
                            3. Taylor expanded in y.re around 0

                              \[\leadsto \color{blue}{\frac{x.im}{y.im}} \]
                            4. Step-by-step derivation
                              1. Applied rewrites78.1%

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

                              if -1.9999999999999998e131 < y.im < 2.2999999999999999e133

                              1. Initial program 72.3%

                                \[\frac{x.re \cdot y.re + x.im \cdot y.im}{y.re \cdot y.re + y.im \cdot y.im} \]
                              2. Add Preprocessing
                              3. Taylor expanded in y.re around inf

                                \[\leadsto \color{blue}{\frac{x.re + \frac{x.im \cdot y.im}{y.re}}{y.re}} \]
                              4. Step-by-step derivation
                                1. Applied rewrites74.7%

                                  \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\frac{y.im}{y.re}, x.im, x.re\right)}{y.re}} \]
                              5. Recombined 2 regimes into one program.
                              6. Final simplification75.6%

                                \[\leadsto \begin{array}{l} \mathbf{if}\;y.im \leq -2 \cdot 10^{+131} \lor \neg \left(y.im \leq 2.3 \cdot 10^{+133}\right):\\ \;\;\;\;\frac{x.im}{y.im}\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{fma}\left(\frac{y.im}{y.re}, x.im, x.re\right)}{y.re}\\ \end{array} \]
                              7. Add Preprocessing

                              Alternative 6: 62.8% accurate, 0.9× speedup?

                              \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y.re \leq -6 \cdot 10^{+154}:\\ \;\;\;\;\frac{x.re}{y.re}\\ \mathbf{elif}\;y.re \leq -5.4 \cdot 10^{+38}:\\ \;\;\;\;\frac{\mathsf{fma}\left(y.im, x.im, y.re \cdot x.re\right)}{y.re \cdot y.re}\\ \mathbf{elif}\;y.re \leq 2.7 \cdot 10^{+88}:\\ \;\;\;\;\frac{x.im}{y.im}\\ \mathbf{else}:\\ \;\;\;\;\frac{x.re}{y.re}\\ \end{array} \end{array} \]
                              (FPCore (x.re x.im y.re y.im)
                               :precision binary64
                               (if (<= y.re -6e+154)
                                 (/ x.re y.re)
                                 (if (<= y.re -5.4e+38)
                                   (/ (fma y.im x.im (* y.re x.re)) (* y.re y.re))
                                   (if (<= y.re 2.7e+88) (/ x.im y.im) (/ x.re y.re)))))
                              double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
                              	double tmp;
                              	if (y_46_re <= -6e+154) {
                              		tmp = x_46_re / y_46_re;
                              	} else if (y_46_re <= -5.4e+38) {
                              		tmp = fma(y_46_im, x_46_im, (y_46_re * x_46_re)) / (y_46_re * y_46_re);
                              	} else if (y_46_re <= 2.7e+88) {
                              		tmp = x_46_im / y_46_im;
                              	} else {
                              		tmp = x_46_re / y_46_re;
                              	}
                              	return tmp;
                              }
                              
                              function code(x_46_re, x_46_im, y_46_re, y_46_im)
                              	tmp = 0.0
                              	if (y_46_re <= -6e+154)
                              		tmp = Float64(x_46_re / y_46_re);
                              	elseif (y_46_re <= -5.4e+38)
                              		tmp = Float64(fma(y_46_im, x_46_im, Float64(y_46_re * x_46_re)) / Float64(y_46_re * y_46_re));
                              	elseif (y_46_re <= 2.7e+88)
                              		tmp = Float64(x_46_im / y_46_im);
                              	else
                              		tmp = Float64(x_46_re / y_46_re);
                              	end
                              	return tmp
                              end
                              
                              code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[y$46$re, -6e+154], N[(x$46$re / y$46$re), $MachinePrecision], If[LessEqual[y$46$re, -5.4e+38], N[(N[(y$46$im * x$46$im + N[(y$46$re * x$46$re), $MachinePrecision]), $MachinePrecision] / N[(y$46$re * y$46$re), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 2.7e+88], N[(x$46$im / y$46$im), $MachinePrecision], N[(x$46$re / y$46$re), $MachinePrecision]]]]
                              
                              \begin{array}{l}
                              
                              \\
                              \begin{array}{l}
                              \mathbf{if}\;y.re \leq -6 \cdot 10^{+154}:\\
                              \;\;\;\;\frac{x.re}{y.re}\\
                              
                              \mathbf{elif}\;y.re \leq -5.4 \cdot 10^{+38}:\\
                              \;\;\;\;\frac{\mathsf{fma}\left(y.im, x.im, y.re \cdot x.re\right)}{y.re \cdot y.re}\\
                              
                              \mathbf{elif}\;y.re \leq 2.7 \cdot 10^{+88}:\\
                              \;\;\;\;\frac{x.im}{y.im}\\
                              
                              \mathbf{else}:\\
                              \;\;\;\;\frac{x.re}{y.re}\\
                              
                              
                              \end{array}
                              \end{array}
                              
                              Derivation
                              1. Split input into 3 regimes
                              2. if y.re < -6.00000000000000052e154 or 2.70000000000000016e88 < y.re

                                1. Initial program 39.9%

                                  \[\frac{x.re \cdot y.re + x.im \cdot y.im}{y.re \cdot y.re + y.im \cdot y.im} \]
                                2. Add Preprocessing
                                3. Taylor expanded in y.re around inf

                                  \[\leadsto \color{blue}{\frac{x.re}{y.re}} \]
                                4. Step-by-step derivation
                                  1. Applied rewrites81.6%

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

                                  if -6.00000000000000052e154 < y.re < -5.39999999999999992e38

                                  1. Initial program 81.4%

                                    \[\frac{x.re \cdot y.re + x.im \cdot y.im}{y.re \cdot y.re + y.im \cdot y.im} \]
                                  2. Add Preprocessing
                                  3. Step-by-step derivation
                                    1. lift-+.f64N/A

                                      \[\leadsto \frac{\color{blue}{x.re \cdot y.re + x.im \cdot y.im}}{y.re \cdot y.re + y.im \cdot y.im} \]
                                    2. +-commutativeN/A

                                      \[\leadsto \frac{\color{blue}{x.im \cdot y.im + x.re \cdot y.re}}{y.re \cdot y.re + y.im \cdot y.im} \]
                                    3. lift-*.f64N/A

                                      \[\leadsto \frac{\color{blue}{x.im \cdot y.im} + x.re \cdot y.re}{y.re \cdot y.re + y.im \cdot y.im} \]
                                    4. *-commutativeN/A

                                      \[\leadsto \frac{\color{blue}{y.im \cdot x.im} + x.re \cdot y.re}{y.re \cdot y.re + y.im \cdot y.im} \]
                                    5. lower-fma.f6481.4

                                      \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(y.im, x.im, x.re \cdot y.re\right)}}{y.re \cdot y.re + y.im \cdot y.im} \]
                                    6. lift-*.f64N/A

                                      \[\leadsto \frac{\mathsf{fma}\left(y.im, x.im, \color{blue}{x.re \cdot y.re}\right)}{y.re \cdot y.re + y.im \cdot y.im} \]
                                    7. *-commutativeN/A

                                      \[\leadsto \frac{\mathsf{fma}\left(y.im, x.im, \color{blue}{y.re \cdot x.re}\right)}{y.re \cdot y.re + y.im \cdot y.im} \]
                                    8. lower-*.f6481.4

                                      \[\leadsto \frac{\mathsf{fma}\left(y.im, x.im, \color{blue}{y.re \cdot x.re}\right)}{y.re \cdot y.re + y.im \cdot y.im} \]
                                    9. lift-+.f64N/A

                                      \[\leadsto \frac{\mathsf{fma}\left(y.im, x.im, y.re \cdot x.re\right)}{\color{blue}{y.re \cdot y.re + y.im \cdot y.im}} \]
                                    10. +-commutativeN/A

                                      \[\leadsto \frac{\mathsf{fma}\left(y.im, x.im, y.re \cdot x.re\right)}{\color{blue}{y.im \cdot y.im + y.re \cdot y.re}} \]
                                    11. lift-*.f64N/A

                                      \[\leadsto \frac{\mathsf{fma}\left(y.im, x.im, y.re \cdot x.re\right)}{\color{blue}{y.im \cdot y.im} + y.re \cdot y.re} \]
                                    12. lower-fma.f6481.4

                                      \[\leadsto \frac{\mathsf{fma}\left(y.im, x.im, y.re \cdot x.re\right)}{\color{blue}{\mathsf{fma}\left(y.im, y.im, y.re \cdot y.re\right)}} \]
                                  4. Applied rewrites81.4%

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

                                    \[\leadsto \frac{\mathsf{fma}\left(y.im, x.im, y.re \cdot x.re\right)}{\color{blue}{{y.re}^{2}}} \]
                                  6. Step-by-step derivation
                                    1. Applied rewrites63.6%

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

                                    if -5.39999999999999992e38 < y.re < 2.70000000000000016e88

                                    1. Initial program 74.8%

                                      \[\frac{x.re \cdot y.re + x.im \cdot y.im}{y.re \cdot y.re + y.im \cdot y.im} \]
                                    2. Add Preprocessing
                                    3. Taylor expanded in y.re around 0

                                      \[\leadsto \color{blue}{\frac{x.im}{y.im}} \]
                                    4. Step-by-step derivation
                                      1. Applied rewrites63.4%

                                        \[\leadsto \color{blue}{\frac{x.im}{y.im}} \]
                                    5. Recombined 3 regimes into one program.
                                    6. Add Preprocessing

                                    Alternative 7: 62.3% accurate, 1.6× speedup?

                                    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y.re \leq -3.8 \cdot 10^{+45} \lor \neg \left(y.re \leq 2.7 \cdot 10^{+88}\right):\\ \;\;\;\;\frac{x.re}{y.re}\\ \mathbf{else}:\\ \;\;\;\;\frac{x.im}{y.im}\\ \end{array} \end{array} \]
                                    (FPCore (x.re x.im y.re y.im)
                                     :precision binary64
                                     (if (or (<= y.re -3.8e+45) (not (<= y.re 2.7e+88)))
                                       (/ x.re y.re)
                                       (/ x.im y.im)))
                                    double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
                                    	double tmp;
                                    	if ((y_46_re <= -3.8e+45) || !(y_46_re <= 2.7e+88)) {
                                    		tmp = x_46_re / y_46_re;
                                    	} else {
                                    		tmp = x_46_im / y_46_im;
                                    	}
                                    	return tmp;
                                    }
                                    
                                    module fmin_fmax_functions
                                        implicit none
                                        private
                                        public fmax
                                        public fmin
                                    
                                        interface fmax
                                            module procedure fmax88
                                            module procedure fmax44
                                            module procedure fmax84
                                            module procedure fmax48
                                        end interface
                                        interface fmin
                                            module procedure fmin88
                                            module procedure fmin44
                                            module procedure fmin84
                                            module procedure fmin48
                                        end interface
                                    contains
                                        real(8) function fmax88(x, y) result (res)
                                            real(8), intent (in) :: x
                                            real(8), intent (in) :: y
                                            res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                        end function
                                        real(4) function fmax44(x, y) result (res)
                                            real(4), intent (in) :: x
                                            real(4), intent (in) :: y
                                            res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                        end function
                                        real(8) function fmax84(x, y) result(res)
                                            real(8), intent (in) :: x
                                            real(4), intent (in) :: y
                                            res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                        end function
                                        real(8) function fmax48(x, y) result(res)
                                            real(4), intent (in) :: x
                                            real(8), intent (in) :: y
                                            res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                        end function
                                        real(8) function fmin88(x, y) result (res)
                                            real(8), intent (in) :: x
                                            real(8), intent (in) :: y
                                            res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                        end function
                                        real(4) function fmin44(x, y) result (res)
                                            real(4), intent (in) :: x
                                            real(4), intent (in) :: y
                                            res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                        end function
                                        real(8) function fmin84(x, y) result(res)
                                            real(8), intent (in) :: x
                                            real(4), intent (in) :: y
                                            res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                        end function
                                        real(8) function fmin48(x, y) result(res)
                                            real(4), intent (in) :: x
                                            real(8), intent (in) :: y
                                            res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                        end function
                                    end module
                                    
                                    real(8) function code(x_46re, x_46im, y_46re, y_46im)
                                    use fmin_fmax_functions
                                        real(8), intent (in) :: x_46re
                                        real(8), intent (in) :: x_46im
                                        real(8), intent (in) :: y_46re
                                        real(8), intent (in) :: y_46im
                                        real(8) :: tmp
                                        if ((y_46re <= (-3.8d+45)) .or. (.not. (y_46re <= 2.7d+88))) then
                                            tmp = x_46re / y_46re
                                        else
                                            tmp = x_46im / y_46im
                                        end if
                                        code = tmp
                                    end function
                                    
                                    public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
                                    	double tmp;
                                    	if ((y_46_re <= -3.8e+45) || !(y_46_re <= 2.7e+88)) {
                                    		tmp = x_46_re / y_46_re;
                                    	} else {
                                    		tmp = x_46_im / y_46_im;
                                    	}
                                    	return tmp;
                                    }
                                    
                                    def code(x_46_re, x_46_im, y_46_re, y_46_im):
                                    	tmp = 0
                                    	if (y_46_re <= -3.8e+45) or not (y_46_re <= 2.7e+88):
                                    		tmp = x_46_re / y_46_re
                                    	else:
                                    		tmp = x_46_im / y_46_im
                                    	return tmp
                                    
                                    function code(x_46_re, x_46_im, y_46_re, y_46_im)
                                    	tmp = 0.0
                                    	if ((y_46_re <= -3.8e+45) || !(y_46_re <= 2.7e+88))
                                    		tmp = Float64(x_46_re / y_46_re);
                                    	else
                                    		tmp = Float64(x_46_im / y_46_im);
                                    	end
                                    	return tmp
                                    end
                                    
                                    function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im)
                                    	tmp = 0.0;
                                    	if ((y_46_re <= -3.8e+45) || ~((y_46_re <= 2.7e+88)))
                                    		tmp = x_46_re / y_46_re;
                                    	else
                                    		tmp = x_46_im / y_46_im;
                                    	end
                                    	tmp_2 = tmp;
                                    end
                                    
                                    code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[Or[LessEqual[y$46$re, -3.8e+45], N[Not[LessEqual[y$46$re, 2.7e+88]], $MachinePrecision]], N[(x$46$re / y$46$re), $MachinePrecision], N[(x$46$im / y$46$im), $MachinePrecision]]
                                    
                                    \begin{array}{l}
                                    
                                    \\
                                    \begin{array}{l}
                                    \mathbf{if}\;y.re \leq -3.8 \cdot 10^{+45} \lor \neg \left(y.re \leq 2.7 \cdot 10^{+88}\right):\\
                                    \;\;\;\;\frac{x.re}{y.re}\\
                                    
                                    \mathbf{else}:\\
                                    \;\;\;\;\frac{x.im}{y.im}\\
                                    
                                    
                                    \end{array}
                                    \end{array}
                                    
                                    Derivation
                                    1. Split input into 2 regimes
                                    2. if y.re < -3.8000000000000002e45 or 2.70000000000000016e88 < y.re

                                      1. Initial program 49.0%

                                        \[\frac{x.re \cdot y.re + x.im \cdot y.im}{y.re \cdot y.re + y.im \cdot y.im} \]
                                      2. Add Preprocessing
                                      3. Taylor expanded in y.re around inf

                                        \[\leadsto \color{blue}{\frac{x.re}{y.re}} \]
                                      4. Step-by-step derivation
                                        1. Applied rewrites73.2%

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

                                        if -3.8000000000000002e45 < y.re < 2.70000000000000016e88

                                        1. Initial program 74.8%

                                          \[\frac{x.re \cdot y.re + x.im \cdot y.im}{y.re \cdot y.re + y.im \cdot y.im} \]
                                        2. Add Preprocessing
                                        3. Taylor expanded in y.re around 0

                                          \[\leadsto \color{blue}{\frac{x.im}{y.im}} \]
                                        4. Step-by-step derivation
                                          1. Applied rewrites63.4%

                                            \[\leadsto \color{blue}{\frac{x.im}{y.im}} \]
                                        5. Recombined 2 regimes into one program.
                                        6. Final simplification67.6%

                                          \[\leadsto \begin{array}{l} \mathbf{if}\;y.re \leq -3.8 \cdot 10^{+45} \lor \neg \left(y.re \leq 2.7 \cdot 10^{+88}\right):\\ \;\;\;\;\frac{x.re}{y.re}\\ \mathbf{else}:\\ \;\;\;\;\frac{x.im}{y.im}\\ \end{array} \]
                                        7. Add Preprocessing

                                        Alternative 8: 41.9% accurate, 3.2× speedup?

                                        \[\begin{array}{l} \\ \frac{x.im}{y.im} \end{array} \]
                                        (FPCore (x.re x.im y.re y.im) :precision binary64 (/ x.im y.im))
                                        double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
                                        	return x_46_im / y_46_im;
                                        }
                                        
                                        module fmin_fmax_functions
                                            implicit none
                                            private
                                            public fmax
                                            public fmin
                                        
                                            interface fmax
                                                module procedure fmax88
                                                module procedure fmax44
                                                module procedure fmax84
                                                module procedure fmax48
                                            end interface
                                            interface fmin
                                                module procedure fmin88
                                                module procedure fmin44
                                                module procedure fmin84
                                                module procedure fmin48
                                            end interface
                                        contains
                                            real(8) function fmax88(x, y) result (res)
                                                real(8), intent (in) :: x
                                                real(8), intent (in) :: y
                                                res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                            end function
                                            real(4) function fmax44(x, y) result (res)
                                                real(4), intent (in) :: x
                                                real(4), intent (in) :: y
                                                res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                            end function
                                            real(8) function fmax84(x, y) result(res)
                                                real(8), intent (in) :: x
                                                real(4), intent (in) :: y
                                                res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                            end function
                                            real(8) function fmax48(x, y) result(res)
                                                real(4), intent (in) :: x
                                                real(8), intent (in) :: y
                                                res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                            end function
                                            real(8) function fmin88(x, y) result (res)
                                                real(8), intent (in) :: x
                                                real(8), intent (in) :: y
                                                res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                            end function
                                            real(4) function fmin44(x, y) result (res)
                                                real(4), intent (in) :: x
                                                real(4), intent (in) :: y
                                                res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                            end function
                                            real(8) function fmin84(x, y) result(res)
                                                real(8), intent (in) :: x
                                                real(4), intent (in) :: y
                                                res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                            end function
                                            real(8) function fmin48(x, y) result(res)
                                                real(4), intent (in) :: x
                                                real(8), intent (in) :: y
                                                res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                            end function
                                        end module
                                        
                                        real(8) function code(x_46re, x_46im, y_46re, y_46im)
                                        use fmin_fmax_functions
                                            real(8), intent (in) :: x_46re
                                            real(8), intent (in) :: x_46im
                                            real(8), intent (in) :: y_46re
                                            real(8), intent (in) :: y_46im
                                            code = x_46im / y_46im
                                        end function
                                        
                                        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_im;
                                        }
                                        
                                        def code(x_46_re, x_46_im, y_46_re, y_46_im):
                                        	return x_46_im / y_46_im
                                        
                                        function code(x_46_re, x_46_im, y_46_re, y_46_im)
                                        	return Float64(x_46_im / y_46_im)
                                        end
                                        
                                        function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im)
                                        	tmp = x_46_im / y_46_im;
                                        end
                                        
                                        code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[(x$46$im / y$46$im), $MachinePrecision]
                                        
                                        \begin{array}{l}
                                        
                                        \\
                                        \frac{x.im}{y.im}
                                        \end{array}
                                        
                                        Derivation
                                        1. Initial program 63.8%

                                          \[\frac{x.re \cdot y.re + x.im \cdot y.im}{y.re \cdot y.re + y.im \cdot y.im} \]
                                        2. Add Preprocessing
                                        3. Taylor expanded in y.re around 0

                                          \[\leadsto \color{blue}{\frac{x.im}{y.im}} \]
                                        4. Step-by-step derivation
                                          1. Applied rewrites41.1%

                                            \[\leadsto \color{blue}{\frac{x.im}{y.im}} \]
                                          2. Add Preprocessing

                                          Reproduce

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