powComplex, real part

Percentage Accurate: 41.0% → 81.3%
Time: 17.9s
Alternatives: 11
Speedup: 4.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 11 alternatives:

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

Initial Program: 41.0% 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: 81.3% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\ t_1 := \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)\\ t_2 := e^{y.re \cdot t_1 - t_0}\\ t_3 := t_2 \cdot \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re} + y.im \cdot t_1\right)\\ \mathbf{if}\;t_3 \leq 2:\\ \;\;\;\;t_3\\ \mathbf{elif}\;t_3 \leq \infty:\\ \;\;\;\;t_2 \cdot \left(1 + -0.5 \cdot \left(\left(y.im \cdot y.im\right) \cdot {t_1}^{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;e^{\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.re - 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 (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
        (t_2 (exp (- (* y.re t_1) t_0)))
        (t_3 (* t_2 (cos (+ (* y.re (atan2 x.im x.re)) (* y.im t_1))))))
   (if (<= t_3 2.0)
     t_3
     (if (<= t_3 INFINITY)
       (* t_2 (+ 1.0 (* -0.5 (* (* y.im y.im) (pow t_1 2.0)))))
       (exp (- (* (log (hypot x.re x.im)) 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 = atan2(x_46_im, x_46_re) * y_46_im;
	double t_1 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
	double t_2 = exp(((y_46_re * t_1) - t_0));
	double t_3 = t_2 * cos(((y_46_re * atan2(x_46_im, x_46_re)) + (y_46_im * t_1)));
	double tmp;
	if (t_3 <= 2.0) {
		tmp = t_3;
	} else if (t_3 <= ((double) INFINITY)) {
		tmp = t_2 * (1.0 + (-0.5 * ((y_46_im * y_46_im) * pow(t_1, 2.0))));
	} else {
		tmp = exp(((log(hypot(x_46_re, x_46_im)) * 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.atan2(x_46_im, x_46_re) * y_46_im;
	double t_1 = Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
	double t_2 = Math.exp(((y_46_re * t_1) - t_0));
	double t_3 = t_2 * Math.cos(((y_46_re * Math.atan2(x_46_im, x_46_re)) + (y_46_im * t_1)));
	double tmp;
	if (t_3 <= 2.0) {
		tmp = t_3;
	} else if (t_3 <= Double.POSITIVE_INFINITY) {
		tmp = t_2 * (1.0 + (-0.5 * ((y_46_im * y_46_im) * Math.pow(t_1, 2.0))));
	} else {
		tmp = Math.exp(((Math.log(Math.hypot(x_46_re, x_46_im)) * y_46_re) - 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.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))
	t_2 = math.exp(((y_46_re * t_1) - t_0))
	t_3 = t_2 * math.cos(((y_46_re * math.atan2(x_46_im, x_46_re)) + (y_46_im * t_1)))
	tmp = 0
	if t_3 <= 2.0:
		tmp = t_3
	elif t_3 <= math.inf:
		tmp = t_2 * (1.0 + (-0.5 * ((y_46_im * y_46_im) * math.pow(t_1, 2.0))))
	else:
		tmp = math.exp(((math.log(math.hypot(x_46_re, x_46_im)) * y_46_re) - 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 = log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))
	t_2 = exp(Float64(Float64(y_46_re * t_1) - t_0))
	t_3 = Float64(t_2 * cos(Float64(Float64(y_46_re * atan(x_46_im, x_46_re)) + Float64(y_46_im * t_1))))
	tmp = 0.0
	if (t_3 <= 2.0)
		tmp = t_3;
	elseif (t_3 <= Inf)
		tmp = Float64(t_2 * Float64(1.0 + Float64(-0.5 * Float64(Float64(y_46_im * y_46_im) * (t_1 ^ 2.0)))));
	else
		tmp = exp(Float64(Float64(log(hypot(x_46_re, x_46_im)) * 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 = atan2(x_46_im, x_46_re) * y_46_im;
	t_1 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
	t_2 = exp(((y_46_re * t_1) - t_0));
	t_3 = t_2 * cos(((y_46_re * atan2(x_46_im, x_46_re)) + (y_46_im * t_1)));
	tmp = 0.0;
	if (t_3 <= 2.0)
		tmp = t_3;
	elseif (t_3 <= Inf)
		tmp = t_2 * (1.0 + (-0.5 * ((y_46_im * y_46_im) * (t_1 ^ 2.0))));
	else
		tmp = exp(((log(hypot(x_46_re, x_46_im)) * 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[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, Block[{t$95$1 = N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[Exp[N[(N[(y$46$re * t$95$1), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 * N[Cos[N[(N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision] + N[(y$46$im * t$95$1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, 2.0], t$95$3, If[LessEqual[t$95$3, Infinity], N[(t$95$2 * N[(1.0 + N[(-0.5 * N[(N[(y$46$im * y$46$im), $MachinePrecision] * N[Power[t$95$1, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Exp[N[(N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$re), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t_3 \leq \infty:\\
\;\;\;\;t_2 \cdot \left(1 + -0.5 \cdot \left(\left(y.im \cdot y.im\right) \cdot {t_1}^{2}\right)\right)\\

\mathbf{else}:\\
\;\;\;\;e^{\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.re - t_0}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 (exp.f64 (-.f64 (*.f64 (log.f64 (sqrt.f64 (+.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)))) y.re) (*.f64 (atan2.f64 x.im x.re) y.im))) (cos.f64 (+.f64 (*.f64 (log.f64 (sqrt.f64 (+.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)))) y.im) (*.f64 (atan2.f64 x.im x.re) y.re)))) < 2

    1. Initial program 89.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) \]

    if 2 < (*.f64 (exp.f64 (-.f64 (*.f64 (log.f64 (sqrt.f64 (+.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)))) y.re) (*.f64 (atan2.f64 x.im x.re) y.im))) (cos.f64 (+.f64 (*.f64 (log.f64 (sqrt.f64 (+.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)))) y.im) (*.f64 (atan2.f64 x.im x.re) y.re)))) < +inf.0

    1. Initial program 56.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.re around 0 64.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.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)} \]
    3. Step-by-step derivation
      1. unpow264.0%

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

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

        \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \cos \left(y.im \cdot \log \color{blue}{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}\right) \]
    4. Simplified64.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.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)} \]
    5. Taylor expanded in y.im around 0 88.0%

      \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \color{blue}{\left(1 + -0.5 \cdot \left({y.im}^{2} \cdot {\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{2}\right)\right)} \]
    6. Step-by-step derivation
      1. unpow288.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 \left(1 + -0.5 \cdot \left(\color{blue}{\left(y.im \cdot y.im\right)} \cdot {\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{2}\right)\right) \]
      2. +-commutative88.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 \left(1 + -0.5 \cdot \left(\left(y.im \cdot y.im\right) \cdot {\log \left(\sqrt{\color{blue}{{x.re}^{2} + {x.im}^{2}}}\right)}^{2}\right)\right) \]
      3. unpow288.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 \left(1 + -0.5 \cdot \left(\left(y.im \cdot y.im\right) \cdot {\log \left(\sqrt{\color{blue}{x.re \cdot x.re} + {x.im}^{2}}\right)}^{2}\right)\right) \]
      4. unpow288.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 \left(1 + -0.5 \cdot \left(\left(y.im \cdot y.im\right) \cdot {\log \left(\sqrt{x.re \cdot x.re + \color{blue}{x.im \cdot x.im}}\right)}^{2}\right)\right) \]
    7. Simplified88.0%

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

    if +inf.0 < (*.f64 (exp.f64 (-.f64 (*.f64 (log.f64 (sqrt.f64 (+.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)))) y.re) (*.f64 (atan2.f64 x.im x.re) y.im))) (cos.f64 (+.f64 (*.f64 (log.f64 (sqrt.f64 (+.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)))) y.im) (*.f64 (atan2.f64 x.im x.re) y.re))))

    1. Initial program 0.0%

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

        \[\leadsto \color{blue}{e^{\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot 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. Taylor expanded in y.im around 0 81.5%

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;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} + y.im \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)\right) \leq 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} + y.im \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)\right)\\ \mathbf{elif}\;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} + y.im \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)\right) \leq \infty:\\ \;\;\;\;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 \left(1 + -0.5 \cdot \left(\left(y.im \cdot y.im\right) \cdot {\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)}^{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;e^{\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\ \end{array} \]

    Alternative 2: 79.7% accurate, 0.9× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_0 := e^{\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\ t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\ \mathbf{if}\;x.re \leq -5 \cdot 10^{-309}:\\ \;\;\;\;\cos \left(t_1 - y.im \cdot \log \left(\frac{-1}{x.re}\right)\right) \cdot t_0\\ \mathbf{else}:\\ \;\;\;\;\left(\cos t_1 - \sin t_1 \cdot \left(y.im \cdot \log x.re\right)\right) \cdot t_0\\ \end{array} \end{array} \]
    (FPCore (x.re x.im y.re y.im)
     :precision binary64
     (let* ((t_0
             (exp (- (* (log (hypot x.re x.im)) y.re) (* (atan2 x.im x.re) y.im))))
            (t_1 (* y.re (atan2 x.im x.re))))
       (if (<= x.re -5e-309)
         (* (cos (- t_1 (* y.im (log (/ -1.0 x.re))))) t_0)
         (* (- (cos t_1) (* (sin t_1) (* y.im (log x.re)))) t_0))))
    double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
    	double t_0 = exp(((log(hypot(x_46_re, x_46_im)) * y_46_re) - (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 <= -5e-309) {
    		tmp = cos((t_1 - (y_46_im * log((-1.0 / x_46_re))))) * t_0;
    	} else {
    		tmp = (cos(t_1) - (sin(t_1) * (y_46_im * log(x_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.exp(((Math.log(Math.hypot(x_46_re, x_46_im)) * y_46_re) - (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 <= -5e-309) {
    		tmp = Math.cos((t_1 - (y_46_im * Math.log((-1.0 / x_46_re))))) * t_0;
    	} else {
    		tmp = (Math.cos(t_1) - (Math.sin(t_1) * (y_46_im * Math.log(x_46_re)))) * t_0;
    	}
    	return tmp;
    }
    
    def code(x_46_re, x_46_im, y_46_re, y_46_im):
    	t_0 = math.exp(((math.log(math.hypot(x_46_re, x_46_im)) * y_46_re) - (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 <= -5e-309:
    		tmp = math.cos((t_1 - (y_46_im * math.log((-1.0 / x_46_re))))) * t_0
    	else:
    		tmp = (math.cos(t_1) - (math.sin(t_1) * (y_46_im * math.log(x_46_re)))) * t_0
    	return tmp
    
    function code(x_46_re, x_46_im, y_46_re, y_46_im)
    	t_0 = exp(Float64(Float64(log(hypot(x_46_re, x_46_im)) * y_46_re) - Float64(atan(x_46_im, x_46_re) * y_46_im)))
    	t_1 = Float64(y_46_re * atan(x_46_im, x_46_re))
    	tmp = 0.0
    	if (x_46_re <= -5e-309)
    		tmp = Float64(cos(Float64(t_1 - Float64(y_46_im * log(Float64(-1.0 / x_46_re))))) * t_0);
    	else
    		tmp = Float64(Float64(cos(t_1) - Float64(sin(t_1) * Float64(y_46_im * log(x_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 = exp(((log(hypot(x_46_re, x_46_im)) * y_46_re) - (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 <= -5e-309)
    		tmp = cos((t_1 - (y_46_im * log((-1.0 / x_46_re))))) * t_0;
    	else
    		tmp = (cos(t_1) - (sin(t_1) * (y_46_im * log(x_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[Exp[N[(N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$re), $MachinePrecision] - 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, -5e-309], N[(N[Cos[N[(t$95$1 - N[(y$46$im * N[Log[N[(-1.0 / x$46$re), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$0), $MachinePrecision], N[(N[(N[Cos[t$95$1], $MachinePrecision] - N[(N[Sin[t$95$1], $MachinePrecision] * N[(y$46$im * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_0 := e^{\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\
    t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
    \mathbf{if}\;x.re \leq -5 \cdot 10^{-309}:\\
    \;\;\;\;\cos \left(t_1 - y.im \cdot \log \left(\frac{-1}{x.re}\right)\right) \cdot t_0\\
    
    \mathbf{else}:\\
    \;\;\;\;\left(\cos t_1 - \sin t_1 \cdot \left(y.im \cdot \log x.re\right)\right) \cdot t_0\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if x.re < -4.9999999999999995e-309

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

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

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

        1. Initial program 47.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. Simplified83.3%

            \[\leadsto \color{blue}{e^{\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot 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. Taylor expanded in x.im around 0 83.2%

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

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

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

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

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

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

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

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

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

        Alternative 3: 79.6% accurate, 1.1× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} t_0 := e^{\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\ t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\ \mathbf{if}\;x.re \leq -5 \cdot 10^{-309}:\\ \;\;\;\;\cos \left(t_1 - y.im \cdot \log \left(\frac{-1}{x.re}\right)\right) \cdot t_0\\ \mathbf{else}:\\ \;\;\;\;t_0 \cdot \cos \left(t_1 + y.im \cdot \log x.re\right)\\ \end{array} \end{array} \]
        (FPCore (x.re x.im y.re y.im)
         :precision binary64
         (let* ((t_0
                 (exp (- (* (log (hypot x.re x.im)) y.re) (* (atan2 x.im x.re) y.im))))
                (t_1 (* y.re (atan2 x.im x.re))))
           (if (<= x.re -5e-309)
             (* (cos (- t_1 (* y.im (log (/ -1.0 x.re))))) t_0)
             (* t_0 (cos (+ t_1 (* y.im (log x.re))))))))
        double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
        	double t_0 = exp(((log(hypot(x_46_re, x_46_im)) * y_46_re) - (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 <= -5e-309) {
        		tmp = cos((t_1 - (y_46_im * log((-1.0 / x_46_re))))) * t_0;
        	} else {
        		tmp = t_0 * cos((t_1 + (y_46_im * log(x_46_re))));
        	}
        	return tmp;
        }
        
        public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
        	double t_0 = Math.exp(((Math.log(Math.hypot(x_46_re, x_46_im)) * y_46_re) - (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 <= -5e-309) {
        		tmp = Math.cos((t_1 - (y_46_im * Math.log((-1.0 / x_46_re))))) * t_0;
        	} else {
        		tmp = t_0 * Math.cos((t_1 + (y_46_im * Math.log(x_46_re))));
        	}
        	return tmp;
        }
        
        def code(x_46_re, x_46_im, y_46_re, y_46_im):
        	t_0 = math.exp(((math.log(math.hypot(x_46_re, x_46_im)) * y_46_re) - (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 <= -5e-309:
        		tmp = math.cos((t_1 - (y_46_im * math.log((-1.0 / x_46_re))))) * t_0
        	else:
        		tmp = t_0 * math.cos((t_1 + (y_46_im * math.log(x_46_re))))
        	return tmp
        
        function code(x_46_re, x_46_im, y_46_re, y_46_im)
        	t_0 = exp(Float64(Float64(log(hypot(x_46_re, x_46_im)) * y_46_re) - Float64(atan(x_46_im, x_46_re) * y_46_im)))
        	t_1 = Float64(y_46_re * atan(x_46_im, x_46_re))
        	tmp = 0.0
        	if (x_46_re <= -5e-309)
        		tmp = Float64(cos(Float64(t_1 - Float64(y_46_im * log(Float64(-1.0 / x_46_re))))) * t_0);
        	else
        		tmp = Float64(t_0 * cos(Float64(t_1 + Float64(y_46_im * log(x_46_re)))));
        	end
        	return tmp
        end
        
        function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im)
        	t_0 = exp(((log(hypot(x_46_re, x_46_im)) * y_46_re) - (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 <= -5e-309)
        		tmp = cos((t_1 - (y_46_im * log((-1.0 / x_46_re))))) * t_0;
        	else
        		tmp = t_0 * cos((t_1 + (y_46_im * log(x_46_re))));
        	end
        	tmp_2 = tmp;
        end
        
        code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Exp[N[(N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$re), $MachinePrecision] - 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, -5e-309], N[(N[Cos[N[(t$95$1 - N[(y$46$im * N[Log[N[(-1.0 / x$46$re), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$0), $MachinePrecision], N[(t$95$0 * N[Cos[N[(t$95$1 + N[(y$46$im * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        t_0 := e^{\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\
        t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
        \mathbf{if}\;x.re \leq -5 \cdot 10^{-309}:\\
        \;\;\;\;\cos \left(t_1 - y.im \cdot \log \left(\frac{-1}{x.re}\right)\right) \cdot t_0\\
        
        \mathbf{else}:\\
        \;\;\;\;t_0 \cdot \cos \left(t_1 + y.im \cdot \log x.re\right)\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if x.re < -4.9999999999999995e-309

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

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

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

            1. Initial program 47.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. Simplified83.3%

                \[\leadsto \color{blue}{e^{\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot 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. Taylor expanded in x.im around 0 83.2%

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

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

            Alternative 4: 81.2% accurate, 1.2× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} t_0 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.re\\ t_1 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\ \mathbf{if}\;y.re \leq 5 \cdot 10^{+162}:\\ \;\;\;\;e^{t_0 - t_1}\\ \mathbf{else}:\\ \;\;\;\;\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot e^{t_0 - \left|t_1\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)) y.re))
                    (t_1 (* (atan2 x.im x.re) y.im)))
               (if (<= y.re 5e+162)
                 (exp (- t_0 t_1))
                 (* (cos (* y.re (atan2 x.im x.re))) (exp (- t_0 (fabs t_1)))))))
            double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
            	double t_0 = log(hypot(x_46_re, x_46_im)) * y_46_re;
            	double t_1 = atan2(x_46_im, x_46_re) * y_46_im;
            	double tmp;
            	if (y_46_re <= 5e+162) {
            		tmp = exp((t_0 - t_1));
            	} else {
            		tmp = cos((y_46_re * atan2(x_46_im, x_46_re))) * exp((t_0 - fabs(t_1)));
            	}
            	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.log(Math.hypot(x_46_re, x_46_im)) * y_46_re;
            	double t_1 = Math.atan2(x_46_im, x_46_re) * y_46_im;
            	double tmp;
            	if (y_46_re <= 5e+162) {
            		tmp = Math.exp((t_0 - t_1));
            	} else {
            		tmp = Math.cos((y_46_re * Math.atan2(x_46_im, x_46_re))) * Math.exp((t_0 - Math.abs(t_1)));
            	}
            	return tmp;
            }
            
            def code(x_46_re, x_46_im, y_46_re, y_46_im):
            	t_0 = math.log(math.hypot(x_46_re, x_46_im)) * y_46_re
            	t_1 = math.atan2(x_46_im, x_46_re) * y_46_im
            	tmp = 0
            	if y_46_re <= 5e+162:
            		tmp = math.exp((t_0 - t_1))
            	else:
            		tmp = math.cos((y_46_re * math.atan2(x_46_im, x_46_re))) * math.exp((t_0 - math.fabs(t_1)))
            	return tmp
            
            function code(x_46_re, x_46_im, y_46_re, y_46_im)
            	t_0 = Float64(log(hypot(x_46_re, x_46_im)) * y_46_re)
            	t_1 = Float64(atan(x_46_im, x_46_re) * y_46_im)
            	tmp = 0.0
            	if (y_46_re <= 5e+162)
            		tmp = exp(Float64(t_0 - t_1));
            	else
            		tmp = Float64(cos(Float64(y_46_re * atan(x_46_im, x_46_re))) * exp(Float64(t_0 - abs(t_1))));
            	end
            	return tmp
            end
            
            function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im)
            	t_0 = log(hypot(x_46_re, x_46_im)) * y_46_re;
            	t_1 = atan2(x_46_im, x_46_re) * y_46_im;
            	tmp = 0.0;
            	if (y_46_re <= 5e+162)
            		tmp = exp((t_0 - t_1));
            	else
            		tmp = cos((y_46_re * atan2(x_46_im, x_46_re))) * exp((t_0 - abs(t_1)));
            	end
            	tmp_2 = tmp;
            end
            
            code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$re), $MachinePrecision]}, Block[{t$95$1 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, If[LessEqual[y$46$re, 5e+162], N[Exp[N[(t$95$0 - t$95$1), $MachinePrecision]], $MachinePrecision], N[(N[Cos[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Exp[N[(t$95$0 - N[Abs[t$95$1], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            t_0 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.re\\
            t_1 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
            \mathbf{if}\;y.re \leq 5 \cdot 10^{+162}:\\
            \;\;\;\;e^{t_0 - t_1}\\
            
            \mathbf{else}:\\
            \;\;\;\;\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot e^{t_0 - \left|t_1\right|}\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 2 regimes
            2. if y.re < 4.9999999999999997e162

              1. Initial program 41.6%

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

                  \[\leadsto \color{blue}{e^{\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot 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. Taylor expanded in y.im around 0 81.2%

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

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

                if 4.9999999999999997e162 < y.re

                1. Initial program 45.9%

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

                    \[\leadsto \color{blue}{e^{\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot 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. Taylor expanded in y.im around 0 78.4%

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

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

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

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

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

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

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

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

                  \[\leadsto \begin{array}{l} \mathbf{if}\;y.re \leq 5 \cdot 10^{+162}:\\ \;\;\;\;e^{\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.re - \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^{\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.re - \left|\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\right|}\\ \end{array} \]

                Alternative 5: 80.8% accurate, 1.3× speedup?

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

                  1. Initial program 42.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. Simplified84.5%

                      \[\leadsto \color{blue}{e^{\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot 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. Taylor expanded in y.im around 0 81.2%

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

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

                    if 7.99999999999999996e89 < y.re

                    1. Initial program 41.4%

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

                        \[\leadsto \color{blue}{e^{\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot 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. Taylor expanded in y.im around 0 79.3%

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

                      \[\leadsto \begin{array}{l} \mathbf{if}\;y.re \leq 8 \cdot 10^{+89}:\\ \;\;\;\;e^{\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.re - \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^{\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\ \end{array} \]

                    Alternative 6: 80.2% accurate, 1.6× speedup?

                    \[\begin{array}{l} \\ \begin{array}{l} t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\ \mathbf{if}\;x.im \leq 1.8 \cdot 10^{-81}:\\ \;\;\;\;e^{\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.re - t_0}\\ \mathbf{else}:\\ \;\;\;\;\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \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)))
                       (if (<= x.im 1.8e-81)
                         (exp (- (* (log (hypot x.re x.im)) y.re) t_0))
                         (* (cos (* y.re (atan2 x.im x.re))) (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 tmp;
                    	if (x_46_im <= 1.8e-81) {
                    		tmp = exp(((log(hypot(x_46_re, x_46_im)) * y_46_re) - t_0));
                    	} else {
                    		tmp = cos((y_46_re * atan2(x_46_im, x_46_re))) * exp(((y_46_re * log(x_46_im)) - 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.atan2(x_46_im, x_46_re) * y_46_im;
                    	double tmp;
                    	if (x_46_im <= 1.8e-81) {
                    		tmp = Math.exp(((Math.log(Math.hypot(x_46_re, x_46_im)) * y_46_re) - t_0));
                    	} 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)) - 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
                    	tmp = 0
                    	if x_46_im <= 1.8e-81:
                    		tmp = math.exp(((math.log(math.hypot(x_46_re, x_46_im)) * y_46_re) - t_0))
                    	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)) - 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)
                    	tmp = 0.0
                    	if (x_46_im <= 1.8e-81)
                    		tmp = exp(Float64(Float64(log(hypot(x_46_re, x_46_im)) * y_46_re) - t_0));
                    	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)) - 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;
                    	tmp = 0.0;
                    	if (x_46_im <= 1.8e-81)
                    		tmp = exp(((log(hypot(x_46_re, x_46_im)) * y_46_re) - t_0));
                    	else
                    		tmp = cos((y_46_re * atan2(x_46_im, x_46_re))) * 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]}, If[LessEqual[x$46$im, 1.8e-81], N[Exp[N[(N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$re), $MachinePrecision] - t$95$0), $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] - t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
                    
                    \begin{array}{l}
                    
                    \\
                    \begin{array}{l}
                    t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
                    \mathbf{if}\;x.im \leq 1.8 \cdot 10^{-81}:\\
                    \;\;\;\;e^{\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.re - t_0}\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \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.7999999999999999e-81

                      1. Initial program 45.9%

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

                          \[\leadsto \color{blue}{e^{\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot 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. Taylor expanded in y.im around 0 77.0%

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

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

                        if 1.7999999999999999e-81 < x.im

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

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

                          \[\leadsto e^{\log \color{blue}{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 simplification81.6%

                        \[\leadsto \begin{array}{l} \mathbf{if}\;x.im \leq 1.8 \cdot 10^{-81}:\\ \;\;\;\;e^{\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.re - \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 7: 80.6% accurate, 1.6× speedup?

                      \[\begin{array}{l} \\ \begin{array}{l} t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\ \mathbf{if}\;x.im \leq 2 \cdot 10^{-102}:\\ \;\;\;\;e^{\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.re - t_0}\\ \mathbf{else}:\\ \;\;\;\;e^{y.re \cdot \log x.im - t_0} \cdot \cos \left(y.im \cdot \log x.im\right)\\ \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)))
                         (if (<= x.im 2e-102)
                           (exp (- (* (log (hypot x.re x.im)) y.re) t_0))
                           (* (exp (- (* y.re (log x.im)) t_0)) (cos (* y.im (log x.im)))))))
                      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 tmp;
                      	if (x_46_im <= 2e-102) {
                      		tmp = exp(((log(hypot(x_46_re, x_46_im)) * y_46_re) - t_0));
                      	} else {
                      		tmp = exp(((y_46_re * log(x_46_im)) - t_0)) * cos((y_46_im * log(x_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.atan2(x_46_im, x_46_re) * y_46_im;
                      	double tmp;
                      	if (x_46_im <= 2e-102) {
                      		tmp = Math.exp(((Math.log(Math.hypot(x_46_re, x_46_im)) * y_46_re) - t_0));
                      	} else {
                      		tmp = Math.exp(((y_46_re * Math.log(x_46_im)) - t_0)) * Math.cos((y_46_im * Math.log(x_46_im)));
                      	}
                      	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
                      	tmp = 0
                      	if x_46_im <= 2e-102:
                      		tmp = math.exp(((math.log(math.hypot(x_46_re, x_46_im)) * y_46_re) - t_0))
                      	else:
                      		tmp = math.exp(((y_46_re * math.log(x_46_im)) - t_0)) * math.cos((y_46_im * math.log(x_46_im)))
                      	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)
                      	tmp = 0.0
                      	if (x_46_im <= 2e-102)
                      		tmp = exp(Float64(Float64(log(hypot(x_46_re, x_46_im)) * y_46_re) - t_0));
                      	else
                      		tmp = Float64(exp(Float64(Float64(y_46_re * log(x_46_im)) - t_0)) * cos(Float64(y_46_im * log(x_46_im))));
                      	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;
                      	tmp = 0.0;
                      	if (x_46_im <= 2e-102)
                      		tmp = exp(((log(hypot(x_46_re, x_46_im)) * y_46_re) - t_0));
                      	else
                      		tmp = exp(((y_46_re * log(x_46_im)) - t_0)) * cos((y_46_im * log(x_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[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, If[LessEqual[x$46$im, 2e-102], N[Exp[N[(N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$re), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision], N[(N[Exp[N[(N[(y$46$re * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision] * N[Cos[N[(y$46$im * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
                      
                      \begin{array}{l}
                      
                      \\
                      \begin{array}{l}
                      t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
                      \mathbf{if}\;x.im \leq 2 \cdot 10^{-102}:\\
                      \;\;\;\;e^{\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.re - t_0}\\
                      
                      \mathbf{else}:\\
                      \;\;\;\;e^{y.re \cdot \log x.im - t_0} \cdot \cos \left(y.im \cdot \log x.im\right)\\
                      
                      
                      \end{array}
                      \end{array}
                      
                      Derivation
                      1. Split input into 2 regimes
                      2. if x.im < 1.99999999999999987e-102

                        1. Initial program 45.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. Simplified80.4%

                            \[\leadsto \color{blue}{e^{\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot 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. Taylor expanded in y.im around 0 77.2%

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

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

                          if 1.99999999999999987e-102 < x.im

                          1. Initial program 36.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.re around 0 37.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.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)} \]
                          3. Step-by-step derivation
                            1. unpow237.7%

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

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

                              \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \cos \left(y.im \cdot \log \color{blue}{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}\right) \]
                          4. Simplified63.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.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)} \]
                          5. Taylor expanded in x.re around 0 64.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.im \cdot \log x.im\right)} \]
                          6. Taylor expanded in x.re around 0 86.1%

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

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

                        Alternative 8: 82.4% accurate, 2.0× speedup?

                        \[\begin{array}{l} \\ e^{\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \end{array} \]
                        (FPCore (x.re x.im y.re y.im)
                         :precision binary64
                         (exp (- (* (log (hypot x.re x.im)) y.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) {
                        	return exp(((log(hypot(x_46_re, x_46_im)) * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im)));
                        }
                        
                        public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
                        	return Math.exp(((Math.log(Math.hypot(x_46_re, x_46_im)) * y_46_re) - (Math.atan2(x_46_im, x_46_re) * y_46_im)));
                        }
                        
                        def code(x_46_re, x_46_im, y_46_re, y_46_im):
                        	return math.exp(((math.log(math.hypot(x_46_re, x_46_im)) * y_46_re) - (math.atan2(x_46_im, x_46_re) * y_46_im)))
                        
                        function code(x_46_re, x_46_im, y_46_re, y_46_im)
                        	return exp(Float64(Float64(log(hypot(x_46_re, x_46_im)) * y_46_re) - Float64(atan(x_46_im, x_46_re) * y_46_im)))
                        end
                        
                        function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im)
                        	tmp = exp(((log(hypot(x_46_re, x_46_im)) * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im)));
                        end
                        
                        code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[Exp[N[(N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$re), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
                        
                        \begin{array}{l}
                        
                        \\
                        e^{\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}
                        \end{array}
                        
                        Derivation
                        1. Initial program 42.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. Simplified82.2%

                            \[\leadsto \color{blue}{e^{\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot 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. Taylor expanded in y.im around 0 80.8%

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

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

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

                          Alternative 9: 78.2% accurate, 2.7× speedup?

                          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y.re \leq -8.2 \lor \neg \left(y.re \leq 2.5 \cdot 10^{-11}\right):\\ \;\;\;\;e^{y.re \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;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 -8.2) (not (<= y.re 2.5e-11)))
                             (exp (* y.re (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 <= -8.2) || !(y_46_re <= 2.5e-11)) {
                          		tmp = exp((y_46_re * log(hypot(x_46_im, x_46_re))));
                          	} else {
                          		tmp = 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 <= -8.2) || !(y_46_re <= 2.5e-11)) {
                          		tmp = Math.exp((y_46_re * Math.log(Math.hypot(x_46_im, x_46_re))));
                          	} else {
                          		tmp = 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 <= -8.2) or not (y_46_re <= 2.5e-11):
                          		tmp = math.exp((y_46_re * math.log(math.hypot(x_46_im, x_46_re))))
                          	else:
                          		tmp = 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 <= -8.2) || !(y_46_re <= 2.5e-11))
                          		tmp = exp(Float64(y_46_re * log(hypot(x_46_im, x_46_re))));
                          	else
                          		tmp = 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 <= -8.2) || ~((y_46_re <= 2.5e-11)))
                          		tmp = exp((y_46_re * log(hypot(x_46_im, x_46_re))));
                          	else
                          		tmp = 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, -8.2], N[Not[LessEqual[y$46$re, 2.5e-11]], $MachinePrecision]], N[Exp[N[(y$46$re * 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]]
                          
                          \begin{array}{l}
                          
                          \\
                          \begin{array}{l}
                          \mathbf{if}\;y.re \leq -8.2 \lor \neg \left(y.re \leq 2.5 \cdot 10^{-11}\right):\\
                          \;\;\;\;e^{y.re \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)}\\
                          
                          \mathbf{else}:\\
                          \;\;\;\;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.1999999999999993 or 2.50000000000000009e-11 < y.re

                            1. Initial program 39.3%

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

                                \[\leadsto \color{blue}{e^{\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot 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. Taylor expanded in y.im around 0 80.0%

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

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

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

                                  \[\leadsto e^{y.re \cdot \log \left(\sqrt{\color{blue}{x.im \cdot x.im} + {x.re}^{2}}\right)} \cdot 1 \]
                                2. unpow274.5%

                                  \[\leadsto e^{y.re \cdot \log \left(\sqrt{x.im \cdot x.im + \color{blue}{x.re \cdot x.re}}\right)} \cdot 1 \]
                                3. hypot-def74.5%

                                  \[\leadsto e^{y.re \cdot \log \color{blue}{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}} \cdot 1 \]
                              6. Simplified74.5%

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

                              if -8.1999999999999993 < y.re < 2.50000000000000009e-11

                              1. Initial program 46.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. Simplified86.1%

                                  \[\leadsto \color{blue}{e^{\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot 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. Taylor expanded in y.im around 0 81.9%

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

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

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

                                    \[\leadsto e^{\color{blue}{-y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}} \cdot 1 \]
                                  2. distribute-rgt-neg-in81.8%

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

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

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

                              Alternative 10: 54.1% accurate, 4.0× speedup?

                              \[\begin{array}{l} \\ e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)} \end{array} \]
                              (FPCore (x.re x.im y.re y.im)
                               :precision binary64
                               (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) {
                              	return exp((atan2(x_46_im, x_46_re) * -y_46_im));
                              }
                              
                              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 = exp((atan2(x_46im, x_46re) * -y_46im))
                              end function
                              
                              public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
                              	return Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im));
                              }
                              
                              def code(x_46_re, x_46_im, y_46_re, y_46_im):
                              	return math.exp((math.atan2(x_46_im, x_46_re) * -y_46_im))
                              
                              function code(x_46_re, x_46_im, y_46_re, y_46_im)
                              	return exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))
                              end
                              
                              function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im)
                              	tmp = exp((atan2(x_46_im, x_46_re) * -y_46_im));
                              end
                              
                              code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]
                              
                              \begin{array}{l}
                              
                              \\
                              e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}
                              \end{array}
                              
                              Derivation
                              1. Initial program 42.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. Simplified82.2%

                                  \[\leadsto \color{blue}{e^{\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot 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. Taylor expanded in y.im around 0 80.8%

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

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

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

                                    \[\leadsto e^{\color{blue}{-y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}} \cdot 1 \]
                                  2. distribute-rgt-neg-in44.1%

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

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

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

                                Alternative 11: 30.0% accurate, 4.1× speedup?

                                \[\begin{array}{l} \\ e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \end{array} \]
                                (FPCore (x.re x.im y.re y.im)
                                 :precision binary64
                                 (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) {
                                	return exp((atan2(x_46_im, x_46_re) * y_46_im));
                                }
                                
                                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 = exp((atan2(x_46im, x_46re) * y_46im))
                                end function
                                
                                public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
                                	return Math.exp((Math.atan2(x_46_im, x_46_re) * y_46_im));
                                }
                                
                                def code(x_46_re, x_46_im, y_46_re, y_46_im):
                                	return math.exp((math.atan2(x_46_im, x_46_re) * y_46_im))
                                
                                function code(x_46_re, x_46_im, y_46_re, y_46_im)
                                	return exp(Float64(atan(x_46_im, x_46_re) * y_46_im))
                                end
                                
                                function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im)
                                	tmp = exp((atan2(x_46_im, x_46_re) * y_46_im));
                                end
                                
                                code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]], $MachinePrecision]
                                
                                \begin{array}{l}
                                
                                \\
                                e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}
                                \end{array}
                                
                                Derivation
                                1. Initial program 42.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. Simplified82.2%

                                    \[\leadsto \color{blue}{e^{\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot 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. Taylor expanded in y.im around 0 80.8%

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

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

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

                                      \[\leadsto e^{\color{blue}{-y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}} \cdot 1 \]
                                    2. distribute-rgt-neg-in44.1%

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

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

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

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

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

                                      \[\leadsto e^{y.im \cdot \color{blue}{\left(\sqrt{\tan^{-1}_* \frac{x.im}{x.re}} \cdot \sqrt{\tan^{-1}_* \frac{x.im}{x.re}}\right)}} \cdot 1 \]
                                    5. add-sqr-sqrt23.7%

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

                                      \[\leadsto e^{\color{blue}{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}} \cdot 1 \]
                                    7. expm1-log1p-u19.5%

                                      \[\leadsto e^{\color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\right)\right)}} \cdot 1 \]
                                    8. expm1-udef19.5%

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

                                    \[\leadsto e^{\color{blue}{e^{\mathsf{log1p}\left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\right)} - 1}} \cdot 1 \]
                                  9. Step-by-step derivation
                                    1. expm1-def19.5%

                                      \[\leadsto e^{\color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\right)\right)}} \cdot 1 \]
                                    2. expm1-log1p23.7%

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

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

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

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

                                  Reproduce

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