powComplex, real part

Percentage Accurate: 40.4% → 80.0%
Time: 26.8s
Alternatives: 13
Speedup: 1.6×

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

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

Initial Program: 40.4% accurate, 1.0× speedup?

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

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

Alternative 1: 80.0% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\ e^{\mathsf{fma}\left(t_0, y.re, \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)\right)} \cdot \cos \left(\mathsf{fma}\left(t_0, y.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \end{array} \end{array} \]
(FPCore (x.re x.im y.re y.im)
 :precision binary64
 (let* ((t_0 (log (hypot x.re x.im))))
   (*
    (exp (fma t_0 y.re (* (atan2 x.im x.re) (- y.im))))
    (cos (fma t_0 y.im (* y.re (atan2 x.im x.re)))))))
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));
	return exp(fma(t_0, y_46_re, (atan2(x_46_im, x_46_re) * -y_46_im))) * cos(fma(t_0, y_46_im, (y_46_re * atan2(x_46_im, x_46_re))));
}
function code(x_46_re, x_46_im, y_46_re, y_46_im)
	t_0 = log(hypot(x_46_re, x_46_im))
	return Float64(exp(fma(t_0, y_46_re, Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))) * cos(fma(t_0, y_46_im, Float64(y_46_re * atan(x_46_im, x_46_re)))))
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]}, N[(N[Exp[N[(t$95$0 * y$46$re + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Cos[N[(t$95$0 * y$46$im + N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
e^{\mathsf{fma}\left(t_0, y.re, \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)\right)} \cdot \cos \left(\mathsf{fma}\left(t_0, y.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)
\end{array}
\end{array}
Derivation
  1. Initial program 40.1%

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

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

      \[\leadsto e^{\mathsf{fma}\left(\log \color{blue}{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}, y.re, -\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\right)} \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) \]
    3. distribute-rgt-neg-out40.1%

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

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

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

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

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

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

Alternative 2: 79.3% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;y.re \leq 6.4 \cdot 10^{-6}:\\
\;\;\;\;\cos \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, t_0\right)\right) \cdot \frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{{\left(e^{y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}}\\

\mathbf{else}:\\
\;\;\;\;{\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re} \cdot \cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\


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

    1. Initial program 42.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. Taylor expanded in y.im around 0 85.0%

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

    if -2.2000000000000002 < y.re < 6.3999999999999997e-6

    1. Initial program 36.5%

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

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

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

        \[\leadsto \frac{\color{blue}{\left(e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re} \cdot 1\right)} \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)}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}} \]
      4. metadata-eval36.5%

        \[\leadsto \frac{\left(e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re} \cdot \color{blue}{\left(-1 \cdot -1\right)}\right) \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)}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}} \]
      5. associate-*l/36.5%

        \[\leadsto \color{blue}{\frac{e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re} \cdot \left(-1 \cdot -1\right)}{e^{\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)} \]
    3. Simplified83.0%

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

    if 6.3999999999999997e-6 < y.re

    1. Initial program 43.5%

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

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

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

        \[\leadsto \frac{\color{blue}{\left(e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re} \cdot 1\right)} \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)}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}} \]
      4. metadata-eval36.2%

        \[\leadsto \frac{\left(e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re} \cdot \color{blue}{\left(-1 \cdot -1\right)}\right) \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)}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}} \]
      5. associate-*l/36.2%

        \[\leadsto \color{blue}{\frac{e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re} \cdot \left(-1 \cdot -1\right)}{e^{\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)} \]
    3. Simplified58.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\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.im, x.re\right)\right)\right) \]
  3. Recombined 3 regimes into one program.
  4. Final simplification80.0%

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

Alternative 3: 79.1% accurate, 1.2× speedup?

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

\\
\begin{array}{l}
t_0 := \cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\mathbf{if}\;y.re \leq -1.35 \cdot 10^{-7}:\\
\;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\

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

\mathbf{else}:\\
\;\;\;\;{\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re} \cdot t_0\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y.re < -1.35000000000000004e-7

    1. Initial program 42.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. Taylor expanded in y.im around 0 85.0%

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

    if -1.35000000000000004e-7 < y.re < 6.3999999999999997e-6

    1. Initial program 36.5%

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

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

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

        \[\leadsto \frac{\color{blue}{\left(e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re} \cdot 1\right)} \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)}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}} \]
      4. metadata-eval36.5%

        \[\leadsto \frac{\left(e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re} \cdot \color{blue}{\left(-1 \cdot -1\right)}\right) \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)}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}} \]
      5. associate-*l/36.5%

        \[\leadsto \color{blue}{\frac{e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re} \cdot \left(-1 \cdot -1\right)}{e^{\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)} \]
    3. Simplified79.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{1}{e^{{1}^{0.3333333333333333} \cdot \left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}}} \cdot \cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \]
    12. Step-by-step derivation
      1. rec-exp83.0%

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

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

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

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

    if 6.3999999999999997e-6 < y.re

    1. Initial program 43.5%

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

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

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

        \[\leadsto \frac{\color{blue}{\left(e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re} \cdot 1\right)} \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)}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}} \]
      4. metadata-eval36.2%

        \[\leadsto \frac{\left(e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re} \cdot \color{blue}{\left(-1 \cdot -1\right)}\right) \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)}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}} \]
      5. associate-*l/36.2%

        \[\leadsto \color{blue}{\frac{e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re} \cdot \left(-1 \cdot -1\right)}{e^{\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)} \]
    3. Simplified58.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\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.im, x.re\right)\right)\right) \]
  3. Recombined 3 regimes into one program.
  4. Final simplification80.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y.re \leq -1.35 \cdot 10^{-7}:\\ \;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\ \mathbf{elif}\;y.re \leq 6.4 \cdot 10^{-6}:\\ \;\;\;\;\cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\ \mathbf{else}:\\ \;\;\;\;{\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re} \cdot \cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\ \end{array} \]

Alternative 4: 77.8% accurate, 1.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y.re \leq -9 \cdot 10^{-9} \lor \neg \left(y.re \leq 2.4 \cdot 10^{-15}\right):\\ \;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\ \mathbf{else}:\\ \;\;\;\;\cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\ \end{array} \end{array} \]
(FPCore (x.re x.im y.re y.im)
 :precision binary64
 (if (or (<= y.re -9e-9) (not (<= y.re 2.4e-15)))
   (*
    (exp
     (-
      (* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
      (* (atan2 x.im x.re) y.im)))
    (cos (* y.re (atan2 x.im x.re))))
   (*
    (cos (* y.im (log (hypot x.im x.re))))
    (exp (* (atan2 x.im x.re) (- 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_re <= -9e-9) || !(y_46_re <= 2.4e-15)) {
		tmp = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (atan2(x_46_im, x_46_re) * y_46_im))) * cos((y_46_re * atan2(x_46_im, x_46_re)));
	} else {
		tmp = cos((y_46_im * log(hypot(x_46_im, x_46_re)))) * exp((atan2(x_46_im, x_46_re) * -y_46_im));
	}
	return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
	double tmp;
	if ((y_46_re <= -9e-9) || !(y_46_re <= 2.4e-15)) {
		tmp = Math.exp(((y_46_re * Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (Math.atan2(x_46_im, x_46_re) * y_46_im))) * Math.cos((y_46_re * Math.atan2(x_46_im, x_46_re)));
	} else {
		tmp = Math.cos((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re)))) * Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im));
	}
	return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im):
	tmp = 0
	if (y_46_re <= -9e-9) or not (y_46_re <= 2.4e-15):
		tmp = math.exp(((y_46_re * math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (math.atan2(x_46_im, x_46_re) * y_46_im))) * math.cos((y_46_re * math.atan2(x_46_im, x_46_re)))
	else:
		tmp = math.cos((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) * math.exp((math.atan2(x_46_im, x_46_re) * -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_re <= -9e-9) || !(y_46_re <= 2.4e-15))
		tmp = Float64(exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * cos(Float64(y_46_re * atan(x_46_im, x_46_re))));
	else
		tmp = Float64(cos(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))));
	end
	return tmp
end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im)
	tmp = 0.0;
	if ((y_46_re <= -9e-9) || ~((y_46_re <= 2.4e-15)))
		tmp = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (atan2(x_46_im, x_46_re) * y_46_im))) * cos((y_46_re * atan2(x_46_im, x_46_re)));
	else
		tmp = cos((y_46_im * log(hypot(x_46_im, x_46_re)))) * exp((atan2(x_46_im, x_46_re) * -y_46_im));
	end
	tmp_2 = tmp;
end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[Or[LessEqual[y$46$re, -9e-9], N[Not[LessEqual[y$46$re, 2.4e-15]], $MachinePrecision]], N[(N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Cos[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Cos[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

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

\mathbf{else}:\\
\;\;\;\;\cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y.re < -8.99999999999999953e-9 or 2.39999999999999995e-15 < y.re

    1. Initial program 43.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. Taylor expanded in y.im around 0 75.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 \color{blue}{\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]

    if -8.99999999999999953e-9 < y.re < 2.39999999999999995e-15

    1. Initial program 35.4%

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

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

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

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

        \[\leadsto \frac{\left(e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re} \cdot \color{blue}{\left(-1 \cdot -1\right)}\right) \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)}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}} \]
      5. associate-*l/35.4%

        \[\leadsto \color{blue}{\frac{e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re} \cdot \left(-1 \cdot -1\right)}{e^{\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)} \]
    3. Simplified79.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{1}{e^{{1}^{0.3333333333333333} \cdot \left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}}} \cdot \cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \]
    12. Step-by-step derivation
      1. rec-exp82.8%

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

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

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

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

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

Alternative 5: 72.8% accurate, 1.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\ t_1 := \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\ t_2 := t_0 \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right) - y.re \cdot \log \left(\frac{-1}{x.im}\right)}\\ t_3 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\ t_4 := e^{y.re \cdot \log x.im - t_3}\\ \mathbf{if}\;x.im \leq -1 \cdot 10^{-14}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x.im \leq -3 \cdot 10^{-147}:\\ \;\;\;\;t_1 \cdot e^{y.re \cdot \log \left(-0.5 \cdot \left(x.re \cdot \frac{x.re}{x.im}\right) - x.im\right) - t_3}\\ \mathbf{elif}\;x.im \leq -2 \cdot 10^{-310}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x.im \leq 4 \cdot 10^{+75}:\\ \;\;\;\;t_1 \cdot t_4\\ \mathbf{else}:\\ \;\;\;\;t_0 \cdot t_4\\ \end{array} \end{array} \]
(FPCore (x.re x.im y.re y.im)
 :precision binary64
 (let* ((t_0 (cos (* y.im (log (hypot x.im x.re)))))
        (t_1 (cos (* y.re (atan2 x.im x.re))))
        (t_2
         (*
          t_0
          (exp
           (- (* (atan2 x.im x.re) (- y.im)) (* y.re (log (/ -1.0 x.im)))))))
        (t_3 (* (atan2 x.im x.re) y.im))
        (t_4 (exp (- (* y.re (log x.im)) t_3))))
   (if (<= x.im -1e-14)
     t_2
     (if (<= x.im -3e-147)
       (*
        t_1
        (exp (- (* y.re (log (- (* -0.5 (* x.re (/ x.re x.im))) x.im))) t_3)))
       (if (<= x.im -2e-310)
         t_2
         (if (<= x.im 4e+75) (* t_1 t_4) (* t_0 t_4)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
	double t_0 = cos((y_46_im * log(hypot(x_46_im, x_46_re))));
	double t_1 = cos((y_46_re * atan2(x_46_im, x_46_re)));
	double t_2 = t_0 * exp(((atan2(x_46_im, x_46_re) * -y_46_im) - (y_46_re * log((-1.0 / x_46_im)))));
	double t_3 = atan2(x_46_im, x_46_re) * y_46_im;
	double t_4 = exp(((y_46_re * log(x_46_im)) - t_3));
	double tmp;
	if (x_46_im <= -1e-14) {
		tmp = t_2;
	} else if (x_46_im <= -3e-147) {
		tmp = t_1 * exp(((y_46_re * log(((-0.5 * (x_46_re * (x_46_re / x_46_im))) - x_46_im))) - t_3));
	} else if (x_46_im <= -2e-310) {
		tmp = t_2;
	} else if (x_46_im <= 4e+75) {
		tmp = t_1 * t_4;
	} else {
		tmp = t_0 * t_4;
	}
	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((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re))));
	double t_1 = Math.cos((y_46_re * Math.atan2(x_46_im, x_46_re)));
	double t_2 = t_0 * Math.exp(((Math.atan2(x_46_im, x_46_re) * -y_46_im) - (y_46_re * Math.log((-1.0 / x_46_im)))));
	double t_3 = Math.atan2(x_46_im, x_46_re) * y_46_im;
	double t_4 = Math.exp(((y_46_re * Math.log(x_46_im)) - t_3));
	double tmp;
	if (x_46_im <= -1e-14) {
		tmp = t_2;
	} else if (x_46_im <= -3e-147) {
		tmp = t_1 * Math.exp(((y_46_re * Math.log(((-0.5 * (x_46_re * (x_46_re / x_46_im))) - x_46_im))) - t_3));
	} else if (x_46_im <= -2e-310) {
		tmp = t_2;
	} else if (x_46_im <= 4e+75) {
		tmp = t_1 * t_4;
	} else {
		tmp = t_0 * t_4;
	}
	return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im):
	t_0 = math.cos((y_46_im * math.log(math.hypot(x_46_im, x_46_re))))
	t_1 = math.cos((y_46_re * math.atan2(x_46_im, x_46_re)))
	t_2 = t_0 * math.exp(((math.atan2(x_46_im, x_46_re) * -y_46_im) - (y_46_re * math.log((-1.0 / x_46_im)))))
	t_3 = math.atan2(x_46_im, x_46_re) * y_46_im
	t_4 = math.exp(((y_46_re * math.log(x_46_im)) - t_3))
	tmp = 0
	if x_46_im <= -1e-14:
		tmp = t_2
	elif x_46_im <= -3e-147:
		tmp = t_1 * math.exp(((y_46_re * math.log(((-0.5 * (x_46_re * (x_46_re / x_46_im))) - x_46_im))) - t_3))
	elif x_46_im <= -2e-310:
		tmp = t_2
	elif x_46_im <= 4e+75:
		tmp = t_1 * t_4
	else:
		tmp = t_0 * t_4
	return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im)
	t_0 = cos(Float64(y_46_im * log(hypot(x_46_im, x_46_re))))
	t_1 = cos(Float64(y_46_re * atan(x_46_im, x_46_re)))
	t_2 = Float64(t_0 * exp(Float64(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)) - Float64(y_46_re * log(Float64(-1.0 / x_46_im))))))
	t_3 = Float64(atan(x_46_im, x_46_re) * y_46_im)
	t_4 = exp(Float64(Float64(y_46_re * log(x_46_im)) - t_3))
	tmp = 0.0
	if (x_46_im <= -1e-14)
		tmp = t_2;
	elseif (x_46_im <= -3e-147)
		tmp = Float64(t_1 * exp(Float64(Float64(y_46_re * log(Float64(Float64(-0.5 * Float64(x_46_re * Float64(x_46_re / x_46_im))) - x_46_im))) - t_3)));
	elseif (x_46_im <= -2e-310)
		tmp = t_2;
	elseif (x_46_im <= 4e+75)
		tmp = Float64(t_1 * t_4);
	else
		tmp = Float64(t_0 * t_4);
	end
	return tmp
end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im)
	t_0 = cos((y_46_im * log(hypot(x_46_im, x_46_re))));
	t_1 = cos((y_46_re * atan2(x_46_im, x_46_re)));
	t_2 = t_0 * exp(((atan2(x_46_im, x_46_re) * -y_46_im) - (y_46_re * log((-1.0 / x_46_im)))));
	t_3 = atan2(x_46_im, x_46_re) * y_46_im;
	t_4 = exp(((y_46_re * log(x_46_im)) - t_3));
	tmp = 0.0;
	if (x_46_im <= -1e-14)
		tmp = t_2;
	elseif (x_46_im <= -3e-147)
		tmp = t_1 * exp(((y_46_re * log(((-0.5 * (x_46_re * (x_46_re / x_46_im))) - x_46_im))) - t_3));
	elseif (x_46_im <= -2e-310)
		tmp = t_2;
	elseif (x_46_im <= 4e+75)
		tmp = t_1 * t_4;
	else
		tmp = t_0 * t_4;
	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[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[Cos[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(t$95$0 * N[Exp[N[(N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision] - N[(y$46$re * N[Log[N[(-1.0 / x$46$im), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, Block[{t$95$4 = N[Exp[N[(N[(y$46$re * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision] - t$95$3), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[x$46$im, -1e-14], t$95$2, If[LessEqual[x$46$im, -3e-147], N[(t$95$1 * N[Exp[N[(N[(y$46$re * N[Log[N[(N[(-0.5 * N[(x$46$re * N[(x$46$re / x$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x$46$im), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$3), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$im, -2e-310], t$95$2, If[LessEqual[x$46$im, 4e+75], N[(t$95$1 * t$95$4), $MachinePrecision], N[(t$95$0 * t$95$4), $MachinePrecision]]]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
t_1 := \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
t_2 := t_0 \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right) - y.re \cdot \log \left(\frac{-1}{x.im}\right)}\\
t_3 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_4 := e^{y.re \cdot \log x.im - t_3}\\
\mathbf{if}\;x.im \leq -1 \cdot 10^{-14}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;x.im \leq -3 \cdot 10^{-147}:\\
\;\;\;\;t_1 \cdot e^{y.re \cdot \log \left(-0.5 \cdot \left(x.re \cdot \frac{x.re}{x.im}\right) - x.im\right) - t_3}\\

\mathbf{elif}\;x.im \leq -2 \cdot 10^{-310}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;x.im \leq 4 \cdot 10^{+75}:\\
\;\;\;\;t_1 \cdot t_4\\

\mathbf{else}:\\
\;\;\;\;t_0 \cdot t_4\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if x.im < -9.99999999999999999e-15 or -3.0000000000000002e-147 < x.im < -1.999999999999994e-310

    1. Initial program 42.8%

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

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

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

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

        \[\leadsto \frac{\left(e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re} \cdot \color{blue}{\left(-1 \cdot -1\right)}\right) \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)}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}} \]
      5. associate-*l/40.0%

        \[\leadsto \color{blue}{\frac{e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re} \cdot \left(-1 \cdot -1\right)}{e^{\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)} \]
    3. Simplified77.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{e^{-1 \cdot \left(y.re \cdot \log \left(\frac{-1}{x.im}\right)\right)}}{e^{{1}^{0.3333333333333333} \cdot \left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}}} \cdot \cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \]
    12. Step-by-step derivation
      1. div-exp82.4%

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

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

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

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

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

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

    if -9.99999999999999999e-15 < x.im < -3.0000000000000002e-147

    1. Initial program 70.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. Taylor expanded in y.im around 0 83.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 \color{blue}{\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
    3. Taylor expanded in x.im around -inf 79.3%

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

        \[\leadsto e^{\log \left(-1 \cdot x.im + -0.5 \cdot \frac{\color{blue}{x.re \cdot x.re}}{x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
      2. *-un-lft-identity79.3%

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

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

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

    if -1.999999999999994e-310 < x.im < 3.99999999999999971e75

    1. Initial program 44.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. Taylor expanded in y.im around 0 60.2%

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

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

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

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

    if 3.99999999999999971e75 < x.im

    1. Initial program 12.2%

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

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

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

        \[\leadsto \frac{\color{blue}{\left(e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re} \cdot 1\right)} \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)}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}} \]
      4. metadata-eval8.2%

        \[\leadsto \frac{\left(e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re} \cdot \color{blue}{\left(-1 \cdot -1\right)}\right) \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)}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}} \]
      5. associate-*l/8.2%

        \[\leadsto \color{blue}{\frac{e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re} \cdot \left(-1 \cdot -1\right)}{e^{\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)} \]
    3. Simplified67.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x.im \leq -1 \cdot 10^{-14}:\\ \;\;\;\;\cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right) - y.re \cdot \log \left(\frac{-1}{x.im}\right)}\\ \mathbf{elif}\;x.im \leq -3 \cdot 10^{-147}:\\ \;\;\;\;\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot e^{y.re \cdot \log \left(-0.5 \cdot \left(x.re \cdot \frac{x.re}{x.im}\right) - x.im\right) - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\ \mathbf{elif}\;x.im \leq -2 \cdot 10^{-310}:\\ \;\;\;\;\cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right) - y.re \cdot \log \left(\frac{-1}{x.im}\right)}\\ \mathbf{elif}\;x.im \leq 4 \cdot 10^{+75}:\\ \;\;\;\;\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot e^{y.re \cdot \log x.im - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\ \mathbf{else}:\\ \;\;\;\;\cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \cdot e^{y.re \cdot \log x.im - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\ \end{array} \]

Alternative 6: 70.4% accurate, 1.3× speedup?

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

\\
\begin{array}{l}
t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_1 := \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
t_2 := e^{y.re \cdot \log x.im - t_0}\\
\mathbf{if}\;x.im \leq -2 \cdot 10^{-310}:\\
\;\;\;\;t_1 \cdot e^{y.re \cdot \log \left(-0.5 \cdot \left(x.re \cdot \frac{x.re}{x.im}\right) - x.im\right) - t_0}\\

\mathbf{elif}\;x.im \leq 4 \cdot 10^{+75}:\\
\;\;\;\;t_1 \cdot t_2\\

\mathbf{else}:\\
\;\;\;\;\cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \cdot t_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x.im < -1.999999999999994e-310

    1. Initial program 48.0%

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

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

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

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

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

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

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

    if -1.999999999999994e-310 < x.im < 3.99999999999999971e75

    1. Initial program 44.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. Taylor expanded in y.im around 0 60.2%

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

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

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

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

    if 3.99999999999999971e75 < x.im

    1. Initial program 12.2%

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

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

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

        \[\leadsto \frac{\color{blue}{\left(e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re} \cdot 1\right)} \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)}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}} \]
      4. metadata-eval8.2%

        \[\leadsto \frac{\left(e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re} \cdot \color{blue}{\left(-1 \cdot -1\right)}\right) \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)}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}} \]
      5. associate-*l/8.2%

        \[\leadsto \color{blue}{\frac{e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re} \cdot \left(-1 \cdot -1\right)}{e^{\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)} \]
    3. Simplified67.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x.im \leq -2 \cdot 10^{-310}:\\ \;\;\;\;\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot e^{y.re \cdot \log \left(-0.5 \cdot \left(x.re \cdot \frac{x.re}{x.im}\right) - x.im\right) - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\ \mathbf{elif}\;x.im \leq 4 \cdot 10^{+75}:\\ \;\;\;\;\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot e^{y.re \cdot \log x.im - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\ \mathbf{else}:\\ \;\;\;\;\cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \cdot e^{y.re \cdot \log x.im - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\ \end{array} \]

Alternative 7: 69.6% accurate, 1.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\ t_1 := \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\ \mathbf{if}\;x.im \leq -2 \cdot 10^{-310}:\\ \;\;\;\;t_1 \cdot e^{y.re \cdot \log \left(-0.5 \cdot \left(x.re \cdot \frac{x.re}{x.im}\right) - x.im\right) - t_0}\\ \mathbf{else}:\\ \;\;\;\;t_1 \cdot e^{y.re \cdot \log x.im - t_0}\\ \end{array} \end{array} \]
(FPCore (x.re x.im y.re y.im)
 :precision binary64
 (let* ((t_0 (* (atan2 x.im x.re) y.im))
        (t_1 (cos (* y.re (atan2 x.im x.re)))))
   (if (<= x.im -2e-310)
     (*
      t_1
      (exp (- (* y.re (log (- (* -0.5 (* x.re (/ x.re x.im))) x.im))) t_0)))
     (* t_1 (exp (- (* y.re (log x.im)) t_0))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
	double t_0 = atan2(x_46_im, x_46_re) * y_46_im;
	double t_1 = cos((y_46_re * atan2(x_46_im, x_46_re)));
	double tmp;
	if (x_46_im <= -2e-310) {
		tmp = t_1 * exp(((y_46_re * log(((-0.5 * (x_46_re * (x_46_re / x_46_im))) - x_46_im))) - t_0));
	} else {
		tmp = t_1 * exp(((y_46_re * log(x_46_im)) - 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) :: t_1
    real(8) :: tmp
    t_0 = atan2(x_46im, x_46re) * y_46im
    t_1 = cos((y_46re * atan2(x_46im, x_46re)))
    if (x_46im <= (-2d-310)) then
        tmp = t_1 * exp(((y_46re * log((((-0.5d0) * (x_46re * (x_46re / x_46im))) - x_46im))) - t_0))
    else
        tmp = t_1 * exp(((y_46re * log(x_46im)) - 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.atan2(x_46_im, x_46_re) * y_46_im;
	double t_1 = Math.cos((y_46_re * Math.atan2(x_46_im, x_46_re)));
	double tmp;
	if (x_46_im <= -2e-310) {
		tmp = t_1 * Math.exp(((y_46_re * Math.log(((-0.5 * (x_46_re * (x_46_re / x_46_im))) - x_46_im))) - t_0));
	} else {
		tmp = t_1 * Math.exp(((y_46_re * Math.log(x_46_im)) - t_0));
	}
	return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im):
	t_0 = math.atan2(x_46_im, x_46_re) * y_46_im
	t_1 = math.cos((y_46_re * math.atan2(x_46_im, x_46_re)))
	tmp = 0
	if x_46_im <= -2e-310:
		tmp = t_1 * math.exp(((y_46_re * math.log(((-0.5 * (x_46_re * (x_46_re / x_46_im))) - x_46_im))) - t_0))
	else:
		tmp = t_1 * math.exp(((y_46_re * math.log(x_46_im)) - t_0))
	return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im)
	t_0 = Float64(atan(x_46_im, x_46_re) * y_46_im)
	t_1 = cos(Float64(y_46_re * atan(x_46_im, x_46_re)))
	tmp = 0.0
	if (x_46_im <= -2e-310)
		tmp = Float64(t_1 * exp(Float64(Float64(y_46_re * log(Float64(Float64(-0.5 * Float64(x_46_re * Float64(x_46_re / x_46_im))) - x_46_im))) - t_0)));
	else
		tmp = Float64(t_1 * exp(Float64(Float64(y_46_re * log(x_46_im)) - t_0)));
	end
	return tmp
end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im)
	t_0 = atan2(x_46_im, x_46_re) * y_46_im;
	t_1 = cos((y_46_re * atan2(x_46_im, x_46_re)));
	tmp = 0.0;
	if (x_46_im <= -2e-310)
		tmp = t_1 * exp(((y_46_re * log(((-0.5 * (x_46_re * (x_46_re / x_46_im))) - x_46_im))) - t_0));
	else
		tmp = t_1 * exp(((y_46_re * log(x_46_im)) - 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[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, Block[{t$95$1 = N[Cos[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[x$46$im, -2e-310], N[(t$95$1 * N[Exp[N[(N[(y$46$re * N[Log[N[(N[(-0.5 * N[(x$46$re * N[(x$46$re / x$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x$46$im), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[Exp[N[(N[(y$46$re * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_1 := \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{if}\;x.im \leq -2 \cdot 10^{-310}:\\
\;\;\;\;t_1 \cdot e^{y.re \cdot \log \left(-0.5 \cdot \left(x.re \cdot \frac{x.re}{x.im}\right) - x.im\right) - t_0}\\

\mathbf{else}:\\
\;\;\;\;t_1 \cdot e^{y.re \cdot \log x.im - t_0}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x.im < -1.999999999999994e-310

    1. Initial program 48.0%

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

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

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

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

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

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

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

    if -1.999999999999994e-310 < x.im

    1. Initial program 32.0%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x.im \leq -2 \cdot 10^{-310}:\\ \;\;\;\;\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot e^{y.re \cdot \log \left(-0.5 \cdot \left(x.re \cdot \frac{x.re}{x.im}\right) - x.im\right) - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\ \mathbf{else}:\\ \;\;\;\;\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot e^{y.re \cdot \log x.im - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\ \end{array} \]

Alternative 8: 63.0% accurate, 1.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\ t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\ \mathbf{if}\;x.re \leq -2.8 \cdot 10^{-250}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;x.re \leq -3.7 \cdot 10^{-270}:\\ \;\;\;\;{x.im}^{y.re} \cdot \cos \left(t_1 - y.im \cdot \log \left(\frac{-1}{x.re}\right)\right)\\ \mathbf{elif}\;x.re \leq 5.8 \cdot 10^{-283}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;\cos t_1 \cdot e^{y.re \cdot \log x.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\ \end{array} \end{array} \]
(FPCore (x.re x.im y.re y.im)
 :precision binary64
 (let* ((t_0
         (*
          (cos (* y.im (log (hypot x.im x.re))))
          (exp (* (atan2 x.im x.re) (- y.im)))))
        (t_1 (* y.re (atan2 x.im x.re))))
   (if (<= x.re -2.8e-250)
     t_0
     (if (<= x.re -3.7e-270)
       (* (pow x.im y.re) (cos (- t_1 (* y.im (log (/ -1.0 x.re))))))
       (if (<= x.re 5.8e-283)
         t_0
         (*
          (cos t_1)
          (exp (- (* y.re (log x.re)) (* (atan2 x.im x.re) y.im)))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
	double t_0 = cos((y_46_im * log(hypot(x_46_im, x_46_re)))) * exp((atan2(x_46_im, x_46_re) * -y_46_im));
	double t_1 = y_46_re * atan2(x_46_im, x_46_re);
	double tmp;
	if (x_46_re <= -2.8e-250) {
		tmp = t_0;
	} else if (x_46_re <= -3.7e-270) {
		tmp = pow(x_46_im, y_46_re) * cos((t_1 - (y_46_im * log((-1.0 / x_46_re)))));
	} else if (x_46_re <= 5.8e-283) {
		tmp = t_0;
	} else {
		tmp = cos(t_1) * exp(((y_46_re * log(x_46_re)) - (atan2(x_46_im, x_46_re) * y_46_im)));
	}
	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((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re)))) * Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im));
	double t_1 = y_46_re * Math.atan2(x_46_im, x_46_re);
	double tmp;
	if (x_46_re <= -2.8e-250) {
		tmp = t_0;
	} else if (x_46_re <= -3.7e-270) {
		tmp = Math.pow(x_46_im, y_46_re) * Math.cos((t_1 - (y_46_im * Math.log((-1.0 / x_46_re)))));
	} else if (x_46_re <= 5.8e-283) {
		tmp = t_0;
	} else {
		tmp = Math.cos(t_1) * Math.exp(((y_46_re * Math.log(x_46_re)) - (Math.atan2(x_46_im, x_46_re) * y_46_im)));
	}
	return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im):
	t_0 = math.cos((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) * math.exp((math.atan2(x_46_im, x_46_re) * -y_46_im))
	t_1 = y_46_re * math.atan2(x_46_im, x_46_re)
	tmp = 0
	if x_46_re <= -2.8e-250:
		tmp = t_0
	elif x_46_re <= -3.7e-270:
		tmp = math.pow(x_46_im, y_46_re) * math.cos((t_1 - (y_46_im * math.log((-1.0 / x_46_re)))))
	elif x_46_re <= 5.8e-283:
		tmp = t_0
	else:
		tmp = math.cos(t_1) * math.exp(((y_46_re * math.log(x_46_re)) - (math.atan2(x_46_im, x_46_re) * y_46_im)))
	return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im)
	t_0 = Float64(cos(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))))
	t_1 = Float64(y_46_re * atan(x_46_im, x_46_re))
	tmp = 0.0
	if (x_46_re <= -2.8e-250)
		tmp = t_0;
	elseif (x_46_re <= -3.7e-270)
		tmp = Float64((x_46_im ^ y_46_re) * cos(Float64(t_1 - Float64(y_46_im * log(Float64(-1.0 / x_46_re))))));
	elseif (x_46_re <= 5.8e-283)
		tmp = t_0;
	else
		tmp = Float64(cos(t_1) * exp(Float64(Float64(y_46_re * log(x_46_re)) - Float64(atan(x_46_im, x_46_re) * y_46_im))));
	end
	return tmp
end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im)
	t_0 = cos((y_46_im * log(hypot(x_46_im, x_46_re)))) * exp((atan2(x_46_im, x_46_re) * -y_46_im));
	t_1 = y_46_re * atan2(x_46_im, x_46_re);
	tmp = 0.0;
	if (x_46_re <= -2.8e-250)
		tmp = t_0;
	elseif (x_46_re <= -3.7e-270)
		tmp = (x_46_im ^ y_46_re) * cos((t_1 - (y_46_im * log((-1.0 / x_46_re)))));
	elseif (x_46_re <= 5.8e-283)
		tmp = t_0;
	else
		tmp = cos(t_1) * exp(((y_46_re * log(x_46_re)) - (atan2(x_46_im, x_46_re) * y_46_im)));
	end
	tmp_2 = tmp;
end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[Cos[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x$46$re, -2.8e-250], t$95$0, If[LessEqual[x$46$re, -3.7e-270], N[(N[Power[x$46$im, y$46$re], $MachinePrecision] * N[Cos[N[(t$95$1 - N[(y$46$im * N[Log[N[(-1.0 / x$46$re), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, 5.8e-283], t$95$0, N[(N[Cos[t$95$1], $MachinePrecision] * N[Exp[N[(N[(y$46$re * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;x.re \leq -3.7 \cdot 10^{-270}:\\
\;\;\;\;{x.im}^{y.re} \cdot \cos \left(t_1 - y.im \cdot \log \left(\frac{-1}{x.re}\right)\right)\\

\mathbf{elif}\;x.re \leq 5.8 \cdot 10^{-283}:\\
\;\;\;\;t_0\\

\mathbf{else}:\\
\;\;\;\;\cos t_1 \cdot e^{y.re \cdot \log x.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x.re < -2.80000000000000028e-250 or -3.7000000000000001e-270 < x.re < 5.79999999999999976e-283

    1. Initial program 40.9%

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

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

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

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

        \[\leadsto \frac{\left(e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re} \cdot \color{blue}{\left(-1 \cdot -1\right)}\right) \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)}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}} \]
      5. associate-*l/35.4%

        \[\leadsto \color{blue}{\frac{e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re} \cdot \left(-1 \cdot -1\right)}{e^{\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)} \]
    3. Simplified72.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{1}{e^{{1}^{0.3333333333333333} \cdot \left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}}} \cdot \cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \]
    12. Step-by-step derivation
      1. rec-exp55.9%

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

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

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

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

    if -2.80000000000000028e-250 < x.re < -3.7000000000000001e-270

    1. Initial program 33.3%

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

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

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

        \[\leadsto \frac{\color{blue}{\left(e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re} \cdot 1\right)} \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)}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}} \]
      4. metadata-eval33.3%

        \[\leadsto \frac{\left(e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re} \cdot \color{blue}{\left(-1 \cdot -1\right)}\right) \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)}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}} \]
      5. associate-*l/33.3%

        \[\leadsto \color{blue}{\frac{e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re} \cdot \left(-1 \cdot -1\right)}{e^{\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)} \]
    3. Simplified66.7%

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

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

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

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

    if 5.79999999999999976e-283 < x.re

    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. Taylor expanded in y.im around 0 61.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 \color{blue}{\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
    3. Taylor expanded in x.re around inf 68.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x.re \leq -2.8 \cdot 10^{-250}:\\ \;\;\;\;\cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\ \mathbf{elif}\;x.re \leq -3.7 \cdot 10^{-270}:\\ \;\;\;\;{x.im}^{y.re} \cdot \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re} - y.im \cdot \log \left(\frac{-1}{x.re}\right)\right)\\ \mathbf{elif}\;x.re \leq 5.8 \cdot 10^{-283}:\\ \;\;\;\;\cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\ \mathbf{else}:\\ \;\;\;\;\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot e^{y.re \cdot \log x.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\ \end{array} \]

Alternative 9: 62.8% accurate, 1.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y.re \leq -122 \lor \neg \left(y.re \leq 12\right):\\ \;\;\;\;\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot \frac{{x.im}^{y.re}}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\\ \mathbf{else}:\\ \;\;\;\;\cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\ \end{array} \end{array} \]
(FPCore (x.re x.im y.re y.im)
 :precision binary64
 (if (or (<= y.re -122.0) (not (<= y.re 12.0)))
   (*
    (cos (* y.re (atan2 x.im x.re)))
    (/ (pow x.im y.re) (exp (* (atan2 x.im x.re) y.im))))
   (*
    (cos (* y.im (log (hypot x.im x.re))))
    (exp (* (atan2 x.im x.re) (- 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_re <= -122.0) || !(y_46_re <= 12.0)) {
		tmp = cos((y_46_re * atan2(x_46_im, x_46_re))) * (pow(x_46_im, y_46_re) / exp((atan2(x_46_im, x_46_re) * y_46_im)));
	} else {
		tmp = cos((y_46_im * log(hypot(x_46_im, x_46_re)))) * exp((atan2(x_46_im, x_46_re) * -y_46_im));
	}
	return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
	double tmp;
	if ((y_46_re <= -122.0) || !(y_46_re <= 12.0)) {
		tmp = Math.cos((y_46_re * Math.atan2(x_46_im, x_46_re))) * (Math.pow(x_46_im, y_46_re) / Math.exp((Math.atan2(x_46_im, x_46_re) * y_46_im)));
	} else {
		tmp = Math.cos((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re)))) * Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im));
	}
	return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im):
	tmp = 0
	if (y_46_re <= -122.0) or not (y_46_re <= 12.0):
		tmp = math.cos((y_46_re * math.atan2(x_46_im, x_46_re))) * (math.pow(x_46_im, y_46_re) / math.exp((math.atan2(x_46_im, x_46_re) * y_46_im)))
	else:
		tmp = math.cos((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) * math.exp((math.atan2(x_46_im, x_46_re) * -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_re <= -122.0) || !(y_46_re <= 12.0))
		tmp = Float64(cos(Float64(y_46_re * atan(x_46_im, x_46_re))) * Float64((x_46_im ^ y_46_re) / exp(Float64(atan(x_46_im, x_46_re) * y_46_im))));
	else
		tmp = Float64(cos(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))));
	end
	return tmp
end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im)
	tmp = 0.0;
	if ((y_46_re <= -122.0) || ~((y_46_re <= 12.0)))
		tmp = cos((y_46_re * atan2(x_46_im, x_46_re))) * ((x_46_im ^ y_46_re) / exp((atan2(x_46_im, x_46_re) * y_46_im)));
	else
		tmp = cos((y_46_im * log(hypot(x_46_im, x_46_re)))) * exp((atan2(x_46_im, x_46_re) * -y_46_im));
	end
	tmp_2 = tmp;
end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[Or[LessEqual[y$46$re, -122.0], N[Not[LessEqual[y$46$re, 12.0]], $MachinePrecision]], N[(N[Cos[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(N[Power[x$46$im, y$46$re], $MachinePrecision] / N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Cos[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y.re \leq -122 \lor \neg \left(y.re \leq 12\right):\\
\;\;\;\;\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot \frac{{x.im}^{y.re}}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\\

\mathbf{else}:\\
\;\;\;\;\cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y.re < -122 or 12 < y.re

    1. Initial program 42.6%

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

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

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

        \[\leadsto \frac{\color{blue}{\left(e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re} \cdot 1\right)} \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)}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}} \]
      4. metadata-eval34.8%

        \[\leadsto \frac{\left(e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re} \cdot \color{blue}{\left(-1 \cdot -1\right)}\right) \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)}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}} \]
      5. associate-*l/34.8%

        \[\leadsto \color{blue}{\frac{e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re} \cdot \left(-1 \cdot -1\right)}{e^{\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)} \]
    3. Simplified64.5%

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

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

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

    if -122 < y.re < 12

    1. Initial program 37.1%

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

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

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

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

        \[\leadsto \frac{\left(e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re} \cdot \color{blue}{\left(-1 \cdot -1\right)}\right) \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)}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}} \]
      5. associate-*l/37.1%

        \[\leadsto \color{blue}{\frac{e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re} \cdot \left(-1 \cdot -1\right)}{e^{\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)} \]
    3. Simplified79.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{1}{e^{{1}^{0.3333333333333333} \cdot \left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}}} \cdot \cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \]
    12. Step-by-step derivation
      1. rec-exp82.6%

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

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

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

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

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

Alternative 10: 70.6% accurate, 1.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\ t_1 := \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\ \mathbf{if}\;x.im \leq -2 \cdot 10^{-310}:\\ \;\;\;\;t_1 \cdot e^{y.re \cdot \log \left(-x.im\right) - t_0}\\ \mathbf{else}:\\ \;\;\;\;t_1 \cdot e^{y.re \cdot \log x.im - t_0}\\ \end{array} \end{array} \]
(FPCore (x.re x.im y.re y.im)
 :precision binary64
 (let* ((t_0 (* (atan2 x.im x.re) y.im))
        (t_1 (cos (* y.re (atan2 x.im x.re)))))
   (if (<= x.im -2e-310)
     (* t_1 (exp (- (* y.re (log (- x.im))) t_0)))
     (* t_1 (exp (- (* y.re (log x.im)) t_0))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
	double t_0 = atan2(x_46_im, x_46_re) * y_46_im;
	double t_1 = cos((y_46_re * atan2(x_46_im, x_46_re)));
	double tmp;
	if (x_46_im <= -2e-310) {
		tmp = t_1 * exp(((y_46_re * log(-x_46_im)) - t_0));
	} else {
		tmp = t_1 * exp(((y_46_re * log(x_46_im)) - 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) :: t_1
    real(8) :: tmp
    t_0 = atan2(x_46im, x_46re) * y_46im
    t_1 = cos((y_46re * atan2(x_46im, x_46re)))
    if (x_46im <= (-2d-310)) then
        tmp = t_1 * exp(((y_46re * log(-x_46im)) - t_0))
    else
        tmp = t_1 * exp(((y_46re * log(x_46im)) - 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.atan2(x_46_im, x_46_re) * y_46_im;
	double t_1 = Math.cos((y_46_re * Math.atan2(x_46_im, x_46_re)));
	double tmp;
	if (x_46_im <= -2e-310) {
		tmp = t_1 * Math.exp(((y_46_re * Math.log(-x_46_im)) - t_0));
	} else {
		tmp = t_1 * Math.exp(((y_46_re * Math.log(x_46_im)) - t_0));
	}
	return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im):
	t_0 = math.atan2(x_46_im, x_46_re) * y_46_im
	t_1 = math.cos((y_46_re * math.atan2(x_46_im, x_46_re)))
	tmp = 0
	if x_46_im <= -2e-310:
		tmp = t_1 * math.exp(((y_46_re * math.log(-x_46_im)) - t_0))
	else:
		tmp = t_1 * math.exp(((y_46_re * math.log(x_46_im)) - t_0))
	return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im)
	t_0 = Float64(atan(x_46_im, x_46_re) * y_46_im)
	t_1 = cos(Float64(y_46_re * atan(x_46_im, x_46_re)))
	tmp = 0.0
	if (x_46_im <= -2e-310)
		tmp = Float64(t_1 * exp(Float64(Float64(y_46_re * log(Float64(-x_46_im))) - t_0)));
	else
		tmp = Float64(t_1 * exp(Float64(Float64(y_46_re * log(x_46_im)) - t_0)));
	end
	return tmp
end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im)
	t_0 = atan2(x_46_im, x_46_re) * y_46_im;
	t_1 = cos((y_46_re * atan2(x_46_im, x_46_re)));
	tmp = 0.0;
	if (x_46_im <= -2e-310)
		tmp = t_1 * exp(((y_46_re * log(-x_46_im)) - t_0));
	else
		tmp = t_1 * exp(((y_46_re * log(x_46_im)) - 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[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, Block[{t$95$1 = N[Cos[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[x$46$im, -2e-310], N[(t$95$1 * N[Exp[N[(N[(y$46$re * N[Log[(-x$46$im)], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[Exp[N[(N[(y$46$re * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_1 := \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{if}\;x.im \leq -2 \cdot 10^{-310}:\\
\;\;\;\;t_1 \cdot e^{y.re \cdot \log \left(-x.im\right) - t_0}\\

\mathbf{else}:\\
\;\;\;\;t_1 \cdot e^{y.re \cdot \log x.im - t_0}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x.im < -1.999999999999994e-310

    1. Initial program 48.0%

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

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

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

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

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

    if -1.999999999999994e-310 < x.im

    1. Initial program 32.0%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x.im \leq -2 \cdot 10^{-310}:\\ \;\;\;\;\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot e^{y.re \cdot \log \left(-x.im\right) - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\ \mathbf{else}:\\ \;\;\;\;\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot e^{y.re \cdot \log x.im - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\ \end{array} \]

Alternative 11: 61.0% accurate, 1.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x.im \leq 7.8 \cdot 10^{-277}:\\ \;\;\;\;\cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\ \mathbf{else}:\\ \;\;\;\;\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot e^{y.re \cdot \log x.im - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\ \end{array} \end{array} \]
(FPCore (x.re x.im y.re y.im)
 :precision binary64
 (if (<= x.im 7.8e-277)
   (*
    (cos (* y.im (log (hypot x.im x.re))))
    (exp (* (atan2 x.im x.re) (- y.im))))
   (*
    (cos (* y.re (atan2 x.im x.re)))
    (exp (- (* y.re (log x.im)) (* (atan2 x.im x.re) y.im))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
	double tmp;
	if (x_46_im <= 7.8e-277) {
		tmp = cos((y_46_im * log(hypot(x_46_im, x_46_re)))) * exp((atan2(x_46_im, x_46_re) * -y_46_im));
	} else {
		tmp = cos((y_46_re * atan2(x_46_im, x_46_re))) * exp(((y_46_re * log(x_46_im)) - (atan2(x_46_im, x_46_re) * y_46_im)));
	}
	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 <= 7.8e-277) {
		tmp = Math.cos((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re)))) * Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im));
	} else {
		tmp = Math.cos((y_46_re * Math.atan2(x_46_im, x_46_re))) * Math.exp(((y_46_re * Math.log(x_46_im)) - (Math.atan2(x_46_im, x_46_re) * y_46_im)));
	}
	return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im):
	tmp = 0
	if x_46_im <= 7.8e-277:
		tmp = math.cos((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) * math.exp((math.atan2(x_46_im, x_46_re) * -y_46_im))
	else:
		tmp = math.cos((y_46_re * math.atan2(x_46_im, x_46_re))) * math.exp(((y_46_re * math.log(x_46_im)) - (math.atan2(x_46_im, x_46_re) * y_46_im)))
	return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im)
	tmp = 0.0
	if (x_46_im <= 7.8e-277)
		tmp = Float64(cos(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))));
	else
		tmp = Float64(cos(Float64(y_46_re * atan(x_46_im, x_46_re))) * exp(Float64(Float64(y_46_re * log(x_46_im)) - Float64(atan(x_46_im, x_46_re) * y_46_im))));
	end
	return tmp
end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im)
	tmp = 0.0;
	if (x_46_im <= 7.8e-277)
		tmp = cos((y_46_im * log(hypot(x_46_im, x_46_re)))) * exp((atan2(x_46_im, x_46_re) * -y_46_im));
	else
		tmp = cos((y_46_re * atan2(x_46_im, x_46_re))) * exp(((y_46_re * log(x_46_im)) - (atan2(x_46_im, x_46_re) * y_46_im)));
	end
	tmp_2 = tmp;
end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[x$46$im, 7.8e-277], N[(N[Cos[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Cos[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Exp[N[(N[(y$46$re * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x.im \leq 7.8 \cdot 10^{-277}:\\
\;\;\;\;\cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\

\mathbf{else}:\\
\;\;\;\;\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot e^{y.re \cdot \log x.im - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x.im < 7.79999999999999973e-277

    1. Initial program 47.4%

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

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

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

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

        \[\leadsto \frac{\left(e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re} \cdot \color{blue}{\left(-1 \cdot -1\right)}\right) \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)}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}} \]
      5. associate-*l/43.0%

        \[\leadsto \color{blue}{\frac{e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re} \cdot \left(-1 \cdot -1\right)}{e^{\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)} \]
    3. Simplified75.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{1}{e^{{1}^{0.3333333333333333} \cdot \left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}}} \cdot \cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \]
    12. Step-by-step derivation
      1. rec-exp52.8%

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

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

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

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

    if 7.79999999999999973e-277 < x.im

    1. Initial program 31.6%

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

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

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

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

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

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

Alternative 12: 53.8% accurate, 1.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y.re \leq -6.5 \cdot 10^{+207}:\\ \;\;\;\;{x.im}^{y.re} \cdot \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re} - y.im \cdot \log \left(\frac{-1}{x.re}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\ \end{array} \end{array} \]
(FPCore (x.re x.im y.re y.im)
 :precision binary64
 (if (<= y.re -6.5e+207)
   (*
    (pow x.im y.re)
    (cos (- (* y.re (atan2 x.im x.re)) (* y.im (log (/ -1.0 x.re))))))
   (*
    (cos (* y.im (log (hypot x.im x.re))))
    (exp (* (atan2 x.im x.re) (- 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_re <= -6.5e+207) {
		tmp = pow(x_46_im, y_46_re) * cos(((y_46_re * atan2(x_46_im, x_46_re)) - (y_46_im * log((-1.0 / x_46_re)))));
	} else {
		tmp = cos((y_46_im * log(hypot(x_46_im, x_46_re)))) * exp((atan2(x_46_im, x_46_re) * -y_46_im));
	}
	return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
	double tmp;
	if (y_46_re <= -6.5e+207) {
		tmp = Math.pow(x_46_im, y_46_re) * Math.cos(((y_46_re * Math.atan2(x_46_im, x_46_re)) - (y_46_im * Math.log((-1.0 / x_46_re)))));
	} else {
		tmp = Math.cos((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re)))) * Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im));
	}
	return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im):
	tmp = 0
	if y_46_re <= -6.5e+207:
		tmp = math.pow(x_46_im, y_46_re) * math.cos(((y_46_re * math.atan2(x_46_im, x_46_re)) - (y_46_im * math.log((-1.0 / x_46_re)))))
	else:
		tmp = math.cos((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) * math.exp((math.atan2(x_46_im, x_46_re) * -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_re <= -6.5e+207)
		tmp = Float64((x_46_im ^ y_46_re) * cos(Float64(Float64(y_46_re * atan(x_46_im, x_46_re)) - Float64(y_46_im * log(Float64(-1.0 / x_46_re))))));
	else
		tmp = Float64(cos(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))));
	end
	return tmp
end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im)
	tmp = 0.0;
	if (y_46_re <= -6.5e+207)
		tmp = (x_46_im ^ y_46_re) * cos(((y_46_re * atan2(x_46_im, x_46_re)) - (y_46_im * log((-1.0 / x_46_re)))));
	else
		tmp = cos((y_46_im * log(hypot(x_46_im, x_46_re)))) * exp((atan2(x_46_im, x_46_re) * -y_46_im));
	end
	tmp_2 = tmp;
end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[y$46$re, -6.5e+207], N[(N[Power[x$46$im, y$46$re], $MachinePrecision] * N[Cos[N[(N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision] - N[(y$46$im * N[Log[N[(-1.0 / x$46$re), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Cos[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

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

\mathbf{else}:\\
\;\;\;\;\cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y.re < -6.5000000000000001e207

    1. Initial program 45.0%

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

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

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

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

        \[\leadsto \frac{\left(e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re} \cdot \color{blue}{\left(-1 \cdot -1\right)}\right) \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)}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}} \]
      5. associate-*l/40.0%

        \[\leadsto \color{blue}{\frac{e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re} \cdot \left(-1 \cdot -1\right)}{e^{\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)} \]
    3. Simplified75.0%

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

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

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

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

    if -6.5000000000000001e207 < y.re

    1. Initial program 39.7%

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

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

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

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

        \[\leadsto \frac{\left(e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re} \cdot \color{blue}{\left(-1 \cdot -1\right)}\right) \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)}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}} \]
      5. associate-*l/35.4%

        \[\leadsto \color{blue}{\frac{e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re} \cdot \left(-1 \cdot -1\right)}{e^{\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)} \]
    3. Simplified71.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 13: 19.3% accurate, 2.0× speedup?

\[\begin{array}{l} \\ {x.im}^{y.re} \cdot \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re} - y.im \cdot \log \left(\frac{-1}{x.re}\right)\right) \end{array} \]
(FPCore (x.re x.im y.re y.im)
 :precision binary64
 (*
  (pow x.im y.re)
  (cos (- (* y.re (atan2 x.im x.re)) (* y.im (log (/ -1.0 x.re)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
	return pow(x_46_im, y_46_re) * cos(((y_46_re * atan2(x_46_im, x_46_re)) - (y_46_im * log((-1.0 / x_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
    code = (x_46im ** y_46re) * cos(((y_46re * atan2(x_46im, x_46re)) - (y_46im * log(((-1.0d0) / x_46re)))))
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
	return Math.pow(x_46_im, y_46_re) * Math.cos(((y_46_re * Math.atan2(x_46_im, x_46_re)) - (y_46_im * Math.log((-1.0 / x_46_re)))));
}
def code(x_46_re, x_46_im, y_46_re, y_46_im):
	return math.pow(x_46_im, y_46_re) * math.cos(((y_46_re * math.atan2(x_46_im, x_46_re)) - (y_46_im * math.log((-1.0 / x_46_re)))))
function code(x_46_re, x_46_im, y_46_re, y_46_im)
	return Float64((x_46_im ^ y_46_re) * cos(Float64(Float64(y_46_re * atan(x_46_im, x_46_re)) - Float64(y_46_im * log(Float64(-1.0 / x_46_re))))))
end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im)
	tmp = (x_46_im ^ y_46_re) * cos(((y_46_re * atan2(x_46_im, x_46_re)) - (y_46_im * log((-1.0 / x_46_re)))));
end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[(N[Power[x$46$im, y$46$re], $MachinePrecision] * N[Cos[N[(N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision] - N[(y$46$im * N[Log[N[(-1.0 / x$46$re), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
{x.im}^{y.re} \cdot \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re} - y.im \cdot \log \left(\frac{-1}{x.re}\right)\right)
\end{array}
Derivation
  1. Initial program 40.1%

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

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

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

      \[\leadsto \frac{\color{blue}{\left(e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re} \cdot 1\right)} \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)}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}} \]
    4. metadata-eval35.8%

      \[\leadsto \frac{\left(e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re} \cdot \color{blue}{\left(-1 \cdot -1\right)}\right) \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)}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}} \]
    5. associate-*l/35.8%

      \[\leadsto \color{blue}{\frac{e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re} \cdot \left(-1 \cdot -1\right)}{e^{\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)} \]
  3. Simplified72.9%

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

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

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

    \[\leadsto \color{blue}{{x.im}^{y.re}} \cdot \cos \left(-1 \cdot \left(y.im \cdot \log \left(\frac{-1}{x.re}\right)\right) + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
  7. Final simplification16.4%

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

Reproduce

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