powComplex, real part

Percentage Accurate: 41.1% → 77.8%
Time: 19.6s
Alternatives: 16
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 16 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: 41.1% 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: 77.8% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\ t_1 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\ t_2 := y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\ t_3 := x.re \cdot x.re + x.im \cdot x.im\\ t_4 := e^{y.re \cdot \log \left(\sqrt{t\_3}\right) - t\_1} \cdot \cos t\_2\\ t_5 := \cos t\_0\\ \mathbf{if}\;y.re \leq -3.4 \cdot 10^{+103}:\\ \;\;\;\;t\_4\\ \mathbf{elif}\;y.re \leq 1.8 \cdot 10^{+16}:\\ \;\;\;\;\frac{t\_5 - t\_2 \cdot \sin t\_0}{\frac{e^{t\_1}}{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}}\\ \mathbf{elif}\;y.re \leq 3 \cdot 10^{+195}:\\ \;\;\;\;t\_4\\ \mathbf{else}:\\ \;\;\;\;t\_5 \cdot {t\_3}^{\left(\frac{y.re}{2}\right)}\\ \end{array} \end{array} \]
(FPCore (x.re x.im y.re y.im)
 :precision binary64
 (let* ((t_0 (* y.re (atan2 x.im x.re)))
        (t_1 (* (atan2 x.im x.re) y.im))
        (t_2 (* y.im (log (hypot x.im x.re))))
        (t_3 (+ (* x.re x.re) (* x.im x.im)))
        (t_4 (* (exp (- (* y.re (log (sqrt t_3))) t_1)) (cos t_2)))
        (t_5 (cos t_0)))
   (if (<= y.re -3.4e+103)
     t_4
     (if (<= y.re 1.8e+16)
       (/ (- t_5 (* t_2 (sin t_0))) (/ (exp t_1) (pow (hypot x.re x.im) y.re)))
       (if (<= y.re 3e+195) t_4 (* t_5 (pow t_3 (/ 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 = y_46_re * atan2(x_46_im, x_46_re);
	double t_1 = atan2(x_46_im, x_46_re) * y_46_im;
	double t_2 = y_46_im * log(hypot(x_46_im, x_46_re));
	double t_3 = (x_46_re * x_46_re) + (x_46_im * x_46_im);
	double t_4 = exp(((y_46_re * log(sqrt(t_3))) - t_1)) * cos(t_2);
	double t_5 = cos(t_0);
	double tmp;
	if (y_46_re <= -3.4e+103) {
		tmp = t_4;
	} else if (y_46_re <= 1.8e+16) {
		tmp = (t_5 - (t_2 * sin(t_0))) / (exp(t_1) / pow(hypot(x_46_re, x_46_im), y_46_re));
	} else if (y_46_re <= 3e+195) {
		tmp = t_4;
	} else {
		tmp = t_5 * pow(t_3, (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 = y_46_re * Math.atan2(x_46_im, x_46_re);
	double t_1 = Math.atan2(x_46_im, x_46_re) * y_46_im;
	double t_2 = y_46_im * Math.log(Math.hypot(x_46_im, x_46_re));
	double t_3 = (x_46_re * x_46_re) + (x_46_im * x_46_im);
	double t_4 = Math.exp(((y_46_re * Math.log(Math.sqrt(t_3))) - t_1)) * Math.cos(t_2);
	double t_5 = Math.cos(t_0);
	double tmp;
	if (y_46_re <= -3.4e+103) {
		tmp = t_4;
	} else if (y_46_re <= 1.8e+16) {
		tmp = (t_5 - (t_2 * Math.sin(t_0))) / (Math.exp(t_1) / Math.pow(Math.hypot(x_46_re, x_46_im), y_46_re));
	} else if (y_46_re <= 3e+195) {
		tmp = t_4;
	} else {
		tmp = t_5 * Math.pow(t_3, (y_46_re / 2.0));
	}
	return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im):
	t_0 = y_46_re * math.atan2(x_46_im, x_46_re)
	t_1 = math.atan2(x_46_im, x_46_re) * y_46_im
	t_2 = y_46_im * math.log(math.hypot(x_46_im, x_46_re))
	t_3 = (x_46_re * x_46_re) + (x_46_im * x_46_im)
	t_4 = math.exp(((y_46_re * math.log(math.sqrt(t_3))) - t_1)) * math.cos(t_2)
	t_5 = math.cos(t_0)
	tmp = 0
	if y_46_re <= -3.4e+103:
		tmp = t_4
	elif y_46_re <= 1.8e+16:
		tmp = (t_5 - (t_2 * math.sin(t_0))) / (math.exp(t_1) / math.pow(math.hypot(x_46_re, x_46_im), y_46_re))
	elif y_46_re <= 3e+195:
		tmp = t_4
	else:
		tmp = t_5 * math.pow(t_3, (y_46_re / 2.0))
	return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im)
	t_0 = Float64(y_46_re * atan(x_46_im, x_46_re))
	t_1 = Float64(atan(x_46_im, x_46_re) * y_46_im)
	t_2 = Float64(y_46_im * log(hypot(x_46_im, x_46_re)))
	t_3 = Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))
	t_4 = Float64(exp(Float64(Float64(y_46_re * log(sqrt(t_3))) - t_1)) * cos(t_2))
	t_5 = cos(t_0)
	tmp = 0.0
	if (y_46_re <= -3.4e+103)
		tmp = t_4;
	elseif (y_46_re <= 1.8e+16)
		tmp = Float64(Float64(t_5 - Float64(t_2 * sin(t_0))) / Float64(exp(t_1) / (hypot(x_46_re, x_46_im) ^ y_46_re)));
	elseif (y_46_re <= 3e+195)
		tmp = t_4;
	else
		tmp = Float64(t_5 * (t_3 ^ 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 = y_46_re * atan2(x_46_im, x_46_re);
	t_1 = atan2(x_46_im, x_46_re) * y_46_im;
	t_2 = y_46_im * log(hypot(x_46_im, x_46_re));
	t_3 = (x_46_re * x_46_re) + (x_46_im * x_46_im);
	t_4 = exp(((y_46_re * log(sqrt(t_3))) - t_1)) * cos(t_2);
	t_5 = cos(t_0);
	tmp = 0.0;
	if (y_46_re <= -3.4e+103)
		tmp = t_4;
	elseif (y_46_re <= 1.8e+16)
		tmp = (t_5 - (t_2 * sin(t_0))) / (exp(t_1) / (hypot(x_46_re, x_46_im) ^ y_46_re));
	elseif (y_46_re <= 3e+195)
		tmp = t_4;
	else
		tmp = t_5 * (t_3 ^ (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[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, Block[{t$95$2 = N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[t$95$3], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]], $MachinePrecision] * N[Cos[t$95$2], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[Cos[t$95$0], $MachinePrecision]}, If[LessEqual[y$46$re, -3.4e+103], t$95$4, If[LessEqual[y$46$re, 1.8e+16], N[(N[(t$95$5 - N[(t$95$2 * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[Exp[t$95$1], $MachinePrecision] / N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 3e+195], t$95$4, N[(t$95$5 * N[Power[t$95$3, N[(y$46$re / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;y.re \leq 1.8 \cdot 10^{+16}:\\
\;\;\;\;\frac{t\_5 - t\_2 \cdot \sin t\_0}{\frac{e^{t\_1}}{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}}\\

\mathbf{elif}\;y.re \leq 3 \cdot 10^{+195}:\\
\;\;\;\;t\_4\\

\mathbf{else}:\\
\;\;\;\;t\_5 \cdot {t\_3}^{\left(\frac{y.re}{2}\right)}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y.re < -3.3999999999999998e103 or 1.8e16 < y.re < 3.0000000000000001e195

    1. Initial program 41.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.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.f6485.2%

        \[\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. Simplified85.2%

      \[\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 -3.3999999999999998e103 < y.re < 1.8e16

    1. Initial program 42.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. 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. Simplified85.3%

      \[\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.im around 0

      \[\leadsto \mathsf{/.f64}\left(\color{blue}{\left(\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) + -1 \cdot \left(y.im \cdot \left(\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right) \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{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) \]
    6. Step-by-step derivation
      1. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right), \left(-1 \cdot \left(y.im \cdot \left(\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right) \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\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. cos-lowering-cos.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{cos.f64}\left(\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right), \left(-1 \cdot \left(y.im \cdot \left(\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right) \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\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. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}\right)\right), \left(-1 \cdot \left(y.im \cdot \left(\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right) \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\color{blue}{\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) \]
      4. atan2-lowering-atan2.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \left(-1 \cdot \left(y.im \cdot \left(\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right) \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{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, \color{blue}{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. mul-1-negN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \left(\mathsf{neg}\left(y.im \cdot \left(\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right) \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{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) \]
      6. neg-lowering-neg.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{neg.f64}\left(\left(y.im \cdot \left(\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right) \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{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. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{neg.f64}\left(\left(\left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right) \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{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) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right), \sin \left(y.re \cdot \tan^{-1}_* \frac{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. Simplified86.4%

      \[\leadsto \frac{\color{blue}{\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) + \left(-\left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\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.0000000000000001e195 < y.re

    1. Initial program 47.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. *-lowering-*.f64N/A

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(\left(\mathsf{hypot}\left(x.im, x.re\right)\right), y.re\right)\right) \]
      9. hypot-lowering-hypot.f6479.0%

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

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

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

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

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

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

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

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

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

        \[\leadsto \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(\frac{y.re}{2}\right)\right), \cos \left(\color{blue}{y.re} \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \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(\frac{y.re}{2}\right)\right), \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \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}{2}\right)\right), \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
      11. /-lowering-/.f64N/A

        \[\leadsto \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), \cos \left(y.re \cdot \color{blue}{\tan^{-1}_* \frac{x.im}{x.re}}\right)\right) \]
      12. cos-lowering-cos.f64N/A

        \[\leadsto \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), \mathsf{cos.f64}\left(\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
      13. *-lowering-*.f64N/A

        \[\leadsto \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), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
      14. atan2-lowering-atan2.f6479.0%

        \[\leadsto \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), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
    7. Applied egg-rr79.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y.re \leq -3.4 \cdot 10^{+103}:\\ \;\;\;\;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 1.8 \cdot 10^{+16}:\\ \;\;\;\;\frac{\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) - \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \cdot \sin \left(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{elif}\;y.re \leq 3 \cdot 10^{+195}:\\ \;\;\;\;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{else}:\\ \;\;\;\;\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\left(\frac{y.re}{2}\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 2: 77.8% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\ t_1 := x.re \cdot x.re + x.im \cdot x.im\\ t_2 := e^{y.re \cdot \log \left(\sqrt{t\_1}\right) - t\_0} \cdot \cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\ t_3 := \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\ \mathbf{if}\;y.re \leq -3.3 \cdot 10^{+103}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;y.re \leq 8.2 \cdot 10^{+39}:\\ \;\;\;\;\frac{t\_3}{\frac{e^{t\_0}}{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}}\\ \mathbf{elif}\;y.re \leq 5 \cdot 10^{+195}:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;t\_3 \cdot {t\_1}^{\left(\frac{y.re}{2}\right)}\\ \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 (+ (* x.re x.re) (* x.im x.im)))
        (t_2
         (*
          (exp (- (* y.re (log (sqrt t_1))) t_0))
          (cos (* y.im (log (hypot x.im x.re))))))
        (t_3 (cos (* y.re (atan2 x.im x.re)))))
   (if (<= y.re -3.3e+103)
     t_2
     (if (<= y.re 8.2e+39)
       (/ t_3 (/ (exp t_0) (pow (hypot x.re x.im) y.re)))
       (if (<= y.re 5e+195) t_2 (* t_3 (pow t_1 (/ 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 = atan2(x_46_im, x_46_re) * y_46_im;
	double t_1 = (x_46_re * x_46_re) + (x_46_im * x_46_im);
	double t_2 = exp(((y_46_re * log(sqrt(t_1))) - t_0)) * cos((y_46_im * log(hypot(x_46_im, x_46_re))));
	double t_3 = cos((y_46_re * atan2(x_46_im, x_46_re)));
	double tmp;
	if (y_46_re <= -3.3e+103) {
		tmp = t_2;
	} else if (y_46_re <= 8.2e+39) {
		tmp = t_3 / (exp(t_0) / pow(hypot(x_46_re, x_46_im), y_46_re));
	} else if (y_46_re <= 5e+195) {
		tmp = t_2;
	} else {
		tmp = t_3 * pow(t_1, (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.atan2(x_46_im, x_46_re) * y_46_im;
	double t_1 = (x_46_re * x_46_re) + (x_46_im * x_46_im);
	double t_2 = Math.exp(((y_46_re * Math.log(Math.sqrt(t_1))) - t_0)) * Math.cos((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re))));
	double t_3 = Math.cos((y_46_re * Math.atan2(x_46_im, x_46_re)));
	double tmp;
	if (y_46_re <= -3.3e+103) {
		tmp = t_2;
	} else if (y_46_re <= 8.2e+39) {
		tmp = t_3 / (Math.exp(t_0) / Math.pow(Math.hypot(x_46_re, x_46_im), y_46_re));
	} else if (y_46_re <= 5e+195) {
		tmp = t_2;
	} else {
		tmp = t_3 * Math.pow(t_1, (y_46_re / 2.0));
	}
	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 = (x_46_re * x_46_re) + (x_46_im * x_46_im)
	t_2 = math.exp(((y_46_re * math.log(math.sqrt(t_1))) - t_0)) * math.cos((y_46_im * math.log(math.hypot(x_46_im, x_46_re))))
	t_3 = math.cos((y_46_re * math.atan2(x_46_im, x_46_re)))
	tmp = 0
	if y_46_re <= -3.3e+103:
		tmp = t_2
	elif y_46_re <= 8.2e+39:
		tmp = t_3 / (math.exp(t_0) / math.pow(math.hypot(x_46_re, x_46_im), y_46_re))
	elif y_46_re <= 5e+195:
		tmp = t_2
	else:
		tmp = t_3 * math.pow(t_1, (y_46_re / 2.0))
	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 = Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))
	t_2 = Float64(exp(Float64(Float64(y_46_re * log(sqrt(t_1))) - t_0)) * cos(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))))
	t_3 = cos(Float64(y_46_re * atan(x_46_im, x_46_re)))
	tmp = 0.0
	if (y_46_re <= -3.3e+103)
		tmp = t_2;
	elseif (y_46_re <= 8.2e+39)
		tmp = Float64(t_3 / Float64(exp(t_0) / (hypot(x_46_re, x_46_im) ^ y_46_re)));
	elseif (y_46_re <= 5e+195)
		tmp = t_2;
	else
		tmp = Float64(t_3 * (t_1 ^ 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 = atan2(x_46_im, x_46_re) * y_46_im;
	t_1 = (x_46_re * x_46_re) + (x_46_im * x_46_im);
	t_2 = exp(((y_46_re * log(sqrt(t_1))) - t_0)) * cos((y_46_im * log(hypot(x_46_im, x_46_re))));
	t_3 = cos((y_46_re * atan2(x_46_im, x_46_re)));
	tmp = 0.0;
	if (y_46_re <= -3.3e+103)
		tmp = t_2;
	elseif (y_46_re <= 8.2e+39)
		tmp = t_3 / (exp(t_0) / (hypot(x_46_re, x_46_im) ^ y_46_re));
	elseif (y_46_re <= 5e+195)
		tmp = t_2;
	else
		tmp = t_3 * (t_1 ^ (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[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[t$95$1], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision] * N[Cos[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[Cos[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -3.3e+103], t$95$2, If[LessEqual[y$46$re, 8.2e+39], N[(t$95$3 / N[(N[Exp[t$95$0], $MachinePrecision] / N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 5e+195], t$95$2, N[(t$95$3 * N[Power[t$95$1, N[(y$46$re / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;y.re \leq 8.2 \cdot 10^{+39}:\\
\;\;\;\;\frac{t\_3}{\frac{e^{t\_0}}{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}}\\

\mathbf{elif}\;y.re \leq 5 \cdot 10^{+195}:\\
\;\;\;\;t\_2\\

\mathbf{else}:\\
\;\;\;\;t\_3 \cdot {t\_1}^{\left(\frac{y.re}{2}\right)}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y.re < -3.30000000000000009e103 or 8.20000000000000008e39 < y.re < 4.9999999999999998e195

    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.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.6%

        \[\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.6%

      \[\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 -3.30000000000000009e103 < y.re < 8.20000000000000008e39

    1. Initial program 41.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. 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. Simplified83.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.im around 0

      \[\leadsto \mathsf{/.f64}\left(\color{blue}{\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\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.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\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.re, \tan^{-1}_* \frac{x.im}{x.re}\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. atan2-lowering-atan2.f6484.8%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\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) \]
    7. Simplified84.8%

      \[\leadsto \frac{\color{blue}{\cos \left(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}}} \]

    if 4.9999999999999998e195 < y.re

    1. Initial program 47.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. *-lowering-*.f64N/A

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(\left(\mathsf{hypot}\left(x.im, x.re\right)\right), y.re\right)\right) \]
      9. hypot-lowering-hypot.f6479.0%

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

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

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

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

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

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

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

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

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

        \[\leadsto \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(\frac{y.re}{2}\right)\right), \cos \left(\color{blue}{y.re} \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \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(\frac{y.re}{2}\right)\right), \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \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}{2}\right)\right), \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
      11. /-lowering-/.f64N/A

        \[\leadsto \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), \cos \left(y.re \cdot \color{blue}{\tan^{-1}_* \frac{x.im}{x.re}}\right)\right) \]
      12. cos-lowering-cos.f64N/A

        \[\leadsto \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), \mathsf{cos.f64}\left(\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
      13. *-lowering-*.f64N/A

        \[\leadsto \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), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
      14. atan2-lowering-atan2.f6479.0%

        \[\leadsto \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), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
    7. Applied egg-rr79.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y.re \leq -3.3 \cdot 10^{+103}:\\ \;\;\;\;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 8.2 \cdot 10^{+39}:\\ \;\;\;\;\frac{\cos \left(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{elif}\;y.re \leq 5 \cdot 10^{+195}:\\ \;\;\;\;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{else}:\\ \;\;\;\;\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\left(\frac{y.re}{2}\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 77.0% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := {\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\left(\frac{y.re}{2}\right)}\\ \mathbf{if}\;y.re \leq -1.3 \cdot 10^{+56}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;y.re \leq 4.8 \cdot 10^{+118}:\\ \;\;\;\;\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}:\\ \;\;\;\;\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot t\_0\\ \end{array} \end{array} \]
(FPCore (x.re x.im y.re y.im)
 :precision binary64
 (let* ((t_0 (pow (+ (* x.re x.re) (* x.im x.im)) (/ y.re 2.0))))
   (if (<= y.re -1.3e+56)
     t_0
     (if (<= y.re 4.8e+118)
       (/
        (cos (* y.im (log (hypot x.im x.re))))
        (/ (exp (* (atan2 x.im x.re) y.im)) (pow (hypot x.re x.im) y.re)))
       (* (cos (* y.re (atan2 x.im x.re))) 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_re) + (x_46_im * x_46_im)), (y_46_re / 2.0));
	double tmp;
	if (y_46_re <= -1.3e+56) {
		tmp = t_0;
	} else if (y_46_re <= 4.8e+118) {
		tmp = cos((y_46_im * log(hypot(x_46_im, x_46_re)))) / (exp((atan2(x_46_im, x_46_re) * y_46_im)) / pow(hypot(x_46_re, x_46_im), y_46_re));
	} else {
		tmp = cos((y_46_re * atan2(x_46_im, x_46_re))) * 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(((x_46_re * x_46_re) + (x_46_im * x_46_im)), (y_46_re / 2.0));
	double tmp;
	if (y_46_re <= -1.3e+56) {
		tmp = t_0;
	} else if (y_46_re <= 4.8e+118) {
		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)) / Math.pow(Math.hypot(x_46_re, x_46_im), y_46_re));
	} else {
		tmp = Math.cos((y_46_re * Math.atan2(x_46_im, x_46_re))) * 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_re) + (x_46_im * x_46_im)), (y_46_re / 2.0))
	tmp = 0
	if y_46_re <= -1.3e+56:
		tmp = t_0
	elif y_46_re <= 4.8e+118:
		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)) / math.pow(math.hypot(x_46_re, x_46_im), y_46_re))
	else:
		tmp = math.cos((y_46_re * math.atan2(x_46_im, x_46_re))) * t_0
	return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im)
	t_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 <= -1.3e+56)
		tmp = t_0;
	elseif (y_46_re <= 4.8e+118)
		tmp = Float64(cos(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) / Float64(exp(Float64(atan(x_46_im, x_46_re) * y_46_im)) / (hypot(x_46_re, x_46_im) ^ y_46_re)));
	else
		tmp = Float64(cos(Float64(y_46_re * atan(x_46_im, x_46_re))) * 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_re) + (x_46_im * x_46_im)) ^ (y_46_re / 2.0);
	tmp = 0.0;
	if (y_46_re <= -1.3e+56)
		tmp = t_0;
	elseif (y_46_re <= 4.8e+118)
		tmp = cos((y_46_im * log(hypot(x_46_im, x_46_re)))) / (exp((atan2(x_46_im, x_46_re) * y_46_im)) / (hypot(x_46_re, x_46_im) ^ y_46_re));
	else
		tmp = cos((y_46_re * atan2(x_46_im, x_46_re))) * 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[(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]}, If[LessEqual[y$46$re, -1.3e+56], t$95$0, If[LessEqual[y$46$re, 4.8e+118], N[(N[Cos[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]], $MachinePrecision] / N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Cos[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$0), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := {\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\left(\frac{y.re}{2}\right)}\\
\mathbf{if}\;y.re \leq -1.3 \cdot 10^{+56}:\\
\;\;\;\;t\_0\\

\mathbf{elif}\;y.re \leq 4.8 \cdot 10^{+118}:\\
\;\;\;\;\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}:\\
\;\;\;\;\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot t\_0\\


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

    1. Initial program 43.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 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. *-lowering-*.f64N/A

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(\left(\mathsf{hypot}\left(x.im, x.re\right)\right), y.re\right)\right) \]
      9. hypot-lowering-hypot.f6484.2%

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

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

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

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

          \[\leadsto {\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)}^{\color{blue}{y.re}} \]
        2. sqrt-pow2N/A

          \[\leadsto {\left(x.im \cdot x.im + x.re \cdot x.re\right)}^{\color{blue}{\left(\frac{y.re}{2}\right)}} \]
        3. +-commutativeN/A

          \[\leadsto {\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\left(\frac{\color{blue}{y.re}}{2}\right)} \]
        4. pow-lowering-pow.f64N/A

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

          \[\leadsto \mathsf{pow.f64}\left(\left(x.im \cdot x.im + x.re \cdot x.re\right), \left(\frac{\color{blue}{y.re}}{2}\right)\right) \]
        6. +-lowering-+.f64N/A

          \[\leadsto \mathsf{pow.f64}\left(\mathsf{+.f64}\left(\left(x.im \cdot x.im\right), \left(x.re \cdot x.re\right)\right), \left(\frac{\color{blue}{y.re}}{2}\right)\right) \]
        7. *-lowering-*.f64N/A

          \[\leadsto \mathsf{pow.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \left(x.re \cdot x.re\right)\right), \left(\frac{y.re}{2}\right)\right) \]
        8. *-lowering-*.f64N/A

          \[\leadsto \mathsf{pow.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \mathsf{*.f64}\left(x.re, x.re\right)\right), \left(\frac{y.re}{2}\right)\right) \]
        9. /-lowering-/.f6484.2%

          \[\leadsto \mathsf{pow.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \mathsf{*.f64}\left(x.re, x.re\right)\right), \mathsf{/.f64}\left(y.re, \color{blue}{2}\right)\right) \]
      3. Applied egg-rr84.2%

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

      if -1.30000000000000005e56 < y.re < 4.8e118

      1. Initial program 42.8%

        \[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. Simplified81.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.f6483.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. Simplified83.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}}} \]

      if 4.8e118 < y.re

      1. Initial program 43.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. *-lowering-*.f64N/A

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

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

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

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

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

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

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

          \[\leadsto \mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(\left(\mathsf{hypot}\left(x.im, x.re\right)\right), y.re\right)\right) \]
        9. hypot-lowering-hypot.f6479.3%

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

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

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

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

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

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

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

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

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

          \[\leadsto \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(\frac{y.re}{2}\right)\right), \cos \left(\color{blue}{y.re} \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
        9. *-lowering-*.f64N/A

          \[\leadsto \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(\frac{y.re}{2}\right)\right), \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
        10. *-lowering-*.f64N/A

          \[\leadsto \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}{2}\right)\right), \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
        11. /-lowering-/.f64N/A

          \[\leadsto \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), \cos \left(y.re \cdot \color{blue}{\tan^{-1}_* \frac{x.im}{x.re}}\right)\right) \]
        12. cos-lowering-cos.f64N/A

          \[\leadsto \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), \mathsf{cos.f64}\left(\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
        13. *-lowering-*.f64N/A

          \[\leadsto \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), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
        14. atan2-lowering-atan2.f6479.3%

          \[\leadsto \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), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
      7. Applied egg-rr79.3%

        \[\leadsto \color{blue}{{\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\left(\frac{y.re}{2}\right)} \cdot \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
    8. Recombined 3 regimes into one program.
    9. Final simplification82.6%

      \[\leadsto \begin{array}{l} \mathbf{if}\;y.re \leq -1.3 \cdot 10^{+56}:\\ \;\;\;\;{\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\left(\frac{y.re}{2}\right)}\\ \mathbf{elif}\;y.re \leq 4.8 \cdot 10^{+118}:\\ \;\;\;\;\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}:\\ \;\;\;\;\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\left(\frac{y.re}{2}\right)}\\ \end{array} \]
    10. Add Preprocessing

    Alternative 4: 75.9% accurate, 1.3× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_0 := \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\ t_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.3 \cdot 10^{+103}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y.re \leq 6.2:\\ \;\;\;\;\frac{t\_0}{\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}:\\ \;\;\;\;t\_0 \cdot t\_1\\ \end{array} \end{array} \]
    (FPCore (x.re x.im y.re y.im)
     :precision binary64
     (let* ((t_0 (cos (* y.re (atan2 x.im x.re))))
            (t_1 (pow (+ (* x.re x.re) (* x.im x.im)) (/ y.re 2.0))))
       (if (<= y.re -3.3e+103)
         t_1
         (if (<= y.re 6.2)
           (/
            t_0
            (/ (exp (* (atan2 x.im x.re) y.im)) (pow (hypot x.re x.im) y.re)))
           (* t_0 t_1)))))
    double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
    	double t_0 = cos((y_46_re * atan2(x_46_im, x_46_re)));
    	double t_1 = 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.3e+103) {
    		tmp = t_1;
    	} else if (y_46_re <= 6.2) {
    		tmp = t_0 / (exp((atan2(x_46_im, x_46_re) * y_46_im)) / pow(hypot(x_46_re, x_46_im), y_46_re));
    	} else {
    		tmp = t_0 * t_1;
    	}
    	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_re * Math.atan2(x_46_im, x_46_re)));
    	double t_1 = 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.3e+103) {
    		tmp = t_1;
    	} else if (y_46_re <= 6.2) {
    		tmp = t_0 / (Math.exp((Math.atan2(x_46_im, x_46_re) * y_46_im)) / Math.pow(Math.hypot(x_46_re, x_46_im), y_46_re));
    	} else {
    		tmp = t_0 * t_1;
    	}
    	return tmp;
    }
    
    def code(x_46_re, x_46_im, y_46_re, y_46_im):
    	t_0 = math.cos((y_46_re * math.atan2(x_46_im, x_46_re)))
    	t_1 = 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.3e+103:
    		tmp = t_1
    	elif y_46_re <= 6.2:
    		tmp = t_0 / (math.exp((math.atan2(x_46_im, x_46_re) * y_46_im)) / math.pow(math.hypot(x_46_re, x_46_im), y_46_re))
    	else:
    		tmp = t_0 * t_1
    	return tmp
    
    function code(x_46_re, x_46_im, y_46_re, y_46_im)
    	t_0 = cos(Float64(y_46_re * atan(x_46_im, x_46_re)))
    	t_1 = 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.3e+103)
    		tmp = t_1;
    	elseif (y_46_re <= 6.2)
    		tmp = Float64(t_0 / Float64(exp(Float64(atan(x_46_im, x_46_re) * y_46_im)) / (hypot(x_46_re, x_46_im) ^ y_46_re)));
    	else
    		tmp = Float64(t_0 * t_1);
    	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_re * atan2(x_46_im, x_46_re)));
    	t_1 = ((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.3e+103)
    		tmp = t_1;
    	elseif (y_46_re <= 6.2)
    		tmp = t_0 / (exp((atan2(x_46_im, x_46_re) * y_46_im)) / (hypot(x_46_re, x_46_im) ^ y_46_re));
    	else
    		tmp = t_0 * t_1;
    	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$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = 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]}, If[LessEqual[y$46$re, -3.3e+103], t$95$1, If[LessEqual[y$46$re, 6.2], N[(t$95$0 / N[(N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]], $MachinePrecision] / N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 * t$95$1), $MachinePrecision]]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_0 := \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
    t_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.3 \cdot 10^{+103}:\\
    \;\;\;\;t\_1\\
    
    \mathbf{elif}\;y.re \leq 6.2:\\
    \;\;\;\;\frac{t\_0}{\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}:\\
    \;\;\;\;t\_0 \cdot t\_1\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if y.re < -3.30000000000000009e103

      1. Initial program 43.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. *-lowering-*.f64N/A

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

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

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

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

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

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

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

          \[\leadsto \mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(\left(\mathsf{hypot}\left(x.im, x.re\right)\right), y.re\right)\right) \]
        9. hypot-lowering-hypot.f6482.2%

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

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

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

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

            \[\leadsto {\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)}^{\color{blue}{y.re}} \]
          2. sqrt-pow2N/A

            \[\leadsto {\left(x.im \cdot x.im + x.re \cdot x.re\right)}^{\color{blue}{\left(\frac{y.re}{2}\right)}} \]
          3. +-commutativeN/A

            \[\leadsto {\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\left(\frac{\color{blue}{y.re}}{2}\right)} \]
          4. pow-lowering-pow.f64N/A

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

            \[\leadsto \mathsf{pow.f64}\left(\left(x.im \cdot x.im + x.re \cdot x.re\right), \left(\frac{\color{blue}{y.re}}{2}\right)\right) \]
          6. +-lowering-+.f64N/A

            \[\leadsto \mathsf{pow.f64}\left(\mathsf{+.f64}\left(\left(x.im \cdot x.im\right), \left(x.re \cdot x.re\right)\right), \left(\frac{\color{blue}{y.re}}{2}\right)\right) \]
          7. *-lowering-*.f64N/A

            \[\leadsto \mathsf{pow.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \left(x.re \cdot x.re\right)\right), \left(\frac{y.re}{2}\right)\right) \]
          8. *-lowering-*.f64N/A

            \[\leadsto \mathsf{pow.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \mathsf{*.f64}\left(x.re, x.re\right)\right), \left(\frac{y.re}{2}\right)\right) \]
          9. /-lowering-/.f6484.8%

            \[\leadsto \mathsf{pow.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \mathsf{*.f64}\left(x.re, x.re\right)\right), \mathsf{/.f64}\left(y.re, \color{blue}{2}\right)\right) \]
        3. Applied egg-rr84.8%

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

        if -3.30000000000000009e103 < y.re < 6.20000000000000018

        1. Initial program 41.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. 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. Simplified85.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.im around 0

          \[\leadsto \mathsf{/.f64}\left(\color{blue}{\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\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.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\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.re, \tan^{-1}_* \frac{x.im}{x.re}\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. atan2-lowering-atan2.f6485.4%

            \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\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) \]
        7. Simplified85.4%

          \[\leadsto \frac{\color{blue}{\cos \left(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}}} \]

        if 6.20000000000000018 < y.re

        1. Initial program 44.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.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. *-lowering-*.f64N/A

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

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

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

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

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

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

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

            \[\leadsto \mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(\left(\mathsf{hypot}\left(x.im, x.re\right)\right), y.re\right)\right) \]
          9. hypot-lowering-hypot.f6475.1%

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

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

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

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

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

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

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

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

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

            \[\leadsto \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(\frac{y.re}{2}\right)\right), \cos \left(\color{blue}{y.re} \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
          9. *-lowering-*.f64N/A

            \[\leadsto \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(\frac{y.re}{2}\right)\right), \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
          10. *-lowering-*.f64N/A

            \[\leadsto \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}{2}\right)\right), \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
          11. /-lowering-/.f64N/A

            \[\leadsto \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), \cos \left(y.re \cdot \color{blue}{\tan^{-1}_* \frac{x.im}{x.re}}\right)\right) \]
          12. cos-lowering-cos.f64N/A

            \[\leadsto \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), \mathsf{cos.f64}\left(\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
          13. *-lowering-*.f64N/A

            \[\leadsto \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), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
          14. atan2-lowering-atan2.f6475.1%

            \[\leadsto \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), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
        7. Applied egg-rr75.1%

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;y.re \leq -3.3 \cdot 10^{+103}:\\ \;\;\;\;{\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\left(\frac{y.re}{2}\right)}\\ \mathbf{elif}\;y.re \leq 6.2:\\ \;\;\;\;\frac{\cos \left(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}:\\ \;\;\;\;\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\left(\frac{y.re}{2}\right)}\\ \end{array} \]
      10. Add Preprocessing

      Alternative 5: 75.0% accurate, 2.6× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_0 := x.re \cdot x.re + x.im \cdot x.im\\ t_1 := t\_0 \cdot t\_0\\ \mathbf{if}\;y.re \leq -0.035:\\ \;\;\;\;{\left(t\_1 \cdot t\_1\right)}^{\left(y.re \cdot 0.125\right)}\\ \mathbf{elif}\;y.re \leq 2.2 \cdot 10^{+33}:\\ \;\;\;\;\frac{1}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\\ \mathbf{else}:\\ \;\;\;\;\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {t\_0}^{\left(\frac{y.re}{2}\right)}\\ \end{array} \end{array} \]
      (FPCore (x.re x.im y.re y.im)
       :precision binary64
       (let* ((t_0 (+ (* x.re x.re) (* x.im x.im))) (t_1 (* t_0 t_0)))
         (if (<= y.re -0.035)
           (pow (* t_1 t_1) (* y.re 0.125))
           (if (<= y.re 2.2e+33)
             (/ 1.0 (exp (* (atan2 x.im x.re) y.im)))
             (* (cos (* y.re (atan2 x.im x.re))) (pow t_0 (/ 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 = (x_46_re * x_46_re) + (x_46_im * x_46_im);
      	double t_1 = t_0 * t_0;
      	double tmp;
      	if (y_46_re <= -0.035) {
      		tmp = pow((t_1 * t_1), (y_46_re * 0.125));
      	} else if (y_46_re <= 2.2e+33) {
      		tmp = 1.0 / exp((atan2(x_46_im, x_46_re) * y_46_im));
      	} else {
      		tmp = cos((y_46_re * atan2(x_46_im, x_46_re))) * pow(t_0, (y_46_re / 2.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) :: t_1
          real(8) :: tmp
          t_0 = (x_46re * x_46re) + (x_46im * x_46im)
          t_1 = t_0 * t_0
          if (y_46re <= (-0.035d0)) then
              tmp = (t_1 * t_1) ** (y_46re * 0.125d0)
          else if (y_46re <= 2.2d+33) then
              tmp = 1.0d0 / exp((atan2(x_46im, x_46re) * y_46im))
          else
              tmp = cos((y_46re * atan2(x_46im, x_46re))) * (t_0 ** (y_46re / 2.0d0))
          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 = (x_46_re * x_46_re) + (x_46_im * x_46_im);
      	double t_1 = t_0 * t_0;
      	double tmp;
      	if (y_46_re <= -0.035) {
      		tmp = Math.pow((t_1 * t_1), (y_46_re * 0.125));
      	} else if (y_46_re <= 2.2e+33) {
      		tmp = 1.0 / Math.exp((Math.atan2(x_46_im, x_46_re) * y_46_im));
      	} else {
      		tmp = Math.cos((y_46_re * Math.atan2(x_46_im, x_46_re))) * Math.pow(t_0, (y_46_re / 2.0));
      	}
      	return tmp;
      }
      
      def code(x_46_re, x_46_im, y_46_re, y_46_im):
      	t_0 = (x_46_re * x_46_re) + (x_46_im * x_46_im)
      	t_1 = t_0 * t_0
      	tmp = 0
      	if y_46_re <= -0.035:
      		tmp = math.pow((t_1 * t_1), (y_46_re * 0.125))
      	elif y_46_re <= 2.2e+33:
      		tmp = 1.0 / math.exp((math.atan2(x_46_im, x_46_re) * y_46_im))
      	else:
      		tmp = math.cos((y_46_re * math.atan2(x_46_im, x_46_re))) * math.pow(t_0, (y_46_re / 2.0))
      	return tmp
      
      function code(x_46_re, x_46_im, y_46_re, y_46_im)
      	t_0 = Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))
      	t_1 = Float64(t_0 * t_0)
      	tmp = 0.0
      	if (y_46_re <= -0.035)
      		tmp = Float64(t_1 * t_1) ^ Float64(y_46_re * 0.125);
      	elseif (y_46_re <= 2.2e+33)
      		tmp = Float64(1.0 / exp(Float64(atan(x_46_im, x_46_re) * y_46_im)));
      	else
      		tmp = Float64(cos(Float64(y_46_re * atan(x_46_im, x_46_re))) * (t_0 ^ 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 = (x_46_re * x_46_re) + (x_46_im * x_46_im);
      	t_1 = t_0 * t_0;
      	tmp = 0.0;
      	if (y_46_re <= -0.035)
      		tmp = (t_1 * t_1) ^ (y_46_re * 0.125);
      	elseif (y_46_re <= 2.2e+33)
      		tmp = 1.0 / exp((atan2(x_46_im, x_46_re) * y_46_im));
      	else
      		tmp = cos((y_46_re * atan2(x_46_im, x_46_re))) * (t_0 ^ (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[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(t$95$0 * t$95$0), $MachinePrecision]}, If[LessEqual[y$46$re, -0.035], N[Power[N[(t$95$1 * t$95$1), $MachinePrecision], N[(y$46$re * 0.125), $MachinePrecision]], $MachinePrecision], If[LessEqual[y$46$re, 2.2e+33], N[(1.0 / N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Cos[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Power[t$95$0, N[(y$46$re / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_0 := x.re \cdot x.re + x.im \cdot x.im\\
      t_1 := t\_0 \cdot t\_0\\
      \mathbf{if}\;y.re \leq -0.035:\\
      \;\;\;\;{\left(t\_1 \cdot t\_1\right)}^{\left(y.re \cdot 0.125\right)}\\
      
      \mathbf{elif}\;y.re \leq 2.2 \cdot 10^{+33}:\\
      \;\;\;\;\frac{1}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\\
      
      \mathbf{else}:\\
      \;\;\;\;\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {t\_0}^{\left(\frac{y.re}{2}\right)}\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 3 regimes
      2. if y.re < -0.035000000000000003

        1. Initial program 49.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. *-lowering-*.f64N/A

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

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

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

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

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

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

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

            \[\leadsto \mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(\left(\mathsf{hypot}\left(x.im, x.re\right)\right), y.re\right)\right) \]
          9. hypot-lowering-hypot.f6486.1%

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

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

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

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

              \[\leadsto {\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)}^{\color{blue}{y.re}} \]
            2. pow1/2N/A

              \[\leadsto {\left({\left(x.im \cdot x.im + x.re \cdot x.re\right)}^{\frac{1}{2}}\right)}^{y.re} \]
            3. +-commutativeN/A

              \[\leadsto {\left({\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\frac{1}{2}}\right)}^{y.re} \]
            4. metadata-evalN/A

              \[\leadsto {\left({\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\left(2 \cdot \frac{1}{4}\right)}\right)}^{y.re} \]
            5. pow-sqrN/A

              \[\leadsto {\left({\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\frac{1}{4}} \cdot {\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\frac{1}{4}}\right)}^{y.re} \]
            6. pow-prod-downN/A

              \[\leadsto {\left({\left(\left(x.re \cdot x.re + x.im \cdot x.im\right) \cdot \left(x.re \cdot x.re + x.im \cdot x.im\right)\right)}^{\frac{1}{4}}\right)}^{y.re} \]
            7. pow-unpowN/A

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

              \[\leadsto {\left(\left(x.re \cdot x.re + x.im \cdot x.im\right) \cdot \left(x.re \cdot x.re + x.im \cdot x.im\right)\right)}^{\left(y.re \cdot \color{blue}{\frac{1}{4}}\right)} \]
            9. sqr-powN/A

              \[\leadsto {\left(\left(x.re \cdot x.re + x.im \cdot x.im\right) \cdot \left(x.re \cdot x.re + x.im \cdot x.im\right)\right)}^{\left(\frac{y.re \cdot \frac{1}{4}}{2}\right)} \cdot \color{blue}{{\left(\left(x.re \cdot x.re + x.im \cdot x.im\right) \cdot \left(x.re \cdot x.re + x.im \cdot x.im\right)\right)}^{\left(\frac{y.re \cdot \frac{1}{4}}{2}\right)}} \]
            10. pow-prod-downN/A

              \[\leadsto {\left(\left(\left(x.re \cdot x.re + x.im \cdot x.im\right) \cdot \left(x.re \cdot x.re + x.im \cdot x.im\right)\right) \cdot \left(\left(x.re \cdot x.re + x.im \cdot x.im\right) \cdot \left(x.re \cdot x.re + x.im \cdot x.im\right)\right)\right)}^{\color{blue}{\left(\frac{y.re \cdot \frac{1}{4}}{2}\right)}} \]
            11. pow-lowering-pow.f64N/A

              \[\leadsto \mathsf{pow.f64}\left(\left(\left(\left(x.re \cdot x.re + x.im \cdot x.im\right) \cdot \left(x.re \cdot x.re + x.im \cdot x.im\right)\right) \cdot \left(\left(x.re \cdot x.re + x.im \cdot x.im\right) \cdot \left(x.re \cdot x.re + x.im \cdot x.im\right)\right)\right), \color{blue}{\left(\frac{y.re \cdot \frac{1}{4}}{2}\right)}\right) \]
          3. Applied egg-rr87.8%

            \[\leadsto \color{blue}{{\left(\left(\left(x.im \cdot x.im + x.re \cdot x.re\right) \cdot \left(x.im \cdot x.im + x.re \cdot x.re\right)\right) \cdot \left(\left(x.im \cdot x.im + x.re \cdot x.re\right) \cdot \left(x.im \cdot x.im + x.re \cdot x.re\right)\right)\right)}^{\left(y.re \cdot 0.125\right)}} \]

          if -0.035000000000000003 < y.re < 2.19999999999999994e33

          1. Initial program 39.5%

            \[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. Simplified82.0%

            \[\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.im around 0

            \[\leadsto \mathsf{/.f64}\left(\color{blue}{\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\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.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\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.re, \tan^{-1}_* \frac{x.im}{x.re}\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. atan2-lowering-atan2.f6482.5%

              \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\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) \]
          7. Simplified82.5%

            \[\leadsto \frac{\color{blue}{\cos \left(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}}} \]
          8. Step-by-step derivation
            1. associate-/r/N/A

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

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

              \[\leadsto \frac{\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\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 \color{blue}{y.im}}} \]
            4. +-commutativeN/A

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

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

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

              \[\leadsto \mathsf{/.f64}\left(\left(\mathsf{neg}\left(\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)}^{y.re}\right)\right), \color{blue}{\left(\mathsf{neg}\left(e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\right)\right)}\right) \]
          9. Applied egg-rr52.3%

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

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

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

            if 2.19999999999999994e33 < y.re

            1. Initial program 44.3%

              \[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. *-lowering-*.f64N/A

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

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

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

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

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

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

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

                \[\leadsto \mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(\left(\mathsf{hypot}\left(x.im, x.re\right)\right), y.re\right)\right) \]
              9. hypot-lowering-hypot.f6475.8%

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

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

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

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

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

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

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

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

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

                \[\leadsto \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(\frac{y.re}{2}\right)\right), \cos \left(\color{blue}{y.re} \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
              9. *-lowering-*.f64N/A

                \[\leadsto \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(\frac{y.re}{2}\right)\right), \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
              10. *-lowering-*.f64N/A

                \[\leadsto \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}{2}\right)\right), \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
              11. /-lowering-/.f64N/A

                \[\leadsto \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), \cos \left(y.re \cdot \color{blue}{\tan^{-1}_* \frac{x.im}{x.re}}\right)\right) \]
              12. cos-lowering-cos.f64N/A

                \[\leadsto \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), \mathsf{cos.f64}\left(\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
              13. *-lowering-*.f64N/A

                \[\leadsto \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), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
              14. atan2-lowering-atan2.f6475.8%

                \[\leadsto \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), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
            7. Applied egg-rr75.8%

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

            \[\leadsto \begin{array}{l} \mathbf{if}\;y.re \leq -0.035:\\ \;\;\;\;{\left(\left(\left(x.re \cdot x.re + x.im \cdot x.im\right) \cdot \left(x.re \cdot x.re + x.im \cdot x.im\right)\right) \cdot \left(\left(x.re \cdot x.re + x.im \cdot x.im\right) \cdot \left(x.re \cdot x.re + x.im \cdot x.im\right)\right)\right)}^{\left(y.re \cdot 0.125\right)}\\ \mathbf{elif}\;y.re \leq 2.2 \cdot 10^{+33}:\\ \;\;\;\;\frac{1}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\\ \mathbf{else}:\\ \;\;\;\;\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\left(\frac{y.re}{2}\right)}\\ \end{array} \]
          14. Add Preprocessing

          Alternative 6: 75.8% accurate, 3.8× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} t_0 := x.re \cdot x.re + x.im \cdot x.im\\ t_1 := t\_0 \cdot t\_0\\ \mathbf{if}\;y.re \leq -0.004:\\ \;\;\;\;{\left(t\_1 \cdot t\_1\right)}^{\left(y.re \cdot 0.125\right)}\\ \mathbf{elif}\;y.re \leq 7 \cdot 10^{+58}:\\ \;\;\;\;\frac{1}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\\ \mathbf{else}:\\ \;\;\;\;{t\_1}^{\left(\frac{y.re}{4}\right)}\\ \end{array} \end{array} \]
          (FPCore (x.re x.im y.re y.im)
           :precision binary64
           (let* ((t_0 (+ (* x.re x.re) (* x.im x.im))) (t_1 (* t_0 t_0)))
             (if (<= y.re -0.004)
               (pow (* t_1 t_1) (* y.re 0.125))
               (if (<= y.re 7e+58)
                 (/ 1.0 (exp (* (atan2 x.im x.re) y.im)))
                 (pow t_1 (/ y.re 4.0))))))
          double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
          	double t_0 = (x_46_re * x_46_re) + (x_46_im * x_46_im);
          	double t_1 = t_0 * t_0;
          	double tmp;
          	if (y_46_re <= -0.004) {
          		tmp = pow((t_1 * t_1), (y_46_re * 0.125));
          	} else if (y_46_re <= 7e+58) {
          		tmp = 1.0 / exp((atan2(x_46_im, x_46_re) * y_46_im));
          	} else {
          		tmp = pow(t_1, (y_46_re / 4.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) :: t_1
              real(8) :: tmp
              t_0 = (x_46re * x_46re) + (x_46im * x_46im)
              t_1 = t_0 * t_0
              if (y_46re <= (-0.004d0)) then
                  tmp = (t_1 * t_1) ** (y_46re * 0.125d0)
              else if (y_46re <= 7d+58) then
                  tmp = 1.0d0 / exp((atan2(x_46im, x_46re) * y_46im))
              else
                  tmp = t_1 ** (y_46re / 4.0d0)
              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 = (x_46_re * x_46_re) + (x_46_im * x_46_im);
          	double t_1 = t_0 * t_0;
          	double tmp;
          	if (y_46_re <= -0.004) {
          		tmp = Math.pow((t_1 * t_1), (y_46_re * 0.125));
          	} else if (y_46_re <= 7e+58) {
          		tmp = 1.0 / Math.exp((Math.atan2(x_46_im, x_46_re) * y_46_im));
          	} else {
          		tmp = Math.pow(t_1, (y_46_re / 4.0));
          	}
          	return tmp;
          }
          
          def code(x_46_re, x_46_im, y_46_re, y_46_im):
          	t_0 = (x_46_re * x_46_re) + (x_46_im * x_46_im)
          	t_1 = t_0 * t_0
          	tmp = 0
          	if y_46_re <= -0.004:
          		tmp = math.pow((t_1 * t_1), (y_46_re * 0.125))
          	elif y_46_re <= 7e+58:
          		tmp = 1.0 / math.exp((math.atan2(x_46_im, x_46_re) * y_46_im))
          	else:
          		tmp = math.pow(t_1, (y_46_re / 4.0))
          	return tmp
          
          function code(x_46_re, x_46_im, y_46_re, y_46_im)
          	t_0 = Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))
          	t_1 = Float64(t_0 * t_0)
          	tmp = 0.0
          	if (y_46_re <= -0.004)
          		tmp = Float64(t_1 * t_1) ^ Float64(y_46_re * 0.125);
          	elseif (y_46_re <= 7e+58)
          		tmp = Float64(1.0 / exp(Float64(atan(x_46_im, x_46_re) * y_46_im)));
          	else
          		tmp = t_1 ^ Float64(y_46_re / 4.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_re) + (x_46_im * x_46_im);
          	t_1 = t_0 * t_0;
          	tmp = 0.0;
          	if (y_46_re <= -0.004)
          		tmp = (t_1 * t_1) ^ (y_46_re * 0.125);
          	elseif (y_46_re <= 7e+58)
          		tmp = 1.0 / exp((atan2(x_46_im, x_46_re) * y_46_im));
          	else
          		tmp = t_1 ^ (y_46_re / 4.0);
          	end
          	tmp_2 = tmp;
          end
          
          code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(t$95$0 * t$95$0), $MachinePrecision]}, If[LessEqual[y$46$re, -0.004], N[Power[N[(t$95$1 * t$95$1), $MachinePrecision], N[(y$46$re * 0.125), $MachinePrecision]], $MachinePrecision], If[LessEqual[y$46$re, 7e+58], N[(1.0 / N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[Power[t$95$1, N[(y$46$re / 4.0), $MachinePrecision]], $MachinePrecision]]]]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          t_0 := x.re \cdot x.re + x.im \cdot x.im\\
          t_1 := t\_0 \cdot t\_0\\
          \mathbf{if}\;y.re \leq -0.004:\\
          \;\;\;\;{\left(t\_1 \cdot t\_1\right)}^{\left(y.re \cdot 0.125\right)}\\
          
          \mathbf{elif}\;y.re \leq 7 \cdot 10^{+58}:\\
          \;\;\;\;\frac{1}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\\
          
          \mathbf{else}:\\
          \;\;\;\;{t\_1}^{\left(\frac{y.re}{4}\right)}\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 3 regimes
          2. if y.re < -0.0040000000000000001

            1. Initial program 49.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. *-lowering-*.f64N/A

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

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

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

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

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

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

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

                \[\leadsto \mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(\left(\mathsf{hypot}\left(x.im, x.re\right)\right), y.re\right)\right) \]
              9. hypot-lowering-hypot.f6486.1%

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

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

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

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

                  \[\leadsto {\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)}^{\color{blue}{y.re}} \]
                2. pow1/2N/A

                  \[\leadsto {\left({\left(x.im \cdot x.im + x.re \cdot x.re\right)}^{\frac{1}{2}}\right)}^{y.re} \]
                3. +-commutativeN/A

                  \[\leadsto {\left({\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\frac{1}{2}}\right)}^{y.re} \]
                4. metadata-evalN/A

                  \[\leadsto {\left({\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\left(2 \cdot \frac{1}{4}\right)}\right)}^{y.re} \]
                5. pow-sqrN/A

                  \[\leadsto {\left({\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\frac{1}{4}} \cdot {\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\frac{1}{4}}\right)}^{y.re} \]
                6. pow-prod-downN/A

                  \[\leadsto {\left({\left(\left(x.re \cdot x.re + x.im \cdot x.im\right) \cdot \left(x.re \cdot x.re + x.im \cdot x.im\right)\right)}^{\frac{1}{4}}\right)}^{y.re} \]
                7. pow-unpowN/A

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

                  \[\leadsto {\left(\left(x.re \cdot x.re + x.im \cdot x.im\right) \cdot \left(x.re \cdot x.re + x.im \cdot x.im\right)\right)}^{\left(y.re \cdot \color{blue}{\frac{1}{4}}\right)} \]
                9. sqr-powN/A

                  \[\leadsto {\left(\left(x.re \cdot x.re + x.im \cdot x.im\right) \cdot \left(x.re \cdot x.re + x.im \cdot x.im\right)\right)}^{\left(\frac{y.re \cdot \frac{1}{4}}{2}\right)} \cdot \color{blue}{{\left(\left(x.re \cdot x.re + x.im \cdot x.im\right) \cdot \left(x.re \cdot x.re + x.im \cdot x.im\right)\right)}^{\left(\frac{y.re \cdot \frac{1}{4}}{2}\right)}} \]
                10. pow-prod-downN/A

                  \[\leadsto {\left(\left(\left(x.re \cdot x.re + x.im \cdot x.im\right) \cdot \left(x.re \cdot x.re + x.im \cdot x.im\right)\right) \cdot \left(\left(x.re \cdot x.re + x.im \cdot x.im\right) \cdot \left(x.re \cdot x.re + x.im \cdot x.im\right)\right)\right)}^{\color{blue}{\left(\frac{y.re \cdot \frac{1}{4}}{2}\right)}} \]
                11. pow-lowering-pow.f64N/A

                  \[\leadsto \mathsf{pow.f64}\left(\left(\left(\left(x.re \cdot x.re + x.im \cdot x.im\right) \cdot \left(x.re \cdot x.re + x.im \cdot x.im\right)\right) \cdot \left(\left(x.re \cdot x.re + x.im \cdot x.im\right) \cdot \left(x.re \cdot x.re + x.im \cdot x.im\right)\right)\right), \color{blue}{\left(\frac{y.re \cdot \frac{1}{4}}{2}\right)}\right) \]
              3. Applied egg-rr87.8%

                \[\leadsto \color{blue}{{\left(\left(\left(x.im \cdot x.im + x.re \cdot x.re\right) \cdot \left(x.im \cdot x.im + x.re \cdot x.re\right)\right) \cdot \left(\left(x.im \cdot x.im + x.re \cdot x.re\right) \cdot \left(x.im \cdot x.im + x.re \cdot x.re\right)\right)\right)}^{\left(y.re \cdot 0.125\right)}} \]

              if -0.0040000000000000001 < y.re < 6.9999999999999995e58

              1. Initial program 40.3%

                \[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. Simplified81.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.im around 0

                \[\leadsto \mathsf{/.f64}\left(\color{blue}{\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\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.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\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.re, \tan^{-1}_* \frac{x.im}{x.re}\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. atan2-lowering-atan2.f6481.7%

                  \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\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) \]
              7. Simplified81.7%

                \[\leadsto \frac{\color{blue}{\cos \left(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}}} \]
              8. Step-by-step derivation
                1. associate-/r/N/A

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

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

                  \[\leadsto \frac{\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\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 \color{blue}{y.im}}} \]
                4. +-commutativeN/A

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

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

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

                  \[\leadsto \mathsf{/.f64}\left(\left(\mathsf{neg}\left(\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)}^{y.re}\right)\right), \color{blue}{\left(\mathsf{neg}\left(e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\right)\right)}\right) \]
              9. Applied egg-rr51.1%

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

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

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

                if 6.9999999999999995e58 < y.re

                1. Initial program 43.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. *-lowering-*.f64N/A

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

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

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

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

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

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

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

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(\left(\mathsf{hypot}\left(x.im, x.re\right)\right), y.re\right)\right) \]
                  9. hypot-lowering-hypot.f6477.0%

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

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

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

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

                      \[\leadsto {\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)}^{\color{blue}{y.re}} \]
                    2. pow1/2N/A

                      \[\leadsto {\left({\left(x.im \cdot x.im + x.re \cdot x.re\right)}^{\frac{1}{2}}\right)}^{y.re} \]
                    3. +-commutativeN/A

                      \[\leadsto {\left({\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\frac{1}{2}}\right)}^{y.re} \]
                    4. metadata-evalN/A

                      \[\leadsto {\left({\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\left(2 \cdot \frac{1}{4}\right)}\right)}^{y.re} \]
                    5. pow-sqrN/A

                      \[\leadsto {\left({\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\frac{1}{4}} \cdot {\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\frac{1}{4}}\right)}^{y.re} \]
                    6. pow-prod-downN/A

                      \[\leadsto {\left({\left(\left(x.re \cdot x.re + x.im \cdot x.im\right) \cdot \left(x.re \cdot x.re + x.im \cdot x.im\right)\right)}^{\frac{1}{4}}\right)}^{y.re} \]
                    7. pow-unpowN/A

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

                      \[\leadsto {\left(\left(x.re \cdot x.re + x.im \cdot x.im\right) \cdot \left(x.re \cdot x.re + x.im \cdot x.im\right)\right)}^{\left(y.re \cdot \color{blue}{\frac{1}{4}}\right)} \]
                    9. pow-lowering-pow.f64N/A

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

                      \[\leadsto \mathsf{pow.f64}\left(\mathsf{*.f64}\left(\left(x.re \cdot x.re + x.im \cdot x.im\right), \left(x.re \cdot x.re + x.im \cdot x.im\right)\right), \left(\color{blue}{y.re} \cdot \frac{1}{4}\right)\right) \]
                    11. +-commutativeN/A

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

                      \[\leadsto \mathsf{pow.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\left(x.im \cdot x.im\right), \left(x.re \cdot x.re\right)\right), \left(x.re \cdot x.re + x.im \cdot x.im\right)\right), \left(y.re \cdot \frac{1}{4}\right)\right) \]
                    13. *-lowering-*.f64N/A

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

                      \[\leadsto \mathsf{pow.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \mathsf{*.f64}\left(x.re, x.re\right)\right), \left(x.re \cdot x.re + x.im \cdot x.im\right)\right), \left(y.re \cdot \frac{1}{4}\right)\right) \]
                    15. +-commutativeN/A

                      \[\leadsto \mathsf{pow.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \mathsf{*.f64}\left(x.re, x.re\right)\right), \left(x.im \cdot x.im + x.re \cdot x.re\right)\right), \left(y.re \cdot \frac{1}{4}\right)\right) \]
                    16. +-lowering-+.f64N/A

                      \[\leadsto \mathsf{pow.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \mathsf{*.f64}\left(x.re, x.re\right)\right), \mathsf{+.f64}\left(\left(x.im \cdot x.im\right), \left(x.re \cdot x.re\right)\right)\right), \left(y.re \cdot \frac{1}{4}\right)\right) \]
                    17. *-lowering-*.f64N/A

                      \[\leadsto \mathsf{pow.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \mathsf{*.f64}\left(x.re, x.re\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \left(x.re \cdot x.re\right)\right)\right), \left(y.re \cdot \frac{1}{4}\right)\right) \]
                    18. *-lowering-*.f64N/A

                      \[\leadsto \mathsf{pow.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \mathsf{*.f64}\left(x.re, x.re\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \mathsf{*.f64}\left(x.re, x.re\right)\right)\right), \left(y.re \cdot \frac{1}{4}\right)\right) \]
                    19. metadata-evalN/A

                      \[\leadsto \mathsf{pow.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \mathsf{*.f64}\left(x.re, x.re\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \mathsf{*.f64}\left(x.re, x.re\right)\right)\right), \left(y.re \cdot \frac{1}{\color{blue}{4}}\right)\right) \]
                    20. metadata-evalN/A

                      \[\leadsto \mathsf{pow.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \mathsf{*.f64}\left(x.re, x.re\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \mathsf{*.f64}\left(x.re, x.re\right)\right)\right), \left(y.re \cdot \frac{1}{2 + \color{blue}{2}}\right)\right) \]
                  3. Applied egg-rr75.4%

                    \[\leadsto \color{blue}{{\left(\left(x.im \cdot x.im + x.re \cdot x.re\right) \cdot \left(x.im \cdot x.im + x.re \cdot x.re\right)\right)}^{\left(\frac{y.re}{4}\right)}} \]
                8. Recombined 3 regimes into one program.
                9. Final simplification80.0%

                  \[\leadsto \begin{array}{l} \mathbf{if}\;y.re \leq -0.004:\\ \;\;\;\;{\left(\left(\left(x.re \cdot x.re + x.im \cdot x.im\right) \cdot \left(x.re \cdot x.re + x.im \cdot x.im\right)\right) \cdot \left(\left(x.re \cdot x.re + x.im \cdot x.im\right) \cdot \left(x.re \cdot x.re + x.im \cdot x.im\right)\right)\right)}^{\left(y.re \cdot 0.125\right)}\\ \mathbf{elif}\;y.re \leq 7 \cdot 10^{+58}:\\ \;\;\;\;\frac{1}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\\ \mathbf{else}:\\ \;\;\;\;{\left(\left(x.re \cdot x.re + x.im \cdot x.im\right) \cdot \left(x.re \cdot x.re + x.im \cdot x.im\right)\right)}^{\left(\frac{y.re}{4}\right)}\\ \end{array} \]
                10. Add Preprocessing

                Alternative 7: 77.1% accurate, 3.8× speedup?

                \[\begin{array}{l} \\ \begin{array}{l} t_0 := x.re \cdot x.re + x.im \cdot x.im\\ \mathbf{if}\;y.re \leq -1.8:\\ \;\;\;\;{t\_0}^{\left(\frac{y.re}{2}\right)}\\ \mathbf{elif}\;y.re \leq 1.6:\\ \;\;\;\;e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(0 - y.im\right)}\\ \mathbf{else}:\\ \;\;\;\;{\left(t\_0 \cdot t\_0\right)}^{\left(\frac{y.re}{4}\right)}\\ \end{array} \end{array} \]
                (FPCore (x.re x.im y.re y.im)
                 :precision binary64
                 (let* ((t_0 (+ (* x.re x.re) (* x.im x.im))))
                   (if (<= y.re -1.8)
                     (pow t_0 (/ y.re 2.0))
                     (if (<= y.re 1.6)
                       (exp (* (atan2 x.im x.re) (- 0.0 y.im)))
                       (pow (* t_0 t_0) (/ y.re 4.0))))))
                double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
                	double t_0 = (x_46_re * x_46_re) + (x_46_im * x_46_im);
                	double tmp;
                	if (y_46_re <= -1.8) {
                		tmp = pow(t_0, (y_46_re / 2.0));
                	} else if (y_46_re <= 1.6) {
                		tmp = exp((atan2(x_46_im, x_46_re) * (0.0 - y_46_im)));
                	} else {
                		tmp = pow((t_0 * t_0), (y_46_re / 4.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_46re) + (x_46im * x_46im)
                    if (y_46re <= (-1.8d0)) then
                        tmp = t_0 ** (y_46re / 2.0d0)
                    else if (y_46re <= 1.6d0) then
                        tmp = exp((atan2(x_46im, x_46re) * (0.0d0 - y_46im)))
                    else
                        tmp = (t_0 * t_0) ** (y_46re / 4.0d0)
                    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 = (x_46_re * x_46_re) + (x_46_im * x_46_im);
                	double tmp;
                	if (y_46_re <= -1.8) {
                		tmp = Math.pow(t_0, (y_46_re / 2.0));
                	} else if (y_46_re <= 1.6) {
                		tmp = Math.exp((Math.atan2(x_46_im, x_46_re) * (0.0 - y_46_im)));
                	} else {
                		tmp = Math.pow((t_0 * t_0), (y_46_re / 4.0));
                	}
                	return tmp;
                }
                
                def code(x_46_re, x_46_im, y_46_re, y_46_im):
                	t_0 = (x_46_re * x_46_re) + (x_46_im * x_46_im)
                	tmp = 0
                	if y_46_re <= -1.8:
                		tmp = math.pow(t_0, (y_46_re / 2.0))
                	elif y_46_re <= 1.6:
                		tmp = math.exp((math.atan2(x_46_im, x_46_re) * (0.0 - y_46_im)))
                	else:
                		tmp = math.pow((t_0 * t_0), (y_46_re / 4.0))
                	return tmp
                
                function code(x_46_re, x_46_im, y_46_re, y_46_im)
                	t_0 = Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))
                	tmp = 0.0
                	if (y_46_re <= -1.8)
                		tmp = t_0 ^ Float64(y_46_re / 2.0);
                	elseif (y_46_re <= 1.6)
                		tmp = exp(Float64(atan(x_46_im, x_46_re) * Float64(0.0 - y_46_im)));
                	else
                		tmp = Float64(t_0 * t_0) ^ Float64(y_46_re / 4.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_re) + (x_46_im * x_46_im);
                	tmp = 0.0;
                	if (y_46_re <= -1.8)
                		tmp = t_0 ^ (y_46_re / 2.0);
                	elseif (y_46_re <= 1.6)
                		tmp = exp((atan2(x_46_im, x_46_re) * (0.0 - y_46_im)));
                	else
                		tmp = (t_0 * t_0) ^ (y_46_re / 4.0);
                	end
                	tmp_2 = tmp;
                end
                
                code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -1.8], N[Power[t$95$0, N[(y$46$re / 2.0), $MachinePrecision]], $MachinePrecision], If[LessEqual[y$46$re, 1.6], N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[(0.0 - y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Power[N[(t$95$0 * t$95$0), $MachinePrecision], N[(y$46$re / 4.0), $MachinePrecision]], $MachinePrecision]]]]
                
                \begin{array}{l}
                
                \\
                \begin{array}{l}
                t_0 := x.re \cdot x.re + x.im \cdot x.im\\
                \mathbf{if}\;y.re \leq -1.8:\\
                \;\;\;\;{t\_0}^{\left(\frac{y.re}{2}\right)}\\
                
                \mathbf{elif}\;y.re \leq 1.6:\\
                \;\;\;\;e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(0 - y.im\right)}\\
                
                \mathbf{else}:\\
                \;\;\;\;{\left(t\_0 \cdot t\_0\right)}^{\left(\frac{y.re}{4}\right)}\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 3 regimes
                2. if y.re < -1.80000000000000004

                  1. Initial program 48.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 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. *-lowering-*.f64N/A

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

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

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

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

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

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

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

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(\left(\mathsf{hypot}\left(x.im, x.re\right)\right), y.re\right)\right) \]
                    9. hypot-lowering-hypot.f6487.6%

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

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

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

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

                        \[\leadsto {\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)}^{\color{blue}{y.re}} \]
                      2. sqrt-pow2N/A

                        \[\leadsto {\left(x.im \cdot x.im + x.re \cdot x.re\right)}^{\color{blue}{\left(\frac{y.re}{2}\right)}} \]
                      3. +-commutativeN/A

                        \[\leadsto {\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\left(\frac{\color{blue}{y.re}}{2}\right)} \]
                      4. pow-lowering-pow.f64N/A

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

                        \[\leadsto \mathsf{pow.f64}\left(\left(x.im \cdot x.im + x.re \cdot x.re\right), \left(\frac{\color{blue}{y.re}}{2}\right)\right) \]
                      6. +-lowering-+.f64N/A

                        \[\leadsto \mathsf{pow.f64}\left(\mathsf{+.f64}\left(\left(x.im \cdot x.im\right), \left(x.re \cdot x.re\right)\right), \left(\frac{\color{blue}{y.re}}{2}\right)\right) \]
                      7. *-lowering-*.f64N/A

                        \[\leadsto \mathsf{pow.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \left(x.re \cdot x.re\right)\right), \left(\frac{y.re}{2}\right)\right) \]
                      8. *-lowering-*.f64N/A

                        \[\leadsto \mathsf{pow.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \mathsf{*.f64}\left(x.re, x.re\right)\right), \left(\frac{y.re}{2}\right)\right) \]
                      9. /-lowering-/.f6487.6%

                        \[\leadsto \mathsf{pow.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \mathsf{*.f64}\left(x.re, x.re\right)\right), \mathsf{/.f64}\left(y.re, \color{blue}{2}\right)\right) \]
                    3. Applied egg-rr87.6%

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

                    if -1.80000000000000004 < y.re < 1.6000000000000001

                    1. Initial program 39.5%

                      \[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. Simplified83.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.im around 0

                      \[\leadsto \mathsf{/.f64}\left(\color{blue}{\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\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.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\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.re, \tan^{-1}_* \frac{x.im}{x.re}\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. atan2-lowering-atan2.f6483.4%

                        \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\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) \]
                    7. Simplified83.4%

                      \[\leadsto \frac{\color{blue}{\cos \left(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}}} \]
                    8. Taylor expanded in y.re around 0

                      \[\leadsto \color{blue}{\frac{1}{e^{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}}} \]
                    9. 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. exp-lowering-exp.f64N/A

                        \[\leadsto \mathsf{exp.f64}\left(\left(\mathsf{neg}\left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
                      3. distribute-rgt-neg-inN/A

                        \[\leadsto \mathsf{exp.f64}\left(\left(y.im \cdot \left(\mathsf{neg}\left(\tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right) \]
                      4. mul-1-negN/A

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

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

                        \[\leadsto \mathsf{exp.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(-1, \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
                      7. atan2-lowering-atan2.f6482.8%

                        \[\leadsto \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) \]
                    10. Simplified82.8%

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

                    if 1.6000000000000001 < y.re

                    1. Initial program 44.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.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. *-lowering-*.f64N/A

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

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

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

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

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

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

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

                        \[\leadsto \mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(\left(\mathsf{hypot}\left(x.im, x.re\right)\right), y.re\right)\right) \]
                      9. hypot-lowering-hypot.f6475.1%

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

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

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

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

                          \[\leadsto {\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)}^{\color{blue}{y.re}} \]
                        2. pow1/2N/A

                          \[\leadsto {\left({\left(x.im \cdot x.im + x.re \cdot x.re\right)}^{\frac{1}{2}}\right)}^{y.re} \]
                        3. +-commutativeN/A

                          \[\leadsto {\left({\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\frac{1}{2}}\right)}^{y.re} \]
                        4. metadata-evalN/A

                          \[\leadsto {\left({\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\left(2 \cdot \frac{1}{4}\right)}\right)}^{y.re} \]
                        5. pow-sqrN/A

                          \[\leadsto {\left({\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\frac{1}{4}} \cdot {\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\frac{1}{4}}\right)}^{y.re} \]
                        6. pow-prod-downN/A

                          \[\leadsto {\left({\left(\left(x.re \cdot x.re + x.im \cdot x.im\right) \cdot \left(x.re \cdot x.re + x.im \cdot x.im\right)\right)}^{\frac{1}{4}}\right)}^{y.re} \]
                        7. pow-unpowN/A

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

                          \[\leadsto {\left(\left(x.re \cdot x.re + x.im \cdot x.im\right) \cdot \left(x.re \cdot x.re + x.im \cdot x.im\right)\right)}^{\left(y.re \cdot \color{blue}{\frac{1}{4}}\right)} \]
                        9. pow-lowering-pow.f64N/A

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

                          \[\leadsto \mathsf{pow.f64}\left(\mathsf{*.f64}\left(\left(x.re \cdot x.re + x.im \cdot x.im\right), \left(x.re \cdot x.re + x.im \cdot x.im\right)\right), \left(\color{blue}{y.re} \cdot \frac{1}{4}\right)\right) \]
                        11. +-commutativeN/A

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

                          \[\leadsto \mathsf{pow.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\left(x.im \cdot x.im\right), \left(x.re \cdot x.re\right)\right), \left(x.re \cdot x.re + x.im \cdot x.im\right)\right), \left(y.re \cdot \frac{1}{4}\right)\right) \]
                        13. *-lowering-*.f64N/A

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

                          \[\leadsto \mathsf{pow.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \mathsf{*.f64}\left(x.re, x.re\right)\right), \left(x.re \cdot x.re + x.im \cdot x.im\right)\right), \left(y.re \cdot \frac{1}{4}\right)\right) \]
                        15. +-commutativeN/A

                          \[\leadsto \mathsf{pow.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \mathsf{*.f64}\left(x.re, x.re\right)\right), \left(x.im \cdot x.im + x.re \cdot x.re\right)\right), \left(y.re \cdot \frac{1}{4}\right)\right) \]
                        16. +-lowering-+.f64N/A

                          \[\leadsto \mathsf{pow.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \mathsf{*.f64}\left(x.re, x.re\right)\right), \mathsf{+.f64}\left(\left(x.im \cdot x.im\right), \left(x.re \cdot x.re\right)\right)\right), \left(y.re \cdot \frac{1}{4}\right)\right) \]
                        17. *-lowering-*.f64N/A

                          \[\leadsto \mathsf{pow.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \mathsf{*.f64}\left(x.re, x.re\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \left(x.re \cdot x.re\right)\right)\right), \left(y.re \cdot \frac{1}{4}\right)\right) \]
                        18. *-lowering-*.f64N/A

                          \[\leadsto \mathsf{pow.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \mathsf{*.f64}\left(x.re, x.re\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \mathsf{*.f64}\left(x.re, x.re\right)\right)\right), \left(y.re \cdot \frac{1}{4}\right)\right) \]
                        19. metadata-evalN/A

                          \[\leadsto \mathsf{pow.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \mathsf{*.f64}\left(x.re, x.re\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \mathsf{*.f64}\left(x.re, x.re\right)\right)\right), \left(y.re \cdot \frac{1}{\color{blue}{4}}\right)\right) \]
                        20. metadata-evalN/A

                          \[\leadsto \mathsf{pow.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \mathsf{*.f64}\left(x.re, x.re\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \mathsf{*.f64}\left(x.re, x.re\right)\right)\right), \left(y.re \cdot \frac{1}{2 + \color{blue}{2}}\right)\right) \]
                      3. Applied egg-rr71.1%

                        \[\leadsto \color{blue}{{\left(\left(x.im \cdot x.im + x.re \cdot x.re\right) \cdot \left(x.im \cdot x.im + x.re \cdot x.re\right)\right)}^{\left(\frac{y.re}{4}\right)}} \]
                    8. Recombined 3 regimes into one program.
                    9. Final simplification80.4%

                      \[\leadsto \begin{array}{l} \mathbf{if}\;y.re \leq -1.8:\\ \;\;\;\;{\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\left(\frac{y.re}{2}\right)}\\ \mathbf{elif}\;y.re \leq 1.6:\\ \;\;\;\;e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(0 - y.im\right)}\\ \mathbf{else}:\\ \;\;\;\;{\left(\left(x.re \cdot x.re + x.im \cdot x.im\right) \cdot \left(x.re \cdot x.re + x.im \cdot x.im\right)\right)}^{\left(\frac{y.re}{4}\right)}\\ \end{array} \]
                    10. Add Preprocessing

                    Alternative 8: 67.9% accurate, 3.9× speedup?

                    \[\begin{array}{l} \\ \begin{array}{l} t_0 := x.re \cdot x.re + x.im \cdot x.im\\ t_1 := t\_0 \cdot t\_0\\ \mathbf{if}\;y.im \leq -3.5 \cdot 10^{+37}:\\ \;\;\;\;{t\_1}^{\left(\frac{y.re}{4}\right)}\\ \mathbf{elif}\;y.im \leq 4 \cdot 10^{+18}:\\ \;\;\;\;{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\ \mathbf{else}:\\ \;\;\;\;{\left(t\_1 \cdot t\_1\right)}^{\left(y.re \cdot 0.125\right)}\\ \end{array} \end{array} \]
                    (FPCore (x.re x.im y.re y.im)
                     :precision binary64
                     (let* ((t_0 (+ (* x.re x.re) (* x.im x.im))) (t_1 (* t_0 t_0)))
                       (if (<= y.im -3.5e+37)
                         (pow t_1 (/ y.re 4.0))
                         (if (<= y.im 4e+18)
                           (pow (hypot x.im x.re) y.re)
                           (pow (* t_1 t_1) (* y.re 0.125))))))
                    double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
                    	double t_0 = (x_46_re * x_46_re) + (x_46_im * x_46_im);
                    	double t_1 = t_0 * t_0;
                    	double tmp;
                    	if (y_46_im <= -3.5e+37) {
                    		tmp = pow(t_1, (y_46_re / 4.0));
                    	} else if (y_46_im <= 4e+18) {
                    		tmp = pow(hypot(x_46_im, x_46_re), y_46_re);
                    	} else {
                    		tmp = pow((t_1 * t_1), (y_46_re * 0.125));
                    	}
                    	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 = (x_46_re * x_46_re) + (x_46_im * x_46_im);
                    	double t_1 = t_0 * t_0;
                    	double tmp;
                    	if (y_46_im <= -3.5e+37) {
                    		tmp = Math.pow(t_1, (y_46_re / 4.0));
                    	} else if (y_46_im <= 4e+18) {
                    		tmp = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
                    	} else {
                    		tmp = Math.pow((t_1 * t_1), (y_46_re * 0.125));
                    	}
                    	return tmp;
                    }
                    
                    def code(x_46_re, x_46_im, y_46_re, y_46_im):
                    	t_0 = (x_46_re * x_46_re) + (x_46_im * x_46_im)
                    	t_1 = t_0 * t_0
                    	tmp = 0
                    	if y_46_im <= -3.5e+37:
                    		tmp = math.pow(t_1, (y_46_re / 4.0))
                    	elif y_46_im <= 4e+18:
                    		tmp = math.pow(math.hypot(x_46_im, x_46_re), y_46_re)
                    	else:
                    		tmp = math.pow((t_1 * t_1), (y_46_re * 0.125))
                    	return tmp
                    
                    function code(x_46_re, x_46_im, y_46_re, y_46_im)
                    	t_0 = Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))
                    	t_1 = Float64(t_0 * t_0)
                    	tmp = 0.0
                    	if (y_46_im <= -3.5e+37)
                    		tmp = t_1 ^ Float64(y_46_re / 4.0);
                    	elseif (y_46_im <= 4e+18)
                    		tmp = hypot(x_46_im, x_46_re) ^ y_46_re;
                    	else
                    		tmp = Float64(t_1 * t_1) ^ Float64(y_46_re * 0.125);
                    	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_re) + (x_46_im * x_46_im);
                    	t_1 = t_0 * t_0;
                    	tmp = 0.0;
                    	if (y_46_im <= -3.5e+37)
                    		tmp = t_1 ^ (y_46_re / 4.0);
                    	elseif (y_46_im <= 4e+18)
                    		tmp = hypot(x_46_im, x_46_re) ^ y_46_re;
                    	else
                    		tmp = (t_1 * t_1) ^ (y_46_re * 0.125);
                    	end
                    	tmp_2 = tmp;
                    end
                    
                    code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(t$95$0 * t$95$0), $MachinePrecision]}, If[LessEqual[y$46$im, -3.5e+37], N[Power[t$95$1, N[(y$46$re / 4.0), $MachinePrecision]], $MachinePrecision], If[LessEqual[y$46$im, 4e+18], N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision], N[Power[N[(t$95$1 * t$95$1), $MachinePrecision], N[(y$46$re * 0.125), $MachinePrecision]], $MachinePrecision]]]]]
                    
                    \begin{array}{l}
                    
                    \\
                    \begin{array}{l}
                    t_0 := x.re \cdot x.re + x.im \cdot x.im\\
                    t_1 := t\_0 \cdot t\_0\\
                    \mathbf{if}\;y.im \leq -3.5 \cdot 10^{+37}:\\
                    \;\;\;\;{t\_1}^{\left(\frac{y.re}{4}\right)}\\
                    
                    \mathbf{elif}\;y.im \leq 4 \cdot 10^{+18}:\\
                    \;\;\;\;{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;{\left(t\_1 \cdot t\_1\right)}^{\left(y.re \cdot 0.125\right)}\\
                    
                    
                    \end{array}
                    \end{array}
                    
                    Derivation
                    1. Split input into 3 regimes
                    2. if y.im < -3.5e37

                      1. Initial program 42.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. *-lowering-*.f64N/A

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

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

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

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

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

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

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

                          \[\leadsto \mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(\left(\mathsf{hypot}\left(x.im, x.re\right)\right), y.re\right)\right) \]
                        9. hypot-lowering-hypot.f6437.4%

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

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

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

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

                            \[\leadsto {\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)}^{\color{blue}{y.re}} \]
                          2. pow1/2N/A

                            \[\leadsto {\left({\left(x.im \cdot x.im + x.re \cdot x.re\right)}^{\frac{1}{2}}\right)}^{y.re} \]
                          3. +-commutativeN/A

                            \[\leadsto {\left({\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\frac{1}{2}}\right)}^{y.re} \]
                          4. metadata-evalN/A

                            \[\leadsto {\left({\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\left(2 \cdot \frac{1}{4}\right)}\right)}^{y.re} \]
                          5. pow-sqrN/A

                            \[\leadsto {\left({\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\frac{1}{4}} \cdot {\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\frac{1}{4}}\right)}^{y.re} \]
                          6. pow-prod-downN/A

                            \[\leadsto {\left({\left(\left(x.re \cdot x.re + x.im \cdot x.im\right) \cdot \left(x.re \cdot x.re + x.im \cdot x.im\right)\right)}^{\frac{1}{4}}\right)}^{y.re} \]
                          7. pow-unpowN/A

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

                            \[\leadsto {\left(\left(x.re \cdot x.re + x.im \cdot x.im\right) \cdot \left(x.re \cdot x.re + x.im \cdot x.im\right)\right)}^{\left(y.re \cdot \color{blue}{\frac{1}{4}}\right)} \]
                          9. pow-lowering-pow.f64N/A

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

                            \[\leadsto \mathsf{pow.f64}\left(\mathsf{*.f64}\left(\left(x.re \cdot x.re + x.im \cdot x.im\right), \left(x.re \cdot x.re + x.im \cdot x.im\right)\right), \left(\color{blue}{y.re} \cdot \frac{1}{4}\right)\right) \]
                          11. +-commutativeN/A

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

                            \[\leadsto \mathsf{pow.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\left(x.im \cdot x.im\right), \left(x.re \cdot x.re\right)\right), \left(x.re \cdot x.re + x.im \cdot x.im\right)\right), \left(y.re \cdot \frac{1}{4}\right)\right) \]
                          13. *-lowering-*.f64N/A

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

                            \[\leadsto \mathsf{pow.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \mathsf{*.f64}\left(x.re, x.re\right)\right), \left(x.re \cdot x.re + x.im \cdot x.im\right)\right), \left(y.re \cdot \frac{1}{4}\right)\right) \]
                          15. +-commutativeN/A

                            \[\leadsto \mathsf{pow.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \mathsf{*.f64}\left(x.re, x.re\right)\right), \left(x.im \cdot x.im + x.re \cdot x.re\right)\right), \left(y.re \cdot \frac{1}{4}\right)\right) \]
                          16. +-lowering-+.f64N/A

                            \[\leadsto \mathsf{pow.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \mathsf{*.f64}\left(x.re, x.re\right)\right), \mathsf{+.f64}\left(\left(x.im \cdot x.im\right), \left(x.re \cdot x.re\right)\right)\right), \left(y.re \cdot \frac{1}{4}\right)\right) \]
                          17. *-lowering-*.f64N/A

                            \[\leadsto \mathsf{pow.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \mathsf{*.f64}\left(x.re, x.re\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \left(x.re \cdot x.re\right)\right)\right), \left(y.re \cdot \frac{1}{4}\right)\right) \]
                          18. *-lowering-*.f64N/A

                            \[\leadsto \mathsf{pow.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \mathsf{*.f64}\left(x.re, x.re\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \mathsf{*.f64}\left(x.re, x.re\right)\right)\right), \left(y.re \cdot \frac{1}{4}\right)\right) \]
                          19. metadata-evalN/A

                            \[\leadsto \mathsf{pow.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \mathsf{*.f64}\left(x.re, x.re\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \mathsf{*.f64}\left(x.re, x.re\right)\right)\right), \left(y.re \cdot \frac{1}{\color{blue}{4}}\right)\right) \]
                          20. metadata-evalN/A

                            \[\leadsto \mathsf{pow.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \mathsf{*.f64}\left(x.re, x.re\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \mathsf{*.f64}\left(x.re, x.re\right)\right)\right), \left(y.re \cdot \frac{1}{2 + \color{blue}{2}}\right)\right) \]
                        3. Applied egg-rr48.2%

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

                        if -3.5e37 < y.im < 4e18

                        1. Initial program 47.3%

                          \[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. *-lowering-*.f64N/A

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

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

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

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

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

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

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

                            \[\leadsto \mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(\left(\mathsf{hypot}\left(x.im, x.re\right)\right), y.re\right)\right) \]
                          9. hypot-lowering-hypot.f6489.6%

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

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

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

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

                          if 4e18 < y.im

                          1. Initial program 29.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. *-lowering-*.f64N/A

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

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

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

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

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

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

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

                              \[\leadsto \mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(\left(\mathsf{hypot}\left(x.im, x.re\right)\right), y.re\right)\right) \]
                            9. hypot-lowering-hypot.f6430.3%

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

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

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

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

                                \[\leadsto {\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)}^{\color{blue}{y.re}} \]
                              2. pow1/2N/A

                                \[\leadsto {\left({\left(x.im \cdot x.im + x.re \cdot x.re\right)}^{\frac{1}{2}}\right)}^{y.re} \]
                              3. +-commutativeN/A

                                \[\leadsto {\left({\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\frac{1}{2}}\right)}^{y.re} \]
                              4. metadata-evalN/A

                                \[\leadsto {\left({\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\left(2 \cdot \frac{1}{4}\right)}\right)}^{y.re} \]
                              5. pow-sqrN/A

                                \[\leadsto {\left({\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\frac{1}{4}} \cdot {\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\frac{1}{4}}\right)}^{y.re} \]
                              6. pow-prod-downN/A

                                \[\leadsto {\left({\left(\left(x.re \cdot x.re + x.im \cdot x.im\right) \cdot \left(x.re \cdot x.re + x.im \cdot x.im\right)\right)}^{\frac{1}{4}}\right)}^{y.re} \]
                              7. pow-unpowN/A

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

                                \[\leadsto {\left(\left(x.re \cdot x.re + x.im \cdot x.im\right) \cdot \left(x.re \cdot x.re + x.im \cdot x.im\right)\right)}^{\left(y.re \cdot \color{blue}{\frac{1}{4}}\right)} \]
                              9. sqr-powN/A

                                \[\leadsto {\left(\left(x.re \cdot x.re + x.im \cdot x.im\right) \cdot \left(x.re \cdot x.re + x.im \cdot x.im\right)\right)}^{\left(\frac{y.re \cdot \frac{1}{4}}{2}\right)} \cdot \color{blue}{{\left(\left(x.re \cdot x.re + x.im \cdot x.im\right) \cdot \left(x.re \cdot x.re + x.im \cdot x.im\right)\right)}^{\left(\frac{y.re \cdot \frac{1}{4}}{2}\right)}} \]
                              10. pow-prod-downN/A

                                \[\leadsto {\left(\left(\left(x.re \cdot x.re + x.im \cdot x.im\right) \cdot \left(x.re \cdot x.re + x.im \cdot x.im\right)\right) \cdot \left(\left(x.re \cdot x.re + x.im \cdot x.im\right) \cdot \left(x.re \cdot x.re + x.im \cdot x.im\right)\right)\right)}^{\color{blue}{\left(\frac{y.re \cdot \frac{1}{4}}{2}\right)}} \]
                              11. pow-lowering-pow.f64N/A

                                \[\leadsto \mathsf{pow.f64}\left(\left(\left(\left(x.re \cdot x.re + x.im \cdot x.im\right) \cdot \left(x.re \cdot x.re + x.im \cdot x.im\right)\right) \cdot \left(\left(x.re \cdot x.re + x.im \cdot x.im\right) \cdot \left(x.re \cdot x.re + x.im \cdot x.im\right)\right)\right), \color{blue}{\left(\frac{y.re \cdot \frac{1}{4}}{2}\right)}\right) \]
                            3. Applied egg-rr52.2%

                              \[\leadsto \color{blue}{{\left(\left(\left(x.im \cdot x.im + x.re \cdot x.re\right) \cdot \left(x.im \cdot x.im + x.re \cdot x.re\right)\right) \cdot \left(\left(x.im \cdot x.im + x.re \cdot x.re\right) \cdot \left(x.im \cdot x.im + x.re \cdot x.re\right)\right)\right)}^{\left(y.re \cdot 0.125\right)}} \]
                          8. Recombined 3 regimes into one program.
                          9. Final simplification72.6%

                            \[\leadsto \begin{array}{l} \mathbf{if}\;y.im \leq -3.5 \cdot 10^{+37}:\\ \;\;\;\;{\left(\left(x.re \cdot x.re + x.im \cdot x.im\right) \cdot \left(x.re \cdot x.re + x.im \cdot x.im\right)\right)}^{\left(\frac{y.re}{4}\right)}\\ \mathbf{elif}\;y.im \leq 4 \cdot 10^{+18}:\\ \;\;\;\;{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\ \mathbf{else}:\\ \;\;\;\;{\left(\left(\left(x.re \cdot x.re + x.im \cdot x.im\right) \cdot \left(x.re \cdot x.re + x.im \cdot x.im\right)\right) \cdot \left(\left(x.re \cdot x.re + x.im \cdot x.im\right) \cdot \left(x.re \cdot x.re + x.im \cdot x.im\right)\right)\right)}^{\left(y.re \cdot 0.125\right)}\\ \end{array} \]
                          10. Add Preprocessing

                          Alternative 9: 61.9% accurate, 6.0× speedup?

                          \[\begin{array}{l} \\ \begin{array}{l} t_0 := x.re \cdot x.re + x.im \cdot x.im\\ t_1 := t\_0 \cdot t\_0\\ \mathbf{if}\;y.re \leq -0.0016:\\ \;\;\;\;{\left(t\_1 \cdot t\_1\right)}^{\left(y.re \cdot 0.125\right)}\\ \mathbf{elif}\;y.re \leq 2 \cdot 10^{-8}:\\ \;\;\;\;1\\ \mathbf{else}:\\ \;\;\;\;{t\_1}^{\left(\frac{y.re}{4}\right)}\\ \end{array} \end{array} \]
                          (FPCore (x.re x.im y.re y.im)
                           :precision binary64
                           (let* ((t_0 (+ (* x.re x.re) (* x.im x.im))) (t_1 (* t_0 t_0)))
                             (if (<= y.re -0.0016)
                               (pow (* t_1 t_1) (* y.re 0.125))
                               (if (<= y.re 2e-8) 1.0 (pow t_1 (/ y.re 4.0))))))
                          double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
                          	double t_0 = (x_46_re * x_46_re) + (x_46_im * x_46_im);
                          	double t_1 = t_0 * t_0;
                          	double tmp;
                          	if (y_46_re <= -0.0016) {
                          		tmp = pow((t_1 * t_1), (y_46_re * 0.125));
                          	} else if (y_46_re <= 2e-8) {
                          		tmp = 1.0;
                          	} else {
                          		tmp = pow(t_1, (y_46_re / 4.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) :: t_1
                              real(8) :: tmp
                              t_0 = (x_46re * x_46re) + (x_46im * x_46im)
                              t_1 = t_0 * t_0
                              if (y_46re <= (-0.0016d0)) then
                                  tmp = (t_1 * t_1) ** (y_46re * 0.125d0)
                              else if (y_46re <= 2d-8) then
                                  tmp = 1.0d0
                              else
                                  tmp = t_1 ** (y_46re / 4.0d0)
                              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 = (x_46_re * x_46_re) + (x_46_im * x_46_im);
                          	double t_1 = t_0 * t_0;
                          	double tmp;
                          	if (y_46_re <= -0.0016) {
                          		tmp = Math.pow((t_1 * t_1), (y_46_re * 0.125));
                          	} else if (y_46_re <= 2e-8) {
                          		tmp = 1.0;
                          	} else {
                          		tmp = Math.pow(t_1, (y_46_re / 4.0));
                          	}
                          	return tmp;
                          }
                          
                          def code(x_46_re, x_46_im, y_46_re, y_46_im):
                          	t_0 = (x_46_re * x_46_re) + (x_46_im * x_46_im)
                          	t_1 = t_0 * t_0
                          	tmp = 0
                          	if y_46_re <= -0.0016:
                          		tmp = math.pow((t_1 * t_1), (y_46_re * 0.125))
                          	elif y_46_re <= 2e-8:
                          		tmp = 1.0
                          	else:
                          		tmp = math.pow(t_1, (y_46_re / 4.0))
                          	return tmp
                          
                          function code(x_46_re, x_46_im, y_46_re, y_46_im)
                          	t_0 = Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))
                          	t_1 = Float64(t_0 * t_0)
                          	tmp = 0.0
                          	if (y_46_re <= -0.0016)
                          		tmp = Float64(t_1 * t_1) ^ Float64(y_46_re * 0.125);
                          	elseif (y_46_re <= 2e-8)
                          		tmp = 1.0;
                          	else
                          		tmp = t_1 ^ Float64(y_46_re / 4.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_re) + (x_46_im * x_46_im);
                          	t_1 = t_0 * t_0;
                          	tmp = 0.0;
                          	if (y_46_re <= -0.0016)
                          		tmp = (t_1 * t_1) ^ (y_46_re * 0.125);
                          	elseif (y_46_re <= 2e-8)
                          		tmp = 1.0;
                          	else
                          		tmp = t_1 ^ (y_46_re / 4.0);
                          	end
                          	tmp_2 = tmp;
                          end
                          
                          code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(t$95$0 * t$95$0), $MachinePrecision]}, If[LessEqual[y$46$re, -0.0016], N[Power[N[(t$95$1 * t$95$1), $MachinePrecision], N[(y$46$re * 0.125), $MachinePrecision]], $MachinePrecision], If[LessEqual[y$46$re, 2e-8], 1.0, N[Power[t$95$1, N[(y$46$re / 4.0), $MachinePrecision]], $MachinePrecision]]]]]
                          
                          \begin{array}{l}
                          
                          \\
                          \begin{array}{l}
                          t_0 := x.re \cdot x.re + x.im \cdot x.im\\
                          t_1 := t\_0 \cdot t\_0\\
                          \mathbf{if}\;y.re \leq -0.0016:\\
                          \;\;\;\;{\left(t\_1 \cdot t\_1\right)}^{\left(y.re \cdot 0.125\right)}\\
                          
                          \mathbf{elif}\;y.re \leq 2 \cdot 10^{-8}:\\
                          \;\;\;\;1\\
                          
                          \mathbf{else}:\\
                          \;\;\;\;{t\_1}^{\left(\frac{y.re}{4}\right)}\\
                          
                          
                          \end{array}
                          \end{array}
                          
                          Derivation
                          1. Split input into 3 regimes
                          2. if y.re < -0.00160000000000000008

                            1. Initial program 49.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. *-lowering-*.f64N/A

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

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

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

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

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

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

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

                                \[\leadsto \mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(\left(\mathsf{hypot}\left(x.im, x.re\right)\right), y.re\right)\right) \]
                              9. hypot-lowering-hypot.f6486.1%

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

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

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

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

                                  \[\leadsto {\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)}^{\color{blue}{y.re}} \]
                                2. pow1/2N/A

                                  \[\leadsto {\left({\left(x.im \cdot x.im + x.re \cdot x.re\right)}^{\frac{1}{2}}\right)}^{y.re} \]
                                3. +-commutativeN/A

                                  \[\leadsto {\left({\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\frac{1}{2}}\right)}^{y.re} \]
                                4. metadata-evalN/A

                                  \[\leadsto {\left({\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\left(2 \cdot \frac{1}{4}\right)}\right)}^{y.re} \]
                                5. pow-sqrN/A

                                  \[\leadsto {\left({\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\frac{1}{4}} \cdot {\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\frac{1}{4}}\right)}^{y.re} \]
                                6. pow-prod-downN/A

                                  \[\leadsto {\left({\left(\left(x.re \cdot x.re + x.im \cdot x.im\right) \cdot \left(x.re \cdot x.re + x.im \cdot x.im\right)\right)}^{\frac{1}{4}}\right)}^{y.re} \]
                                7. pow-unpowN/A

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

                                  \[\leadsto {\left(\left(x.re \cdot x.re + x.im \cdot x.im\right) \cdot \left(x.re \cdot x.re + x.im \cdot x.im\right)\right)}^{\left(y.re \cdot \color{blue}{\frac{1}{4}}\right)} \]
                                9. sqr-powN/A

                                  \[\leadsto {\left(\left(x.re \cdot x.re + x.im \cdot x.im\right) \cdot \left(x.re \cdot x.re + x.im \cdot x.im\right)\right)}^{\left(\frac{y.re \cdot \frac{1}{4}}{2}\right)} \cdot \color{blue}{{\left(\left(x.re \cdot x.re + x.im \cdot x.im\right) \cdot \left(x.re \cdot x.re + x.im \cdot x.im\right)\right)}^{\left(\frac{y.re \cdot \frac{1}{4}}{2}\right)}} \]
                                10. pow-prod-downN/A

                                  \[\leadsto {\left(\left(\left(x.re \cdot x.re + x.im \cdot x.im\right) \cdot \left(x.re \cdot x.re + x.im \cdot x.im\right)\right) \cdot \left(\left(x.re \cdot x.re + x.im \cdot x.im\right) \cdot \left(x.re \cdot x.re + x.im \cdot x.im\right)\right)\right)}^{\color{blue}{\left(\frac{y.re \cdot \frac{1}{4}}{2}\right)}} \]
                                11. pow-lowering-pow.f64N/A

                                  \[\leadsto \mathsf{pow.f64}\left(\left(\left(\left(x.re \cdot x.re + x.im \cdot x.im\right) \cdot \left(x.re \cdot x.re + x.im \cdot x.im\right)\right) \cdot \left(\left(x.re \cdot x.re + x.im \cdot x.im\right) \cdot \left(x.re \cdot x.re + x.im \cdot x.im\right)\right)\right), \color{blue}{\left(\frac{y.re \cdot \frac{1}{4}}{2}\right)}\right) \]
                              3. Applied egg-rr87.8%

                                \[\leadsto \color{blue}{{\left(\left(\left(x.im \cdot x.im + x.re \cdot x.re\right) \cdot \left(x.im \cdot x.im + x.re \cdot x.re\right)\right) \cdot \left(\left(x.im \cdot x.im + x.re \cdot x.re\right) \cdot \left(x.im \cdot x.im + x.re \cdot x.re\right)\right)\right)}^{\left(y.re \cdot 0.125\right)}} \]

                              if -0.00160000000000000008 < y.re < 2e-8

                              1. Initial program 39.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. 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. *-lowering-*.f64N/A

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

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

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

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

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

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

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

                                  \[\leadsto \mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(\left(\mathsf{hypot}\left(x.im, x.re\right)\right), y.re\right)\right) \]
                                9. hypot-lowering-hypot.f6451.6%

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

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

                                \[\leadsto \color{blue}{1} \]
                              7. Step-by-step derivation
                                1. Simplified50.9%

                                  \[\leadsto \color{blue}{1} \]

                                if 2e-8 < y.re

                                1. Initial program 44.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.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. *-lowering-*.f64N/A

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

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

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

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

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

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

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

                                    \[\leadsto \mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(\left(\mathsf{hypot}\left(x.im, x.re\right)\right), y.re\right)\right) \]
                                  9. hypot-lowering-hypot.f6475.1%

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

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

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

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

                                      \[\leadsto {\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)}^{\color{blue}{y.re}} \]
                                    2. pow1/2N/A

                                      \[\leadsto {\left({\left(x.im \cdot x.im + x.re \cdot x.re\right)}^{\frac{1}{2}}\right)}^{y.re} \]
                                    3. +-commutativeN/A

                                      \[\leadsto {\left({\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\frac{1}{2}}\right)}^{y.re} \]
                                    4. metadata-evalN/A

                                      \[\leadsto {\left({\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\left(2 \cdot \frac{1}{4}\right)}\right)}^{y.re} \]
                                    5. pow-sqrN/A

                                      \[\leadsto {\left({\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\frac{1}{4}} \cdot {\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\frac{1}{4}}\right)}^{y.re} \]
                                    6. pow-prod-downN/A

                                      \[\leadsto {\left({\left(\left(x.re \cdot x.re + x.im \cdot x.im\right) \cdot \left(x.re \cdot x.re + x.im \cdot x.im\right)\right)}^{\frac{1}{4}}\right)}^{y.re} \]
                                    7. pow-unpowN/A

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

                                      \[\leadsto {\left(\left(x.re \cdot x.re + x.im \cdot x.im\right) \cdot \left(x.re \cdot x.re + x.im \cdot x.im\right)\right)}^{\left(y.re \cdot \color{blue}{\frac{1}{4}}\right)} \]
                                    9. pow-lowering-pow.f64N/A

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

                                      \[\leadsto \mathsf{pow.f64}\left(\mathsf{*.f64}\left(\left(x.re \cdot x.re + x.im \cdot x.im\right), \left(x.re \cdot x.re + x.im \cdot x.im\right)\right), \left(\color{blue}{y.re} \cdot \frac{1}{4}\right)\right) \]
                                    11. +-commutativeN/A

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

                                      \[\leadsto \mathsf{pow.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\left(x.im \cdot x.im\right), \left(x.re \cdot x.re\right)\right), \left(x.re \cdot x.re + x.im \cdot x.im\right)\right), \left(y.re \cdot \frac{1}{4}\right)\right) \]
                                    13. *-lowering-*.f64N/A

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

                                      \[\leadsto \mathsf{pow.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \mathsf{*.f64}\left(x.re, x.re\right)\right), \left(x.re \cdot x.re + x.im \cdot x.im\right)\right), \left(y.re \cdot \frac{1}{4}\right)\right) \]
                                    15. +-commutativeN/A

                                      \[\leadsto \mathsf{pow.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \mathsf{*.f64}\left(x.re, x.re\right)\right), \left(x.im \cdot x.im + x.re \cdot x.re\right)\right), \left(y.re \cdot \frac{1}{4}\right)\right) \]
                                    16. +-lowering-+.f64N/A

                                      \[\leadsto \mathsf{pow.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \mathsf{*.f64}\left(x.re, x.re\right)\right), \mathsf{+.f64}\left(\left(x.im \cdot x.im\right), \left(x.re \cdot x.re\right)\right)\right), \left(y.re \cdot \frac{1}{4}\right)\right) \]
                                    17. *-lowering-*.f64N/A

                                      \[\leadsto \mathsf{pow.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \mathsf{*.f64}\left(x.re, x.re\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \left(x.re \cdot x.re\right)\right)\right), \left(y.re \cdot \frac{1}{4}\right)\right) \]
                                    18. *-lowering-*.f64N/A

                                      \[\leadsto \mathsf{pow.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \mathsf{*.f64}\left(x.re, x.re\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \mathsf{*.f64}\left(x.re, x.re\right)\right)\right), \left(y.re \cdot \frac{1}{4}\right)\right) \]
                                    19. metadata-evalN/A

                                      \[\leadsto \mathsf{pow.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \mathsf{*.f64}\left(x.re, x.re\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \mathsf{*.f64}\left(x.re, x.re\right)\right)\right), \left(y.re \cdot \frac{1}{\color{blue}{4}}\right)\right) \]
                                    20. metadata-evalN/A

                                      \[\leadsto \mathsf{pow.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \mathsf{*.f64}\left(x.re, x.re\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \mathsf{*.f64}\left(x.re, x.re\right)\right)\right), \left(y.re \cdot \frac{1}{2 + \color{blue}{2}}\right)\right) \]
                                  3. Applied egg-rr71.1%

                                    \[\leadsto \color{blue}{{\left(\left(x.im \cdot x.im + x.re \cdot x.re\right) \cdot \left(x.im \cdot x.im + x.re \cdot x.re\right)\right)}^{\left(\frac{y.re}{4}\right)}} \]
                                8. Recombined 3 regimes into one program.
                                9. Final simplification65.2%

                                  \[\leadsto \begin{array}{l} \mathbf{if}\;y.re \leq -0.0016:\\ \;\;\;\;{\left(\left(\left(x.re \cdot x.re + x.im \cdot x.im\right) \cdot \left(x.re \cdot x.re + x.im \cdot x.im\right)\right) \cdot \left(\left(x.re \cdot x.re + x.im \cdot x.im\right) \cdot \left(x.re \cdot x.re + x.im \cdot x.im\right)\right)\right)}^{\left(y.re \cdot 0.125\right)}\\ \mathbf{elif}\;y.re \leq 2 \cdot 10^{-8}:\\ \;\;\;\;1\\ \mathbf{else}:\\ \;\;\;\;{\left(\left(x.re \cdot x.re + x.im \cdot x.im\right) \cdot \left(x.re \cdot x.re + x.im \cdot x.im\right)\right)}^{\left(\frac{y.re}{4}\right)}\\ \end{array} \]
                                10. Add Preprocessing

                                Alternative 10: 62.0% accurate, 6.5× speedup?

                                \[\begin{array}{l} \\ \begin{array}{l} t_0 := x.re \cdot x.re + x.im \cdot x.im\\ \mathbf{if}\;y.re \leq -6.9 \cdot 10^{-16}:\\ \;\;\;\;{t\_0}^{\left(\frac{y.re}{2}\right)}\\ \mathbf{elif}\;y.re \leq 6.5 \cdot 10^{-5}:\\ \;\;\;\;1\\ \mathbf{else}:\\ \;\;\;\;{\left(t\_0 \cdot t\_0\right)}^{\left(\frac{y.re}{4}\right)}\\ \end{array} \end{array} \]
                                (FPCore (x.re x.im y.re y.im)
                                 :precision binary64
                                 (let* ((t_0 (+ (* x.re x.re) (* x.im x.im))))
                                   (if (<= y.re -6.9e-16)
                                     (pow t_0 (/ y.re 2.0))
                                     (if (<= y.re 6.5e-5) 1.0 (pow (* t_0 t_0) (/ y.re 4.0))))))
                                double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
                                	double t_0 = (x_46_re * x_46_re) + (x_46_im * x_46_im);
                                	double tmp;
                                	if (y_46_re <= -6.9e-16) {
                                		tmp = pow(t_0, (y_46_re / 2.0));
                                	} else if (y_46_re <= 6.5e-5) {
                                		tmp = 1.0;
                                	} else {
                                		tmp = pow((t_0 * t_0), (y_46_re / 4.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_46re) + (x_46im * x_46im)
                                    if (y_46re <= (-6.9d-16)) then
                                        tmp = t_0 ** (y_46re / 2.0d0)
                                    else if (y_46re <= 6.5d-5) then
                                        tmp = 1.0d0
                                    else
                                        tmp = (t_0 * t_0) ** (y_46re / 4.0d0)
                                    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 = (x_46_re * x_46_re) + (x_46_im * x_46_im);
                                	double tmp;
                                	if (y_46_re <= -6.9e-16) {
                                		tmp = Math.pow(t_0, (y_46_re / 2.0));
                                	} else if (y_46_re <= 6.5e-5) {
                                		tmp = 1.0;
                                	} else {
                                		tmp = Math.pow((t_0 * t_0), (y_46_re / 4.0));
                                	}
                                	return tmp;
                                }
                                
                                def code(x_46_re, x_46_im, y_46_re, y_46_im):
                                	t_0 = (x_46_re * x_46_re) + (x_46_im * x_46_im)
                                	tmp = 0
                                	if y_46_re <= -6.9e-16:
                                		tmp = math.pow(t_0, (y_46_re / 2.0))
                                	elif y_46_re <= 6.5e-5:
                                		tmp = 1.0
                                	else:
                                		tmp = math.pow((t_0 * t_0), (y_46_re / 4.0))
                                	return tmp
                                
                                function code(x_46_re, x_46_im, y_46_re, y_46_im)
                                	t_0 = Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))
                                	tmp = 0.0
                                	if (y_46_re <= -6.9e-16)
                                		tmp = t_0 ^ Float64(y_46_re / 2.0);
                                	elseif (y_46_re <= 6.5e-5)
                                		tmp = 1.0;
                                	else
                                		tmp = Float64(t_0 * t_0) ^ Float64(y_46_re / 4.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_re) + (x_46_im * x_46_im);
                                	tmp = 0.0;
                                	if (y_46_re <= -6.9e-16)
                                		tmp = t_0 ^ (y_46_re / 2.0);
                                	elseif (y_46_re <= 6.5e-5)
                                		tmp = 1.0;
                                	else
                                		tmp = (t_0 * t_0) ^ (y_46_re / 4.0);
                                	end
                                	tmp_2 = tmp;
                                end
                                
                                code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -6.9e-16], N[Power[t$95$0, N[(y$46$re / 2.0), $MachinePrecision]], $MachinePrecision], If[LessEqual[y$46$re, 6.5e-5], 1.0, N[Power[N[(t$95$0 * t$95$0), $MachinePrecision], N[(y$46$re / 4.0), $MachinePrecision]], $MachinePrecision]]]]
                                
                                \begin{array}{l}
                                
                                \\
                                \begin{array}{l}
                                t_0 := x.re \cdot x.re + x.im \cdot x.im\\
                                \mathbf{if}\;y.re \leq -6.9 \cdot 10^{-16}:\\
                                \;\;\;\;{t\_0}^{\left(\frac{y.re}{2}\right)}\\
                                
                                \mathbf{elif}\;y.re \leq 6.5 \cdot 10^{-5}:\\
                                \;\;\;\;1\\
                                
                                \mathbf{else}:\\
                                \;\;\;\;{\left(t\_0 \cdot t\_0\right)}^{\left(\frac{y.re}{4}\right)}\\
                                
                                
                                \end{array}
                                \end{array}
                                
                                Derivation
                                1. Split input into 3 regimes
                                2. if y.re < -6.8999999999999997e-16

                                  1. Initial program 50.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. 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. *-lowering-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

                                        \[\leadsto {\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)}^{\color{blue}{y.re}} \]
                                      2. sqrt-pow2N/A

                                        \[\leadsto {\left(x.im \cdot x.im + x.re \cdot x.re\right)}^{\color{blue}{\left(\frac{y.re}{2}\right)}} \]
                                      3. +-commutativeN/A

                                        \[\leadsto {\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\left(\frac{\color{blue}{y.re}}{2}\right)} \]
                                      4. pow-lowering-pow.f64N/A

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

                                        \[\leadsto \mathsf{pow.f64}\left(\left(x.im \cdot x.im + x.re \cdot x.re\right), \left(\frac{\color{blue}{y.re}}{2}\right)\right) \]
                                      6. +-lowering-+.f64N/A

                                        \[\leadsto \mathsf{pow.f64}\left(\mathsf{+.f64}\left(\left(x.im \cdot x.im\right), \left(x.re \cdot x.re\right)\right), \left(\frac{\color{blue}{y.re}}{2}\right)\right) \]
                                      7. *-lowering-*.f64N/A

                                        \[\leadsto \mathsf{pow.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \left(x.re \cdot x.re\right)\right), \left(\frac{y.re}{2}\right)\right) \]
                                      8. *-lowering-*.f64N/A

                                        \[\leadsto \mathsf{pow.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \mathsf{*.f64}\left(x.re, x.re\right)\right), \left(\frac{y.re}{2}\right)\right) \]
                                      9. /-lowering-/.f6482.8%

                                        \[\leadsto \mathsf{pow.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \mathsf{*.f64}\left(x.re, x.re\right)\right), \mathsf{/.f64}\left(y.re, \color{blue}{2}\right)\right) \]
                                    3. Applied egg-rr82.8%

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

                                    if -6.8999999999999997e-16 < y.re < 6.49999999999999943e-5

                                    1. Initial program 38.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. *-lowering-*.f64N/A

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

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

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

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

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

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

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

                                        \[\leadsto \mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(\left(\mathsf{hypot}\left(x.im, x.re\right)\right), y.re\right)\right) \]
                                      9. hypot-lowering-hypot.f6452.0%

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

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

                                      \[\leadsto \color{blue}{1} \]
                                    7. Step-by-step derivation
                                      1. Simplified52.0%

                                        \[\leadsto \color{blue}{1} \]

                                      if 6.49999999999999943e-5 < y.re

                                      1. Initial program 44.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.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. *-lowering-*.f64N/A

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

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

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

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

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

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

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

                                          \[\leadsto \mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(\left(\mathsf{hypot}\left(x.im, x.re\right)\right), y.re\right)\right) \]
                                        9. hypot-lowering-hypot.f6475.1%

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

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

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

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

                                            \[\leadsto {\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)}^{\color{blue}{y.re}} \]
                                          2. pow1/2N/A

                                            \[\leadsto {\left({\left(x.im \cdot x.im + x.re \cdot x.re\right)}^{\frac{1}{2}}\right)}^{y.re} \]
                                          3. +-commutativeN/A

                                            \[\leadsto {\left({\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\frac{1}{2}}\right)}^{y.re} \]
                                          4. metadata-evalN/A

                                            \[\leadsto {\left({\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\left(2 \cdot \frac{1}{4}\right)}\right)}^{y.re} \]
                                          5. pow-sqrN/A

                                            \[\leadsto {\left({\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\frac{1}{4}} \cdot {\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\frac{1}{4}}\right)}^{y.re} \]
                                          6. pow-prod-downN/A

                                            \[\leadsto {\left({\left(\left(x.re \cdot x.re + x.im \cdot x.im\right) \cdot \left(x.re \cdot x.re + x.im \cdot x.im\right)\right)}^{\frac{1}{4}}\right)}^{y.re} \]
                                          7. pow-unpowN/A

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

                                            \[\leadsto {\left(\left(x.re \cdot x.re + x.im \cdot x.im\right) \cdot \left(x.re \cdot x.re + x.im \cdot x.im\right)\right)}^{\left(y.re \cdot \color{blue}{\frac{1}{4}}\right)} \]
                                          9. pow-lowering-pow.f64N/A

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

                                            \[\leadsto \mathsf{pow.f64}\left(\mathsf{*.f64}\left(\left(x.re \cdot x.re + x.im \cdot x.im\right), \left(x.re \cdot x.re + x.im \cdot x.im\right)\right), \left(\color{blue}{y.re} \cdot \frac{1}{4}\right)\right) \]
                                          11. +-commutativeN/A

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

                                            \[\leadsto \mathsf{pow.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\left(x.im \cdot x.im\right), \left(x.re \cdot x.re\right)\right), \left(x.re \cdot x.re + x.im \cdot x.im\right)\right), \left(y.re \cdot \frac{1}{4}\right)\right) \]
                                          13. *-lowering-*.f64N/A

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

                                            \[\leadsto \mathsf{pow.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \mathsf{*.f64}\left(x.re, x.re\right)\right), \left(x.re \cdot x.re + x.im \cdot x.im\right)\right), \left(y.re \cdot \frac{1}{4}\right)\right) \]
                                          15. +-commutativeN/A

                                            \[\leadsto \mathsf{pow.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \mathsf{*.f64}\left(x.re, x.re\right)\right), \left(x.im \cdot x.im + x.re \cdot x.re\right)\right), \left(y.re \cdot \frac{1}{4}\right)\right) \]
                                          16. +-lowering-+.f64N/A

                                            \[\leadsto \mathsf{pow.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \mathsf{*.f64}\left(x.re, x.re\right)\right), \mathsf{+.f64}\left(\left(x.im \cdot x.im\right), \left(x.re \cdot x.re\right)\right)\right), \left(y.re \cdot \frac{1}{4}\right)\right) \]
                                          17. *-lowering-*.f64N/A

                                            \[\leadsto \mathsf{pow.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \mathsf{*.f64}\left(x.re, x.re\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \left(x.re \cdot x.re\right)\right)\right), \left(y.re \cdot \frac{1}{4}\right)\right) \]
                                          18. *-lowering-*.f64N/A

                                            \[\leadsto \mathsf{pow.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \mathsf{*.f64}\left(x.re, x.re\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \mathsf{*.f64}\left(x.re, x.re\right)\right)\right), \left(y.re \cdot \frac{1}{4}\right)\right) \]
                                          19. metadata-evalN/A

                                            \[\leadsto \mathsf{pow.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \mathsf{*.f64}\left(x.re, x.re\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \mathsf{*.f64}\left(x.re, x.re\right)\right)\right), \left(y.re \cdot \frac{1}{\color{blue}{4}}\right)\right) \]
                                          20. metadata-evalN/A

                                            \[\leadsto \mathsf{pow.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \mathsf{*.f64}\left(x.re, x.re\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \mathsf{*.f64}\left(x.re, x.re\right)\right)\right), \left(y.re \cdot \frac{1}{2 + \color{blue}{2}}\right)\right) \]
                                        3. Applied egg-rr71.1%

                                          \[\leadsto \color{blue}{{\left(\left(x.im \cdot x.im + x.re \cdot x.re\right) \cdot \left(x.im \cdot x.im + x.re \cdot x.re\right)\right)}^{\left(\frac{y.re}{4}\right)}} \]
                                      8. Recombined 3 regimes into one program.
                                      9. Final simplification64.9%

                                        \[\leadsto \begin{array}{l} \mathbf{if}\;y.re \leq -6.9 \cdot 10^{-16}:\\ \;\;\;\;{\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\left(\frac{y.re}{2}\right)}\\ \mathbf{elif}\;y.re \leq 6.5 \cdot 10^{-5}:\\ \;\;\;\;1\\ \mathbf{else}:\\ \;\;\;\;{\left(\left(x.re \cdot x.re + x.im \cdot x.im\right) \cdot \left(x.re \cdot x.re + x.im \cdot x.im\right)\right)}^{\left(\frac{y.re}{4}\right)}\\ \end{array} \]
                                      10. Add Preprocessing

                                      Alternative 11: 62.2% accurate, 6.9× speedup?

                                      \[\begin{array}{l} \\ \begin{array}{l} t_0 := {\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\left(\frac{y.re}{2}\right)}\\ \mathbf{if}\;y.re \leq -5.3 \cdot 10^{-17}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;y.re \leq 2.4 \cdot 10^{-11}:\\ \;\;\;\;1\\ \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.re) (* x.im x.im)) (/ y.re 2.0))))
                                         (if (<= y.re -5.3e-17) t_0 (if (<= y.re 2.4e-11) 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(((x_46_re * x_46_re) + (x_46_im * x_46_im)), (y_46_re / 2.0));
                                      	double tmp;
                                      	if (y_46_re <= -5.3e-17) {
                                      		tmp = t_0;
                                      	} else if (y_46_re <= 2.4e-11) {
                                      		tmp = 1.0;
                                      	} 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_46re) + (x_46im * x_46im)) ** (y_46re / 2.0d0)
                                          if (y_46re <= (-5.3d-17)) then
                                              tmp = t_0
                                          else if (y_46re <= 2.4d-11) then
                                              tmp = 1.0d0
                                          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_re) + (x_46_im * x_46_im)), (y_46_re / 2.0));
                                      	double tmp;
                                      	if (y_46_re <= -5.3e-17) {
                                      		tmp = t_0;
                                      	} else if (y_46_re <= 2.4e-11) {
                                      		tmp = 1.0;
                                      	} 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_re) + (x_46_im * x_46_im)), (y_46_re / 2.0))
                                      	tmp = 0
                                      	if y_46_re <= -5.3e-17:
                                      		tmp = t_0
                                      	elif y_46_re <= 2.4e-11:
                                      		tmp = 1.0
                                      	else:
                                      		tmp = t_0
                                      	return tmp
                                      
                                      function code(x_46_re, x_46_im, y_46_re, y_46_im)
                                      	t_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 <= -5.3e-17)
                                      		tmp = t_0;
                                      	elseif (y_46_re <= 2.4e-11)
                                      		tmp = 1.0;
                                      	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_re) + (x_46_im * x_46_im)) ^ (y_46_re / 2.0);
                                      	tmp = 0.0;
                                      	if (y_46_re <= -5.3e-17)
                                      		tmp = t_0;
                                      	elseif (y_46_re <= 2.4e-11)
                                      		tmp = 1.0;
                                      	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[(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]}, If[LessEqual[y$46$re, -5.3e-17], t$95$0, If[LessEqual[y$46$re, 2.4e-11], 1.0, t$95$0]]]
                                      
                                      \begin{array}{l}
                                      
                                      \\
                                      \begin{array}{l}
                                      t_0 := {\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\left(\frac{y.re}{2}\right)}\\
                                      \mathbf{if}\;y.re \leq -5.3 \cdot 10^{-17}:\\
                                      \;\;\;\;t\_0\\
                                      
                                      \mathbf{elif}\;y.re \leq 2.4 \cdot 10^{-11}:\\
                                      \;\;\;\;1\\
                                      
                                      \mathbf{else}:\\
                                      \;\;\;\;t\_0\\
                                      
                                      
                                      \end{array}
                                      \end{array}
                                      
                                      Derivation
                                      1. Split input into 2 regimes
                                      2. if y.re < -5.2999999999999998e-17 or 2.4000000000000001e-11 < y.re

                                        1. Initial program 47.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. 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. *-lowering-*.f64N/A

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

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

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

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

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

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

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

                                            \[\leadsto \mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(\left(\mathsf{hypot}\left(x.im, x.re\right)\right), y.re\right)\right) \]
                                          9. hypot-lowering-hypot.f6478.8%

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

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

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

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

                                              \[\leadsto {\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)}^{\color{blue}{y.re}} \]
                                            2. sqrt-pow2N/A

                                              \[\leadsto {\left(x.im \cdot x.im + x.re \cdot x.re\right)}^{\color{blue}{\left(\frac{y.re}{2}\right)}} \]
                                            3. +-commutativeN/A

                                              \[\leadsto {\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\left(\frac{\color{blue}{y.re}}{2}\right)} \]
                                            4. pow-lowering-pow.f64N/A

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

                                              \[\leadsto \mathsf{pow.f64}\left(\left(x.im \cdot x.im + x.re \cdot x.re\right), \left(\frac{\color{blue}{y.re}}{2}\right)\right) \]
                                            6. +-lowering-+.f64N/A

                                              \[\leadsto \mathsf{pow.f64}\left(\mathsf{+.f64}\left(\left(x.im \cdot x.im\right), \left(x.re \cdot x.re\right)\right), \left(\frac{\color{blue}{y.re}}{2}\right)\right) \]
                                            7. *-lowering-*.f64N/A

                                              \[\leadsto \mathsf{pow.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \left(x.re \cdot x.re\right)\right), \left(\frac{y.re}{2}\right)\right) \]
                                            8. *-lowering-*.f64N/A

                                              \[\leadsto \mathsf{pow.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \mathsf{*.f64}\left(x.re, x.re\right)\right), \left(\frac{y.re}{2}\right)\right) \]
                                            9. /-lowering-/.f6476.3%

                                              \[\leadsto \mathsf{pow.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \mathsf{*.f64}\left(x.re, x.re\right)\right), \mathsf{/.f64}\left(y.re, \color{blue}{2}\right)\right) \]
                                          3. Applied egg-rr76.3%

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

                                          if -5.2999999999999998e-17 < y.re < 2.4000000000000001e-11

                                          1. Initial program 38.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. *-lowering-*.f64N/A

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

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

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

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

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

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

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

                                              \[\leadsto \mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(\left(\mathsf{hypot}\left(x.im, x.re\right)\right), y.re\right)\right) \]
                                            9. hypot-lowering-hypot.f6452.0%

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

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

                                            \[\leadsto \color{blue}{1} \]
                                          7. Step-by-step derivation
                                            1. Simplified52.0%

                                              \[\leadsto \color{blue}{1} \]
                                          8. Recombined 2 regimes into one program.
                                          9. Final simplification64.9%

                                            \[\leadsto \begin{array}{l} \mathbf{if}\;y.re \leq -5.3 \cdot 10^{-17}:\\ \;\;\;\;{\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\left(\frac{y.re}{2}\right)}\\ \mathbf{elif}\;y.re \leq 2.4 \cdot 10^{-11}:\\ \;\;\;\;1\\ \mathbf{else}:\\ \;\;\;\;{\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\left(\frac{y.re}{2}\right)}\\ \end{array} \]
                                          10. Add Preprocessing

                                          Alternative 12: 56.3% accurate, 7.1× speedup?

                                          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x.re \leq -2.6 \cdot 10^{-164}:\\ \;\;\;\;{\left(0 - x.re\right)}^{y.re}\\ \mathbf{elif}\;x.re \leq 2.3 \cdot 10^{-180}:\\ \;\;\;\;{\left(x.im \cdot x.im\right)}^{\left(\frac{y.re}{2}\right)}\\ \mathbf{else}:\\ \;\;\;\;{x.re}^{y.re}\\ \end{array} \end{array} \]
                                          (FPCore (x.re x.im y.re y.im)
                                           :precision binary64
                                           (if (<= x.re -2.6e-164)
                                             (pow (- 0.0 x.re) y.re)
                                             (if (<= x.re 2.3e-180) (pow (* x.im x.im) (/ y.re 2.0)) (pow x.re y.re))))
                                          double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
                                          	double tmp;
                                          	if (x_46_re <= -2.6e-164) {
                                          		tmp = pow((0.0 - x_46_re), y_46_re);
                                          	} else if (x_46_re <= 2.3e-180) {
                                          		tmp = pow((x_46_im * x_46_im), (y_46_re / 2.0));
                                          	} else {
                                          		tmp = pow(x_46_re, 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 (x_46re <= (-2.6d-164)) then
                                                  tmp = (0.0d0 - x_46re) ** y_46re
                                              else if (x_46re <= 2.3d-180) then
                                                  tmp = (x_46im * x_46im) ** (y_46re / 2.0d0)
                                              else
                                                  tmp = x_46re ** 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 (x_46_re <= -2.6e-164) {
                                          		tmp = Math.pow((0.0 - x_46_re), y_46_re);
                                          	} else if (x_46_re <= 2.3e-180) {
                                          		tmp = Math.pow((x_46_im * x_46_im), (y_46_re / 2.0));
                                          	} else {
                                          		tmp = Math.pow(x_46_re, y_46_re);
                                          	}
                                          	return tmp;
                                          }
                                          
                                          def code(x_46_re, x_46_im, y_46_re, y_46_im):
                                          	tmp = 0
                                          	if x_46_re <= -2.6e-164:
                                          		tmp = math.pow((0.0 - x_46_re), y_46_re)
                                          	elif x_46_re <= 2.3e-180:
                                          		tmp = math.pow((x_46_im * x_46_im), (y_46_re / 2.0))
                                          	else:
                                          		tmp = math.pow(x_46_re, y_46_re)
                                          	return tmp
                                          
                                          function code(x_46_re, x_46_im, y_46_re, y_46_im)
                                          	tmp = 0.0
                                          	if (x_46_re <= -2.6e-164)
                                          		tmp = Float64(0.0 - x_46_re) ^ y_46_re;
                                          	elseif (x_46_re <= 2.3e-180)
                                          		tmp = Float64(x_46_im * x_46_im) ^ Float64(y_46_re / 2.0);
                                          	else
                                          		tmp = x_46_re ^ 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 (x_46_re <= -2.6e-164)
                                          		tmp = (0.0 - x_46_re) ^ y_46_re;
                                          	elseif (x_46_re <= 2.3e-180)
                                          		tmp = (x_46_im * x_46_im) ^ (y_46_re / 2.0);
                                          	else
                                          		tmp = x_46_re ^ y_46_re;
                                          	end
                                          	tmp_2 = tmp;
                                          end
                                          
                                          code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[x$46$re, -2.6e-164], N[Power[N[(0.0 - x$46$re), $MachinePrecision], y$46$re], $MachinePrecision], If[LessEqual[x$46$re, 2.3e-180], N[Power[N[(x$46$im * x$46$im), $MachinePrecision], N[(y$46$re / 2.0), $MachinePrecision]], $MachinePrecision], N[Power[x$46$re, y$46$re], $MachinePrecision]]]
                                          
                                          \begin{array}{l}
                                          
                                          \\
                                          \begin{array}{l}
                                          \mathbf{if}\;x.re \leq -2.6 \cdot 10^{-164}:\\
                                          \;\;\;\;{\left(0 - x.re\right)}^{y.re}\\
                                          
                                          \mathbf{elif}\;x.re \leq 2.3 \cdot 10^{-180}:\\
                                          \;\;\;\;{\left(x.im \cdot x.im\right)}^{\left(\frac{y.re}{2}\right)}\\
                                          
                                          \mathbf{else}:\\
                                          \;\;\;\;{x.re}^{y.re}\\
                                          
                                          
                                          \end{array}
                                          \end{array}
                                          
                                          Derivation
                                          1. Split input into 3 regimes
                                          2. if x.re < -2.6000000000000002e-164

                                            1. Initial program 48.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. 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. *-lowering-*.f64N/A

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

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

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

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

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

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

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

                                                \[\leadsto \mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(\left(\mathsf{hypot}\left(x.im, x.re\right)\right), y.re\right)\right) \]
                                              9. hypot-lowering-hypot.f6466.2%

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

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

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

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

                                                \[\leadsto \mathsf{*.f64}\left(1, \mathsf{pow.f64}\left(\color{blue}{\left(-1 \cdot x.re\right)}, y.re\right)\right) \]
                                              3. Step-by-step derivation
                                                1. mul-1-negN/A

                                                  \[\leadsto \mathsf{*.f64}\left(1, \mathsf{pow.f64}\left(\left(\mathsf{neg}\left(x.re\right)\right), y.re\right)\right) \]
                                                2. neg-sub0N/A

                                                  \[\leadsto \mathsf{*.f64}\left(1, \mathsf{pow.f64}\left(\left(0 - x.re\right), y.re\right)\right) \]
                                                3. --lowering--.f6459.3%

                                                  \[\leadsto \mathsf{*.f64}\left(1, \mathsf{pow.f64}\left(\mathsf{\_.f64}\left(0, x.re\right), y.re\right)\right) \]
                                              4. Simplified59.3%

                                                \[\leadsto 1 \cdot {\color{blue}{\left(0 - x.re\right)}}^{y.re} \]

                                              if -2.6000000000000002e-164 < x.re < 2.29999999999999996e-180

                                              1. Initial program 44.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.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. *-lowering-*.f64N/A

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

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

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

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

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

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

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

                                                  \[\leadsto \mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(\left(\mathsf{hypot}\left(x.im, x.re\right)\right), y.re\right)\right) \]
                                                9. hypot-lowering-hypot.f6458.2%

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

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

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

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

                                                  \[\leadsto \color{blue}{{x.im}^{y.re}} \]
                                                3. Step-by-step derivation
                                                  1. pow-lowering-pow.f6458.0%

                                                    \[\leadsto \mathsf{pow.f64}\left(x.im, \color{blue}{y.re}\right) \]
                                                4. Simplified58.0%

                                                  \[\leadsto \color{blue}{{x.im}^{y.re}} \]
                                                5. Step-by-step derivation
                                                  1. sqr-powN/A

                                                    \[\leadsto {x.im}^{\left(\frac{y.re}{2}\right)} \cdot \color{blue}{{x.im}^{\left(\frac{y.re}{2}\right)}} \]
                                                  2. unpow-prod-downN/A

                                                    \[\leadsto {\left(x.im \cdot x.im\right)}^{\color{blue}{\left(\frac{y.re}{2}\right)}} \]
                                                  3. pow-lowering-pow.f64N/A

                                                    \[\leadsto \mathsf{pow.f64}\left(\left(x.im \cdot x.im\right), \color{blue}{\left(\frac{y.re}{2}\right)}\right) \]
                                                  4. *-lowering-*.f64N/A

                                                    \[\leadsto \mathsf{pow.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \left(\frac{\color{blue}{y.re}}{2}\right)\right) \]
                                                  5. /-lowering-/.f6466.5%

                                                    \[\leadsto \mathsf{pow.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \mathsf{/.f64}\left(y.re, \color{blue}{2}\right)\right) \]
                                                6. Applied egg-rr66.5%

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

                                                if 2.29999999999999996e-180 < x.re

                                                1. Initial program 37.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. *-lowering-*.f64N/A

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

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

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

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

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

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

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

                                                    \[\leadsto \mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(\left(\mathsf{hypot}\left(x.im, x.re\right)\right), y.re\right)\right) \]
                                                  9. hypot-lowering-hypot.f6469.8%

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

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

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

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

                                                    \[\leadsto \color{blue}{{x.re}^{y.re}} \]
                                                  3. Step-by-step derivation
                                                    1. pow-lowering-pow.f6466.4%

                                                      \[\leadsto \mathsf{pow.f64}\left(x.re, \color{blue}{y.re}\right) \]
                                                  4. Simplified66.4%

                                                    \[\leadsto \color{blue}{{x.re}^{y.re}} \]
                                                8. Recombined 3 regimes into one program.
                                                9. Final simplification63.7%

                                                  \[\leadsto \begin{array}{l} \mathbf{if}\;x.re \leq -2.6 \cdot 10^{-164}:\\ \;\;\;\;{\left(0 - x.re\right)}^{y.re}\\ \mathbf{elif}\;x.re \leq 2.3 \cdot 10^{-180}:\\ \;\;\;\;{\left(x.im \cdot x.im\right)}^{\left(\frac{y.re}{2}\right)}\\ \mathbf{else}:\\ \;\;\;\;{x.re}^{y.re}\\ \end{array} \]
                                                10. Add Preprocessing

                                                Alternative 13: 55.1% accurate, 7.4× speedup?

                                                \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x.re \leq -3.6 \cdot 10^{-205}:\\ \;\;\;\;{\left(0 - x.re\right)}^{y.re}\\ \mathbf{elif}\;x.re \leq 2.9 \cdot 10^{-180}:\\ \;\;\;\;{x.im}^{y.re}\\ \mathbf{else}:\\ \;\;\;\;{x.re}^{y.re}\\ \end{array} \end{array} \]
                                                (FPCore (x.re x.im y.re y.im)
                                                 :precision binary64
                                                 (if (<= x.re -3.6e-205)
                                                   (pow (- 0.0 x.re) y.re)
                                                   (if (<= x.re 2.9e-180) (pow x.im y.re) (pow x.re y.re))))
                                                double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
                                                	double tmp;
                                                	if (x_46_re <= -3.6e-205) {
                                                		tmp = pow((0.0 - x_46_re), y_46_re);
                                                	} else if (x_46_re <= 2.9e-180) {
                                                		tmp = pow(x_46_im, y_46_re);
                                                	} else {
                                                		tmp = pow(x_46_re, 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 (x_46re <= (-3.6d-205)) then
                                                        tmp = (0.0d0 - x_46re) ** y_46re
                                                    else if (x_46re <= 2.9d-180) then
                                                        tmp = x_46im ** y_46re
                                                    else
                                                        tmp = x_46re ** 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 (x_46_re <= -3.6e-205) {
                                                		tmp = Math.pow((0.0 - x_46_re), y_46_re);
                                                	} else if (x_46_re <= 2.9e-180) {
                                                		tmp = Math.pow(x_46_im, y_46_re);
                                                	} else {
                                                		tmp = Math.pow(x_46_re, y_46_re);
                                                	}
                                                	return tmp;
                                                }
                                                
                                                def code(x_46_re, x_46_im, y_46_re, y_46_im):
                                                	tmp = 0
                                                	if x_46_re <= -3.6e-205:
                                                		tmp = math.pow((0.0 - x_46_re), y_46_re)
                                                	elif x_46_re <= 2.9e-180:
                                                		tmp = math.pow(x_46_im, y_46_re)
                                                	else:
                                                		tmp = math.pow(x_46_re, y_46_re)
                                                	return tmp
                                                
                                                function code(x_46_re, x_46_im, y_46_re, y_46_im)
                                                	tmp = 0.0
                                                	if (x_46_re <= -3.6e-205)
                                                		tmp = Float64(0.0 - x_46_re) ^ y_46_re;
                                                	elseif (x_46_re <= 2.9e-180)
                                                		tmp = x_46_im ^ y_46_re;
                                                	else
                                                		tmp = x_46_re ^ 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 (x_46_re <= -3.6e-205)
                                                		tmp = (0.0 - x_46_re) ^ y_46_re;
                                                	elseif (x_46_re <= 2.9e-180)
                                                		tmp = x_46_im ^ y_46_re;
                                                	else
                                                		tmp = x_46_re ^ y_46_re;
                                                	end
                                                	tmp_2 = tmp;
                                                end
                                                
                                                code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[x$46$re, -3.6e-205], N[Power[N[(0.0 - x$46$re), $MachinePrecision], y$46$re], $MachinePrecision], If[LessEqual[x$46$re, 2.9e-180], N[Power[x$46$im, y$46$re], $MachinePrecision], N[Power[x$46$re, y$46$re], $MachinePrecision]]]
                                                
                                                \begin{array}{l}
                                                
                                                \\
                                                \begin{array}{l}
                                                \mathbf{if}\;x.re \leq -3.6 \cdot 10^{-205}:\\
                                                \;\;\;\;{\left(0 - x.re\right)}^{y.re}\\
                                                
                                                \mathbf{elif}\;x.re \leq 2.9 \cdot 10^{-180}:\\
                                                \;\;\;\;{x.im}^{y.re}\\
                                                
                                                \mathbf{else}:\\
                                                \;\;\;\;{x.re}^{y.re}\\
                                                
                                                
                                                \end{array}
                                                \end{array}
                                                
                                                Derivation
                                                1. Split input into 3 regimes
                                                2. if x.re < -3.5999999999999998e-205

                                                  1. Initial program 48.5%

                                                    \[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. *-lowering-*.f64N/A

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

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

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

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

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

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

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

                                                      \[\leadsto \mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(\left(\mathsf{hypot}\left(x.im, x.re\right)\right), y.re\right)\right) \]
                                                    9. hypot-lowering-hypot.f6466.3%

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

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

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

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

                                                      \[\leadsto \mathsf{*.f64}\left(1, \mathsf{pow.f64}\left(\color{blue}{\left(-1 \cdot x.re\right)}, y.re\right)\right) \]
                                                    3. Step-by-step derivation
                                                      1. mul-1-negN/A

                                                        \[\leadsto \mathsf{*.f64}\left(1, \mathsf{pow.f64}\left(\left(\mathsf{neg}\left(x.re\right)\right), y.re\right)\right) \]
                                                      2. neg-sub0N/A

                                                        \[\leadsto \mathsf{*.f64}\left(1, \mathsf{pow.f64}\left(\left(0 - x.re\right), y.re\right)\right) \]
                                                      3. --lowering--.f6458.6%

                                                        \[\leadsto \mathsf{*.f64}\left(1, \mathsf{pow.f64}\left(\mathsf{\_.f64}\left(0, x.re\right), y.re\right)\right) \]
                                                    4. Simplified58.6%

                                                      \[\leadsto 1 \cdot {\color{blue}{\left(0 - x.re\right)}}^{y.re} \]

                                                    if -3.5999999999999998e-205 < x.re < 2.8999999999999998e-180

                                                    1. Initial program 43.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 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. *-lowering-*.f64N/A

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

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

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

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

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

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

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

                                                        \[\leadsto \mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(\left(\mathsf{hypot}\left(x.im, x.re\right)\right), y.re\right)\right) \]
                                                      9. hypot-lowering-hypot.f6457.6%

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

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

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

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

                                                        \[\leadsto \color{blue}{{x.im}^{y.re}} \]
                                                      3. Step-by-step derivation
                                                        1. pow-lowering-pow.f6459.6%

                                                          \[\leadsto \mathsf{pow.f64}\left(x.im, \color{blue}{y.re}\right) \]
                                                      4. Simplified59.6%

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

                                                      if 2.8999999999999998e-180 < x.re

                                                      1. Initial program 37.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. *-lowering-*.f64N/A

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

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

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

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

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

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

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

                                                          \[\leadsto \mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(\left(\mathsf{hypot}\left(x.im, x.re\right)\right), y.re\right)\right) \]
                                                        9. hypot-lowering-hypot.f6469.8%

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

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

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

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

                                                          \[\leadsto \color{blue}{{x.re}^{y.re}} \]
                                                        3. Step-by-step derivation
                                                          1. pow-lowering-pow.f6466.4%

                                                            \[\leadsto \mathsf{pow.f64}\left(x.re, \color{blue}{y.re}\right) \]
                                                        4. Simplified66.4%

                                                          \[\leadsto \color{blue}{{x.re}^{y.re}} \]
                                                      8. Recombined 3 regimes into one program.
                                                      9. Final simplification62.1%

                                                        \[\leadsto \begin{array}{l} \mathbf{if}\;x.re \leq -3.6 \cdot 10^{-205}:\\ \;\;\;\;{\left(0 - x.re\right)}^{y.re}\\ \mathbf{elif}\;x.re \leq 2.9 \cdot 10^{-180}:\\ \;\;\;\;{x.im}^{y.re}\\ \mathbf{else}:\\ \;\;\;\;{x.re}^{y.re}\\ \end{array} \]
                                                      10. Add Preprocessing

                                                      Alternative 14: 53.1% accurate, 7.4× speedup?

                                                      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y.re \leq -1.3 \cdot 10^{-8}:\\ \;\;\;\;{x.re}^{y.re}\\ \mathbf{elif}\;y.re \leq 9.5 \cdot 10^{-6}:\\ \;\;\;\;1\\ \mathbf{else}:\\ \;\;\;\;{x.re}^{y.re}\\ \end{array} \end{array} \]
                                                      (FPCore (x.re x.im y.re y.im)
                                                       :precision binary64
                                                       (if (<= y.re -1.3e-8)
                                                         (pow x.re y.re)
                                                         (if (<= y.re 9.5e-6) 1.0 (pow x.re y.re))))
                                                      double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
                                                      	double tmp;
                                                      	if (y_46_re <= -1.3e-8) {
                                                      		tmp = pow(x_46_re, y_46_re);
                                                      	} else if (y_46_re <= 9.5e-6) {
                                                      		tmp = 1.0;
                                                      	} else {
                                                      		tmp = pow(x_46_re, 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 <= (-1.3d-8)) then
                                                              tmp = x_46re ** y_46re
                                                          else if (y_46re <= 9.5d-6) then
                                                              tmp = 1.0d0
                                                          else
                                                              tmp = x_46re ** 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 <= -1.3e-8) {
                                                      		tmp = Math.pow(x_46_re, y_46_re);
                                                      	} else if (y_46_re <= 9.5e-6) {
                                                      		tmp = 1.0;
                                                      	} else {
                                                      		tmp = Math.pow(x_46_re, 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 <= -1.3e-8:
                                                      		tmp = math.pow(x_46_re, y_46_re)
                                                      	elif y_46_re <= 9.5e-6:
                                                      		tmp = 1.0
                                                      	else:
                                                      		tmp = math.pow(x_46_re, y_46_re)
                                                      	return tmp
                                                      
                                                      function code(x_46_re, x_46_im, y_46_re, y_46_im)
                                                      	tmp = 0.0
                                                      	if (y_46_re <= -1.3e-8)
                                                      		tmp = x_46_re ^ y_46_re;
                                                      	elseif (y_46_re <= 9.5e-6)
                                                      		tmp = 1.0;
                                                      	else
                                                      		tmp = x_46_re ^ 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 <= -1.3e-8)
                                                      		tmp = x_46_re ^ y_46_re;
                                                      	elseif (y_46_re <= 9.5e-6)
                                                      		tmp = 1.0;
                                                      	else
                                                      		tmp = x_46_re ^ 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, -1.3e-8], N[Power[x$46$re, y$46$re], $MachinePrecision], If[LessEqual[y$46$re, 9.5e-6], 1.0, N[Power[x$46$re, y$46$re], $MachinePrecision]]]
                                                      
                                                      \begin{array}{l}
                                                      
                                                      \\
                                                      \begin{array}{l}
                                                      \mathbf{if}\;y.re \leq -1.3 \cdot 10^{-8}:\\
                                                      \;\;\;\;{x.re}^{y.re}\\
                                                      
                                                      \mathbf{elif}\;y.re \leq 9.5 \cdot 10^{-6}:\\
                                                      \;\;\;\;1\\
                                                      
                                                      \mathbf{else}:\\
                                                      \;\;\;\;{x.re}^{y.re}\\
                                                      
                                                      
                                                      \end{array}
                                                      \end{array}
                                                      
                                                      Derivation
                                                      1. Split input into 2 regimes
                                                      2. if y.re < -1.3000000000000001e-8 or 9.5000000000000005e-6 < y.re

                                                        1. Initial program 47.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. 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. *-lowering-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

                                                            \[\leadsto \color{blue}{{x.re}^{y.re}} \]
                                                          3. Step-by-step derivation
                                                            1. pow-lowering-pow.f6466.2%

                                                              \[\leadsto \mathsf{pow.f64}\left(x.re, \color{blue}{y.re}\right) \]
                                                          4. Simplified66.2%

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

                                                          if -1.3000000000000001e-8 < y.re < 9.5000000000000005e-6

                                                          1. Initial program 38.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. *-lowering-*.f64N/A

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

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

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

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

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

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

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

                                                              \[\leadsto \mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(\left(\mathsf{hypot}\left(x.im, x.re\right)\right), y.re\right)\right) \]
                                                            9. hypot-lowering-hypot.f6451.2%

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

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

                                                            \[\leadsto \color{blue}{1} \]
                                                          7. Step-by-step derivation
                                                            1. Simplified51.2%

                                                              \[\leadsto \color{blue}{1} \]
                                                          8. Recombined 2 regimes into one program.
                                                          9. Add Preprocessing

                                                          Alternative 15: 52.2% accurate, 7.4× speedup?

                                                          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y.re \leq -0.00047:\\ \;\;\;\;{x.im}^{y.re}\\ \mathbf{elif}\;y.re \leq 5.4 \cdot 10^{-26}:\\ \;\;\;\;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.00047)
                                                             (pow x.im y.re)
                                                             (if (<= y.re 5.4e-26) 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.00047) {
                                                          		tmp = pow(x_46_im, y_46_re);
                                                          	} else if (y_46_re <= 5.4e-26) {
                                                          		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.00047d0)) then
                                                                  tmp = x_46im ** y_46re
                                                              else if (y_46re <= 5.4d-26) 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.00047) {
                                                          		tmp = Math.pow(x_46_im, y_46_re);
                                                          	} else if (y_46_re <= 5.4e-26) {
                                                          		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.00047:
                                                          		tmp = math.pow(x_46_im, y_46_re)
                                                          	elif y_46_re <= 5.4e-26:
                                                          		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.00047)
                                                          		tmp = x_46_im ^ y_46_re;
                                                          	elseif (y_46_re <= 5.4e-26)
                                                          		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.00047)
                                                          		tmp = x_46_im ^ y_46_re;
                                                          	elseif (y_46_re <= 5.4e-26)
                                                          		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.00047], N[Power[x$46$im, y$46$re], $MachinePrecision], If[LessEqual[y$46$re, 5.4e-26], 1.0, N[Power[x$46$im, y$46$re], $MachinePrecision]]]
                                                          
                                                          \begin{array}{l}
                                                          
                                                          \\
                                                          \begin{array}{l}
                                                          \mathbf{if}\;y.re \leq -0.00047:\\
                                                          \;\;\;\;{x.im}^{y.re}\\
                                                          
                                                          \mathbf{elif}\;y.re \leq 5.4 \cdot 10^{-26}:\\
                                                          \;\;\;\;1\\
                                                          
                                                          \mathbf{else}:\\
                                                          \;\;\;\;{x.im}^{y.re}\\
                                                          
                                                          
                                                          \end{array}
                                                          \end{array}
                                                          
                                                          Derivation
                                                          1. Split input into 2 regimes
                                                          2. if y.re < -4.69999999999999986e-4 or 5.39999999999999963e-26 < y.re

                                                            1. Initial program 46.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.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. *-lowering-*.f64N/A

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

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

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

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

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

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

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

                                                                \[\leadsto \mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(\left(\mathsf{hypot}\left(x.im, x.re\right)\right), y.re\right)\right) \]
                                                              9. hypot-lowering-hypot.f6479.4%

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

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

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

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

                                                                \[\leadsto \color{blue}{{x.im}^{y.re}} \]
                                                              3. Step-by-step derivation
                                                                1. pow-lowering-pow.f6452.0%

                                                                  \[\leadsto \mathsf{pow.f64}\left(x.im, \color{blue}{y.re}\right) \]
                                                              4. Simplified52.0%

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

                                                              if -4.69999999999999986e-4 < y.re < 5.39999999999999963e-26

                                                              1. Initial program 38.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. *-lowering-*.f64N/A

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

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

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

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

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

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

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

                                                                  \[\leadsto \mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(\left(\mathsf{hypot}\left(x.im, x.re\right)\right), y.re\right)\right) \]
                                                                9. hypot-lowering-hypot.f6451.6%

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

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

                                                                \[\leadsto \color{blue}{1} \]
                                                              7. Step-by-step derivation
                                                                1. Simplified51.6%

                                                                  \[\leadsto \color{blue}{1} \]
                                                              8. Recombined 2 regimes into one program.
                                                              9. Add Preprocessing

                                                              Alternative 16: 26.3% 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 43.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. 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. *-lowering-*.f64N/A

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

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

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

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

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

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

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

                                                                  \[\leadsto \mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(\left(\mathsf{hypot}\left(x.im, x.re\right)\right), y.re\right)\right) \]
                                                                9. hypot-lowering-hypot.f6466.3%

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

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

                                                                \[\leadsto \color{blue}{1} \]
                                                              7. Step-by-step derivation
                                                                1. Simplified25.9%

                                                                  \[\leadsto \color{blue}{1} \]
                                                                2. Add Preprocessing

                                                                Reproduce

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