powComplex, real part

Percentage Accurate: 41.7% → 82.8%
Time: 16.9s
Alternatives: 15
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 15 alternatives:

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

Initial Program: 41.7% 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: 82.8% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\ t_1 := e^{\left(-y.re\right) \cdot \mathsf{fma}\left(y.im, \frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.re}, -t\_0\right)}\\ \mathbf{if}\;y.im \leq -9 \cdot 10^{+262}:\\ \;\;\;\;\cos \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \cdot t\_1\\ \mathbf{else}:\\ \;\;\;\;\cos \left(t\_0 \cdot y.im\right) \cdot t\_1\\ \end{array} \end{array} \]
(FPCore (x.re x.im y.re y.im)
 :precision binary64
 (let* ((t_0 (log (hypot x.re x.im)))
        (t_1 (exp (* (- y.re) (fma y.im (/ (atan2 x.im x.re) y.re) (- t_0))))))
   (if (<= y.im -9e+262)
     (* (cos (* (atan2 x.im x.re) y.re)) t_1)
     (* (cos (* t_0 y.im)) t_1))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
	double t_0 = log(hypot(x_46_re, x_46_im));
	double t_1 = exp((-y_46_re * fma(y_46_im, (atan2(x_46_im, x_46_re) / y_46_re), -t_0)));
	double tmp;
	if (y_46_im <= -9e+262) {
		tmp = cos((atan2(x_46_im, x_46_re) * y_46_re)) * t_1;
	} else {
		tmp = cos((t_0 * y_46_im)) * t_1;
	}
	return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im)
	t_0 = log(hypot(x_46_re, x_46_im))
	t_1 = exp(Float64(Float64(-y_46_re) * fma(y_46_im, Float64(atan(x_46_im, x_46_re) / y_46_re), Float64(-t_0))))
	tmp = 0.0
	if (y_46_im <= -9e+262)
		tmp = Float64(cos(Float64(atan(x_46_im, x_46_re) * y_46_re)) * t_1);
	else
		tmp = Float64(cos(Float64(t_0 * y_46_im)) * t_1);
	end
	return tmp
end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[Exp[N[((-y$46$re) * N[(y$46$im * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] / y$46$re), $MachinePrecision] + (-t$95$0)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$im, -9e+262], N[(N[Cos[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]], $MachinePrecision] * t$95$1), $MachinePrecision], N[(N[Cos[N[(t$95$0 * y$46$im), $MachinePrecision]], $MachinePrecision] * t$95$1), $MachinePrecision]]]]
\begin{array}{l}

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

\mathbf{else}:\\
\;\;\;\;\cos \left(t\_0 \cdot y.im\right) \cdot t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y.im < -8.99999999999999945e262

    1. Initial program 41.7%

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

      \[\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.im \cdot \left(\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right) + \frac{y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}}{y.im}\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 \cos \color{blue}{\left(\left(\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right) + \frac{y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}}{y.im}\right) \cdot y.im\right)} \]
      2. 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(\left(\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right) + \frac{y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}}{y.im}\right) \cdot y.im\right)} \]
      3. +-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 \cos \left(\color{blue}{\left(\frac{y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}}{y.im} + \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)} \cdot y.im\right) \]
      4. associate-/l*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 \cos \left(\left(\color{blue}{y.re \cdot \frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.im}} + \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right) \cdot y.im\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 \cos \left(\color{blue}{\mathsf{fma}\left(y.re, \frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.im}, \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)} \cdot y.im\right) \]
      6. 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 \left(\mathsf{fma}\left(y.re, \color{blue}{\frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.im}}, \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right) \cdot y.im\right) \]
      7. lower-atan2.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 \left(\mathsf{fma}\left(y.re, \frac{\color{blue}{\tan^{-1}_* \frac{x.im}{x.re}}}{y.im}, \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right) \cdot y.im\right) \]
      8. lower-log.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 \left(\mathsf{fma}\left(y.re, \frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.im}, \color{blue}{\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}\right) \cdot y.im\right) \]
      9. +-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 \cos \left(\mathsf{fma}\left(y.re, \frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.im}, \log \left(\sqrt{\color{blue}{{x.re}^{2} + {x.im}^{2}}}\right)\right) \cdot y.im\right) \]
      10. unpow2N/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 \left(\mathsf{fma}\left(y.re, \frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.im}, \log \left(\sqrt{\color{blue}{x.re \cdot x.re} + {x.im}^{2}}\right)\right) \cdot y.im\right) \]
      11. unpow2N/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 \left(\mathsf{fma}\left(y.re, \frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.im}, \log \left(\sqrt{x.re \cdot x.re + \color{blue}{x.im \cdot x.im}}\right)\right) \cdot y.im\right) \]
      12. lower-hypot.f6450.1

        \[\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(\mathsf{fma}\left(y.re, \frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.im}, \log \color{blue}{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}\right) \cdot y.im\right) \]
    5. Applied rewrites50.1%

      \[\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(\mathsf{fma}\left(y.re, \frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.im}, \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\right) \cdot y.im\right)} \]
    6. Taylor expanded in y.re around -inf

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto e^{-y.re \cdot \mathsf{fma}\left(y.im, \frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.re}, -\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\right)} \cdot \cos \left(y.re \cdot \color{blue}{\tan^{-1}_* \frac{x.im}{x.re}}\right) \]
    10. Step-by-step derivation
      1. Applied rewrites91.7%

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

      if -8.99999999999999945e262 < y.im

      1. Initial program 39.5%

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

        \[\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.im \cdot \left(\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right) + \frac{y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}}{y.im}\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 \cos \color{blue}{\left(\left(\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right) + \frac{y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}}{y.im}\right) \cdot y.im\right)} \]
        2. 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(\left(\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right) + \frac{y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}}{y.im}\right) \cdot y.im\right)} \]
        3. +-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 \cos \left(\color{blue}{\left(\frac{y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}}{y.im} + \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)} \cdot y.im\right) \]
        4. associate-/l*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 \cos \left(\left(\color{blue}{y.re \cdot \frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.im}} + \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right) \cdot y.im\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 \cos \left(\color{blue}{\mathsf{fma}\left(y.re, \frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.im}, \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)} \cdot y.im\right) \]
        6. 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 \left(\mathsf{fma}\left(y.re, \color{blue}{\frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.im}}, \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right) \cdot y.im\right) \]
        7. lower-atan2.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 \left(\mathsf{fma}\left(y.re, \frac{\color{blue}{\tan^{-1}_* \frac{x.im}{x.re}}}{y.im}, \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right) \cdot y.im\right) \]
        8. lower-log.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 \left(\mathsf{fma}\left(y.re, \frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.im}, \color{blue}{\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}\right) \cdot y.im\right) \]
        9. +-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 \cos \left(\mathsf{fma}\left(y.re, \frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.im}, \log \left(\sqrt{\color{blue}{{x.re}^{2} + {x.im}^{2}}}\right)\right) \cdot y.im\right) \]
        10. unpow2N/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 \left(\mathsf{fma}\left(y.re, \frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.im}, \log \left(\sqrt{\color{blue}{x.re \cdot x.re} + {x.im}^{2}}\right)\right) \cdot y.im\right) \]
        11. unpow2N/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 \left(\mathsf{fma}\left(y.re, \frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.im}, \log \left(\sqrt{x.re \cdot x.re + \color{blue}{x.im \cdot x.im}}\right)\right) \cdot y.im\right) \]
        12. lower-hypot.f6454.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(\mathsf{fma}\left(y.re, \frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.im}, \log \color{blue}{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}\right) \cdot y.im\right) \]
      5. Applied rewrites54.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(\mathsf{fma}\left(y.re, \frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.im}, \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\right) \cdot y.im\right)} \]
      6. Taylor expanded in y.re around -inf

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto e^{-y.re \cdot \mathsf{fma}\left(y.im, \frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.re}, -\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\right)} \cdot \cos \left(y.im \cdot \color{blue}{\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}\right) \]
      10. Step-by-step derivation
        1. Applied rewrites82.8%

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

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

      Alternative 2: 80.1% accurate, 1.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re} \cdot 1 \]
        7. Step-by-step derivation
          1. Applied rewrites81.7%

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

          if -4.19999999999999987e132 < y.re < 6.2000000000000001e60

          1. Initial program 42.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 inf

            \[\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.im \cdot \left(\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right) + \frac{y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}}{y.im}\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 \cos \color{blue}{\left(\left(\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right) + \frac{y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}}{y.im}\right) \cdot y.im\right)} \]
            2. 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(\left(\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right) + \frac{y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}}{y.im}\right) \cdot y.im\right)} \]
            3. +-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 \cos \left(\color{blue}{\left(\frac{y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}}{y.im} + \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)} \cdot y.im\right) \]
            4. associate-/l*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 \cos \left(\left(\color{blue}{y.re \cdot \frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.im}} + \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right) \cdot y.im\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 \cos \left(\color{blue}{\mathsf{fma}\left(y.re, \frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.im}, \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)} \cdot y.im\right) \]
            6. 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 \left(\mathsf{fma}\left(y.re, \color{blue}{\frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.im}}, \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right) \cdot y.im\right) \]
            7. lower-atan2.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 \left(\mathsf{fma}\left(y.re, \frac{\color{blue}{\tan^{-1}_* \frac{x.im}{x.re}}}{y.im}, \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right) \cdot y.im\right) \]
            8. lower-log.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 \left(\mathsf{fma}\left(y.re, \frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.im}, \color{blue}{\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}\right) \cdot y.im\right) \]
            9. +-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 \cos \left(\mathsf{fma}\left(y.re, \frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.im}, \log \left(\sqrt{\color{blue}{{x.re}^{2} + {x.im}^{2}}}\right)\right) \cdot y.im\right) \]
            10. unpow2N/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 \left(\mathsf{fma}\left(y.re, \frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.im}, \log \left(\sqrt{\color{blue}{x.re \cdot x.re} + {x.im}^{2}}\right)\right) \cdot y.im\right) \]
            11. unpow2N/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 \left(\mathsf{fma}\left(y.re, \frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.im}, \log \left(\sqrt{x.re \cdot x.re + \color{blue}{x.im \cdot x.im}}\right)\right) \cdot y.im\right) \]
            12. lower-hypot.f6454.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(\mathsf{fma}\left(y.re, \frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.im}, \log \color{blue}{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}\right) \cdot y.im\right) \]
          5. Applied rewrites54.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(\mathsf{fma}\left(y.re, \frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.im}, \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\right) \cdot y.im\right)} \]
          6. Taylor expanded in y.re around -inf

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto e^{-y.re \cdot \mathsf{fma}\left(y.im, \frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.re}, -\log \left(\sqrt{x.re \cdot x.re + \color{blue}{x.im \cdot x.im}}\right)\right)} \cdot \cos \left(\mathsf{fma}\left(y.re, \frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.im}, \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\right) \cdot y.im\right) \]
            15. lower-hypot.f6480.1

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

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

            \[\leadsto e^{-y.re \cdot \mathsf{fma}\left(y.im, \frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.re}, -\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\right)} \cdot \cos \left(y.re \cdot \color{blue}{\tan^{-1}_* \frac{x.im}{x.re}}\right) \]
          10. Step-by-step derivation
            1. Applied rewrites81.3%

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

            if 6.2000000000000001e60 < y.re

            1. Initial program 34.4%

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

              \[\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.im \cdot \left(\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right) + \frac{y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}}{y.im}\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 \cos \color{blue}{\left(\left(\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right) + \frac{y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}}{y.im}\right) \cdot y.im\right)} \]
              2. 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(\left(\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right) + \frac{y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}}{y.im}\right) \cdot y.im\right)} \]
              3. +-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 \cos \left(\color{blue}{\left(\frac{y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}}{y.im} + \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)} \cdot y.im\right) \]
              4. associate-/l*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 \cos \left(\left(\color{blue}{y.re \cdot \frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.im}} + \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right) \cdot y.im\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 \cos \left(\color{blue}{\mathsf{fma}\left(y.re, \frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.im}, \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)} \cdot y.im\right) \]
              6. 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 \left(\mathsf{fma}\left(y.re, \color{blue}{\frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.im}}, \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right) \cdot y.im\right) \]
              7. lower-atan2.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 \left(\mathsf{fma}\left(y.re, \frac{\color{blue}{\tan^{-1}_* \frac{x.im}{x.re}}}{y.im}, \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right) \cdot y.im\right) \]
              8. lower-log.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 \left(\mathsf{fma}\left(y.re, \frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.im}, \color{blue}{\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}\right) \cdot y.im\right) \]
              9. +-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 \cos \left(\mathsf{fma}\left(y.re, \frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.im}, \log \left(\sqrt{\color{blue}{{x.re}^{2} + {x.im}^{2}}}\right)\right) \cdot y.im\right) \]
              10. unpow2N/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 \left(\mathsf{fma}\left(y.re, \frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.im}, \log \left(\sqrt{\color{blue}{x.re \cdot x.re} + {x.im}^{2}}\right)\right) \cdot y.im\right) \]
              11. unpow2N/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 \left(\mathsf{fma}\left(y.re, \frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.im}, \log \left(\sqrt{x.re \cdot x.re + \color{blue}{x.im \cdot x.im}}\right)\right) \cdot y.im\right) \]
              12. lower-hypot.f6457.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(\mathsf{fma}\left(y.re, \frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.im}, \log \color{blue}{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}\right) \cdot y.im\right) \]
            5. Applied rewrites57.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(\mathsf{fma}\left(y.re, \frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.im}, \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\right) \cdot y.im\right)} \]
            6. Taylor expanded in y.re around -inf

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto e^{-y.re \cdot \mathsf{fma}\left(y.im, \frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.re}, -\log \color{blue}{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}\right)} \cdot \cos \left(\mathsf{fma}\left(y.re, \frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.im}, \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\right) \cdot y.im\right) \]
            8. Applied rewrites57.4%

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

              \[\leadsto e^{-y.re \cdot \mathsf{fma}\left(y.im, \frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.re}, -\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\right)} \cdot \cos \left(y.im \cdot \color{blue}{\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}\right) \]
            10. Step-by-step derivation
              1. Applied rewrites86.9%

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

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

                  \[\leadsto \color{blue}{{\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}} \cdot \cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\right) \]
                2. +-commutativeN/A

                  \[\leadsto {\left(\sqrt{\color{blue}{{x.re}^{2} + {x.im}^{2}}}\right)}^{y.re} \cdot \cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\right) \]
                3. unpow2N/A

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

                  \[\leadsto {\left(\sqrt{x.re \cdot x.re + \color{blue}{x.im \cdot x.im}}\right)}^{y.re} \cdot \cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\right) \]
                5. lower-hypot.f6486.9

                  \[\leadsto {\color{blue}{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}}^{y.re} \cdot \cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\right) \]
              4. Applied rewrites86.9%

                \[\leadsto \color{blue}{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}} \cdot \cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\right) \]
            11. Recombined 3 regimes into one program.
            12. Final simplification82.7%

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

            Alternative 3: 78.6% accurate, 1.2× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re} \cdot 1 \]
              7. Step-by-step derivation
                1. Applied rewrites81.7%

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

                if -4.19999999999999987e132 < y.re < -2.2999999999999999e-9

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

                    \[\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(\color{blue}{\tan^{-1}_* \frac{x.im}{x.re}} \cdot y.re\right) \]
                5. Applied rewrites80.1%

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

                if -2.2999999999999999e-9 < y.re < 4.30000000000000002e-23

                1. Initial program 41.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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                if 4.30000000000000002e-23 < y.re

                1. Initial program 33.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 inf

                  \[\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.im \cdot \left(\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right) + \frac{y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}}{y.im}\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 \cos \color{blue}{\left(\left(\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right) + \frac{y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}}{y.im}\right) \cdot y.im\right)} \]
                  2. 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(\left(\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right) + \frac{y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}}{y.im}\right) \cdot y.im\right)} \]
                  3. +-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 \cos \left(\color{blue}{\left(\frac{y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}}{y.im} + \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)} \cdot y.im\right) \]
                  4. associate-/l*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 \cos \left(\left(\color{blue}{y.re \cdot \frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.im}} + \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right) \cdot y.im\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 \cos \left(\color{blue}{\mathsf{fma}\left(y.re, \frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.im}, \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)} \cdot y.im\right) \]
                  6. 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 \left(\mathsf{fma}\left(y.re, \color{blue}{\frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.im}}, \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right) \cdot y.im\right) \]
                  7. lower-atan2.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 \left(\mathsf{fma}\left(y.re, \frac{\color{blue}{\tan^{-1}_* \frac{x.im}{x.re}}}{y.im}, \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right) \cdot y.im\right) \]
                  8. lower-log.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 \left(\mathsf{fma}\left(y.re, \frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.im}, \color{blue}{\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}\right) \cdot y.im\right) \]
                  9. +-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 \cos \left(\mathsf{fma}\left(y.re, \frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.im}, \log \left(\sqrt{\color{blue}{{x.re}^{2} + {x.im}^{2}}}\right)\right) \cdot y.im\right) \]
                  10. unpow2N/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 \left(\mathsf{fma}\left(y.re, \frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.im}, \log \left(\sqrt{\color{blue}{x.re \cdot x.re} + {x.im}^{2}}\right)\right) \cdot y.im\right) \]
                  11. unpow2N/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 \left(\mathsf{fma}\left(y.re, \frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.im}, \log \left(\sqrt{x.re \cdot x.re + \color{blue}{x.im \cdot x.im}}\right)\right) \cdot y.im\right) \]
                  12. lower-hypot.f6458.3

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto e^{-y.re \cdot \mathsf{fma}\left(y.im, \frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.re}, -\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\right)} \cdot \cos \left(y.im \cdot \color{blue}{\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}\right) \]
                10. Step-by-step derivation
                  1. Applied rewrites83.2%

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

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

                      \[\leadsto \color{blue}{{\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}} \cdot \cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\right) \]
                    2. +-commutativeN/A

                      \[\leadsto {\left(\sqrt{\color{blue}{{x.re}^{2} + {x.im}^{2}}}\right)}^{y.re} \cdot \cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\right) \]
                    3. unpow2N/A

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

                      \[\leadsto {\left(\sqrt{x.re \cdot x.re + \color{blue}{x.im \cdot x.im}}\right)}^{y.re} \cdot \cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\right) \]
                    5. lower-hypot.f6483.2

                      \[\leadsto {\color{blue}{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}}^{y.re} \cdot \cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\right) \]
                  4. Applied rewrites83.2%

                    \[\leadsto \color{blue}{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}} \cdot \cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\right) \]
                11. Recombined 4 regimes into one program.
                12. Final simplification81.2%

                  \[\leadsto \begin{array}{l} \mathbf{if}\;y.re \leq -4.2 \cdot 10^{+132}:\\ \;\;\;\;1 \cdot {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\\ \mathbf{elif}\;y.re \leq -2.3 \cdot 10^{-9}:\\ \;\;\;\;\cos \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \cdot e^{\log \left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\ \mathbf{elif}\;y.re \leq 4.3 \cdot 10^{-23}:\\ \;\;\;\;e^{\left(-y.im\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \cos \left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im\right)\\ \mathbf{else}:\\ \;\;\;\;{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re} \cdot \cos \left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im\right)\\ \end{array} \]
                13. Add Preprocessing

                Alternative 4: 76.7% accurate, 1.3× speedup?

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

                  1. Initial program 41.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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re} \cdot 1 \]
                  7. Step-by-step derivation
                    1. Applied rewrites82.4%

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

                    if -9.99999999999999983e156 < y.re < -3.40000000000000001e-18

                    1. Initial program 40.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re} \cdot \left(1 + \color{blue}{\frac{-1}{2} \cdot \left({y.re}^{2} \cdot {\tan^{-1}_* \frac{x.im}{x.re}}^{2}\right)}\right) \]
                    7. Step-by-step derivation
                      1. Applied rewrites78.6%

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

                      if -3.40000000000000001e-18 < y.re < 4.30000000000000002e-23

                      1. Initial program 42.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      if 4.30000000000000002e-23 < y.re

                      1. Initial program 33.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 inf

                        \[\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.im \cdot \left(\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right) + \frac{y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}}{y.im}\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 \cos \color{blue}{\left(\left(\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right) + \frac{y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}}{y.im}\right) \cdot y.im\right)} \]
                        2. 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(\left(\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right) + \frac{y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}}{y.im}\right) \cdot y.im\right)} \]
                        3. +-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 \cos \left(\color{blue}{\left(\frac{y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}}{y.im} + \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)} \cdot y.im\right) \]
                        4. associate-/l*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 \cos \left(\left(\color{blue}{y.re \cdot \frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.im}} + \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right) \cdot y.im\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 \cos \left(\color{blue}{\mathsf{fma}\left(y.re, \frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.im}, \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)} \cdot y.im\right) \]
                        6. 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 \left(\mathsf{fma}\left(y.re, \color{blue}{\frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.im}}, \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right) \cdot y.im\right) \]
                        7. lower-atan2.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 \left(\mathsf{fma}\left(y.re, \frac{\color{blue}{\tan^{-1}_* \frac{x.im}{x.re}}}{y.im}, \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right) \cdot y.im\right) \]
                        8. lower-log.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 \left(\mathsf{fma}\left(y.re, \frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.im}, \color{blue}{\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}\right) \cdot y.im\right) \]
                        9. +-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 \cos \left(\mathsf{fma}\left(y.re, \frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.im}, \log \left(\sqrt{\color{blue}{{x.re}^{2} + {x.im}^{2}}}\right)\right) \cdot y.im\right) \]
                        10. unpow2N/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 \left(\mathsf{fma}\left(y.re, \frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.im}, \log \left(\sqrt{\color{blue}{x.re \cdot x.re} + {x.im}^{2}}\right)\right) \cdot y.im\right) \]
                        11. unpow2N/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 \left(\mathsf{fma}\left(y.re, \frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.im}, \log \left(\sqrt{x.re \cdot x.re + \color{blue}{x.im \cdot x.im}}\right)\right) \cdot y.im\right) \]
                        12. lower-hypot.f6458.3

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        \[\leadsto e^{-y.re \cdot \mathsf{fma}\left(y.im, \frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.re}, -\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\right)} \cdot \cos \left(y.im \cdot \color{blue}{\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}\right) \]
                      10. Step-by-step derivation
                        1. Applied rewrites83.2%

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

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

                            \[\leadsto \color{blue}{{\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}} \cdot \cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\right) \]
                          2. +-commutativeN/A

                            \[\leadsto {\left(\sqrt{\color{blue}{{x.re}^{2} + {x.im}^{2}}}\right)}^{y.re} \cdot \cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\right) \]
                          3. unpow2N/A

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

                            \[\leadsto {\left(\sqrt{x.re \cdot x.re + \color{blue}{x.im \cdot x.im}}\right)}^{y.re} \cdot \cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\right) \]
                          5. lower-hypot.f6483.2

                            \[\leadsto {\color{blue}{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}}^{y.re} \cdot \cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\right) \]
                        4. Applied rewrites83.2%

                          \[\leadsto \color{blue}{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}} \cdot \cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\right) \]
                      11. Recombined 4 regimes into one program.
                      12. Final simplification81.1%

                        \[\leadsto \begin{array}{l} \mathbf{if}\;y.re \leq -1 \cdot 10^{+157}:\\ \;\;\;\;1 \cdot {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\\ \mathbf{elif}\;y.re \leq -3.4 \cdot 10^{-18}:\\ \;\;\;\;\mathsf{fma}\left(\left(y.re \cdot y.re\right) \cdot -0.5, {\tan^{-1}_* \frac{x.im}{x.re}}^{2}, 1\right) \cdot {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\\ \mathbf{elif}\;y.re \leq 4.3 \cdot 10^{-23}:\\ \;\;\;\;e^{\left(-y.im\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \cos \left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im\right)\\ \mathbf{else}:\\ \;\;\;\;{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re} \cdot \cos \left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im\right)\\ \end{array} \]
                      13. Add Preprocessing

                      Alternative 5: 63.0% accurate, 1.3× speedup?

                      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y.im \leq -105000000000:\\ \;\;\;\;{\left(\mathsf{fma}\left(0.5, \frac{x.im \cdot x.im}{x.re}, x.re\right)\right)}^{y.re} \cdot 1\\ \mathbf{else}:\\ \;\;\;\;{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re} \cdot \cos \left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im\right)\\ \end{array} \end{array} \]
                      (FPCore (x.re x.im y.re y.im)
                       :precision binary64
                       (if (<= y.im -105000000000.0)
                         (* (pow (fma 0.5 (/ (* x.im x.im) x.re) x.re) y.re) 1.0)
                         (* (pow (hypot x.re x.im) y.re) (cos (* (log (hypot x.re x.im)) y.im)))))
                      double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
                      	double tmp;
                      	if (y_46_im <= -105000000000.0) {
                      		tmp = pow(fma(0.5, ((x_46_im * x_46_im) / x_46_re), x_46_re), y_46_re) * 1.0;
                      	} else {
                      		tmp = pow(hypot(x_46_re, x_46_im), y_46_re) * cos((log(hypot(x_46_re, x_46_im)) * y_46_im));
                      	}
                      	return tmp;
                      }
                      
                      function code(x_46_re, x_46_im, y_46_re, y_46_im)
                      	tmp = 0.0
                      	if (y_46_im <= -105000000000.0)
                      		tmp = Float64((fma(0.5, Float64(Float64(x_46_im * x_46_im) / x_46_re), x_46_re) ^ y_46_re) * 1.0);
                      	else
                      		tmp = Float64((hypot(x_46_re, x_46_im) ^ y_46_re) * cos(Float64(log(hypot(x_46_re, x_46_im)) * y_46_im)));
                      	end
                      	return tmp
                      end
                      
                      code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[y$46$im, -105000000000.0], N[(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] * 1.0), $MachinePrecision], N[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * N[Cos[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
                      
                      \begin{array}{l}
                      
                      \\
                      \begin{array}{l}
                      \mathbf{if}\;y.im \leq -105000000000:\\
                      \;\;\;\;{\left(\mathsf{fma}\left(0.5, \frac{x.im \cdot x.im}{x.re}, x.re\right)\right)}^{y.re} \cdot 1\\
                      
                      \mathbf{else}:\\
                      \;\;\;\;{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re} \cdot \cos \left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im\right)\\
                      
                      
                      \end{array}
                      \end{array}
                      
                      Derivation
                      1. Split input into 2 regimes
                      2. if y.im < -1.05e11

                        1. Initial program 38.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                          \[\leadsto {\left(x.im \cdot \left(1 + \frac{1}{2} \cdot \frac{{x.re}^{2}}{{x.im}^{2}}\right)\right)}^{y.re} \cdot \cos \left(\color{blue}{\tan^{-1}_* \frac{x.im}{x.re}} \cdot y.re\right) \]
                        7. Step-by-step derivation
                          1. Applied rewrites31.5%

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

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

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

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

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

                              if -1.05e11 < y.im

                              1. Initial program 39.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 inf

                                \[\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.im \cdot \left(\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right) + \frac{y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}}{y.im}\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 \cos \color{blue}{\left(\left(\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right) + \frac{y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}}{y.im}\right) \cdot y.im\right)} \]
                                2. 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(\left(\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right) + \frac{y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}}{y.im}\right) \cdot y.im\right)} \]
                                3. +-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 \cos \left(\color{blue}{\left(\frac{y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}}{y.im} + \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)} \cdot y.im\right) \]
                                4. associate-/l*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 \cos \left(\left(\color{blue}{y.re \cdot \frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.im}} + \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right) \cdot y.im\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 \cos \left(\color{blue}{\mathsf{fma}\left(y.re, \frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.im}, \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)} \cdot y.im\right) \]
                                6. 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 \left(\mathsf{fma}\left(y.re, \color{blue}{\frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.im}}, \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right) \cdot y.im\right) \]
                                7. lower-atan2.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 \left(\mathsf{fma}\left(y.re, \frac{\color{blue}{\tan^{-1}_* \frac{x.im}{x.re}}}{y.im}, \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right) \cdot y.im\right) \]
                                8. lower-log.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 \left(\mathsf{fma}\left(y.re, \frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.im}, \color{blue}{\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}\right) \cdot y.im\right) \]
                                9. +-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 \cos \left(\mathsf{fma}\left(y.re, \frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.im}, \log \left(\sqrt{\color{blue}{{x.re}^{2} + {x.im}^{2}}}\right)\right) \cdot y.im\right) \]
                                10. unpow2N/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 \left(\mathsf{fma}\left(y.re, \frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.im}, \log \left(\sqrt{\color{blue}{x.re \cdot x.re} + {x.im}^{2}}\right)\right) \cdot y.im\right) \]
                                11. unpow2N/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 \left(\mathsf{fma}\left(y.re, \frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.im}, \log \left(\sqrt{x.re \cdot x.re + \color{blue}{x.im \cdot x.im}}\right)\right) \cdot y.im\right) \]
                                12. lower-hypot.f6451.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(\mathsf{fma}\left(y.re, \frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.im}, \log \color{blue}{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}\right) \cdot y.im\right) \]
                              5. Applied rewrites51.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(\mathsf{fma}\left(y.re, \frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.im}, \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\right) \cdot y.im\right)} \]
                              6. Taylor expanded in y.re around -inf

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                \[\leadsto e^{-y.re \cdot \mathsf{fma}\left(y.im, \frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.re}, -\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\right)} \cdot \cos \left(y.im \cdot \color{blue}{\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}\right) \]
                              10. Step-by-step derivation
                                1. Applied rewrites84.9%

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

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

                                    \[\leadsto \color{blue}{{\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}} \cdot \cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\right) \]
                                  2. +-commutativeN/A

                                    \[\leadsto {\left(\sqrt{\color{blue}{{x.re}^{2} + {x.im}^{2}}}\right)}^{y.re} \cdot \cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\right) \]
                                  3. unpow2N/A

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

                                    \[\leadsto {\left(\sqrt{x.re \cdot x.re + \color{blue}{x.im \cdot x.im}}\right)}^{y.re} \cdot \cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\right) \]
                                  5. lower-hypot.f6472.2

                                    \[\leadsto {\color{blue}{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}}^{y.re} \cdot \cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\right) \]
                                4. Applied rewrites72.2%

                                  \[\leadsto \color{blue}{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}} \cdot \cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\right) \]
                              11. Recombined 2 regimes into one program.
                              12. Final simplification65.5%

                                \[\leadsto \begin{array}{l} \mathbf{if}\;y.im \leq -105000000000:\\ \;\;\;\;{\left(\mathsf{fma}\left(0.5, \frac{x.im \cdot x.im}{x.re}, x.re\right)\right)}^{y.re} \cdot 1\\ \mathbf{else}:\\ \;\;\;\;{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re} \cdot \cos \left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im\right)\\ \end{array} \]
                              13. Add Preprocessing

                              Alternative 6: 61.7% accurate, 1.9× speedup?

                              \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x.im \leq 10^{+230}:\\ \;\;\;\;1 \cdot {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\\ \mathbf{else}:\\ \;\;\;\;\cos \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \cdot {\left(\mathsf{fma}\left(0.5, \frac{-x.re}{-1} \cdot \frac{x.re}{x.im \cdot x.im}, 1\right) \cdot x.im\right)}^{y.re}\\ \end{array} \end{array} \]
                              (FPCore (x.re x.im y.re y.im)
                               :precision binary64
                               (if (<= x.im 1e+230)
                                 (* 1.0 (pow (hypot x.re x.im) y.re))
                                 (*
                                  (cos (* (atan2 x.im x.re) y.re))
                                  (pow
                                   (* (fma 0.5 (* (/ (- x.re) -1.0) (/ x.re (* x.im x.im))) 1.0) 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 <= 1e+230) {
                              		tmp = 1.0 * pow(hypot(x_46_re, x_46_im), y_46_re);
                              	} else {
                              		tmp = cos((atan2(x_46_im, x_46_re) * y_46_re)) * pow((fma(0.5, ((-x_46_re / -1.0) * (x_46_re / (x_46_im * x_46_im))), 1.0) * 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 <= 1e+230)
                              		tmp = Float64(1.0 * (hypot(x_46_re, x_46_im) ^ y_46_re));
                              	else
                              		tmp = Float64(cos(Float64(atan(x_46_im, x_46_re) * y_46_re)) * (Float64(fma(0.5, Float64(Float64(Float64(-x_46_re) / -1.0) * Float64(x_46_re / Float64(x_46_im * x_46_im))), 1.0) * 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[x$46$im, 1e+230], N[(1.0 * N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], N[(N[Cos[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]], $MachinePrecision] * N[Power[N[(N[(0.5 * N[(N[((-x$46$re) / -1.0), $MachinePrecision] * N[(x$46$re / N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision] * x$46$im), $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]]
                              
                              \begin{array}{l}
                              
                              \\
                              \begin{array}{l}
                              \mathbf{if}\;x.im \leq 10^{+230}:\\
                              \;\;\;\;1 \cdot {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\\
                              
                              \mathbf{else}:\\
                              \;\;\;\;\cos \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \cdot {\left(\mathsf{fma}\left(0.5, \frac{-x.re}{-1} \cdot \frac{x.re}{x.im \cdot x.im}, 1\right) \cdot x.im\right)}^{y.re}\\
                              
                              
                              \end{array}
                              \end{array}
                              
                              Derivation
                              1. Split input into 2 regimes
                              2. if x.im < 1.0000000000000001e230

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

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

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

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

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

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

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

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

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

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

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

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

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

                                  \[\leadsto {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re} \cdot 1 \]
                                7. Step-by-step derivation
                                  1. Applied rewrites63.7%

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

                                  if 1.0000000000000001e230 < x.im

                                  1. Initial program 0.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                    \[\leadsto {\left(x.im \cdot \left(1 + \frac{1}{2} \cdot \frac{{x.re}^{2}}{{x.im}^{2}}\right)\right)}^{y.re} \cdot \cos \left(\color{blue}{\tan^{-1}_* \frac{x.im}{x.re}} \cdot y.re\right) \]
                                  7. Step-by-step derivation
                                    1. Applied rewrites54.6%

                                      \[\leadsto {\left(x.im \cdot \mathsf{fma}\left(0.5, \frac{x.re \cdot x.re}{x.im \cdot x.im}, 1\right)\right)}^{y.re} \cdot \cos \left(\color{blue}{\tan^{-1}_* \frac{x.im}{x.re}} \cdot y.re\right) \]
                                    2. Step-by-step derivation
                                      1. Applied rewrites77.3%

                                        \[\leadsto {\left(x.im \cdot \mathsf{fma}\left(0.5, \frac{x.re}{-1} \cdot \frac{-x.re}{x.im \cdot x.im}, 1\right)\right)}^{y.re} \cdot \cos \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \]
                                    3. Recombined 2 regimes into one program.
                                    4. Final simplification64.8%

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

                                    Alternative 7: 61.6% accurate, 2.1× speedup?

                                    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x.im \leq 5 \cdot 10^{+209}:\\ \;\;\;\;1 \cdot {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\\ \mathbf{else}:\\ \;\;\;\;{x.im}^{y.re} \cdot \cos \left(\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
                                     (if (<= x.im 5e+209)
                                       (* 1.0 (pow (hypot x.re x.im) y.re))
                                       (* (pow x.im y.re) (cos (* (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 tmp;
                                    	if (x_46_im <= 5e+209) {
                                    		tmp = 1.0 * pow(hypot(x_46_re, x_46_im), y_46_re);
                                    	} else {
                                    		tmp = pow(x_46_im, y_46_re) * cos((atan2(x_46_im, x_46_re) * y_46_re));
                                    	}
                                    	return tmp;
                                    }
                                    
                                    public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
                                    	double tmp;
                                    	if (x_46_im <= 5e+209) {
                                    		tmp = 1.0 * Math.pow(Math.hypot(x_46_re, x_46_im), y_46_re);
                                    	} else {
                                    		tmp = Math.pow(x_46_im, y_46_re) * Math.cos((Math.atan2(x_46_im, 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_im <= 5e+209:
                                    		tmp = 1.0 * math.pow(math.hypot(x_46_re, x_46_im), y_46_re)
                                    	else:
                                    		tmp = math.pow(x_46_im, y_46_re) * math.cos((math.atan2(x_46_im, 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_im <= 5e+209)
                                    		tmp = Float64(1.0 * (hypot(x_46_re, x_46_im) ^ y_46_re));
                                    	else
                                    		tmp = Float64((x_46_im ^ y_46_re) * cos(Float64(atan(x_46_im, 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_im <= 5e+209)
                                    		tmp = 1.0 * (hypot(x_46_re, x_46_im) ^ y_46_re);
                                    	else
                                    		tmp = (x_46_im ^ y_46_re) * cos((atan2(x_46_im, 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$im, 5e+209], N[(1.0 * N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], N[(N[Power[x$46$im, y$46$re], $MachinePrecision] * N[Cos[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
                                    
                                    \begin{array}{l}
                                    
                                    \\
                                    \begin{array}{l}
                                    \mathbf{if}\;x.im \leq 5 \cdot 10^{+209}:\\
                                    \;\;\;\;1 \cdot {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\\
                                    
                                    \mathbf{else}:\\
                                    \;\;\;\;{x.im}^{y.re} \cdot \cos \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\\
                                    
                                    
                                    \end{array}
                                    \end{array}
                                    
                                    Derivation
                                    1. Split input into 2 regimes
                                    2. if x.im < 4.99999999999999964e209

                                      1. Initial program 43.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                        \[\leadsto {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re} \cdot 1 \]
                                      7. Step-by-step derivation
                                        1. Applied rewrites63.8%

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

                                        if 4.99999999999999964e209 < x.im

                                        1. Initial program 0.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                          \[\leadsto {x.im}^{y.re} \cdot \cos \color{blue}{\left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)} \]
                                        7. Step-by-step derivation
                                          1. Applied rewrites75.1%

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

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

                                        Alternative 8: 58.5% accurate, 3.1× speedup?

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

                                          1. Initial program 41.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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

                                            \[\leadsto {\left(x.im \cdot \left(1 + \frac{1}{2} \cdot \frac{{x.re}^{2}}{{x.im}^{2}}\right)\right)}^{y.re} \cdot \cos \left(\color{blue}{\tan^{-1}_* \frac{x.im}{x.re}} \cdot y.re\right) \]
                                          7. Step-by-step derivation
                                            1. Applied rewrites64.4%

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

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

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

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

                                                if -6.20000000000000027e-5 < y.re < 0.00279999999999999997

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                  \[\leadsto 1 + \color{blue}{y.re \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)} \]
                                                7. Step-by-step derivation
                                                  1. Applied rewrites46.4%

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

                                                  if 0.00279999999999999997 < y.re

                                                  1. Initial program 33.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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

                                                    \[\leadsto {\left(x.im \cdot \left(1 + \frac{1}{2} \cdot \frac{{x.re}^{2}}{{x.im}^{2}}\right)\right)}^{y.re} \cdot \cos \left(\color{blue}{\tan^{-1}_* \frac{x.im}{x.re}} \cdot y.re\right) \]
                                                  7. Step-by-step derivation
                                                    1. Applied rewrites42.5%

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

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

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

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

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

                                                        \[\leadsto \begin{array}{l} \mathbf{if}\;y.re \leq -6.2 \cdot 10^{-5}:\\ \;\;\;\;{\left(\mathsf{fma}\left(0.5, \frac{-x.re}{-1} \cdot \frac{x.re}{x.im \cdot x.im}, 1\right) \cdot x.im\right)}^{y.re} \cdot 1\\ \mathbf{elif}\;y.re \leq 0.0028:\\ \;\;\;\;\mathsf{fma}\left(y.re, \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), 1\right)\\ \mathbf{else}:\\ \;\;\;\;{\left(\mathsf{fma}\left(\frac{0.5}{x.re}, \frac{x.im \cdot x.im}{x.re}, 1\right) \cdot x.re\right)}^{y.re} \cdot 1\\ \end{array} \]
                                                      6. Add Preprocessing

                                                      Alternative 9: 62.7% accurate, 3.2× speedup?

                                                      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y.im \leq -19000:\\ \;\;\;\;{\left(\mathsf{fma}\left(0.5, \frac{x.im \cdot x.im}{x.re}, x.re\right)\right)}^{y.re} \cdot 1\\ \mathbf{else}:\\ \;\;\;\;1 \cdot {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\\ \end{array} \end{array} \]
                                                      (FPCore (x.re x.im y.re y.im)
                                                       :precision binary64
                                                       (if (<= y.im -19000.0)
                                                         (* (pow (fma 0.5 (/ (* x.im x.im) x.re) x.re) y.re) 1.0)
                                                         (* 1.0 (pow (hypot x.re x.im) y.re))))
                                                      double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
                                                      	double tmp;
                                                      	if (y_46_im <= -19000.0) {
                                                      		tmp = pow(fma(0.5, ((x_46_im * x_46_im) / x_46_re), x_46_re), y_46_re) * 1.0;
                                                      	} else {
                                                      		tmp = 1.0 * pow(hypot(x_46_re, x_46_im), y_46_re);
                                                      	}
                                                      	return tmp;
                                                      }
                                                      
                                                      function code(x_46_re, x_46_im, y_46_re, y_46_im)
                                                      	tmp = 0.0
                                                      	if (y_46_im <= -19000.0)
                                                      		tmp = Float64((fma(0.5, Float64(Float64(x_46_im * x_46_im) / x_46_re), x_46_re) ^ y_46_re) * 1.0);
                                                      	else
                                                      		tmp = Float64(1.0 * (hypot(x_46_re, 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$im, -19000.0], N[(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] * 1.0), $MachinePrecision], N[(1.0 * N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]]
                                                      
                                                      \begin{array}{l}
                                                      
                                                      \\
                                                      \begin{array}{l}
                                                      \mathbf{if}\;y.im \leq -19000:\\
                                                      \;\;\;\;{\left(\mathsf{fma}\left(0.5, \frac{x.im \cdot x.im}{x.re}, x.re\right)\right)}^{y.re} \cdot 1\\
                                                      
                                                      \mathbf{else}:\\
                                                      \;\;\;\;1 \cdot {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\\
                                                      
                                                      
                                                      \end{array}
                                                      \end{array}
                                                      
                                                      Derivation
                                                      1. Split input into 2 regimes
                                                      2. if y.im < -19000

                                                        1. Initial program 38.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                          \[\leadsto {\left(x.im \cdot \left(1 + \frac{1}{2} \cdot \frac{{x.re}^{2}}{{x.im}^{2}}\right)\right)}^{y.re} \cdot \cos \left(\color{blue}{\tan^{-1}_* \frac{x.im}{x.re}} \cdot y.re\right) \]
                                                        7. Step-by-step derivation
                                                          1. Applied rewrites31.5%

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

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

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

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

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

                                                              if -19000 < y.im

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                  \[\leadsto {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re} \cdot 1 \]
                                                              8. Recombined 2 regimes into one program.
                                                              9. Final simplification64.8%

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

                                                              Alternative 10: 58.0% accurate, 4.3× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                  \[\leadsto {\left(x.im \cdot \left(1 + \frac{1}{2} \cdot \frac{{x.re}^{2}}{{x.im}^{2}}\right)\right)}^{y.re} \cdot \cos \left(\color{blue}{\tan^{-1}_* \frac{x.im}{x.re}} \cdot y.re\right) \]
                                                                7. Step-by-step derivation
                                                                  1. Applied rewrites50.3%

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

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

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

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

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

                                                                      if -8.5000000000000004e-58 < y.re < 0.00279999999999999997

                                                                      1. Initial program 41.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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

                                                                        \[\leadsto 1 \]
                                                                      7. Step-by-step derivation
                                                                        1. Applied rewrites46.4%

                                                                          \[\leadsto 1 \]
                                                                      8. Recombined 2 regimes into one program.
                                                                      9. Final simplification59.3%

                                                                        \[\leadsto \begin{array}{l} \mathbf{if}\;y.re \leq -8.5 \cdot 10^{-58}:\\ \;\;\;\;{\left(\mathsf{fma}\left(\frac{0.5}{x.re}, \frac{x.im \cdot x.im}{x.re}, 1\right) \cdot x.re\right)}^{y.re} \cdot 1\\ \mathbf{elif}\;y.re \leq 0.0028:\\ \;\;\;\;1\\ \mathbf{else}:\\ \;\;\;\;{\left(\mathsf{fma}\left(\frac{0.5}{x.re}, \frac{x.im \cdot x.im}{x.re}, 1\right) \cdot x.re\right)}^{y.re} \cdot 1\\ \end{array} \]
                                                                      10. Add Preprocessing

                                                                      Alternative 11: 58.8% accurate, 4.8× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                          \[\leadsto {\left(x.im \cdot \left(1 + \frac{1}{2} \cdot \frac{{x.re}^{2}}{{x.im}^{2}}\right)\right)}^{y.re} \cdot \cos \left(\color{blue}{\tan^{-1}_* \frac{x.im}{x.re}} \cdot y.re\right) \]
                                                                        7. Step-by-step derivation
                                                                          1. Applied rewrites52.7%

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

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

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

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

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

                                                                              if -7.5999999999999996e-11 < y.re < 0.00279999999999999997

                                                                              1. Initial program 41.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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                              Alternative 12: 52.3% accurate, 5.4× speedup?

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

                                                                                1. Initial program 35.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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                  \[\leadsto {\left(x.im \cdot \left(1 + \frac{1}{2} \cdot \frac{{x.re}^{2}}{{x.im}^{2}}\right)\right)}^{y.re} \cdot \cos \left(\color{blue}{\tan^{-1}_* \frac{x.im}{x.re}} \cdot y.re\right) \]
                                                                                7. Step-by-step derivation
                                                                                  1. Applied rewrites51.0%

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

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

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

                                                                                      \[\leadsto {x.im}^{y.re} \cdot 1 \]
                                                                                    3. Step-by-step derivation
                                                                                      1. Applied rewrites63.4%

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

                                                                                      if -1.01999999999999999e102 < y.re < -1.15e-9

                                                                                      1. Initial program 52.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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                        \[\leadsto {\left(x.im \cdot \left(1 + \frac{1}{2} \cdot \frac{{x.re}^{2}}{{x.im}^{2}}\right)\right)}^{y.re} \cdot \cos \left(\color{blue}{\tan^{-1}_* \frac{x.im}{x.re}} \cdot y.re\right) \]
                                                                                      7. Step-by-step derivation
                                                                                        1. Applied rewrites61.3%

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

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

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

                                                                                            \[\leadsto {x.re}^{y.re} \cdot 1 \]
                                                                                          3. Step-by-step derivation
                                                                                            1. Applied rewrites62.3%

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

                                                                                            if -1.15e-9 < y.re < 0.23000000000000001

                                                                                            1. Initial program 41.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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                            Alternative 13: 55.1% accurate, 5.7× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                                \[\leadsto {\left(x.im \cdot \left(1 + \frac{1}{2} \cdot \frac{{x.re}^{2}}{{x.im}^{2}}\right)\right)}^{y.re} \cdot \cos \left(\color{blue}{\tan^{-1}_* \frac{x.im}{x.re}} \cdot y.re\right) \]
                                                                                              7. Step-by-step derivation
                                                                                                1. Applied rewrites25.0%

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

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

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

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

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

                                                                                                    if -1.20000000000000007e-105 < x.im < 2.5000000000000001e-26

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                                      \[\leadsto {\left(x.im \cdot \left(1 + \frac{1}{2} \cdot \frac{{x.re}^{2}}{{x.im}^{2}}\right)\right)}^{y.re} \cdot \cos \left(\color{blue}{\tan^{-1}_* \frac{x.im}{x.re}} \cdot y.re\right) \]
                                                                                                    7. Step-by-step derivation
                                                                                                      1. Applied rewrites37.4%

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

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

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

                                                                                                          \[\leadsto {x.re}^{y.re} \cdot 1 \]
                                                                                                        3. Step-by-step derivation
                                                                                                          1. Applied rewrites55.4%

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

                                                                                                          if 2.5000000000000001e-26 < x.im

                                                                                                          1. Initial program 33.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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                                            \[\leadsto {\left(x.im \cdot \left(1 + \frac{1}{2} \cdot \frac{{x.re}^{2}}{{x.im}^{2}}\right)\right)}^{y.re} \cdot \cos \left(\color{blue}{\tan^{-1}_* \frac{x.im}{x.re}} \cdot y.re\right) \]
                                                                                                          7. Step-by-step derivation
                                                                                                            1. Applied rewrites49.4%

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

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

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

                                                                                                                \[\leadsto {x.im}^{y.re} \cdot 1 \]
                                                                                                              3. Step-by-step derivation
                                                                                                                1. Applied rewrites56.6%

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

                                                                                                              Alternative 14: 52.3% accurate, 5.7× speedup?

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

                                                                                                                1. Initial program 37.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                                                  \[\leadsto {\left(x.im \cdot \left(1 + \frac{1}{2} \cdot \frac{{x.re}^{2}}{{x.im}^{2}}\right)\right)}^{y.re} \cdot \cos \left(\color{blue}{\tan^{-1}_* \frac{x.im}{x.re}} \cdot y.re\right) \]
                                                                                                                7. Step-by-step derivation
                                                                                                                  1. Applied rewrites53.1%

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

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

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

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

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

                                                                                                                      if -6.9000000000000001e-12 < y.re < 0.23000000000000001

                                                                                                                      1. Initial program 41.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                                                      Alternative 15: 25.5% 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 39.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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                                                        \[\leadsto 1 \]
                                                                                                                      7. Step-by-step derivation
                                                                                                                        1. Applied rewrites22.4%

                                                                                                                          \[\leadsto 1 \]
                                                                                                                        2. Add Preprocessing

                                                                                                                        Reproduce

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