powComplex, real part

Percentage Accurate: 40.4% → 77.1%
Time: 17.6s
Alternatives: 14
Speedup: 5.7×

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

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

Initial Program: 40.4% accurate, 1.0× speedup?

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

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

Alternative 1: 77.1% accurate, 1.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\ t_1 := 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 t\_0\\ \mathbf{if}\;y.re \leq -0.064:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y.re \leq 1.18 \cdot 10^{-8}:\\ \;\;\;\;t\_0 \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\ \mathbf{elif}\;y.re \leq 9 \cdot 10^{+81}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;{\left(\mathsf{fma}\left(x.re, x.re, x.im \cdot x.im\right)\right)}^{\left(y.re \cdot 0.5\right)} \cdot 1\\ \end{array} \end{array} \]
(FPCore (x.re x.im y.re y.im)
 :precision binary64
 (let* ((t_0 (cos (* y.re (atan2 x.im x.re))))
        (t_1
         (*
          (exp
           (-
            (* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
            (* (atan2 x.im x.re) y.im)))
          t_0)))
   (if (<= y.re -0.064)
     t_1
     (if (<= y.re 1.18e-8)
       (* t_0 (exp (* (atan2 x.im x.re) (- y.im))))
       (if (<= y.re 9e+81)
         t_1
         (* (pow (fma x.re x.re (* x.im x.im)) (* y.re 0.5)) 1.0))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
	double t_0 = cos((y_46_re * atan2(x_46_im, x_46_re)));
	double t_1 = 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))) * t_0;
	double tmp;
	if (y_46_re <= -0.064) {
		tmp = t_1;
	} else if (y_46_re <= 1.18e-8) {
		tmp = t_0 * exp((atan2(x_46_im, x_46_re) * -y_46_im));
	} else if (y_46_re <= 9e+81) {
		tmp = t_1;
	} else {
		tmp = pow(fma(x_46_re, x_46_re, (x_46_im * x_46_im)), (y_46_re * 0.5)) * 1.0;
	}
	return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im)
	t_0 = cos(Float64(y_46_re * atan(x_46_im, x_46_re)))
	t_1 = Float64(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))) * t_0)
	tmp = 0.0
	if (y_46_re <= -0.064)
		tmp = t_1;
	elseif (y_46_re <= 1.18e-8)
		tmp = Float64(t_0 * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))));
	elseif (y_46_re <= 9e+81)
		tmp = t_1;
	else
		tmp = Float64((fma(x_46_re, x_46_re, Float64(x_46_im * x_46_im)) ^ Float64(y_46_re * 0.5)) * 1.0);
	end
	return tmp
end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Cos[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(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] * t$95$0), $MachinePrecision]}, If[LessEqual[y$46$re, -0.064], t$95$1, If[LessEqual[y$46$re, 1.18e-8], N[(t$95$0 * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 9e+81], t$95$1, N[(N[Power[N[(x$46$re * x$46$re + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision], N[(y$46$re * 0.5), $MachinePrecision]], $MachinePrecision] * 1.0), $MachinePrecision]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
t_1 := 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 t\_0\\
\mathbf{if}\;y.re \leq -0.064:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;y.re \leq 9 \cdot 10^{+81}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y.re < -0.064000000000000001 or 1.18e-8 < y.re < 9.00000000000000034e81

    1. Initial program 45.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 e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \cos \color{blue}{\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \cos \color{blue}{\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
      2. lower-atan2.f6481.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. Applied rewrites81.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 -0.064000000000000001 < y.re < 1.18e-8

    1. Initial program 45.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, \color{blue}{x.re \cdot x.re}\right)}\right)}^{y.re} \]
      10. lower-*.f6455.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. Applied rewrites55.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 1 \cdot {\color{blue}{\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}}^{y.re} \]
    7. Step-by-step derivation
      1. Applied rewrites66.0%

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

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;y.re \leq -0.064:\\ \;\;\;\;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 1.18 \cdot 10^{-8}:\\ \;\;\;\;\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\ \mathbf{elif}\;y.re \leq 9 \cdot 10^{+81}:\\ \;\;\;\;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{else}:\\ \;\;\;\;{\left(\mathsf{fma}\left(x.re, x.re, x.im \cdot x.im\right)\right)}^{\left(y.re \cdot 0.5\right)} \cdot 1\\ \end{array} \]
      5. Add Preprocessing

      Alternative 2: 74.1% accurate, 0.8× speedup?

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

        1. Initial program 42.6%

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

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

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

        if -0.064000000000000001 < y.re < 1.18e-8

        1. Initial program 45.0%

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

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

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

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

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

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

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

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

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

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

        if 1.18e-8 < y.re

        1. Initial program 43.0%

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

          \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \color{blue}{\left(\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) + -1 \cdot \left(y.im \cdot \left(\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right) \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right)} \]
        4. Step-by-step derivation
          1. +-commutativeN/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 \color{blue}{\left(-1 \cdot \left(y.im \cdot \left(\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right) \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) + \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)} \]
          2. mul-1-negN/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 \left(\color{blue}{\left(\mathsf{neg}\left(y.im \cdot \left(\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right) \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right)} + \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
          3. associate-*r*N/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 \left(\left(\mathsf{neg}\left(\color{blue}{\left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right) \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\right)\right) + \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
          4. distribute-rgt-neg-inN/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 \left(\color{blue}{\left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right) \cdot \left(\mathsf{neg}\left(\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)} + \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
          5. lower-fma.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 \color{blue}{\mathsf{fma}\left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right), \mathsf{neg}\left(\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right), \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)} \]
        5. Applied rewrites68.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 \color{blue}{\mathsf{fma}\left(y.im \cdot \log \left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right), -\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right), \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)} \]
      3. Recombined 3 regimes into one program.
      4. Final simplification76.2%

        \[\leadsto \begin{array}{l} \mathbf{if}\;y.re \leq -0.064:\\ \;\;\;\;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 1.18 \cdot 10^{-8}:\\ \;\;\;\;\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\ \mathbf{else}:\\ \;\;\;\;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 \mathsf{fma}\left(y.im \cdot \log \left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right), -\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right), \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\\ \end{array} \]
      5. Add Preprocessing

      Alternative 3: 75.5% accurate, 1.6× speedup?

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

        1. Initial program 42.6%

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, \color{blue}{x.re \cdot x.re}\right)}\right)}^{y.re} \]
          10. lower-*.f6477.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. Applied rewrites77.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 1 \cdot {\color{blue}{\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}}^{y.re} \]
        7. Step-by-step derivation
          1. Applied rewrites78.9%

            \[\leadsto 1 \cdot {\color{blue}{\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 1 \cdot {\left(x.re + \frac{1}{2} \cdot \frac{{x.im}^{2}}{x.re}\right)}^{y.re} \]
          3. Step-by-step derivation
            1. Applied rewrites78.9%

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

            if -0.34999999999999998 < y.re < 6.6e21

            1. Initial program 45.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 e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \cos \color{blue}{\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
            4. Step-by-step derivation
              1. lower-*.f64N/A

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

                \[\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. Applied rewrites52.8%

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

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

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

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

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

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

            if 6.6e21 < y.re

            1. Initial program 41.9%

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, \color{blue}{x.re \cdot x.re}\right)}\right)}^{y.re} \]
            5. Applied rewrites55.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 1 \cdot {\color{blue}{\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}}^{y.re} \]
            7. Step-by-step derivation
              1. Applied rewrites66.3%

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

                  \[\leadsto 1 \cdot \sqrt{{\left(\mathsf{fma}\left(x.re, x.re, x.im \cdot x.im\right)\right)}^{y.re}} \]
              3. Recombined 3 regimes into one program.
              4. Final simplification74.3%

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

              Alternative 4: 59.7% accurate, 3.0× speedup?

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

                1. Initial program 42.6%

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, \color{blue}{x.re \cdot x.re}\right)}\right)}^{y.re} \]
                  10. lower-*.f6477.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. Applied rewrites77.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 1 \cdot {\color{blue}{\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}}^{y.re} \]
                7. Step-by-step derivation
                  1. Applied rewrites78.9%

                    \[\leadsto 1 \cdot {\color{blue}{\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 1 \cdot {\left(x.re + \frac{1}{2} \cdot \frac{{x.im}^{2}}{x.re}\right)}^{y.re} \]
                  3. Step-by-step derivation
                    1. Applied rewrites78.9%

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

                    if -0.064000000000000001 < y.re < 3.25e-44

                    1. Initial program 44.3%

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

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

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

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

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

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

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

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

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

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

                        \[\leadsto \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, \color{blue}{x.re \cdot x.re}\right)}\right)}^{y.re} \]
                      10. lower-*.f6434.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. Applied rewrites34.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 \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot 1 \]
                    7. Step-by-step derivation
                      1. Applied rewrites50.9%

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

                      if 3.25e-44 < y.re

                      1. Initial program 44.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                            \[\leadsto 1 \cdot {\left(\mathsf{fma}\left(x.re, x.re, x.im \cdot x.im\right) \cdot \mathsf{fma}\left(x.re, x.re, x.im \cdot x.im\right)\right)}^{\color{blue}{\left(y.re \cdot 0.25\right)}} \]
                        3. Recombined 3 regimes into one program.
                        4. Add Preprocessing

                        Alternative 5: 59.7% accurate, 4.5× speedup?

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

                          1. Initial program 42.6%

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

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

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

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

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

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

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

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

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

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

                              \[\leadsto \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, \color{blue}{x.re \cdot x.re}\right)}\right)}^{y.re} \]
                            10. lower-*.f6477.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. Applied rewrites77.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 1 \cdot {\color{blue}{\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}}^{y.re} \]
                          7. Step-by-step derivation
                            1. Applied rewrites78.9%

                              \[\leadsto 1 \cdot {\color{blue}{\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 1 \cdot {\left(x.re + \frac{1}{2} \cdot \frac{{x.im}^{2}}{x.re}\right)}^{y.re} \]
                            3. Step-by-step derivation
                              1. Applied rewrites78.9%

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

                              if -0.064000000000000001 < y.re < 3.25e-44

                              1. Initial program 44.3%

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

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

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

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

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

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

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

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

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

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

                                  \[\leadsto \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, \color{blue}{x.re \cdot x.re}\right)}\right)}^{y.re} \]
                                10. lower-*.f6434.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. Applied rewrites34.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 1 \]
                              7. Step-by-step derivation
                                1. Applied rewrites50.9%

                                  \[\leadsto 1 \]

                                if 3.25e-44 < y.re

                                1. Initial program 44.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                      \[\leadsto 1 \cdot {\left(\mathsf{fma}\left(x.re, x.re, x.im \cdot x.im\right) \cdot \mathsf{fma}\left(x.re, x.re, x.im \cdot x.im\right)\right)}^{\color{blue}{\left(y.re \cdot 0.25\right)}} \]
                                  3. Recombined 3 regimes into one program.
                                  4. Add Preprocessing

                                  Alternative 6: 59.9% accurate, 4.9× speedup?

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

                                    1. Initial program 42.6%

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

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

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

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

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

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

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

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

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

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

                                        \[\leadsto \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, \color{blue}{x.re \cdot x.re}\right)}\right)}^{y.re} \]
                                      10. lower-*.f6477.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. Applied rewrites77.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 1 \cdot {\color{blue}{\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}}^{y.re} \]
                                    7. Step-by-step derivation
                                      1. Applied rewrites78.9%

                                        \[\leadsto 1 \cdot {\color{blue}{\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 1 \cdot {\left(x.re + \frac{1}{2} \cdot \frac{{x.im}^{2}}{x.re}\right)}^{y.re} \]
                                      3. Step-by-step derivation
                                        1. Applied rewrites78.9%

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

                                        if -0.064000000000000001 < y.re < 8.60000000000000027e-44

                                        1. Initial program 44.4%

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

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

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

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

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

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

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

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

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

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

                                            \[\leadsto \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, \color{blue}{x.re \cdot x.re}\right)}\right)}^{y.re} \]
                                          10. lower-*.f6433.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. Applied rewrites33.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 1 \]
                                        7. Step-by-step derivation
                                          1. Applied rewrites50.1%

                                            \[\leadsto 1 \]

                                          if 8.60000000000000027e-44 < y.re

                                          1. Initial program 44.1%

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

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

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

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

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

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

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

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

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

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

                                              \[\leadsto \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, \color{blue}{x.re \cdot x.re}\right)}\right)}^{y.re} \]
                                            10. lower-*.f6453.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. Applied rewrites53.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 1 \cdot {\color{blue}{\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}}^{y.re} \]
                                          7. Step-by-step derivation
                                            1. Applied rewrites60.7%

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

                                                \[\leadsto 1 \cdot \sqrt{{\left(\mathsf{fma}\left(x.re, x.re, x.im \cdot x.im\right)\right)}^{y.re}} \]
                                            3. Recombined 3 regimes into one program.
                                            4. Add Preprocessing

                                            Alternative 7: 60.6% accurate, 4.9× speedup?

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

                                              1. Initial program 42.6%

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

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

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

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

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

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

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

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

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

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

                                                  \[\leadsto \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, \color{blue}{x.re \cdot x.re}\right)}\right)}^{y.re} \]
                                                10. lower-*.f6477.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. Applied rewrites77.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 1 \cdot {\color{blue}{\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}}^{y.re} \]
                                              7. Step-by-step derivation
                                                1. Applied rewrites78.9%

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

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

                                                  if -0.064000000000000001 < y.re < 8.60000000000000027e-44

                                                  1. Initial program 44.4%

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

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

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

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

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

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

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

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

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

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

                                                      \[\leadsto \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, \color{blue}{x.re \cdot x.re}\right)}\right)}^{y.re} \]
                                                    10. lower-*.f6433.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. Applied rewrites33.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 1 \]
                                                  7. Step-by-step derivation
                                                    1. Applied rewrites50.1%

                                                      \[\leadsto 1 \]

                                                    if 8.60000000000000027e-44 < y.re

                                                    1. Initial program 44.1%

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

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

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

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

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

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

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

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

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

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

                                                        \[\leadsto \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, \color{blue}{x.re \cdot x.re}\right)}\right)}^{y.re} \]
                                                      10. lower-*.f6453.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. Applied rewrites53.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 1 \cdot {\color{blue}{\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}}^{y.re} \]
                                                    7. Step-by-step derivation
                                                      1. Applied rewrites60.7%

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

                                                          \[\leadsto 1 \cdot \sqrt{{\left(\mathsf{fma}\left(x.re, x.re, x.im \cdot x.im\right)\right)}^{y.re}} \]
                                                      3. Recombined 3 regimes into one program.
                                                      4. Add Preprocessing

                                                      Alternative 8: 60.6% accurate, 5.0× speedup?

                                                      \[\begin{array}{l} \\ \begin{array}{l} t_0 := {\left(\mathsf{fma}\left(x.re, x.re, x.im \cdot x.im\right)\right)}^{\left(y.re \cdot 0.5\right)} \cdot 1\\ \mathbf{if}\;y.re \leq -0.064:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;y.re \leq 8.6 \cdot 10^{-44}:\\ \;\;\;\;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.re x.re (* x.im x.im)) (* y.re 0.5)) 1.0)))
                                                         (if (<= y.re -0.064) t_0 (if (<= y.re 8.6e-44) 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_re, x_46_re, (x_46_im * x_46_im)), (y_46_re * 0.5)) * 1.0;
                                                      	double tmp;
                                                      	if (y_46_re <= -0.064) {
                                                      		tmp = t_0;
                                                      	} else if (y_46_re <= 8.6e-44) {
                                                      		tmp = 1.0;
                                                      	} else {
                                                      		tmp = t_0;
                                                      	}
                                                      	return tmp;
                                                      }
                                                      
                                                      function code(x_46_re, x_46_im, y_46_re, y_46_im)
                                                      	t_0 = Float64((fma(x_46_re, x_46_re, Float64(x_46_im * x_46_im)) ^ Float64(y_46_re * 0.5)) * 1.0)
                                                      	tmp = 0.0
                                                      	if (y_46_re <= -0.064)
                                                      		tmp = t_0;
                                                      	elseif (y_46_re <= 8.6e-44)
                                                      		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[(N[Power[N[(x$46$re * x$46$re + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision], N[(y$46$re * 0.5), $MachinePrecision]], $MachinePrecision] * 1.0), $MachinePrecision]}, If[LessEqual[y$46$re, -0.064], t$95$0, If[LessEqual[y$46$re, 8.6e-44], 1.0, t$95$0]]]
                                                      
                                                      \begin{array}{l}
                                                      
                                                      \\
                                                      \begin{array}{l}
                                                      t_0 := {\left(\mathsf{fma}\left(x.re, x.re, x.im \cdot x.im\right)\right)}^{\left(y.re \cdot 0.5\right)} \cdot 1\\
                                                      \mathbf{if}\;y.re \leq -0.064:\\
                                                      \;\;\;\;t\_0\\
                                                      
                                                      \mathbf{elif}\;y.re \leq 8.6 \cdot 10^{-44}:\\
                                                      \;\;\;\;1\\
                                                      
                                                      \mathbf{else}:\\
                                                      \;\;\;\;t\_0\\
                                                      
                                                      
                                                      \end{array}
                                                      \end{array}
                                                      
                                                      Derivation
                                                      1. Split input into 2 regimes
                                                      2. if y.re < -0.064000000000000001 or 8.60000000000000027e-44 < y.re

                                                        1. Initial program 43.4%

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

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

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

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

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

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

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

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

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

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

                                                            \[\leadsto \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, \color{blue}{x.re \cdot x.re}\right)}\right)}^{y.re} \]
                                                          10. lower-*.f6464.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. Applied rewrites64.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 1 \cdot {\color{blue}{\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}}^{y.re} \]
                                                        7. Step-by-step derivation
                                                          1. Applied rewrites68.7%

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

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

                                                            if -0.064000000000000001 < y.re < 8.60000000000000027e-44

                                                            1. Initial program 44.4%

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

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

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

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

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

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

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

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

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

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

                                                                \[\leadsto \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, \color{blue}{x.re \cdot x.re}\right)}\right)}^{y.re} \]
                                                              10. lower-*.f6433.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. Applied rewrites33.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 1 \]
                                                            7. Step-by-step derivation
                                                              1. Applied rewrites50.1%

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

                                                            Alternative 9: 57.1% accurate, 5.1× speedup?

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

                                                              1. Initial program 31.2%

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

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

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

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

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

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

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

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

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

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

                                                                  \[\leadsto \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, \color{blue}{x.re \cdot x.re}\right)}\right)}^{y.re} \]
                                                                10. lower-*.f6448.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. Applied rewrites48.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 1 \cdot {\color{blue}{\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}}^{y.re} \]
                                                              7. Step-by-step derivation
                                                                1. Applied rewrites54.2%

                                                                  \[\leadsto 1 \cdot {\color{blue}{\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 {\left(-1 \cdot x.re\right)}^{y.re} \]
                                                                3. Step-by-step derivation
                                                                  1. Applied rewrites62.8%

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

                                                                  if -1.8599999999999999e-16 < x.re < 1.1199999999999999e-142

                                                                  1. Initial program 51.2%

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

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

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

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

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

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

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

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

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

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

                                                                      \[\leadsto \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, \color{blue}{x.re \cdot x.re}\right)}\right)}^{y.re} \]
                                                                    10. lower-*.f6444.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. Applied rewrites44.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 1 \cdot {\color{blue}{\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}}^{y.re} \]
                                                                  7. Step-by-step derivation
                                                                    1. Applied rewrites47.9%

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

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

                                                                        \[\leadsto 1 \cdot \sqrt{{\left({x.im}^{2}\right)}^{y.re}} \]
                                                                      3. Step-by-step derivation
                                                                        1. Applied rewrites47.8%

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

                                                                        if 1.1199999999999999e-142 < x.re

                                                                        1. Initial program 45.9%

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

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

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

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

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

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

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

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

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

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

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

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

                                                                            \[\leadsto 1 \cdot {\color{blue}{\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 1 \cdot {x.re}^{\color{blue}{y.re}} \]
                                                                          3. Step-by-step derivation
                                                                            1. Applied rewrites64.1%

                                                                              \[\leadsto 1 \cdot {x.re}^{\color{blue}{y.re}} \]
                                                                          4. Recombined 3 regimes into one program.
                                                                          5. Add Preprocessing

                                                                          Alternative 10: 54.0% accurate, 5.7× speedup?

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

                                                                            1. Initial program 44.9%

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

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

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

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

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

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

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

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

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

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

                                                                                \[\leadsto \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, \color{blue}{x.re \cdot x.re}\right)}\right)}^{y.re} \]
                                                                              10. lower-*.f6448.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. Applied rewrites48.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 1 \cdot {\color{blue}{\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}}^{y.re} \]
                                                                            7. Step-by-step derivation
                                                                              1. Applied rewrites53.1%

                                                                                \[\leadsto 1 \cdot {\color{blue}{\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 {\left(-1 \cdot x.re\right)}^{y.re} \]
                                                                              3. Step-by-step derivation
                                                                                1. Applied rewrites57.7%

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

                                                                                if -4.0999999999999997e-173 < x.re < 5.29999999999999997e-143

                                                                                1. Initial program 36.8%

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

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

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

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

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

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

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

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

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

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

                                                                                    \[\leadsto \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, \color{blue}{x.re \cdot x.re}\right)}\right)}^{y.re} \]
                                                                                  10. lower-*.f6442.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. Applied rewrites42.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 1 \cdot {\color{blue}{\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}}^{y.re} \]
                                                                                7. Step-by-step derivation
                                                                                  1. Applied rewrites45.6%

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

                                                                                    \[\leadsto 1 \cdot {x.im}^{\color{blue}{y.re}} \]
                                                                                  3. Step-by-step derivation
                                                                                    1. Applied rewrites39.7%

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

                                                                                    if 5.29999999999999997e-143 < x.re

                                                                                    1. Initial program 45.9%

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                        \[\leadsto 1 \cdot {\color{blue}{\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 1 \cdot {x.re}^{\color{blue}{y.re}} \]
                                                                                      3. Step-by-step derivation
                                                                                        1. Applied rewrites64.1%

                                                                                          \[\leadsto 1 \cdot {x.re}^{\color{blue}{y.re}} \]
                                                                                      4. Recombined 3 regimes into one program.
                                                                                      5. Add Preprocessing

                                                                                      Alternative 11: 54.7% accurate, 5.7× speedup?

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

                                                                                        1. Initial program 27.3%

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

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

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

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

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

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

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

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

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

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

                                                                                            \[\leadsto \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, \color{blue}{x.re \cdot x.re}\right)}\right)}^{y.re} \]
                                                                                          10. lower-*.f6450.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. Applied rewrites50.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 1 \cdot {\color{blue}{\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}}^{y.re} \]
                                                                                        7. Step-by-step derivation
                                                                                          1. Applied rewrites51.9%

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

                                                                                            \[\leadsto 1 \cdot {\left(-1 \cdot x.im\right)}^{y.re} \]
                                                                                          3. Step-by-step derivation
                                                                                            1. Applied rewrites59.3%

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

                                                                                            if -7.5e7 < x.im < 4.8000000000000003e-52

                                                                                            1. Initial program 53.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                                \[\leadsto 1 \cdot {\color{blue}{\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 1 \cdot {x.re}^{\color{blue}{y.re}} \]
                                                                                              3. Step-by-step derivation
                                                                                                1. Applied rewrites52.7%

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

                                                                                                if 4.8000000000000003e-52 < x.im

                                                                                                1. Initial program 37.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                                    \[\leadsto 1 \cdot {x.im}^{\color{blue}{y.re}} \]
                                                                                                  3. Step-by-step derivation
                                                                                                    1. Applied rewrites60.5%

                                                                                                      \[\leadsto 1 \cdot {x.im}^{\color{blue}{y.re}} \]
                                                                                                  4. Recombined 3 regimes into one program.
                                                                                                  5. Add Preprocessing

                                                                                                  Alternative 12: 51.9% accurate, 5.7× speedup?

                                                                                                  \[\begin{array}{l} \\ \begin{array}{l} t_0 := 1 \cdot {x.re}^{y.re}\\ \mathbf{if}\;y.re \leq -2.35 \cdot 10^{+14}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;y.re \leq 460000:\\ \;\;\;\;1\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
                                                                                                  (FPCore (x.re x.im y.re y.im)
                                                                                                   :precision binary64
                                                                                                   (let* ((t_0 (* 1.0 (pow x.re y.re))))
                                                                                                     (if (<= y.re -2.35e+14) t_0 (if (<= y.re 460000.0) 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 = 1.0 * pow(x_46_re, y_46_re);
                                                                                                  	double tmp;
                                                                                                  	if (y_46_re <= -2.35e+14) {
                                                                                                  		tmp = t_0;
                                                                                                  	} else if (y_46_re <= 460000.0) {
                                                                                                  		tmp = 1.0;
                                                                                                  	} else {
                                                                                                  		tmp = t_0;
                                                                                                  	}
                                                                                                  	return tmp;
                                                                                                  }
                                                                                                  
                                                                                                  real(8) function code(x_46re, x_46im, y_46re, y_46im)
                                                                                                      real(8), intent (in) :: x_46re
                                                                                                      real(8), intent (in) :: x_46im
                                                                                                      real(8), intent (in) :: y_46re
                                                                                                      real(8), intent (in) :: y_46im
                                                                                                      real(8) :: t_0
                                                                                                      real(8) :: tmp
                                                                                                      t_0 = 1.0d0 * (x_46re ** y_46re)
                                                                                                      if (y_46re <= (-2.35d+14)) then
                                                                                                          tmp = t_0
                                                                                                      else if (y_46re <= 460000.0d0) then
                                                                                                          tmp = 1.0d0
                                                                                                      else
                                                                                                          tmp = t_0
                                                                                                      end if
                                                                                                      code = tmp
                                                                                                  end function
                                                                                                  
                                                                                                  public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
                                                                                                  	double t_0 = 1.0 * Math.pow(x_46_re, y_46_re);
                                                                                                  	double tmp;
                                                                                                  	if (y_46_re <= -2.35e+14) {
                                                                                                  		tmp = t_0;
                                                                                                  	} else if (y_46_re <= 460000.0) {
                                                                                                  		tmp = 1.0;
                                                                                                  	} else {
                                                                                                  		tmp = t_0;
                                                                                                  	}
                                                                                                  	return tmp;
                                                                                                  }
                                                                                                  
                                                                                                  def code(x_46_re, x_46_im, y_46_re, y_46_im):
                                                                                                  	t_0 = 1.0 * math.pow(x_46_re, y_46_re)
                                                                                                  	tmp = 0
                                                                                                  	if y_46_re <= -2.35e+14:
                                                                                                  		tmp = t_0
                                                                                                  	elif y_46_re <= 460000.0:
                                                                                                  		tmp = 1.0
                                                                                                  	else:
                                                                                                  		tmp = t_0
                                                                                                  	return tmp
                                                                                                  
                                                                                                  function code(x_46_re, x_46_im, y_46_re, y_46_im)
                                                                                                  	t_0 = Float64(1.0 * (x_46_re ^ y_46_re))
                                                                                                  	tmp = 0.0
                                                                                                  	if (y_46_re <= -2.35e+14)
                                                                                                  		tmp = t_0;
                                                                                                  	elseif (y_46_re <= 460000.0)
                                                                                                  		tmp = 1.0;
                                                                                                  	else
                                                                                                  		tmp = t_0;
                                                                                                  	end
                                                                                                  	return tmp
                                                                                                  end
                                                                                                  
                                                                                                  function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im)
                                                                                                  	t_0 = 1.0 * (x_46_re ^ y_46_re);
                                                                                                  	tmp = 0.0;
                                                                                                  	if (y_46_re <= -2.35e+14)
                                                                                                  		tmp = t_0;
                                                                                                  	elseif (y_46_re <= 460000.0)
                                                                                                  		tmp = 1.0;
                                                                                                  	else
                                                                                                  		tmp = t_0;
                                                                                                  	end
                                                                                                  	tmp_2 = tmp;
                                                                                                  end
                                                                                                  
                                                                                                  code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(1.0 * N[Power[x$46$re, y$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -2.35e+14], t$95$0, If[LessEqual[y$46$re, 460000.0], 1.0, t$95$0]]]
                                                                                                  
                                                                                                  \begin{array}{l}
                                                                                                  
                                                                                                  \\
                                                                                                  \begin{array}{l}
                                                                                                  t_0 := 1 \cdot {x.re}^{y.re}\\
                                                                                                  \mathbf{if}\;y.re \leq -2.35 \cdot 10^{+14}:\\
                                                                                                  \;\;\;\;t\_0\\
                                                                                                  
                                                                                                  \mathbf{elif}\;y.re \leq 460000:\\
                                                                                                  \;\;\;\;1\\
                                                                                                  
                                                                                                  \mathbf{else}:\\
                                                                                                  \;\;\;\;t\_0\\
                                                                                                  
                                                                                                  
                                                                                                  \end{array}
                                                                                                  \end{array}
                                                                                                  
                                                                                                  Derivation
                                                                                                  1. Split input into 2 regimes
                                                                                                  2. if y.re < -2.35e14 or 4.6e5 < y.re

                                                                                                    1. Initial program 43.1%

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

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

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

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

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

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

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

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

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

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

                                                                                                        \[\leadsto \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, \color{blue}{x.re \cdot x.re}\right)}\right)}^{y.re} \]
                                                                                                      10. lower-*.f6466.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. Applied rewrites66.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 1 \cdot {\color{blue}{\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}}^{y.re} \]
                                                                                                    7. Step-by-step derivation
                                                                                                      1. Applied rewrites72.5%

                                                                                                        \[\leadsto 1 \cdot {\color{blue}{\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 1 \cdot {x.re}^{\color{blue}{y.re}} \]
                                                                                                      3. Step-by-step derivation
                                                                                                        1. Applied rewrites62.2%

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

                                                                                                        if -2.35e14 < y.re < 4.6e5

                                                                                                        1. Initial program 44.6%

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

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

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

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

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

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

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

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

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

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

                                                                                                            \[\leadsto \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, \color{blue}{x.re \cdot x.re}\right)}\right)}^{y.re} \]
                                                                                                          10. lower-*.f6435.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. Applied rewrites35.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 1 \]
                                                                                                        7. Step-by-step derivation
                                                                                                          1. Applied rewrites46.0%

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

                                                                                                        Alternative 13: 51.8% accurate, 5.7× speedup?

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

                                                                                                          1. Initial program 42.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                                              \[\leadsto 1 \cdot {x.im}^{\color{blue}{y.re}} \]
                                                                                                            3. Step-by-step derivation
                                                                                                              1. Applied rewrites52.2%

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

                                                                                                              if -0.062 < y.re < 9.8e7

                                                                                                              1. Initial program 45.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                                                \[\leadsto 1 \]
                                                                                                              7. Step-by-step derivation
                                                                                                                1. Applied rewrites47.0%

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

                                                                                                              Alternative 14: 26.0% 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 43.9%

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

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

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

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

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

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

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

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

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

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

                                                                                                                  \[\leadsto \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, \color{blue}{x.re \cdot x.re}\right)}\right)}^{y.re} \]
                                                                                                                10. lower-*.f6450.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. Applied rewrites50.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 1 \]
                                                                                                              7. Step-by-step derivation
                                                                                                                1. Applied rewrites25.2%

                                                                                                                  \[\leadsto 1 \]
                                                                                                                2. Add Preprocessing

                                                                                                                Reproduce

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