powComplex, real part

Percentage Accurate: 41.4% → 77.4%
Time: 16.1s
Alternatives: 11
Speedup: 6.0×

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 11 alternatives:

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

Initial Program: 41.4% accurate, 1.0× speedup?

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

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

Alternative 1: 77.4% accurate, 1.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y.re \leq -850000000:\\ \;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\ \mathbf{elif}\;y.re \leq 2 \cdot 10^{-20}:\\ \;\;\;\;e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\ \mathbf{else}:\\ \;\;\;\;{\left({\left(\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)\right)}^{\left(y.re \cdot 0.25\right)}\right)}^{2}\\ \end{array} \end{array} \]
(FPCore (x.re x.im y.re y.im)
 :precision binary64
 (if (<= y.re -850000000.0)
   (*
    (exp
     (-
      (* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
      (* (atan2 x.im x.re) y.im)))
    (cos (* y.re (atan2 x.im x.re))))
   (if (<= y.re 2e-20)
     (exp (* (atan2 x.im x.re) (- y.im)))
     (pow (pow (fma x.im x.im (* x.re x.re)) (* y.re 0.25)) 2.0))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
	double tmp;
	if (y_46_re <= -850000000.0) {
		tmp = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (atan2(x_46_im, x_46_re) * y_46_im))) * cos((y_46_re * atan2(x_46_im, x_46_re)));
	} else if (y_46_re <= 2e-20) {
		tmp = exp((atan2(x_46_im, x_46_re) * -y_46_im));
	} else {
		tmp = pow(pow(fma(x_46_im, x_46_im, (x_46_re * x_46_re)), (y_46_re * 0.25)), 2.0);
	}
	return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im)
	tmp = 0.0
	if (y_46_re <= -850000000.0)
		tmp = Float64(exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * cos(Float64(y_46_re * atan(x_46_im, x_46_re))));
	elseif (y_46_re <= 2e-20)
		tmp = exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)));
	else
		tmp = (fma(x_46_im, x_46_im, Float64(x_46_re * x_46_re)) ^ Float64(y_46_re * 0.25)) ^ 2.0;
	end
	return tmp
end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[y$46$re, -850000000.0], N[(N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Cos[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 2e-20], N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision], N[Power[N[Power[N[(x$46$im * x$46$im + N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision], N[(y$46$re * 0.25), $MachinePrecision]], $MachinePrecision], 2.0], $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y.re \leq -850000000:\\
\;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\

\mathbf{elif}\;y.re \leq 2 \cdot 10^{-20}:\\
\;\;\;\;e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\

\mathbf{else}:\\
\;\;\;\;{\left({\left(\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)\right)}^{\left(y.re \cdot 0.25\right)}\right)}^{2}\\


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

    1. Initial program 41.1%

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

      \[\leadsto 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 \color{blue}{\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\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 \cos \color{blue}{\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
      2. lower-atan2.f6482.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 \cos \left(y.re \cdot \color{blue}{\tan^{-1}_* \frac{x.im}{x.re}}\right) \]
    5. Simplified82.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 \cos \color{blue}{\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]

    if -8.5e8 < y.re < 1.99999999999999989e-20

    1. Initial program 43.1%

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

      \[\leadsto 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 \color{blue}{\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\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 \cos \color{blue}{\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
      2. lower-atan2.f6458.2

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

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

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

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

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

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

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

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

    if 1.99999999999999989e-20 < y.re

    1. Initial program 29.6%

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

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

        \[\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}} \]
      2. lower-cos.f64N/A

        \[\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} \]
      3. lower-*.f64N/A

        \[\leadsto \cos \color{blue}{\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. lower-atan2.f64N/A

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

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

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

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

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

        \[\leadsto \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, \color{blue}{x.re \cdot x.re}\right)}\right)}^{y.re} \]
      10. lower-*.f6453.6

        \[\leadsto \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, \color{blue}{x.re \cdot x.re}\right)}\right)}^{y.re} \]
    5. Simplified53.6%

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

      \[\leadsto \color{blue}{1} \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{y.re} \]
    7. Step-by-step derivation
      1. Simplified68.7%

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

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

          \[\leadsto 1 \cdot {\left(\sqrt{\color{blue}{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}}\right)}^{y.re} \]
        3. sqrt-pow2N/A

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

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

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

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

          \[\leadsto 1 \cdot {\left(\color{blue}{x.re \cdot x.re} + x.im \cdot x.im\right)}^{\left(\frac{y.re}{2}\right)} \]
        8. lift-fma.f64N/A

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

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

          \[\leadsto 1 \cdot \color{blue}{{\left(\mathsf{fma}\left(x.re, x.re, x.im \cdot x.im\right) \cdot \mathsf{fma}\left(x.re, x.re, x.im \cdot x.im\right)\right)}^{\left(\frac{\frac{y.re}{2}}{2}\right)}} \]
        11. div-invN/A

          \[\leadsto 1 \cdot {\left(\mathsf{fma}\left(x.re, x.re, x.im \cdot x.im\right) \cdot \mathsf{fma}\left(x.re, x.re, x.im \cdot x.im\right)\right)}^{\color{blue}{\left(\frac{y.re}{2} \cdot \frac{1}{2}\right)}} \]
        12. div-invN/A

          \[\leadsto 1 \cdot {\left(\mathsf{fma}\left(x.re, x.re, x.im \cdot x.im\right) \cdot \mathsf{fma}\left(x.re, x.re, x.im \cdot x.im\right)\right)}^{\left(\color{blue}{\left(y.re \cdot \frac{1}{2}\right)} \cdot \frac{1}{2}\right)} \]
        13. metadata-evalN/A

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

          \[\leadsto 1 \cdot {\left(\mathsf{fma}\left(x.re, x.re, x.im \cdot x.im\right) \cdot \mathsf{fma}\left(x.re, x.re, x.im \cdot x.im\right)\right)}^{\left(\color{blue}{\left(y.re \cdot \frac{1}{2}\right)} \cdot \frac{1}{2}\right)} \]
        15. metadata-evalN/A

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

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

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

          \[\leadsto 1 \cdot \color{blue}{\left({\left(\mathsf{fma}\left(x.re, x.re, x.im \cdot x.im\right)\right)}^{\left(\frac{1}{2} \cdot \left(y.re \cdot \frac{1}{2}\right)\right)} \cdot {\left(\mathsf{fma}\left(x.re, x.re, x.im \cdot x.im\right)\right)}^{\left(\frac{1}{2} \cdot \left(y.re \cdot \frac{1}{2}\right)\right)}\right)} \]
        19. lift-pow.f64N/A

          \[\leadsto 1 \cdot \left(\color{blue}{{\left(\mathsf{fma}\left(x.re, x.re, x.im \cdot x.im\right)\right)}^{\left(\frac{1}{2} \cdot \left(y.re \cdot \frac{1}{2}\right)\right)}} \cdot {\left(\mathsf{fma}\left(x.re, x.re, x.im \cdot x.im\right)\right)}^{\left(\frac{1}{2} \cdot \left(y.re \cdot \frac{1}{2}\right)\right)}\right) \]
        20. lift-pow.f64N/A

          \[\leadsto 1 \cdot \left({\left(\mathsf{fma}\left(x.re, x.re, x.im \cdot x.im\right)\right)}^{\left(\frac{1}{2} \cdot \left(y.re \cdot \frac{1}{2}\right)\right)} \cdot \color{blue}{{\left(\mathsf{fma}\left(x.re, x.re, x.im \cdot x.im\right)\right)}^{\left(\frac{1}{2} \cdot \left(y.re \cdot \frac{1}{2}\right)\right)}}\right) \]
      3. Applied egg-rr68.7%

        \[\leadsto \color{blue}{{\left({\left(\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)\right)}^{\left(y.re \cdot 0.25\right)}\right)}^{2}} \]
    8. Recombined 3 regimes into one program.
    9. Final simplification78.9%

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

    Alternative 2: 75.8% accurate, 2.9× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y.re \leq -850000000:\\ \;\;\;\;{\left(\mathsf{fma}\left(0.5, \frac{x.re \cdot x.re}{x.im}, x.im\right)\right)}^{y.re}\\ \mathbf{elif}\;y.re \leq 2 \cdot 10^{-20}:\\ \;\;\;\;e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\ \mathbf{else}:\\ \;\;\;\;{\left({\left(\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)\right)}^{\left(y.re \cdot 0.25\right)}\right)}^{2}\\ \end{array} \end{array} \]
    (FPCore (x.re x.im y.re y.im)
     :precision binary64
     (if (<= y.re -850000000.0)
       (pow (fma 0.5 (/ (* x.re x.re) x.im) x.im) y.re)
       (if (<= y.re 2e-20)
         (exp (* (atan2 x.im x.re) (- y.im)))
         (pow (pow (fma x.im x.im (* x.re x.re)) (* y.re 0.25)) 2.0))))
    double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
    	double tmp;
    	if (y_46_re <= -850000000.0) {
    		tmp = pow(fma(0.5, ((x_46_re * x_46_re) / x_46_im), x_46_im), y_46_re);
    	} else if (y_46_re <= 2e-20) {
    		tmp = exp((atan2(x_46_im, x_46_re) * -y_46_im));
    	} else {
    		tmp = pow(pow(fma(x_46_im, x_46_im, (x_46_re * x_46_re)), (y_46_re * 0.25)), 2.0);
    	}
    	return tmp;
    }
    
    function code(x_46_re, x_46_im, y_46_re, y_46_im)
    	tmp = 0.0
    	if (y_46_re <= -850000000.0)
    		tmp = fma(0.5, Float64(Float64(x_46_re * x_46_re) / x_46_im), x_46_im) ^ y_46_re;
    	elseif (y_46_re <= 2e-20)
    		tmp = exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)));
    	else
    		tmp = (fma(x_46_im, x_46_im, Float64(x_46_re * x_46_re)) ^ Float64(y_46_re * 0.25)) ^ 2.0;
    	end
    	return tmp
    end
    
    code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[y$46$re, -850000000.0], N[Power[N[(0.5 * N[(N[(x$46$re * x$46$re), $MachinePrecision] / x$46$im), $MachinePrecision] + x$46$im), $MachinePrecision], y$46$re], $MachinePrecision], If[LessEqual[y$46$re, 2e-20], N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision], N[Power[N[Power[N[(x$46$im * x$46$im + N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision], N[(y$46$re * 0.25), $MachinePrecision]], $MachinePrecision], 2.0], $MachinePrecision]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;y.re \leq -850000000:\\
    \;\;\;\;{\left(\mathsf{fma}\left(0.5, \frac{x.re \cdot x.re}{x.im}, x.im\right)\right)}^{y.re}\\
    
    \mathbf{elif}\;y.re \leq 2 \cdot 10^{-20}:\\
    \;\;\;\;e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\
    
    \mathbf{else}:\\
    \;\;\;\;{\left({\left(\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)\right)}^{\left(y.re \cdot 0.25\right)}\right)}^{2}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if y.re < -8.5e8

      1. Initial program 41.1%

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

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

          \[\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}} \]
        2. lower-cos.f64N/A

          \[\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} \]
        3. lower-*.f64N/A

          \[\leadsto \cos \color{blue}{\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. lower-atan2.f64N/A

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

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

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

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

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

          \[\leadsto \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, \color{blue}{x.re \cdot x.re}\right)}\right)}^{y.re} \]
        10. lower-*.f6474.2

          \[\leadsto \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, \color{blue}{x.re \cdot x.re}\right)}\right)}^{y.re} \]
      5. Simplified74.2%

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

        \[\leadsto \color{blue}{1} \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{y.re} \]
      7. Step-by-step derivation
        1. Simplified76.9%

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

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

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

            \[\leadsto 1 \cdot {\color{blue}{\left(\mathsf{fma}\left(\frac{1}{2}, \frac{{x.re}^{2}}{x.im}, x.im\right)\right)}}^{y.re} \]
          3. lower-/.f64N/A

            \[\leadsto 1 \cdot {\left(\mathsf{fma}\left(\frac{1}{2}, \color{blue}{\frac{{x.re}^{2}}{x.im}}, x.im\right)\right)}^{y.re} \]
          4. unpow2N/A

            \[\leadsto 1 \cdot {\left(\mathsf{fma}\left(\frac{1}{2}, \frac{\color{blue}{x.re \cdot x.re}}{x.im}, x.im\right)\right)}^{y.re} \]
          5. lower-*.f6478.3

            \[\leadsto 1 \cdot {\left(\mathsf{fma}\left(0.5, \frac{\color{blue}{x.re \cdot x.re}}{x.im}, x.im\right)\right)}^{y.re} \]
        4. Simplified78.3%

          \[\leadsto 1 \cdot {\color{blue}{\left(\mathsf{fma}\left(0.5, \frac{x.re \cdot x.re}{x.im}, x.im\right)\right)}}^{y.re} \]
        5. Step-by-step derivation
          1. lift-*.f64N/A

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

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

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

            \[\leadsto 1 \cdot \color{blue}{{\left(\mathsf{fma}\left(\frac{1}{2}, \frac{x.re \cdot x.re}{x.im}, x.im\right)\right)}^{y.re}} \]
          5. *-lft-identity78.3

            \[\leadsto \color{blue}{{\left(\mathsf{fma}\left(0.5, \frac{x.re \cdot x.re}{x.im}, x.im\right)\right)}^{y.re}} \]
        6. Applied egg-rr78.3%

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

        if -8.5e8 < y.re < 1.99999999999999989e-20

        1. Initial program 43.1%

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

          \[\leadsto 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 \color{blue}{\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
        4. Step-by-step derivation
          1. lower-*.f64N/A

            \[\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 \cos \color{blue}{\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
          2. lower-atan2.f6458.2

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

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

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

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

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

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

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

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

        if 1.99999999999999989e-20 < y.re

        1. Initial program 29.6%

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

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

            \[\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}} \]
          2. lower-cos.f64N/A

            \[\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} \]
          3. lower-*.f64N/A

            \[\leadsto \cos \color{blue}{\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. lower-atan2.f64N/A

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

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

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

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

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

            \[\leadsto \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, \color{blue}{x.re \cdot x.re}\right)}\right)}^{y.re} \]
          10. lower-*.f6453.6

            \[\leadsto \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, \color{blue}{x.re \cdot x.re}\right)}\right)}^{y.re} \]
        5. Simplified53.6%

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

          \[\leadsto \color{blue}{1} \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{y.re} \]
        7. Step-by-step derivation
          1. Simplified68.7%

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

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

              \[\leadsto 1 \cdot {\left(\sqrt{\color{blue}{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}}\right)}^{y.re} \]
            3. sqrt-pow2N/A

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

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

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

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

              \[\leadsto 1 \cdot {\left(\color{blue}{x.re \cdot x.re} + x.im \cdot x.im\right)}^{\left(\frac{y.re}{2}\right)} \]
            8. lift-fma.f64N/A

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

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

              \[\leadsto 1 \cdot \color{blue}{{\left(\mathsf{fma}\left(x.re, x.re, x.im \cdot x.im\right) \cdot \mathsf{fma}\left(x.re, x.re, x.im \cdot x.im\right)\right)}^{\left(\frac{\frac{y.re}{2}}{2}\right)}} \]
            11. div-invN/A

              \[\leadsto 1 \cdot {\left(\mathsf{fma}\left(x.re, x.re, x.im \cdot x.im\right) \cdot \mathsf{fma}\left(x.re, x.re, x.im \cdot x.im\right)\right)}^{\color{blue}{\left(\frac{y.re}{2} \cdot \frac{1}{2}\right)}} \]
            12. div-invN/A

              \[\leadsto 1 \cdot {\left(\mathsf{fma}\left(x.re, x.re, x.im \cdot x.im\right) \cdot \mathsf{fma}\left(x.re, x.re, x.im \cdot x.im\right)\right)}^{\left(\color{blue}{\left(y.re \cdot \frac{1}{2}\right)} \cdot \frac{1}{2}\right)} \]
            13. metadata-evalN/A

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

              \[\leadsto 1 \cdot {\left(\mathsf{fma}\left(x.re, x.re, x.im \cdot x.im\right) \cdot \mathsf{fma}\left(x.re, x.re, x.im \cdot x.im\right)\right)}^{\left(\color{blue}{\left(y.re \cdot \frac{1}{2}\right)} \cdot \frac{1}{2}\right)} \]
            15. metadata-evalN/A

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

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

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

              \[\leadsto 1 \cdot \color{blue}{\left({\left(\mathsf{fma}\left(x.re, x.re, x.im \cdot x.im\right)\right)}^{\left(\frac{1}{2} \cdot \left(y.re \cdot \frac{1}{2}\right)\right)} \cdot {\left(\mathsf{fma}\left(x.re, x.re, x.im \cdot x.im\right)\right)}^{\left(\frac{1}{2} \cdot \left(y.re \cdot \frac{1}{2}\right)\right)}\right)} \]
            19. lift-pow.f64N/A

              \[\leadsto 1 \cdot \left(\color{blue}{{\left(\mathsf{fma}\left(x.re, x.re, x.im \cdot x.im\right)\right)}^{\left(\frac{1}{2} \cdot \left(y.re \cdot \frac{1}{2}\right)\right)}} \cdot {\left(\mathsf{fma}\left(x.re, x.re, x.im \cdot x.im\right)\right)}^{\left(\frac{1}{2} \cdot \left(y.re \cdot \frac{1}{2}\right)\right)}\right) \]
            20. lift-pow.f64N/A

              \[\leadsto 1 \cdot \left({\left(\mathsf{fma}\left(x.re, x.re, x.im \cdot x.im\right)\right)}^{\left(\frac{1}{2} \cdot \left(y.re \cdot \frac{1}{2}\right)\right)} \cdot \color{blue}{{\left(\mathsf{fma}\left(x.re, x.re, x.im \cdot x.im\right)\right)}^{\left(\frac{1}{2} \cdot \left(y.re \cdot \frac{1}{2}\right)\right)}}\right) \]
          3. Applied egg-rr68.7%

            \[\leadsto \color{blue}{{\left({\left(\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)\right)}^{\left(y.re \cdot 0.25\right)}\right)}^{2}} \]
        8. Recombined 3 regimes into one program.
        9. Final simplification77.7%

          \[\leadsto \begin{array}{l} \mathbf{if}\;y.re \leq -850000000:\\ \;\;\;\;{\left(\mathsf{fma}\left(0.5, \frac{x.re \cdot x.re}{x.im}, x.im\right)\right)}^{y.re}\\ \mathbf{elif}\;y.re \leq 2 \cdot 10^{-20}:\\ \;\;\;\;e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\ \mathbf{else}:\\ \;\;\;\;{\left({\left(\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)\right)}^{\left(y.re \cdot 0.25\right)}\right)}^{2}\\ \end{array} \]
        10. Add Preprocessing

        Alternative 3: 75.8% accurate, 3.1× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y.re \leq -850000000:\\ \;\;\;\;{\left(\mathsf{fma}\left(0.5, \frac{x.re \cdot x.re}{x.im}, x.im\right)\right)}^{y.re}\\ \mathbf{elif}\;y.re \leq 2 \cdot 10^{-20}:\\ \;\;\;\;e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\ \mathbf{else}:\\ \;\;\;\;{\left(\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)\right)}^{\left(y.re \cdot 0.5\right)}\\ \end{array} \end{array} \]
        (FPCore (x.re x.im y.re y.im)
         :precision binary64
         (if (<= y.re -850000000.0)
           (pow (fma 0.5 (/ (* x.re x.re) x.im) x.im) y.re)
           (if (<= y.re 2e-20)
             (exp (* (atan2 x.im x.re) (- y.im)))
             (pow (fma x.im x.im (* x.re x.re)) (* y.re 0.5)))))
        double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
        	double tmp;
        	if (y_46_re <= -850000000.0) {
        		tmp = pow(fma(0.5, ((x_46_re * x_46_re) / x_46_im), x_46_im), y_46_re);
        	} else if (y_46_re <= 2e-20) {
        		tmp = exp((atan2(x_46_im, x_46_re) * -y_46_im));
        	} else {
        		tmp = pow(fma(x_46_im, x_46_im, (x_46_re * x_46_re)), (y_46_re * 0.5));
        	}
        	return tmp;
        }
        
        function code(x_46_re, x_46_im, y_46_re, y_46_im)
        	tmp = 0.0
        	if (y_46_re <= -850000000.0)
        		tmp = fma(0.5, Float64(Float64(x_46_re * x_46_re) / x_46_im), x_46_im) ^ y_46_re;
        	elseif (y_46_re <= 2e-20)
        		tmp = exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)));
        	else
        		tmp = fma(x_46_im, x_46_im, Float64(x_46_re * x_46_re)) ^ Float64(y_46_re * 0.5);
        	end
        	return tmp
        end
        
        code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[y$46$re, -850000000.0], N[Power[N[(0.5 * N[(N[(x$46$re * x$46$re), $MachinePrecision] / x$46$im), $MachinePrecision] + x$46$im), $MachinePrecision], y$46$re], $MachinePrecision], If[LessEqual[y$46$re, 2e-20], N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision], N[Power[N[(x$46$im * x$46$im + N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision], N[(y$46$re * 0.5), $MachinePrecision]], $MachinePrecision]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        \mathbf{if}\;y.re \leq -850000000:\\
        \;\;\;\;{\left(\mathsf{fma}\left(0.5, \frac{x.re \cdot x.re}{x.im}, x.im\right)\right)}^{y.re}\\
        
        \mathbf{elif}\;y.re \leq 2 \cdot 10^{-20}:\\
        \;\;\;\;e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\
        
        \mathbf{else}:\\
        \;\;\;\;{\left(\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)\right)}^{\left(y.re \cdot 0.5\right)}\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 3 regimes
        2. if y.re < -8.5e8

          1. Initial program 41.1%

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

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

              \[\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}} \]
            2. lower-cos.f64N/A

              \[\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} \]
            3. lower-*.f64N/A

              \[\leadsto \cos \color{blue}{\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. lower-atan2.f64N/A

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

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

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

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

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

              \[\leadsto \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, \color{blue}{x.re \cdot x.re}\right)}\right)}^{y.re} \]
            10. lower-*.f6474.2

              \[\leadsto \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, \color{blue}{x.re \cdot x.re}\right)}\right)}^{y.re} \]
          5. Simplified74.2%

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

            \[\leadsto \color{blue}{1} \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{y.re} \]
          7. Step-by-step derivation
            1. Simplified76.9%

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

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

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

                \[\leadsto 1 \cdot {\color{blue}{\left(\mathsf{fma}\left(\frac{1}{2}, \frac{{x.re}^{2}}{x.im}, x.im\right)\right)}}^{y.re} \]
              3. lower-/.f64N/A

                \[\leadsto 1 \cdot {\left(\mathsf{fma}\left(\frac{1}{2}, \color{blue}{\frac{{x.re}^{2}}{x.im}}, x.im\right)\right)}^{y.re} \]
              4. unpow2N/A

                \[\leadsto 1 \cdot {\left(\mathsf{fma}\left(\frac{1}{2}, \frac{\color{blue}{x.re \cdot x.re}}{x.im}, x.im\right)\right)}^{y.re} \]
              5. lower-*.f6478.3

                \[\leadsto 1 \cdot {\left(\mathsf{fma}\left(0.5, \frac{\color{blue}{x.re \cdot x.re}}{x.im}, x.im\right)\right)}^{y.re} \]
            4. Simplified78.3%

              \[\leadsto 1 \cdot {\color{blue}{\left(\mathsf{fma}\left(0.5, \frac{x.re \cdot x.re}{x.im}, x.im\right)\right)}}^{y.re} \]
            5. Step-by-step derivation
              1. lift-*.f64N/A

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

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

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

                \[\leadsto 1 \cdot \color{blue}{{\left(\mathsf{fma}\left(\frac{1}{2}, \frac{x.re \cdot x.re}{x.im}, x.im\right)\right)}^{y.re}} \]
              5. *-lft-identity78.3

                \[\leadsto \color{blue}{{\left(\mathsf{fma}\left(0.5, \frac{x.re \cdot x.re}{x.im}, x.im\right)\right)}^{y.re}} \]
            6. Applied egg-rr78.3%

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

            if -8.5e8 < y.re < 1.99999999999999989e-20

            1. Initial program 43.1%

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

              \[\leadsto 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 \color{blue}{\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
            4. Step-by-step derivation
              1. lower-*.f64N/A

                \[\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 \cos \color{blue}{\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
              2. lower-atan2.f6458.2

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

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

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

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

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

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

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

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

            if 1.99999999999999989e-20 < y.re

            1. Initial program 29.6%

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

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

                \[\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}} \]
              2. lower-cos.f64N/A

                \[\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} \]
              3. lower-*.f64N/A

                \[\leadsto \cos \color{blue}{\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. lower-atan2.f64N/A

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

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

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

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

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

                \[\leadsto \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, \color{blue}{x.re \cdot x.re}\right)}\right)}^{y.re} \]
              10. lower-*.f6453.6

                \[\leadsto \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, \color{blue}{x.re \cdot x.re}\right)}\right)}^{y.re} \]
            5. Simplified53.6%

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

              \[\leadsto \color{blue}{1} \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{y.re} \]
            7. Step-by-step derivation
              1. Simplified68.7%

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

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

                  \[\leadsto 1 \cdot {\left(\sqrt{\color{blue}{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}}\right)}^{y.re} \]
                3. lift-sqrt.f64N/A

                  \[\leadsto 1 \cdot {\color{blue}{\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}}^{y.re} \]
                4. sqr-powN/A

                  \[\leadsto 1 \cdot \color{blue}{\left({\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{\left(\frac{y.re}{2}\right)} \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{\left(\frac{y.re}{2}\right)}\right)} \]
                5. sqr-powN/A

                  \[\leadsto 1 \cdot \color{blue}{{\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{y.re}} \]
                6. lift-pow.f64N/A

                  \[\leadsto 1 \cdot \color{blue}{{\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{y.re}} \]
                7. *-lft-identity68.7

                  \[\leadsto \color{blue}{{\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{y.re}} \]
                8. lift-pow.f64N/A

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

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

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

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

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

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

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

                  \[\leadsto {\color{blue}{\left(\mathsf{fma}\left(x.re, x.re, x.im \cdot x.im\right)\right)}}^{\left(\frac{y.re}{2}\right)} \]
                16. lower-pow.f64N/A

                  \[\leadsto \color{blue}{{\left(\mathsf{fma}\left(x.re, x.re, x.im \cdot x.im\right)\right)}^{\left(\frac{y.re}{2}\right)}} \]
              3. Applied egg-rr68.7%

                \[\leadsto \color{blue}{{\left(\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)\right)}^{\left(y.re \cdot 0.5\right)}} \]
            8. Recombined 3 regimes into one program.
            9. Final simplification77.7%

              \[\leadsto \begin{array}{l} \mathbf{if}\;y.re \leq -850000000:\\ \;\;\;\;{\left(\mathsf{fma}\left(0.5, \frac{x.re \cdot x.re}{x.im}, x.im\right)\right)}^{y.re}\\ \mathbf{elif}\;y.re \leq 2 \cdot 10^{-20}:\\ \;\;\;\;e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\ \mathbf{else}:\\ \;\;\;\;{\left(\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)\right)}^{\left(y.re \cdot 0.5\right)}\\ \end{array} \]
            10. Add Preprocessing

            Alternative 4: 54.5% accurate, 5.5× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x.im \leq -3.3 \cdot 10^{-6}:\\ \;\;\;\;{\left(-x.im\right)}^{y.re}\\ \mathbf{elif}\;x.im \leq 2.8 \cdot 10^{-50}:\\ \;\;\;\;{\left(x.re \cdot x.re\right)}^{\left(y.re \cdot 0.5\right)}\\ \mathbf{else}:\\ \;\;\;\;{\left(x.im \cdot x.im\right)}^{\left(y.re \cdot 0.5\right)}\\ \end{array} \end{array} \]
            (FPCore (x.re x.im y.re y.im)
             :precision binary64
             (if (<= x.im -3.3e-6)
               (pow (- x.im) y.re)
               (if (<= x.im 2.8e-50)
                 (pow (* x.re x.re) (* y.re 0.5))
                 (pow (* x.im x.im) (* y.re 0.5)))))
            double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
            	double tmp;
            	if (x_46_im <= -3.3e-6) {
            		tmp = pow(-x_46_im, y_46_re);
            	} else if (x_46_im <= 2.8e-50) {
            		tmp = pow((x_46_re * x_46_re), (y_46_re * 0.5));
            	} else {
            		tmp = pow((x_46_im * x_46_im), (y_46_re * 0.5));
            	}
            	return tmp;
            }
            
            real(8) function code(x_46re, x_46im, y_46re, y_46im)
                real(8), intent (in) :: x_46re
                real(8), intent (in) :: x_46im
                real(8), intent (in) :: y_46re
                real(8), intent (in) :: y_46im
                real(8) :: tmp
                if (x_46im <= (-3.3d-6)) then
                    tmp = -x_46im ** y_46re
                else if (x_46im <= 2.8d-50) then
                    tmp = (x_46re * x_46re) ** (y_46re * 0.5d0)
                else
                    tmp = (x_46im * x_46im) ** (y_46re * 0.5d0)
                end if
                code = tmp
            end function
            
            public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
            	double tmp;
            	if (x_46_im <= -3.3e-6) {
            		tmp = Math.pow(-x_46_im, y_46_re);
            	} else if (x_46_im <= 2.8e-50) {
            		tmp = Math.pow((x_46_re * x_46_re), (y_46_re * 0.5));
            	} else {
            		tmp = Math.pow((x_46_im * x_46_im), (y_46_re * 0.5));
            	}
            	return tmp;
            }
            
            def code(x_46_re, x_46_im, y_46_re, y_46_im):
            	tmp = 0
            	if x_46_im <= -3.3e-6:
            		tmp = math.pow(-x_46_im, y_46_re)
            	elif x_46_im <= 2.8e-50:
            		tmp = math.pow((x_46_re * x_46_re), (y_46_re * 0.5))
            	else:
            		tmp = math.pow((x_46_im * x_46_im), (y_46_re * 0.5))
            	return tmp
            
            function code(x_46_re, x_46_im, y_46_re, y_46_im)
            	tmp = 0.0
            	if (x_46_im <= -3.3e-6)
            		tmp = Float64(-x_46_im) ^ y_46_re;
            	elseif (x_46_im <= 2.8e-50)
            		tmp = Float64(x_46_re * x_46_re) ^ Float64(y_46_re * 0.5);
            	else
            		tmp = Float64(x_46_im * x_46_im) ^ Float64(y_46_re * 0.5);
            	end
            	return tmp
            end
            
            function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im)
            	tmp = 0.0;
            	if (x_46_im <= -3.3e-6)
            		tmp = -x_46_im ^ y_46_re;
            	elseif (x_46_im <= 2.8e-50)
            		tmp = (x_46_re * x_46_re) ^ (y_46_re * 0.5);
            	else
            		tmp = (x_46_im * x_46_im) ^ (y_46_re * 0.5);
            	end
            	tmp_2 = tmp;
            end
            
            code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[x$46$im, -3.3e-6], N[Power[(-x$46$im), y$46$re], $MachinePrecision], If[LessEqual[x$46$im, 2.8e-50], N[Power[N[(x$46$re * x$46$re), $MachinePrecision], N[(y$46$re * 0.5), $MachinePrecision]], $MachinePrecision], N[Power[N[(x$46$im * x$46$im), $MachinePrecision], N[(y$46$re * 0.5), $MachinePrecision]], $MachinePrecision]]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            \mathbf{if}\;x.im \leq -3.3 \cdot 10^{-6}:\\
            \;\;\;\;{\left(-x.im\right)}^{y.re}\\
            
            \mathbf{elif}\;x.im \leq 2.8 \cdot 10^{-50}:\\
            \;\;\;\;{\left(x.re \cdot x.re\right)}^{\left(y.re \cdot 0.5\right)}\\
            
            \mathbf{else}:\\
            \;\;\;\;{\left(x.im \cdot x.im\right)}^{\left(y.re \cdot 0.5\right)}\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 3 regimes
            2. if x.im < -3.30000000000000017e-6

              1. Initial program 28.6%

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

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

                  \[\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}} \]
                2. lower-cos.f64N/A

                  \[\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} \]
                3. lower-*.f64N/A

                  \[\leadsto \cos \color{blue}{\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. lower-atan2.f64N/A

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

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

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

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

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

                  \[\leadsto \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, \color{blue}{x.re \cdot x.re}\right)}\right)}^{y.re} \]
                10. lower-*.f6450.7

                  \[\leadsto \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, \color{blue}{x.re \cdot x.re}\right)}\right)}^{y.re} \]
              5. Simplified50.7%

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

                \[\leadsto \color{blue}{1} \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{y.re} \]
              7. Step-by-step derivation
                1. Simplified60.7%

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

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

                    \[\leadsto 1 \cdot {\color{blue}{\left(\mathsf{neg}\left(x.im\right)\right)}}^{y.re} \]
                  2. lower-neg.f6467.8

                    \[\leadsto 1 \cdot {\color{blue}{\left(-x.im\right)}}^{y.re} \]
                4. Simplified67.8%

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

                if -3.30000000000000017e-6 < x.im < 2.7999999999999998e-50

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

                    \[\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}} \]
                  2. lower-cos.f64N/A

                    \[\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} \]
                  3. lower-*.f64N/A

                    \[\leadsto \cos \color{blue}{\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. lower-atan2.f64N/A

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

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

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

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

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

                    \[\leadsto \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, \color{blue}{x.re \cdot x.re}\right)}\right)}^{y.re} \]
                  10. lower-*.f6460.4

                    \[\leadsto \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, \color{blue}{x.re \cdot x.re}\right)}\right)}^{y.re} \]
                5. Simplified60.4%

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

                  \[\leadsto \color{blue}{1} \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{y.re} \]
                7. Step-by-step derivation
                  1. Simplified63.8%

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

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

                      \[\leadsto 1 \cdot {\left(\sqrt{\color{blue}{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}}\right)}^{y.re} \]
                    3. lift-sqrt.f64N/A

                      \[\leadsto 1 \cdot {\color{blue}{\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}}^{y.re} \]
                    4. sqr-powN/A

                      \[\leadsto 1 \cdot \color{blue}{\left({\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{\left(\frac{y.re}{2}\right)} \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{\left(\frac{y.re}{2}\right)}\right)} \]
                    5. sqr-powN/A

                      \[\leadsto 1 \cdot \color{blue}{{\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{y.re}} \]
                    6. lift-pow.f64N/A

                      \[\leadsto 1 \cdot \color{blue}{{\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{y.re}} \]
                    7. *-lft-identity63.8

                      \[\leadsto \color{blue}{{\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{y.re}} \]
                    8. lift-pow.f64N/A

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

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

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

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

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

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

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

                      \[\leadsto {\color{blue}{\left(\mathsf{fma}\left(x.re, x.re, x.im \cdot x.im\right)\right)}}^{\left(\frac{y.re}{2}\right)} \]
                    16. lower-pow.f64N/A

                      \[\leadsto \color{blue}{{\left(\mathsf{fma}\left(x.re, x.re, x.im \cdot x.im\right)\right)}^{\left(\frac{y.re}{2}\right)}} \]
                  3. Applied egg-rr63.8%

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

                    \[\leadsto {\color{blue}{\left({x.re}^{2}\right)}}^{\left(y.re \cdot \frac{1}{2}\right)} \]
                  5. Step-by-step derivation
                    1. unpow2N/A

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

                      \[\leadsto {\color{blue}{\left(x.re \cdot x.re\right)}}^{\left(y.re \cdot 0.5\right)} \]
                  6. Simplified62.0%

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

                  if 2.7999999999999998e-50 < x.im

                  1. Initial program 35.2%

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

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

                      \[\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}} \]
                    2. lower-cos.f64N/A

                      \[\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} \]
                    3. lower-*.f64N/A

                      \[\leadsto \cos \color{blue}{\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. lower-atan2.f64N/A

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

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

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

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

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

                      \[\leadsto \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, \color{blue}{x.re \cdot x.re}\right)}\right)}^{y.re} \]
                    10. lower-*.f6452.0

                      \[\leadsto \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, \color{blue}{x.re \cdot x.re}\right)}\right)}^{y.re} \]
                  5. Simplified52.0%

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

                    \[\leadsto \color{blue}{1} \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{y.re} \]
                  7. Step-by-step derivation
                    1. Simplified56.0%

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

                      \[\leadsto \color{blue}{{x.im}^{y.re}} \]
                    3. Step-by-step derivation
                      1. lower-pow.f6455.1

                        \[\leadsto \color{blue}{{x.im}^{y.re}} \]
                    4. Simplified55.1%

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

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

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

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

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

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

                        \[\leadsto {\left(x.im \cdot x.im\right)}^{\left(y.re \cdot \color{blue}{\frac{1}{2}}\right)} \]
                      7. lift-*.f6456.3

                        \[\leadsto {\left(x.im \cdot x.im\right)}^{\color{blue}{\left(y.re \cdot 0.5\right)}} \]
                    6. Applied egg-rr56.3%

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

                    \[\leadsto \begin{array}{l} \mathbf{if}\;x.im \leq -3.3 \cdot 10^{-6}:\\ \;\;\;\;{\left(-x.im\right)}^{y.re}\\ \mathbf{elif}\;x.im \leq 2.8 \cdot 10^{-50}:\\ \;\;\;\;{\left(x.re \cdot x.re\right)}^{\left(y.re \cdot 0.5\right)}\\ \mathbf{else}:\\ \;\;\;\;{\left(x.im \cdot x.im\right)}^{\left(y.re \cdot 0.5\right)}\\ \end{array} \]
                  10. Add Preprocessing

                  Alternative 5: 57.4% accurate, 5.5× speedup?

                  \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x.re \leq -4.5 \cdot 10^{-41}:\\ \;\;\;\;{\left(-x.re\right)}^{y.re}\\ \mathbf{elif}\;x.re \leq 0.98:\\ \;\;\;\;{\left(x.im \cdot x.im\right)}^{\left(y.re \cdot 0.5\right)}\\ \mathbf{else}:\\ \;\;\;\;{x.re}^{y.re}\\ \end{array} \end{array} \]
                  (FPCore (x.re x.im y.re y.im)
                   :precision binary64
                   (if (<= x.re -4.5e-41)
                     (pow (- x.re) y.re)
                     (if (<= x.re 0.98) (pow (* x.im x.im) (* y.re 0.5)) (pow x.re y.re))))
                  double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
                  	double tmp;
                  	if (x_46_re <= -4.5e-41) {
                  		tmp = pow(-x_46_re, y_46_re);
                  	} else if (x_46_re <= 0.98) {
                  		tmp = pow((x_46_im * x_46_im), (y_46_re * 0.5));
                  	} else {
                  		tmp = pow(x_46_re, y_46_re);
                  	}
                  	return tmp;
                  }
                  
                  real(8) function code(x_46re, x_46im, y_46re, y_46im)
                      real(8), intent (in) :: x_46re
                      real(8), intent (in) :: x_46im
                      real(8), intent (in) :: y_46re
                      real(8), intent (in) :: y_46im
                      real(8) :: tmp
                      if (x_46re <= (-4.5d-41)) then
                          tmp = -x_46re ** y_46re
                      else if (x_46re <= 0.98d0) then
                          tmp = (x_46im * x_46im) ** (y_46re * 0.5d0)
                      else
                          tmp = x_46re ** y_46re
                      end if
                      code = tmp
                  end function
                  
                  public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
                  	double tmp;
                  	if (x_46_re <= -4.5e-41) {
                  		tmp = Math.pow(-x_46_re, y_46_re);
                  	} else if (x_46_re <= 0.98) {
                  		tmp = Math.pow((x_46_im * x_46_im), (y_46_re * 0.5));
                  	} else {
                  		tmp = Math.pow(x_46_re, y_46_re);
                  	}
                  	return tmp;
                  }
                  
                  def code(x_46_re, x_46_im, y_46_re, y_46_im):
                  	tmp = 0
                  	if x_46_re <= -4.5e-41:
                  		tmp = math.pow(-x_46_re, y_46_re)
                  	elif x_46_re <= 0.98:
                  		tmp = math.pow((x_46_im * x_46_im), (y_46_re * 0.5))
                  	else:
                  		tmp = math.pow(x_46_re, y_46_re)
                  	return tmp
                  
                  function code(x_46_re, x_46_im, y_46_re, y_46_im)
                  	tmp = 0.0
                  	if (x_46_re <= -4.5e-41)
                  		tmp = Float64(-x_46_re) ^ y_46_re;
                  	elseif (x_46_re <= 0.98)
                  		tmp = Float64(x_46_im * x_46_im) ^ Float64(y_46_re * 0.5);
                  	else
                  		tmp = x_46_re ^ y_46_re;
                  	end
                  	return tmp
                  end
                  
                  function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im)
                  	tmp = 0.0;
                  	if (x_46_re <= -4.5e-41)
                  		tmp = -x_46_re ^ y_46_re;
                  	elseif (x_46_re <= 0.98)
                  		tmp = (x_46_im * x_46_im) ^ (y_46_re * 0.5);
                  	else
                  		tmp = x_46_re ^ y_46_re;
                  	end
                  	tmp_2 = tmp;
                  end
                  
                  code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[x$46$re, -4.5e-41], N[Power[(-x$46$re), y$46$re], $MachinePrecision], If[LessEqual[x$46$re, 0.98], N[Power[N[(x$46$im * x$46$im), $MachinePrecision], N[(y$46$re * 0.5), $MachinePrecision]], $MachinePrecision], N[Power[x$46$re, y$46$re], $MachinePrecision]]]
                  
                  \begin{array}{l}
                  
                  \\
                  \begin{array}{l}
                  \mathbf{if}\;x.re \leq -4.5 \cdot 10^{-41}:\\
                  \;\;\;\;{\left(-x.re\right)}^{y.re}\\
                  
                  \mathbf{elif}\;x.re \leq 0.98:\\
                  \;\;\;\;{\left(x.im \cdot x.im\right)}^{\left(y.re \cdot 0.5\right)}\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;{x.re}^{y.re}\\
                  
                  
                  \end{array}
                  \end{array}
                  
                  Derivation
                  1. Split input into 3 regimes
                  2. if x.re < -4.5e-41

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

                        \[\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}} \]
                      2. lower-cos.f64N/A

                        \[\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} \]
                      3. lower-*.f64N/A

                        \[\leadsto \cos \color{blue}{\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. lower-atan2.f64N/A

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

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

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

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

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

                        \[\leadsto \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, \color{blue}{x.re \cdot x.re}\right)}\right)}^{y.re} \]
                      10. lower-*.f6452.8

                        \[\leadsto \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, \color{blue}{x.re \cdot x.re}\right)}\right)}^{y.re} \]
                    5. Simplified52.8%

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

                      \[\leadsto \color{blue}{1} \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{y.re} \]
                    7. Step-by-step derivation
                      1. Simplified55.4%

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

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

                          \[\leadsto 1 \cdot {\color{blue}{\left(\mathsf{neg}\left(x.re\right)\right)}}^{y.re} \]
                        2. lower-neg.f6456.2

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

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

                      if -4.5e-41 < x.re < 0.97999999999999998

                      1. Initial program 44.7%

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

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

                          \[\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}} \]
                        2. lower-cos.f64N/A

                          \[\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} \]
                        3. lower-*.f64N/A

                          \[\leadsto \cos \color{blue}{\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. lower-atan2.f64N/A

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

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

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

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

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

                          \[\leadsto \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, \color{blue}{x.re \cdot x.re}\right)}\right)}^{y.re} \]
                        10. lower-*.f6455.0

                          \[\leadsto \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, \color{blue}{x.re \cdot x.re}\right)}\right)}^{y.re} \]
                      5. Simplified55.0%

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

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

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

                          \[\leadsto \color{blue}{{x.im}^{y.re}} \]
                        3. Step-by-step derivation
                          1. lower-pow.f6449.7

                            \[\leadsto \color{blue}{{x.im}^{y.re}} \]
                        4. Simplified49.7%

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

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

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

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

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

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

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

                            \[\leadsto {\left(x.im \cdot x.im\right)}^{\color{blue}{\left(y.re \cdot 0.5\right)}} \]
                        6. Applied egg-rr62.1%

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

                        if 0.97999999999999998 < 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 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. lower-*.f64N/A

                            \[\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}} \]
                          2. lower-cos.f64N/A

                            \[\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} \]
                          3. lower-*.f64N/A

                            \[\leadsto \cos \color{blue}{\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. lower-atan2.f64N/A

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

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

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

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

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

                            \[\leadsto \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, \color{blue}{x.re \cdot x.re}\right)}\right)}^{y.re} \]
                          10. lower-*.f6458.7

                            \[\leadsto \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, \color{blue}{x.re \cdot x.re}\right)}\right)}^{y.re} \]
                        5. Simplified58.7%

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

                          \[\leadsto \color{blue}{1} \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{y.re} \]
                        7. Step-by-step derivation
                          1. Simplified61.8%

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

                            \[\leadsto \color{blue}{{x.re}^{y.re}} \]
                          3. Step-by-step derivation
                            1. lower-pow.f6465.1

                              \[\leadsto \color{blue}{{x.re}^{y.re}} \]
                          4. Simplified65.1%

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

                          \[\leadsto \begin{array}{l} \mathbf{if}\;x.re \leq -4.5 \cdot 10^{-41}:\\ \;\;\;\;{\left(-x.re\right)}^{y.re}\\ \mathbf{elif}\;x.re \leq 0.98:\\ \;\;\;\;{\left(x.im \cdot x.im\right)}^{\left(y.re \cdot 0.5\right)}\\ \mathbf{else}:\\ \;\;\;\;{x.re}^{y.re}\\ \end{array} \]
                        10. Add Preprocessing

                        Alternative 6: 54.8% accurate, 5.5× speedup?

                        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x.im \leq -7.5 \cdot 10^{+181}:\\ \;\;\;\;{\left(-x.im\right)}^{y.re}\\ \mathbf{else}:\\ \;\;\;\;{\left(\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)\right)}^{\left(y.re \cdot 0.5\right)}\\ \end{array} \end{array} \]
                        (FPCore (x.re x.im y.re y.im)
                         :precision binary64
                         (if (<= x.im -7.5e+181)
                           (pow (- x.im) y.re)
                           (pow (fma x.im x.im (* x.re x.re)) (* y.re 0.5))))
                        double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
                        	double tmp;
                        	if (x_46_im <= -7.5e+181) {
                        		tmp = pow(-x_46_im, y_46_re);
                        	} else {
                        		tmp = pow(fma(x_46_im, x_46_im, (x_46_re * x_46_re)), (y_46_re * 0.5));
                        	}
                        	return tmp;
                        }
                        
                        function code(x_46_re, x_46_im, y_46_re, y_46_im)
                        	tmp = 0.0
                        	if (x_46_im <= -7.5e+181)
                        		tmp = Float64(-x_46_im) ^ y_46_re;
                        	else
                        		tmp = fma(x_46_im, x_46_im, Float64(x_46_re * x_46_re)) ^ Float64(y_46_re * 0.5);
                        	end
                        	return tmp
                        end
                        
                        code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[x$46$im, -7.5e+181], N[Power[(-x$46$im), y$46$re], $MachinePrecision], N[Power[N[(x$46$im * x$46$im + N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision], N[(y$46$re * 0.5), $MachinePrecision]], $MachinePrecision]]
                        
                        \begin{array}{l}
                        
                        \\
                        \begin{array}{l}
                        \mathbf{if}\;x.im \leq -7.5 \cdot 10^{+181}:\\
                        \;\;\;\;{\left(-x.im\right)}^{y.re}\\
                        
                        \mathbf{else}:\\
                        \;\;\;\;{\left(\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)\right)}^{\left(y.re \cdot 0.5\right)}\\
                        
                        
                        \end{array}
                        \end{array}
                        
                        Derivation
                        1. Split input into 2 regimes
                        2. if x.im < -7.5000000000000005e181

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

                              \[\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}} \]
                            2. lower-cos.f64N/A

                              \[\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} \]
                            3. lower-*.f64N/A

                              \[\leadsto \cos \color{blue}{\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. lower-atan2.f64N/A

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

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

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

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

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

                              \[\leadsto \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, \color{blue}{x.re \cdot x.re}\right)}\right)}^{y.re} \]
                            10. lower-*.f6429.4

                              \[\leadsto \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, \color{blue}{x.re \cdot x.re}\right)}\right)}^{y.re} \]
                          5. Simplified29.4%

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

                            \[\leadsto \color{blue}{1} \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{y.re} \]
                          7. Step-by-step derivation
                            1. Simplified38.8%

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

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

                                \[\leadsto 1 \cdot {\color{blue}{\left(\mathsf{neg}\left(x.im\right)\right)}}^{y.re} \]
                              2. lower-neg.f6463.2

                                \[\leadsto 1 \cdot {\color{blue}{\left(-x.im\right)}}^{y.re} \]
                            4. Simplified63.2%

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

                            if -7.5000000000000005e181 < x.im

                            1. Initial program 44.3%

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

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

                                \[\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}} \]
                              2. lower-cos.f64N/A

                                \[\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} \]
                              3. lower-*.f64N/A

                                \[\leadsto \cos \color{blue}{\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. lower-atan2.f64N/A

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

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

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

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

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

                                \[\leadsto \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, \color{blue}{x.re \cdot x.re}\right)}\right)}^{y.re} \]
                              10. lower-*.f6459.0

                                \[\leadsto \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, \color{blue}{x.re \cdot x.re}\right)}\right)}^{y.re} \]
                            5. Simplified59.0%

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

                              \[\leadsto \color{blue}{1} \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{y.re} \]
                            7. Step-by-step derivation
                              1. Simplified63.8%

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

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

                                  \[\leadsto 1 \cdot {\left(\sqrt{\color{blue}{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}}\right)}^{y.re} \]
                                3. lift-sqrt.f64N/A

                                  \[\leadsto 1 \cdot {\color{blue}{\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}}^{y.re} \]
                                4. sqr-powN/A

                                  \[\leadsto 1 \cdot \color{blue}{\left({\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{\left(\frac{y.re}{2}\right)} \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{\left(\frac{y.re}{2}\right)}\right)} \]
                                5. sqr-powN/A

                                  \[\leadsto 1 \cdot \color{blue}{{\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{y.re}} \]
                                6. lift-pow.f64N/A

                                  \[\leadsto 1 \cdot \color{blue}{{\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{y.re}} \]
                                7. *-lft-identity63.8

                                  \[\leadsto \color{blue}{{\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{y.re}} \]
                                8. lift-pow.f64N/A

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

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

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

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

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

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

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

                                  \[\leadsto {\color{blue}{\left(\mathsf{fma}\left(x.re, x.re, x.im \cdot x.im\right)\right)}}^{\left(\frac{y.re}{2}\right)} \]
                                16. lower-pow.f64N/A

                                  \[\leadsto \color{blue}{{\left(\mathsf{fma}\left(x.re, x.re, x.im \cdot x.im\right)\right)}^{\left(\frac{y.re}{2}\right)}} \]
                              3. Applied egg-rr63.8%

                                \[\leadsto \color{blue}{{\left(\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)\right)}^{\left(y.re \cdot 0.5\right)}} \]
                            8. Recombined 2 regimes into one program.
                            9. Final simplification63.7%

                              \[\leadsto \begin{array}{l} \mathbf{if}\;x.im \leq -7.5 \cdot 10^{+181}:\\ \;\;\;\;{\left(-x.im\right)}^{y.re}\\ \mathbf{else}:\\ \;\;\;\;{\left(\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)\right)}^{\left(y.re \cdot 0.5\right)}\\ \end{array} \]
                            10. Add Preprocessing

                            Alternative 7: 54.3% accurate, 5.6× speedup?

                            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x.im \leq -2.6 \cdot 10^{-6}:\\ \;\;\;\;{\left(-x.im\right)}^{y.re}\\ \mathbf{elif}\;x.im \leq -6.8 \cdot 10^{-163}:\\ \;\;\;\;{x.re}^{y.re}\\ \mathbf{elif}\;x.im \leq 1.52 \cdot 10^{-33}:\\ \;\;\;\;{\left(-x.re\right)}^{y.re}\\ \mathbf{else}:\\ \;\;\;\;{x.im}^{y.re}\\ \end{array} \end{array} \]
                            (FPCore (x.re x.im y.re y.im)
                             :precision binary64
                             (if (<= x.im -2.6e-6)
                               (pow (- x.im) y.re)
                               (if (<= x.im -6.8e-163)
                                 (pow x.re y.re)
                                 (if (<= x.im 1.52e-33) (pow (- x.re) y.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 (x_46_im <= -2.6e-6) {
                            		tmp = pow(-x_46_im, y_46_re);
                            	} else if (x_46_im <= -6.8e-163) {
                            		tmp = pow(x_46_re, y_46_re);
                            	} else if (x_46_im <= 1.52e-33) {
                            		tmp = pow(-x_46_re, y_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 (x_46im <= (-2.6d-6)) then
                                    tmp = -x_46im ** y_46re
                                else if (x_46im <= (-6.8d-163)) then
                                    tmp = x_46re ** y_46re
                                else if (x_46im <= 1.52d-33) then
                                    tmp = -x_46re ** y_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 (x_46_im <= -2.6e-6) {
                            		tmp = Math.pow(-x_46_im, y_46_re);
                            	} else if (x_46_im <= -6.8e-163) {
                            		tmp = Math.pow(x_46_re, y_46_re);
                            	} else if (x_46_im <= 1.52e-33) {
                            		tmp = Math.pow(-x_46_re, y_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 x_46_im <= -2.6e-6:
                            		tmp = math.pow(-x_46_im, y_46_re)
                            	elif x_46_im <= -6.8e-163:
                            		tmp = math.pow(x_46_re, y_46_re)
                            	elif x_46_im <= 1.52e-33:
                            		tmp = math.pow(-x_46_re, y_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 (x_46_im <= -2.6e-6)
                            		tmp = Float64(-x_46_im) ^ y_46_re;
                            	elseif (x_46_im <= -6.8e-163)
                            		tmp = x_46_re ^ y_46_re;
                            	elseif (x_46_im <= 1.52e-33)
                            		tmp = Float64(-x_46_re) ^ y_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 (x_46_im <= -2.6e-6)
                            		tmp = -x_46_im ^ y_46_re;
                            	elseif (x_46_im <= -6.8e-163)
                            		tmp = x_46_re ^ y_46_re;
                            	elseif (x_46_im <= 1.52e-33)
                            		tmp = -x_46_re ^ y_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[x$46$im, -2.6e-6], N[Power[(-x$46$im), y$46$re], $MachinePrecision], If[LessEqual[x$46$im, -6.8e-163], N[Power[x$46$re, y$46$re], $MachinePrecision], If[LessEqual[x$46$im, 1.52e-33], N[Power[(-x$46$re), y$46$re], $MachinePrecision], N[Power[x$46$im, y$46$re], $MachinePrecision]]]]
                            
                            \begin{array}{l}
                            
                            \\
                            \begin{array}{l}
                            \mathbf{if}\;x.im \leq -2.6 \cdot 10^{-6}:\\
                            \;\;\;\;{\left(-x.im\right)}^{y.re}\\
                            
                            \mathbf{elif}\;x.im \leq -6.8 \cdot 10^{-163}:\\
                            \;\;\;\;{x.re}^{y.re}\\
                            
                            \mathbf{elif}\;x.im \leq 1.52 \cdot 10^{-33}:\\
                            \;\;\;\;{\left(-x.re\right)}^{y.re}\\
                            
                            \mathbf{else}:\\
                            \;\;\;\;{x.im}^{y.re}\\
                            
                            
                            \end{array}
                            \end{array}
                            
                            Derivation
                            1. Split input into 4 regimes
                            2. if x.im < -2.60000000000000009e-6

                              1. Initial program 28.6%

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

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

                                  \[\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}} \]
                                2. lower-cos.f64N/A

                                  \[\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} \]
                                3. lower-*.f64N/A

                                  \[\leadsto \cos \color{blue}{\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. lower-atan2.f64N/A

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

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

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

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

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

                                  \[\leadsto \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, \color{blue}{x.re \cdot x.re}\right)}\right)}^{y.re} \]
                                10. lower-*.f6450.7

                                  \[\leadsto \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, \color{blue}{x.re \cdot x.re}\right)}\right)}^{y.re} \]
                              5. Simplified50.7%

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

                                \[\leadsto \color{blue}{1} \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{y.re} \]
                              7. Step-by-step derivation
                                1. Simplified60.7%

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

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

                                    \[\leadsto 1 \cdot {\color{blue}{\left(\mathsf{neg}\left(x.im\right)\right)}}^{y.re} \]
                                  2. lower-neg.f6467.8

                                    \[\leadsto 1 \cdot {\color{blue}{\left(-x.im\right)}}^{y.re} \]
                                4. Simplified67.8%

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

                                if -2.60000000000000009e-6 < x.im < -6.80000000000000028e-163

                                1. Initial program 58.6%

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

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

                                    \[\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}} \]
                                  2. lower-cos.f64N/A

                                    \[\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} \]
                                  3. lower-*.f64N/A

                                    \[\leadsto \cos \color{blue}{\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. lower-atan2.f64N/A

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

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

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

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

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

                                    \[\leadsto \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, \color{blue}{x.re \cdot x.re}\right)}\right)}^{y.re} \]
                                  10. lower-*.f6459.2

                                    \[\leadsto \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, \color{blue}{x.re \cdot x.re}\right)}\right)}^{y.re} \]
                                5. Simplified59.2%

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

                                  \[\leadsto \color{blue}{1} \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{y.re} \]
                                7. Step-by-step derivation
                                  1. Simplified68.9%

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

                                    \[\leadsto \color{blue}{{x.re}^{y.re}} \]
                                  3. Step-by-step derivation
                                    1. lower-pow.f6465.2

                                      \[\leadsto \color{blue}{{x.re}^{y.re}} \]
                                  4. Simplified65.2%

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

                                  if -6.80000000000000028e-163 < x.im < 1.52e-33

                                  1. Initial program 45.7%

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

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

                                      \[\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}} \]
                                    2. lower-cos.f64N/A

                                      \[\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} \]
                                    3. lower-*.f64N/A

                                      \[\leadsto \cos \color{blue}{\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. lower-atan2.f64N/A

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

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

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

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

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

                                      \[\leadsto \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, \color{blue}{x.re \cdot x.re}\right)}\right)}^{y.re} \]
                                    10. lower-*.f6459.7

                                      \[\leadsto \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, \color{blue}{x.re \cdot x.re}\right)}\right)}^{y.re} \]
                                  5. Simplified59.7%

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

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

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

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

                                        \[\leadsto 1 \cdot {\color{blue}{\left(\mathsf{neg}\left(x.re\right)\right)}}^{y.re} \]
                                      2. lower-neg.f6456.7

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

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

                                    if 1.52e-33 < x.im

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

                                        \[\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}} \]
                                      2. lower-cos.f64N/A

                                        \[\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} \]
                                      3. lower-*.f64N/A

                                        \[\leadsto \cos \color{blue}{\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. lower-atan2.f64N/A

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

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

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

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

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

                                        \[\leadsto \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, \color{blue}{x.re \cdot x.re}\right)}\right)}^{y.re} \]
                                      10. lower-*.f6452.8

                                        \[\leadsto \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, \color{blue}{x.re \cdot x.re}\right)}\right)}^{y.re} \]
                                    5. Simplified52.8%

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

                                      \[\leadsto \color{blue}{1} \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{y.re} \]
                                    7. Step-by-step derivation
                                      1. Simplified57.0%

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

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

                                          \[\leadsto \color{blue}{{x.im}^{y.re}} \]
                                      4. Simplified54.6%

                                        \[\leadsto \color{blue}{{x.im}^{y.re}} \]
                                    8. Recombined 4 regimes into one program.
                                    9. Final simplification60.2%

                                      \[\leadsto \begin{array}{l} \mathbf{if}\;x.im \leq -2.6 \cdot 10^{-6}:\\ \;\;\;\;{\left(-x.im\right)}^{y.re}\\ \mathbf{elif}\;x.im \leq -6.8 \cdot 10^{-163}:\\ \;\;\;\;{x.re}^{y.re}\\ \mathbf{elif}\;x.im \leq 1.52 \cdot 10^{-33}:\\ \;\;\;\;{\left(-x.re\right)}^{y.re}\\ \mathbf{else}:\\ \;\;\;\;{x.im}^{y.re}\\ \end{array} \]
                                    10. Add Preprocessing

                                    Alternative 8: 53.9% accurate, 6.0× speedup?

                                    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x.im \leq -2.6 \cdot 10^{-6}:\\ \;\;\;\;{\left(-x.im\right)}^{y.re}\\ \mathbf{elif}\;x.im \leq 1.55 \cdot 10^{-196}:\\ \;\;\;\;{x.re}^{y.re}\\ \mathbf{else}:\\ \;\;\;\;{x.im}^{y.re}\\ \end{array} \end{array} \]
                                    (FPCore (x.re x.im y.re y.im)
                                     :precision binary64
                                     (if (<= x.im -2.6e-6)
                                       (pow (- x.im) y.re)
                                       (if (<= x.im 1.55e-196) (pow x.re y.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 (x_46_im <= -2.6e-6) {
                                    		tmp = pow(-x_46_im, y_46_re);
                                    	} else if (x_46_im <= 1.55e-196) {
                                    		tmp = pow(x_46_re, y_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 (x_46im <= (-2.6d-6)) then
                                            tmp = -x_46im ** y_46re
                                        else if (x_46im <= 1.55d-196) then
                                            tmp = x_46re ** y_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 (x_46_im <= -2.6e-6) {
                                    		tmp = Math.pow(-x_46_im, y_46_re);
                                    	} else if (x_46_im <= 1.55e-196) {
                                    		tmp = Math.pow(x_46_re, y_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 x_46_im <= -2.6e-6:
                                    		tmp = math.pow(-x_46_im, y_46_re)
                                    	elif x_46_im <= 1.55e-196:
                                    		tmp = math.pow(x_46_re, y_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 (x_46_im <= -2.6e-6)
                                    		tmp = Float64(-x_46_im) ^ y_46_re;
                                    	elseif (x_46_im <= 1.55e-196)
                                    		tmp = x_46_re ^ y_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 (x_46_im <= -2.6e-6)
                                    		tmp = -x_46_im ^ y_46_re;
                                    	elseif (x_46_im <= 1.55e-196)
                                    		tmp = x_46_re ^ y_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[x$46$im, -2.6e-6], N[Power[(-x$46$im), y$46$re], $MachinePrecision], If[LessEqual[x$46$im, 1.55e-196], N[Power[x$46$re, y$46$re], $MachinePrecision], N[Power[x$46$im, y$46$re], $MachinePrecision]]]
                                    
                                    \begin{array}{l}
                                    
                                    \\
                                    \begin{array}{l}
                                    \mathbf{if}\;x.im \leq -2.6 \cdot 10^{-6}:\\
                                    \;\;\;\;{\left(-x.im\right)}^{y.re}\\
                                    
                                    \mathbf{elif}\;x.im \leq 1.55 \cdot 10^{-196}:\\
                                    \;\;\;\;{x.re}^{y.re}\\
                                    
                                    \mathbf{else}:\\
                                    \;\;\;\;{x.im}^{y.re}\\
                                    
                                    
                                    \end{array}
                                    \end{array}
                                    
                                    Derivation
                                    1. Split input into 3 regimes
                                    2. if x.im < -2.60000000000000009e-6

                                      1. Initial program 28.6%

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

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

                                          \[\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}} \]
                                        2. lower-cos.f64N/A

                                          \[\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} \]
                                        3. lower-*.f64N/A

                                          \[\leadsto \cos \color{blue}{\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. lower-atan2.f64N/A

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

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

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

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

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

                                          \[\leadsto \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, \color{blue}{x.re \cdot x.re}\right)}\right)}^{y.re} \]
                                        10. lower-*.f6450.7

                                          \[\leadsto \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, \color{blue}{x.re \cdot x.re}\right)}\right)}^{y.re} \]
                                      5. Simplified50.7%

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

                                        \[\leadsto \color{blue}{1} \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{y.re} \]
                                      7. Step-by-step derivation
                                        1. Simplified60.7%

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

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

                                            \[\leadsto 1 \cdot {\color{blue}{\left(\mathsf{neg}\left(x.im\right)\right)}}^{y.re} \]
                                          2. lower-neg.f6467.8

                                            \[\leadsto 1 \cdot {\color{blue}{\left(-x.im\right)}}^{y.re} \]
                                        4. Simplified67.8%

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

                                        if -2.60000000000000009e-6 < x.im < 1.54999999999999996e-196

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

                                            \[\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}} \]
                                          2. lower-cos.f64N/A

                                            \[\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} \]
                                          3. lower-*.f64N/A

                                            \[\leadsto \cos \color{blue}{\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. lower-atan2.f64N/A

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

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

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

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

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

                                            \[\leadsto \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, \color{blue}{x.re \cdot x.re}\right)}\right)}^{y.re} \]
                                          10. lower-*.f6460.3

                                            \[\leadsto \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, \color{blue}{x.re \cdot x.re}\right)}\right)}^{y.re} \]
                                        5. Simplified60.3%

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

                                          \[\leadsto \color{blue}{1} \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{y.re} \]
                                        7. Step-by-step derivation
                                          1. Simplified63.8%

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

                                            \[\leadsto \color{blue}{{x.re}^{y.re}} \]
                                          3. Step-by-step derivation
                                            1. lower-pow.f6452.2

                                              \[\leadsto \color{blue}{{x.re}^{y.re}} \]
                                          4. Simplified52.2%

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

                                          if 1.54999999999999996e-196 < x.im

                                          1. Initial program 40.3%

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

                                              \[\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}} \]
                                            2. lower-cos.f64N/A

                                              \[\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} \]
                                            3. lower-*.f64N/A

                                              \[\leadsto \cos \color{blue}{\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. lower-atan2.f64N/A

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

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

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

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

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

                                              \[\leadsto \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, \color{blue}{x.re \cdot x.re}\right)}\right)}^{y.re} \]
                                            10. lower-*.f6454.2

                                              \[\leadsto \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, \color{blue}{x.re \cdot x.re}\right)}\right)}^{y.re} \]
                                          5. Simplified54.2%

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

                                            \[\leadsto \color{blue}{1} \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{y.re} \]
                                          7. Step-by-step derivation
                                            1. Simplified57.9%

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

                                              \[\leadsto \color{blue}{{x.im}^{y.re}} \]
                                            3. Step-by-step derivation
                                              1. lower-pow.f6454.1

                                                \[\leadsto \color{blue}{{x.im}^{y.re}} \]
                                            4. Simplified54.1%

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

                                            \[\leadsto \begin{array}{l} \mathbf{if}\;x.im \leq -2.6 \cdot 10^{-6}:\\ \;\;\;\;{\left(-x.im\right)}^{y.re}\\ \mathbf{elif}\;x.im \leq 1.55 \cdot 10^{-196}:\\ \;\;\;\;{x.re}^{y.re}\\ \mathbf{else}:\\ \;\;\;\;{x.im}^{y.re}\\ \end{array} \]
                                          10. Add Preprocessing

                                          Alternative 9: 51.9% accurate, 6.0× speedup?

                                          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y.re \leq -2.5 \cdot 10^{-5}:\\ \;\;\;\;{x.re}^{y.re}\\ \mathbf{elif}\;y.re \leq 5.2:\\ \;\;\;\;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 -2.5e-5) (pow x.re y.re) (if (<= y.re 5.2) 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 <= -2.5e-5) {
                                          		tmp = pow(x_46_re, y_46_re);
                                          	} else if (y_46_re <= 5.2) {
                                          		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 <= (-2.5d-5)) then
                                                  tmp = x_46re ** y_46re
                                              else if (y_46re <= 5.2d0) 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 <= -2.5e-5) {
                                          		tmp = Math.pow(x_46_re, y_46_re);
                                          	} else if (y_46_re <= 5.2) {
                                          		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 <= -2.5e-5:
                                          		tmp = math.pow(x_46_re, y_46_re)
                                          	elif y_46_re <= 5.2:
                                          		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 <= -2.5e-5)
                                          		tmp = x_46_re ^ y_46_re;
                                          	elseif (y_46_re <= 5.2)
                                          		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 <= -2.5e-5)
                                          		tmp = x_46_re ^ y_46_re;
                                          	elseif (y_46_re <= 5.2)
                                          		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, -2.5e-5], N[Power[x$46$re, y$46$re], $MachinePrecision], If[LessEqual[y$46$re, 5.2], 1.0, N[Power[x$46$im, y$46$re], $MachinePrecision]]]
                                          
                                          \begin{array}{l}
                                          
                                          \\
                                          \begin{array}{l}
                                          \mathbf{if}\;y.re \leq -2.5 \cdot 10^{-5}:\\
                                          \;\;\;\;{x.re}^{y.re}\\
                                          
                                          \mathbf{elif}\;y.re \leq 5.2:\\
                                          \;\;\;\;1\\
                                          
                                          \mathbf{else}:\\
                                          \;\;\;\;{x.im}^{y.re}\\
                                          
                                          
                                          \end{array}
                                          \end{array}
                                          
                                          Derivation
                                          1. Split input into 3 regimes
                                          2. if y.re < -2.50000000000000012e-5

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

                                                \[\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}} \]
                                              2. lower-cos.f64N/A

                                                \[\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} \]
                                              3. lower-*.f64N/A

                                                \[\leadsto \cos \color{blue}{\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. lower-atan2.f64N/A

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

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

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

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

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

                                                \[\leadsto \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, \color{blue}{x.re \cdot x.re}\right)}\right)}^{y.re} \]
                                              10. lower-*.f6473.9

                                                \[\leadsto \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, \color{blue}{x.re \cdot x.re}\right)}\right)}^{y.re} \]
                                            5. Simplified73.9%

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

                                              \[\leadsto \color{blue}{1} \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{y.re} \]
                                            7. Step-by-step derivation
                                              1. Simplified77.9%

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

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

                                                  \[\leadsto \color{blue}{{x.re}^{y.re}} \]
                                              4. Simplified54.4%

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

                                              if -2.50000000000000012e-5 < y.re < 5.20000000000000018

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

                                                  \[\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}} \]
                                                2. lower-cos.f64N/A

                                                  \[\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} \]
                                                3. lower-*.f64N/A

                                                  \[\leadsto \cos \color{blue}{\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. lower-atan2.f64N/A

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

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

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

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

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

                                                  \[\leadsto \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, \color{blue}{x.re \cdot x.re}\right)}\right)}^{y.re} \]
                                                10. lower-*.f6445.0

                                                  \[\leadsto \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, \color{blue}{x.re \cdot x.re}\right)}\right)}^{y.re} \]
                                              5. Simplified45.0%

                                                \[\leadsto \color{blue}{\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot 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.7%

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

                                                if 5.20000000000000018 < y.re

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

                                                    \[\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}} \]
                                                  2. lower-cos.f64N/A

                                                    \[\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} \]
                                                  3. lower-*.f64N/A

                                                    \[\leadsto \cos \color{blue}{\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. lower-atan2.f64N/A

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

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

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

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

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

                                                    \[\leadsto \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, \color{blue}{x.re \cdot x.re}\right)}\right)}^{y.re} \]
                                                  10. lower-*.f6451.6

                                                    \[\leadsto \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, \color{blue}{x.re \cdot x.re}\right)}\right)}^{y.re} \]
                                                5. Simplified51.6%

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

                                                  \[\leadsto \color{blue}{1} \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{y.re} \]
                                                7. Step-by-step derivation
                                                  1. Simplified69.8%

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

                                                    \[\leadsto \color{blue}{{x.im}^{y.re}} \]
                                                  3. Step-by-step derivation
                                                    1. lower-pow.f6456.4

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

                                                    \[\leadsto \color{blue}{{x.im}^{y.re}} \]
                                                8. Recombined 3 regimes into one program.
                                                9. Add Preprocessing

                                                Alternative 10: 51.0% accurate, 6.0× speedup?

                                                \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y.re \leq -5600000000:\\ \;\;\;\;{x.im}^{y.re}\\ \mathbf{elif}\;y.re \leq 5.2:\\ \;\;\;\;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 -5600000000.0)
                                                   (pow x.im y.re)
                                                   (if (<= y.re 5.2) 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 <= -5600000000.0) {
                                                		tmp = pow(x_46_im, y_46_re);
                                                	} else if (y_46_re <= 5.2) {
                                                		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 <= (-5600000000.0d0)) then
                                                        tmp = x_46im ** y_46re
                                                    else if (y_46re <= 5.2d0) 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 <= -5600000000.0) {
                                                		tmp = Math.pow(x_46_im, y_46_re);
                                                	} else if (y_46_re <= 5.2) {
                                                		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 <= -5600000000.0:
                                                		tmp = math.pow(x_46_im, y_46_re)
                                                	elif y_46_re <= 5.2:
                                                		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 <= -5600000000.0)
                                                		tmp = x_46_im ^ y_46_re;
                                                	elseif (y_46_re <= 5.2)
                                                		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 <= -5600000000.0)
                                                		tmp = x_46_im ^ y_46_re;
                                                	elseif (y_46_re <= 5.2)
                                                		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, -5600000000.0], N[Power[x$46$im, y$46$re], $MachinePrecision], If[LessEqual[y$46$re, 5.2], 1.0, N[Power[x$46$im, y$46$re], $MachinePrecision]]]
                                                
                                                \begin{array}{l}
                                                
                                                \\
                                                \begin{array}{l}
                                                \mathbf{if}\;y.re \leq -5600000000:\\
                                                \;\;\;\;{x.im}^{y.re}\\
                                                
                                                \mathbf{elif}\;y.re \leq 5.2:\\
                                                \;\;\;\;1\\
                                                
                                                \mathbf{else}:\\
                                                \;\;\;\;{x.im}^{y.re}\\
                                                
                                                
                                                \end{array}
                                                \end{array}
                                                
                                                Derivation
                                                1. Split input into 2 regimes
                                                2. if y.re < -5.6e9 or 5.20000000000000018 < y.re

                                                  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. 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. lower-*.f64N/A

                                                      \[\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}} \]
                                                    2. lower-cos.f64N/A

                                                      \[\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} \]
                                                    3. lower-*.f64N/A

                                                      \[\leadsto \cos \color{blue}{\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. lower-atan2.f64N/A

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

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

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

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

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

                                                      \[\leadsto \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, \color{blue}{x.re \cdot x.re}\right)}\right)}^{y.re} \]
                                                    10. lower-*.f6463.2

                                                      \[\leadsto \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, \color{blue}{x.re \cdot x.re}\right)}\right)}^{y.re} \]
                                                  5. Simplified63.2%

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

                                                    \[\leadsto \color{blue}{1} \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{y.re} \]
                                                  7. Step-by-step derivation
                                                    1. Simplified73.3%

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

                                                      \[\leadsto \color{blue}{{x.im}^{y.re}} \]
                                                    3. Step-by-step derivation
                                                      1. lower-pow.f6452.7

                                                        \[\leadsto \color{blue}{{x.im}^{y.re}} \]
                                                    4. Simplified52.7%

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

                                                    if -5.6e9 < y.re < 5.20000000000000018

                                                    1. Initial program 44.3%

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

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

                                                        \[\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}} \]
                                                      2. lower-cos.f64N/A

                                                        \[\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} \]
                                                      3. lower-*.f64N/A

                                                        \[\leadsto \cos \color{blue}{\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. lower-atan2.f64N/A

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

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

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

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

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

                                                        \[\leadsto \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, \color{blue}{x.re \cdot x.re}\right)}\right)}^{y.re} \]
                                                      10. lower-*.f6446.0

                                                        \[\leadsto \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, \color{blue}{x.re \cdot x.re}\right)}\right)}^{y.re} \]
                                                    5. Simplified46.0%

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

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

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

                                                    Alternative 11: 26.3% accurate, 680.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 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 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. lower-*.f64N/A

                                                        \[\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}} \]
                                                      2. lower-cos.f64N/A

                                                        \[\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} \]
                                                      3. lower-*.f64N/A

                                                        \[\leadsto \cos \color{blue}{\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. lower-atan2.f64N/A

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

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

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

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

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

                                                        \[\leadsto \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, \color{blue}{x.re \cdot x.re}\right)}\right)}^{y.re} \]
                                                      10. lower-*.f6455.3

                                                        \[\leadsto \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, \color{blue}{x.re \cdot x.re}\right)}\right)}^{y.re} \]
                                                    5. Simplified55.3%

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

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

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

                                                      Reproduce

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