powComplex, real part

Percentage Accurate: 40.9% → 75.8%
Time: 19.4s
Alternatives: 17
Speedup: 7.4×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 17 alternatives:

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

Initial Program: 40.9% 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: 75.8% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;y.im \leq -2 \cdot 10^{+16}:\\
\;\;\;\;\frac{1}{t\_3}\\

\mathbf{elif}\;y.im \leq 6.4 \cdot 10^{+154}:\\
\;\;\;\;\frac{\left(-0.5 \cdot \left(y.im \cdot y.im\right)\right) \cdot {t\_0}^{2} + 1}{t\_3}\\

\mathbf{else}:\\
\;\;\;\;\frac{1}{t\_2}\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y.im < -1.34999999999999998e191

    1. Initial program 42.9%

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

      \[\leadsto \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}{\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)}\right) \]
    4. Step-by-step derivation
      1. +-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{+.f64}\left(\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right), \color{blue}{\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)\right) \]
      2. 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{+.f64}\left(\mathsf{cos.f64}\left(\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right), \left(\color{blue}{-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)\right) \]
      3. *-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{+.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)\right) \]
      4. atan2-lowering-atan2.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{+.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)\right) \]
      5. mul-1-negN/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{+.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)\right) \]
      6. neg-lowering-neg.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{+.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)\right) \]
      7. associate-*r*N/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{+.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)\right) \]
      8. *-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{+.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)\right) \]
    5. Simplified74.5%

      \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \color{blue}{\left(\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)\right)} \]
    6. Taylor expanded in y.re around 0

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{\_.f64}\left(0, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right), \mathsf{+.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, \color{blue}{x.re}\right)\right)\right), \mathsf{neg.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right)\right)\right)\right) \]
    8. Simplified80.1%

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

    if -1.34999999999999998e191 < y.im < -2e16

    1. Initial program 34.1%

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

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

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

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

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

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

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

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

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

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

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

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

      if -2e16 < y.im < 6.4e154

      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. 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. Simplified78.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.f6484.4%

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

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

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

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

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

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

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

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

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

          \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(y.im, y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{log.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right), 2\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) \]
        9. unpow2N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(y.im, y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right)\right), 2\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) \]
        10. unpow2N/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(y.im, y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)\right), 2\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) \]
        11. hypot-defineN/A

          \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(y.im, y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{log.f64}\left(\left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right), 2\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) \]
        12. hypot-lowering-hypot.f6489.3%

          \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(y.im, y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right), 2\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) \]
      10. Simplified89.3%

        \[\leadsto \frac{\color{blue}{1 + \left(-0.5 \cdot \left(y.im \cdot y.im\right)\right) \cdot {\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{2}}}{\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.4e154 < y.im

      1. Initial program 25.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. Step-by-step derivation
        1. exp-diffN/A

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \mathsf{/.f64}\left(1, \color{blue}{\left(e^{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\right)}\right) \]
        3. Step-by-step derivation
          1. exp-lowering-exp.f64N/A

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

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

            \[\leadsto \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
        4. Simplified71.7%

          \[\leadsto \frac{1}{\color{blue}{e^{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}}} \]
      10. Recombined 4 regimes into one program.
      11. Final simplification82.3%

        \[\leadsto \begin{array}{l} \mathbf{if}\;y.im \leq -1.35 \cdot 10^{+191}:\\ \;\;\;\;\left(\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)\right) \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(0 - y.im\right)}\\ \mathbf{elif}\;y.im \leq -2 \cdot 10^{+16}:\\ \;\;\;\;\frac{1}{\frac{e^{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}}{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}}\\ \mathbf{elif}\;y.im \leq 6.4 \cdot 10^{+154}:\\ \;\;\;\;\frac{\left(-0.5 \cdot \left(y.im \cdot y.im\right)\right) \cdot {\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{2} + 1}{\frac{e^{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}}{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{e^{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}}\\ \end{array} \]
      12. Add Preprocessing

      Alternative 2: 75.4% accurate, 0.8× speedup?

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

        1. Initial program 38.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 \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}{\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)}\right) \]
        4. Step-by-step derivation
          1. +-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{+.f64}\left(\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right), \color{blue}{\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)\right) \]
          2. 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{+.f64}\left(\mathsf{cos.f64}\left(\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right), \left(\color{blue}{-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)\right) \]
          3. *-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{+.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)\right) \]
          4. atan2-lowering-atan2.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{+.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)\right) \]
          5. mul-1-negN/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{+.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)\right) \]
          6. neg-lowering-neg.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{+.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)\right) \]
          7. associate-*r*N/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{+.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)\right) \]
          8. *-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{+.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)\right) \]
        5. Simplified69.9%

          \[\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}{\left(\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)\right)} \]

        if -2e15 < y.im < 6.4e154

        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. 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. Simplified78.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.f6484.4%

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

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

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

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

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

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

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

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

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

            \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(y.im, y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{log.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right), 2\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) \]
          9. unpow2N/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(y.im, y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right)\right), 2\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) \]
          10. unpow2N/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(y.im, y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)\right), 2\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) \]
          11. hypot-defineN/A

            \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(y.im, y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{log.f64}\left(\left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right), 2\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) \]
          12. hypot-lowering-hypot.f6489.3%

            \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(y.im, y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right), 2\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) \]
        10. Simplified89.3%

          \[\leadsto \frac{\color{blue}{1 + \left(-0.5 \cdot \left(y.im \cdot y.im\right)\right) \cdot {\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{2}}}{\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.4e154 < y.im

        1. Initial program 25.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. Step-by-step derivation
          1. exp-diffN/A

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \mathsf{/.f64}\left(1, \color{blue}{\left(e^{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\right)}\right) \]
          3. Step-by-step derivation
            1. exp-lowering-exp.f64N/A

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

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

              \[\leadsto \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
          4. Simplified71.7%

            \[\leadsto \frac{1}{\color{blue}{e^{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}}} \]
        10. Recombined 3 regimes into one program.
        11. Final simplification81.1%

          \[\leadsto \begin{array}{l} \mathbf{if}\;y.im \leq -2 \cdot 10^{+15}:\\ \;\;\;\;e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \left(\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)\right)\\ \mathbf{elif}\;y.im \leq 6.4 \cdot 10^{+154}:\\ \;\;\;\;\frac{\left(-0.5 \cdot \left(y.im \cdot y.im\right)\right) \cdot {\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{2} + 1}{\frac{e^{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}}{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{e^{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}}\\ \end{array} \]
        12. Add Preprocessing

        Alternative 3: 75.0% accurate, 1.1× speedup?

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

          1. Initial program 38.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{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. Simplified55.9%

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

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

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

            if -1.35e14 < y.im < 6.5000000000000005e154

            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. 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. Simplified78.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.f6484.4%

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

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

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

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

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

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

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

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

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

                \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(y.im, y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{log.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right), 2\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) \]
              9. unpow2N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(y.im, y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right)\right), 2\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) \]
              10. unpow2N/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(y.im, y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)\right), 2\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) \]
              11. hypot-defineN/A

                \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(y.im, y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{log.f64}\left(\left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right), 2\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) \]
              12. hypot-lowering-hypot.f6489.3%

                \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{-1}{2}, \mathsf{*.f64}\left(y.im, y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right), 2\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) \]
            10. Simplified89.3%

              \[\leadsto \frac{\color{blue}{1 + \left(-0.5 \cdot \left(y.im \cdot y.im\right)\right) \cdot {\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{2}}}{\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.5000000000000005e154 < y.im

            1. Initial program 25.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. Step-by-step derivation
              1. exp-diffN/A

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \mathsf{/.f64}\left(1, \color{blue}{\left(e^{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\right)}\right) \]
              3. Step-by-step derivation
                1. exp-lowering-exp.f64N/A

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

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

                  \[\leadsto \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
              4. Simplified71.7%

                \[\leadsto \frac{1}{\color{blue}{e^{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}}} \]
            10. Recombined 3 regimes into one program.
            11. Final simplification80.3%

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

            Alternative 4: 75.7% accurate, 1.1× speedup?

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

              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. 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. Simplified74.9%

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

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

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

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

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

                if 4.4e14 < y.im < 1.30000000000000007e146

                1. Initial program 36.1%

                  \[e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \]
                2. Add Preprocessing
                3. Taylor expanded in y.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.f6468.3%

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

                  \[\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 1.30000000000000007e146 < y.im

                1. Initial program 23.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. 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. Simplified50.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.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.f6452.6%

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

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

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

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

                    \[\leadsto \mathsf{/.f64}\left(1, \color{blue}{\left(e^{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\right)}\right) \]
                  3. Step-by-step derivation
                    1. exp-lowering-exp.f64N/A

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

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

                      \[\leadsto \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
                  4. Simplified68.7%

                    \[\leadsto \frac{1}{\color{blue}{e^{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}}} \]
                10. Recombined 3 regimes into one program.
                11. Final simplification79.0%

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

                Alternative 5: 76.5% accurate, 1.3× speedup?

                \[\begin{array}{l} \\ \begin{array}{l} t_0 := \log \left(\frac{1}{x.re}\right)\\ t_1 := y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\\ t_2 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\ \mathbf{if}\;x.re \leq -6 \cdot 10^{+108}:\\ \;\;\;\;\cos t\_2 \cdot e^{\left(0 - y.re\right) \cdot \log \left(\frac{-1}{x.re}\right) - t\_1}\\ \mathbf{elif}\;x.re \leq 2.6 \cdot 10^{-31}:\\ \;\;\;\;\frac{1}{\frac{e^{t\_1}}{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}}\\ \mathbf{else}:\\ \;\;\;\;\cos \left(t\_2 - y.im \cdot t\_0\right) \cdot e^{\left(0 - y.re\right) \cdot t\_0 - t\_1}\\ \end{array} \end{array} \]
                (FPCore (x.re x.im y.re y.im)
                 :precision binary64
                 (let* ((t_0 (log (/ 1.0 x.re)))
                        (t_1 (* y.im (atan2 x.im x.re)))
                        (t_2 (* y.re (atan2 x.im x.re))))
                   (if (<= x.re -6e+108)
                     (* (cos t_2) (exp (- (* (- 0.0 y.re) (log (/ -1.0 x.re))) t_1)))
                     (if (<= x.re 2.6e-31)
                       (/ 1.0 (/ (exp t_1) (pow (hypot x.re x.im) y.re)))
                       (* (cos (- t_2 (* y.im t_0))) (exp (- (* (- 0.0 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 = log((1.0 / x_46_re));
                	double t_1 = y_46_im * atan2(x_46_im, x_46_re);
                	double t_2 = y_46_re * atan2(x_46_im, x_46_re);
                	double tmp;
                	if (x_46_re <= -6e+108) {
                		tmp = cos(t_2) * exp((((0.0 - y_46_re) * log((-1.0 / x_46_re))) - t_1));
                	} else if (x_46_re <= 2.6e-31) {
                		tmp = 1.0 / (exp(t_1) / pow(hypot(x_46_re, x_46_im), y_46_re));
                	} else {
                		tmp = cos((t_2 - (y_46_im * t_0))) * exp((((0.0 - y_46_re) * 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.log((1.0 / x_46_re));
                	double t_1 = y_46_im * Math.atan2(x_46_im, x_46_re);
                	double t_2 = y_46_re * Math.atan2(x_46_im, x_46_re);
                	double tmp;
                	if (x_46_re <= -6e+108) {
                		tmp = Math.cos(t_2) * Math.exp((((0.0 - y_46_re) * Math.log((-1.0 / x_46_re))) - t_1));
                	} else if (x_46_re <= 2.6e-31) {
                		tmp = 1.0 / (Math.exp(t_1) / Math.pow(Math.hypot(x_46_re, x_46_im), y_46_re));
                	} else {
                		tmp = Math.cos((t_2 - (y_46_im * t_0))) * Math.exp((((0.0 - y_46_re) * t_0) - t_1));
                	}
                	return tmp;
                }
                
                def code(x_46_re, x_46_im, y_46_re, y_46_im):
                	t_0 = math.log((1.0 / x_46_re))
                	t_1 = y_46_im * math.atan2(x_46_im, x_46_re)
                	t_2 = y_46_re * math.atan2(x_46_im, x_46_re)
                	tmp = 0
                	if x_46_re <= -6e+108:
                		tmp = math.cos(t_2) * math.exp((((0.0 - y_46_re) * math.log((-1.0 / x_46_re))) - t_1))
                	elif x_46_re <= 2.6e-31:
                		tmp = 1.0 / (math.exp(t_1) / math.pow(math.hypot(x_46_re, x_46_im), y_46_re))
                	else:
                		tmp = math.cos((t_2 - (y_46_im * t_0))) * math.exp((((0.0 - y_46_re) * t_0) - t_1))
                	return tmp
                
                function code(x_46_re, x_46_im, y_46_re, y_46_im)
                	t_0 = log(Float64(1.0 / x_46_re))
                	t_1 = Float64(y_46_im * atan(x_46_im, x_46_re))
                	t_2 = Float64(y_46_re * atan(x_46_im, x_46_re))
                	tmp = 0.0
                	if (x_46_re <= -6e+108)
                		tmp = Float64(cos(t_2) * exp(Float64(Float64(Float64(0.0 - y_46_re) * log(Float64(-1.0 / x_46_re))) - t_1)));
                	elseif (x_46_re <= 2.6e-31)
                		tmp = Float64(1.0 / Float64(exp(t_1) / (hypot(x_46_re, x_46_im) ^ y_46_re)));
                	else
                		tmp = Float64(cos(Float64(t_2 - Float64(y_46_im * t_0))) * exp(Float64(Float64(Float64(0.0 - y_46_re) * 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 = log((1.0 / x_46_re));
                	t_1 = y_46_im * atan2(x_46_im, x_46_re);
                	t_2 = y_46_re * atan2(x_46_im, x_46_re);
                	tmp = 0.0;
                	if (x_46_re <= -6e+108)
                		tmp = cos(t_2) * exp((((0.0 - y_46_re) * log((-1.0 / x_46_re))) - t_1));
                	elseif (x_46_re <= 2.6e-31)
                		tmp = 1.0 / (exp(t_1) / (hypot(x_46_re, x_46_im) ^ y_46_re));
                	else
                		tmp = cos((t_2 - (y_46_im * t_0))) * exp((((0.0 - y_46_re) * 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[Log[N[(1.0 / x$46$re), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x$46$re, -6e+108], N[(N[Cos[t$95$2], $MachinePrecision] * N[Exp[N[(N[(N[(0.0 - y$46$re), $MachinePrecision] * N[Log[N[(-1.0 / x$46$re), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, 2.6e-31], N[(1.0 / 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], N[(N[Cos[N[(t$95$2 - N[(y$46$im * t$95$0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Exp[N[(N[(N[(0.0 - y$46$re), $MachinePrecision] * t$95$0), $MachinePrecision] - t$95$1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]
                
                \begin{array}{l}
                
                \\
                \begin{array}{l}
                t_0 := \log \left(\frac{1}{x.re}\right)\\
                t_1 := y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
                t_2 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
                \mathbf{if}\;x.re \leq -6 \cdot 10^{+108}:\\
                \;\;\;\;\cos t\_2 \cdot e^{\left(0 - y.re\right) \cdot \log \left(\frac{-1}{x.re}\right) - t\_1}\\
                
                \mathbf{elif}\;x.re \leq 2.6 \cdot 10^{-31}:\\
                \;\;\;\;\frac{1}{\frac{e^{t\_1}}{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}}\\
                
                \mathbf{else}:\\
                \;\;\;\;\cos \left(t\_2 - y.im \cdot t\_0\right) \cdot e^{\left(0 - y.re\right) \cdot t\_0 - t\_1}\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 3 regimes
                2. if x.re < -5.99999999999999968e108

                  1. Initial program 8.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. Add Preprocessing
                  3. Taylor expanded in x.re around -inf

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

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

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

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(-1, y.im\right), \mathsf{log.f64}\left(\mathsf{/.f64}\left(-1, x.re\right)\right)\right)\right)\right), \mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\left(-1 \cdot \left(y.re \cdot \log \left(\frac{-1}{x.re}\right)\right)\right), \left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right) \]
                  5. Simplified79.9%

                    \[\leadsto \color{blue}{\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re} + \left(-1 \cdot y.im\right) \cdot \log \left(\frac{-1}{x.re}\right)\right) \cdot e^{\left(-1 \cdot y.re\right) \cdot \log \left(\frac{-1}{x.re}\right) - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}} \]
                  6. 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{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(-1, y.re\right), \mathsf{log.f64}\left(\mathsf{/.f64}\left(-1, x.re\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right)\right) \]
                  7. 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{exp.f64}\left(\color{blue}{\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(-1, y.re\right), \mathsf{log.f64}\left(\mathsf{/.f64}\left(-1, x.re\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\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{exp.f64}\left(\mathsf{\_.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{*.f64}\left(-1, y.re\right), \mathsf{log.f64}\left(\mathsf{/.f64}\left(-1, x.re\right)\right)\right)}, \mathsf{*.f64}\left(y.im, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right)\right) \]
                    3. atan2-lowering-atan2.f6485.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{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(-1, y.re\right), \color{blue}{\mathsf{log.f64}\left(\mathsf{/.f64}\left(-1, x.re\right)\right)}\right), \mathsf{*.f64}\left(y.im, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right)\right) \]
                  8. Simplified85.8%

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

                  if -5.99999999999999968e108 < x.re < 2.59999999999999995e-31

                  1. Initial program 46.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. Simplified69.2%

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

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

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

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

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

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

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

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

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

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

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

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

                    if 2.59999999999999995e-31 < x.re

                    1. Initial program 37.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 x.re around inf

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

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

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

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

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

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

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

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

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

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

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

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

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

                        \[\leadsto \mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(-1, y.im\right), \mathsf{log.f64}\left(\mathsf{/.f64}\left(1, x.re\right)\right)\right)\right)\right), \mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\left(-1 \cdot \left(y.re \cdot \log \left(\frac{1}{x.re}\right)\right)\right), \left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right) \]
                    5. Simplified73.5%

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

                    \[\leadsto \begin{array}{l} \mathbf{if}\;x.re \leq -6 \cdot 10^{+108}:\\ \;\;\;\;\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot e^{\left(0 - y.re\right) \cdot \log \left(\frac{-1}{x.re}\right) - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\\ \mathbf{elif}\;x.re \leq 2.6 \cdot 10^{-31}:\\ \;\;\;\;\frac{1}{\frac{e^{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}}{{\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} - y.im \cdot \log \left(\frac{1}{x.re}\right)\right) \cdot e^{\left(0 - y.re\right) \cdot \log \left(\frac{1}{x.re}\right) - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\\ \end{array} \]
                  12. Add Preprocessing

                  Alternative 6: 75.2% accurate, 1.3× speedup?

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

                    1. Initial program 8.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. Add Preprocessing
                    3. Taylor expanded in x.re around -inf

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

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

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

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

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

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

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

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

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

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

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

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

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

                        \[\leadsto \mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(-1, y.im\right), \mathsf{log.f64}\left(\mathsf{/.f64}\left(-1, x.re\right)\right)\right)\right)\right), \mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\left(-1 \cdot \left(y.re \cdot \log \left(\frac{-1}{x.re}\right)\right)\right), \left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right) \]
                    5. Simplified79.9%

                      \[\leadsto \color{blue}{\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re} + \left(-1 \cdot y.im\right) \cdot \log \left(\frac{-1}{x.re}\right)\right) \cdot e^{\left(-1 \cdot y.re\right) \cdot \log \left(\frac{-1}{x.re}\right) - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}} \]
                    6. 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{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(-1, y.re\right), \mathsf{log.f64}\left(\mathsf{/.f64}\left(-1, x.re\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right)\right) \]
                    7. 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{exp.f64}\left(\color{blue}{\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(-1, y.re\right), \mathsf{log.f64}\left(\mathsf{/.f64}\left(-1, x.re\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\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{exp.f64}\left(\mathsf{\_.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{*.f64}\left(-1, y.re\right), \mathsf{log.f64}\left(\mathsf{/.f64}\left(-1, x.re\right)\right)\right)}, \mathsf{*.f64}\left(y.im, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right)\right) \]
                      3. atan2-lowering-atan2.f6485.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{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(-1, y.re\right), \color{blue}{\mathsf{log.f64}\left(\mathsf{/.f64}\left(-1, x.re\right)\right)}\right), \mathsf{*.f64}\left(y.im, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right)\right) \]
                    8. Simplified85.8%

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

                    if -5.99999999999999968e108 < x.re < 1.90000000000000004e-32

                    1. Initial program 46.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. Simplified69.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.re around 0

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

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

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

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

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

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

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

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

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

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

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

                      if 1.90000000000000004e-32 < x.re

                      1. Initial program 38.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. Add Preprocessing
                      3. Taylor expanded in x.im around 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    Alternative 7: 75.2% accurate, 1.6× speedup?

                    \[\begin{array}{l} \\ \begin{array}{l} t_0 := y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\\ \mathbf{if}\;x.re \leq -6 \cdot 10^{+108}:\\ \;\;\;\;\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot e^{\left(0 - y.re\right) \cdot \log \left(\frac{-1}{x.re}\right) - t\_0}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\frac{e^{t\_0}}{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}}\\ \end{array} \end{array} \]
                    (FPCore (x.re x.im y.re y.im)
                     :precision binary64
                     (let* ((t_0 (* y.im (atan2 x.im x.re))))
                       (if (<= x.re -6e+108)
                         (*
                          (cos (* y.re (atan2 x.im x.re)))
                          (exp (- (* (- 0.0 y.re) (log (/ -1.0 x.re))) t_0)))
                         (/ 1.0 (/ (exp t_0) (pow (hypot x.re x.im) y.re))))))
                    double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
                    	double t_0 = y_46_im * atan2(x_46_im, x_46_re);
                    	double tmp;
                    	if (x_46_re <= -6e+108) {
                    		tmp = cos((y_46_re * atan2(x_46_im, x_46_re))) * exp((((0.0 - y_46_re) * log((-1.0 / x_46_re))) - t_0));
                    	} else {
                    		tmp = 1.0 / (exp(t_0) / pow(hypot(x_46_re, x_46_im), y_46_re));
                    	}
                    	return tmp;
                    }
                    
                    public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
                    	double t_0 = y_46_im * Math.atan2(x_46_im, x_46_re);
                    	double tmp;
                    	if (x_46_re <= -6e+108) {
                    		tmp = Math.cos((y_46_re * Math.atan2(x_46_im, x_46_re))) * Math.exp((((0.0 - y_46_re) * Math.log((-1.0 / x_46_re))) - t_0));
                    	} else {
                    		tmp = 1.0 / (Math.exp(t_0) / Math.pow(Math.hypot(x_46_re, x_46_im), y_46_re));
                    	}
                    	return tmp;
                    }
                    
                    def code(x_46_re, x_46_im, y_46_re, y_46_im):
                    	t_0 = y_46_im * math.atan2(x_46_im, x_46_re)
                    	tmp = 0
                    	if x_46_re <= -6e+108:
                    		tmp = math.cos((y_46_re * math.atan2(x_46_im, x_46_re))) * math.exp((((0.0 - y_46_re) * math.log((-1.0 / x_46_re))) - t_0))
                    	else:
                    		tmp = 1.0 / (math.exp(t_0) / math.pow(math.hypot(x_46_re, x_46_im), y_46_re))
                    	return tmp
                    
                    function code(x_46_re, x_46_im, y_46_re, y_46_im)
                    	t_0 = Float64(y_46_im * atan(x_46_im, x_46_re))
                    	tmp = 0.0
                    	if (x_46_re <= -6e+108)
                    		tmp = Float64(cos(Float64(y_46_re * atan(x_46_im, x_46_re))) * exp(Float64(Float64(Float64(0.0 - y_46_re) * log(Float64(-1.0 / x_46_re))) - t_0)));
                    	else
                    		tmp = Float64(1.0 / Float64(exp(t_0) / (hypot(x_46_re, 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)
                    	t_0 = y_46_im * atan2(x_46_im, x_46_re);
                    	tmp = 0.0;
                    	if (x_46_re <= -6e+108)
                    		tmp = cos((y_46_re * atan2(x_46_im, x_46_re))) * exp((((0.0 - y_46_re) * log((-1.0 / x_46_re))) - t_0));
                    	else
                    		tmp = 1.0 / (exp(t_0) / (hypot(x_46_re, x_46_im) ^ y_46_re));
                    	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$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x$46$re, -6e+108], N[(N[Cos[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Exp[N[(N[(N[(0.0 - y$46$re), $MachinePrecision] * N[Log[N[(-1.0 / x$46$re), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(1.0 / 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]]]
                    
                    \begin{array}{l}
                    
                    \\
                    \begin{array}{l}
                    t_0 := y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
                    \mathbf{if}\;x.re \leq -6 \cdot 10^{+108}:\\
                    \;\;\;\;\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot e^{\left(0 - y.re\right) \cdot \log \left(\frac{-1}{x.re}\right) - t\_0}\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;\frac{1}{\frac{e^{t\_0}}{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}}\\
                    
                    
                    \end{array}
                    \end{array}
                    
                    Derivation
                    1. Split input into 2 regimes
                    2. if x.re < -5.99999999999999968e108

                      1. Initial program 8.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. Add Preprocessing
                      3. Taylor expanded in x.re around -inf

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

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

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

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

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

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

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

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

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

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

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

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

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

                          \[\leadsto \mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(-1, y.im\right), \mathsf{log.f64}\left(\mathsf{/.f64}\left(-1, x.re\right)\right)\right)\right)\right), \mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\left(-1 \cdot \left(y.re \cdot \log \left(\frac{-1}{x.re}\right)\right)\right), \left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right) \]
                      5. Simplified79.9%

                        \[\leadsto \color{blue}{\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re} + \left(-1 \cdot y.im\right) \cdot \log \left(\frac{-1}{x.re}\right)\right) \cdot e^{\left(-1 \cdot y.re\right) \cdot \log \left(\frac{-1}{x.re}\right) - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}} \]
                      6. 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{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(-1, y.re\right), \mathsf{log.f64}\left(\mathsf{/.f64}\left(-1, x.re\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right)\right) \]
                      7. 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{exp.f64}\left(\color{blue}{\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(-1, y.re\right), \mathsf{log.f64}\left(\mathsf{/.f64}\left(-1, x.re\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\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{exp.f64}\left(\mathsf{\_.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{*.f64}\left(-1, y.re\right), \mathsf{log.f64}\left(\mathsf{/.f64}\left(-1, x.re\right)\right)\right)}, \mathsf{*.f64}\left(y.im, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right)\right) \]
                        3. atan2-lowering-atan2.f6485.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{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(-1, y.re\right), \color{blue}{\mathsf{log.f64}\left(\mathsf{/.f64}\left(-1, x.re\right)\right)}\right), \mathsf{*.f64}\left(y.im, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right)\right) \]
                      8. Simplified85.8%

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

                      if -5.99999999999999968e108 < x.re

                      1. Initial program 44.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                          \[\leadsto \frac{\color{blue}{1}}{\frac{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}} \]
                      10. Recombined 2 regimes into one program.
                      11. Final simplification76.9%

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

                      Alternative 8: 73.6% accurate, 2.0× speedup?

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

                        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. 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. Simplified74.9%

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

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

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

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

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

                          if 1.9e21 < y.im < 1.2e95

                          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. 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. Simplified30.9%

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

                              \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{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. Simplified30.9%

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

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

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

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

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

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

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

                                \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{atan2.f64}\left(x.im, x.re\right)\right), 1\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
                            4. Simplified46.6%

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

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

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

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

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

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

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

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

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

                                \[\leadsto \mathsf{/.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \mathsf{*.f64}\left(y.im, \mathsf{atan2.f64}\left(x.im, \color{blue}{x.re}\right)\right)\right) \]
                            7. Simplified62.8%

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

                            if 1.2e95 < y.im < 9.5000000000000001e154

                            1. Initial program 26.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. 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. Simplified60.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                  \[\leadsto \mathsf{neg.f64}\left(\left(\frac{{\left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)}^{y.re}}{0 - e^{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}}\right)\right) \]
                              3. Applied egg-rr80.2%

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

                              if 9.5000000000000001e154 < y.im

                              1. Initial program 25.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. Step-by-step derivation
                                1. exp-diffN/A

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

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

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

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

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

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

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

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

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

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

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

                                  \[\leadsto \mathsf{/.f64}\left(1, \color{blue}{\left(e^{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\right)}\right) \]
                                3. Step-by-step derivation
                                  1. exp-lowering-exp.f64N/A

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

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

                                    \[\leadsto \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
                                4. Simplified71.7%

                                  \[\leadsto \frac{1}{\color{blue}{e^{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}}} \]
                              10. Recombined 4 regimes into one program.
                              11. Final simplification77.4%

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

                              Alternative 9: 76.7% accurate, 2.6× speedup?

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

                                1. Initial program 37.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. Simplified68.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                  if -5.49999999999999975e-11 < y.re < 1.6000000000000001e-21

                                  1. Initial program 48.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. Simplified84.9%

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

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

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

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

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

                                      \[\leadsto \mathsf{/.f64}\left(1, \color{blue}{\left(e^{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\right)}\right) \]
                                    3. Step-by-step derivation
                                      1. exp-lowering-exp.f64N/A

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

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

                                        \[\leadsto \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
                                    4. Simplified87.6%

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

                                    if 1.6000000000000001e-21 < y.re

                                    1. Initial program 27.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                        \[\leadsto \color{blue}{{\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}} \]
                                      3. Step-by-step derivation
                                        1. pow-lowering-pow.f64N/A

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

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

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

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

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

                                          \[\leadsto \mathsf{pow.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \left(x.re \cdot x.re\right)\right)\right), y.re\right) \]
                                        7. *-lowering-*.f6461.9%

                                          \[\leadsto \mathsf{pow.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \mathsf{*.f64}\left(x.re, x.re\right)\right)\right), y.re\right) \]
                                      4. Simplified61.9%

                                        \[\leadsto \color{blue}{{\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)}^{y.re}} \]
                                    10. Recombined 3 regimes into one program.
                                    11. Final simplification77.0%

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

                                    Alternative 10: 76.7% accurate, 3.7× speedup?

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

                                      1. Initial program 37.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                          \[\leadsto \mathsf{/.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
                                        7. hypot-lowering-hypot.f6474.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. Simplified74.2%

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

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

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

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

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

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

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

                                            \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{atan2.f64}\left(x.im, x.re\right)\right), 1\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
                                        4. Simplified77.6%

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

                                            \[\leadsto \frac{{\left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)}^{y.re}}{\color{blue}{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re} + 1}} \]
                                          2. /-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}{\left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re} + 1\right)}\right) \]
                                          3. 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), \left(\color{blue}{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} + 1\right)\right) \]
                                          4. 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), \left(\color{blue}{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} + 1\right)\right) \]
                                          5. +-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), \left(\color{blue}{y.im} \cdot \tan^{-1}_* \frac{x.im}{x.re} + 1\right)\right) \]
                                          6. *-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), \left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re} + 1\right)\right) \]
                                          7. *-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), \left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re} + 1\right)\right) \]
                                          8. /-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), \left(y.im \cdot \color{blue}{\tan^{-1}_* \frac{x.im}{x.re}} + 1\right)\right) \]
                                          9. +-commutativeN/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), \left(1 + \color{blue}{y.im \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), \mathsf{/.f64}\left(y.re, 2\right)\right), \mathsf{+.f64}\left(1, \color{blue}{\left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\right)\right) \]
                                          11. *-commutativeN/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{+.f64}\left(1, \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot \color{blue}{y.im}\right)\right)\right) \]
                                          12. *-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{+.f64}\left(1, \mathsf{*.f64}\left(\tan^{-1}_* \frac{x.im}{x.re}, \color{blue}{y.im}\right)\right)\right) \]
                                          13. atan2-lowering-atan2.f6477.6%

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

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

                                        if -1.80000000000000004 < y.re < 1.6000000000000001e-21

                                        1. Initial program 48.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. Simplified85.2%

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

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

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

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

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

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

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

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

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

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

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

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

                                            \[\leadsto \mathsf{/.f64}\left(1, \color{blue}{\left(e^{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\right)}\right) \]
                                          3. Step-by-step derivation
                                            1. exp-lowering-exp.f64N/A

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

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

                                              \[\leadsto \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
                                          4. Simplified86.2%

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

                                          if 1.6000000000000001e-21 < y.re

                                          1. Initial program 27.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                              \[\leadsto \color{blue}{{\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}} \]
                                            3. Step-by-step derivation
                                              1. pow-lowering-pow.f64N/A

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

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

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

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

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

                                                \[\leadsto \mathsf{pow.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \left(x.re \cdot x.re\right)\right)\right), y.re\right) \]
                                              7. *-lowering-*.f6461.9%

                                                \[\leadsto \mathsf{pow.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \mathsf{*.f64}\left(x.re, x.re\right)\right)\right), y.re\right) \]
                                            4. Simplified61.9%

                                              \[\leadsto \color{blue}{{\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)}^{y.re}} \]
                                          10. Recombined 3 regimes into one program.
                                          11. Final simplification76.9%

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

                                          Alternative 11: 76.9% accurate, 3.8× speedup?

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

                                            1. Initial program 37.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. Simplified68.7%

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

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

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

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

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

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

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

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

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

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

                                              \[\leadsto \color{blue}{{\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}} \]
                                            9. Step-by-step derivation
                                              1. pow-lowering-pow.f64N/A

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

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

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

                                                \[\leadsto \mathsf{pow.f64}\left(\left(\mathsf{hypot}\left(x.im, x.re\right)\right), y.re\right) \]
                                              5. hypot-lowering-hypot.f6474.3%

                                                \[\leadsto \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right) \]
                                            10. Simplified74.3%

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

                                            if -2.20000000000000008e-4 < y.re < 1.6000000000000001e-21

                                            1. Initial program 48.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. Simplified84.9%

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

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

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

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

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

                                                \[\leadsto \mathsf{/.f64}\left(1, \color{blue}{\left(e^{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\right)}\right) \]
                                              3. Step-by-step derivation
                                                1. exp-lowering-exp.f64N/A

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

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

                                                  \[\leadsto \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
                                              4. Simplified87.6%

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

                                              if 1.6000000000000001e-21 < y.re

                                              1. Initial program 27.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                  \[\leadsto \color{blue}{{\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}} \]
                                                3. Step-by-step derivation
                                                  1. pow-lowering-pow.f64N/A

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

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

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

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

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

                                                    \[\leadsto \mathsf{pow.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \left(x.re \cdot x.re\right)\right)\right), y.re\right) \]
                                                  7. *-lowering-*.f6461.9%

                                                    \[\leadsto \mathsf{pow.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \mathsf{*.f64}\left(x.re, x.re\right)\right)\right), y.re\right) \]
                                                4. Simplified61.9%

                                                  \[\leadsto \color{blue}{{\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)}^{y.re}} \]
                                              10. Recombined 3 regimes into one program.
                                              11. Final simplification76.6%

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

                                              Alternative 12: 77.5% accurate, 3.8× speedup?

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

                                                1. Initial program 32.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. Simplified55.9%

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

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

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

                                                  \[\leadsto \color{blue}{{\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}} \]
                                                9. Step-by-step derivation
                                                  1. pow-lowering-pow.f64N/A

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

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

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

                                                    \[\leadsto \mathsf{pow.f64}\left(\left(\mathsf{hypot}\left(x.im, x.re\right)\right), y.re\right) \]
                                                  5. hypot-lowering-hypot.f6468.1%

                                                    \[\leadsto \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right) \]
                                                10. Simplified68.1%

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

                                                if -2.4500000000000001e-8 < y.re < 3

                                                1. Initial program 47.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.9%

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

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

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

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

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

                                                    \[\leadsto \mathsf{/.f64}\left(1, \color{blue}{\left(e^{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\right)}\right) \]
                                                  3. Step-by-step derivation
                                                    1. exp-lowering-exp.f64N/A

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

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

                                                      \[\leadsto \mathsf{/.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
                                                  4. Simplified86.3%

                                                    \[\leadsto \frac{1}{\color{blue}{e^{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}}} \]
                                                10. Recombined 2 regimes into one program.
                                                11. Add Preprocessing

                                                Alternative 13: 62.8% accurate, 4.1× speedup?

                                                \[\begin{array}{l} \\ {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \end{array} \]
                                                (FPCore (x.re x.im y.re y.im) :precision binary64 (pow (hypot x.im x.re) y.re))
                                                double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
                                                	return pow(hypot(x_46_im, x_46_re), y_46_re);
                                                }
                                                
                                                public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
                                                	return Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
                                                }
                                                
                                                def code(x_46_re, x_46_im, y_46_re, y_46_im):
                                                	return math.pow(math.hypot(x_46_im, x_46_re), y_46_re)
                                                
                                                function code(x_46_re, x_46_im, y_46_re, y_46_im)
                                                	return hypot(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)
                                                	tmp = hypot(x_46_im, x_46_re) ^ y_46_re;
                                                end
                                                
                                                code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]
                                                
                                                \begin{array}{l}
                                                
                                                \\
                                                {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}
                                                \end{array}
                                                
                                                Derivation
                                                1. Initial program 39.4%

                                                  \[e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \]
                                                2. 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. Simplified68.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.f6471.8%

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

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

                                                  \[\leadsto \color{blue}{{\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}} \]
                                                9. Step-by-step derivation
                                                  1. pow-lowering-pow.f64N/A

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

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

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

                                                    \[\leadsto \mathsf{pow.f64}\left(\left(\mathsf{hypot}\left(x.im, x.re\right)\right), y.re\right) \]
                                                  5. hypot-lowering-hypot.f6459.2%

                                                    \[\leadsto \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right) \]
                                                10. Simplified59.2%

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

                                                Alternative 14: 52.4% accurate, 7.0× speedup?

                                                \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y.re \leq -1.3:\\ \;\;\;\;{x.im}^{y.re}\\ \mathbf{elif}\;y.re \leq 4.5 \cdot 10^{-10}:\\ \;\;\;\;\frac{-1}{-1 - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\\ \mathbf{else}:\\ \;\;\;\;{x.im}^{y.re}\\ \end{array} \end{array} \]
                                                (FPCore (x.re x.im y.re y.im)
                                                 :precision binary64
                                                 (if (<= y.re -1.3)
                                                   (pow x.im y.re)
                                                   (if (<= y.re 4.5e-10)
                                                     (/ -1.0 (- -1.0 (* y.im (atan2 x.im x.re))))
                                                     (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 <= -1.3) {
                                                		tmp = pow(x_46_im, y_46_re);
                                                	} else if (y_46_re <= 4.5e-10) {
                                                		tmp = -1.0 / (-1.0 - (y_46_im * atan2(x_46_im, x_46_re)));
                                                	} 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 <= (-1.3d0)) then
                                                        tmp = x_46im ** y_46re
                                                    else if (y_46re <= 4.5d-10) then
                                                        tmp = (-1.0d0) / ((-1.0d0) - (y_46im * atan2(x_46im, x_46re)))
                                                    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 <= -1.3) {
                                                		tmp = Math.pow(x_46_im, y_46_re);
                                                	} else if (y_46_re <= 4.5e-10) {
                                                		tmp = -1.0 / (-1.0 - (y_46_im * Math.atan2(x_46_im, x_46_re)));
                                                	} 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 <= -1.3:
                                                		tmp = math.pow(x_46_im, y_46_re)
                                                	elif y_46_re <= 4.5e-10:
                                                		tmp = -1.0 / (-1.0 - (y_46_im * math.atan2(x_46_im, x_46_re)))
                                                	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 <= -1.3)
                                                		tmp = x_46_im ^ y_46_re;
                                                	elseif (y_46_re <= 4.5e-10)
                                                		tmp = Float64(-1.0 / Float64(-1.0 - Float64(y_46_im * atan(x_46_im, x_46_re))));
                                                	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 <= -1.3)
                                                		tmp = x_46_im ^ y_46_re;
                                                	elseif (y_46_re <= 4.5e-10)
                                                		tmp = -1.0 / (-1.0 - (y_46_im * atan2(x_46_im, x_46_re)));
                                                	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, -1.3], N[Power[x$46$im, y$46$re], $MachinePrecision], If[LessEqual[y$46$re, 4.5e-10], N[(-1.0 / N[(-1.0 - N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Power[x$46$im, y$46$re], $MachinePrecision]]]
                                                
                                                \begin{array}{l}
                                                
                                                \\
                                                \begin{array}{l}
                                                \mathbf{if}\;y.re \leq -1.3:\\
                                                \;\;\;\;{x.im}^{y.re}\\
                                                
                                                \mathbf{elif}\;y.re \leq 4.5 \cdot 10^{-10}:\\
                                                \;\;\;\;\frac{-1}{-1 - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\\
                                                
                                                \mathbf{else}:\\
                                                \;\;\;\;{x.im}^{y.re}\\
                                                
                                                
                                                \end{array}
                                                \end{array}
                                                
                                                Derivation
                                                1. Split input into 2 regimes
                                                2. if y.re < -1.30000000000000004 or 4.5e-10 < y.re

                                                  1. Initial program 31.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. Simplified54.8%

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

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

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

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

                                                      \[\leadsto \color{blue}{\cos \left(y.im \cdot \log x.im\right) \cdot {x.im}^{y.re}} \]
                                                    3. Step-by-step derivation
                                                      1. *-lowering-*.f64N/A

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

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

                                                        \[\leadsto \mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \log x.im\right)\right), \left({x.im}^{y.re}\right)\right) \]
                                                      4. log-lowering-log.f64N/A

                                                        \[\leadsto \mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(x.im\right)\right)\right), \left({x.im}^{y.re}\right)\right) \]
                                                      5. pow-lowering-pow.f6432.1%

                                                        \[\leadsto \mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(x.im\right)\right)\right), \mathsf{pow.f64}\left(x.im, \color{blue}{y.re}\right)\right) \]
                                                    4. Simplified32.1%

                                                      \[\leadsto \color{blue}{\cos \left(y.im \cdot \log x.im\right) \cdot {x.im}^{y.re}} \]
                                                    5. Taylor expanded in y.im around 0

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

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

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

                                                    if -1.30000000000000004 < y.re < 4.5e-10

                                                    1. Initial program 47.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.9%

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

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

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

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

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

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

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

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

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

                                                          \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{atan2.f64}\left(x.im, x.re\right)\right), 1\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
                                                      4. Simplified49.6%

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

                                                        \[\leadsto \color{blue}{\frac{1}{1 + y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}} \]
                                                      6. Step-by-step derivation
                                                        1. /-lowering-/.f64N/A

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

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

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

                                                          \[\leadsto \mathsf{/.f64}\left(1, \mathsf{+.f64}\left(\mathsf{*.f64}\left(y.im, \tan^{-1}_* \frac{x.im}{x.re}\right), 1\right)\right) \]
                                                        5. atan2-lowering-atan2.f6449.4%

                                                          \[\leadsto \mathsf{/.f64}\left(1, \mathsf{+.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{atan2.f64}\left(x.im, x.re\right)\right), 1\right)\right) \]
                                                      7. Simplified49.4%

                                                        \[\leadsto \color{blue}{\frac{1}{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re} + 1}} \]
                                                    10. Recombined 2 regimes into one program.
                                                    11. Final simplification55.2%

                                                      \[\leadsto \begin{array}{l} \mathbf{if}\;y.re \leq -1.3:\\ \;\;\;\;{x.im}^{y.re}\\ \mathbf{elif}\;y.re \leq 4.5 \cdot 10^{-10}:\\ \;\;\;\;\frac{-1}{-1 - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\\ \mathbf{else}:\\ \;\;\;\;{x.im}^{y.re}\\ \end{array} \]
                                                    12. Add Preprocessing

                                                    Alternative 15: 52.2% accurate, 7.1× speedup?

                                                    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y.re \leq -1.55:\\ \;\;\;\;{x.im}^{y.re}\\ \mathbf{elif}\;y.re \leq 340000:\\ \;\;\;\;1 - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\\ \mathbf{else}:\\ \;\;\;\;{x.im}^{y.re}\\ \end{array} \end{array} \]
                                                    (FPCore (x.re x.im y.re y.im)
                                                     :precision binary64
                                                     (if (<= y.re -1.55)
                                                       (pow x.im y.re)
                                                       (if (<= y.re 340000.0) (- 1.0 (* y.im (atan2 x.im x.re))) (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 <= -1.55) {
                                                    		tmp = pow(x_46_im, y_46_re);
                                                    	} else if (y_46_re <= 340000.0) {
                                                    		tmp = 1.0 - (y_46_im * atan2(x_46_im, x_46_re));
                                                    	} 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 <= (-1.55d0)) then
                                                            tmp = x_46im ** y_46re
                                                        else if (y_46re <= 340000.0d0) then
                                                            tmp = 1.0d0 - (y_46im * atan2(x_46im, x_46re))
                                                        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 <= -1.55) {
                                                    		tmp = Math.pow(x_46_im, y_46_re);
                                                    	} else if (y_46_re <= 340000.0) {
                                                    		tmp = 1.0 - (y_46_im * Math.atan2(x_46_im, x_46_re));
                                                    	} 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 <= -1.55:
                                                    		tmp = math.pow(x_46_im, y_46_re)
                                                    	elif y_46_re <= 340000.0:
                                                    		tmp = 1.0 - (y_46_im * math.atan2(x_46_im, x_46_re))
                                                    	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 <= -1.55)
                                                    		tmp = x_46_im ^ y_46_re;
                                                    	elseif (y_46_re <= 340000.0)
                                                    		tmp = Float64(1.0 - Float64(y_46_im * atan(x_46_im, x_46_re)));
                                                    	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 <= -1.55)
                                                    		tmp = x_46_im ^ y_46_re;
                                                    	elseif (y_46_re <= 340000.0)
                                                    		tmp = 1.0 - (y_46_im * atan2(x_46_im, x_46_re));
                                                    	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, -1.55], N[Power[x$46$im, y$46$re], $MachinePrecision], If[LessEqual[y$46$re, 340000.0], N[(1.0 - N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Power[x$46$im, y$46$re], $MachinePrecision]]]
                                                    
                                                    \begin{array}{l}
                                                    
                                                    \\
                                                    \begin{array}{l}
                                                    \mathbf{if}\;y.re \leq -1.55:\\
                                                    \;\;\;\;{x.im}^{y.re}\\
                                                    
                                                    \mathbf{elif}\;y.re \leq 340000:\\
                                                    \;\;\;\;1 - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
                                                    
                                                    \mathbf{else}:\\
                                                    \;\;\;\;{x.im}^{y.re}\\
                                                    
                                                    
                                                    \end{array}
                                                    \end{array}
                                                    
                                                    Derivation
                                                    1. Split input into 2 regimes
                                                    2. if y.re < -1.55000000000000004 or 3.4e5 < y.re

                                                      1. Initial program 31.6%

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

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

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

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

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

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

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

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

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

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

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

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

                                                          \[\leadsto \color{blue}{\cos \left(y.im \cdot \log x.im\right) \cdot {x.im}^{y.re}} \]
                                                        3. Step-by-step derivation
                                                          1. *-lowering-*.f64N/A

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

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

                                                            \[\leadsto \mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \log x.im\right)\right), \left({x.im}^{y.re}\right)\right) \]
                                                          4. log-lowering-log.f64N/A

                                                            \[\leadsto \mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(x.im\right)\right)\right), \left({x.im}^{y.re}\right)\right) \]
                                                          5. pow-lowering-pow.f6432.5%

                                                            \[\leadsto \mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(x.im\right)\right)\right), \mathsf{pow.f64}\left(x.im, \color{blue}{y.re}\right)\right) \]
                                                        4. Simplified32.5%

                                                          \[\leadsto \color{blue}{\cos \left(y.im \cdot \log x.im\right) \cdot {x.im}^{y.re}} \]
                                                        5. Taylor expanded in y.im around 0

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

                                                            \[\leadsto \mathsf{pow.f64}\left(x.im, \color{blue}{y.re}\right) \]
                                                        7. Simplified61.3%

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

                                                        if -1.55000000000000004 < y.re < 3.4e5

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                            \[\leadsto \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(-1, \mathsf{*.f64}\left(y.im, \mathsf{atan2.f64}\left(x.im, \color{blue}{x.re}\right)\right)\right)\right) \]
                                                        11. Simplified48.4%

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

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

                                                            \[\leadsto 1 - \color{blue}{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \]
                                                          3. --lowering--.f64N/A

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

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

                                                            \[\leadsto \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\tan^{-1}_* \frac{x.im}{x.re}, \color{blue}{y.im}\right)\right) \]
                                                          6. atan2-lowering-atan2.f6448.4%

                                                            \[\leadsto \mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right) \]
                                                        13. Applied egg-rr48.4%

                                                          \[\leadsto \color{blue}{1 - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \]
                                                      10. Recombined 2 regimes into one program.
                                                      11. Final simplification55.1%

                                                        \[\leadsto \begin{array}{l} \mathbf{if}\;y.re \leq -1.55:\\ \;\;\;\;{x.im}^{y.re}\\ \mathbf{elif}\;y.re \leq 340000:\\ \;\;\;\;1 - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\\ \mathbf{else}:\\ \;\;\;\;{x.im}^{y.re}\\ \end{array} \]
                                                      12. Add Preprocessing

                                                      Alternative 16: 52.1% accurate, 7.4× speedup?

                                                      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y.re \leq -1.22:\\ \;\;\;\;{x.im}^{y.re}\\ \mathbf{elif}\;y.re \leq 6200:\\ \;\;\;\;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 -1.22)
                                                         (pow x.im y.re)
                                                         (if (<= y.re 6200.0) 1.0 (pow x.im y.re))))
                                                      double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
                                                      	double tmp;
                                                      	if (y_46_re <= -1.22) {
                                                      		tmp = pow(x_46_im, y_46_re);
                                                      	} else if (y_46_re <= 6200.0) {
                                                      		tmp = 1.0;
                                                      	} else {
                                                      		tmp = pow(x_46_im, y_46_re);
                                                      	}
                                                      	return tmp;
                                                      }
                                                      
                                                      real(8) function code(x_46re, x_46im, y_46re, y_46im)
                                                          real(8), intent (in) :: x_46re
                                                          real(8), intent (in) :: x_46im
                                                          real(8), intent (in) :: y_46re
                                                          real(8), intent (in) :: y_46im
                                                          real(8) :: tmp
                                                          if (y_46re <= (-1.22d0)) then
                                                              tmp = x_46im ** y_46re
                                                          else if (y_46re <= 6200.0d0) then
                                                              tmp = 1.0d0
                                                          else
                                                              tmp = x_46im ** y_46re
                                                          end if
                                                          code = tmp
                                                      end function
                                                      
                                                      public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
                                                      	double tmp;
                                                      	if (y_46_re <= -1.22) {
                                                      		tmp = Math.pow(x_46_im, y_46_re);
                                                      	} else if (y_46_re <= 6200.0) {
                                                      		tmp = 1.0;
                                                      	} else {
                                                      		tmp = Math.pow(x_46_im, y_46_re);
                                                      	}
                                                      	return tmp;
                                                      }
                                                      
                                                      def code(x_46_re, x_46_im, y_46_re, y_46_im):
                                                      	tmp = 0
                                                      	if y_46_re <= -1.22:
                                                      		tmp = math.pow(x_46_im, y_46_re)
                                                      	elif y_46_re <= 6200.0:
                                                      		tmp = 1.0
                                                      	else:
                                                      		tmp = math.pow(x_46_im, y_46_re)
                                                      	return tmp
                                                      
                                                      function code(x_46_re, x_46_im, y_46_re, y_46_im)
                                                      	tmp = 0.0
                                                      	if (y_46_re <= -1.22)
                                                      		tmp = x_46_im ^ y_46_re;
                                                      	elseif (y_46_re <= 6200.0)
                                                      		tmp = 1.0;
                                                      	else
                                                      		tmp = x_46_im ^ y_46_re;
                                                      	end
                                                      	return tmp
                                                      end
                                                      
                                                      function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im)
                                                      	tmp = 0.0;
                                                      	if (y_46_re <= -1.22)
                                                      		tmp = x_46_im ^ y_46_re;
                                                      	elseif (y_46_re <= 6200.0)
                                                      		tmp = 1.0;
                                                      	else
                                                      		tmp = x_46_im ^ y_46_re;
                                                      	end
                                                      	tmp_2 = tmp;
                                                      end
                                                      
                                                      code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[y$46$re, -1.22], N[Power[x$46$im, y$46$re], $MachinePrecision], If[LessEqual[y$46$re, 6200.0], 1.0, N[Power[x$46$im, y$46$re], $MachinePrecision]]]
                                                      
                                                      \begin{array}{l}
                                                      
                                                      \\
                                                      \begin{array}{l}
                                                      \mathbf{if}\;y.re \leq -1.22:\\
                                                      \;\;\;\;{x.im}^{y.re}\\
                                                      
                                                      \mathbf{elif}\;y.re \leq 6200:\\
                                                      \;\;\;\;1\\
                                                      
                                                      \mathbf{else}:\\
                                                      \;\;\;\;{x.im}^{y.re}\\
                                                      
                                                      
                                                      \end{array}
                                                      \end{array}
                                                      
                                                      Derivation
                                                      1. Split input into 2 regimes
                                                      2. if y.re < -1.21999999999999997 or 6200 < y.re

                                                        1. Initial program 31.6%

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

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

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

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

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

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

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

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

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

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

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

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

                                                            \[\leadsto \color{blue}{\cos \left(y.im \cdot \log x.im\right) \cdot {x.im}^{y.re}} \]
                                                          3. Step-by-step derivation
                                                            1. *-lowering-*.f64N/A

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

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

                                                              \[\leadsto \mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \log x.im\right)\right), \left({x.im}^{y.re}\right)\right) \]
                                                            4. log-lowering-log.f64N/A

                                                              \[\leadsto \mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(x.im\right)\right)\right), \left({x.im}^{y.re}\right)\right) \]
                                                            5. pow-lowering-pow.f6432.5%

                                                              \[\leadsto \mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(x.im\right)\right)\right), \mathsf{pow.f64}\left(x.im, \color{blue}{y.re}\right)\right) \]
                                                          4. Simplified32.5%

                                                            \[\leadsto \color{blue}{\cos \left(y.im \cdot \log x.im\right) \cdot {x.im}^{y.re}} \]
                                                          5. Taylor expanded in y.im around 0

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

                                                              \[\leadsto \mathsf{pow.f64}\left(x.im, \color{blue}{y.re}\right) \]
                                                          7. Simplified61.3%

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

                                                          if -1.21999999999999997 < y.re < 6200

                                                          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.f6450.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. Simplified50.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. Simplified48.1%

                                                              \[\leadsto \color{blue}{1} \]
                                                          8. Recombined 2 regimes into one program.
                                                          9. Add Preprocessing

                                                          Alternative 17: 26.2% 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 39.4%

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

                                                            \[\leadsto \color{blue}{\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}} \]
                                                          4. Step-by-step derivation
                                                            1. *-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.f6454.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. Simplified54.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. Simplified24.4%

                                                              \[\leadsto \color{blue}{1} \]
                                                            2. Add Preprocessing

                                                            Reproduce

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