powComplex, real part

Percentage Accurate: 40.3% → 79.0%
Time: 20.3s
Alternatives: 17
Speedup: 7.4×

Specification

?
\[\begin{array}{l} \\ \begin{array}{l} t_0 := \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)\\ e^{t\_0 \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \cos \left(t\_0 \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \end{array} \end{array} \]
(FPCore (x.re x.im y.re y.im)
 :precision binary64
 (let* ((t_0 (log (sqrt (+ (* x.re x.re) (* x.im x.im))))))
   (*
    (exp (- (* t_0 y.re) (* (atan2 x.im x.re) y.im)))
    (cos (+ (* t_0 y.im) (* (atan2 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 t_0 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
	return exp(((t_0 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * cos(((t_0 * y_46_im) + (atan2(x_46_im, x_46_re) * y_46_re)));
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
    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) :: t_0
    t_0 = log(sqrt(((x_46re * x_46re) + (x_46im * x_46im))))
    code = exp(((t_0 * y_46re) - (atan2(x_46im, x_46re) * y_46im))) * cos(((t_0 * y_46im) + (atan2(x_46im, x_46re) * y_46re)))
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
	double t_0 = Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
	return Math.exp(((t_0 * y_46_re) - (Math.atan2(x_46_im, x_46_re) * y_46_im))) * Math.cos(((t_0 * y_46_im) + (Math.atan2(x_46_im, x_46_re) * y_46_re)));
}
def code(x_46_re, x_46_im, y_46_re, y_46_im):
	t_0 = math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))
	return math.exp(((t_0 * y_46_re) - (math.atan2(x_46_im, x_46_re) * y_46_im))) * math.cos(((t_0 * y_46_im) + (math.atan2(x_46_im, x_46_re) * y_46_re)))
function code(x_46_re, x_46_im, y_46_re, y_46_im)
	t_0 = log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))
	return Float64(exp(Float64(Float64(t_0 * y_46_re) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * cos(Float64(Float64(t_0 * y_46_im) + Float64(atan(x_46_im, x_46_re) * y_46_re))))
end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im)
	t_0 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
	tmp = exp(((t_0 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * cos(((t_0 * y_46_im) + (atan2(x_46_im, x_46_re) * y_46_re)));
end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]}, N[(N[Exp[N[(N[(t$95$0 * y$46$re), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Cos[N[(N[(t$95$0 * y$46$im), $MachinePrecision] + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)\\
e^{t\_0 \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \cos \left(t\_0 \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)
\end{array}
\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 17 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: 40.3% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)\\ e^{t\_0 \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \cos \left(t\_0 \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \end{array} \end{array} \]
(FPCore (x.re x.im y.re y.im)
 :precision binary64
 (let* ((t_0 (log (sqrt (+ (* x.re x.re) (* x.im x.im))))))
   (*
    (exp (- (* t_0 y.re) (* (atan2 x.im x.re) y.im)))
    (cos (+ (* t_0 y.im) (* (atan2 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 t_0 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
	return exp(((t_0 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * cos(((t_0 * y_46_im) + (atan2(x_46_im, x_46_re) * y_46_re)));
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
    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) :: t_0
    t_0 = log(sqrt(((x_46re * x_46re) + (x_46im * x_46im))))
    code = exp(((t_0 * y_46re) - (atan2(x_46im, x_46re) * y_46im))) * cos(((t_0 * y_46im) + (atan2(x_46im, x_46re) * y_46re)))
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
	double t_0 = Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
	return Math.exp(((t_0 * y_46_re) - (Math.atan2(x_46_im, x_46_re) * y_46_im))) * Math.cos(((t_0 * y_46_im) + (Math.atan2(x_46_im, x_46_re) * y_46_re)));
}
def code(x_46_re, x_46_im, y_46_re, y_46_im):
	t_0 = math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))
	return math.exp(((t_0 * y_46_re) - (math.atan2(x_46_im, x_46_re) * y_46_im))) * math.cos(((t_0 * y_46_im) + (math.atan2(x_46_im, x_46_re) * y_46_re)))
function code(x_46_re, x_46_im, y_46_re, y_46_im)
	t_0 = log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))
	return Float64(exp(Float64(Float64(t_0 * y_46_re) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * cos(Float64(Float64(t_0 * y_46_im) + Float64(atan(x_46_im, x_46_re) * y_46_re))))
end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im)
	t_0 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
	tmp = exp(((t_0 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * cos(((t_0 * y_46_im) + (atan2(x_46_im, x_46_re) * y_46_re)));
end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]}, N[(N[Exp[N[(N[(t$95$0 * y$46$re), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Cos[N[(N[(t$95$0 * y$46$im), $MachinePrecision] + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)\\
e^{t\_0 \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \cos \left(t\_0 \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)
\end{array}
\end{array}

Alternative 1: 79.0% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\ t_1 := \cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\ t_2 := {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\\ \mathbf{if}\;y.re \leq -12.6:\\ \;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - t\_0} \cdot t\_1\\ \mathbf{elif}\;y.re \leq 3.1 \cdot 10^{-21}:\\ \;\;\;\;\frac{\cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}{\frac{e^{t\_0}}{t\_2}}\\ \mathbf{else}:\\ \;\;\;\;\frac{t\_1}{\frac{t\_0 + 1}{t\_2}}\\ \end{array} \end{array} \]
(FPCore (x.re x.im y.re y.im)
 :precision binary64
 (let* ((t_0 (* (atan2 x.im x.re) y.im))
        (t_1 (cos (* y.im (log (hypot x.im x.re)))))
        (t_2 (pow (hypot x.re x.im) y.re)))
   (if (<= y.re -12.6)
     (*
      (exp (- (* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im))))) t_0))
      t_1)
     (if (<= y.re 3.1e-21)
       (/
        (cos (+ (* y.im (log (hypot x.re x.im))) (* y.re (atan2 x.im x.re))))
        (/ (exp t_0) t_2))
       (/ t_1 (/ (+ t_0 1.0) t_2))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
	double t_0 = atan2(x_46_im, x_46_re) * y_46_im;
	double t_1 = cos((y_46_im * log(hypot(x_46_im, x_46_re))));
	double t_2 = pow(hypot(x_46_re, x_46_im), y_46_re);
	double tmp;
	if (y_46_re <= -12.6) {
		tmp = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0)) * t_1;
	} else if (y_46_re <= 3.1e-21) {
		tmp = cos(((y_46_im * log(hypot(x_46_re, x_46_im))) + (y_46_re * atan2(x_46_im, x_46_re)))) / (exp(t_0) / t_2);
	} else {
		tmp = t_1 / ((t_0 + 1.0) / t_2);
	}
	return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
	double t_0 = Math.atan2(x_46_im, x_46_re) * y_46_im;
	double t_1 = Math.cos((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re))));
	double t_2 = Math.pow(Math.hypot(x_46_re, x_46_im), y_46_re);
	double tmp;
	if (y_46_re <= -12.6) {
		tmp = Math.exp(((y_46_re * Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0)) * t_1;
	} else if (y_46_re <= 3.1e-21) {
		tmp = Math.cos(((y_46_im * Math.log(Math.hypot(x_46_re, x_46_im))) + (y_46_re * Math.atan2(x_46_im, x_46_re)))) / (Math.exp(t_0) / t_2);
	} else {
		tmp = t_1 / ((t_0 + 1.0) / t_2);
	}
	return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im):
	t_0 = math.atan2(x_46_im, x_46_re) * y_46_im
	t_1 = math.cos((y_46_im * math.log(math.hypot(x_46_im, x_46_re))))
	t_2 = math.pow(math.hypot(x_46_re, x_46_im), y_46_re)
	tmp = 0
	if y_46_re <= -12.6:
		tmp = math.exp(((y_46_re * math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0)) * t_1
	elif y_46_re <= 3.1e-21:
		tmp = math.cos(((y_46_im * math.log(math.hypot(x_46_re, x_46_im))) + (y_46_re * math.atan2(x_46_im, x_46_re)))) / (math.exp(t_0) / t_2)
	else:
		tmp = t_1 / ((t_0 + 1.0) / t_2)
	return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im)
	t_0 = Float64(atan(x_46_im, x_46_re) * y_46_im)
	t_1 = cos(Float64(y_46_im * log(hypot(x_46_im, x_46_re))))
	t_2 = hypot(x_46_re, x_46_im) ^ y_46_re
	tmp = 0.0
	if (y_46_re <= -12.6)
		tmp = Float64(exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - t_0)) * t_1);
	elseif (y_46_re <= 3.1e-21)
		tmp = Float64(cos(Float64(Float64(y_46_im * log(hypot(x_46_re, x_46_im))) + Float64(y_46_re * atan(x_46_im, x_46_re)))) / Float64(exp(t_0) / t_2));
	else
		tmp = Float64(t_1 / Float64(Float64(t_0 + 1.0) / t_2));
	end
	return tmp
end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im)
	t_0 = atan2(x_46_im, x_46_re) * y_46_im;
	t_1 = cos((y_46_im * log(hypot(x_46_im, x_46_re))));
	t_2 = hypot(x_46_re, x_46_im) ^ y_46_re;
	tmp = 0.0;
	if (y_46_re <= -12.6)
		tmp = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0)) * t_1;
	elseif (y_46_re <= 3.1e-21)
		tmp = cos(((y_46_im * log(hypot(x_46_re, x_46_im))) + (y_46_re * atan2(x_46_im, x_46_re)))) / (exp(t_0) / t_2);
	else
		tmp = t_1 / ((t_0 + 1.0) / t_2);
	end
	tmp_2 = tmp;
end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, Block[{t$95$1 = N[Cos[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, If[LessEqual[y$46$re, -12.6], N[(N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision] * t$95$1), $MachinePrecision], If[LessEqual[y$46$re, 3.1e-21], N[(N[Cos[N[(N[(y$46$im * N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] + N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(N[Exp[t$95$0], $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision], N[(t$95$1 / N[(N[(t$95$0 + 1.0), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_1 := \cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
t_2 := {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\\
\mathbf{if}\;y.re \leq -12.6:\\
\;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - t\_0} \cdot t\_1\\

\mathbf{elif}\;y.re \leq 3.1 \cdot 10^{-21}:\\
\;\;\;\;\frac{\cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}{\frac{e^{t\_0}}{t\_2}}\\

\mathbf{else}:\\
\;\;\;\;\frac{t\_1}{\frac{t\_0 + 1}{t\_2}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y.re < -12.5999999999999996

    1. Initial program 37.7%

      \[e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \]
    2. Add Preprocessing
    3. Taylor expanded in y.re around 0

      \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \color{blue}{\cos \left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)}\right) \]
    4. Step-by-step derivation
      1. cos-lowering-cos.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{cos.f64}\left(\left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right)\right) \]
      3. log-lowering-log.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right)\right)\right) \]
      4. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right)\right)\right)\right)\right) \]
      5. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)\right)\right)\right)\right) \]
      6. hypot-defineN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\right)\right)\right) \]
      7. hypot-lowering-hypot.f6488.5%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right)\right) \]
    5. Simplified88.5%

      \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \color{blue}{\cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)} \]

    if -12.5999999999999996 < y.re < 3.0999999999999998e-21

    1. Initial program 39.2%

      \[e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \]
    2. Step-by-step derivation
      1. exp-diffN/A

        \[\leadsto \frac{e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re}}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}} \cdot \cos \color{blue}{\left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)} \]
      2. associate-*l/N/A

        \[\leadsto \frac{e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re} \cdot \cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}{\color{blue}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}} \]
      3. associate-/l*N/A

        \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re} \cdot \color{blue}{\frac{\cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}} \]
      4. *-commutativeN/A

        \[\leadsto \frac{\cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}} \cdot \color{blue}{e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re}} \]
      5. associate-/r/N/A

        \[\leadsto \frac{\cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}{\color{blue}{\frac{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}{e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re}}}} \]
      6. exp-diffN/A

        \[\leadsto \frac{\cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im - \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re}} \]
    3. Simplified80.6%

      \[\leadsto \color{blue}{\frac{\cos \left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}{\frac{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}}} \]
    4. Add Preprocessing

    if 3.0999999999999998e-21 < y.re

    1. Initial program 29.1%

      \[e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \]
    2. Step-by-step derivation
      1. exp-diffN/A

        \[\leadsto \frac{e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re}}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}} \cdot \cos \color{blue}{\left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)} \]
      2. associate-*l/N/A

        \[\leadsto \frac{e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re} \cdot \cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}{\color{blue}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}} \]
      3. associate-/l*N/A

        \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re} \cdot \color{blue}{\frac{\cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}} \]
      4. *-commutativeN/A

        \[\leadsto \frac{\cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}} \cdot \color{blue}{e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re}} \]
      5. associate-/r/N/A

        \[\leadsto \frac{\cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}{\color{blue}{\frac{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}{e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re}}}} \]
      6. exp-diffN/A

        \[\leadsto \frac{\cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im - \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re}} \]
    3. Simplified49.1%

      \[\leadsto \color{blue}{\frac{\cos \left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}{\frac{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}}} \]
    4. Add Preprocessing
    5. Taylor expanded in y.re around 0

      \[\leadsto \mathsf{/.f64}\left(\color{blue}{\cos \left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)}, \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
    6. Step-by-step derivation
      1. cos-lowering-cos.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right), \mathsf{/.f64}\left(\color{blue}{\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)}, \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)}\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      3. log-lowering-log.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), \color{blue}{y.im}\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      4. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      5. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      6. hypot-defineN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      7. hypot-lowering-hypot.f6456.4%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
    7. Simplified56.4%

      \[\leadsto \frac{\color{blue}{\cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)}}{\frac{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}} \]
    8. Taylor expanded in y.im around 0

      \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right), \mathsf{/.f64}\left(\color{blue}{\left(1 + y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}, \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
    9. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right), \mathsf{/.f64}\left(\left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re} + 1\right), \mathsf{pow.f64}\left(\color{blue}{\mathsf{hypot.f64}\left(x.re, x.im\right)}, y.re\right)\right)\right) \]
      2. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(\left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right), 1\right), \mathsf{pow.f64}\left(\color{blue}{\mathsf{hypot.f64}\left(x.re, x.im\right)}, y.re\right)\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(y.im, \tan^{-1}_* \frac{x.im}{x.re}\right), 1\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(\color{blue}{x.re}, x.im\right), y.re\right)\right)\right) \]
      4. atan2-lowering-atan2.f6474.8%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{atan2.f64}\left(x.im, x.re\right)\right), 1\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
    10. Simplified74.8%

      \[\leadsto \frac{\cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)}{\frac{\color{blue}{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re} + 1}}{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification81.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y.re \leq -12.6:\\ \;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\ \mathbf{elif}\;y.re \leq 3.1 \cdot 10^{-21}:\\ \;\;\;\;\frac{\cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}{\frac{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)}{\frac{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im + 1}{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 2: 79.0% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\\ t_1 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\ t_2 := \cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\ \mathbf{if}\;y.re \leq -2.9:\\ \;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - t\_1} \cdot t\_2\\ \mathbf{elif}\;y.re \leq 3.1 \cdot 10^{-21}:\\ \;\;\;\;\frac{t\_2}{\frac{{e}^{t\_1}}{t\_0}}\\ \mathbf{else}:\\ \;\;\;\;\frac{t\_2}{\frac{t\_1 + 1}{t\_0}}\\ \end{array} \end{array} \]
(FPCore (x.re x.im y.re y.im)
 :precision binary64
 (let* ((t_0 (pow (hypot x.re x.im) y.re))
        (t_1 (* (atan2 x.im x.re) y.im))
        (t_2 (cos (* y.im (log (hypot x.im x.re))))))
   (if (<= y.re -2.9)
     (*
      (exp (- (* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im))))) t_1))
      t_2)
     (if (<= y.re 3.1e-21)
       (/ t_2 (/ (pow E t_1) t_0))
       (/ t_2 (/ (+ t_1 1.0) t_0))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
	double t_0 = pow(hypot(x_46_re, x_46_im), y_46_re);
	double t_1 = atan2(x_46_im, x_46_re) * y_46_im;
	double t_2 = cos((y_46_im * log(hypot(x_46_im, x_46_re))));
	double tmp;
	if (y_46_re <= -2.9) {
		tmp = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_1)) * t_2;
	} else if (y_46_re <= 3.1e-21) {
		tmp = t_2 / (pow(((double) M_E), t_1) / t_0);
	} else {
		tmp = t_2 / ((t_1 + 1.0) / t_0);
	}
	return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
	double t_0 = Math.pow(Math.hypot(x_46_re, x_46_im), y_46_re);
	double t_1 = Math.atan2(x_46_im, x_46_re) * y_46_im;
	double t_2 = Math.cos((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re))));
	double tmp;
	if (y_46_re <= -2.9) {
		tmp = Math.exp(((y_46_re * Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_1)) * t_2;
	} else if (y_46_re <= 3.1e-21) {
		tmp = t_2 / (Math.pow(Math.E, t_1) / t_0);
	} else {
		tmp = t_2 / ((t_1 + 1.0) / t_0);
	}
	return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im):
	t_0 = math.pow(math.hypot(x_46_re, x_46_im), y_46_re)
	t_1 = math.atan2(x_46_im, x_46_re) * y_46_im
	t_2 = math.cos((y_46_im * math.log(math.hypot(x_46_im, x_46_re))))
	tmp = 0
	if y_46_re <= -2.9:
		tmp = math.exp(((y_46_re * math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_1)) * t_2
	elif y_46_re <= 3.1e-21:
		tmp = t_2 / (math.pow(math.e, t_1) / t_0)
	else:
		tmp = t_2 / ((t_1 + 1.0) / t_0)
	return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im)
	t_0 = hypot(x_46_re, x_46_im) ^ y_46_re
	t_1 = Float64(atan(x_46_im, x_46_re) * y_46_im)
	t_2 = cos(Float64(y_46_im * log(hypot(x_46_im, x_46_re))))
	tmp = 0.0
	if (y_46_re <= -2.9)
		tmp = Float64(exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - t_1)) * t_2);
	elseif (y_46_re <= 3.1e-21)
		tmp = Float64(t_2 / Float64((exp(1) ^ t_1) / t_0));
	else
		tmp = Float64(t_2 / Float64(Float64(t_1 + 1.0) / t_0));
	end
	return tmp
end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im)
	t_0 = hypot(x_46_re, x_46_im) ^ y_46_re;
	t_1 = atan2(x_46_im, x_46_re) * y_46_im;
	t_2 = cos((y_46_im * log(hypot(x_46_im, x_46_re))));
	tmp = 0.0;
	if (y_46_re <= -2.9)
		tmp = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_1)) * t_2;
	elseif (y_46_re <= 3.1e-21)
		tmp = t_2 / ((2.71828182845904523536 ^ t_1) / t_0);
	else
		tmp = t_2 / ((t_1 + 1.0) / t_0);
	end
	tmp_2 = tmp;
end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, Block[{t$95$1 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, Block[{t$95$2 = N[Cos[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -2.9], N[(N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]], $MachinePrecision] * t$95$2), $MachinePrecision], If[LessEqual[y$46$re, 3.1e-21], N[(t$95$2 / N[(N[Power[E, t$95$1], $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision], N[(t$95$2 / N[(N[(t$95$1 + 1.0), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\\
t_1 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_2 := \cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\mathbf{if}\;y.re \leq -2.9:\\
\;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - t\_1} \cdot t\_2\\

\mathbf{elif}\;y.re \leq 3.1 \cdot 10^{-21}:\\
\;\;\;\;\frac{t\_2}{\frac{{e}^{t\_1}}{t\_0}}\\

\mathbf{else}:\\
\;\;\;\;\frac{t\_2}{\frac{t\_1 + 1}{t\_0}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y.re < -2.89999999999999991

    1. Initial program 37.7%

      \[e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \]
    2. Add Preprocessing
    3. Taylor expanded in y.re around 0

      \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \color{blue}{\cos \left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)}\right) \]
    4. Step-by-step derivation
      1. cos-lowering-cos.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{cos.f64}\left(\left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right)\right) \]
      3. log-lowering-log.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right)\right)\right) \]
      4. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right)\right)\right)\right)\right) \]
      5. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)\right)\right)\right)\right) \]
      6. hypot-defineN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\right)\right)\right) \]
      7. hypot-lowering-hypot.f6488.5%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right)\right) \]
    5. Simplified88.5%

      \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \color{blue}{\cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)} \]

    if -2.89999999999999991 < y.re < 3.0999999999999998e-21

    1. Initial program 39.2%

      \[e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \]
    2. Step-by-step derivation
      1. exp-diffN/A

        \[\leadsto \frac{e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re}}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}} \cdot \cos \color{blue}{\left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)} \]
      2. associate-*l/N/A

        \[\leadsto \frac{e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re} \cdot \cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}{\color{blue}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}} \]
      3. associate-/l*N/A

        \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re} \cdot \color{blue}{\frac{\cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}} \]
      4. *-commutativeN/A

        \[\leadsto \frac{\cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}} \cdot \color{blue}{e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re}} \]
      5. associate-/r/N/A

        \[\leadsto \frac{\cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}{\color{blue}{\frac{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}{e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re}}}} \]
      6. exp-diffN/A

        \[\leadsto \frac{\cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im - \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re}} \]
    3. Simplified80.6%

      \[\leadsto \color{blue}{\frac{\cos \left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}{\frac{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}}} \]
    4. Add Preprocessing
    5. Taylor expanded in y.re around 0

      \[\leadsto \mathsf{/.f64}\left(\color{blue}{\cos \left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)}, \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
    6. Step-by-step derivation
      1. cos-lowering-cos.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right), \mathsf{/.f64}\left(\color{blue}{\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)}, \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)}\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      3. log-lowering-log.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), \color{blue}{y.im}\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      4. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      5. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      6. hypot-defineN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      7. hypot-lowering-hypot.f6480.0%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
    7. Simplified80.0%

      \[\leadsto \frac{\color{blue}{\cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)}}{\frac{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}} \]
    8. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right), \mathsf{/.f64}\left(\left(e^{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(\color{blue}{x.re}, x.im\right), y.re\right)\right)\right) \]
      2. exp-prodN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right), \mathsf{/.f64}\left(\left({\left(e^{y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}\right), \mathsf{pow.f64}\left(\color{blue}{\mathsf{hypot.f64}\left(x.re, x.im\right)}, y.re\right)\right)\right) \]
      3. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\left(e^{y.im}\right), \tan^{-1}_* \frac{x.im}{x.re}\right), \mathsf{pow.f64}\left(\color{blue}{\mathsf{hypot.f64}\left(x.re, x.im\right)}, y.re\right)\right)\right) \]
      4. exp-lowering-exp.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{exp.f64}\left(y.im\right), \tan^{-1}_* \frac{x.im}{x.re}\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(\color{blue}{x.re}, x.im\right), y.re\right)\right)\right) \]
      5. atan2-lowering-atan2.f6478.9%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{exp.f64}\left(y.im\right), \mathsf{atan2.f64}\left(x.im, x.re\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, \color{blue}{x.im}\right), y.re\right)\right)\right) \]
    9. Applied egg-rr78.9%

      \[\leadsto \frac{\cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)}{\frac{\color{blue}{{\left(e^{y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}}}{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}} \]
    10. Step-by-step derivation
      1. pow-expN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right), \mathsf{/.f64}\left(\left(e^{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\right), \mathsf{pow.f64}\left(\color{blue}{\mathsf{hypot.f64}\left(x.re, x.im\right)}, y.re\right)\right)\right) \]
      2. *-lft-identityN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right), \mathsf{/.f64}\left(\left(e^{1 \cdot \left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(\color{blue}{x.re}, x.im\right), y.re\right)\right)\right) \]
      3. exp-prodN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right), \mathsf{/.f64}\left(\left({\left(e^{1}\right)}^{\left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\right), \mathsf{pow.f64}\left(\color{blue}{\mathsf{hypot.f64}\left(x.re, x.im\right)}, y.re\right)\right)\right) \]
      4. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\left(e^{1}\right), \left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right), \mathsf{pow.f64}\left(\color{blue}{\mathsf{hypot.f64}\left(x.re, x.im\right)}, y.re\right)\right)\right) \]
      5. exp-lowering-exp.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{exp.f64}\left(1\right), \left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(\color{blue}{x.re}, x.im\right), y.re\right)\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{exp.f64}\left(1\right), \mathsf{*.f64}\left(y.im, \tan^{-1}_* \frac{x.im}{x.re}\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, \color{blue}{x.im}\right), y.re\right)\right)\right) \]
      7. atan2-lowering-atan2.f6480.0%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{exp.f64}\left(1\right), \mathsf{*.f64}\left(y.im, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
    11. Applied egg-rr80.0%

      \[\leadsto \frac{\cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)}{\frac{\color{blue}{{\left(e^{1}\right)}^{\left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}}}{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}} \]

    if 3.0999999999999998e-21 < y.re

    1. Initial program 29.1%

      \[e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \]
    2. Step-by-step derivation
      1. exp-diffN/A

        \[\leadsto \frac{e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re}}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}} \cdot \cos \color{blue}{\left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)} \]
      2. associate-*l/N/A

        \[\leadsto \frac{e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re} \cdot \cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}{\color{blue}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}} \]
      3. associate-/l*N/A

        \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re} \cdot \color{blue}{\frac{\cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}} \]
      4. *-commutativeN/A

        \[\leadsto \frac{\cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}} \cdot \color{blue}{e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re}} \]
      5. associate-/r/N/A

        \[\leadsto \frac{\cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}{\color{blue}{\frac{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}{e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re}}}} \]
      6. exp-diffN/A

        \[\leadsto \frac{\cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im - \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re}} \]
    3. Simplified49.1%

      \[\leadsto \color{blue}{\frac{\cos \left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}{\frac{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}}} \]
    4. Add Preprocessing
    5. Taylor expanded in y.re around 0

      \[\leadsto \mathsf{/.f64}\left(\color{blue}{\cos \left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)}, \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
    6. Step-by-step derivation
      1. cos-lowering-cos.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right), \mathsf{/.f64}\left(\color{blue}{\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)}, \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)}\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      3. log-lowering-log.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), \color{blue}{y.im}\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      4. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      5. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      6. hypot-defineN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      7. hypot-lowering-hypot.f6456.4%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
    7. Simplified56.4%

      \[\leadsto \frac{\color{blue}{\cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)}}{\frac{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}} \]
    8. Taylor expanded in y.im around 0

      \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right), \mathsf{/.f64}\left(\color{blue}{\left(1 + y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}, \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
    9. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right), \mathsf{/.f64}\left(\left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re} + 1\right), \mathsf{pow.f64}\left(\color{blue}{\mathsf{hypot.f64}\left(x.re, x.im\right)}, y.re\right)\right)\right) \]
      2. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(\left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right), 1\right), \mathsf{pow.f64}\left(\color{blue}{\mathsf{hypot.f64}\left(x.re, x.im\right)}, y.re\right)\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(y.im, \tan^{-1}_* \frac{x.im}{x.re}\right), 1\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(\color{blue}{x.re}, x.im\right), y.re\right)\right)\right) \]
      4. atan2-lowering-atan2.f6474.8%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{atan2.f64}\left(x.im, x.re\right)\right), 1\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
    10. Simplified74.8%

      \[\leadsto \frac{\cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)}{\frac{\color{blue}{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re} + 1}}{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification81.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y.re \leq -2.9:\\ \;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\ \mathbf{elif}\;y.re \leq 3.1 \cdot 10^{-21}:\\ \;\;\;\;\frac{\cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)}{\frac{{e}^{\left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\right)}}{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)}{\frac{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im + 1}{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 79.0% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\\ t_1 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\ t_2 := \cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\ \mathbf{if}\;y.re \leq -2:\\ \;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - t\_1} \cdot t\_2\\ \mathbf{elif}\;y.re \leq 3.1 \cdot 10^{-21}:\\ \;\;\;\;\frac{t\_2}{\frac{e^{t\_1}}{t\_0}}\\ \mathbf{else}:\\ \;\;\;\;\frac{t\_2}{\frac{t\_1 + 1}{t\_0}}\\ \end{array} \end{array} \]
(FPCore (x.re x.im y.re y.im)
 :precision binary64
 (let* ((t_0 (pow (hypot x.re x.im) y.re))
        (t_1 (* (atan2 x.im x.re) y.im))
        (t_2 (cos (* y.im (log (hypot x.im x.re))))))
   (if (<= y.re -2.0)
     (*
      (exp (- (* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im))))) t_1))
      t_2)
     (if (<= y.re 3.1e-21)
       (/ t_2 (/ (exp t_1) t_0))
       (/ t_2 (/ (+ t_1 1.0) t_0))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
	double t_0 = pow(hypot(x_46_re, x_46_im), y_46_re);
	double t_1 = atan2(x_46_im, x_46_re) * y_46_im;
	double t_2 = cos((y_46_im * log(hypot(x_46_im, x_46_re))));
	double tmp;
	if (y_46_re <= -2.0) {
		tmp = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_1)) * t_2;
	} else if (y_46_re <= 3.1e-21) {
		tmp = t_2 / (exp(t_1) / t_0);
	} else {
		tmp = t_2 / ((t_1 + 1.0) / t_0);
	}
	return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
	double t_0 = Math.pow(Math.hypot(x_46_re, x_46_im), y_46_re);
	double t_1 = Math.atan2(x_46_im, x_46_re) * y_46_im;
	double t_2 = Math.cos((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re))));
	double tmp;
	if (y_46_re <= -2.0) {
		tmp = Math.exp(((y_46_re * Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_1)) * t_2;
	} else if (y_46_re <= 3.1e-21) {
		tmp = t_2 / (Math.exp(t_1) / t_0);
	} else {
		tmp = t_2 / ((t_1 + 1.0) / t_0);
	}
	return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im):
	t_0 = math.pow(math.hypot(x_46_re, x_46_im), y_46_re)
	t_1 = math.atan2(x_46_im, x_46_re) * y_46_im
	t_2 = math.cos((y_46_im * math.log(math.hypot(x_46_im, x_46_re))))
	tmp = 0
	if y_46_re <= -2.0:
		tmp = math.exp(((y_46_re * math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_1)) * t_2
	elif y_46_re <= 3.1e-21:
		tmp = t_2 / (math.exp(t_1) / t_0)
	else:
		tmp = t_2 / ((t_1 + 1.0) / t_0)
	return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im)
	t_0 = hypot(x_46_re, x_46_im) ^ y_46_re
	t_1 = Float64(atan(x_46_im, x_46_re) * y_46_im)
	t_2 = cos(Float64(y_46_im * log(hypot(x_46_im, x_46_re))))
	tmp = 0.0
	if (y_46_re <= -2.0)
		tmp = Float64(exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - t_1)) * t_2);
	elseif (y_46_re <= 3.1e-21)
		tmp = Float64(t_2 / Float64(exp(t_1) / t_0));
	else
		tmp = Float64(t_2 / Float64(Float64(t_1 + 1.0) / t_0));
	end
	return tmp
end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im)
	t_0 = hypot(x_46_re, x_46_im) ^ y_46_re;
	t_1 = atan2(x_46_im, x_46_re) * y_46_im;
	t_2 = cos((y_46_im * log(hypot(x_46_im, x_46_re))));
	tmp = 0.0;
	if (y_46_re <= -2.0)
		tmp = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_1)) * t_2;
	elseif (y_46_re <= 3.1e-21)
		tmp = t_2 / (exp(t_1) / t_0);
	else
		tmp = t_2 / ((t_1 + 1.0) / t_0);
	end
	tmp_2 = tmp;
end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, Block[{t$95$1 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, Block[{t$95$2 = N[Cos[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -2.0], N[(N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]], $MachinePrecision] * t$95$2), $MachinePrecision], If[LessEqual[y$46$re, 3.1e-21], N[(t$95$2 / N[(N[Exp[t$95$1], $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision], N[(t$95$2 / N[(N[(t$95$1 + 1.0), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\\
t_1 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_2 := \cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\mathbf{if}\;y.re \leq -2:\\
\;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - t\_1} \cdot t\_2\\

\mathbf{elif}\;y.re \leq 3.1 \cdot 10^{-21}:\\
\;\;\;\;\frac{t\_2}{\frac{e^{t\_1}}{t\_0}}\\

\mathbf{else}:\\
\;\;\;\;\frac{t\_2}{\frac{t\_1 + 1}{t\_0}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y.re < -2

    1. Initial program 37.7%

      \[e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \]
    2. Add Preprocessing
    3. Taylor expanded in y.re around 0

      \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \color{blue}{\cos \left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)}\right) \]
    4. Step-by-step derivation
      1. cos-lowering-cos.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{cos.f64}\left(\left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right)\right) \]
      3. log-lowering-log.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right)\right)\right) \]
      4. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right)\right)\right)\right)\right) \]
      5. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)\right)\right)\right)\right) \]
      6. hypot-defineN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\right)\right)\right) \]
      7. hypot-lowering-hypot.f6488.5%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right)\right) \]
    5. Simplified88.5%

      \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \color{blue}{\cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)} \]

    if -2 < y.re < 3.0999999999999998e-21

    1. Initial program 39.2%

      \[e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \]
    2. Step-by-step derivation
      1. exp-diffN/A

        \[\leadsto \frac{e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re}}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}} \cdot \cos \color{blue}{\left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)} \]
      2. associate-*l/N/A

        \[\leadsto \frac{e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re} \cdot \cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}{\color{blue}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}} \]
      3. associate-/l*N/A

        \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re} \cdot \color{blue}{\frac{\cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}} \]
      4. *-commutativeN/A

        \[\leadsto \frac{\cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}} \cdot \color{blue}{e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re}} \]
      5. associate-/r/N/A

        \[\leadsto \frac{\cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}{\color{blue}{\frac{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}{e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re}}}} \]
      6. exp-diffN/A

        \[\leadsto \frac{\cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im - \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re}} \]
    3. Simplified80.6%

      \[\leadsto \color{blue}{\frac{\cos \left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}{\frac{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}}} \]
    4. Add Preprocessing
    5. Taylor expanded in y.re around 0

      \[\leadsto \mathsf{/.f64}\left(\color{blue}{\cos \left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)}, \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
    6. Step-by-step derivation
      1. cos-lowering-cos.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right), \mathsf{/.f64}\left(\color{blue}{\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)}, \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)}\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      3. log-lowering-log.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), \color{blue}{y.im}\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      4. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      5. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      6. hypot-defineN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      7. hypot-lowering-hypot.f6480.0%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
    7. Simplified80.0%

      \[\leadsto \frac{\color{blue}{\cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)}}{\frac{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}} \]

    if 3.0999999999999998e-21 < y.re

    1. Initial program 29.1%

      \[e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \]
    2. Step-by-step derivation
      1. exp-diffN/A

        \[\leadsto \frac{e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re}}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}} \cdot \cos \color{blue}{\left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)} \]
      2. associate-*l/N/A

        \[\leadsto \frac{e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re} \cdot \cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}{\color{blue}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}} \]
      3. associate-/l*N/A

        \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re} \cdot \color{blue}{\frac{\cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}} \]
      4. *-commutativeN/A

        \[\leadsto \frac{\cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}} \cdot \color{blue}{e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re}} \]
      5. associate-/r/N/A

        \[\leadsto \frac{\cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}{\color{blue}{\frac{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}{e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re}}}} \]
      6. exp-diffN/A

        \[\leadsto \frac{\cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im - \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re}} \]
    3. Simplified49.1%

      \[\leadsto \color{blue}{\frac{\cos \left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}{\frac{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}}} \]
    4. Add Preprocessing
    5. Taylor expanded in y.re around 0

      \[\leadsto \mathsf{/.f64}\left(\color{blue}{\cos \left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)}, \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
    6. Step-by-step derivation
      1. cos-lowering-cos.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right), \mathsf{/.f64}\left(\color{blue}{\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)}, \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)}\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      3. log-lowering-log.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), \color{blue}{y.im}\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      4. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      5. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      6. hypot-defineN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      7. hypot-lowering-hypot.f6456.4%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
    7. Simplified56.4%

      \[\leadsto \frac{\color{blue}{\cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)}}{\frac{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}} \]
    8. Taylor expanded in y.im around 0

      \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right), \mathsf{/.f64}\left(\color{blue}{\left(1 + y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}, \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
    9. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right), \mathsf{/.f64}\left(\left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re} + 1\right), \mathsf{pow.f64}\left(\color{blue}{\mathsf{hypot.f64}\left(x.re, x.im\right)}, y.re\right)\right)\right) \]
      2. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(\left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right), 1\right), \mathsf{pow.f64}\left(\color{blue}{\mathsf{hypot.f64}\left(x.re, x.im\right)}, y.re\right)\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(y.im, \tan^{-1}_* \frac{x.im}{x.re}\right), 1\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(\color{blue}{x.re}, x.im\right), y.re\right)\right)\right) \]
      4. atan2-lowering-atan2.f6474.8%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{atan2.f64}\left(x.im, x.re\right)\right), 1\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
    10. Simplified74.8%

      \[\leadsto \frac{\cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)}{\frac{\color{blue}{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re} + 1}}{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification81.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y.re \leq -2:\\ \;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\ \mathbf{elif}\;y.re \leq 3.1 \cdot 10^{-21}:\\ \;\;\;\;\frac{\cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)}{\frac{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)}{\frac{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im + 1}{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 77.9% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\\ t_1 := \cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\ \mathbf{if}\;y.re \leq -6.2 \cdot 10^{-12}:\\ \;\;\;\;\frac{t\_1}{\frac{1}{t\_0}}\\ \mathbf{elif}\;y.re \leq 3.1 \cdot 10^{-21}:\\ \;\;\;\;t\_1 \cdot {\left({\left(e^{-1}\right)}^{-1}\right)}^{\left(\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(0 - y.im\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{t\_1}{\frac{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im + 1}{t\_0}}\\ \end{array} \end{array} \]
(FPCore (x.re x.im y.re y.im)
 :precision binary64
 (let* ((t_0 (pow (hypot x.re x.im) y.re))
        (t_1 (cos (* y.im (log (hypot x.im x.re))))))
   (if (<= y.re -6.2e-12)
     (/ t_1 (/ 1.0 t_0))
     (if (<= y.re 3.1e-21)
       (* t_1 (pow (pow (exp -1.0) -1.0) (* (atan2 x.im x.re) (- 0.0 y.im))))
       (/ t_1 (/ (+ (* (atan2 x.im x.re) y.im) 1.0) t_0))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
	double t_0 = pow(hypot(x_46_re, x_46_im), y_46_re);
	double t_1 = cos((y_46_im * log(hypot(x_46_im, x_46_re))));
	double tmp;
	if (y_46_re <= -6.2e-12) {
		tmp = t_1 / (1.0 / t_0);
	} else if (y_46_re <= 3.1e-21) {
		tmp = t_1 * pow(pow(exp(-1.0), -1.0), (atan2(x_46_im, x_46_re) * (0.0 - y_46_im)));
	} else {
		tmp = t_1 / (((atan2(x_46_im, x_46_re) * y_46_im) + 1.0) / t_0);
	}
	return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
	double t_0 = Math.pow(Math.hypot(x_46_re, x_46_im), y_46_re);
	double t_1 = Math.cos((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re))));
	double tmp;
	if (y_46_re <= -6.2e-12) {
		tmp = t_1 / (1.0 / t_0);
	} else if (y_46_re <= 3.1e-21) {
		tmp = t_1 * Math.pow(Math.pow(Math.exp(-1.0), -1.0), (Math.atan2(x_46_im, x_46_re) * (0.0 - y_46_im)));
	} else {
		tmp = t_1 / (((Math.atan2(x_46_im, x_46_re) * y_46_im) + 1.0) / t_0);
	}
	return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im):
	t_0 = math.pow(math.hypot(x_46_re, x_46_im), y_46_re)
	t_1 = math.cos((y_46_im * math.log(math.hypot(x_46_im, x_46_re))))
	tmp = 0
	if y_46_re <= -6.2e-12:
		tmp = t_1 / (1.0 / t_0)
	elif y_46_re <= 3.1e-21:
		tmp = t_1 * math.pow(math.pow(math.exp(-1.0), -1.0), (math.atan2(x_46_im, x_46_re) * (0.0 - y_46_im)))
	else:
		tmp = t_1 / (((math.atan2(x_46_im, x_46_re) * y_46_im) + 1.0) / t_0)
	return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im)
	t_0 = hypot(x_46_re, x_46_im) ^ y_46_re
	t_1 = cos(Float64(y_46_im * log(hypot(x_46_im, x_46_re))))
	tmp = 0.0
	if (y_46_re <= -6.2e-12)
		tmp = Float64(t_1 / Float64(1.0 / t_0));
	elseif (y_46_re <= 3.1e-21)
		tmp = Float64(t_1 * ((exp(-1.0) ^ -1.0) ^ Float64(atan(x_46_im, x_46_re) * Float64(0.0 - y_46_im))));
	else
		tmp = Float64(t_1 / Float64(Float64(Float64(atan(x_46_im, x_46_re) * y_46_im) + 1.0) / t_0));
	end
	return tmp
end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im)
	t_0 = hypot(x_46_re, x_46_im) ^ y_46_re;
	t_1 = cos((y_46_im * log(hypot(x_46_im, x_46_re))));
	tmp = 0.0;
	if (y_46_re <= -6.2e-12)
		tmp = t_1 / (1.0 / t_0);
	elseif (y_46_re <= 3.1e-21)
		tmp = t_1 * ((exp(-1.0) ^ -1.0) ^ (atan2(x_46_im, x_46_re) * (0.0 - y_46_im)));
	else
		tmp = t_1 / (((atan2(x_46_im, x_46_re) * y_46_im) + 1.0) / t_0);
	end
	tmp_2 = tmp;
end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, Block[{t$95$1 = N[Cos[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -6.2e-12], N[(t$95$1 / N[(1.0 / t$95$0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 3.1e-21], N[(t$95$1 * N[Power[N[Power[N[Exp[-1.0], $MachinePrecision], -1.0], $MachinePrecision], N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[(0.0 - y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$1 / N[(N[(N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision] + 1.0), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\\
t_1 := \cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\mathbf{if}\;y.re \leq -6.2 \cdot 10^{-12}:\\
\;\;\;\;\frac{t\_1}{\frac{1}{t\_0}}\\

\mathbf{elif}\;y.re \leq 3.1 \cdot 10^{-21}:\\
\;\;\;\;t\_1 \cdot {\left({\left(e^{-1}\right)}^{-1}\right)}^{\left(\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(0 - y.im\right)\right)}\\

\mathbf{else}:\\
\;\;\;\;\frac{t\_1}{\frac{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im + 1}{t\_0}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y.re < -6.2000000000000002e-12

    1. Initial program 36.1%

      \[e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \]
    2. Step-by-step derivation
      1. exp-diffN/A

        \[\leadsto \frac{e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re}}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}} \cdot \cos \color{blue}{\left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)} \]
      2. associate-*l/N/A

        \[\leadsto \frac{e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re} \cdot \cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}{\color{blue}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}} \]
      3. associate-/l*N/A

        \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re} \cdot \color{blue}{\frac{\cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}} \]
      4. *-commutativeN/A

        \[\leadsto \frac{\cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}} \cdot \color{blue}{e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re}} \]
      5. associate-/r/N/A

        \[\leadsto \frac{\cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}{\color{blue}{\frac{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}{e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re}}}} \]
      6. exp-diffN/A

        \[\leadsto \frac{\cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im - \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re}} \]
    3. Simplified65.2%

      \[\leadsto \color{blue}{\frac{\cos \left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}{\frac{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}}} \]
    4. Add Preprocessing
    5. Taylor expanded in y.re around 0

      \[\leadsto \mathsf{/.f64}\left(\color{blue}{\cos \left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)}, \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
    6. Step-by-step derivation
      1. cos-lowering-cos.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right), \mathsf{/.f64}\left(\color{blue}{\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)}, \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)}\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      3. log-lowering-log.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), \color{blue}{y.im}\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      4. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      5. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      6. hypot-defineN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      7. hypot-lowering-hypot.f6476.6%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
    7. Simplified76.6%

      \[\leadsto \frac{\color{blue}{\cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)}}{\frac{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}} \]
    8. Taylor expanded in y.im around 0

      \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right), \mathsf{/.f64}\left(\color{blue}{1}, \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
    9. Step-by-step derivation
      1. Simplified86.4%

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

      if -6.2000000000000002e-12 < y.re < 3.0999999999999998e-21

      1. Initial program 40.1%

        \[e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \]
      2. Add Preprocessing
      3. Taylor expanded in y.re around 0

        \[\leadsto \color{blue}{\cos \left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right) \cdot e^{\mathsf{neg}\left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}} \]
      4. Step-by-step derivation
        1. *-commutativeN/A

          \[\leadsto e^{\mathsf{neg}\left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \cdot \color{blue}{\cos \left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)} \]
        2. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\left(e^{\mathsf{neg}\left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\right), \color{blue}{\cos \left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)}\right) \]
        3. exp-lowering-exp.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\left(\mathsf{neg}\left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right), \cos \color{blue}{\left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)}\right) \]
        4. neg-sub0N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\left(0 - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right), \cos \left(\color{blue}{y.im} \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right) \]
        5. --lowering--.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(0, \left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right), \cos \left(\color{blue}{y.im} \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right) \]
        6. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(y.im, \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right), \cos \left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right) \]
        7. atan2-lowering-atan2.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(y.im, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right), \cos \left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right) \]
        8. cos-lowering-cos.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(y.im, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right), \mathsf{cos.f64}\left(\left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right)\right) \]
        9. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(y.im, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right)\right) \]
        10. log-lowering-log.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(y.im, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right)\right)\right) \]
        11. unpow2N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(y.im, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right)\right)\right)\right)\right) \]
        12. unpow2N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(y.im, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)\right)\right)\right)\right) \]
        13. hypot-defineN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(y.im, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\right)\right)\right) \]
        14. hypot-lowering-hypot.f6480.2%

          \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(y.im, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right)\right) \]
      5. Simplified80.2%

        \[\leadsto \color{blue}{e^{0 - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)} \]
      6. Step-by-step derivation
        1. sub0-negN/A

          \[\leadsto \mathsf{*.f64}\left(\left(e^{\mathsf{neg}\left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\color{blue}{y.im}, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right)\right) \]
        2. neg-mul-1N/A

          \[\leadsto \mathsf{*.f64}\left(\left(e^{-1 \cdot \left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\color{blue}{y.im}, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right)\right) \]
        3. exp-prodN/A

          \[\leadsto \mathsf{*.f64}\left(\left({\left(e^{-1}\right)}^{\left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\right), \mathsf{cos.f64}\left(\color{blue}{\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)}\right)\right) \]
        4. *-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(\left({\left(e^{-1}\right)}^{\left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\right)}\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \color{blue}{\mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)}\right)\right)\right) \]
        5. remove-double-negN/A

          \[\leadsto \mathsf{*.f64}\left(\left({\left(e^{-1}\right)}^{\left(\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(y.im\right)\right)\right)\right)\right)}\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right)\right) \]
        6. sub0-negN/A

          \[\leadsto \mathsf{*.f64}\left(\left({\left(e^{-1}\right)}^{\left(\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(\mathsf{neg}\left(\left(0 - y.im\right)\right)\right)\right)}\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right)\right) \]
        7. distribute-rgt-neg-inN/A

          \[\leadsto \mathsf{*.f64}\left(\left({\left(e^{-1}\right)}^{\left(\mathsf{neg}\left(\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(0 - y.im\right)\right)\right)}\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \color{blue}{\mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)}\right)\right)\right) \]
        8. neg-mul-1N/A

          \[\leadsto \mathsf{*.f64}\left(\left({\left(e^{-1}\right)}^{\left(-1 \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(0 - y.im\right)\right)\right)}\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \color{blue}{\mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)}\right)\right)\right) \]
        9. pow-unpowN/A

          \[\leadsto \mathsf{*.f64}\left(\left({\left({\left(e^{-1}\right)}^{-1}\right)}^{\left(\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(0 - y.im\right)\right)}\right), \mathsf{cos.f64}\left(\color{blue}{\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)}\right)\right) \]
        10. pow-lowering-pow.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left({\left(e^{-1}\right)}^{-1}\right), \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(0 - y.im\right)\right)\right), \mathsf{cos.f64}\left(\color{blue}{\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)}\right)\right) \]
        11. pow-lowering-pow.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{pow.f64}\left(\left(e^{-1}\right), -1\right), \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(0 - y.im\right)\right)\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\color{blue}{y.im}, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right)\right) \]
        12. exp-lowering-exp.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{pow.f64}\left(\mathsf{exp.f64}\left(-1\right), -1\right), \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(0 - y.im\right)\right)\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right)\right) \]
        13. *-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{pow.f64}\left(\mathsf{exp.f64}\left(-1\right), -1\right), \left(\left(0 - y.im\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \color{blue}{\mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)}\right)\right)\right) \]
        14. sub0-negN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{pow.f64}\left(\mathsf{exp.f64}\left(-1\right), -1\right), \left(\left(\mathsf{neg}\left(y.im\right)\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\color{blue}{\mathsf{hypot.f64}\left(x.im, x.re\right)}\right)\right)\right)\right) \]
        15. distribute-lft-neg-inN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{pow.f64}\left(\mathsf{exp.f64}\left(-1\right), -1\right), \left(\mathsf{neg}\left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \color{blue}{\mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)}\right)\right)\right) \]
        16. sub0-negN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{pow.f64}\left(\mathsf{exp.f64}\left(-1\right), -1\right), \left(0 - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \color{blue}{\mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)}\right)\right)\right) \]
        17. --lowering--.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{pow.f64}\left(\mathsf{exp.f64}\left(-1\right), -1\right), \mathsf{\_.f64}\left(0, \left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \color{blue}{\mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)}\right)\right)\right) \]
        18. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{pow.f64}\left(\mathsf{exp.f64}\left(-1\right), -1\right), \mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(y.im, \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right)\right) \]
        19. atan2-lowering-atan2.f6480.2%

          \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{pow.f64}\left(\mathsf{exp.f64}\left(-1\right), -1\right), \mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(y.im, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right)\right) \]
      7. Applied egg-rr80.2%

        \[\leadsto \color{blue}{{\left({\left(e^{-1}\right)}^{-1}\right)}^{\left(0 - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}} \cdot \cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \]

      if 3.0999999999999998e-21 < y.re

      1. Initial program 29.1%

        \[e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \]
      2. Step-by-step derivation
        1. exp-diffN/A

          \[\leadsto \frac{e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re}}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}} \cdot \cos \color{blue}{\left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)} \]
        2. associate-*l/N/A

          \[\leadsto \frac{e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re} \cdot \cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}{\color{blue}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}} \]
        3. associate-/l*N/A

          \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re} \cdot \color{blue}{\frac{\cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}} \]
        4. *-commutativeN/A

          \[\leadsto \frac{\cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}} \cdot \color{blue}{e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re}} \]
        5. associate-/r/N/A

          \[\leadsto \frac{\cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}{\color{blue}{\frac{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}{e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re}}}} \]
        6. exp-diffN/A

          \[\leadsto \frac{\cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im - \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re}} \]
      3. Simplified49.1%

        \[\leadsto \color{blue}{\frac{\cos \left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}{\frac{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}}} \]
      4. Add Preprocessing
      5. Taylor expanded in y.re around 0

        \[\leadsto \mathsf{/.f64}\left(\color{blue}{\cos \left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)}, \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      6. Step-by-step derivation
        1. cos-lowering-cos.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right), \mathsf{/.f64}\left(\color{blue}{\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)}, \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
        2. *-lowering-*.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)}\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
        3. log-lowering-log.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), \color{blue}{y.im}\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
        4. unpow2N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
        5. unpow2N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
        6. hypot-defineN/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
        7. hypot-lowering-hypot.f6456.4%

          \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      7. Simplified56.4%

        \[\leadsto \frac{\color{blue}{\cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)}}{\frac{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}} \]
      8. Taylor expanded in y.im around 0

        \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right), \mathsf{/.f64}\left(\color{blue}{\left(1 + y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}, \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      9. Step-by-step derivation
        1. +-commutativeN/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right), \mathsf{/.f64}\left(\left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re} + 1\right), \mathsf{pow.f64}\left(\color{blue}{\mathsf{hypot.f64}\left(x.re, x.im\right)}, y.re\right)\right)\right) \]
        2. +-lowering-+.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(\left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right), 1\right), \mathsf{pow.f64}\left(\color{blue}{\mathsf{hypot.f64}\left(x.re, x.im\right)}, y.re\right)\right)\right) \]
        3. *-lowering-*.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(y.im, \tan^{-1}_* \frac{x.im}{x.re}\right), 1\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(\color{blue}{x.re}, x.im\right), y.re\right)\right)\right) \]
        4. atan2-lowering-atan2.f6474.8%

          \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{atan2.f64}\left(x.im, x.re\right)\right), 1\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      10. Simplified74.8%

        \[\leadsto \frac{\cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)}{\frac{\color{blue}{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re} + 1}}{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}} \]
    10. Recombined 3 regimes into one program.
    11. Final simplification80.8%

      \[\leadsto \begin{array}{l} \mathbf{if}\;y.re \leq -6.2 \cdot 10^{-12}:\\ \;\;\;\;\frac{\cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)}{\frac{1}{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}}\\ \mathbf{elif}\;y.re \leq 3.1 \cdot 10^{-21}:\\ \;\;\;\;\cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \cdot {\left({\left(e^{-1}\right)}^{-1}\right)}^{\left(\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(0 - y.im\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)}{\frac{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im + 1}{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}}\\ \end{array} \]
    12. Add Preprocessing

    Alternative 5: 77.9% accurate, 1.3× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_0 := {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\\ t_1 := \cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\ t_2 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\ \mathbf{if}\;y.re \leq -2.7 \cdot 10^{-12}:\\ \;\;\;\;\frac{t\_1}{\frac{1}{t\_0}}\\ \mathbf{elif}\;y.re \leq 3.1 \cdot 10^{-21}:\\ \;\;\;\;t\_1 \cdot {\left(e^{-1}\right)}^{t\_2}\\ \mathbf{else}:\\ \;\;\;\;\frac{t\_1}{\frac{t\_2 + 1}{t\_0}}\\ \end{array} \end{array} \]
    (FPCore (x.re x.im y.re y.im)
     :precision binary64
     (let* ((t_0 (pow (hypot x.re x.im) y.re))
            (t_1 (cos (* y.im (log (hypot x.im x.re)))))
            (t_2 (* (atan2 x.im x.re) y.im)))
       (if (<= y.re -2.7e-12)
         (/ t_1 (/ 1.0 t_0))
         (if (<= y.re 3.1e-21)
           (* t_1 (pow (exp -1.0) t_2))
           (/ t_1 (/ (+ t_2 1.0) t_0))))))
    double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
    	double t_0 = pow(hypot(x_46_re, x_46_im), y_46_re);
    	double t_1 = cos((y_46_im * log(hypot(x_46_im, x_46_re))));
    	double t_2 = atan2(x_46_im, x_46_re) * y_46_im;
    	double tmp;
    	if (y_46_re <= -2.7e-12) {
    		tmp = t_1 / (1.0 / t_0);
    	} else if (y_46_re <= 3.1e-21) {
    		tmp = t_1 * pow(exp(-1.0), t_2);
    	} else {
    		tmp = t_1 / ((t_2 + 1.0) / t_0);
    	}
    	return tmp;
    }
    
    public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
    	double t_0 = Math.pow(Math.hypot(x_46_re, x_46_im), y_46_re);
    	double t_1 = Math.cos((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re))));
    	double t_2 = Math.atan2(x_46_im, x_46_re) * y_46_im;
    	double tmp;
    	if (y_46_re <= -2.7e-12) {
    		tmp = t_1 / (1.0 / t_0);
    	} else if (y_46_re <= 3.1e-21) {
    		tmp = t_1 * Math.pow(Math.exp(-1.0), t_2);
    	} else {
    		tmp = t_1 / ((t_2 + 1.0) / t_0);
    	}
    	return tmp;
    }
    
    def code(x_46_re, x_46_im, y_46_re, y_46_im):
    	t_0 = math.pow(math.hypot(x_46_re, x_46_im), y_46_re)
    	t_1 = math.cos((y_46_im * math.log(math.hypot(x_46_im, x_46_re))))
    	t_2 = math.atan2(x_46_im, x_46_re) * y_46_im
    	tmp = 0
    	if y_46_re <= -2.7e-12:
    		tmp = t_1 / (1.0 / t_0)
    	elif y_46_re <= 3.1e-21:
    		tmp = t_1 * math.pow(math.exp(-1.0), t_2)
    	else:
    		tmp = t_1 / ((t_2 + 1.0) / t_0)
    	return tmp
    
    function code(x_46_re, x_46_im, y_46_re, y_46_im)
    	t_0 = hypot(x_46_re, x_46_im) ^ y_46_re
    	t_1 = cos(Float64(y_46_im * log(hypot(x_46_im, x_46_re))))
    	t_2 = Float64(atan(x_46_im, x_46_re) * y_46_im)
    	tmp = 0.0
    	if (y_46_re <= -2.7e-12)
    		tmp = Float64(t_1 / Float64(1.0 / t_0));
    	elseif (y_46_re <= 3.1e-21)
    		tmp = Float64(t_1 * (exp(-1.0) ^ t_2));
    	else
    		tmp = Float64(t_1 / Float64(Float64(t_2 + 1.0) / t_0));
    	end
    	return tmp
    end
    
    function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im)
    	t_0 = hypot(x_46_re, x_46_im) ^ y_46_re;
    	t_1 = cos((y_46_im * log(hypot(x_46_im, x_46_re))));
    	t_2 = atan2(x_46_im, x_46_re) * y_46_im;
    	tmp = 0.0;
    	if (y_46_re <= -2.7e-12)
    		tmp = t_1 / (1.0 / t_0);
    	elseif (y_46_re <= 3.1e-21)
    		tmp = t_1 * (exp(-1.0) ^ t_2);
    	else
    		tmp = t_1 / ((t_2 + 1.0) / t_0);
    	end
    	tmp_2 = tmp;
    end
    
    code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, Block[{t$95$1 = N[Cos[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, If[LessEqual[y$46$re, -2.7e-12], N[(t$95$1 / N[(1.0 / t$95$0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 3.1e-21], N[(t$95$1 * N[Power[N[Exp[-1.0], $MachinePrecision], t$95$2], $MachinePrecision]), $MachinePrecision], N[(t$95$1 / N[(N[(t$95$2 + 1.0), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision]]]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_0 := {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\\
    t_1 := \cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
    t_2 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
    \mathbf{if}\;y.re \leq -2.7 \cdot 10^{-12}:\\
    \;\;\;\;\frac{t\_1}{\frac{1}{t\_0}}\\
    
    \mathbf{elif}\;y.re \leq 3.1 \cdot 10^{-21}:\\
    \;\;\;\;t\_1 \cdot {\left(e^{-1}\right)}^{t\_2}\\
    
    \mathbf{else}:\\
    \;\;\;\;\frac{t\_1}{\frac{t\_2 + 1}{t\_0}}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if y.re < -2.6999999999999998e-12

      1. Initial program 36.1%

        \[e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \]
      2. Step-by-step derivation
        1. exp-diffN/A

          \[\leadsto \frac{e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re}}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}} \cdot \cos \color{blue}{\left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)} \]
        2. associate-*l/N/A

          \[\leadsto \frac{e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re} \cdot \cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}{\color{blue}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}} \]
        3. associate-/l*N/A

          \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re} \cdot \color{blue}{\frac{\cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}} \]
        4. *-commutativeN/A

          \[\leadsto \frac{\cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}} \cdot \color{blue}{e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re}} \]
        5. associate-/r/N/A

          \[\leadsto \frac{\cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}{\color{blue}{\frac{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}{e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re}}}} \]
        6. exp-diffN/A

          \[\leadsto \frac{\cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im - \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re}} \]
      3. Simplified65.2%

        \[\leadsto \color{blue}{\frac{\cos \left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}{\frac{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}}} \]
      4. Add Preprocessing
      5. Taylor expanded in y.re around 0

        \[\leadsto \mathsf{/.f64}\left(\color{blue}{\cos \left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)}, \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      6. Step-by-step derivation
        1. cos-lowering-cos.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right), \mathsf{/.f64}\left(\color{blue}{\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)}, \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
        2. *-lowering-*.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)}\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
        3. log-lowering-log.f64N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), \color{blue}{y.im}\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
        4. unpow2N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
        5. unpow2N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
        6. hypot-defineN/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
        7. hypot-lowering-hypot.f6476.6%

          \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      7. Simplified76.6%

        \[\leadsto \frac{\color{blue}{\cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)}}{\frac{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}} \]
      8. Taylor expanded in y.im around 0

        \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right), \mathsf{/.f64}\left(\color{blue}{1}, \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      9. Step-by-step derivation
        1. Simplified86.4%

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

        if -2.6999999999999998e-12 < y.re < 3.0999999999999998e-21

        1. Initial program 40.1%

          \[e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \]
        2. Add Preprocessing
        3. Taylor expanded in y.re around 0

          \[\leadsto \color{blue}{\cos \left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right) \cdot e^{\mathsf{neg}\left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}} \]
        4. Step-by-step derivation
          1. *-commutativeN/A

            \[\leadsto e^{\mathsf{neg}\left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \cdot \color{blue}{\cos \left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)} \]
          2. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\left(e^{\mathsf{neg}\left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\right), \color{blue}{\cos \left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)}\right) \]
          3. exp-lowering-exp.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\left(\mathsf{neg}\left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right), \cos \color{blue}{\left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)}\right) \]
          4. neg-sub0N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\left(0 - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right), \cos \left(\color{blue}{y.im} \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right) \]
          5. --lowering--.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(0, \left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right), \cos \left(\color{blue}{y.im} \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right) \]
          6. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(y.im, \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right), \cos \left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right) \]
          7. atan2-lowering-atan2.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(y.im, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right), \cos \left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right) \]
          8. cos-lowering-cos.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(y.im, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right), \mathsf{cos.f64}\left(\left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right)\right) \]
          9. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(y.im, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right)\right) \]
          10. log-lowering-log.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(y.im, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right)\right)\right) \]
          11. unpow2N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(y.im, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right)\right)\right)\right)\right) \]
          12. unpow2N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(y.im, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)\right)\right)\right)\right) \]
          13. hypot-defineN/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(y.im, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\right)\right)\right) \]
          14. hypot-lowering-hypot.f6480.2%

            \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(y.im, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right)\right) \]
        5. Simplified80.2%

          \[\leadsto \color{blue}{e^{0 - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)} \]
        6. Step-by-step derivation
          1. sub0-negN/A

            \[\leadsto \mathsf{*.f64}\left(\left(e^{\mathsf{neg}\left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\color{blue}{y.im}, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right)\right) \]
          2. neg-mul-1N/A

            \[\leadsto \mathsf{*.f64}\left(\left(e^{-1 \cdot \left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\color{blue}{y.im}, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right)\right) \]
          3. exp-prodN/A

            \[\leadsto \mathsf{*.f64}\left(\left({\left(e^{-1}\right)}^{\left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\right), \mathsf{cos.f64}\left(\color{blue}{\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)}\right)\right) \]
          4. pow-lowering-pow.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(e^{-1}\right), \left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right), \mathsf{cos.f64}\left(\color{blue}{\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)}\right)\right) \]
          5. exp-lowering-exp.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{exp.f64}\left(-1\right), \left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\color{blue}{y.im}, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right)\right) \]
          6. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{exp.f64}\left(-1\right), \mathsf{*.f64}\left(y.im, \tan^{-1}_* \frac{x.im}{x.re}\right)\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \color{blue}{\mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)}\right)\right)\right) \]
          7. atan2-lowering-atan2.f6480.2%

            \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{exp.f64}\left(-1\right), \mathsf{*.f64}\left(y.im, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right)\right) \]
        7. Applied egg-rr80.2%

          \[\leadsto \color{blue}{{\left(e^{-1}\right)}^{\left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}} \cdot \cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \]

        if 3.0999999999999998e-21 < y.re

        1. Initial program 29.1%

          \[e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \]
        2. Step-by-step derivation
          1. exp-diffN/A

            \[\leadsto \frac{e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re}}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}} \cdot \cos \color{blue}{\left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)} \]
          2. associate-*l/N/A

            \[\leadsto \frac{e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re} \cdot \cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}{\color{blue}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}} \]
          3. associate-/l*N/A

            \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re} \cdot \color{blue}{\frac{\cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}} \]
          4. *-commutativeN/A

            \[\leadsto \frac{\cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}} \cdot \color{blue}{e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re}} \]
          5. associate-/r/N/A

            \[\leadsto \frac{\cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}{\color{blue}{\frac{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}{e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re}}}} \]
          6. exp-diffN/A

            \[\leadsto \frac{\cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im - \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re}} \]
        3. Simplified49.1%

          \[\leadsto \color{blue}{\frac{\cos \left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}{\frac{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}}} \]
        4. Add Preprocessing
        5. Taylor expanded in y.re around 0

          \[\leadsto \mathsf{/.f64}\left(\color{blue}{\cos \left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)}, \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
        6. Step-by-step derivation
          1. cos-lowering-cos.f64N/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right), \mathsf{/.f64}\left(\color{blue}{\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)}, \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
          2. *-lowering-*.f64N/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)}\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
          3. log-lowering-log.f64N/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), \color{blue}{y.im}\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
          4. unpow2N/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
          5. unpow2N/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
          6. hypot-defineN/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
          7. hypot-lowering-hypot.f6456.4%

            \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
        7. Simplified56.4%

          \[\leadsto \frac{\color{blue}{\cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)}}{\frac{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}} \]
        8. Taylor expanded in y.im around 0

          \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right), \mathsf{/.f64}\left(\color{blue}{\left(1 + y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}, \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
        9. Step-by-step derivation
          1. +-commutativeN/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right), \mathsf{/.f64}\left(\left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re} + 1\right), \mathsf{pow.f64}\left(\color{blue}{\mathsf{hypot.f64}\left(x.re, x.im\right)}, y.re\right)\right)\right) \]
          2. +-lowering-+.f64N/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(\left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right), 1\right), \mathsf{pow.f64}\left(\color{blue}{\mathsf{hypot.f64}\left(x.re, x.im\right)}, y.re\right)\right)\right) \]
          3. *-lowering-*.f64N/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(y.im, \tan^{-1}_* \frac{x.im}{x.re}\right), 1\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(\color{blue}{x.re}, x.im\right), y.re\right)\right)\right) \]
          4. atan2-lowering-atan2.f6474.8%

            \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{atan2.f64}\left(x.im, x.re\right)\right), 1\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
        10. Simplified74.8%

          \[\leadsto \frac{\cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)}{\frac{\color{blue}{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re} + 1}}{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}} \]
      10. Recombined 3 regimes into one program.
      11. Final simplification80.8%

        \[\leadsto \begin{array}{l} \mathbf{if}\;y.re \leq -2.7 \cdot 10^{-12}:\\ \;\;\;\;\frac{\cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)}{\frac{1}{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}}\\ \mathbf{elif}\;y.re \leq 3.1 \cdot 10^{-21}:\\ \;\;\;\;\cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \cdot {\left(e^{-1}\right)}^{\left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)}{\frac{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im + 1}{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}}\\ \end{array} \]
      12. Add Preprocessing

      Alternative 6: 77.5% accurate, 1.3× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_0 := \cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\ \mathbf{if}\;y.re \leq -2.8 \cdot 10^{-12}:\\ \;\;\;\;\frac{t\_0}{\frac{1}{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}}\\ \mathbf{elif}\;y.re \leq 3.1 \cdot 10^{-21}:\\ \;\;\;\;t\_0 \cdot {\left(e^{-1}\right)}^{\left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{{\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\left(\frac{y.re}{-2}\right)}}\\ \end{array} \end{array} \]
      (FPCore (x.re x.im y.re y.im)
       :precision binary64
       (let* ((t_0 (cos (* y.im (log (hypot x.im x.re))))))
         (if (<= y.re -2.8e-12)
           (/ t_0 (/ 1.0 (pow (hypot x.re x.im) y.re)))
           (if (<= y.re 3.1e-21)
             (* t_0 (pow (exp -1.0) (* (atan2 x.im x.re) y.im)))
             (/ 1.0 (pow (+ (* x.re x.re) (* x.im x.im)) (/ y.re -2.0)))))))
      double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
      	double t_0 = cos((y_46_im * log(hypot(x_46_im, x_46_re))));
      	double tmp;
      	if (y_46_re <= -2.8e-12) {
      		tmp = t_0 / (1.0 / pow(hypot(x_46_re, x_46_im), y_46_re));
      	} else if (y_46_re <= 3.1e-21) {
      		tmp = t_0 * pow(exp(-1.0), (atan2(x_46_im, x_46_re) * y_46_im));
      	} else {
      		tmp = 1.0 / pow(((x_46_re * x_46_re) + (x_46_im * x_46_im)), (y_46_re / -2.0));
      	}
      	return tmp;
      }
      
      public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
      	double t_0 = Math.cos((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re))));
      	double tmp;
      	if (y_46_re <= -2.8e-12) {
      		tmp = t_0 / (1.0 / Math.pow(Math.hypot(x_46_re, x_46_im), y_46_re));
      	} else if (y_46_re <= 3.1e-21) {
      		tmp = t_0 * Math.pow(Math.exp(-1.0), (Math.atan2(x_46_im, x_46_re) * y_46_im));
      	} else {
      		tmp = 1.0 / Math.pow(((x_46_re * x_46_re) + (x_46_im * x_46_im)), (y_46_re / -2.0));
      	}
      	return tmp;
      }
      
      def code(x_46_re, x_46_im, y_46_re, y_46_im):
      	t_0 = math.cos((y_46_im * math.log(math.hypot(x_46_im, x_46_re))))
      	tmp = 0
      	if y_46_re <= -2.8e-12:
      		tmp = t_0 / (1.0 / math.pow(math.hypot(x_46_re, x_46_im), y_46_re))
      	elif y_46_re <= 3.1e-21:
      		tmp = t_0 * math.pow(math.exp(-1.0), (math.atan2(x_46_im, x_46_re) * y_46_im))
      	else:
      		tmp = 1.0 / math.pow(((x_46_re * x_46_re) + (x_46_im * x_46_im)), (y_46_re / -2.0))
      	return tmp
      
      function code(x_46_re, x_46_im, y_46_re, y_46_im)
      	t_0 = cos(Float64(y_46_im * log(hypot(x_46_im, x_46_re))))
      	tmp = 0.0
      	if (y_46_re <= -2.8e-12)
      		tmp = Float64(t_0 / Float64(1.0 / (hypot(x_46_re, x_46_im) ^ y_46_re)));
      	elseif (y_46_re <= 3.1e-21)
      		tmp = Float64(t_0 * (exp(-1.0) ^ Float64(atan(x_46_im, x_46_re) * y_46_im)));
      	else
      		tmp = Float64(1.0 / (Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)) ^ Float64(y_46_re / -2.0)));
      	end
      	return tmp
      end
      
      function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im)
      	t_0 = cos((y_46_im * log(hypot(x_46_im, x_46_re))));
      	tmp = 0.0;
      	if (y_46_re <= -2.8e-12)
      		tmp = t_0 / (1.0 / (hypot(x_46_re, x_46_im) ^ y_46_re));
      	elseif (y_46_re <= 3.1e-21)
      		tmp = t_0 * (exp(-1.0) ^ (atan2(x_46_im, x_46_re) * y_46_im));
      	else
      		tmp = 1.0 / (((x_46_re * x_46_re) + (x_46_im * x_46_im)) ^ (y_46_re / -2.0));
      	end
      	tmp_2 = tmp;
      end
      
      code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Cos[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -2.8e-12], N[(t$95$0 / N[(1.0 / N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 3.1e-21], N[(t$95$0 * N[Power[N[Exp[-1.0], $MachinePrecision], N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(1.0 / N[Power[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision], N[(y$46$re / -2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_0 := \cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
      \mathbf{if}\;y.re \leq -2.8 \cdot 10^{-12}:\\
      \;\;\;\;\frac{t\_0}{\frac{1}{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}}\\
      
      \mathbf{elif}\;y.re \leq 3.1 \cdot 10^{-21}:\\
      \;\;\;\;t\_0 \cdot {\left(e^{-1}\right)}^{\left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\right)}\\
      
      \mathbf{else}:\\
      \;\;\;\;\frac{1}{{\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\left(\frac{y.re}{-2}\right)}}\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 3 regimes
      2. if y.re < -2.8000000000000002e-12

        1. Initial program 36.1%

          \[e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \]
        2. Step-by-step derivation
          1. exp-diffN/A

            \[\leadsto \frac{e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re}}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}} \cdot \cos \color{blue}{\left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)} \]
          2. associate-*l/N/A

            \[\leadsto \frac{e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re} \cdot \cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}{\color{blue}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}} \]
          3. associate-/l*N/A

            \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re} \cdot \color{blue}{\frac{\cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}} \]
          4. *-commutativeN/A

            \[\leadsto \frac{\cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}} \cdot \color{blue}{e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re}} \]
          5. associate-/r/N/A

            \[\leadsto \frac{\cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}{\color{blue}{\frac{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}{e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re}}}} \]
          6. exp-diffN/A

            \[\leadsto \frac{\cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im - \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re}} \]
        3. Simplified65.2%

          \[\leadsto \color{blue}{\frac{\cos \left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}{\frac{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}}} \]
        4. Add Preprocessing
        5. Taylor expanded in y.re around 0

          \[\leadsto \mathsf{/.f64}\left(\color{blue}{\cos \left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)}, \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
        6. Step-by-step derivation
          1. cos-lowering-cos.f64N/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right), \mathsf{/.f64}\left(\color{blue}{\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)}, \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
          2. *-lowering-*.f64N/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)}\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
          3. log-lowering-log.f64N/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), \color{blue}{y.im}\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
          4. unpow2N/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
          5. unpow2N/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
          6. hypot-defineN/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
          7. hypot-lowering-hypot.f6476.6%

            \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
        7. Simplified76.6%

          \[\leadsto \frac{\color{blue}{\cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)}}{\frac{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}} \]
        8. Taylor expanded in y.im around 0

          \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right), \mathsf{/.f64}\left(\color{blue}{1}, \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
        9. Step-by-step derivation
          1. Simplified86.4%

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

          if -2.8000000000000002e-12 < y.re < 3.0999999999999998e-21

          1. Initial program 40.1%

            \[e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \]
          2. Add Preprocessing
          3. Taylor expanded in y.re around 0

            \[\leadsto \color{blue}{\cos \left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right) \cdot e^{\mathsf{neg}\left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}} \]
          4. Step-by-step derivation
            1. *-commutativeN/A

              \[\leadsto e^{\mathsf{neg}\left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \cdot \color{blue}{\cos \left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)} \]
            2. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\left(e^{\mathsf{neg}\left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\right), \color{blue}{\cos \left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)}\right) \]
            3. exp-lowering-exp.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\left(\mathsf{neg}\left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right), \cos \color{blue}{\left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)}\right) \]
            4. neg-sub0N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\left(0 - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right), \cos \left(\color{blue}{y.im} \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right) \]
            5. --lowering--.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(0, \left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right), \cos \left(\color{blue}{y.im} \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right) \]
            6. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(y.im, \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right), \cos \left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right) \]
            7. atan2-lowering-atan2.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(y.im, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right), \cos \left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right) \]
            8. cos-lowering-cos.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(y.im, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right), \mathsf{cos.f64}\left(\left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right)\right) \]
            9. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(y.im, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right)\right) \]
            10. log-lowering-log.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(y.im, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right)\right)\right) \]
            11. unpow2N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(y.im, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right)\right)\right)\right)\right) \]
            12. unpow2N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(y.im, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)\right)\right)\right)\right) \]
            13. hypot-defineN/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(y.im, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\right)\right)\right) \]
            14. hypot-lowering-hypot.f6480.2%

              \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(y.im, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right)\right) \]
          5. Simplified80.2%

            \[\leadsto \color{blue}{e^{0 - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)} \]
          6. Step-by-step derivation
            1. sub0-negN/A

              \[\leadsto \mathsf{*.f64}\left(\left(e^{\mathsf{neg}\left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\color{blue}{y.im}, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right)\right) \]
            2. neg-mul-1N/A

              \[\leadsto \mathsf{*.f64}\left(\left(e^{-1 \cdot \left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\color{blue}{y.im}, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right)\right) \]
            3. exp-prodN/A

              \[\leadsto \mathsf{*.f64}\left(\left({\left(e^{-1}\right)}^{\left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\right), \mathsf{cos.f64}\left(\color{blue}{\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)}\right)\right) \]
            4. pow-lowering-pow.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(e^{-1}\right), \left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right), \mathsf{cos.f64}\left(\color{blue}{\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)}\right)\right) \]
            5. exp-lowering-exp.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{exp.f64}\left(-1\right), \left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\color{blue}{y.im}, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right)\right) \]
            6. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{exp.f64}\left(-1\right), \mathsf{*.f64}\left(y.im, \tan^{-1}_* \frac{x.im}{x.re}\right)\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \color{blue}{\mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)}\right)\right)\right) \]
            7. atan2-lowering-atan2.f6480.2%

              \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{exp.f64}\left(-1\right), \mathsf{*.f64}\left(y.im, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right)\right) \]
          7. Applied egg-rr80.2%

            \[\leadsto \color{blue}{{\left(e^{-1}\right)}^{\left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}} \cdot \cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \]

          if 3.0999999999999998e-21 < y.re

          1. Initial program 29.1%

            \[e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \]
          2. Step-by-step derivation
            1. exp-diffN/A

              \[\leadsto \frac{e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re}}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}} \cdot \cos \color{blue}{\left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)} \]
            2. associate-*l/N/A

              \[\leadsto \frac{e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re} \cdot \cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}{\color{blue}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}} \]
            3. associate-/l*N/A

              \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re} \cdot \color{blue}{\frac{\cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}} \]
            4. *-commutativeN/A

              \[\leadsto \frac{\cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}} \cdot \color{blue}{e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re}} \]
            5. associate-/r/N/A

              \[\leadsto \frac{\cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}{\color{blue}{\frac{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}{e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re}}}} \]
            6. exp-diffN/A

              \[\leadsto \frac{\cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im - \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re}} \]
          3. Simplified49.1%

            \[\leadsto \color{blue}{\frac{\cos \left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}{\frac{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}}} \]
          4. Add Preprocessing
          5. Taylor expanded in y.re around 0

            \[\leadsto \mathsf{/.f64}\left(\color{blue}{\cos \left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)}, \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
          6. Step-by-step derivation
            1. cos-lowering-cos.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right), \mathsf{/.f64}\left(\color{blue}{\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)}, \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
            2. *-lowering-*.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)}\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
            3. log-lowering-log.f64N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), \color{blue}{y.im}\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
            4. unpow2N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
            5. unpow2N/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
            6. hypot-defineN/A

              \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
            7. hypot-lowering-hypot.f6456.4%

              \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
          7. Simplified56.4%

            \[\leadsto \frac{\color{blue}{\cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)}}{\frac{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}} \]
          8. Taylor expanded in y.im around 0

            \[\leadsto \mathsf{/.f64}\left(\color{blue}{1}, \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
          9. Step-by-step derivation
            1. Simplified63.6%

              \[\leadsto \frac{\color{blue}{1}}{\frac{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}} \]
            2. Step-by-step derivation
              1. clear-numN/A

                \[\leadsto \mathsf{/.f64}\left(1, \left(\frac{1}{\color{blue}{\frac{{\left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)}^{y.re}}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}}}\right)\right) \]
              2. div-invN/A

                \[\leadsto \mathsf{/.f64}\left(1, \left(\frac{1}{{\left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)}^{y.re} \cdot \color{blue}{\frac{1}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}}}\right)\right) \]
              3. associate-/r*N/A

                \[\leadsto \mathsf{/.f64}\left(1, \left(\frac{\frac{1}{{\left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)}^{y.re}}}{\color{blue}{\frac{1}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}}}\right)\right) \]
              4. /-lowering-/.f64N/A

                \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{1}{{\left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)}^{y.re}}\right), \color{blue}{\left(\frac{1}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\right)}\right)\right) \]
              5. sqrt-pow2N/A

                \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{1}{{\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\left(\frac{y.re}{2}\right)}}\right), \left(\frac{1}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\right)\right)\right) \]
              6. +-commutativeN/A

                \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{1}{{\left(x.im \cdot x.im + x.re \cdot x.re\right)}^{\left(\frac{y.re}{2}\right)}}\right), \left(\frac{1}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\right)\right)\right) \]
              7. pow-flipN/A

                \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\left({\left(x.im \cdot x.im + x.re \cdot x.re\right)}^{\left(\mathsf{neg}\left(\frac{y.re}{2}\right)\right)}\right), \left(\frac{\color{blue}{1}}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\right)\right)\right) \]
              8. pow-lowering-pow.f64N/A

                \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\left(x.im \cdot x.im + x.re \cdot x.re\right), \left(\mathsf{neg}\left(\frac{y.re}{2}\right)\right)\right), \left(\frac{\color{blue}{1}}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\right)\right)\right) \]
              9. +-commutativeN/A

                \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\left(x.re \cdot x.re + x.im \cdot x.im\right), \left(\mathsf{neg}\left(\frac{y.re}{2}\right)\right)\right), \left(\frac{1}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\right)\right)\right) \]
              10. +-lowering-+.f64N/A

                \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{+.f64}\left(\left(x.re \cdot x.re\right), \left(x.im \cdot x.im\right)\right), \left(\mathsf{neg}\left(\frac{y.re}{2}\right)\right)\right), \left(\frac{1}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\right)\right)\right) \]
              11. *-lowering-*.f64N/A

                \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \left(x.im \cdot x.im\right)\right), \left(\mathsf{neg}\left(\frac{y.re}{2}\right)\right)\right), \left(\frac{1}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\right)\right)\right) \]
              12. *-lowering-*.f64N/A

                \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right), \left(\mathsf{neg}\left(\frac{y.re}{2}\right)\right)\right), \left(\frac{1}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\right)\right)\right) \]
              13. distribute-neg-frac2N/A

                \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right), \left(\frac{y.re}{\mathsf{neg}\left(2\right)}\right)\right), \left(\frac{1}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\right)\right)\right) \]
              14. /-lowering-/.f64N/A

                \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right), \mathsf{/.f64}\left(y.re, \left(\mathsf{neg}\left(2\right)\right)\right)\right), \left(\frac{1}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\right)\right)\right) \]
              15. metadata-evalN/A

                \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right), \mathsf{/.f64}\left(y.re, -2\right)\right), \left(\frac{1}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\right)\right)\right) \]
              16. rec-expN/A

                \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right), \mathsf{/.f64}\left(y.re, -2\right)\right), \left(e^{\mathsf{neg}\left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\right)}\right)\right)\right) \]
              17. distribute-lft-neg-outN/A

                \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right), \mathsf{/.f64}\left(y.re, -2\right)\right), \left(e^{\left(\mathsf{neg}\left(\tan^{-1}_* \frac{x.im}{x.re}\right)\right) \cdot y.im}\right)\right)\right) \]
              18. mul-1-negN/A

                \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right), \mathsf{/.f64}\left(y.re, -2\right)\right), \left(e^{\left(-1 \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot y.im}\right)\right)\right) \]
            3. Applied egg-rr63.6%

              \[\leadsto \frac{1}{\color{blue}{\frac{{\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\left(\frac{y.re}{-2}\right)}}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(0 - y.im\right)}}}} \]
            4. Taylor expanded in y.im around 0

              \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right), \mathsf{/.f64}\left(y.re, -2\right)\right), \color{blue}{1}\right)\right) \]
            5. Step-by-step derivation
              1. Simplified71.1%

                \[\leadsto \frac{1}{\frac{{\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\left(\frac{y.re}{-2}\right)}}{\color{blue}{1}}} \]
            6. Recombined 3 regimes into one program.
            7. Final simplification80.0%

              \[\leadsto \begin{array}{l} \mathbf{if}\;y.re \leq -2.8 \cdot 10^{-12}:\\ \;\;\;\;\frac{\cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)}{\frac{1}{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}}\\ \mathbf{elif}\;y.re \leq 3.1 \cdot 10^{-21}:\\ \;\;\;\;\cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \cdot {\left(e^{-1}\right)}^{\left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{{\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\left(\frac{y.re}{-2}\right)}}\\ \end{array} \]
            8. Add Preprocessing

            Alternative 7: 77.5% accurate, 1.6× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} t_0 := \cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\ \mathbf{if}\;y.re \leq -6.1 \cdot 10^{-12}:\\ \;\;\;\;\frac{t\_0}{\frac{1}{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}}\\ \mathbf{elif}\;y.re \leq 3.1 \cdot 10^{-21}:\\ \;\;\;\;t\_0 \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(0 - y.im\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{{\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\left(\frac{y.re}{-2}\right)}}\\ \end{array} \end{array} \]
            (FPCore (x.re x.im y.re y.im)
             :precision binary64
             (let* ((t_0 (cos (* y.im (log (hypot x.im x.re))))))
               (if (<= y.re -6.1e-12)
                 (/ t_0 (/ 1.0 (pow (hypot x.re x.im) y.re)))
                 (if (<= y.re 3.1e-21)
                   (* t_0 (exp (* (atan2 x.im x.re) (- 0.0 y.im))))
                   (/ 1.0 (pow (+ (* x.re x.re) (* x.im x.im)) (/ y.re -2.0)))))))
            double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
            	double t_0 = cos((y_46_im * log(hypot(x_46_im, x_46_re))));
            	double tmp;
            	if (y_46_re <= -6.1e-12) {
            		tmp = t_0 / (1.0 / pow(hypot(x_46_re, x_46_im), y_46_re));
            	} else if (y_46_re <= 3.1e-21) {
            		tmp = t_0 * exp((atan2(x_46_im, x_46_re) * (0.0 - y_46_im)));
            	} else {
            		tmp = 1.0 / pow(((x_46_re * x_46_re) + (x_46_im * x_46_im)), (y_46_re / -2.0));
            	}
            	return tmp;
            }
            
            public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
            	double t_0 = Math.cos((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re))));
            	double tmp;
            	if (y_46_re <= -6.1e-12) {
            		tmp = t_0 / (1.0 / Math.pow(Math.hypot(x_46_re, x_46_im), y_46_re));
            	} else if (y_46_re <= 3.1e-21) {
            		tmp = t_0 * Math.exp((Math.atan2(x_46_im, x_46_re) * (0.0 - y_46_im)));
            	} else {
            		tmp = 1.0 / Math.pow(((x_46_re * x_46_re) + (x_46_im * x_46_im)), (y_46_re / -2.0));
            	}
            	return tmp;
            }
            
            def code(x_46_re, x_46_im, y_46_re, y_46_im):
            	t_0 = math.cos((y_46_im * math.log(math.hypot(x_46_im, x_46_re))))
            	tmp = 0
            	if y_46_re <= -6.1e-12:
            		tmp = t_0 / (1.0 / math.pow(math.hypot(x_46_re, x_46_im), y_46_re))
            	elif y_46_re <= 3.1e-21:
            		tmp = t_0 * math.exp((math.atan2(x_46_im, x_46_re) * (0.0 - y_46_im)))
            	else:
            		tmp = 1.0 / math.pow(((x_46_re * x_46_re) + (x_46_im * x_46_im)), (y_46_re / -2.0))
            	return tmp
            
            function code(x_46_re, x_46_im, y_46_re, y_46_im)
            	t_0 = cos(Float64(y_46_im * log(hypot(x_46_im, x_46_re))))
            	tmp = 0.0
            	if (y_46_re <= -6.1e-12)
            		tmp = Float64(t_0 / Float64(1.0 / (hypot(x_46_re, x_46_im) ^ y_46_re)));
            	elseif (y_46_re <= 3.1e-21)
            		tmp = Float64(t_0 * exp(Float64(atan(x_46_im, x_46_re) * Float64(0.0 - y_46_im))));
            	else
            		tmp = Float64(1.0 / (Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)) ^ Float64(y_46_re / -2.0)));
            	end
            	return tmp
            end
            
            function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im)
            	t_0 = cos((y_46_im * log(hypot(x_46_im, x_46_re))));
            	tmp = 0.0;
            	if (y_46_re <= -6.1e-12)
            		tmp = t_0 / (1.0 / (hypot(x_46_re, x_46_im) ^ y_46_re));
            	elseif (y_46_re <= 3.1e-21)
            		tmp = t_0 * exp((atan2(x_46_im, x_46_re) * (0.0 - y_46_im)));
            	else
            		tmp = 1.0 / (((x_46_re * x_46_re) + (x_46_im * x_46_im)) ^ (y_46_re / -2.0));
            	end
            	tmp_2 = tmp;
            end
            
            code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Cos[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -6.1e-12], N[(t$95$0 / N[(1.0 / N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 3.1e-21], N[(t$95$0 * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[(0.0 - y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(1.0 / N[Power[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision], N[(y$46$re / -2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            t_0 := \cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
            \mathbf{if}\;y.re \leq -6.1 \cdot 10^{-12}:\\
            \;\;\;\;\frac{t\_0}{\frac{1}{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}}\\
            
            \mathbf{elif}\;y.re \leq 3.1 \cdot 10^{-21}:\\
            \;\;\;\;t\_0 \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(0 - y.im\right)}\\
            
            \mathbf{else}:\\
            \;\;\;\;\frac{1}{{\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\left(\frac{y.re}{-2}\right)}}\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 3 regimes
            2. if y.re < -6.1000000000000003e-12

              1. Initial program 36.1%

                \[e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \]
              2. Step-by-step derivation
                1. exp-diffN/A

                  \[\leadsto \frac{e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re}}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}} \cdot \cos \color{blue}{\left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)} \]
                2. associate-*l/N/A

                  \[\leadsto \frac{e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re} \cdot \cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}{\color{blue}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}} \]
                3. associate-/l*N/A

                  \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re} \cdot \color{blue}{\frac{\cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}} \]
                4. *-commutativeN/A

                  \[\leadsto \frac{\cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}} \cdot \color{blue}{e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re}} \]
                5. associate-/r/N/A

                  \[\leadsto \frac{\cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}{\color{blue}{\frac{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}{e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re}}}} \]
                6. exp-diffN/A

                  \[\leadsto \frac{\cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im - \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re}} \]
              3. Simplified65.2%

                \[\leadsto \color{blue}{\frac{\cos \left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}{\frac{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}}} \]
              4. Add Preprocessing
              5. Taylor expanded in y.re around 0

                \[\leadsto \mathsf{/.f64}\left(\color{blue}{\cos \left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)}, \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
              6. Step-by-step derivation
                1. cos-lowering-cos.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right), \mathsf{/.f64}\left(\color{blue}{\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)}, \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
                2. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)}\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
                3. log-lowering-log.f64N/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), \color{blue}{y.im}\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
                4. unpow2N/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
                5. unpow2N/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
                6. hypot-defineN/A

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
                7. hypot-lowering-hypot.f6476.6%

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
              7. Simplified76.6%

                \[\leadsto \frac{\color{blue}{\cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)}}{\frac{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}} \]
              8. Taylor expanded in y.im around 0

                \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right), \mathsf{/.f64}\left(\color{blue}{1}, \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
              9. Step-by-step derivation
                1. Simplified86.4%

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

                if -6.1000000000000003e-12 < y.re < 3.0999999999999998e-21

                1. Initial program 40.1%

                  \[e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \]
                2. Add Preprocessing
                3. Taylor expanded in y.re around 0

                  \[\leadsto \color{blue}{\cos \left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right) \cdot e^{\mathsf{neg}\left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}} \]
                4. Step-by-step derivation
                  1. *-commutativeN/A

                    \[\leadsto e^{\mathsf{neg}\left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \cdot \color{blue}{\cos \left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)} \]
                  2. *-lowering-*.f64N/A

                    \[\leadsto \mathsf{*.f64}\left(\left(e^{\mathsf{neg}\left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\right), \color{blue}{\cos \left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)}\right) \]
                  3. exp-lowering-exp.f64N/A

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\left(\mathsf{neg}\left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right), \cos \color{blue}{\left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)}\right) \]
                  4. neg-sub0N/A

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\left(0 - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right), \cos \left(\color{blue}{y.im} \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right) \]
                  5. --lowering--.f64N/A

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(0, \left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right), \cos \left(\color{blue}{y.im} \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right) \]
                  6. *-lowering-*.f64N/A

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(y.im, \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right), \cos \left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right) \]
                  7. atan2-lowering-atan2.f64N/A

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(y.im, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right), \cos \left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right) \]
                  8. cos-lowering-cos.f64N/A

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(y.im, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right), \mathsf{cos.f64}\left(\left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right)\right) \]
                  9. *-lowering-*.f64N/A

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(y.im, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right)\right) \]
                  10. log-lowering-log.f64N/A

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(y.im, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right)\right)\right) \]
                  11. unpow2N/A

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(y.im, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right)\right)\right)\right)\right) \]
                  12. unpow2N/A

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(y.im, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)\right)\right)\right)\right) \]
                  13. hypot-defineN/A

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(y.im, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\right)\right)\right) \]
                  14. hypot-lowering-hypot.f6480.2%

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(y.im, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right)\right) \]
                5. Simplified80.2%

                  \[\leadsto \color{blue}{e^{0 - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)} \]

                if 3.0999999999999998e-21 < y.re

                1. Initial program 29.1%

                  \[e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \]
                2. Step-by-step derivation
                  1. exp-diffN/A

                    \[\leadsto \frac{e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re}}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}} \cdot \cos \color{blue}{\left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)} \]
                  2. associate-*l/N/A

                    \[\leadsto \frac{e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re} \cdot \cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}{\color{blue}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}} \]
                  3. associate-/l*N/A

                    \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re} \cdot \color{blue}{\frac{\cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}} \]
                  4. *-commutativeN/A

                    \[\leadsto \frac{\cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}} \cdot \color{blue}{e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re}} \]
                  5. associate-/r/N/A

                    \[\leadsto \frac{\cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}{\color{blue}{\frac{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}{e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re}}}} \]
                  6. exp-diffN/A

                    \[\leadsto \frac{\cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im - \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re}} \]
                3. Simplified49.1%

                  \[\leadsto \color{blue}{\frac{\cos \left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}{\frac{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}}} \]
                4. Add Preprocessing
                5. Taylor expanded in y.re around 0

                  \[\leadsto \mathsf{/.f64}\left(\color{blue}{\cos \left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)}, \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
                6. Step-by-step derivation
                  1. cos-lowering-cos.f64N/A

                    \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right), \mathsf{/.f64}\left(\color{blue}{\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)}, \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
                  2. *-lowering-*.f64N/A

                    \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)}\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
                  3. log-lowering-log.f64N/A

                    \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), \color{blue}{y.im}\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
                  4. unpow2N/A

                    \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
                  5. unpow2N/A

                    \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
                  6. hypot-defineN/A

                    \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
                  7. hypot-lowering-hypot.f6456.4%

                    \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
                7. Simplified56.4%

                  \[\leadsto \frac{\color{blue}{\cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)}}{\frac{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}} \]
                8. Taylor expanded in y.im around 0

                  \[\leadsto \mathsf{/.f64}\left(\color{blue}{1}, \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
                9. Step-by-step derivation
                  1. Simplified63.6%

                    \[\leadsto \frac{\color{blue}{1}}{\frac{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}} \]
                  2. Step-by-step derivation
                    1. clear-numN/A

                      \[\leadsto \mathsf{/.f64}\left(1, \left(\frac{1}{\color{blue}{\frac{{\left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)}^{y.re}}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}}}\right)\right) \]
                    2. div-invN/A

                      \[\leadsto \mathsf{/.f64}\left(1, \left(\frac{1}{{\left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)}^{y.re} \cdot \color{blue}{\frac{1}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}}}\right)\right) \]
                    3. associate-/r*N/A

                      \[\leadsto \mathsf{/.f64}\left(1, \left(\frac{\frac{1}{{\left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)}^{y.re}}}{\color{blue}{\frac{1}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}}}\right)\right) \]
                    4. /-lowering-/.f64N/A

                      \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{1}{{\left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)}^{y.re}}\right), \color{blue}{\left(\frac{1}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\right)}\right)\right) \]
                    5. sqrt-pow2N/A

                      \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{1}{{\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\left(\frac{y.re}{2}\right)}}\right), \left(\frac{1}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\right)\right)\right) \]
                    6. +-commutativeN/A

                      \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{1}{{\left(x.im \cdot x.im + x.re \cdot x.re\right)}^{\left(\frac{y.re}{2}\right)}}\right), \left(\frac{1}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\right)\right)\right) \]
                    7. pow-flipN/A

                      \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\left({\left(x.im \cdot x.im + x.re \cdot x.re\right)}^{\left(\mathsf{neg}\left(\frac{y.re}{2}\right)\right)}\right), \left(\frac{\color{blue}{1}}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\right)\right)\right) \]
                    8. pow-lowering-pow.f64N/A

                      \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\left(x.im \cdot x.im + x.re \cdot x.re\right), \left(\mathsf{neg}\left(\frac{y.re}{2}\right)\right)\right), \left(\frac{\color{blue}{1}}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\right)\right)\right) \]
                    9. +-commutativeN/A

                      \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\left(x.re \cdot x.re + x.im \cdot x.im\right), \left(\mathsf{neg}\left(\frac{y.re}{2}\right)\right)\right), \left(\frac{1}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\right)\right)\right) \]
                    10. +-lowering-+.f64N/A

                      \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{+.f64}\left(\left(x.re \cdot x.re\right), \left(x.im \cdot x.im\right)\right), \left(\mathsf{neg}\left(\frac{y.re}{2}\right)\right)\right), \left(\frac{1}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\right)\right)\right) \]
                    11. *-lowering-*.f64N/A

                      \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \left(x.im \cdot x.im\right)\right), \left(\mathsf{neg}\left(\frac{y.re}{2}\right)\right)\right), \left(\frac{1}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\right)\right)\right) \]
                    12. *-lowering-*.f64N/A

                      \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right), \left(\mathsf{neg}\left(\frac{y.re}{2}\right)\right)\right), \left(\frac{1}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\right)\right)\right) \]
                    13. distribute-neg-frac2N/A

                      \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right), \left(\frac{y.re}{\mathsf{neg}\left(2\right)}\right)\right), \left(\frac{1}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\right)\right)\right) \]
                    14. /-lowering-/.f64N/A

                      \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right), \mathsf{/.f64}\left(y.re, \left(\mathsf{neg}\left(2\right)\right)\right)\right), \left(\frac{1}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\right)\right)\right) \]
                    15. metadata-evalN/A

                      \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right), \mathsf{/.f64}\left(y.re, -2\right)\right), \left(\frac{1}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\right)\right)\right) \]
                    16. rec-expN/A

                      \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right), \mathsf{/.f64}\left(y.re, -2\right)\right), \left(e^{\mathsf{neg}\left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\right)}\right)\right)\right) \]
                    17. distribute-lft-neg-outN/A

                      \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right), \mathsf{/.f64}\left(y.re, -2\right)\right), \left(e^{\left(\mathsf{neg}\left(\tan^{-1}_* \frac{x.im}{x.re}\right)\right) \cdot y.im}\right)\right)\right) \]
                    18. mul-1-negN/A

                      \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right), \mathsf{/.f64}\left(y.re, -2\right)\right), \left(e^{\left(-1 \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot y.im}\right)\right)\right) \]
                  3. Applied egg-rr63.6%

                    \[\leadsto \frac{1}{\color{blue}{\frac{{\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\left(\frac{y.re}{-2}\right)}}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(0 - y.im\right)}}}} \]
                  4. Taylor expanded in y.im around 0

                    \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right), \mathsf{/.f64}\left(y.re, -2\right)\right), \color{blue}{1}\right)\right) \]
                  5. Step-by-step derivation
                    1. Simplified71.1%

                      \[\leadsto \frac{1}{\frac{{\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\left(\frac{y.re}{-2}\right)}}{\color{blue}{1}}} \]
                  6. Recombined 3 regimes into one program.
                  7. Final simplification80.0%

                    \[\leadsto \begin{array}{l} \mathbf{if}\;y.re \leq -6.1 \cdot 10^{-12}:\\ \;\;\;\;\frac{\cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)}{\frac{1}{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}}\\ \mathbf{elif}\;y.re \leq 3.1 \cdot 10^{-21}:\\ \;\;\;\;\cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(0 - y.im\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{{\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\left(\frac{y.re}{-2}\right)}}\\ \end{array} \]
                  8. Add Preprocessing

                  Alternative 8: 77.5% accurate, 1.6× speedup?

                  \[\begin{array}{l} \\ \begin{array}{l} t_0 := \cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\ \mathbf{if}\;y.re \leq -5 \cdot 10^{-15}:\\ \;\;\;\;\frac{t\_0}{\frac{1}{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}}\\ \mathbf{elif}\;y.re \leq 3.1 \cdot 10^{-21}:\\ \;\;\;\;\frac{t\_0}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{{\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\left(\frac{y.re}{-2}\right)}}\\ \end{array} \end{array} \]
                  (FPCore (x.re x.im y.re y.im)
                   :precision binary64
                   (let* ((t_0 (cos (* y.im (log (hypot x.im x.re))))))
                     (if (<= y.re -5e-15)
                       (/ t_0 (/ 1.0 (pow (hypot x.re x.im) y.re)))
                       (if (<= y.re 3.1e-21)
                         (/ t_0 (exp (* (atan2 x.im x.re) y.im)))
                         (/ 1.0 (pow (+ (* x.re x.re) (* x.im x.im)) (/ y.re -2.0)))))))
                  double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
                  	double t_0 = cos((y_46_im * log(hypot(x_46_im, x_46_re))));
                  	double tmp;
                  	if (y_46_re <= -5e-15) {
                  		tmp = t_0 / (1.0 / pow(hypot(x_46_re, x_46_im), y_46_re));
                  	} else if (y_46_re <= 3.1e-21) {
                  		tmp = t_0 / exp((atan2(x_46_im, x_46_re) * y_46_im));
                  	} else {
                  		tmp = 1.0 / pow(((x_46_re * x_46_re) + (x_46_im * x_46_im)), (y_46_re / -2.0));
                  	}
                  	return tmp;
                  }
                  
                  public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
                  	double t_0 = Math.cos((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re))));
                  	double tmp;
                  	if (y_46_re <= -5e-15) {
                  		tmp = t_0 / (1.0 / Math.pow(Math.hypot(x_46_re, x_46_im), y_46_re));
                  	} else if (y_46_re <= 3.1e-21) {
                  		tmp = t_0 / Math.exp((Math.atan2(x_46_im, x_46_re) * y_46_im));
                  	} else {
                  		tmp = 1.0 / Math.pow(((x_46_re * x_46_re) + (x_46_im * x_46_im)), (y_46_re / -2.0));
                  	}
                  	return tmp;
                  }
                  
                  def code(x_46_re, x_46_im, y_46_re, y_46_im):
                  	t_0 = math.cos((y_46_im * math.log(math.hypot(x_46_im, x_46_re))))
                  	tmp = 0
                  	if y_46_re <= -5e-15:
                  		tmp = t_0 / (1.0 / math.pow(math.hypot(x_46_re, x_46_im), y_46_re))
                  	elif y_46_re <= 3.1e-21:
                  		tmp = t_0 / math.exp((math.atan2(x_46_im, x_46_re) * y_46_im))
                  	else:
                  		tmp = 1.0 / math.pow(((x_46_re * x_46_re) + (x_46_im * x_46_im)), (y_46_re / -2.0))
                  	return tmp
                  
                  function code(x_46_re, x_46_im, y_46_re, y_46_im)
                  	t_0 = cos(Float64(y_46_im * log(hypot(x_46_im, x_46_re))))
                  	tmp = 0.0
                  	if (y_46_re <= -5e-15)
                  		tmp = Float64(t_0 / Float64(1.0 / (hypot(x_46_re, x_46_im) ^ y_46_re)));
                  	elseif (y_46_re <= 3.1e-21)
                  		tmp = Float64(t_0 / exp(Float64(atan(x_46_im, x_46_re) * y_46_im)));
                  	else
                  		tmp = Float64(1.0 / (Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)) ^ Float64(y_46_re / -2.0)));
                  	end
                  	return tmp
                  end
                  
                  function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im)
                  	t_0 = cos((y_46_im * log(hypot(x_46_im, x_46_re))));
                  	tmp = 0.0;
                  	if (y_46_re <= -5e-15)
                  		tmp = t_0 / (1.0 / (hypot(x_46_re, x_46_im) ^ y_46_re));
                  	elseif (y_46_re <= 3.1e-21)
                  		tmp = t_0 / exp((atan2(x_46_im, x_46_re) * y_46_im));
                  	else
                  		tmp = 1.0 / (((x_46_re * x_46_re) + (x_46_im * x_46_im)) ^ (y_46_re / -2.0));
                  	end
                  	tmp_2 = tmp;
                  end
                  
                  code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Cos[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -5e-15], N[(t$95$0 / N[(1.0 / N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 3.1e-21], N[(t$95$0 / N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(1.0 / N[Power[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision], N[(y$46$re / -2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
                  
                  \begin{array}{l}
                  
                  \\
                  \begin{array}{l}
                  t_0 := \cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
                  \mathbf{if}\;y.re \leq -5 \cdot 10^{-15}:\\
                  \;\;\;\;\frac{t\_0}{\frac{1}{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}}\\
                  
                  \mathbf{elif}\;y.re \leq 3.1 \cdot 10^{-21}:\\
                  \;\;\;\;\frac{t\_0}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;\frac{1}{{\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\left(\frac{y.re}{-2}\right)}}\\
                  
                  
                  \end{array}
                  \end{array}
                  
                  Derivation
                  1. Split input into 3 regimes
                  2. if y.re < -4.99999999999999999e-15

                    1. Initial program 36.1%

                      \[e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \]
                    2. Step-by-step derivation
                      1. exp-diffN/A

                        \[\leadsto \frac{e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re}}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}} \cdot \cos \color{blue}{\left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)} \]
                      2. associate-*l/N/A

                        \[\leadsto \frac{e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re} \cdot \cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}{\color{blue}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}} \]
                      3. associate-/l*N/A

                        \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re} \cdot \color{blue}{\frac{\cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}} \]
                      4. *-commutativeN/A

                        \[\leadsto \frac{\cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}} \cdot \color{blue}{e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re}} \]
                      5. associate-/r/N/A

                        \[\leadsto \frac{\cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}{\color{blue}{\frac{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}{e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re}}}} \]
                      6. exp-diffN/A

                        \[\leadsto \frac{\cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im - \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re}} \]
                    3. Simplified65.2%

                      \[\leadsto \color{blue}{\frac{\cos \left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}{\frac{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}}} \]
                    4. Add Preprocessing
                    5. Taylor expanded in y.re around 0

                      \[\leadsto \mathsf{/.f64}\left(\color{blue}{\cos \left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)}, \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
                    6. Step-by-step derivation
                      1. cos-lowering-cos.f64N/A

                        \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right), \mathsf{/.f64}\left(\color{blue}{\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)}, \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
                      2. *-lowering-*.f64N/A

                        \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)}\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
                      3. log-lowering-log.f64N/A

                        \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), \color{blue}{y.im}\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
                      4. unpow2N/A

                        \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
                      5. unpow2N/A

                        \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
                      6. hypot-defineN/A

                        \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
                      7. hypot-lowering-hypot.f6476.6%

                        \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
                    7. Simplified76.6%

                      \[\leadsto \frac{\color{blue}{\cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)}}{\frac{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}} \]
                    8. Taylor expanded in y.im around 0

                      \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right), \mathsf{/.f64}\left(\color{blue}{1}, \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
                    9. Step-by-step derivation
                      1. Simplified86.4%

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

                      if -4.99999999999999999e-15 < y.re < 3.0999999999999998e-21

                      1. Initial program 40.1%

                        \[e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \]
                      2. Step-by-step derivation
                        1. exp-diffN/A

                          \[\leadsto \frac{e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re}}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}} \cdot \cos \color{blue}{\left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)} \]
                        2. associate-*l/N/A

                          \[\leadsto \frac{e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re} \cdot \cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}{\color{blue}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}} \]
                        3. associate-/l*N/A

                          \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re} \cdot \color{blue}{\frac{\cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}} \]
                        4. *-commutativeN/A

                          \[\leadsto \frac{\cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}} \cdot \color{blue}{e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re}} \]
                        5. associate-/r/N/A

                          \[\leadsto \frac{\cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}{\color{blue}{\frac{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}{e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re}}}} \]
                        6. exp-diffN/A

                          \[\leadsto \frac{\cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im - \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re}} \]
                      3. Simplified80.2%

                        \[\leadsto \color{blue}{\frac{\cos \left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}{\frac{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}}} \]
                      4. Add Preprocessing
                      5. Taylor expanded in y.re around 0

                        \[\leadsto \color{blue}{\frac{\cos \left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)}{e^{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}}} \]
                      6. Step-by-step derivation
                        1. /-lowering-/.f64N/A

                          \[\leadsto \mathsf{/.f64}\left(\cos \left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right), \color{blue}{\left(e^{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\right)}\right) \]
                        2. cos-lowering-cos.f64N/A

                          \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right), \left(e^{\color{blue}{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}}\right)\right) \]
                        3. *-lowering-*.f64N/A

                          \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right), \left(e^{\color{blue}{y.im} \cdot \tan^{-1}_* \frac{x.im}{x.re}}\right)\right) \]
                        4. log-lowering-log.f64N/A

                          \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right)\right), \left(e^{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\right)\right) \]
                        5. unpow2N/A

                          \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right)\right)\right)\right), \left(e^{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\right)\right) \]
                        6. unpow2N/A

                          \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)\right)\right)\right), \left(e^{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\right)\right) \]
                        7. hypot-defineN/A

                          \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\right)\right), \left(e^{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\right)\right) \]
                        8. hypot-lowering-hypot.f64N/A

                          \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right), \left(e^{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\right)\right) \]
                        9. exp-lowering-exp.f64N/A

                          \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right), \mathsf{exp.f64}\left(\left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
                        10. *-lowering-*.f64N/A

                          \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right), \mathsf{exp.f64}\left(\mathsf{*.f64}\left(y.im, \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
                        11. atan2-lowering-atan2.f6480.2%

                          \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right), \mathsf{exp.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
                      7. Simplified80.2%

                        \[\leadsto \color{blue}{\frac{\cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)}{e^{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}}} \]

                      if 3.0999999999999998e-21 < y.re

                      1. Initial program 29.1%

                        \[e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \]
                      2. Step-by-step derivation
                        1. exp-diffN/A

                          \[\leadsto \frac{e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re}}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}} \cdot \cos \color{blue}{\left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)} \]
                        2. associate-*l/N/A

                          \[\leadsto \frac{e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re} \cdot \cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}{\color{blue}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}} \]
                        3. associate-/l*N/A

                          \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re} \cdot \color{blue}{\frac{\cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}} \]
                        4. *-commutativeN/A

                          \[\leadsto \frac{\cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}} \cdot \color{blue}{e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re}} \]
                        5. associate-/r/N/A

                          \[\leadsto \frac{\cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}{\color{blue}{\frac{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}{e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re}}}} \]
                        6. exp-diffN/A

                          \[\leadsto \frac{\cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im - \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re}} \]
                      3. Simplified49.1%

                        \[\leadsto \color{blue}{\frac{\cos \left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}{\frac{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}}} \]
                      4. Add Preprocessing
                      5. Taylor expanded in y.re around 0

                        \[\leadsto \mathsf{/.f64}\left(\color{blue}{\cos \left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)}, \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
                      6. Step-by-step derivation
                        1. cos-lowering-cos.f64N/A

                          \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right), \mathsf{/.f64}\left(\color{blue}{\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)}, \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
                        2. *-lowering-*.f64N/A

                          \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)}\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
                        3. log-lowering-log.f64N/A

                          \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), \color{blue}{y.im}\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
                        4. unpow2N/A

                          \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
                        5. unpow2N/A

                          \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
                        6. hypot-defineN/A

                          \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
                        7. hypot-lowering-hypot.f6456.4%

                          \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
                      7. Simplified56.4%

                        \[\leadsto \frac{\color{blue}{\cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)}}{\frac{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}} \]
                      8. Taylor expanded in y.im around 0

                        \[\leadsto \mathsf{/.f64}\left(\color{blue}{1}, \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
                      9. Step-by-step derivation
                        1. Simplified63.6%

                          \[\leadsto \frac{\color{blue}{1}}{\frac{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}} \]
                        2. Step-by-step derivation
                          1. clear-numN/A

                            \[\leadsto \mathsf{/.f64}\left(1, \left(\frac{1}{\color{blue}{\frac{{\left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)}^{y.re}}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}}}\right)\right) \]
                          2. div-invN/A

                            \[\leadsto \mathsf{/.f64}\left(1, \left(\frac{1}{{\left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)}^{y.re} \cdot \color{blue}{\frac{1}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}}}\right)\right) \]
                          3. associate-/r*N/A

                            \[\leadsto \mathsf{/.f64}\left(1, \left(\frac{\frac{1}{{\left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)}^{y.re}}}{\color{blue}{\frac{1}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}}}\right)\right) \]
                          4. /-lowering-/.f64N/A

                            \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{1}{{\left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)}^{y.re}}\right), \color{blue}{\left(\frac{1}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\right)}\right)\right) \]
                          5. sqrt-pow2N/A

                            \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{1}{{\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\left(\frac{y.re}{2}\right)}}\right), \left(\frac{1}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\right)\right)\right) \]
                          6. +-commutativeN/A

                            \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{1}{{\left(x.im \cdot x.im + x.re \cdot x.re\right)}^{\left(\frac{y.re}{2}\right)}}\right), \left(\frac{1}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\right)\right)\right) \]
                          7. pow-flipN/A

                            \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\left({\left(x.im \cdot x.im + x.re \cdot x.re\right)}^{\left(\mathsf{neg}\left(\frac{y.re}{2}\right)\right)}\right), \left(\frac{\color{blue}{1}}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\right)\right)\right) \]
                          8. pow-lowering-pow.f64N/A

                            \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\left(x.im \cdot x.im + x.re \cdot x.re\right), \left(\mathsf{neg}\left(\frac{y.re}{2}\right)\right)\right), \left(\frac{\color{blue}{1}}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\right)\right)\right) \]
                          9. +-commutativeN/A

                            \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\left(x.re \cdot x.re + x.im \cdot x.im\right), \left(\mathsf{neg}\left(\frac{y.re}{2}\right)\right)\right), \left(\frac{1}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\right)\right)\right) \]
                          10. +-lowering-+.f64N/A

                            \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{+.f64}\left(\left(x.re \cdot x.re\right), \left(x.im \cdot x.im\right)\right), \left(\mathsf{neg}\left(\frac{y.re}{2}\right)\right)\right), \left(\frac{1}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\right)\right)\right) \]
                          11. *-lowering-*.f64N/A

                            \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \left(x.im \cdot x.im\right)\right), \left(\mathsf{neg}\left(\frac{y.re}{2}\right)\right)\right), \left(\frac{1}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\right)\right)\right) \]
                          12. *-lowering-*.f64N/A

                            \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right), \left(\mathsf{neg}\left(\frac{y.re}{2}\right)\right)\right), \left(\frac{1}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\right)\right)\right) \]
                          13. distribute-neg-frac2N/A

                            \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right), \left(\frac{y.re}{\mathsf{neg}\left(2\right)}\right)\right), \left(\frac{1}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\right)\right)\right) \]
                          14. /-lowering-/.f64N/A

                            \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right), \mathsf{/.f64}\left(y.re, \left(\mathsf{neg}\left(2\right)\right)\right)\right), \left(\frac{1}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\right)\right)\right) \]
                          15. metadata-evalN/A

                            \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right), \mathsf{/.f64}\left(y.re, -2\right)\right), \left(\frac{1}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\right)\right)\right) \]
                          16. rec-expN/A

                            \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right), \mathsf{/.f64}\left(y.re, -2\right)\right), \left(e^{\mathsf{neg}\left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\right)}\right)\right)\right) \]
                          17. distribute-lft-neg-outN/A

                            \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right), \mathsf{/.f64}\left(y.re, -2\right)\right), \left(e^{\left(\mathsf{neg}\left(\tan^{-1}_* \frac{x.im}{x.re}\right)\right) \cdot y.im}\right)\right)\right) \]
                          18. mul-1-negN/A

                            \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right), \mathsf{/.f64}\left(y.re, -2\right)\right), \left(e^{\left(-1 \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot y.im}\right)\right)\right) \]
                        3. Applied egg-rr63.6%

                          \[\leadsto \frac{1}{\color{blue}{\frac{{\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\left(\frac{y.re}{-2}\right)}}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(0 - y.im\right)}}}} \]
                        4. Taylor expanded in y.im around 0

                          \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right), \mathsf{/.f64}\left(y.re, -2\right)\right), \color{blue}{1}\right)\right) \]
                        5. Step-by-step derivation
                          1. Simplified71.1%

                            \[\leadsto \frac{1}{\frac{{\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\left(\frac{y.re}{-2}\right)}}{\color{blue}{1}}} \]
                        6. Recombined 3 regimes into one program.
                        7. Final simplification80.0%

                          \[\leadsto \begin{array}{l} \mathbf{if}\;y.re \leq -5 \cdot 10^{-15}:\\ \;\;\;\;\frac{\cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)}{\frac{1}{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}}\\ \mathbf{elif}\;y.re \leq 3.1 \cdot 10^{-21}:\\ \;\;\;\;\frac{\cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{{\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\left(\frac{y.re}{-2}\right)}}\\ \end{array} \]
                        8. Add Preprocessing

                        Alternative 9: 77.8% accurate, 1.6× speedup?

                        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y.re \leq -3.5 \cdot 10^{-12}:\\ \;\;\;\;{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\ \mathbf{elif}\;y.re \leq 3.1 \cdot 10^{-21}:\\ \;\;\;\;\frac{\cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{{\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\left(\frac{y.re}{-2}\right)}}\\ \end{array} \end{array} \]
                        (FPCore (x.re x.im y.re y.im)
                         :precision binary64
                         (if (<= y.re -3.5e-12)
                           (pow (hypot x.im x.re) y.re)
                           (if (<= y.re 3.1e-21)
                             (/
                              (cos (* y.im (log (hypot x.im x.re))))
                              (exp (* (atan2 x.im x.re) y.im)))
                             (/ 1.0 (pow (+ (* x.re x.re) (* x.im x.im)) (/ y.re -2.0))))))
                        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.5e-12) {
                        		tmp = pow(hypot(x_46_im, x_46_re), y_46_re);
                        	} else if (y_46_re <= 3.1e-21) {
                        		tmp = cos((y_46_im * log(hypot(x_46_im, x_46_re)))) / exp((atan2(x_46_im, x_46_re) * y_46_im));
                        	} else {
                        		tmp = 1.0 / pow(((x_46_re * x_46_re) + (x_46_im * x_46_im)), (y_46_re / -2.0));
                        	}
                        	return tmp;
                        }
                        
                        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.5e-12) {
                        		tmp = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
                        	} else if (y_46_re <= 3.1e-21) {
                        		tmp = Math.cos((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re)))) / Math.exp((Math.atan2(x_46_im, x_46_re) * y_46_im));
                        	} else {
                        		tmp = 1.0 / Math.pow(((x_46_re * x_46_re) + (x_46_im * x_46_im)), (y_46_re / -2.0));
                        	}
                        	return tmp;
                        }
                        
                        def code(x_46_re, x_46_im, y_46_re, y_46_im):
                        	tmp = 0
                        	if y_46_re <= -3.5e-12:
                        		tmp = math.pow(math.hypot(x_46_im, x_46_re), y_46_re)
                        	elif y_46_re <= 3.1e-21:
                        		tmp = math.cos((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) / math.exp((math.atan2(x_46_im, x_46_re) * y_46_im))
                        	else:
                        		tmp = 1.0 / math.pow(((x_46_re * x_46_re) + (x_46_im * x_46_im)), (y_46_re / -2.0))
                        	return tmp
                        
                        function code(x_46_re, x_46_im, y_46_re, y_46_im)
                        	tmp = 0.0
                        	if (y_46_re <= -3.5e-12)
                        		tmp = hypot(x_46_im, x_46_re) ^ y_46_re;
                        	elseif (y_46_re <= 3.1e-21)
                        		tmp = Float64(cos(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) / exp(Float64(atan(x_46_im, x_46_re) * y_46_im)));
                        	else
                        		tmp = Float64(1.0 / (Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)) ^ Float64(y_46_re / -2.0)));
                        	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.5e-12)
                        		tmp = hypot(x_46_im, x_46_re) ^ y_46_re;
                        	elseif (y_46_re <= 3.1e-21)
                        		tmp = cos((y_46_im * log(hypot(x_46_im, x_46_re)))) / exp((atan2(x_46_im, x_46_re) * y_46_im));
                        	else
                        		tmp = 1.0 / (((x_46_re * x_46_re) + (x_46_im * x_46_im)) ^ (y_46_re / -2.0));
                        	end
                        	tmp_2 = tmp;
                        end
                        
                        code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[y$46$re, -3.5e-12], N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision], If[LessEqual[y$46$re, 3.1e-21], N[(N[Cos[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(1.0 / N[Power[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision], N[(y$46$re / -2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
                        
                        \begin{array}{l}
                        
                        \\
                        \begin{array}{l}
                        \mathbf{if}\;y.re \leq -3.5 \cdot 10^{-12}:\\
                        \;\;\;\;{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
                        
                        \mathbf{elif}\;y.re \leq 3.1 \cdot 10^{-21}:\\
                        \;\;\;\;\frac{\cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\\
                        
                        \mathbf{else}:\\
                        \;\;\;\;\frac{1}{{\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\left(\frac{y.re}{-2}\right)}}\\
                        
                        
                        \end{array}
                        \end{array}
                        
                        Derivation
                        1. Split input into 3 regimes
                        2. if y.re < -3.5e-12

                          1. Initial program 36.1%

                            \[e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \]
                          2. Add Preprocessing
                          3. Taylor expanded in y.im around 0

                            \[\leadsto \color{blue}{\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}} \]
                          4. Step-by-step derivation
                            1. *-commutativeN/A

                              \[\leadsto {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re} \cdot \color{blue}{\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
                            2. *-lowering-*.f64N/A

                              \[\leadsto \mathsf{*.f64}\left(\left({\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}\right), \color{blue}{\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\right) \]
                            3. pow-lowering-pow.f64N/A

                              \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right), y.re\right), \cos \color{blue}{\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\right) \]
                            4. unpow2N/A

                              \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right), y.re\right), \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
                            5. unpow2N/A

                              \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right), y.re\right), \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
                            6. hypot-defineN/A

                              \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\mathsf{hypot}\left(x.im, x.re\right)\right), y.re\right), \cos \left(\color{blue}{y.re} \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
                            7. hypot-lowering-hypot.f64N/A

                              \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \cos \left(\color{blue}{y.re} \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
                            8. cos-lowering-cos.f64N/A

                              \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \mathsf{cos.f64}\left(\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
                            9. *-lowering-*.f64N/A

                              \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
                            10. atan2-lowering-atan2.f6473.7%

                              \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
                          5. Simplified73.7%

                            \[\leadsto \color{blue}{{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \cdot \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
                          6. Taylor expanded in y.re around 0

                            \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \color{blue}{1}\right) \]
                          7. Step-by-step derivation
                            1. Simplified85.1%

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

                            if -3.5e-12 < y.re < 3.0999999999999998e-21

                            1. Initial program 40.1%

                              \[e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \]
                            2. Step-by-step derivation
                              1. exp-diffN/A

                                \[\leadsto \frac{e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re}}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}} \cdot \cos \color{blue}{\left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)} \]
                              2. associate-*l/N/A

                                \[\leadsto \frac{e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re} \cdot \cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}{\color{blue}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}} \]
                              3. associate-/l*N/A

                                \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re} \cdot \color{blue}{\frac{\cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}} \]
                              4. *-commutativeN/A

                                \[\leadsto \frac{\cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}} \cdot \color{blue}{e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re}} \]
                              5. associate-/r/N/A

                                \[\leadsto \frac{\cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}{\color{blue}{\frac{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}{e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re}}}} \]
                              6. exp-diffN/A

                                \[\leadsto \frac{\cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im - \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re}} \]
                            3. Simplified80.2%

                              \[\leadsto \color{blue}{\frac{\cos \left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}{\frac{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}}} \]
                            4. Add Preprocessing
                            5. Taylor expanded in y.re around 0

                              \[\leadsto \color{blue}{\frac{\cos \left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)}{e^{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}}} \]
                            6. Step-by-step derivation
                              1. /-lowering-/.f64N/A

                                \[\leadsto \mathsf{/.f64}\left(\cos \left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right), \color{blue}{\left(e^{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\right)}\right) \]
                              2. cos-lowering-cos.f64N/A

                                \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right), \left(e^{\color{blue}{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}}\right)\right) \]
                              3. *-lowering-*.f64N/A

                                \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right), \left(e^{\color{blue}{y.im} \cdot \tan^{-1}_* \frac{x.im}{x.re}}\right)\right) \]
                              4. log-lowering-log.f64N/A

                                \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right)\right), \left(e^{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\right)\right) \]
                              5. unpow2N/A

                                \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right)\right)\right)\right), \left(e^{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\right)\right) \]
                              6. unpow2N/A

                                \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)\right)\right)\right), \left(e^{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\right)\right) \]
                              7. hypot-defineN/A

                                \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\right)\right), \left(e^{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\right)\right) \]
                              8. hypot-lowering-hypot.f64N/A

                                \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right), \left(e^{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\right)\right) \]
                              9. exp-lowering-exp.f64N/A

                                \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right), \mathsf{exp.f64}\left(\left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
                              10. *-lowering-*.f64N/A

                                \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right), \mathsf{exp.f64}\left(\mathsf{*.f64}\left(y.im, \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
                              11. atan2-lowering-atan2.f6480.2%

                                \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right), \mathsf{exp.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
                            7. Simplified80.2%

                              \[\leadsto \color{blue}{\frac{\cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)}{e^{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}}} \]

                            if 3.0999999999999998e-21 < y.re

                            1. Initial program 29.1%

                              \[e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \]
                            2. Step-by-step derivation
                              1. exp-diffN/A

                                \[\leadsto \frac{e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re}}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}} \cdot \cos \color{blue}{\left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)} \]
                              2. associate-*l/N/A

                                \[\leadsto \frac{e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re} \cdot \cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}{\color{blue}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}} \]
                              3. associate-/l*N/A

                                \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re} \cdot \color{blue}{\frac{\cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}} \]
                              4. *-commutativeN/A

                                \[\leadsto \frac{\cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}} \cdot \color{blue}{e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re}} \]
                              5. associate-/r/N/A

                                \[\leadsto \frac{\cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}{\color{blue}{\frac{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}{e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re}}}} \]
                              6. exp-diffN/A

                                \[\leadsto \frac{\cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im - \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re}} \]
                            3. Simplified49.1%

                              \[\leadsto \color{blue}{\frac{\cos \left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}{\frac{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}}} \]
                            4. Add Preprocessing
                            5. Taylor expanded in y.re around 0

                              \[\leadsto \mathsf{/.f64}\left(\color{blue}{\cos \left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)}, \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
                            6. Step-by-step derivation
                              1. cos-lowering-cos.f64N/A

                                \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right), \mathsf{/.f64}\left(\color{blue}{\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)}, \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
                              2. *-lowering-*.f64N/A

                                \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)}\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
                              3. log-lowering-log.f64N/A

                                \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), \color{blue}{y.im}\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
                              4. unpow2N/A

                                \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
                              5. unpow2N/A

                                \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
                              6. hypot-defineN/A

                                \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
                              7. hypot-lowering-hypot.f6456.4%

                                \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
                            7. Simplified56.4%

                              \[\leadsto \frac{\color{blue}{\cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)}}{\frac{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}} \]
                            8. Taylor expanded in y.im around 0

                              \[\leadsto \mathsf{/.f64}\left(\color{blue}{1}, \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
                            9. Step-by-step derivation
                              1. Simplified63.6%

                                \[\leadsto \frac{\color{blue}{1}}{\frac{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}} \]
                              2. Step-by-step derivation
                                1. clear-numN/A

                                  \[\leadsto \mathsf{/.f64}\left(1, \left(\frac{1}{\color{blue}{\frac{{\left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)}^{y.re}}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}}}\right)\right) \]
                                2. div-invN/A

                                  \[\leadsto \mathsf{/.f64}\left(1, \left(\frac{1}{{\left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)}^{y.re} \cdot \color{blue}{\frac{1}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}}}\right)\right) \]
                                3. associate-/r*N/A

                                  \[\leadsto \mathsf{/.f64}\left(1, \left(\frac{\frac{1}{{\left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)}^{y.re}}}{\color{blue}{\frac{1}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}}}\right)\right) \]
                                4. /-lowering-/.f64N/A

                                  \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{1}{{\left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)}^{y.re}}\right), \color{blue}{\left(\frac{1}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\right)}\right)\right) \]
                                5. sqrt-pow2N/A

                                  \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{1}{{\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\left(\frac{y.re}{2}\right)}}\right), \left(\frac{1}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\right)\right)\right) \]
                                6. +-commutativeN/A

                                  \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{1}{{\left(x.im \cdot x.im + x.re \cdot x.re\right)}^{\left(\frac{y.re}{2}\right)}}\right), \left(\frac{1}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\right)\right)\right) \]
                                7. pow-flipN/A

                                  \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\left({\left(x.im \cdot x.im + x.re \cdot x.re\right)}^{\left(\mathsf{neg}\left(\frac{y.re}{2}\right)\right)}\right), \left(\frac{\color{blue}{1}}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\right)\right)\right) \]
                                8. pow-lowering-pow.f64N/A

                                  \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\left(x.im \cdot x.im + x.re \cdot x.re\right), \left(\mathsf{neg}\left(\frac{y.re}{2}\right)\right)\right), \left(\frac{\color{blue}{1}}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\right)\right)\right) \]
                                9. +-commutativeN/A

                                  \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\left(x.re \cdot x.re + x.im \cdot x.im\right), \left(\mathsf{neg}\left(\frac{y.re}{2}\right)\right)\right), \left(\frac{1}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\right)\right)\right) \]
                                10. +-lowering-+.f64N/A

                                  \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{+.f64}\left(\left(x.re \cdot x.re\right), \left(x.im \cdot x.im\right)\right), \left(\mathsf{neg}\left(\frac{y.re}{2}\right)\right)\right), \left(\frac{1}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\right)\right)\right) \]
                                11. *-lowering-*.f64N/A

                                  \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \left(x.im \cdot x.im\right)\right), \left(\mathsf{neg}\left(\frac{y.re}{2}\right)\right)\right), \left(\frac{1}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\right)\right)\right) \]
                                12. *-lowering-*.f64N/A

                                  \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right), \left(\mathsf{neg}\left(\frac{y.re}{2}\right)\right)\right), \left(\frac{1}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\right)\right)\right) \]
                                13. distribute-neg-frac2N/A

                                  \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right), \left(\frac{y.re}{\mathsf{neg}\left(2\right)}\right)\right), \left(\frac{1}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\right)\right)\right) \]
                                14. /-lowering-/.f64N/A

                                  \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right), \mathsf{/.f64}\left(y.re, \left(\mathsf{neg}\left(2\right)\right)\right)\right), \left(\frac{1}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\right)\right)\right) \]
                                15. metadata-evalN/A

                                  \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right), \mathsf{/.f64}\left(y.re, -2\right)\right), \left(\frac{1}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\right)\right)\right) \]
                                16. rec-expN/A

                                  \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right), \mathsf{/.f64}\left(y.re, -2\right)\right), \left(e^{\mathsf{neg}\left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\right)}\right)\right)\right) \]
                                17. distribute-lft-neg-outN/A

                                  \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right), \mathsf{/.f64}\left(y.re, -2\right)\right), \left(e^{\left(\mathsf{neg}\left(\tan^{-1}_* \frac{x.im}{x.re}\right)\right) \cdot y.im}\right)\right)\right) \]
                                18. mul-1-negN/A

                                  \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right), \mathsf{/.f64}\left(y.re, -2\right)\right), \left(e^{\left(-1 \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot y.im}\right)\right)\right) \]
                              3. Applied egg-rr63.6%

                                \[\leadsto \frac{1}{\color{blue}{\frac{{\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\left(\frac{y.re}{-2}\right)}}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(0 - y.im\right)}}}} \]
                              4. Taylor expanded in y.im around 0

                                \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right), \mathsf{/.f64}\left(y.re, -2\right)\right), \color{blue}{1}\right)\right) \]
                              5. Step-by-step derivation
                                1. Simplified71.1%

                                  \[\leadsto \frac{1}{\frac{{\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\left(\frac{y.re}{-2}\right)}}{\color{blue}{1}}} \]
                              6. Recombined 3 regimes into one program.
                              7. Final simplification79.6%

                                \[\leadsto \begin{array}{l} \mathbf{if}\;y.re \leq -3.5 \cdot 10^{-12}:\\ \;\;\;\;{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\ \mathbf{elif}\;y.re \leq 3.1 \cdot 10^{-21}:\\ \;\;\;\;\frac{\cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{{\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\left(\frac{y.re}{-2}\right)}}\\ \end{array} \]
                              8. Add Preprocessing

                              Alternative 10: 77.1% accurate, 3.8× speedup?

                              \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y.re \leq -4.4 \cdot 10^{-15}:\\ \;\;\;\;{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\ \mathbf{elif}\;y.re \leq 3.1 \cdot 10^{-21}:\\ \;\;\;\;\frac{1}{\frac{1}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(0 - y.im\right)}}}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{{\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\left(\frac{y.re}{-2}\right)}}\\ \end{array} \end{array} \]
                              (FPCore (x.re x.im y.re y.im)
                               :precision binary64
                               (if (<= y.re -4.4e-15)
                                 (pow (hypot x.im x.re) y.re)
                                 (if (<= y.re 3.1e-21)
                                   (/ 1.0 (/ 1.0 (exp (* (atan2 x.im x.re) (- 0.0 y.im)))))
                                   (/ 1.0 (pow (+ (* x.re x.re) (* x.im x.im)) (/ y.re -2.0))))))
                              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.4e-15) {
                              		tmp = pow(hypot(x_46_im, x_46_re), y_46_re);
                              	} else if (y_46_re <= 3.1e-21) {
                              		tmp = 1.0 / (1.0 / exp((atan2(x_46_im, x_46_re) * (0.0 - y_46_im))));
                              	} else {
                              		tmp = 1.0 / pow(((x_46_re * x_46_re) + (x_46_im * x_46_im)), (y_46_re / -2.0));
                              	}
                              	return tmp;
                              }
                              
                              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 <= -4.4e-15) {
                              		tmp = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
                              	} else if (y_46_re <= 3.1e-21) {
                              		tmp = 1.0 / (1.0 / Math.exp((Math.atan2(x_46_im, x_46_re) * (0.0 - y_46_im))));
                              	} else {
                              		tmp = 1.0 / Math.pow(((x_46_re * x_46_re) + (x_46_im * x_46_im)), (y_46_re / -2.0));
                              	}
                              	return tmp;
                              }
                              
                              def code(x_46_re, x_46_im, y_46_re, y_46_im):
                              	tmp = 0
                              	if y_46_re <= -4.4e-15:
                              		tmp = math.pow(math.hypot(x_46_im, x_46_re), y_46_re)
                              	elif y_46_re <= 3.1e-21:
                              		tmp = 1.0 / (1.0 / math.exp((math.atan2(x_46_im, x_46_re) * (0.0 - y_46_im))))
                              	else:
                              		tmp = 1.0 / math.pow(((x_46_re * x_46_re) + (x_46_im * x_46_im)), (y_46_re / -2.0))
                              	return tmp
                              
                              function code(x_46_re, x_46_im, y_46_re, y_46_im)
                              	tmp = 0.0
                              	if (y_46_re <= -4.4e-15)
                              		tmp = hypot(x_46_im, x_46_re) ^ y_46_re;
                              	elseif (y_46_re <= 3.1e-21)
                              		tmp = Float64(1.0 / Float64(1.0 / exp(Float64(atan(x_46_im, x_46_re) * Float64(0.0 - y_46_im)))));
                              	else
                              		tmp = Float64(1.0 / (Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)) ^ Float64(y_46_re / -2.0)));
                              	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 <= -4.4e-15)
                              		tmp = hypot(x_46_im, x_46_re) ^ y_46_re;
                              	elseif (y_46_re <= 3.1e-21)
                              		tmp = 1.0 / (1.0 / exp((atan2(x_46_im, x_46_re) * (0.0 - y_46_im))));
                              	else
                              		tmp = 1.0 / (((x_46_re * x_46_re) + (x_46_im * x_46_im)) ^ (y_46_re / -2.0));
                              	end
                              	tmp_2 = tmp;
                              end
                              
                              code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[y$46$re, -4.4e-15], N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision], If[LessEqual[y$46$re, 3.1e-21], N[(1.0 / N[(1.0 / N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[(0.0 - y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[Power[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision], N[(y$46$re / -2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
                              
                              \begin{array}{l}
                              
                              \\
                              \begin{array}{l}
                              \mathbf{if}\;y.re \leq -4.4 \cdot 10^{-15}:\\
                              \;\;\;\;{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
                              
                              \mathbf{elif}\;y.re \leq 3.1 \cdot 10^{-21}:\\
                              \;\;\;\;\frac{1}{\frac{1}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(0 - y.im\right)}}}\\
                              
                              \mathbf{else}:\\
                              \;\;\;\;\frac{1}{{\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\left(\frac{y.re}{-2}\right)}}\\
                              
                              
                              \end{array}
                              \end{array}
                              
                              Derivation
                              1. Split input into 3 regimes
                              2. if y.re < -4.39999999999999971e-15

                                1. Initial program 36.1%

                                  \[e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \]
                                2. Add Preprocessing
                                3. Taylor expanded in y.im around 0

                                  \[\leadsto \color{blue}{\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}} \]
                                4. Step-by-step derivation
                                  1. *-commutativeN/A

                                    \[\leadsto {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re} \cdot \color{blue}{\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
                                  2. *-lowering-*.f64N/A

                                    \[\leadsto \mathsf{*.f64}\left(\left({\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}\right), \color{blue}{\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\right) \]
                                  3. pow-lowering-pow.f64N/A

                                    \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right), y.re\right), \cos \color{blue}{\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\right) \]
                                  4. unpow2N/A

                                    \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right), y.re\right), \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
                                  5. unpow2N/A

                                    \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right), y.re\right), \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
                                  6. hypot-defineN/A

                                    \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\mathsf{hypot}\left(x.im, x.re\right)\right), y.re\right), \cos \left(\color{blue}{y.re} \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
                                  7. hypot-lowering-hypot.f64N/A

                                    \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \cos \left(\color{blue}{y.re} \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
                                  8. cos-lowering-cos.f64N/A

                                    \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \mathsf{cos.f64}\left(\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
                                  9. *-lowering-*.f64N/A

                                    \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
                                  10. atan2-lowering-atan2.f6473.7%

                                    \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
                                5. Simplified73.7%

                                  \[\leadsto \color{blue}{{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \cdot \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
                                6. Taylor expanded in y.re around 0

                                  \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \color{blue}{1}\right) \]
                                7. Step-by-step derivation
                                  1. Simplified85.1%

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

                                  if -4.39999999999999971e-15 < y.re < 3.0999999999999998e-21

                                  1. Initial program 40.1%

                                    \[e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \]
                                  2. Step-by-step derivation
                                    1. exp-diffN/A

                                      \[\leadsto \frac{e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re}}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}} \cdot \cos \color{blue}{\left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)} \]
                                    2. associate-*l/N/A

                                      \[\leadsto \frac{e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re} \cdot \cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}{\color{blue}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}} \]
                                    3. associate-/l*N/A

                                      \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re} \cdot \color{blue}{\frac{\cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}} \]
                                    4. *-commutativeN/A

                                      \[\leadsto \frac{\cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}} \cdot \color{blue}{e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re}} \]
                                    5. associate-/r/N/A

                                      \[\leadsto \frac{\cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}{\color{blue}{\frac{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}{e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re}}}} \]
                                    6. exp-diffN/A

                                      \[\leadsto \frac{\cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im - \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re}} \]
                                  3. Simplified80.2%

                                    \[\leadsto \color{blue}{\frac{\cos \left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}{\frac{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}}} \]
                                  4. Add Preprocessing
                                  5. Taylor expanded in y.re around 0

                                    \[\leadsto \mathsf{/.f64}\left(\color{blue}{\cos \left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)}, \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
                                  6. Step-by-step derivation
                                    1. cos-lowering-cos.f64N/A

                                      \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right), \mathsf{/.f64}\left(\color{blue}{\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)}, \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
                                    2. *-lowering-*.f64N/A

                                      \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)}\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
                                    3. log-lowering-log.f64N/A

                                      \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), \color{blue}{y.im}\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
                                    4. unpow2N/A

                                      \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
                                    5. unpow2N/A

                                      \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
                                    6. hypot-defineN/A

                                      \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
                                    7. hypot-lowering-hypot.f6480.2%

                                      \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
                                  7. Simplified80.2%

                                    \[\leadsto \frac{\color{blue}{\cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)}}{\frac{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}} \]
                                  8. Taylor expanded in y.im around 0

                                    \[\leadsto \mathsf{/.f64}\left(\color{blue}{1}, \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
                                  9. Step-by-step derivation
                                    1. Simplified78.4%

                                      \[\leadsto \frac{\color{blue}{1}}{\frac{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}} \]
                                    2. Step-by-step derivation
                                      1. clear-numN/A

                                        \[\leadsto \mathsf{/.f64}\left(1, \left(\frac{1}{\color{blue}{\frac{{\left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)}^{y.re}}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}}}\right)\right) \]
                                      2. div-invN/A

                                        \[\leadsto \mathsf{/.f64}\left(1, \left(\frac{1}{{\left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)}^{y.re} \cdot \color{blue}{\frac{1}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}}}\right)\right) \]
                                      3. associate-/r*N/A

                                        \[\leadsto \mathsf{/.f64}\left(1, \left(\frac{\frac{1}{{\left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)}^{y.re}}}{\color{blue}{\frac{1}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}}}\right)\right) \]
                                      4. /-lowering-/.f64N/A

                                        \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{1}{{\left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)}^{y.re}}\right), \color{blue}{\left(\frac{1}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\right)}\right)\right) \]
                                      5. sqrt-pow2N/A

                                        \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{1}{{\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\left(\frac{y.re}{2}\right)}}\right), \left(\frac{1}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\right)\right)\right) \]
                                      6. +-commutativeN/A

                                        \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{1}{{\left(x.im \cdot x.im + x.re \cdot x.re\right)}^{\left(\frac{y.re}{2}\right)}}\right), \left(\frac{1}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\right)\right)\right) \]
                                      7. pow-flipN/A

                                        \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\left({\left(x.im \cdot x.im + x.re \cdot x.re\right)}^{\left(\mathsf{neg}\left(\frac{y.re}{2}\right)\right)}\right), \left(\frac{\color{blue}{1}}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\right)\right)\right) \]
                                      8. pow-lowering-pow.f64N/A

                                        \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\left(x.im \cdot x.im + x.re \cdot x.re\right), \left(\mathsf{neg}\left(\frac{y.re}{2}\right)\right)\right), \left(\frac{\color{blue}{1}}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\right)\right)\right) \]
                                      9. +-commutativeN/A

                                        \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\left(x.re \cdot x.re + x.im \cdot x.im\right), \left(\mathsf{neg}\left(\frac{y.re}{2}\right)\right)\right), \left(\frac{1}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\right)\right)\right) \]
                                      10. +-lowering-+.f64N/A

                                        \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{+.f64}\left(\left(x.re \cdot x.re\right), \left(x.im \cdot x.im\right)\right), \left(\mathsf{neg}\left(\frac{y.re}{2}\right)\right)\right), \left(\frac{1}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\right)\right)\right) \]
                                      11. *-lowering-*.f64N/A

                                        \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \left(x.im \cdot x.im\right)\right), \left(\mathsf{neg}\left(\frac{y.re}{2}\right)\right)\right), \left(\frac{1}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\right)\right)\right) \]
                                      12. *-lowering-*.f64N/A

                                        \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right), \left(\mathsf{neg}\left(\frac{y.re}{2}\right)\right)\right), \left(\frac{1}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\right)\right)\right) \]
                                      13. distribute-neg-frac2N/A

                                        \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right), \left(\frac{y.re}{\mathsf{neg}\left(2\right)}\right)\right), \left(\frac{1}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\right)\right)\right) \]
                                      14. /-lowering-/.f64N/A

                                        \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right), \mathsf{/.f64}\left(y.re, \left(\mathsf{neg}\left(2\right)\right)\right)\right), \left(\frac{1}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\right)\right)\right) \]
                                      15. metadata-evalN/A

                                        \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right), \mathsf{/.f64}\left(y.re, -2\right)\right), \left(\frac{1}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\right)\right)\right) \]
                                      16. rec-expN/A

                                        \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right), \mathsf{/.f64}\left(y.re, -2\right)\right), \left(e^{\mathsf{neg}\left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\right)}\right)\right)\right) \]
                                      17. distribute-lft-neg-outN/A

                                        \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right), \mathsf{/.f64}\left(y.re, -2\right)\right), \left(e^{\left(\mathsf{neg}\left(\tan^{-1}_* \frac{x.im}{x.re}\right)\right) \cdot y.im}\right)\right)\right) \]
                                      18. mul-1-negN/A

                                        \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right), \mathsf{/.f64}\left(y.re, -2\right)\right), \left(e^{\left(-1 \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot y.im}\right)\right)\right) \]
                                    3. Applied egg-rr45.4%

                                      \[\leadsto \frac{1}{\color{blue}{\frac{{\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\left(\frac{y.re}{-2}\right)}}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(0 - y.im\right)}}}} \]
                                    4. Taylor expanded in y.re around 0

                                      \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\color{blue}{1}, \mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), \mathsf{\_.f64}\left(0, y.im\right)\right)\right)\right)\right) \]
                                    5. Step-by-step derivation
                                      1. Simplified78.4%

                                        \[\leadsto \frac{1}{\frac{\color{blue}{1}}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(0 - y.im\right)}}} \]

                                      if 3.0999999999999998e-21 < y.re

                                      1. Initial program 29.1%

                                        \[e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \]
                                      2. Step-by-step derivation
                                        1. exp-diffN/A

                                          \[\leadsto \frac{e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re}}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}} \cdot \cos \color{blue}{\left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)} \]
                                        2. associate-*l/N/A

                                          \[\leadsto \frac{e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re} \cdot \cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}{\color{blue}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}} \]
                                        3. associate-/l*N/A

                                          \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re} \cdot \color{blue}{\frac{\cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}} \]
                                        4. *-commutativeN/A

                                          \[\leadsto \frac{\cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}} \cdot \color{blue}{e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re}} \]
                                        5. associate-/r/N/A

                                          \[\leadsto \frac{\cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}{\color{blue}{\frac{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}{e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re}}}} \]
                                        6. exp-diffN/A

                                          \[\leadsto \frac{\cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im - \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re}} \]
                                      3. Simplified49.1%

                                        \[\leadsto \color{blue}{\frac{\cos \left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}{\frac{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}}} \]
                                      4. Add Preprocessing
                                      5. Taylor expanded in y.re around 0

                                        \[\leadsto \mathsf{/.f64}\left(\color{blue}{\cos \left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)}, \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
                                      6. Step-by-step derivation
                                        1. cos-lowering-cos.f64N/A

                                          \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right), \mathsf{/.f64}\left(\color{blue}{\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)}, \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
                                        2. *-lowering-*.f64N/A

                                          \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)}\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
                                        3. log-lowering-log.f64N/A

                                          \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), \color{blue}{y.im}\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
                                        4. unpow2N/A

                                          \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
                                        5. unpow2N/A

                                          \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
                                        6. hypot-defineN/A

                                          \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
                                        7. hypot-lowering-hypot.f6456.4%

                                          \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
                                      7. Simplified56.4%

                                        \[\leadsto \frac{\color{blue}{\cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)}}{\frac{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}} \]
                                      8. Taylor expanded in y.im around 0

                                        \[\leadsto \mathsf{/.f64}\left(\color{blue}{1}, \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
                                      9. Step-by-step derivation
                                        1. Simplified63.6%

                                          \[\leadsto \frac{\color{blue}{1}}{\frac{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}} \]
                                        2. Step-by-step derivation
                                          1. clear-numN/A

                                            \[\leadsto \mathsf{/.f64}\left(1, \left(\frac{1}{\color{blue}{\frac{{\left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)}^{y.re}}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}}}\right)\right) \]
                                          2. div-invN/A

                                            \[\leadsto \mathsf{/.f64}\left(1, \left(\frac{1}{{\left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)}^{y.re} \cdot \color{blue}{\frac{1}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}}}\right)\right) \]
                                          3. associate-/r*N/A

                                            \[\leadsto \mathsf{/.f64}\left(1, \left(\frac{\frac{1}{{\left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)}^{y.re}}}{\color{blue}{\frac{1}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}}}\right)\right) \]
                                          4. /-lowering-/.f64N/A

                                            \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{1}{{\left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)}^{y.re}}\right), \color{blue}{\left(\frac{1}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\right)}\right)\right) \]
                                          5. sqrt-pow2N/A

                                            \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{1}{{\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\left(\frac{y.re}{2}\right)}}\right), \left(\frac{1}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\right)\right)\right) \]
                                          6. +-commutativeN/A

                                            \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{1}{{\left(x.im \cdot x.im + x.re \cdot x.re\right)}^{\left(\frac{y.re}{2}\right)}}\right), \left(\frac{1}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\right)\right)\right) \]
                                          7. pow-flipN/A

                                            \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\left({\left(x.im \cdot x.im + x.re \cdot x.re\right)}^{\left(\mathsf{neg}\left(\frac{y.re}{2}\right)\right)}\right), \left(\frac{\color{blue}{1}}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\right)\right)\right) \]
                                          8. pow-lowering-pow.f64N/A

                                            \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\left(x.im \cdot x.im + x.re \cdot x.re\right), \left(\mathsf{neg}\left(\frac{y.re}{2}\right)\right)\right), \left(\frac{\color{blue}{1}}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\right)\right)\right) \]
                                          9. +-commutativeN/A

                                            \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\left(x.re \cdot x.re + x.im \cdot x.im\right), \left(\mathsf{neg}\left(\frac{y.re}{2}\right)\right)\right), \left(\frac{1}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\right)\right)\right) \]
                                          10. +-lowering-+.f64N/A

                                            \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{+.f64}\left(\left(x.re \cdot x.re\right), \left(x.im \cdot x.im\right)\right), \left(\mathsf{neg}\left(\frac{y.re}{2}\right)\right)\right), \left(\frac{1}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\right)\right)\right) \]
                                          11. *-lowering-*.f64N/A

                                            \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \left(x.im \cdot x.im\right)\right), \left(\mathsf{neg}\left(\frac{y.re}{2}\right)\right)\right), \left(\frac{1}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\right)\right)\right) \]
                                          12. *-lowering-*.f64N/A

                                            \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right), \left(\mathsf{neg}\left(\frac{y.re}{2}\right)\right)\right), \left(\frac{1}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\right)\right)\right) \]
                                          13. distribute-neg-frac2N/A

                                            \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right), \left(\frac{y.re}{\mathsf{neg}\left(2\right)}\right)\right), \left(\frac{1}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\right)\right)\right) \]
                                          14. /-lowering-/.f64N/A

                                            \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right), \mathsf{/.f64}\left(y.re, \left(\mathsf{neg}\left(2\right)\right)\right)\right), \left(\frac{1}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\right)\right)\right) \]
                                          15. metadata-evalN/A

                                            \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right), \mathsf{/.f64}\left(y.re, -2\right)\right), \left(\frac{1}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\right)\right)\right) \]
                                          16. rec-expN/A

                                            \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right), \mathsf{/.f64}\left(y.re, -2\right)\right), \left(e^{\mathsf{neg}\left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\right)}\right)\right)\right) \]
                                          17. distribute-lft-neg-outN/A

                                            \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right), \mathsf{/.f64}\left(y.re, -2\right)\right), \left(e^{\left(\mathsf{neg}\left(\tan^{-1}_* \frac{x.im}{x.re}\right)\right) \cdot y.im}\right)\right)\right) \]
                                          18. mul-1-negN/A

                                            \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right), \mathsf{/.f64}\left(y.re, -2\right)\right), \left(e^{\left(-1 \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot y.im}\right)\right)\right) \]
                                        3. Applied egg-rr63.6%

                                          \[\leadsto \frac{1}{\color{blue}{\frac{{\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\left(\frac{y.re}{-2}\right)}}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(0 - y.im\right)}}}} \]
                                        4. Taylor expanded in y.im around 0

                                          \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right), \mathsf{/.f64}\left(y.re, -2\right)\right), \color{blue}{1}\right)\right) \]
                                        5. Step-by-step derivation
                                          1. Simplified71.1%

                                            \[\leadsto \frac{1}{\frac{{\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\left(\frac{y.re}{-2}\right)}}{\color{blue}{1}}} \]
                                        6. Recombined 3 regimes into one program.
                                        7. Final simplification78.7%

                                          \[\leadsto \begin{array}{l} \mathbf{if}\;y.re \leq -4.4 \cdot 10^{-15}:\\ \;\;\;\;{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\ \mathbf{elif}\;y.re \leq 3.1 \cdot 10^{-21}:\\ \;\;\;\;\frac{1}{\frac{1}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(0 - y.im\right)}}}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{{\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\left(\frac{y.re}{-2}\right)}}\\ \end{array} \]
                                        8. Add Preprocessing

                                        Alternative 11: 77.2% accurate, 3.8× speedup?

                                        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y.re \leq -5.5 \cdot 10^{-12}:\\ \;\;\;\;{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\ \mathbf{elif}\;y.re \leq 3.1 \cdot 10^{-21}:\\ \;\;\;\;e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(0 - y.im\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{{\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\left(\frac{y.re}{-2}\right)}}\\ \end{array} \end{array} \]
                                        (FPCore (x.re x.im y.re y.im)
                                         :precision binary64
                                         (if (<= y.re -5.5e-12)
                                           (pow (hypot x.im x.re) y.re)
                                           (if (<= y.re 3.1e-21)
                                             (exp (* (atan2 x.im x.re) (- 0.0 y.im)))
                                             (/ 1.0 (pow (+ (* x.re x.re) (* x.im x.im)) (/ y.re -2.0))))))
                                        double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
                                        	double tmp;
                                        	if (y_46_re <= -5.5e-12) {
                                        		tmp = pow(hypot(x_46_im, x_46_re), y_46_re);
                                        	} else if (y_46_re <= 3.1e-21) {
                                        		tmp = exp((atan2(x_46_im, x_46_re) * (0.0 - y_46_im)));
                                        	} else {
                                        		tmp = 1.0 / pow(((x_46_re * x_46_re) + (x_46_im * x_46_im)), (y_46_re / -2.0));
                                        	}
                                        	return tmp;
                                        }
                                        
                                        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 <= -5.5e-12) {
                                        		tmp = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
                                        	} else if (y_46_re <= 3.1e-21) {
                                        		tmp = Math.exp((Math.atan2(x_46_im, x_46_re) * (0.0 - y_46_im)));
                                        	} else {
                                        		tmp = 1.0 / Math.pow(((x_46_re * x_46_re) + (x_46_im * x_46_im)), (y_46_re / -2.0));
                                        	}
                                        	return tmp;
                                        }
                                        
                                        def code(x_46_re, x_46_im, y_46_re, y_46_im):
                                        	tmp = 0
                                        	if y_46_re <= -5.5e-12:
                                        		tmp = math.pow(math.hypot(x_46_im, x_46_re), y_46_re)
                                        	elif y_46_re <= 3.1e-21:
                                        		tmp = math.exp((math.atan2(x_46_im, x_46_re) * (0.0 - y_46_im)))
                                        	else:
                                        		tmp = 1.0 / math.pow(((x_46_re * x_46_re) + (x_46_im * x_46_im)), (y_46_re / -2.0))
                                        	return tmp
                                        
                                        function code(x_46_re, x_46_im, y_46_re, y_46_im)
                                        	tmp = 0.0
                                        	if (y_46_re <= -5.5e-12)
                                        		tmp = hypot(x_46_im, x_46_re) ^ y_46_re;
                                        	elseif (y_46_re <= 3.1e-21)
                                        		tmp = exp(Float64(atan(x_46_im, x_46_re) * Float64(0.0 - y_46_im)));
                                        	else
                                        		tmp = Float64(1.0 / (Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)) ^ Float64(y_46_re / -2.0)));
                                        	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 <= -5.5e-12)
                                        		tmp = hypot(x_46_im, x_46_re) ^ y_46_re;
                                        	elseif (y_46_re <= 3.1e-21)
                                        		tmp = exp((atan2(x_46_im, x_46_re) * (0.0 - y_46_im)));
                                        	else
                                        		tmp = 1.0 / (((x_46_re * x_46_re) + (x_46_im * x_46_im)) ^ (y_46_re / -2.0));
                                        	end
                                        	tmp_2 = tmp;
                                        end
                                        
                                        code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[y$46$re, -5.5e-12], N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision], If[LessEqual[y$46$re, 3.1e-21], N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[(0.0 - y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(1.0 / N[Power[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision], N[(y$46$re / -2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
                                        
                                        \begin{array}{l}
                                        
                                        \\
                                        \begin{array}{l}
                                        \mathbf{if}\;y.re \leq -5.5 \cdot 10^{-12}:\\
                                        \;\;\;\;{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
                                        
                                        \mathbf{elif}\;y.re \leq 3.1 \cdot 10^{-21}:\\
                                        \;\;\;\;e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(0 - y.im\right)}\\
                                        
                                        \mathbf{else}:\\
                                        \;\;\;\;\frac{1}{{\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\left(\frac{y.re}{-2}\right)}}\\
                                        
                                        
                                        \end{array}
                                        \end{array}
                                        
                                        Derivation
                                        1. Split input into 3 regimes
                                        2. if y.re < -5.5000000000000004e-12

                                          1. Initial program 36.1%

                                            \[e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \]
                                          2. Add Preprocessing
                                          3. Taylor expanded in y.im around 0

                                            \[\leadsto \color{blue}{\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}} \]
                                          4. Step-by-step derivation
                                            1. *-commutativeN/A

                                              \[\leadsto {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re} \cdot \color{blue}{\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
                                            2. *-lowering-*.f64N/A

                                              \[\leadsto \mathsf{*.f64}\left(\left({\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}\right), \color{blue}{\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\right) \]
                                            3. pow-lowering-pow.f64N/A

                                              \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right), y.re\right), \cos \color{blue}{\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\right) \]
                                            4. unpow2N/A

                                              \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right), y.re\right), \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
                                            5. unpow2N/A

                                              \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right), y.re\right), \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
                                            6. hypot-defineN/A

                                              \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\mathsf{hypot}\left(x.im, x.re\right)\right), y.re\right), \cos \left(\color{blue}{y.re} \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
                                            7. hypot-lowering-hypot.f64N/A

                                              \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \cos \left(\color{blue}{y.re} \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
                                            8. cos-lowering-cos.f64N/A

                                              \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \mathsf{cos.f64}\left(\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
                                            9. *-lowering-*.f64N/A

                                              \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
                                            10. atan2-lowering-atan2.f6473.7%

                                              \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
                                          5. Simplified73.7%

                                            \[\leadsto \color{blue}{{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \cdot \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
                                          6. Taylor expanded in y.re around 0

                                            \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \color{blue}{1}\right) \]
                                          7. Step-by-step derivation
                                            1. Simplified85.1%

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

                                            if -5.5000000000000004e-12 < y.re < 3.0999999999999998e-21

                                            1. Initial program 40.1%

                                              \[e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \]
                                            2. Step-by-step derivation
                                              1. exp-diffN/A

                                                \[\leadsto \frac{e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re}}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}} \cdot \cos \color{blue}{\left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)} \]
                                              2. associate-*l/N/A

                                                \[\leadsto \frac{e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re} \cdot \cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}{\color{blue}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}} \]
                                              3. associate-/l*N/A

                                                \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re} \cdot \color{blue}{\frac{\cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}} \]
                                              4. *-commutativeN/A

                                                \[\leadsto \frac{\cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}} \cdot \color{blue}{e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re}} \]
                                              5. associate-/r/N/A

                                                \[\leadsto \frac{\cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}{\color{blue}{\frac{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}{e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re}}}} \]
                                              6. exp-diffN/A

                                                \[\leadsto \frac{\cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im - \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re}} \]
                                            3. Simplified80.2%

                                              \[\leadsto \color{blue}{\frac{\cos \left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}{\frac{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}}} \]
                                            4. Add Preprocessing
                                            5. Taylor expanded in y.re around 0

                                              \[\leadsto \mathsf{/.f64}\left(\color{blue}{\cos \left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)}, \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
                                            6. Step-by-step derivation
                                              1. cos-lowering-cos.f64N/A

                                                \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right), \mathsf{/.f64}\left(\color{blue}{\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)}, \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
                                              2. *-lowering-*.f64N/A

                                                \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)}\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
                                              3. log-lowering-log.f64N/A

                                                \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), \color{blue}{y.im}\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
                                              4. unpow2N/A

                                                \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
                                              5. unpow2N/A

                                                \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
                                              6. hypot-defineN/A

                                                \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
                                              7. hypot-lowering-hypot.f6480.2%

                                                \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
                                            7. Simplified80.2%

                                              \[\leadsto \frac{\color{blue}{\cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)}}{\frac{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}} \]
                                            8. Taylor expanded in y.im around 0

                                              \[\leadsto \mathsf{/.f64}\left(\color{blue}{1}, \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
                                            9. Step-by-step derivation
                                              1. Simplified78.4%

                                                \[\leadsto \frac{\color{blue}{1}}{\frac{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}} \]
                                              2. Taylor expanded in y.re around 0

                                                \[\leadsto \color{blue}{\frac{1}{e^{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}}} \]
                                              3. Step-by-step derivation
                                                1. rec-expN/A

                                                  \[\leadsto e^{\mathsf{neg}\left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
                                                2. mul-1-negN/A

                                                  \[\leadsto e^{-1 \cdot \left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
                                                3. exp-lowering-exp.f64N/A

                                                  \[\leadsto \mathsf{exp.f64}\left(\left(-1 \cdot \left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
                                                4. associate-*r*N/A

                                                  \[\leadsto \mathsf{exp.f64}\left(\left(\left(-1 \cdot y.im\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
                                                5. *-lowering-*.f64N/A

                                                  \[\leadsto \mathsf{exp.f64}\left(\mathsf{*.f64}\left(\left(-1 \cdot y.im\right), \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
                                                6. *-lowering-*.f64N/A

                                                  \[\leadsto \mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(-1, y.im\right), \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
                                                7. atan2-lowering-atan2.f6478.4%

                                                  \[\leadsto \mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(-1, y.im\right), \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right) \]
                                              4. Simplified78.4%

                                                \[\leadsto \color{blue}{e^{\left(-1 \cdot y.im\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}}} \]

                                              if 3.0999999999999998e-21 < y.re

                                              1. Initial program 29.1%

                                                \[e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \]
                                              2. Step-by-step derivation
                                                1. exp-diffN/A

                                                  \[\leadsto \frac{e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re}}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}} \cdot \cos \color{blue}{\left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)} \]
                                                2. associate-*l/N/A

                                                  \[\leadsto \frac{e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re} \cdot \cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}{\color{blue}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}} \]
                                                3. associate-/l*N/A

                                                  \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re} \cdot \color{blue}{\frac{\cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}} \]
                                                4. *-commutativeN/A

                                                  \[\leadsto \frac{\cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}} \cdot \color{blue}{e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re}} \]
                                                5. associate-/r/N/A

                                                  \[\leadsto \frac{\cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}{\color{blue}{\frac{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}{e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re}}}} \]
                                                6. exp-diffN/A

                                                  \[\leadsto \frac{\cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im - \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re}} \]
                                              3. Simplified49.1%

                                                \[\leadsto \color{blue}{\frac{\cos \left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}{\frac{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}}} \]
                                              4. Add Preprocessing
                                              5. Taylor expanded in y.re around 0

                                                \[\leadsto \mathsf{/.f64}\left(\color{blue}{\cos \left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)}, \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
                                              6. Step-by-step derivation
                                                1. cos-lowering-cos.f64N/A

                                                  \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right), \mathsf{/.f64}\left(\color{blue}{\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)}, \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
                                                2. *-lowering-*.f64N/A

                                                  \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)}\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
                                                3. log-lowering-log.f64N/A

                                                  \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), \color{blue}{y.im}\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
                                                4. unpow2N/A

                                                  \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
                                                5. unpow2N/A

                                                  \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
                                                6. hypot-defineN/A

                                                  \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
                                                7. hypot-lowering-hypot.f6456.4%

                                                  \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
                                              7. Simplified56.4%

                                                \[\leadsto \frac{\color{blue}{\cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)}}{\frac{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}} \]
                                              8. Taylor expanded in y.im around 0

                                                \[\leadsto \mathsf{/.f64}\left(\color{blue}{1}, \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
                                              9. Step-by-step derivation
                                                1. Simplified63.6%

                                                  \[\leadsto \frac{\color{blue}{1}}{\frac{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}} \]
                                                2. Step-by-step derivation
                                                  1. clear-numN/A

                                                    \[\leadsto \mathsf{/.f64}\left(1, \left(\frac{1}{\color{blue}{\frac{{\left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)}^{y.re}}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}}}\right)\right) \]
                                                  2. div-invN/A

                                                    \[\leadsto \mathsf{/.f64}\left(1, \left(\frac{1}{{\left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)}^{y.re} \cdot \color{blue}{\frac{1}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}}}\right)\right) \]
                                                  3. associate-/r*N/A

                                                    \[\leadsto \mathsf{/.f64}\left(1, \left(\frac{\frac{1}{{\left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)}^{y.re}}}{\color{blue}{\frac{1}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}}}\right)\right) \]
                                                  4. /-lowering-/.f64N/A

                                                    \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{1}{{\left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)}^{y.re}}\right), \color{blue}{\left(\frac{1}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\right)}\right)\right) \]
                                                  5. sqrt-pow2N/A

                                                    \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{1}{{\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\left(\frac{y.re}{2}\right)}}\right), \left(\frac{1}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\right)\right)\right) \]
                                                  6. +-commutativeN/A

                                                    \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{1}{{\left(x.im \cdot x.im + x.re \cdot x.re\right)}^{\left(\frac{y.re}{2}\right)}}\right), \left(\frac{1}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\right)\right)\right) \]
                                                  7. pow-flipN/A

                                                    \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\left({\left(x.im \cdot x.im + x.re \cdot x.re\right)}^{\left(\mathsf{neg}\left(\frac{y.re}{2}\right)\right)}\right), \left(\frac{\color{blue}{1}}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\right)\right)\right) \]
                                                  8. pow-lowering-pow.f64N/A

                                                    \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\left(x.im \cdot x.im + x.re \cdot x.re\right), \left(\mathsf{neg}\left(\frac{y.re}{2}\right)\right)\right), \left(\frac{\color{blue}{1}}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\right)\right)\right) \]
                                                  9. +-commutativeN/A

                                                    \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\left(x.re \cdot x.re + x.im \cdot x.im\right), \left(\mathsf{neg}\left(\frac{y.re}{2}\right)\right)\right), \left(\frac{1}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\right)\right)\right) \]
                                                  10. +-lowering-+.f64N/A

                                                    \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{+.f64}\left(\left(x.re \cdot x.re\right), \left(x.im \cdot x.im\right)\right), \left(\mathsf{neg}\left(\frac{y.re}{2}\right)\right)\right), \left(\frac{1}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\right)\right)\right) \]
                                                  11. *-lowering-*.f64N/A

                                                    \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \left(x.im \cdot x.im\right)\right), \left(\mathsf{neg}\left(\frac{y.re}{2}\right)\right)\right), \left(\frac{1}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\right)\right)\right) \]
                                                  12. *-lowering-*.f64N/A

                                                    \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right), \left(\mathsf{neg}\left(\frac{y.re}{2}\right)\right)\right), \left(\frac{1}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\right)\right)\right) \]
                                                  13. distribute-neg-frac2N/A

                                                    \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right), \left(\frac{y.re}{\mathsf{neg}\left(2\right)}\right)\right), \left(\frac{1}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\right)\right)\right) \]
                                                  14. /-lowering-/.f64N/A

                                                    \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right), \mathsf{/.f64}\left(y.re, \left(\mathsf{neg}\left(2\right)\right)\right)\right), \left(\frac{1}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\right)\right)\right) \]
                                                  15. metadata-evalN/A

                                                    \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right), \mathsf{/.f64}\left(y.re, -2\right)\right), \left(\frac{1}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\right)\right)\right) \]
                                                  16. rec-expN/A

                                                    \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right), \mathsf{/.f64}\left(y.re, -2\right)\right), \left(e^{\mathsf{neg}\left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\right)}\right)\right)\right) \]
                                                  17. distribute-lft-neg-outN/A

                                                    \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right), \mathsf{/.f64}\left(y.re, -2\right)\right), \left(e^{\left(\mathsf{neg}\left(\tan^{-1}_* \frac{x.im}{x.re}\right)\right) \cdot y.im}\right)\right)\right) \]
                                                  18. mul-1-negN/A

                                                    \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right), \mathsf{/.f64}\left(y.re, -2\right)\right), \left(e^{\left(-1 \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot y.im}\right)\right)\right) \]
                                                3. Applied egg-rr63.6%

                                                  \[\leadsto \frac{1}{\color{blue}{\frac{{\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\left(\frac{y.re}{-2}\right)}}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(0 - y.im\right)}}}} \]
                                                4. Taylor expanded in y.im around 0

                                                  \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right), \mathsf{/.f64}\left(y.re, -2\right)\right), \color{blue}{1}\right)\right) \]
                                                5. Step-by-step derivation
                                                  1. Simplified71.1%

                                                    \[\leadsto \frac{1}{\frac{{\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\left(\frac{y.re}{-2}\right)}}{\color{blue}{1}}} \]
                                                6. Recombined 3 regimes into one program.
                                                7. Final simplification78.7%

                                                  \[\leadsto \begin{array}{l} \mathbf{if}\;y.re \leq -5.5 \cdot 10^{-12}:\\ \;\;\;\;{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\ \mathbf{elif}\;y.re \leq 3.1 \cdot 10^{-21}:\\ \;\;\;\;e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(0 - y.im\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{{\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\left(\frac{y.re}{-2}\right)}}\\ \end{array} \]
                                                8. Add Preprocessing

                                                Alternative 12: 65.8% accurate, 3.9× speedup?

                                                \[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{1}{{\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\left(\frac{y.re}{-2}\right)}}\\ \mathbf{if}\;y.im \leq -5.6 \cdot 10^{+20}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;y.im \leq 2.25 \cdot 10^{+139}:\\ \;\;\;\;{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
                                                (FPCore (x.re x.im y.re y.im)
                                                 :precision binary64
                                                 (let* ((t_0 (/ 1.0 (pow (+ (* x.re x.re) (* x.im x.im)) (/ y.re -2.0)))))
                                                   (if (<= y.im -5.6e+20)
                                                     t_0
                                                     (if (<= y.im 2.25e+139) (pow (hypot x.im x.re) y.re) t_0))))
                                                double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
                                                	double t_0 = 1.0 / pow(((x_46_re * x_46_re) + (x_46_im * x_46_im)), (y_46_re / -2.0));
                                                	double tmp;
                                                	if (y_46_im <= -5.6e+20) {
                                                		tmp = t_0;
                                                	} else if (y_46_im <= 2.25e+139) {
                                                		tmp = pow(hypot(x_46_im, x_46_re), y_46_re);
                                                	} else {
                                                		tmp = t_0;
                                                	}
                                                	return tmp;
                                                }
                                                
                                                public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
                                                	double t_0 = 1.0 / Math.pow(((x_46_re * x_46_re) + (x_46_im * x_46_im)), (y_46_re / -2.0));
                                                	double tmp;
                                                	if (y_46_im <= -5.6e+20) {
                                                		tmp = t_0;
                                                	} else if (y_46_im <= 2.25e+139) {
                                                		tmp = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
                                                	} else {
                                                		tmp = t_0;
                                                	}
                                                	return tmp;
                                                }
                                                
                                                def code(x_46_re, x_46_im, y_46_re, y_46_im):
                                                	t_0 = 1.0 / math.pow(((x_46_re * x_46_re) + (x_46_im * x_46_im)), (y_46_re / -2.0))
                                                	tmp = 0
                                                	if y_46_im <= -5.6e+20:
                                                		tmp = t_0
                                                	elif y_46_im <= 2.25e+139:
                                                		tmp = math.pow(math.hypot(x_46_im, x_46_re), y_46_re)
                                                	else:
                                                		tmp = t_0
                                                	return tmp
                                                
                                                function code(x_46_re, x_46_im, y_46_re, y_46_im)
                                                	t_0 = Float64(1.0 / (Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)) ^ Float64(y_46_re / -2.0)))
                                                	tmp = 0.0
                                                	if (y_46_im <= -5.6e+20)
                                                		tmp = t_0;
                                                	elseif (y_46_im <= 2.25e+139)
                                                		tmp = hypot(x_46_im, x_46_re) ^ y_46_re;
                                                	else
                                                		tmp = t_0;
                                                	end
                                                	return tmp
                                                end
                                                
                                                function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im)
                                                	t_0 = 1.0 / (((x_46_re * x_46_re) + (x_46_im * x_46_im)) ^ (y_46_re / -2.0));
                                                	tmp = 0.0;
                                                	if (y_46_im <= -5.6e+20)
                                                		tmp = t_0;
                                                	elseif (y_46_im <= 2.25e+139)
                                                		tmp = hypot(x_46_im, x_46_re) ^ y_46_re;
                                                	else
                                                		tmp = t_0;
                                                	end
                                                	tmp_2 = tmp;
                                                end
                                                
                                                code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(1.0 / N[Power[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision], N[(y$46$re / -2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -5.6e+20], t$95$0, If[LessEqual[y$46$im, 2.25e+139], N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision], t$95$0]]]
                                                
                                                \begin{array}{l}
                                                
                                                \\
                                                \begin{array}{l}
                                                t_0 := \frac{1}{{\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\left(\frac{y.re}{-2}\right)}}\\
                                                \mathbf{if}\;y.im \leq -5.6 \cdot 10^{+20}:\\
                                                \;\;\;\;t\_0\\
                                                
                                                \mathbf{elif}\;y.im \leq 2.25 \cdot 10^{+139}:\\
                                                \;\;\;\;{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
                                                
                                                \mathbf{else}:\\
                                                \;\;\;\;t\_0\\
                                                
                                                
                                                \end{array}
                                                \end{array}
                                                
                                                Derivation
                                                1. Split input into 2 regimes
                                                2. if y.im < -5.6e20 or 2.25e139 < y.im

                                                  1. Initial program 27.0%

                                                    \[e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \]
                                                  2. Step-by-step derivation
                                                    1. exp-diffN/A

                                                      \[\leadsto \frac{e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re}}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}} \cdot \cos \color{blue}{\left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)} \]
                                                    2. associate-*l/N/A

                                                      \[\leadsto \frac{e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re} \cdot \cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}{\color{blue}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}} \]
                                                    3. associate-/l*N/A

                                                      \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re} \cdot \color{blue}{\frac{\cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}} \]
                                                    4. *-commutativeN/A

                                                      \[\leadsto \frac{\cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}} \cdot \color{blue}{e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re}} \]
                                                    5. associate-/r/N/A

                                                      \[\leadsto \frac{\cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}{\color{blue}{\frac{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}{e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re}}}} \]
                                                    6. exp-diffN/A

                                                      \[\leadsto \frac{\cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im - \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re}} \]
                                                  3. Simplified51.2%

                                                    \[\leadsto \color{blue}{\frac{\cos \left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}{\frac{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}}} \]
                                                  4. Add Preprocessing
                                                  5. Taylor expanded in y.re around 0

                                                    \[\leadsto \mathsf{/.f64}\left(\color{blue}{\cos \left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)}, \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
                                                  6. Step-by-step derivation
                                                    1. cos-lowering-cos.f64N/A

                                                      \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right), \mathsf{/.f64}\left(\color{blue}{\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)}, \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
                                                    2. *-lowering-*.f64N/A

                                                      \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)}\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
                                                    3. log-lowering-log.f64N/A

                                                      \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), \color{blue}{y.im}\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
                                                    4. unpow2N/A

                                                      \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
                                                    5. unpow2N/A

                                                      \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
                                                    6. hypot-defineN/A

                                                      \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
                                                    7. hypot-lowering-hypot.f6451.2%

                                                      \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
                                                  7. Simplified51.2%

                                                    \[\leadsto \frac{\color{blue}{\cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)}}{\frac{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}} \]
                                                  8. Taylor expanded in y.im around 0

                                                    \[\leadsto \mathsf{/.f64}\left(\color{blue}{1}, \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
                                                  9. Step-by-step derivation
                                                    1. Simplified55.4%

                                                      \[\leadsto \frac{\color{blue}{1}}{\frac{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}} \]
                                                    2. Step-by-step derivation
                                                      1. clear-numN/A

                                                        \[\leadsto \mathsf{/.f64}\left(1, \left(\frac{1}{\color{blue}{\frac{{\left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)}^{y.re}}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}}}\right)\right) \]
                                                      2. div-invN/A

                                                        \[\leadsto \mathsf{/.f64}\left(1, \left(\frac{1}{{\left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)}^{y.re} \cdot \color{blue}{\frac{1}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}}}\right)\right) \]
                                                      3. associate-/r*N/A

                                                        \[\leadsto \mathsf{/.f64}\left(1, \left(\frac{\frac{1}{{\left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)}^{y.re}}}{\color{blue}{\frac{1}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}}}\right)\right) \]
                                                      4. /-lowering-/.f64N/A

                                                        \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{1}{{\left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)}^{y.re}}\right), \color{blue}{\left(\frac{1}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\right)}\right)\right) \]
                                                      5. sqrt-pow2N/A

                                                        \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{1}{{\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\left(\frac{y.re}{2}\right)}}\right), \left(\frac{1}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\right)\right)\right) \]
                                                      6. +-commutativeN/A

                                                        \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{1}{{\left(x.im \cdot x.im + x.re \cdot x.re\right)}^{\left(\frac{y.re}{2}\right)}}\right), \left(\frac{1}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\right)\right)\right) \]
                                                      7. pow-flipN/A

                                                        \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\left({\left(x.im \cdot x.im + x.re \cdot x.re\right)}^{\left(\mathsf{neg}\left(\frac{y.re}{2}\right)\right)}\right), \left(\frac{\color{blue}{1}}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\right)\right)\right) \]
                                                      8. pow-lowering-pow.f64N/A

                                                        \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\left(x.im \cdot x.im + x.re \cdot x.re\right), \left(\mathsf{neg}\left(\frac{y.re}{2}\right)\right)\right), \left(\frac{\color{blue}{1}}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\right)\right)\right) \]
                                                      9. +-commutativeN/A

                                                        \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\left(x.re \cdot x.re + x.im \cdot x.im\right), \left(\mathsf{neg}\left(\frac{y.re}{2}\right)\right)\right), \left(\frac{1}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\right)\right)\right) \]
                                                      10. +-lowering-+.f64N/A

                                                        \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{+.f64}\left(\left(x.re \cdot x.re\right), \left(x.im \cdot x.im\right)\right), \left(\mathsf{neg}\left(\frac{y.re}{2}\right)\right)\right), \left(\frac{1}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\right)\right)\right) \]
                                                      11. *-lowering-*.f64N/A

                                                        \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \left(x.im \cdot x.im\right)\right), \left(\mathsf{neg}\left(\frac{y.re}{2}\right)\right)\right), \left(\frac{1}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\right)\right)\right) \]
                                                      12. *-lowering-*.f64N/A

                                                        \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right), \left(\mathsf{neg}\left(\frac{y.re}{2}\right)\right)\right), \left(\frac{1}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\right)\right)\right) \]
                                                      13. distribute-neg-frac2N/A

                                                        \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right), \left(\frac{y.re}{\mathsf{neg}\left(2\right)}\right)\right), \left(\frac{1}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\right)\right)\right) \]
                                                      14. /-lowering-/.f64N/A

                                                        \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right), \mathsf{/.f64}\left(y.re, \left(\mathsf{neg}\left(2\right)\right)\right)\right), \left(\frac{1}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\right)\right)\right) \]
                                                      15. metadata-evalN/A

                                                        \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right), \mathsf{/.f64}\left(y.re, -2\right)\right), \left(\frac{1}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\right)\right)\right) \]
                                                      16. rec-expN/A

                                                        \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right), \mathsf{/.f64}\left(y.re, -2\right)\right), \left(e^{\mathsf{neg}\left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\right)}\right)\right)\right) \]
                                                      17. distribute-lft-neg-outN/A

                                                        \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right), \mathsf{/.f64}\left(y.re, -2\right)\right), \left(e^{\left(\mathsf{neg}\left(\tan^{-1}_* \frac{x.im}{x.re}\right)\right) \cdot y.im}\right)\right)\right) \]
                                                      18. mul-1-negN/A

                                                        \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right), \mathsf{/.f64}\left(y.re, -2\right)\right), \left(e^{\left(-1 \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot y.im}\right)\right)\right) \]
                                                    3. Applied egg-rr42.4%

                                                      \[\leadsto \frac{1}{\color{blue}{\frac{{\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\left(\frac{y.re}{-2}\right)}}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(0 - y.im\right)}}}} \]
                                                    4. Taylor expanded in y.im around 0

                                                      \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right), \mathsf{/.f64}\left(y.re, -2\right)\right), \color{blue}{1}\right)\right) \]
                                                    5. Step-by-step derivation
                                                      1. Simplified41.2%

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

                                                      if -5.6e20 < y.im < 2.25e139

                                                      1. Initial program 42.9%

                                                        \[e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \]
                                                      2. Add Preprocessing
                                                      3. Taylor expanded in y.im around 0

                                                        \[\leadsto \color{blue}{\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}} \]
                                                      4. Step-by-step derivation
                                                        1. *-commutativeN/A

                                                          \[\leadsto {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re} \cdot \color{blue}{\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
                                                        2. *-lowering-*.f64N/A

                                                          \[\leadsto \mathsf{*.f64}\left(\left({\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}\right), \color{blue}{\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\right) \]
                                                        3. pow-lowering-pow.f64N/A

                                                          \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right), y.re\right), \cos \color{blue}{\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\right) \]
                                                        4. unpow2N/A

                                                          \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right), y.re\right), \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
                                                        5. unpow2N/A

                                                          \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right), y.re\right), \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
                                                        6. hypot-defineN/A

                                                          \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\mathsf{hypot}\left(x.im, x.re\right)\right), y.re\right), \cos \left(\color{blue}{y.re} \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
                                                        7. hypot-lowering-hypot.f64N/A

                                                          \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \cos \left(\color{blue}{y.re} \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
                                                        8. cos-lowering-cos.f64N/A

                                                          \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \mathsf{cos.f64}\left(\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
                                                        9. *-lowering-*.f64N/A

                                                          \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
                                                        10. atan2-lowering-atan2.f6474.7%

                                                          \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
                                                      5. Simplified74.7%

                                                        \[\leadsto \color{blue}{{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \cdot \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
                                                      6. Taylor expanded in y.re around 0

                                                        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \color{blue}{1}\right) \]
                                                      7. Step-by-step derivation
                                                        1. Simplified81.9%

                                                          \[\leadsto {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \cdot \color{blue}{1} \]
                                                      8. Recombined 2 regimes into one program.
                                                      9. Final simplification65.8%

                                                        \[\leadsto \begin{array}{l} \mathbf{if}\;y.im \leq -5.6 \cdot 10^{+20}:\\ \;\;\;\;\frac{1}{{\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\left(\frac{y.re}{-2}\right)}}\\ \mathbf{elif}\;y.im \leq 2.25 \cdot 10^{+139}:\\ \;\;\;\;{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{{\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\left(\frac{y.re}{-2}\right)}}\\ \end{array} \]
                                                      10. Add Preprocessing

                                                      Alternative 13: 60.9% accurate, 6.8× speedup?

                                                      \[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{1}{{\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\left(\frac{y.re}{-2}\right)}}\\ \mathbf{if}\;y.re \leq -3.1 \cdot 10^{-173}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;y.re \leq 2.7 \cdot 10^{-21}:\\ \;\;\;\;1 - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
                                                      (FPCore (x.re x.im y.re y.im)
                                                       :precision binary64
                                                       (let* ((t_0 (/ 1.0 (pow (+ (* x.re x.re) (* x.im x.im)) (/ y.re -2.0)))))
                                                         (if (<= y.re -3.1e-173)
                                                           t_0
                                                           (if (<= y.re 2.7e-21) (- 1.0 (* (atan2 x.im x.re) y.im)) t_0))))
                                                      double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
                                                      	double t_0 = 1.0 / pow(((x_46_re * x_46_re) + (x_46_im * x_46_im)), (y_46_re / -2.0));
                                                      	double tmp;
                                                      	if (y_46_re <= -3.1e-173) {
                                                      		tmp = t_0;
                                                      	} else if (y_46_re <= 2.7e-21) {
                                                      		tmp = 1.0 - (atan2(x_46_im, x_46_re) * y_46_im);
                                                      	} else {
                                                      		tmp = t_0;
                                                      	}
                                                      	return tmp;
                                                      }
                                                      
                                                      real(8) function code(x_46re, x_46im, y_46re, y_46im)
                                                          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) :: t_0
                                                          real(8) :: tmp
                                                          t_0 = 1.0d0 / (((x_46re * x_46re) + (x_46im * x_46im)) ** (y_46re / (-2.0d0)))
                                                          if (y_46re <= (-3.1d-173)) then
                                                              tmp = t_0
                                                          else if (y_46re <= 2.7d-21) then
                                                              tmp = 1.0d0 - (atan2(x_46im, x_46re) * y_46im)
                                                          else
                                                              tmp = t_0
                                                          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 t_0 = 1.0 / Math.pow(((x_46_re * x_46_re) + (x_46_im * x_46_im)), (y_46_re / -2.0));
                                                      	double tmp;
                                                      	if (y_46_re <= -3.1e-173) {
                                                      		tmp = t_0;
                                                      	} else if (y_46_re <= 2.7e-21) {
                                                      		tmp = 1.0 - (Math.atan2(x_46_im, x_46_re) * y_46_im);
                                                      	} else {
                                                      		tmp = t_0;
                                                      	}
                                                      	return tmp;
                                                      }
                                                      
                                                      def code(x_46_re, x_46_im, y_46_re, y_46_im):
                                                      	t_0 = 1.0 / math.pow(((x_46_re * x_46_re) + (x_46_im * x_46_im)), (y_46_re / -2.0))
                                                      	tmp = 0
                                                      	if y_46_re <= -3.1e-173:
                                                      		tmp = t_0
                                                      	elif y_46_re <= 2.7e-21:
                                                      		tmp = 1.0 - (math.atan2(x_46_im, x_46_re) * y_46_im)
                                                      	else:
                                                      		tmp = t_0
                                                      	return tmp
                                                      
                                                      function code(x_46_re, x_46_im, y_46_re, y_46_im)
                                                      	t_0 = Float64(1.0 / (Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)) ^ Float64(y_46_re / -2.0)))
                                                      	tmp = 0.0
                                                      	if (y_46_re <= -3.1e-173)
                                                      		tmp = t_0;
                                                      	elseif (y_46_re <= 2.7e-21)
                                                      		tmp = Float64(1.0 - Float64(atan(x_46_im, x_46_re) * y_46_im));
                                                      	else
                                                      		tmp = t_0;
                                                      	end
                                                      	return tmp
                                                      end
                                                      
                                                      function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im)
                                                      	t_0 = 1.0 / (((x_46_re * x_46_re) + (x_46_im * x_46_im)) ^ (y_46_re / -2.0));
                                                      	tmp = 0.0;
                                                      	if (y_46_re <= -3.1e-173)
                                                      		tmp = t_0;
                                                      	elseif (y_46_re <= 2.7e-21)
                                                      		tmp = 1.0 - (atan2(x_46_im, x_46_re) * y_46_im);
                                                      	else
                                                      		tmp = t_0;
                                                      	end
                                                      	tmp_2 = tmp;
                                                      end
                                                      
                                                      code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(1.0 / N[Power[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision], N[(y$46$re / -2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -3.1e-173], t$95$0, If[LessEqual[y$46$re, 2.7e-21], N[(1.0 - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision], t$95$0]]]
                                                      
                                                      \begin{array}{l}
                                                      
                                                      \\
                                                      \begin{array}{l}
                                                      t_0 := \frac{1}{{\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\left(\frac{y.re}{-2}\right)}}\\
                                                      \mathbf{if}\;y.re \leq -3.1 \cdot 10^{-173}:\\
                                                      \;\;\;\;t\_0\\
                                                      
                                                      \mathbf{elif}\;y.re \leq 2.7 \cdot 10^{-21}:\\
                                                      \;\;\;\;1 - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
                                                      
                                                      \mathbf{else}:\\
                                                      \;\;\;\;t\_0\\
                                                      
                                                      
                                                      \end{array}
                                                      \end{array}
                                                      
                                                      Derivation
                                                      1. Split input into 2 regimes
                                                      2. if y.re < -3.10000000000000005e-173 or 2.7000000000000001e-21 < y.re

                                                        1. Initial program 34.6%

                                                          \[e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \]
                                                        2. Step-by-step derivation
                                                          1. exp-diffN/A

                                                            \[\leadsto \frac{e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re}}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}} \cdot \cos \color{blue}{\left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)} \]
                                                          2. associate-*l/N/A

                                                            \[\leadsto \frac{e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re} \cdot \cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}{\color{blue}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}} \]
                                                          3. associate-/l*N/A

                                                            \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re} \cdot \color{blue}{\frac{\cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}} \]
                                                          4. *-commutativeN/A

                                                            \[\leadsto \frac{\cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}} \cdot \color{blue}{e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re}} \]
                                                          5. associate-/r/N/A

                                                            \[\leadsto \frac{\cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}{\color{blue}{\frac{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}{e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re}}}} \]
                                                          6. exp-diffN/A

                                                            \[\leadsto \frac{\cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im - \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re}} \]
                                                        3. Simplified63.7%

                                                          \[\leadsto \color{blue}{\frac{\cos \left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}{\frac{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}}} \]
                                                        4. Add Preprocessing
                                                        5. Taylor expanded in y.re around 0

                                                          \[\leadsto \mathsf{/.f64}\left(\color{blue}{\cos \left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)}, \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
                                                        6. Step-by-step derivation
                                                          1. cos-lowering-cos.f64N/A

                                                            \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right), \mathsf{/.f64}\left(\color{blue}{\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)}, \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
                                                          2. *-lowering-*.f64N/A

                                                            \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)}\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
                                                          3. log-lowering-log.f64N/A

                                                            \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), \color{blue}{y.im}\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
                                                          4. unpow2N/A

                                                            \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
                                                          5. unpow2N/A

                                                            \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
                                                          6. hypot-defineN/A

                                                            \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
                                                          7. hypot-lowering-hypot.f6471.3%

                                                            \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
                                                        7. Simplified71.3%

                                                          \[\leadsto \frac{\color{blue}{\cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)}}{\frac{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}} \]
                                                        8. Taylor expanded in y.im around 0

                                                          \[\leadsto \mathsf{/.f64}\left(\color{blue}{1}, \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
                                                        9. Step-by-step derivation
                                                          1. Simplified72.0%

                                                            \[\leadsto \frac{\color{blue}{1}}{\frac{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}} \]
                                                          2. Step-by-step derivation
                                                            1. clear-numN/A

                                                              \[\leadsto \mathsf{/.f64}\left(1, \left(\frac{1}{\color{blue}{\frac{{\left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)}^{y.re}}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}}}\right)\right) \]
                                                            2. div-invN/A

                                                              \[\leadsto \mathsf{/.f64}\left(1, \left(\frac{1}{{\left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)}^{y.re} \cdot \color{blue}{\frac{1}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}}}\right)\right) \]
                                                            3. associate-/r*N/A

                                                              \[\leadsto \mathsf{/.f64}\left(1, \left(\frac{\frac{1}{{\left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)}^{y.re}}}{\color{blue}{\frac{1}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}}}\right)\right) \]
                                                            4. /-lowering-/.f64N/A

                                                              \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{1}{{\left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)}^{y.re}}\right), \color{blue}{\left(\frac{1}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\right)}\right)\right) \]
                                                            5. sqrt-pow2N/A

                                                              \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{1}{{\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\left(\frac{y.re}{2}\right)}}\right), \left(\frac{1}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\right)\right)\right) \]
                                                            6. +-commutativeN/A

                                                              \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{1}{{\left(x.im \cdot x.im + x.re \cdot x.re\right)}^{\left(\frac{y.re}{2}\right)}}\right), \left(\frac{1}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\right)\right)\right) \]
                                                            7. pow-flipN/A

                                                              \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\left({\left(x.im \cdot x.im + x.re \cdot x.re\right)}^{\left(\mathsf{neg}\left(\frac{y.re}{2}\right)\right)}\right), \left(\frac{\color{blue}{1}}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\right)\right)\right) \]
                                                            8. pow-lowering-pow.f64N/A

                                                              \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\left(x.im \cdot x.im + x.re \cdot x.re\right), \left(\mathsf{neg}\left(\frac{y.re}{2}\right)\right)\right), \left(\frac{\color{blue}{1}}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\right)\right)\right) \]
                                                            9. +-commutativeN/A

                                                              \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\left(x.re \cdot x.re + x.im \cdot x.im\right), \left(\mathsf{neg}\left(\frac{y.re}{2}\right)\right)\right), \left(\frac{1}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\right)\right)\right) \]
                                                            10. +-lowering-+.f64N/A

                                                              \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{+.f64}\left(\left(x.re \cdot x.re\right), \left(x.im \cdot x.im\right)\right), \left(\mathsf{neg}\left(\frac{y.re}{2}\right)\right)\right), \left(\frac{1}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\right)\right)\right) \]
                                                            11. *-lowering-*.f64N/A

                                                              \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \left(x.im \cdot x.im\right)\right), \left(\mathsf{neg}\left(\frac{y.re}{2}\right)\right)\right), \left(\frac{1}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\right)\right)\right) \]
                                                            12. *-lowering-*.f64N/A

                                                              \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right), \left(\mathsf{neg}\left(\frac{y.re}{2}\right)\right)\right), \left(\frac{1}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\right)\right)\right) \]
                                                            13. distribute-neg-frac2N/A

                                                              \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right), \left(\frac{y.re}{\mathsf{neg}\left(2\right)}\right)\right), \left(\frac{1}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\right)\right)\right) \]
                                                            14. /-lowering-/.f64N/A

                                                              \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right), \mathsf{/.f64}\left(y.re, \left(\mathsf{neg}\left(2\right)\right)\right)\right), \left(\frac{1}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\right)\right)\right) \]
                                                            15. metadata-evalN/A

                                                              \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right), \mathsf{/.f64}\left(y.re, -2\right)\right), \left(\frac{1}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\right)\right)\right) \]
                                                            16. rec-expN/A

                                                              \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right), \mathsf{/.f64}\left(y.re, -2\right)\right), \left(e^{\mathsf{neg}\left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\right)}\right)\right)\right) \]
                                                            17. distribute-lft-neg-outN/A

                                                              \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right), \mathsf{/.f64}\left(y.re, -2\right)\right), \left(e^{\left(\mathsf{neg}\left(\tan^{-1}_* \frac{x.im}{x.re}\right)\right) \cdot y.im}\right)\right)\right) \]
                                                            18. mul-1-negN/A

                                                              \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right), \mathsf{/.f64}\left(y.re, -2\right)\right), \left(e^{\left(-1 \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot y.im}\right)\right)\right) \]
                                                          3. Applied egg-rr65.7%

                                                            \[\leadsto \frac{1}{\color{blue}{\frac{{\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\left(\frac{y.re}{-2}\right)}}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(0 - y.im\right)}}}} \]
                                                          4. Taylor expanded in y.im around 0

                                                            \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right), \mathsf{/.f64}\left(y.re, -2\right)\right), \color{blue}{1}\right)\right) \]
                                                          5. Step-by-step derivation
                                                            1. Simplified70.8%

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

                                                            if -3.10000000000000005e-173 < y.re < 2.7000000000000001e-21

                                                            1. Initial program 40.2%

                                                              \[e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \]
                                                            2. Add Preprocessing
                                                            3. Taylor expanded in x.im around inf

                                                              \[\leadsto \color{blue}{\cos \left(-1 \cdot \left(y.im \cdot \log \left(\frac{1}{x.im}\right)\right) + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot e^{-1 \cdot \left(y.re \cdot \log \left(\frac{1}{x.im}\right)\right) - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}} \]
                                                            4. Step-by-step derivation
                                                              1. *-commutativeN/A

                                                                \[\leadsto e^{-1 \cdot \left(y.re \cdot \log \left(\frac{1}{x.im}\right)\right) - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \color{blue}{\cos \left(-1 \cdot \left(y.im \cdot \log \left(\frac{1}{x.im}\right)\right) + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
                                                              2. *-lowering-*.f64N/A

                                                                \[\leadsto \mathsf{*.f64}\left(\left(e^{-1 \cdot \left(y.re \cdot \log \left(\frac{1}{x.im}\right)\right) - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\right), \color{blue}{\cos \left(-1 \cdot \left(y.im \cdot \log \left(\frac{1}{x.im}\right)\right) + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\right) \]
                                                              3. exp-lowering-exp.f64N/A

                                                                \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\left(-1 \cdot \left(y.re \cdot \log \left(\frac{1}{x.im}\right)\right) - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right), \cos \color{blue}{\left(-1 \cdot \left(y.im \cdot \log \left(\frac{1}{x.im}\right)\right) + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\right) \]
                                                              4. --lowering--.f64N/A

                                                                \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\left(-1 \cdot \left(y.re \cdot \log \left(\frac{1}{x.im}\right)\right)\right), \left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right), \cos \left(\color{blue}{-1 \cdot \left(y.im \cdot \log \left(\frac{1}{x.im}\right)\right)} + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
                                                              5. associate-*r*N/A

                                                                \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\left(\left(-1 \cdot y.re\right) \cdot \log \left(\frac{1}{x.im}\right)\right), \left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right), \cos \left(\color{blue}{-1} \cdot \left(y.im \cdot \log \left(\frac{1}{x.im}\right)\right) + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
                                                              6. *-lowering-*.f64N/A

                                                                \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\left(-1 \cdot y.re\right), \log \left(\frac{1}{x.im}\right)\right), \left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right), \cos \left(\color{blue}{-1} \cdot \left(y.im \cdot \log \left(\frac{1}{x.im}\right)\right) + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
                                                              7. *-lowering-*.f64N/A

                                                                \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(-1, y.re\right), \log \left(\frac{1}{x.im}\right)\right), \left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right), \cos \left(-1 \cdot \left(y.im \cdot \log \left(\frac{1}{x.im}\right)\right) + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
                                                              8. log-lowering-log.f64N/A

                                                                \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(-1, y.re\right), \mathsf{log.f64}\left(\left(\frac{1}{x.im}\right)\right)\right), \left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right), \cos \left(-1 \cdot \left(y.im \cdot \log \left(\frac{1}{x.im}\right)\right) + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
                                                              9. /-lowering-/.f64N/A

                                                                \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(-1, y.re\right), \mathsf{log.f64}\left(\mathsf{/.f64}\left(1, x.im\right)\right)\right), \left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right), \cos \left(-1 \cdot \left(y.im \cdot \log \left(\frac{1}{x.im}\right)\right) + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
                                                              10. *-lowering-*.f64N/A

                                                                \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(-1, y.re\right), \mathsf{log.f64}\left(\mathsf{/.f64}\left(1, x.im\right)\right)\right), \mathsf{*.f64}\left(y.im, \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right), \cos \left(-1 \cdot \color{blue}{\left(y.im \cdot \log \left(\frac{1}{x.im}\right)\right)} + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
                                                              11. atan2-lowering-atan2.f64N/A

                                                                \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(-1, y.re\right), \mathsf{log.f64}\left(\mathsf{/.f64}\left(1, x.im\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right), \cos \left(-1 \cdot \left(y.im \cdot \color{blue}{\log \left(\frac{1}{x.im}\right)}\right) + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
                                                              12. cos-lowering-cos.f64N/A

                                                                \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(-1, y.re\right), \mathsf{log.f64}\left(\mathsf{/.f64}\left(1, x.im\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right), \mathsf{cos.f64}\left(\left(-1 \cdot \left(y.im \cdot \log \left(\frac{1}{x.im}\right)\right) + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
                                                              13. +-commutativeN/A

                                                                \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(-1, y.re\right), \mathsf{log.f64}\left(\mathsf{/.f64}\left(1, x.im\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right), \mathsf{cos.f64}\left(\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re} + -1 \cdot \left(y.im \cdot \log \left(\frac{1}{x.im}\right)\right)\right)\right)\right) \]
                                                              14. +-lowering-+.f64N/A

                                                                \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(-1, y.re\right), \mathsf{log.f64}\left(\mathsf{/.f64}\left(1, x.im\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right), \mathsf{cos.f64}\left(\mathsf{+.f64}\left(\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right), \left(-1 \cdot \left(y.im \cdot \log \left(\frac{1}{x.im}\right)\right)\right)\right)\right)\right) \]
                                                            5. Simplified35.3%

                                                              \[\leadsto \color{blue}{e^{\left(-1 \cdot y.re\right) \cdot \log \left(\frac{1}{x.im}\right) - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re} + \left(-1 \cdot y.im\right) \cdot \log \left(\frac{1}{x.im}\right)\right)} \]
                                                            6. Taylor expanded in y.re around 0

                                                              \[\leadsto \color{blue}{\cos \left(-1 \cdot \left(y.im \cdot \log \left(\frac{1}{x.im}\right)\right)\right) \cdot e^{\mathsf{neg}\left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}} \]
                                                            7. Step-by-step derivation
                                                              1. *-lowering-*.f64N/A

                                                                \[\leadsto \mathsf{*.f64}\left(\cos \left(-1 \cdot \left(y.im \cdot \log \left(\frac{1}{x.im}\right)\right)\right), \color{blue}{\left(e^{\mathsf{neg}\left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\right)}\right) \]
                                                              2. cos-lowering-cos.f64N/A

                                                                \[\leadsto \mathsf{*.f64}\left(\mathsf{cos.f64}\left(\left(-1 \cdot \left(y.im \cdot \log \left(\frac{1}{x.im}\right)\right)\right)\right), \left(e^{\color{blue}{\mathsf{neg}\left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}}\right)\right) \]
                                                              3. associate-*r*N/A

                                                                \[\leadsto \mathsf{*.f64}\left(\mathsf{cos.f64}\left(\left(\left(-1 \cdot y.im\right) \cdot \log \left(\frac{1}{x.im}\right)\right)\right), \left(e^{\mathsf{neg}\left(\color{blue}{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\right)}\right)\right) \]
                                                              4. *-lowering-*.f64N/A

                                                                \[\leadsto \mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(\left(-1 \cdot y.im\right), \log \left(\frac{1}{x.im}\right)\right)\right), \left(e^{\mathsf{neg}\left(\color{blue}{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\right)}\right)\right) \]
                                                              5. mul-1-negN/A

                                                                \[\leadsto \mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(\left(\mathsf{neg}\left(y.im\right)\right), \log \left(\frac{1}{x.im}\right)\right)\right), \left(e^{\mathsf{neg}\left(\color{blue}{y.im} \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\right)\right) \]
                                                              6. neg-lowering-neg.f64N/A

                                                                \[\leadsto \mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(\mathsf{neg.f64}\left(y.im\right), \log \left(\frac{1}{x.im}\right)\right)\right), \left(e^{\mathsf{neg}\left(\color{blue}{y.im} \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\right)\right) \]
                                                              7. log-lowering-log.f64N/A

                                                                \[\leadsto \mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(\mathsf{neg.f64}\left(y.im\right), \mathsf{log.f64}\left(\left(\frac{1}{x.im}\right)\right)\right)\right), \left(e^{\mathsf{neg}\left(y.im \cdot \color{blue}{\tan^{-1}_* \frac{x.im}{x.re}}\right)}\right)\right) \]
                                                              8. /-lowering-/.f64N/A

                                                                \[\leadsto \mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(\mathsf{neg.f64}\left(y.im\right), \mathsf{log.f64}\left(\mathsf{/.f64}\left(1, x.im\right)\right)\right)\right), \left(e^{\mathsf{neg}\left(y.im \cdot \tan^{-1}_* \frac{\color{blue}{x.im}}{x.re}\right)}\right)\right) \]
                                                              9. exp-lowering-exp.f64N/A

                                                                \[\leadsto \mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(\mathsf{neg.f64}\left(y.im\right), \mathsf{log.f64}\left(\mathsf{/.f64}\left(1, x.im\right)\right)\right)\right), \mathsf{exp.f64}\left(\left(\mathsf{neg}\left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right) \]
                                                              10. distribute-rgt-neg-inN/A

                                                                \[\leadsto \mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(\mathsf{neg.f64}\left(y.im\right), \mathsf{log.f64}\left(\mathsf{/.f64}\left(1, x.im\right)\right)\right)\right), \mathsf{exp.f64}\left(\left(y.im \cdot \left(\mathsf{neg}\left(\tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right)\right) \]
                                                              11. mul-1-negN/A

                                                                \[\leadsto \mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(\mathsf{neg.f64}\left(y.im\right), \mathsf{log.f64}\left(\mathsf{/.f64}\left(1, x.im\right)\right)\right)\right), \mathsf{exp.f64}\left(\left(y.im \cdot \left(-1 \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right) \]
                                                              12. *-lowering-*.f64N/A

                                                                \[\leadsto \mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(\mathsf{neg.f64}\left(y.im\right), \mathsf{log.f64}\left(\mathsf{/.f64}\left(1, x.im\right)\right)\right)\right), \mathsf{exp.f64}\left(\mathsf{*.f64}\left(y.im, \left(-1 \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right) \]
                                                              13. *-lowering-*.f64N/A

                                                                \[\leadsto \mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(\mathsf{neg.f64}\left(y.im\right), \mathsf{log.f64}\left(\mathsf{/.f64}\left(1, x.im\right)\right)\right)\right), \mathsf{exp.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(-1, \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right) \]
                                                              14. atan2-lowering-atan2.f6435.3%

                                                                \[\leadsto \mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(\mathsf{neg.f64}\left(y.im\right), \mathsf{log.f64}\left(\mathsf{/.f64}\left(1, x.im\right)\right)\right)\right), \mathsf{exp.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(-1, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right)\right) \]
                                                            8. Simplified35.3%

                                                              \[\leadsto \color{blue}{\cos \left(\left(-y.im\right) \cdot \log \left(\frac{1}{x.im}\right)\right) \cdot e^{y.im \cdot \left(-1 \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}} \]
                                                            9. Taylor expanded in y.im around 0

                                                              \[\leadsto \color{blue}{1 + -1 \cdot \left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
                                                            10. Step-by-step derivation
                                                              1. +-lowering-+.f64N/A

                                                                \[\leadsto \mathsf{+.f64}\left(1, \color{blue}{\left(-1 \cdot \left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)}\right) \]
                                                              2. associate-*r*N/A

                                                                \[\leadsto \mathsf{+.f64}\left(1, \left(\left(-1 \cdot y.im\right) \cdot \color{blue}{\tan^{-1}_* \frac{x.im}{x.re}}\right)\right) \]
                                                              3. *-lowering-*.f64N/A

                                                                \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(-1 \cdot y.im\right), \color{blue}{\tan^{-1}_* \frac{x.im}{x.re}}\right)\right) \]
                                                              4. *-lowering-*.f64N/A

                                                                \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(-1, y.im\right), \tan^{-1}_* \frac{\color{blue}{x.im}}{x.re}\right)\right) \]
                                                              5. atan2-lowering-atan2.f6447.8%

                                                                \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(-1, y.im\right), \mathsf{atan2.f64}\left(x.im, \color{blue}{x.re}\right)\right)\right) \]
                                                            11. Simplified47.8%

                                                              \[\leadsto \color{blue}{1 + \left(-1 \cdot y.im\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}} \]
                                                            12. Step-by-step derivation
                                                              1. mul-1-negN/A

                                                                \[\leadsto 1 + \left(\mathsf{neg}\left(y.im\right)\right) \cdot \tan^{-1}_* \frac{\color{blue}{x.im}}{x.re} \]
                                                              2. cancel-sign-sub-invN/A

                                                                \[\leadsto 1 - \color{blue}{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \]
                                                              3. --lowering--.f64N/A

                                                                \[\leadsto \mathsf{\_.f64}\left(1, \color{blue}{\left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\right) \]
                                                              4. *-lowering-*.f64N/A

                                                                \[\leadsto \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(y.im, \color{blue}{\tan^{-1}_* \frac{x.im}{x.re}}\right)\right) \]
                                                              5. atan2-lowering-atan2.f6447.8%

                                                                \[\leadsto \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(y.im, \mathsf{atan2.f64}\left(x.im, \color{blue}{x.re}\right)\right)\right) \]
                                                            13. Applied egg-rr47.8%

                                                              \[\leadsto \color{blue}{1 - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \]
                                                          6. Recombined 2 regimes into one program.
                                                          7. Final simplification62.2%

                                                            \[\leadsto \begin{array}{l} \mathbf{if}\;y.re \leq -3.1 \cdot 10^{-173}:\\ \;\;\;\;\frac{1}{{\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\left(\frac{y.re}{-2}\right)}}\\ \mathbf{elif}\;y.re \leq 2.7 \cdot 10^{-21}:\\ \;\;\;\;1 - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{{\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\left(\frac{y.re}{-2}\right)}}\\ \end{array} \]
                                                          8. Add Preprocessing

                                                          Alternative 14: 60.1% accurate, 6.9× speedup?

                                                          \[\begin{array}{l} \\ \begin{array}{l} t_0 := {\left(x.re + \frac{\left(x.im \cdot x.im\right) \cdot 0.5}{x.re}\right)}^{y.re}\\ \mathbf{if}\;y.re \leq -6.7 \cdot 10^{-12}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;y.re \leq 3.1 \cdot 10^{-21}:\\ \;\;\;\;1 - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
                                                          (FPCore (x.re x.im y.re y.im)
                                                           :precision binary64
                                                           (let* ((t_0 (pow (+ x.re (/ (* (* x.im x.im) 0.5) x.re)) y.re)))
                                                             (if (<= y.re -6.7e-12)
                                                               t_0
                                                               (if (<= y.re 3.1e-21) (- 1.0 (* (atan2 x.im x.re) y.im)) t_0))))
                                                          double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
                                                          	double t_0 = pow((x_46_re + (((x_46_im * x_46_im) * 0.5) / x_46_re)), y_46_re);
                                                          	double tmp;
                                                          	if (y_46_re <= -6.7e-12) {
                                                          		tmp = t_0;
                                                          	} else if (y_46_re <= 3.1e-21) {
                                                          		tmp = 1.0 - (atan2(x_46_im, x_46_re) * y_46_im);
                                                          	} else {
                                                          		tmp = t_0;
                                                          	}
                                                          	return tmp;
                                                          }
                                                          
                                                          real(8) function code(x_46re, x_46im, y_46re, y_46im)
                                                              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) :: t_0
                                                              real(8) :: tmp
                                                              t_0 = (x_46re + (((x_46im * x_46im) * 0.5d0) / x_46re)) ** y_46re
                                                              if (y_46re <= (-6.7d-12)) then
                                                                  tmp = t_0
                                                              else if (y_46re <= 3.1d-21) then
                                                                  tmp = 1.0d0 - (atan2(x_46im, x_46re) * y_46im)
                                                              else
                                                                  tmp = t_0
                                                              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 t_0 = Math.pow((x_46_re + (((x_46_im * x_46_im) * 0.5) / x_46_re)), y_46_re);
                                                          	double tmp;
                                                          	if (y_46_re <= -6.7e-12) {
                                                          		tmp = t_0;
                                                          	} else if (y_46_re <= 3.1e-21) {
                                                          		tmp = 1.0 - (Math.atan2(x_46_im, x_46_re) * y_46_im);
                                                          	} else {
                                                          		tmp = t_0;
                                                          	}
                                                          	return tmp;
                                                          }
                                                          
                                                          def code(x_46_re, x_46_im, y_46_re, y_46_im):
                                                          	t_0 = math.pow((x_46_re + (((x_46_im * x_46_im) * 0.5) / x_46_re)), y_46_re)
                                                          	tmp = 0
                                                          	if y_46_re <= -6.7e-12:
                                                          		tmp = t_0
                                                          	elif y_46_re <= 3.1e-21:
                                                          		tmp = 1.0 - (math.atan2(x_46_im, x_46_re) * y_46_im)
                                                          	else:
                                                          		tmp = t_0
                                                          	return tmp
                                                          
                                                          function code(x_46_re, x_46_im, y_46_re, y_46_im)
                                                          	t_0 = Float64(x_46_re + Float64(Float64(Float64(x_46_im * x_46_im) * 0.5) / x_46_re)) ^ y_46_re
                                                          	tmp = 0.0
                                                          	if (y_46_re <= -6.7e-12)
                                                          		tmp = t_0;
                                                          	elseif (y_46_re <= 3.1e-21)
                                                          		tmp = Float64(1.0 - Float64(atan(x_46_im, x_46_re) * y_46_im));
                                                          	else
                                                          		tmp = t_0;
                                                          	end
                                                          	return tmp
                                                          end
                                                          
                                                          function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im)
                                                          	t_0 = (x_46_re + (((x_46_im * x_46_im) * 0.5) / x_46_re)) ^ y_46_re;
                                                          	tmp = 0.0;
                                                          	if (y_46_re <= -6.7e-12)
                                                          		tmp = t_0;
                                                          	elseif (y_46_re <= 3.1e-21)
                                                          		tmp = 1.0 - (atan2(x_46_im, x_46_re) * y_46_im);
                                                          	else
                                                          		tmp = t_0;
                                                          	end
                                                          	tmp_2 = tmp;
                                                          end
                                                          
                                                          code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Power[N[(x$46$re + N[(N[(N[(x$46$im * x$46$im), $MachinePrecision] * 0.5), $MachinePrecision] / x$46$re), $MachinePrecision]), $MachinePrecision], y$46$re], $MachinePrecision]}, If[LessEqual[y$46$re, -6.7e-12], t$95$0, If[LessEqual[y$46$re, 3.1e-21], N[(1.0 - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision], t$95$0]]]
                                                          
                                                          \begin{array}{l}
                                                          
                                                          \\
                                                          \begin{array}{l}
                                                          t_0 := {\left(x.re + \frac{\left(x.im \cdot x.im\right) \cdot 0.5}{x.re}\right)}^{y.re}\\
                                                          \mathbf{if}\;y.re \leq -6.7 \cdot 10^{-12}:\\
                                                          \;\;\;\;t\_0\\
                                                          
                                                          \mathbf{elif}\;y.re \leq 3.1 \cdot 10^{-21}:\\
                                                          \;\;\;\;1 - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
                                                          
                                                          \mathbf{else}:\\
                                                          \;\;\;\;t\_0\\
                                                          
                                                          
                                                          \end{array}
                                                          \end{array}
                                                          
                                                          Derivation
                                                          1. Split input into 2 regimes
                                                          2. if y.re < -6.7000000000000001e-12 or 3.0999999999999998e-21 < y.re

                                                            1. Initial program 33.1%

                                                              \[e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \]
                                                            2. Add Preprocessing
                                                            3. Taylor expanded in y.im around 0

                                                              \[\leadsto \color{blue}{\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}} \]
                                                            4. Step-by-step derivation
                                                              1. *-commutativeN/A

                                                                \[\leadsto {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re} \cdot \color{blue}{\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
                                                              2. *-lowering-*.f64N/A

                                                                \[\leadsto \mathsf{*.f64}\left(\left({\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}\right), \color{blue}{\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\right) \]
                                                              3. pow-lowering-pow.f64N/A

                                                                \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right), y.re\right), \cos \color{blue}{\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\right) \]
                                                              4. unpow2N/A

                                                                \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right), y.re\right), \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
                                                              5. unpow2N/A

                                                                \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right), y.re\right), \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
                                                              6. hypot-defineN/A

                                                                \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\mathsf{hypot}\left(x.im, x.re\right)\right), y.re\right), \cos \left(\color{blue}{y.re} \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
                                                              7. hypot-lowering-hypot.f64N/A

                                                                \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \cos \left(\color{blue}{y.re} \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
                                                              8. cos-lowering-cos.f64N/A

                                                                \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \mathsf{cos.f64}\left(\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
                                                              9. *-lowering-*.f64N/A

                                                                \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
                                                              10. atan2-lowering-atan2.f6468.6%

                                                                \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
                                                            5. Simplified68.6%

                                                              \[\leadsto \color{blue}{{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \cdot \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
                                                            6. Taylor expanded in x.im around 0

                                                              \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\color{blue}{\left(x.re + \frac{1}{2} \cdot \frac{{x.im}^{2}}{x.re}\right)}, y.re\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
                                                            7. Step-by-step derivation
                                                              1. +-lowering-+.f64N/A

                                                                \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{+.f64}\left(x.re, \left(\frac{1}{2} \cdot \frac{{x.im}^{2}}{x.re}\right)\right), y.re\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\color{blue}{y.re}, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
                                                              2. associate-*r/N/A

                                                                \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{+.f64}\left(x.re, \left(\frac{\frac{1}{2} \cdot {x.im}^{2}}{x.re}\right)\right), y.re\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
                                                              3. /-lowering-/.f64N/A

                                                                \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{+.f64}\left(x.re, \mathsf{/.f64}\left(\left(\frac{1}{2} \cdot {x.im}^{2}\right), x.re\right)\right), y.re\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
                                                              4. *-lowering-*.f64N/A

                                                                \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{+.f64}\left(x.re, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \left({x.im}^{2}\right)\right), x.re\right)\right), y.re\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
                                                              5. unpow2N/A

                                                                \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{+.f64}\left(x.re, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \left(x.im \cdot x.im\right)\right), x.re\right)\right), y.re\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
                                                              6. *-lowering-*.f6468.0%

                                                                \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{+.f64}\left(x.re, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(x.im, x.im\right)\right), x.re\right)\right), y.re\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
                                                            8. Simplified68.0%

                                                              \[\leadsto {\color{blue}{\left(x.re + \frac{0.5 \cdot \left(x.im \cdot x.im\right)}{x.re}\right)}}^{y.re} \cdot \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
                                                            9. Taylor expanded in y.re around 0

                                                              \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{+.f64}\left(x.re, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(x.im, x.im\right)\right), x.re\right)\right), y.re\right), \color{blue}{1}\right) \]
                                                            10. Step-by-step derivation
                                                              1. Simplified75.1%

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

                                                              if -6.7000000000000001e-12 < y.re < 3.0999999999999998e-21

                                                              1. Initial program 40.1%

                                                                \[e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \]
                                                              2. Add Preprocessing
                                                              3. Taylor expanded in x.im around inf

                                                                \[\leadsto \color{blue}{\cos \left(-1 \cdot \left(y.im \cdot \log \left(\frac{1}{x.im}\right)\right) + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot e^{-1 \cdot \left(y.re \cdot \log \left(\frac{1}{x.im}\right)\right) - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}} \]
                                                              4. Step-by-step derivation
                                                                1. *-commutativeN/A

                                                                  \[\leadsto e^{-1 \cdot \left(y.re \cdot \log \left(\frac{1}{x.im}\right)\right) - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \color{blue}{\cos \left(-1 \cdot \left(y.im \cdot \log \left(\frac{1}{x.im}\right)\right) + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
                                                                2. *-lowering-*.f64N/A

                                                                  \[\leadsto \mathsf{*.f64}\left(\left(e^{-1 \cdot \left(y.re \cdot \log \left(\frac{1}{x.im}\right)\right) - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\right), \color{blue}{\cos \left(-1 \cdot \left(y.im \cdot \log \left(\frac{1}{x.im}\right)\right) + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\right) \]
                                                                3. exp-lowering-exp.f64N/A

                                                                  \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\left(-1 \cdot \left(y.re \cdot \log \left(\frac{1}{x.im}\right)\right) - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right), \cos \color{blue}{\left(-1 \cdot \left(y.im \cdot \log \left(\frac{1}{x.im}\right)\right) + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\right) \]
                                                                4. --lowering--.f64N/A

                                                                  \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\left(-1 \cdot \left(y.re \cdot \log \left(\frac{1}{x.im}\right)\right)\right), \left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right), \cos \left(\color{blue}{-1 \cdot \left(y.im \cdot \log \left(\frac{1}{x.im}\right)\right)} + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
                                                                5. associate-*r*N/A

                                                                  \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\left(\left(-1 \cdot y.re\right) \cdot \log \left(\frac{1}{x.im}\right)\right), \left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right), \cos \left(\color{blue}{-1} \cdot \left(y.im \cdot \log \left(\frac{1}{x.im}\right)\right) + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
                                                                6. *-lowering-*.f64N/A

                                                                  \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\left(-1 \cdot y.re\right), \log \left(\frac{1}{x.im}\right)\right), \left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right), \cos \left(\color{blue}{-1} \cdot \left(y.im \cdot \log \left(\frac{1}{x.im}\right)\right) + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
                                                                7. *-lowering-*.f64N/A

                                                                  \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(-1, y.re\right), \log \left(\frac{1}{x.im}\right)\right), \left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right), \cos \left(-1 \cdot \left(y.im \cdot \log \left(\frac{1}{x.im}\right)\right) + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
                                                                8. log-lowering-log.f64N/A

                                                                  \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(-1, y.re\right), \mathsf{log.f64}\left(\left(\frac{1}{x.im}\right)\right)\right), \left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right), \cos \left(-1 \cdot \left(y.im \cdot \log \left(\frac{1}{x.im}\right)\right) + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
                                                                9. /-lowering-/.f64N/A

                                                                  \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(-1, y.re\right), \mathsf{log.f64}\left(\mathsf{/.f64}\left(1, x.im\right)\right)\right), \left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right), \cos \left(-1 \cdot \left(y.im \cdot \log \left(\frac{1}{x.im}\right)\right) + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
                                                                10. *-lowering-*.f64N/A

                                                                  \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(-1, y.re\right), \mathsf{log.f64}\left(\mathsf{/.f64}\left(1, x.im\right)\right)\right), \mathsf{*.f64}\left(y.im, \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right), \cos \left(-1 \cdot \color{blue}{\left(y.im \cdot \log \left(\frac{1}{x.im}\right)\right)} + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
                                                                11. atan2-lowering-atan2.f64N/A

                                                                  \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(-1, y.re\right), \mathsf{log.f64}\left(\mathsf{/.f64}\left(1, x.im\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right), \cos \left(-1 \cdot \left(y.im \cdot \color{blue}{\log \left(\frac{1}{x.im}\right)}\right) + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
                                                                12. cos-lowering-cos.f64N/A

                                                                  \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(-1, y.re\right), \mathsf{log.f64}\left(\mathsf{/.f64}\left(1, x.im\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right), \mathsf{cos.f64}\left(\left(-1 \cdot \left(y.im \cdot \log \left(\frac{1}{x.im}\right)\right) + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
                                                                13. +-commutativeN/A

                                                                  \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(-1, y.re\right), \mathsf{log.f64}\left(\mathsf{/.f64}\left(1, x.im\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right), \mathsf{cos.f64}\left(\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re} + -1 \cdot \left(y.im \cdot \log \left(\frac{1}{x.im}\right)\right)\right)\right)\right) \]
                                                                14. +-lowering-+.f64N/A

                                                                  \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(-1, y.re\right), \mathsf{log.f64}\left(\mathsf{/.f64}\left(1, x.im\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right), \mathsf{cos.f64}\left(\mathsf{+.f64}\left(\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right), \left(-1 \cdot \left(y.im \cdot \log \left(\frac{1}{x.im}\right)\right)\right)\right)\right)\right) \]
                                                              5. Simplified37.8%

                                                                \[\leadsto \color{blue}{e^{\left(-1 \cdot y.re\right) \cdot \log \left(\frac{1}{x.im}\right) - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re} + \left(-1 \cdot y.im\right) \cdot \log \left(\frac{1}{x.im}\right)\right)} \]
                                                              6. Taylor expanded in y.re around 0

                                                                \[\leadsto \color{blue}{\cos \left(-1 \cdot \left(y.im \cdot \log \left(\frac{1}{x.im}\right)\right)\right) \cdot e^{\mathsf{neg}\left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}} \]
                                                              7. Step-by-step derivation
                                                                1. *-lowering-*.f64N/A

                                                                  \[\leadsto \mathsf{*.f64}\left(\cos \left(-1 \cdot \left(y.im \cdot \log \left(\frac{1}{x.im}\right)\right)\right), \color{blue}{\left(e^{\mathsf{neg}\left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\right)}\right) \]
                                                                2. cos-lowering-cos.f64N/A

                                                                  \[\leadsto \mathsf{*.f64}\left(\mathsf{cos.f64}\left(\left(-1 \cdot \left(y.im \cdot \log \left(\frac{1}{x.im}\right)\right)\right)\right), \left(e^{\color{blue}{\mathsf{neg}\left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}}\right)\right) \]
                                                                3. associate-*r*N/A

                                                                  \[\leadsto \mathsf{*.f64}\left(\mathsf{cos.f64}\left(\left(\left(-1 \cdot y.im\right) \cdot \log \left(\frac{1}{x.im}\right)\right)\right), \left(e^{\mathsf{neg}\left(\color{blue}{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\right)}\right)\right) \]
                                                                4. *-lowering-*.f64N/A

                                                                  \[\leadsto \mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(\left(-1 \cdot y.im\right), \log \left(\frac{1}{x.im}\right)\right)\right), \left(e^{\mathsf{neg}\left(\color{blue}{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\right)}\right)\right) \]
                                                                5. mul-1-negN/A

                                                                  \[\leadsto \mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(\left(\mathsf{neg}\left(y.im\right)\right), \log \left(\frac{1}{x.im}\right)\right)\right), \left(e^{\mathsf{neg}\left(\color{blue}{y.im} \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\right)\right) \]
                                                                6. neg-lowering-neg.f64N/A

                                                                  \[\leadsto \mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(\mathsf{neg.f64}\left(y.im\right), \log \left(\frac{1}{x.im}\right)\right)\right), \left(e^{\mathsf{neg}\left(\color{blue}{y.im} \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\right)\right) \]
                                                                7. log-lowering-log.f64N/A

                                                                  \[\leadsto \mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(\mathsf{neg.f64}\left(y.im\right), \mathsf{log.f64}\left(\left(\frac{1}{x.im}\right)\right)\right)\right), \left(e^{\mathsf{neg}\left(y.im \cdot \color{blue}{\tan^{-1}_* \frac{x.im}{x.re}}\right)}\right)\right) \]
                                                                8. /-lowering-/.f64N/A

                                                                  \[\leadsto \mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(\mathsf{neg.f64}\left(y.im\right), \mathsf{log.f64}\left(\mathsf{/.f64}\left(1, x.im\right)\right)\right)\right), \left(e^{\mathsf{neg}\left(y.im \cdot \tan^{-1}_* \frac{\color{blue}{x.im}}{x.re}\right)}\right)\right) \]
                                                                9. exp-lowering-exp.f64N/A

                                                                  \[\leadsto \mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(\mathsf{neg.f64}\left(y.im\right), \mathsf{log.f64}\left(\mathsf{/.f64}\left(1, x.im\right)\right)\right)\right), \mathsf{exp.f64}\left(\left(\mathsf{neg}\left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right) \]
                                                                10. distribute-rgt-neg-inN/A

                                                                  \[\leadsto \mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(\mathsf{neg.f64}\left(y.im\right), \mathsf{log.f64}\left(\mathsf{/.f64}\left(1, x.im\right)\right)\right)\right), \mathsf{exp.f64}\left(\left(y.im \cdot \left(\mathsf{neg}\left(\tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right)\right) \]
                                                                11. mul-1-negN/A

                                                                  \[\leadsto \mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(\mathsf{neg.f64}\left(y.im\right), \mathsf{log.f64}\left(\mathsf{/.f64}\left(1, x.im\right)\right)\right)\right), \mathsf{exp.f64}\left(\left(y.im \cdot \left(-1 \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right) \]
                                                                12. *-lowering-*.f64N/A

                                                                  \[\leadsto \mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(\mathsf{neg.f64}\left(y.im\right), \mathsf{log.f64}\left(\mathsf{/.f64}\left(1, x.im\right)\right)\right)\right), \mathsf{exp.f64}\left(\mathsf{*.f64}\left(y.im, \left(-1 \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right) \]
                                                                13. *-lowering-*.f64N/A

                                                                  \[\leadsto \mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(\mathsf{neg.f64}\left(y.im\right), \mathsf{log.f64}\left(\mathsf{/.f64}\left(1, x.im\right)\right)\right)\right), \mathsf{exp.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(-1, \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right) \]
                                                                14. atan2-lowering-atan2.f6437.8%

                                                                  \[\leadsto \mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(\mathsf{neg.f64}\left(y.im\right), \mathsf{log.f64}\left(\mathsf{/.f64}\left(1, x.im\right)\right)\right)\right), \mathsf{exp.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(-1, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right)\right) \]
                                                              8. Simplified37.8%

                                                                \[\leadsto \color{blue}{\cos \left(\left(-y.im\right) \cdot \log \left(\frac{1}{x.im}\right)\right) \cdot e^{y.im \cdot \left(-1 \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}} \]
                                                              9. Taylor expanded in y.im around 0

                                                                \[\leadsto \color{blue}{1 + -1 \cdot \left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
                                                              10. Step-by-step derivation
                                                                1. +-lowering-+.f64N/A

                                                                  \[\leadsto \mathsf{+.f64}\left(1, \color{blue}{\left(-1 \cdot \left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)}\right) \]
                                                                2. associate-*r*N/A

                                                                  \[\leadsto \mathsf{+.f64}\left(1, \left(\left(-1 \cdot y.im\right) \cdot \color{blue}{\tan^{-1}_* \frac{x.im}{x.re}}\right)\right) \]
                                                                3. *-lowering-*.f64N/A

                                                                  \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(-1 \cdot y.im\right), \color{blue}{\tan^{-1}_* \frac{x.im}{x.re}}\right)\right) \]
                                                                4. *-lowering-*.f64N/A

                                                                  \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(-1, y.im\right), \tan^{-1}_* \frac{\color{blue}{x.im}}{x.re}\right)\right) \]
                                                                5. atan2-lowering-atan2.f6445.3%

                                                                  \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(-1, y.im\right), \mathsf{atan2.f64}\left(x.im, \color{blue}{x.re}\right)\right)\right) \]
                                                              11. Simplified45.3%

                                                                \[\leadsto \color{blue}{1 + \left(-1 \cdot y.im\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}} \]
                                                              12. Step-by-step derivation
                                                                1. mul-1-negN/A

                                                                  \[\leadsto 1 + \left(\mathsf{neg}\left(y.im\right)\right) \cdot \tan^{-1}_* \frac{\color{blue}{x.im}}{x.re} \]
                                                                2. cancel-sign-sub-invN/A

                                                                  \[\leadsto 1 - \color{blue}{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \]
                                                                3. --lowering--.f64N/A

                                                                  \[\leadsto \mathsf{\_.f64}\left(1, \color{blue}{\left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\right) \]
                                                                4. *-lowering-*.f64N/A

                                                                  \[\leadsto \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(y.im, \color{blue}{\tan^{-1}_* \frac{x.im}{x.re}}\right)\right) \]
                                                                5. atan2-lowering-atan2.f6445.3%

                                                                  \[\leadsto \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(y.im, \mathsf{atan2.f64}\left(x.im, \color{blue}{x.re}\right)\right)\right) \]
                                                              13. Applied egg-rr45.3%

                                                                \[\leadsto \color{blue}{1 - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \]
                                                            11. Recombined 2 regimes into one program.
                                                            12. Final simplification60.1%

                                                              \[\leadsto \begin{array}{l} \mathbf{if}\;y.re \leq -6.7 \cdot 10^{-12}:\\ \;\;\;\;{\left(x.re + \frac{\left(x.im \cdot x.im\right) \cdot 0.5}{x.re}\right)}^{y.re}\\ \mathbf{elif}\;y.re \leq 3.1 \cdot 10^{-21}:\\ \;\;\;\;1 - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\ \mathbf{else}:\\ \;\;\;\;{\left(x.re + \frac{\left(x.im \cdot x.im\right) \cdot 0.5}{x.re}\right)}^{y.re}\\ \end{array} \]
                                                            13. Add Preprocessing

                                                            Alternative 15: 52.8% accurate, 7.1× speedup?

                                                            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y.re \leq -0.0029:\\ \;\;\;\;{x.im}^{y.re}\\ \mathbf{elif}\;y.re \leq 4300000000000:\\ \;\;\;\;1 - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\ \mathbf{else}:\\ \;\;\;\;{x.im}^{y.re}\\ \end{array} \end{array} \]
                                                            (FPCore (x.re x.im y.re y.im)
                                                             :precision binary64
                                                             (if (<= y.re -0.0029)
                                                               (pow x.im y.re)
                                                               (if (<= y.re 4300000000000.0)
                                                                 (- 1.0 (* (atan2 x.im x.re) y.im))
                                                                 (pow x.im 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 <= -0.0029) {
                                                            		tmp = pow(x_46_im, y_46_re);
                                                            	} else if (y_46_re <= 4300000000000.0) {
                                                            		tmp = 1.0 - (atan2(x_46_im, x_46_re) * y_46_im);
                                                            	} else {
                                                            		tmp = pow(x_46_im, y_46_re);
                                                            	}
                                                            	return tmp;
                                                            }
                                                            
                                                            real(8) function code(x_46re, x_46im, y_46re, y_46im)
                                                                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 <= (-0.0029d0)) then
                                                                    tmp = x_46im ** y_46re
                                                                else if (y_46re <= 4300000000000.0d0) then
                                                                    tmp = 1.0d0 - (atan2(x_46im, x_46re) * y_46im)
                                                                else
                                                                    tmp = x_46im ** y_46re
                                                                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 <= -0.0029) {
                                                            		tmp = Math.pow(x_46_im, y_46_re);
                                                            	} else if (y_46_re <= 4300000000000.0) {
                                                            		tmp = 1.0 - (Math.atan2(x_46_im, x_46_re) * y_46_im);
                                                            	} else {
                                                            		tmp = Math.pow(x_46_im, y_46_re);
                                                            	}
                                                            	return tmp;
                                                            }
                                                            
                                                            def code(x_46_re, x_46_im, y_46_re, y_46_im):
                                                            	tmp = 0
                                                            	if y_46_re <= -0.0029:
                                                            		tmp = math.pow(x_46_im, y_46_re)
                                                            	elif y_46_re <= 4300000000000.0:
                                                            		tmp = 1.0 - (math.atan2(x_46_im, x_46_re) * y_46_im)
                                                            	else:
                                                            		tmp = math.pow(x_46_im, 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 <= -0.0029)
                                                            		tmp = x_46_im ^ y_46_re;
                                                            	elseif (y_46_re <= 4300000000000.0)
                                                            		tmp = Float64(1.0 - Float64(atan(x_46_im, x_46_re) * y_46_im));
                                                            	else
                                                            		tmp = x_46_im ^ y_46_re;
                                                            	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 <= -0.0029)
                                                            		tmp = x_46_im ^ y_46_re;
                                                            	elseif (y_46_re <= 4300000000000.0)
                                                            		tmp = 1.0 - (atan2(x_46_im, x_46_re) * y_46_im);
                                                            	else
                                                            		tmp = x_46_im ^ y_46_re;
                                                            	end
                                                            	tmp_2 = tmp;
                                                            end
                                                            
                                                            code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[y$46$re, -0.0029], N[Power[x$46$im, y$46$re], $MachinePrecision], If[LessEqual[y$46$re, 4300000000000.0], N[(1.0 - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision], N[Power[x$46$im, y$46$re], $MachinePrecision]]]
                                                            
                                                            \begin{array}{l}
                                                            
                                                            \\
                                                            \begin{array}{l}
                                                            \mathbf{if}\;y.re \leq -0.0029:\\
                                                            \;\;\;\;{x.im}^{y.re}\\
                                                            
                                                            \mathbf{elif}\;y.re \leq 4300000000000:\\
                                                            \;\;\;\;1 - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
                                                            
                                                            \mathbf{else}:\\
                                                            \;\;\;\;{x.im}^{y.re}\\
                                                            
                                                            
                                                            \end{array}
                                                            \end{array}
                                                            
                                                            Derivation
                                                            1. Split input into 2 regimes
                                                            2. if y.re < -0.0029 or 4.3e12 < y.re

                                                              1. Initial program 33.6%

                                                                \[e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \]
                                                              2. Add Preprocessing
                                                              3. Taylor expanded in y.im around 0

                                                                \[\leadsto \color{blue}{\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}} \]
                                                              4. Step-by-step derivation
                                                                1. *-commutativeN/A

                                                                  \[\leadsto {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re} \cdot \color{blue}{\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
                                                                2. *-lowering-*.f64N/A

                                                                  \[\leadsto \mathsf{*.f64}\left(\left({\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}\right), \color{blue}{\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\right) \]
                                                                3. pow-lowering-pow.f64N/A

                                                                  \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right), y.re\right), \cos \color{blue}{\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\right) \]
                                                                4. unpow2N/A

                                                                  \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right), y.re\right), \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
                                                                5. unpow2N/A

                                                                  \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right), y.re\right), \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
                                                                6. hypot-defineN/A

                                                                  \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\mathsf{hypot}\left(x.im, x.re\right)\right), y.re\right), \cos \left(\color{blue}{y.re} \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
                                                                7. hypot-lowering-hypot.f64N/A

                                                                  \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \cos \left(\color{blue}{y.re} \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
                                                                8. cos-lowering-cos.f64N/A

                                                                  \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \mathsf{cos.f64}\left(\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
                                                                9. *-lowering-*.f64N/A

                                                                  \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
                                                                10. atan2-lowering-atan2.f6468.1%

                                                                  \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
                                                              5. Simplified68.1%

                                                                \[\leadsto \color{blue}{{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \cdot \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
                                                              6. Taylor expanded in x.re around 0

                                                                \[\leadsto \mathsf{*.f64}\left(\color{blue}{\left({x.im}^{y.re}\right)}, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
                                                              7. Step-by-step derivation
                                                                1. pow-lowering-pow.f6452.0%

                                                                  \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(x.im, y.re\right), \mathsf{cos.f64}\left(\color{blue}{\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)}\right)\right) \]
                                                              8. Simplified52.0%

                                                                \[\leadsto \color{blue}{{x.im}^{y.re}} \cdot \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
                                                              9. Taylor expanded in y.re around 0

                                                                \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(x.im, y.re\right), \color{blue}{1}\right) \]
                                                              10. Step-by-step derivation
                                                                1. Simplified58.8%

                                                                  \[\leadsto {x.im}^{y.re} \cdot \color{blue}{1} \]

                                                                if -0.0029 < y.re < 4.3e12

                                                                1. Initial program 39.4%

                                                                  \[e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \]
                                                                2. Add Preprocessing
                                                                3. Taylor expanded in x.im around inf

                                                                  \[\leadsto \color{blue}{\cos \left(-1 \cdot \left(y.im \cdot \log \left(\frac{1}{x.im}\right)\right) + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot e^{-1 \cdot \left(y.re \cdot \log \left(\frac{1}{x.im}\right)\right) - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}} \]
                                                                4. Step-by-step derivation
                                                                  1. *-commutativeN/A

                                                                    \[\leadsto e^{-1 \cdot \left(y.re \cdot \log \left(\frac{1}{x.im}\right)\right) - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \color{blue}{\cos \left(-1 \cdot \left(y.im \cdot \log \left(\frac{1}{x.im}\right)\right) + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
                                                                  2. *-lowering-*.f64N/A

                                                                    \[\leadsto \mathsf{*.f64}\left(\left(e^{-1 \cdot \left(y.re \cdot \log \left(\frac{1}{x.im}\right)\right) - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\right), \color{blue}{\cos \left(-1 \cdot \left(y.im \cdot \log \left(\frac{1}{x.im}\right)\right) + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\right) \]
                                                                  3. exp-lowering-exp.f64N/A

                                                                    \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\left(-1 \cdot \left(y.re \cdot \log \left(\frac{1}{x.im}\right)\right) - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right), \cos \color{blue}{\left(-1 \cdot \left(y.im \cdot \log \left(\frac{1}{x.im}\right)\right) + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\right) \]
                                                                  4. --lowering--.f64N/A

                                                                    \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\left(-1 \cdot \left(y.re \cdot \log \left(\frac{1}{x.im}\right)\right)\right), \left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right), \cos \left(\color{blue}{-1 \cdot \left(y.im \cdot \log \left(\frac{1}{x.im}\right)\right)} + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
                                                                  5. associate-*r*N/A

                                                                    \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\left(\left(-1 \cdot y.re\right) \cdot \log \left(\frac{1}{x.im}\right)\right), \left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right), \cos \left(\color{blue}{-1} \cdot \left(y.im \cdot \log \left(\frac{1}{x.im}\right)\right) + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
                                                                  6. *-lowering-*.f64N/A

                                                                    \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\left(-1 \cdot y.re\right), \log \left(\frac{1}{x.im}\right)\right), \left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right), \cos \left(\color{blue}{-1} \cdot \left(y.im \cdot \log \left(\frac{1}{x.im}\right)\right) + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
                                                                  7. *-lowering-*.f64N/A

                                                                    \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(-1, y.re\right), \log \left(\frac{1}{x.im}\right)\right), \left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right), \cos \left(-1 \cdot \left(y.im \cdot \log \left(\frac{1}{x.im}\right)\right) + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
                                                                  8. log-lowering-log.f64N/A

                                                                    \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(-1, y.re\right), \mathsf{log.f64}\left(\left(\frac{1}{x.im}\right)\right)\right), \left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right), \cos \left(-1 \cdot \left(y.im \cdot \log \left(\frac{1}{x.im}\right)\right) + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
                                                                  9. /-lowering-/.f64N/A

                                                                    \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(-1, y.re\right), \mathsf{log.f64}\left(\mathsf{/.f64}\left(1, x.im\right)\right)\right), \left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right), \cos \left(-1 \cdot \left(y.im \cdot \log \left(\frac{1}{x.im}\right)\right) + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
                                                                  10. *-lowering-*.f64N/A

                                                                    \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(-1, y.re\right), \mathsf{log.f64}\left(\mathsf{/.f64}\left(1, x.im\right)\right)\right), \mathsf{*.f64}\left(y.im, \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right), \cos \left(-1 \cdot \color{blue}{\left(y.im \cdot \log \left(\frac{1}{x.im}\right)\right)} + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
                                                                  11. atan2-lowering-atan2.f64N/A

                                                                    \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(-1, y.re\right), \mathsf{log.f64}\left(\mathsf{/.f64}\left(1, x.im\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right), \cos \left(-1 \cdot \left(y.im \cdot \color{blue}{\log \left(\frac{1}{x.im}\right)}\right) + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
                                                                  12. cos-lowering-cos.f64N/A

                                                                    \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(-1, y.re\right), \mathsf{log.f64}\left(\mathsf{/.f64}\left(1, x.im\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right), \mathsf{cos.f64}\left(\left(-1 \cdot \left(y.im \cdot \log \left(\frac{1}{x.im}\right)\right) + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
                                                                  13. +-commutativeN/A

                                                                    \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(-1, y.re\right), \mathsf{log.f64}\left(\mathsf{/.f64}\left(1, x.im\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right), \mathsf{cos.f64}\left(\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re} + -1 \cdot \left(y.im \cdot \log \left(\frac{1}{x.im}\right)\right)\right)\right)\right) \]
                                                                  14. +-lowering-+.f64N/A

                                                                    \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(-1, y.re\right), \mathsf{log.f64}\left(\mathsf{/.f64}\left(1, x.im\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right), \mathsf{cos.f64}\left(\mathsf{+.f64}\left(\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right), \left(-1 \cdot \left(y.im \cdot \log \left(\frac{1}{x.im}\right)\right)\right)\right)\right)\right) \]
                                                                5. Simplified36.9%

                                                                  \[\leadsto \color{blue}{e^{\left(-1 \cdot y.re\right) \cdot \log \left(\frac{1}{x.im}\right) - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re} + \left(-1 \cdot y.im\right) \cdot \log \left(\frac{1}{x.im}\right)\right)} \]
                                                                6. Taylor expanded in y.re around 0

                                                                  \[\leadsto \color{blue}{\cos \left(-1 \cdot \left(y.im \cdot \log \left(\frac{1}{x.im}\right)\right)\right) \cdot e^{\mathsf{neg}\left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}} \]
                                                                7. Step-by-step derivation
                                                                  1. *-lowering-*.f64N/A

                                                                    \[\leadsto \mathsf{*.f64}\left(\cos \left(-1 \cdot \left(y.im \cdot \log \left(\frac{1}{x.im}\right)\right)\right), \color{blue}{\left(e^{\mathsf{neg}\left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\right)}\right) \]
                                                                  2. cos-lowering-cos.f64N/A

                                                                    \[\leadsto \mathsf{*.f64}\left(\mathsf{cos.f64}\left(\left(-1 \cdot \left(y.im \cdot \log \left(\frac{1}{x.im}\right)\right)\right)\right), \left(e^{\color{blue}{\mathsf{neg}\left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}}\right)\right) \]
                                                                  3. associate-*r*N/A

                                                                    \[\leadsto \mathsf{*.f64}\left(\mathsf{cos.f64}\left(\left(\left(-1 \cdot y.im\right) \cdot \log \left(\frac{1}{x.im}\right)\right)\right), \left(e^{\mathsf{neg}\left(\color{blue}{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\right)}\right)\right) \]
                                                                  4. *-lowering-*.f64N/A

                                                                    \[\leadsto \mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(\left(-1 \cdot y.im\right), \log \left(\frac{1}{x.im}\right)\right)\right), \left(e^{\mathsf{neg}\left(\color{blue}{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\right)}\right)\right) \]
                                                                  5. mul-1-negN/A

                                                                    \[\leadsto \mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(\left(\mathsf{neg}\left(y.im\right)\right), \log \left(\frac{1}{x.im}\right)\right)\right), \left(e^{\mathsf{neg}\left(\color{blue}{y.im} \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\right)\right) \]
                                                                  6. neg-lowering-neg.f64N/A

                                                                    \[\leadsto \mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(\mathsf{neg.f64}\left(y.im\right), \log \left(\frac{1}{x.im}\right)\right)\right), \left(e^{\mathsf{neg}\left(\color{blue}{y.im} \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\right)\right) \]
                                                                  7. log-lowering-log.f64N/A

                                                                    \[\leadsto \mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(\mathsf{neg.f64}\left(y.im\right), \mathsf{log.f64}\left(\left(\frac{1}{x.im}\right)\right)\right)\right), \left(e^{\mathsf{neg}\left(y.im \cdot \color{blue}{\tan^{-1}_* \frac{x.im}{x.re}}\right)}\right)\right) \]
                                                                  8. /-lowering-/.f64N/A

                                                                    \[\leadsto \mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(\mathsf{neg.f64}\left(y.im\right), \mathsf{log.f64}\left(\mathsf{/.f64}\left(1, x.im\right)\right)\right)\right), \left(e^{\mathsf{neg}\left(y.im \cdot \tan^{-1}_* \frac{\color{blue}{x.im}}{x.re}\right)}\right)\right) \]
                                                                  9. exp-lowering-exp.f64N/A

                                                                    \[\leadsto \mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(\mathsf{neg.f64}\left(y.im\right), \mathsf{log.f64}\left(\mathsf{/.f64}\left(1, x.im\right)\right)\right)\right), \mathsf{exp.f64}\left(\left(\mathsf{neg}\left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right) \]
                                                                  10. distribute-rgt-neg-inN/A

                                                                    \[\leadsto \mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(\mathsf{neg.f64}\left(y.im\right), \mathsf{log.f64}\left(\mathsf{/.f64}\left(1, x.im\right)\right)\right)\right), \mathsf{exp.f64}\left(\left(y.im \cdot \left(\mathsf{neg}\left(\tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right)\right) \]
                                                                  11. mul-1-negN/A

                                                                    \[\leadsto \mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(\mathsf{neg.f64}\left(y.im\right), \mathsf{log.f64}\left(\mathsf{/.f64}\left(1, x.im\right)\right)\right)\right), \mathsf{exp.f64}\left(\left(y.im \cdot \left(-1 \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right) \]
                                                                  12. *-lowering-*.f64N/A

                                                                    \[\leadsto \mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(\mathsf{neg.f64}\left(y.im\right), \mathsf{log.f64}\left(\mathsf{/.f64}\left(1, x.im\right)\right)\right)\right), \mathsf{exp.f64}\left(\mathsf{*.f64}\left(y.im, \left(-1 \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right) \]
                                                                  13. *-lowering-*.f64N/A

                                                                    \[\leadsto \mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(\mathsf{neg.f64}\left(y.im\right), \mathsf{log.f64}\left(\mathsf{/.f64}\left(1, x.im\right)\right)\right)\right), \mathsf{exp.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(-1, \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right) \]
                                                                  14. atan2-lowering-atan2.f6436.9%

                                                                    \[\leadsto \mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(\mathsf{neg.f64}\left(y.im\right), \mathsf{log.f64}\left(\mathsf{/.f64}\left(1, x.im\right)\right)\right)\right), \mathsf{exp.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(-1, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right)\right) \]
                                                                8. Simplified36.9%

                                                                  \[\leadsto \color{blue}{\cos \left(\left(-y.im\right) \cdot \log \left(\frac{1}{x.im}\right)\right) \cdot e^{y.im \cdot \left(-1 \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}} \]
                                                                9. Taylor expanded in y.im around 0

                                                                  \[\leadsto \color{blue}{1 + -1 \cdot \left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
                                                                10. Step-by-step derivation
                                                                  1. +-lowering-+.f64N/A

                                                                    \[\leadsto \mathsf{+.f64}\left(1, \color{blue}{\left(-1 \cdot \left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)}\right) \]
                                                                  2. associate-*r*N/A

                                                                    \[\leadsto \mathsf{+.f64}\left(1, \left(\left(-1 \cdot y.im\right) \cdot \color{blue}{\tan^{-1}_* \frac{x.im}{x.re}}\right)\right) \]
                                                                  3. *-lowering-*.f64N/A

                                                                    \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(-1 \cdot y.im\right), \color{blue}{\tan^{-1}_* \frac{x.im}{x.re}}\right)\right) \]
                                                                  4. *-lowering-*.f64N/A

                                                                    \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(-1, y.im\right), \tan^{-1}_* \frac{\color{blue}{x.im}}{x.re}\right)\right) \]
                                                                  5. atan2-lowering-atan2.f6444.6%

                                                                    \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(-1, y.im\right), \mathsf{atan2.f64}\left(x.im, \color{blue}{x.re}\right)\right)\right) \]
                                                                11. Simplified44.6%

                                                                  \[\leadsto \color{blue}{1 + \left(-1 \cdot y.im\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}} \]
                                                                12. Step-by-step derivation
                                                                  1. mul-1-negN/A

                                                                    \[\leadsto 1 + \left(\mathsf{neg}\left(y.im\right)\right) \cdot \tan^{-1}_* \frac{\color{blue}{x.im}}{x.re} \]
                                                                  2. cancel-sign-sub-invN/A

                                                                    \[\leadsto 1 - \color{blue}{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \]
                                                                  3. --lowering--.f64N/A

                                                                    \[\leadsto \mathsf{\_.f64}\left(1, \color{blue}{\left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\right) \]
                                                                  4. *-lowering-*.f64N/A

                                                                    \[\leadsto \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(y.im, \color{blue}{\tan^{-1}_* \frac{x.im}{x.re}}\right)\right) \]
                                                                  5. atan2-lowering-atan2.f6444.6%

                                                                    \[\leadsto \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(y.im, \mathsf{atan2.f64}\left(x.im, \color{blue}{x.re}\right)\right)\right) \]
                                                                13. Applied egg-rr44.6%

                                                                  \[\leadsto \color{blue}{1 - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \]
                                                              11. Recombined 2 regimes into one program.
                                                              12. Final simplification51.3%

                                                                \[\leadsto \begin{array}{l} \mathbf{if}\;y.re \leq -0.0029:\\ \;\;\;\;{x.im}^{y.re}\\ \mathbf{elif}\;y.re \leq 4300000000000:\\ \;\;\;\;1 - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\ \mathbf{else}:\\ \;\;\;\;{x.im}^{y.re}\\ \end{array} \]
                                                              13. Add Preprocessing

                                                              Alternative 16: 52.8% accurate, 7.4× speedup?

                                                              \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y.re \leq -0.23:\\ \;\;\;\;{x.im}^{y.re}\\ \mathbf{elif}\;y.re \leq 25000000000:\\ \;\;\;\;1\\ \mathbf{else}:\\ \;\;\;\;{x.im}^{y.re}\\ \end{array} \end{array} \]
                                                              (FPCore (x.re x.im y.re y.im)
                                                               :precision binary64
                                                               (if (<= y.re -0.23)
                                                                 (pow x.im y.re)
                                                                 (if (<= y.re 25000000000.0) 1.0 (pow x.im 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 <= -0.23) {
                                                              		tmp = pow(x_46_im, y_46_re);
                                                              	} else if (y_46_re <= 25000000000.0) {
                                                              		tmp = 1.0;
                                                              	} else {
                                                              		tmp = pow(x_46_im, y_46_re);
                                                              	}
                                                              	return tmp;
                                                              }
                                                              
                                                              real(8) function code(x_46re, x_46im, y_46re, y_46im)
                                                                  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 <= (-0.23d0)) then
                                                                      tmp = x_46im ** y_46re
                                                                  else if (y_46re <= 25000000000.0d0) then
                                                                      tmp = 1.0d0
                                                                  else
                                                                      tmp = x_46im ** y_46re
                                                                  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 <= -0.23) {
                                                              		tmp = Math.pow(x_46_im, y_46_re);
                                                              	} else if (y_46_re <= 25000000000.0) {
                                                              		tmp = 1.0;
                                                              	} else {
                                                              		tmp = Math.pow(x_46_im, y_46_re);
                                                              	}
                                                              	return tmp;
                                                              }
                                                              
                                                              def code(x_46_re, x_46_im, y_46_re, y_46_im):
                                                              	tmp = 0
                                                              	if y_46_re <= -0.23:
                                                              		tmp = math.pow(x_46_im, y_46_re)
                                                              	elif y_46_re <= 25000000000.0:
                                                              		tmp = 1.0
                                                              	else:
                                                              		tmp = math.pow(x_46_im, 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 <= -0.23)
                                                              		tmp = x_46_im ^ y_46_re;
                                                              	elseif (y_46_re <= 25000000000.0)
                                                              		tmp = 1.0;
                                                              	else
                                                              		tmp = x_46_im ^ y_46_re;
                                                              	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 <= -0.23)
                                                              		tmp = x_46_im ^ y_46_re;
                                                              	elseif (y_46_re <= 25000000000.0)
                                                              		tmp = 1.0;
                                                              	else
                                                              		tmp = x_46_im ^ y_46_re;
                                                              	end
                                                              	tmp_2 = tmp;
                                                              end
                                                              
                                                              code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[y$46$re, -0.23], N[Power[x$46$im, y$46$re], $MachinePrecision], If[LessEqual[y$46$re, 25000000000.0], 1.0, N[Power[x$46$im, y$46$re], $MachinePrecision]]]
                                                              
                                                              \begin{array}{l}
                                                              
                                                              \\
                                                              \begin{array}{l}
                                                              \mathbf{if}\;y.re \leq -0.23:\\
                                                              \;\;\;\;{x.im}^{y.re}\\
                                                              
                                                              \mathbf{elif}\;y.re \leq 25000000000:\\
                                                              \;\;\;\;1\\
                                                              
                                                              \mathbf{else}:\\
                                                              \;\;\;\;{x.im}^{y.re}\\
                                                              
                                                              
                                                              \end{array}
                                                              \end{array}
                                                              
                                                              Derivation
                                                              1. Split input into 2 regimes
                                                              2. if y.re < -0.23000000000000001 or 2.5e10 < y.re

                                                                1. Initial program 33.6%

                                                                  \[e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \]
                                                                2. Add Preprocessing
                                                                3. Taylor expanded in y.im around 0

                                                                  \[\leadsto \color{blue}{\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}} \]
                                                                4. Step-by-step derivation
                                                                  1. *-commutativeN/A

                                                                    \[\leadsto {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re} \cdot \color{blue}{\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
                                                                  2. *-lowering-*.f64N/A

                                                                    \[\leadsto \mathsf{*.f64}\left(\left({\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}\right), \color{blue}{\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\right) \]
                                                                  3. pow-lowering-pow.f64N/A

                                                                    \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right), y.re\right), \cos \color{blue}{\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\right) \]
                                                                  4. unpow2N/A

                                                                    \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right), y.re\right), \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
                                                                  5. unpow2N/A

                                                                    \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right), y.re\right), \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
                                                                  6. hypot-defineN/A

                                                                    \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\mathsf{hypot}\left(x.im, x.re\right)\right), y.re\right), \cos \left(\color{blue}{y.re} \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
                                                                  7. hypot-lowering-hypot.f64N/A

                                                                    \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \cos \left(\color{blue}{y.re} \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
                                                                  8. cos-lowering-cos.f64N/A

                                                                    \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \mathsf{cos.f64}\left(\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
                                                                  9. *-lowering-*.f64N/A

                                                                    \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
                                                                  10. atan2-lowering-atan2.f6468.1%

                                                                    \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
                                                                5. Simplified68.1%

                                                                  \[\leadsto \color{blue}{{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \cdot \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
                                                                6. Taylor expanded in x.re around 0

                                                                  \[\leadsto \mathsf{*.f64}\left(\color{blue}{\left({x.im}^{y.re}\right)}, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
                                                                7. Step-by-step derivation
                                                                  1. pow-lowering-pow.f6452.0%

                                                                    \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(x.im, y.re\right), \mathsf{cos.f64}\left(\color{blue}{\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)}\right)\right) \]
                                                                8. Simplified52.0%

                                                                  \[\leadsto \color{blue}{{x.im}^{y.re}} \cdot \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
                                                                9. Taylor expanded in y.re around 0

                                                                  \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(x.im, y.re\right), \color{blue}{1}\right) \]
                                                                10. Step-by-step derivation
                                                                  1. Simplified58.8%

                                                                    \[\leadsto {x.im}^{y.re} \cdot \color{blue}{1} \]

                                                                  if -0.23000000000000001 < y.re < 2.5e10

                                                                  1. Initial program 39.4%

                                                                    \[e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \]
                                                                  2. Add Preprocessing
                                                                  3. Taylor expanded in y.im around 0

                                                                    \[\leadsto \color{blue}{\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}} \]
                                                                  4. Step-by-step derivation
                                                                    1. *-commutativeN/A

                                                                      \[\leadsto {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re} \cdot \color{blue}{\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
                                                                    2. *-lowering-*.f64N/A

                                                                      \[\leadsto \mathsf{*.f64}\left(\left({\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}\right), \color{blue}{\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\right) \]
                                                                    3. pow-lowering-pow.f64N/A

                                                                      \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right), y.re\right), \cos \color{blue}{\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\right) \]
                                                                    4. unpow2N/A

                                                                      \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right), y.re\right), \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
                                                                    5. unpow2N/A

                                                                      \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right), y.re\right), \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
                                                                    6. hypot-defineN/A

                                                                      \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\mathsf{hypot}\left(x.im, x.re\right)\right), y.re\right), \cos \left(\color{blue}{y.re} \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
                                                                    7. hypot-lowering-hypot.f64N/A

                                                                      \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \cos \left(\color{blue}{y.re} \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
                                                                    8. cos-lowering-cos.f64N/A

                                                                      \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \mathsf{cos.f64}\left(\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
                                                                    9. *-lowering-*.f64N/A

                                                                      \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
                                                                    10. atan2-lowering-atan2.f6446.2%

                                                                      \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
                                                                  5. Simplified46.2%

                                                                    \[\leadsto \color{blue}{{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \cdot \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
                                                                  6. Taylor expanded in y.re around 0

                                                                    \[\leadsto \color{blue}{1} \]
                                                                  7. Step-by-step derivation
                                                                    1. Simplified44.2%

                                                                      \[\leadsto \color{blue}{1} \]
                                                                  8. Recombined 2 regimes into one program.
                                                                  9. Final simplification51.1%

                                                                    \[\leadsto \begin{array}{l} \mathbf{if}\;y.re \leq -0.23:\\ \;\;\;\;{x.im}^{y.re}\\ \mathbf{elif}\;y.re \leq 25000000000:\\ \;\;\;\;1\\ \mathbf{else}:\\ \;\;\;\;{x.im}^{y.re}\\ \end{array} \]
                                                                  10. Add Preprocessing

                                                                  Alternative 17: 25.8% accurate, 829.0× speedup?

                                                                  \[\begin{array}{l} \\ 1 \end{array} \]
                                                                  (FPCore (x.re x.im y.re y.im) :precision binary64 1.0)
                                                                  double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
                                                                  	return 1.0;
                                                                  }
                                                                  
                                                                  real(8) function code(x_46re, x_46im, y_46re, y_46im)
                                                                      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 = 1.0d0
                                                                  end function
                                                                  
                                                                  public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
                                                                  	return 1.0;
                                                                  }
                                                                  
                                                                  def code(x_46_re, x_46_im, y_46_re, y_46_im):
                                                                  	return 1.0
                                                                  
                                                                  function code(x_46_re, x_46_im, y_46_re, y_46_im)
                                                                  	return 1.0
                                                                  end
                                                                  
                                                                  function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im)
                                                                  	tmp = 1.0;
                                                                  end
                                                                  
                                                                  code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := 1.0
                                                                  
                                                                  \begin{array}{l}
                                                                  
                                                                  \\
                                                                  1
                                                                  \end{array}
                                                                  
                                                                  Derivation
                                                                  1. Initial program 36.6%

                                                                    \[e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \]
                                                                  2. Add Preprocessing
                                                                  3. Taylor expanded in y.im around 0

                                                                    \[\leadsto \color{blue}{\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}} \]
                                                                  4. Step-by-step derivation
                                                                    1. *-commutativeN/A

                                                                      \[\leadsto {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re} \cdot \color{blue}{\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
                                                                    2. *-lowering-*.f64N/A

                                                                      \[\leadsto \mathsf{*.f64}\left(\left({\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}\right), \color{blue}{\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\right) \]
                                                                    3. pow-lowering-pow.f64N/A

                                                                      \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right), y.re\right), \cos \color{blue}{\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\right) \]
                                                                    4. unpow2N/A

                                                                      \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right), y.re\right), \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
                                                                    5. unpow2N/A

                                                                      \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right), y.re\right), \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
                                                                    6. hypot-defineN/A

                                                                      \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\mathsf{hypot}\left(x.im, x.re\right)\right), y.re\right), \cos \left(\color{blue}{y.re} \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
                                                                    7. hypot-lowering-hypot.f64N/A

                                                                      \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \cos \left(\color{blue}{y.re} \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
                                                                    8. cos-lowering-cos.f64N/A

                                                                      \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \mathsf{cos.f64}\left(\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
                                                                    9. *-lowering-*.f64N/A

                                                                      \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
                                                                    10. atan2-lowering-atan2.f6456.7%

                                                                      \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
                                                                  5. Simplified56.7%

                                                                    \[\leadsto \color{blue}{{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \cdot \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
                                                                  6. Taylor expanded in y.re around 0

                                                                    \[\leadsto \color{blue}{1} \]
                                                                  7. Step-by-step derivation
                                                                    1. Simplified24.4%

                                                                      \[\leadsto \color{blue}{1} \]
                                                                    2. Add Preprocessing

                                                                    Reproduce

                                                                    ?
                                                                    herbie shell --seed 2024164 
                                                                    (FPCore (x.re x.im y.re y.im)
                                                                      :name "powComplex, real part"
                                                                      :precision binary64
                                                                      (* (exp (- (* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.re) (* (atan2 x.im x.re) y.im))) (cos (+ (* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.im) (* (atan2 x.im x.re) y.re)))))