powComplex, real part

Percentage Accurate: 39.8% → 77.4%
Time: 16.4s
Alternatives: 9
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 9 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: 39.8% 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 -1.4 \cdot 10^{-8}:\\ \;\;\;\;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.8:\\ \;\;\;\;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 -1.4e-8)
   (*
    (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 2.8)
     (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 <= -1.4e-8) {
		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 <= 2.8) {
		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 <= -1.4e-8)
		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 <= 2.8)
		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, -1.4e-8], 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, 2.8], 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 -1.4 \cdot 10^{-8}:\\
\;\;\;\;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.8:\\
\;\;\;\;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 < -1.4e-8

    1. Initial program 47.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. *-lowering-*.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. atan2-lowering-atan2.f6485.4

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

      \[\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 -1.4e-8 < y.re < 2.7999999999999998

    1. Initial program 34.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 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. *-lowering-*.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. atan2-lowering-atan2.f6449.7

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

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

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

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

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

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

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

    if 2.7999999999999998 < y.re

    1. Initial program 30.2%

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

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

        \[\leadsto \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. cos-lowering-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. *-lowering-*.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. atan2-lowering-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. pow-lowering-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. sqrt-lowering-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. accelerator-lowering-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. *-lowering-*.f6465.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. Simplified65.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. Simplified79.5%

        \[\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. *-lft-identityN/A

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

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

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

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

          \[\leadsto {\color{blue}{\left(x.im \cdot x.im + x.re \cdot x.re\right)}}^{\left(\frac{y.re}{2}\right)} \]
        6. accelerator-lowering-fma.f64N/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)} \]
        7. *-lowering-*.f64N/A

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

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

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

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;y.re \leq -1.4 \cdot 10^{-8}:\\ \;\;\;\;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.8:\\ \;\;\;\;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 2: 76.7% accurate, 3.1× speedup?

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

      1. Initial program 47.1%

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

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

          \[\leadsto \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. cos-lowering-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. *-lowering-*.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. atan2-lowering-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. pow-lowering-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. sqrt-lowering-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. accelerator-lowering-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. *-lowering-*.f6481.1

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

        \[\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. Simplified81.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. *-lft-identityN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto {\left(\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right) \cdot \mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)\right)}^{\color{blue}{\left(y.re \cdot \frac{\frac{1}{2}}{2}\right)}} \]
          18. metadata-eval82.5

            \[\leadsto {\left(\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right) \cdot \mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)\right)}^{\left(y.re \cdot \color{blue}{0.25}\right)} \]
        3. Applied egg-rr82.5%

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

        if -1.4e-8 < y.re < 6.79999999999999982

        1. Initial program 34.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 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. *-lowering-*.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. atan2-lowering-atan2.f6449.7

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

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

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

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

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

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

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

        if 6.79999999999999982 < y.re

        1. Initial program 30.2%

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

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

            \[\leadsto \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. cos-lowering-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. *-lowering-*.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. atan2-lowering-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. pow-lowering-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. sqrt-lowering-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. accelerator-lowering-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. *-lowering-*.f6465.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. Simplified65.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. Simplified79.5%

            \[\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. *-lft-identityN/A

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

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

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

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

              \[\leadsto {\color{blue}{\left(x.im \cdot x.im + x.re \cdot x.re\right)}}^{\left(\frac{y.re}{2}\right)} \]
            6. accelerator-lowering-fma.f64N/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)} \]
            7. *-lowering-*.f64N/A

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

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

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

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

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

          \[\leadsto \begin{array}{l} \mathbf{if}\;y.re \leq -1.4 \cdot 10^{-8}:\\ \;\;\;\;{\left(\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right) \cdot \mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)\right)}^{\left(y.re \cdot 0.25\right)}\\ \mathbf{elif}\;y.re \leq 6.8:\\ \;\;\;\;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 3: 61.4% accurate, 4.9× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} t_0 := \mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)\\ \mathbf{if}\;y.re \leq -1.8 \cdot 10^{-10}:\\ \;\;\;\;{\left(t\_0 \cdot t\_0\right)}^{\left(y.re \cdot 0.25\right)}\\ \mathbf{elif}\;y.re \leq 1.1 \cdot 10^{-59}:\\ \;\;\;\;1\\ \mathbf{else}:\\ \;\;\;\;{t\_0}^{\left(y.re \cdot 0.5\right)}\\ \end{array} \end{array} \]
        (FPCore (x.re x.im y.re y.im)
         :precision binary64
         (let* ((t_0 (fma x.im x.im (* x.re x.re))))
           (if (<= y.re -1.8e-10)
             (pow (* t_0 t_0) (* y.re 0.25))
             (if (<= y.re 1.1e-59) 1.0 (pow t_0 (* y.re 0.5))))))
        double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
        	double t_0 = fma(x_46_im, x_46_im, (x_46_re * x_46_re));
        	double tmp;
        	if (y_46_re <= -1.8e-10) {
        		tmp = pow((t_0 * t_0), (y_46_re * 0.25));
        	} else if (y_46_re <= 1.1e-59) {
        		tmp = 1.0;
        	} else {
        		tmp = pow(t_0, (y_46_re * 0.5));
        	}
        	return tmp;
        }
        
        function code(x_46_re, x_46_im, y_46_re, y_46_im)
        	t_0 = fma(x_46_im, x_46_im, Float64(x_46_re * x_46_re))
        	tmp = 0.0
        	if (y_46_re <= -1.8e-10)
        		tmp = Float64(t_0 * t_0) ^ Float64(y_46_re * 0.25);
        	elseif (y_46_re <= 1.1e-59)
        		tmp = 1.0;
        	else
        		tmp = t_0 ^ Float64(y_46_re * 0.5);
        	end
        	return tmp
        end
        
        code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(x$46$im * x$46$im + N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -1.8e-10], N[Power[N[(t$95$0 * t$95$0), $MachinePrecision], N[(y$46$re * 0.25), $MachinePrecision]], $MachinePrecision], If[LessEqual[y$46$re, 1.1e-59], 1.0, N[Power[t$95$0, N[(y$46$re * 0.5), $MachinePrecision]], $MachinePrecision]]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        t_0 := \mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)\\
        \mathbf{if}\;y.re \leq -1.8 \cdot 10^{-10}:\\
        \;\;\;\;{\left(t\_0 \cdot t\_0\right)}^{\left(y.re \cdot 0.25\right)}\\
        
        \mathbf{elif}\;y.re \leq 1.1 \cdot 10^{-59}:\\
        \;\;\;\;1\\
        
        \mathbf{else}:\\
        \;\;\;\;{t\_0}^{\left(y.re \cdot 0.5\right)}\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 3 regimes
        2. if y.re < -1.8e-10

          1. Initial program 47.1%

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

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

              \[\leadsto \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. cos-lowering-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. *-lowering-*.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. atan2-lowering-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. pow-lowering-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. sqrt-lowering-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. accelerator-lowering-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. *-lowering-*.f6481.1

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

            \[\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. Simplified81.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. *-lft-identityN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto {\left(\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right) \cdot \mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)\right)}^{\color{blue}{\left(y.re \cdot \frac{\frac{1}{2}}{2}\right)}} \]
              18. metadata-eval82.5

                \[\leadsto {\left(\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right) \cdot \mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)\right)}^{\left(y.re \cdot \color{blue}{0.25}\right)} \]
            3. Applied egg-rr82.5%

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

            if -1.8e-10 < y.re < 1.0999999999999999e-59

            1. Initial program 34.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. *-lowering-*.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. cos-lowering-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. *-lowering-*.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. atan2-lowering-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. pow-lowering-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. sqrt-lowering-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. accelerator-lowering-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. *-lowering-*.f6437.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. Simplified37.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. Simplified55.1%

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

              if 1.0999999999999999e-59 < y.re

              1. Initial program 30.1%

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

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

                  \[\leadsto \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. cos-lowering-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. *-lowering-*.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. atan2-lowering-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. pow-lowering-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. sqrt-lowering-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. accelerator-lowering-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. *-lowering-*.f6460.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. Simplified60.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. Simplified72.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. Step-by-step derivation
                  1. *-lft-identityN/A

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

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

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

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

                    \[\leadsto {\color{blue}{\left(x.im \cdot x.im + x.re \cdot x.re\right)}}^{\left(\frac{y.re}{2}\right)} \]
                  6. accelerator-lowering-fma.f64N/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)} \]
                  7. *-lowering-*.f64N/A

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

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

                    \[\leadsto {\left(\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)\right)}^{\left(y.re \cdot \color{blue}{\frac{1}{2}}\right)} \]
                  10. *-lowering-*.f6472.9

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

                  \[\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. Add Preprocessing

              Alternative 4: 61.4% accurate, 5.2× speedup?

              \[\begin{array}{l} \\ \begin{array}{l} t_0 := {\left(\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)\right)}^{\left(y.re \cdot 0.5\right)}\\ \mathbf{if}\;y.re \leq -5.2 \cdot 10^{-10}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;y.re \leq 1.55 \cdot 10^{-59}:\\ \;\;\;\;1\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
              (FPCore (x.re x.im y.re y.im)
               :precision binary64
               (let* ((t_0 (pow (fma x.im x.im (* x.re x.re)) (* y.re 0.5))))
                 (if (<= y.re -5.2e-10) t_0 (if (<= y.re 1.55e-59) 1.0 t_0))))
              double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
              	double t_0 = pow(fma(x_46_im, x_46_im, (x_46_re * x_46_re)), (y_46_re * 0.5));
              	double tmp;
              	if (y_46_re <= -5.2e-10) {
              		tmp = t_0;
              	} else if (y_46_re <= 1.55e-59) {
              		tmp = 1.0;
              	} else {
              		tmp = t_0;
              	}
              	return tmp;
              }
              
              function code(x_46_re, x_46_im, y_46_re, y_46_im)
              	t_0 = fma(x_46_im, x_46_im, Float64(x_46_re * x_46_re)) ^ Float64(y_46_re * 0.5)
              	tmp = 0.0
              	if (y_46_re <= -5.2e-10)
              		tmp = t_0;
              	elseif (y_46_re <= 1.55e-59)
              		tmp = 1.0;
              	else
              		tmp = t_0;
              	end
              	return tmp
              end
              
              code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = 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]}, If[LessEqual[y$46$re, -5.2e-10], t$95$0, If[LessEqual[y$46$re, 1.55e-59], 1.0, t$95$0]]]
              
              \begin{array}{l}
              
              \\
              \begin{array}{l}
              t_0 := {\left(\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)\right)}^{\left(y.re \cdot 0.5\right)}\\
              \mathbf{if}\;y.re \leq -5.2 \cdot 10^{-10}:\\
              \;\;\;\;t\_0\\
              
              \mathbf{elif}\;y.re \leq 1.55 \cdot 10^{-59}:\\
              \;\;\;\;1\\
              
              \mathbf{else}:\\
              \;\;\;\;t\_0\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 2 regimes
              2. if y.re < -5.19999999999999962e-10 or 1.55e-59 < y.re

                1. Initial program 38.3%

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

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

                    \[\leadsto \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. cos-lowering-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. *-lowering-*.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. atan2-lowering-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. pow-lowering-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. sqrt-lowering-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. accelerator-lowering-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. *-lowering-*.f6470.5

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

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

                    \[\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. *-lft-identityN/A

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

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

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

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

                      \[\leadsto {\color{blue}{\left(x.im \cdot x.im + x.re \cdot x.re\right)}}^{\left(\frac{y.re}{2}\right)} \]
                    6. accelerator-lowering-fma.f64N/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)} \]
                    7. *-lowering-*.f64N/A

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

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

                      \[\leadsto {\left(\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)\right)}^{\left(y.re \cdot \color{blue}{\frac{1}{2}}\right)} \]
                    10. *-lowering-*.f6477.2

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

                    \[\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)}} \]

                  if -5.19999999999999962e-10 < y.re < 1.55e-59

                  1. Initial program 34.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. *-lowering-*.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. cos-lowering-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. *-lowering-*.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. atan2-lowering-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. pow-lowering-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. sqrt-lowering-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. accelerator-lowering-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. *-lowering-*.f6437.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. Simplified37.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. Simplified55.1%

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

                  Alternative 5: 58.4% accurate, 5.5× speedup?

                  \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x.re \leq -2.7 \cdot 10^{+29}:\\ \;\;\;\;{\left(-x.re\right)}^{y.re}\\ \mathbf{elif}\;x.re \leq 1.02 \cdot 10^{-8}:\\ \;\;\;\;{\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 -2.7e+29)
                     (pow (- x.re) y.re)
                     (if (<= x.re 1.02e-8) (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 <= -2.7e+29) {
                  		tmp = pow(-x_46_re, y_46_re);
                  	} else if (x_46_re <= 1.02e-8) {
                  		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 <= (-2.7d+29)) then
                          tmp = -x_46re ** y_46re
                      else if (x_46re <= 1.02d-8) 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 <= -2.7e+29) {
                  		tmp = Math.pow(-x_46_re, y_46_re);
                  	} else if (x_46_re <= 1.02e-8) {
                  		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 <= -2.7e+29:
                  		tmp = math.pow(-x_46_re, y_46_re)
                  	elif x_46_re <= 1.02e-8:
                  		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 <= -2.7e+29)
                  		tmp = Float64(-x_46_re) ^ y_46_re;
                  	elseif (x_46_re <= 1.02e-8)
                  		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 <= -2.7e+29)
                  		tmp = -x_46_re ^ y_46_re;
                  	elseif (x_46_re <= 1.02e-8)
                  		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, -2.7e+29], N[Power[(-x$46$re), y$46$re], $MachinePrecision], If[LessEqual[x$46$re, 1.02e-8], 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 -2.7 \cdot 10^{+29}:\\
                  \;\;\;\;{\left(-x.re\right)}^{y.re}\\
                  
                  \mathbf{elif}\;x.re \leq 1.02 \cdot 10^{-8}:\\
                  \;\;\;\;{\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 < -2.7e29

                    1. Initial program 25.4%

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

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

                        \[\leadsto \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. cos-lowering-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. *-lowering-*.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. atan2-lowering-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. pow-lowering-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. sqrt-lowering-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. accelerator-lowering-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. *-lowering-*.f6447.5

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

                      \[\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. Simplified50.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. neg-lowering-neg.f6463.2

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

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

                      if -2.7e29 < x.re < 1.02000000000000003e-8

                      1. Initial program 44.0%

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

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

                          \[\leadsto \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. cos-lowering-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. *-lowering-*.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. atan2-lowering-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. pow-lowering-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. sqrt-lowering-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. accelerator-lowering-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. *-lowering-*.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. Simplified59.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 0

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

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

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

                            \[\leadsto \color{blue}{{\left(x.im \cdot x.im\right)}^{\left(\frac{y.re}{2}\right)}} \]
                          4. *-lowering-*.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. *-lowering-*.f6458.7

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

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

                        if 1.02000000000000003e-8 < x.re

                        1. Initial program 33.7%

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

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

                            \[\leadsto \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. cos-lowering-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. *-lowering-*.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. atan2-lowering-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. pow-lowering-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. sqrt-lowering-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. accelerator-lowering-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. *-lowering-*.f6466.5

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

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

                            \[\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. pow-lowering-pow.f6474.5

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

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

                          \[\leadsto \begin{array}{l} \mathbf{if}\;x.re \leq -2.7 \cdot 10^{+29}:\\ \;\;\;\;{\left(-x.re\right)}^{y.re}\\ \mathbf{elif}\;x.re \leq 1.02 \cdot 10^{-8}:\\ \;\;\;\;{\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: 55.0% accurate, 6.0× speedup?

                        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x.im \leq -7.2 \cdot 10^{-198}:\\ \;\;\;\;{\left(-x.im\right)}^{y.re}\\ \mathbf{elif}\;x.im \leq 10^{-41}:\\ \;\;\;\;{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 -7.2e-198)
                           (pow (- x.im) y.re)
                           (if (<= x.im 1e-41) (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 <= -7.2e-198) {
                        		tmp = pow(-x_46_im, y_46_re);
                        	} else if (x_46_im <= 1e-41) {
                        		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 <= (-7.2d-198)) then
                                tmp = -x_46im ** y_46re
                            else if (x_46im <= 1d-41) 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 <= -7.2e-198) {
                        		tmp = Math.pow(-x_46_im, y_46_re);
                        	} else if (x_46_im <= 1e-41) {
                        		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 <= -7.2e-198:
                        		tmp = math.pow(-x_46_im, y_46_re)
                        	elif x_46_im <= 1e-41:
                        		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 <= -7.2e-198)
                        		tmp = Float64(-x_46_im) ^ y_46_re;
                        	elseif (x_46_im <= 1e-41)
                        		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 <= -7.2e-198)
                        		tmp = -x_46_im ^ y_46_re;
                        	elseif (x_46_im <= 1e-41)
                        		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, -7.2e-198], N[Power[(-x$46$im), y$46$re], $MachinePrecision], If[LessEqual[x$46$im, 1e-41], 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 -7.2 \cdot 10^{-198}:\\
                        \;\;\;\;{\left(-x.im\right)}^{y.re}\\
                        
                        \mathbf{elif}\;x.im \leq 10^{-41}:\\
                        \;\;\;\;{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 < -7.19999999999999996e-198

                          1. Initial program 39.3%

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

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

                              \[\leadsto \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. cos-lowering-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. *-lowering-*.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. atan2-lowering-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. pow-lowering-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. sqrt-lowering-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. accelerator-lowering-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. *-lowering-*.f6453.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. Simplified53.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. Simplified59.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 0

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

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

                              \[\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. sqr-negN/A

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

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

                                \[\leadsto \color{blue}{{\left(\mathsf{neg}\left(x.im\right)\right)}^{y.re}} \]
                              6. pow-lowering-pow.f64N/A

                                \[\leadsto \color{blue}{{\left(\mathsf{neg}\left(x.im\right)\right)}^{y.re}} \]
                              7. neg-lowering-neg.f6461.5

                                \[\leadsto {\color{blue}{\left(-x.im\right)}}^{y.re} \]
                            6. Applied egg-rr61.5%

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

                            if -7.19999999999999996e-198 < x.im < 1.00000000000000001e-41

                            1. Initial program 46.1%

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

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

                                \[\leadsto \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. cos-lowering-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. *-lowering-*.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. atan2-lowering-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. pow-lowering-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. sqrt-lowering-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. accelerator-lowering-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. *-lowering-*.f6464.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. Simplified64.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. Simplified64.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.im around 0

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

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

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

                              if 1.00000000000000001e-41 < x.im

                              1. Initial program 22.1%

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

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

                                  \[\leadsto \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. cos-lowering-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. *-lowering-*.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. atan2-lowering-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. pow-lowering-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. sqrt-lowering-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. accelerator-lowering-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. *-lowering-*.f6448.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. Simplified48.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. Simplified52.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. pow-lowering-pow.f6464.1

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

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

                              Alternative 7: 52.6% accurate, 6.0× speedup?

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

                                1. Initial program 47.1%

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

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

                                    \[\leadsto \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. cos-lowering-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. *-lowering-*.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. atan2-lowering-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. pow-lowering-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. sqrt-lowering-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. accelerator-lowering-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. *-lowering-*.f6481.1

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

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

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

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

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

                                  if -8.1999999999999996e-10 < y.re < 260

                                  1. Initial program 34.2%

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

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

                                      \[\leadsto \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. cos-lowering-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. *-lowering-*.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. atan2-lowering-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. pow-lowering-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. sqrt-lowering-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. accelerator-lowering-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. *-lowering-*.f6437.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. Simplified37.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. Simplified52.6%

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

                                    if 260 < y.re

                                    1. Initial program 30.6%

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

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

                                        \[\leadsto \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. cos-lowering-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. *-lowering-*.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. atan2-lowering-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. pow-lowering-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. sqrt-lowering-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. accelerator-lowering-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. *-lowering-*.f6464.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. Simplified64.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. Simplified79.1%

                                        \[\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. pow-lowering-pow.f6466.6

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

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

                                    Alternative 8: 52.9% accurate, 6.0× speedup?

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

                                      1. Initial program 37.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. *-lowering-*.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. cos-lowering-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. *-lowering-*.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. atan2-lowering-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. pow-lowering-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. sqrt-lowering-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. accelerator-lowering-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. *-lowering-*.f6473.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. Simplified73.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. Simplified81.2%

                                          \[\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. pow-lowering-pow.f6460.3

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

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

                                        if -1.19999999999999996 < y.re < 4500

                                        1. Initial program 35.7%

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

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

                                            \[\leadsto \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. cos-lowering-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. *-lowering-*.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. atan2-lowering-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. pow-lowering-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. sqrt-lowering-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. accelerator-lowering-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. *-lowering-*.f6437.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. Simplified37.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} \]
                                        7. Step-by-step derivation
                                          1. Simplified52.0%

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

                                        Alternative 9: 25.4% 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 36.7%

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

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

                                            \[\leadsto \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. cos-lowering-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. *-lowering-*.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. atan2-lowering-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. pow-lowering-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. sqrt-lowering-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. accelerator-lowering-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. *-lowering-*.f6455.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. Simplified55.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} \]
                                        7. Step-by-step derivation
                                          1. Simplified27.6%

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

                                          Reproduce

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