powComplex, real part

Percentage Accurate: 41.0% → 80.6%
Time: 19.3s
Alternatives: 9
Speedup: 2.7×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 9 alternatives:

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

Initial Program: 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: 80.6% accurate, 1.0× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x.im < -1.02e9

    1. Initial program 40.8%

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

        \[\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 -inf 81.0%

        \[\leadsto e^{\color{blue}{-1 \cdot \left(y.re \cdot \log \left(\frac{-1}{x.im}\right)\right)} - \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) \]
      3. Step-by-step derivation
        1. mul-1-neg81.0%

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

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

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

        \[\leadsto e^{\color{blue}{\log \left(\frac{-1}{x.im}\right) \cdot \left(-y.re\right)} - \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) \]
      5. Taylor expanded in y.re around 0 41.5%

        \[\leadsto e^{\log \left(\frac{-1}{x.im}\right) \cdot \left(-y.re\right) - \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)} \]
      6. Step-by-step derivation
        1. +-commutative41.5%

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

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

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

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

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

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

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

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

          \[\leadsto e^{\log \left(\frac{-1}{x.im}\right) \cdot \left(-y.re\right) - \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) \]
        10. unpow241.5%

          \[\leadsto e^{\log \left(\frac{-1}{x.im}\right) \cdot \left(-y.re\right) - \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) \]
        11. hypot-def89.4%

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

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

      if -1.02e9 < x.im

      1. Initial program 40.7%

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

          \[\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. Step-by-step derivation
          1. log1p-expm1-u74.9%

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

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

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

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

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

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

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

          \[\leadsto e^{\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.re - \mathsf{log1p}\left(\mathsf{expm1}\left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)} \cdot \left(\color{blue}{1} - \left(y.re \cdot \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
        8. Step-by-step derivation
          1. log1p-expm1-u82.7%

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

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

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

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

      Alternative 2: 72.6% accurate, 1.3× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_0 := \log \left(\frac{-1}{x.im}\right) \cdot y.re\\ t_1 := \cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\ t_2 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\ t_3 := e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right) - t_0} \cdot t_1\\ \mathbf{if}\;x.im \leq -2.6 \cdot 10^{+26}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;x.im \leq -2.1 \cdot 10^{-153}:\\ \;\;\;\;t_1 \cdot e^{\left(\frac{y.re \cdot \left(x.re \cdot \left(x.re \cdot 0.5\right)\right)}{x.im \cdot x.im} - t_0\right) - t_2}\\ \mathbf{elif}\;x.im \leq -1.3 \cdot 10^{-295}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;x.im \leq 6 \cdot 10^{+72}:\\ \;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right) - t_2}\\ \mathbf{else}:\\ \;\;\;\;\cos \left(y.im \cdot \log x.im + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot e^{y.re \cdot \log x.im - t_2}\\ \end{array} \end{array} \]
      (FPCore (x.re x.im y.re y.im)
       :precision binary64
       (let* ((t_0 (* (log (/ -1.0 x.im)) y.re))
              (t_1 (cos (* y.im (log (hypot x.im x.re)))))
              (t_2 (* (atan2 x.im x.re) y.im))
              (t_3 (* (exp (- (* (atan2 x.im x.re) (- y.im)) t_0)) t_1)))
         (if (<= x.im -2.6e+26)
           t_3
           (if (<= x.im -2.1e-153)
             (*
              t_1
              (exp (- (- (/ (* y.re (* x.re (* x.re 0.5))) (* x.im x.im)) t_0) t_2)))
             (if (<= x.im -1.3e-295)
               t_3
               (if (<= x.im 6e+72)
                 (exp (- (* y.re (log (sqrt (+ (* x.im x.im) (* x.re x.re))))) t_2))
                 (*
                  (cos (+ (* y.im (log x.im)) (* y.re (atan2 x.im x.re))))
                  (exp (- (* y.re (log x.im)) t_2)))))))))
      double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
      	double t_0 = log((-1.0 / x_46_im)) * y_46_re;
      	double t_1 = cos((y_46_im * log(hypot(x_46_im, x_46_re))));
      	double t_2 = atan2(x_46_im, x_46_re) * y_46_im;
      	double t_3 = exp(((atan2(x_46_im, x_46_re) * -y_46_im) - t_0)) * t_1;
      	double tmp;
      	if (x_46_im <= -2.6e+26) {
      		tmp = t_3;
      	} else if (x_46_im <= -2.1e-153) {
      		tmp = t_1 * exp(((((y_46_re * (x_46_re * (x_46_re * 0.5))) / (x_46_im * x_46_im)) - t_0) - t_2));
      	} else if (x_46_im <= -1.3e-295) {
      		tmp = t_3;
      	} else if (x_46_im <= 6e+72) {
      		tmp = exp(((y_46_re * log(sqrt(((x_46_im * x_46_im) + (x_46_re * x_46_re))))) - t_2));
      	} else {
      		tmp = cos(((y_46_im * log(x_46_im)) + (y_46_re * atan2(x_46_im, x_46_re)))) * exp(((y_46_re * log(x_46_im)) - t_2));
      	}
      	return tmp;
      }
      
      public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
      	double t_0 = Math.log((-1.0 / x_46_im)) * y_46_re;
      	double t_1 = Math.cos((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re))));
      	double t_2 = Math.atan2(x_46_im, x_46_re) * y_46_im;
      	double t_3 = Math.exp(((Math.atan2(x_46_im, x_46_re) * -y_46_im) - t_0)) * t_1;
      	double tmp;
      	if (x_46_im <= -2.6e+26) {
      		tmp = t_3;
      	} else if (x_46_im <= -2.1e-153) {
      		tmp = t_1 * Math.exp(((((y_46_re * (x_46_re * (x_46_re * 0.5))) / (x_46_im * x_46_im)) - t_0) - t_2));
      	} else if (x_46_im <= -1.3e-295) {
      		tmp = t_3;
      	} else if (x_46_im <= 6e+72) {
      		tmp = Math.exp(((y_46_re * Math.log(Math.sqrt(((x_46_im * x_46_im) + (x_46_re * x_46_re))))) - t_2));
      	} else {
      		tmp = Math.cos(((y_46_im * Math.log(x_46_im)) + (y_46_re * Math.atan2(x_46_im, x_46_re)))) * Math.exp(((y_46_re * Math.log(x_46_im)) - t_2));
      	}
      	return tmp;
      }
      
      def code(x_46_re, x_46_im, y_46_re, y_46_im):
      	t_0 = math.log((-1.0 / x_46_im)) * y_46_re
      	t_1 = math.cos((y_46_im * math.log(math.hypot(x_46_im, x_46_re))))
      	t_2 = math.atan2(x_46_im, x_46_re) * y_46_im
      	t_3 = math.exp(((math.atan2(x_46_im, x_46_re) * -y_46_im) - t_0)) * t_1
      	tmp = 0
      	if x_46_im <= -2.6e+26:
      		tmp = t_3
      	elif x_46_im <= -2.1e-153:
      		tmp = t_1 * math.exp(((((y_46_re * (x_46_re * (x_46_re * 0.5))) / (x_46_im * x_46_im)) - t_0) - t_2))
      	elif x_46_im <= -1.3e-295:
      		tmp = t_3
      	elif x_46_im <= 6e+72:
      		tmp = math.exp(((y_46_re * math.log(math.sqrt(((x_46_im * x_46_im) + (x_46_re * x_46_re))))) - t_2))
      	else:
      		tmp = math.cos(((y_46_im * math.log(x_46_im)) + (y_46_re * math.atan2(x_46_im, x_46_re)))) * math.exp(((y_46_re * math.log(x_46_im)) - t_2))
      	return tmp
      
      function code(x_46_re, x_46_im, y_46_re, y_46_im)
      	t_0 = Float64(log(Float64(-1.0 / x_46_im)) * y_46_re)
      	t_1 = cos(Float64(y_46_im * log(hypot(x_46_im, x_46_re))))
      	t_2 = Float64(atan(x_46_im, x_46_re) * y_46_im)
      	t_3 = Float64(exp(Float64(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)) - t_0)) * t_1)
      	tmp = 0.0
      	if (x_46_im <= -2.6e+26)
      		tmp = t_3;
      	elseif (x_46_im <= -2.1e-153)
      		tmp = Float64(t_1 * exp(Float64(Float64(Float64(Float64(y_46_re * Float64(x_46_re * Float64(x_46_re * 0.5))) / Float64(x_46_im * x_46_im)) - t_0) - t_2)));
      	elseif (x_46_im <= -1.3e-295)
      		tmp = t_3;
      	elseif (x_46_im <= 6e+72)
      		tmp = exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_im * x_46_im) + Float64(x_46_re * x_46_re))))) - t_2));
      	else
      		tmp = Float64(cos(Float64(Float64(y_46_im * log(x_46_im)) + Float64(y_46_re * atan(x_46_im, x_46_re)))) * exp(Float64(Float64(y_46_re * log(x_46_im)) - t_2)));
      	end
      	return tmp
      end
      
      function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im)
      	t_0 = log((-1.0 / x_46_im)) * y_46_re;
      	t_1 = cos((y_46_im * log(hypot(x_46_im, x_46_re))));
      	t_2 = atan2(x_46_im, x_46_re) * y_46_im;
      	t_3 = exp(((atan2(x_46_im, x_46_re) * -y_46_im) - t_0)) * t_1;
      	tmp = 0.0;
      	if (x_46_im <= -2.6e+26)
      		tmp = t_3;
      	elseif (x_46_im <= -2.1e-153)
      		tmp = t_1 * exp(((((y_46_re * (x_46_re * (x_46_re * 0.5))) / (x_46_im * x_46_im)) - t_0) - t_2));
      	elseif (x_46_im <= -1.3e-295)
      		tmp = t_3;
      	elseif (x_46_im <= 6e+72)
      		tmp = exp(((y_46_re * log(sqrt(((x_46_im * x_46_im) + (x_46_re * x_46_re))))) - t_2));
      	else
      		tmp = cos(((y_46_im * log(x_46_im)) + (y_46_re * atan2(x_46_im, x_46_re)))) * exp(((y_46_re * log(x_46_im)) - t_2));
      	end
      	tmp_2 = tmp;
      end
      
      code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[Log[N[(-1.0 / x$46$im), $MachinePrecision]], $MachinePrecision] * y$46$re), $MachinePrecision]}, Block[{t$95$1 = N[Cos[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, Block[{t$95$3 = N[(N[Exp[N[(N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision] * t$95$1), $MachinePrecision]}, If[LessEqual[x$46$im, -2.6e+26], t$95$3, If[LessEqual[x$46$im, -2.1e-153], N[(t$95$1 * N[Exp[N[(N[(N[(N[(y$46$re * N[(x$46$re * N[(x$46$re * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision] - t$95$2), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$im, -1.3e-295], t$95$3, If[LessEqual[x$46$im, 6e+72], N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$im * x$46$im), $MachinePrecision] + N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision]], $MachinePrecision], N[(N[Cos[N[(N[(y$46$im * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision] + N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Exp[N[(N[(y$46$re * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_0 := \log \left(\frac{-1}{x.im}\right) \cdot y.re\\
      t_1 := \cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
      t_2 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
      t_3 := e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right) - t_0} \cdot t_1\\
      \mathbf{if}\;x.im \leq -2.6 \cdot 10^{+26}:\\
      \;\;\;\;t_3\\
      
      \mathbf{elif}\;x.im \leq -2.1 \cdot 10^{-153}:\\
      \;\;\;\;t_1 \cdot e^{\left(\frac{y.re \cdot \left(x.re \cdot \left(x.re \cdot 0.5\right)\right)}{x.im \cdot x.im} - t_0\right) - t_2}\\
      
      \mathbf{elif}\;x.im \leq -1.3 \cdot 10^{-295}:\\
      \;\;\;\;t_3\\
      
      \mathbf{elif}\;x.im \leq 6 \cdot 10^{+72}:\\
      \;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right) - t_2}\\
      
      \mathbf{else}:\\
      \;\;\;\;\cos \left(y.im \cdot \log x.im + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot e^{y.re \cdot \log x.im - t_2}\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 4 regimes
      2. if x.im < -2.60000000000000002e26 or -2.10000000000000004e-153 < x.im < -1.29999999999999993e-295

        1. Initial program 34.7%

          \[e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \]
        2. Step-by-step derivation
          1. Simplified82.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.im around -inf 80.3%

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

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

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

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

            \[\leadsto e^{\color{blue}{\log \left(\frac{-1}{x.im}\right) \cdot \left(-y.re\right)} - \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) \]
          5. Taylor expanded in y.re around 0 35.1%

            \[\leadsto e^{\log \left(\frac{-1}{x.im}\right) \cdot \left(-y.re\right) - \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)} \]
          6. Step-by-step derivation
            1. +-commutative35.1%

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

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

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

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

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

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

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

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

              \[\leadsto e^{\log \left(\frac{-1}{x.im}\right) \cdot \left(-y.re\right) - \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) \]
            10. unpow235.1%

              \[\leadsto e^{\log \left(\frac{-1}{x.im}\right) \cdot \left(-y.re\right) - \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) \]
            11. hypot-def87.7%

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

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

          if -2.60000000000000002e26 < x.im < -2.10000000000000004e-153

          1. Initial program 61.8%

            \[e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \]
          2. Step-by-step derivation
            1. Simplified79.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 x.im around -inf 73.9%

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

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

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

                \[\leadsto e^{\color{blue}{\left(0.5 \cdot \frac{{x.re}^{2} \cdot y.re}{{x.im}^{2}} - y.re \cdot \log \left(\frac{-1}{x.im}\right)\right)} - \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) \]
              4. associate-*r/73.9%

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

                \[\leadsto e^{\left(\frac{0.5 \cdot \left({x.re}^{2} \cdot y.re\right)}{\color{blue}{x.im \cdot x.im}} - y.re \cdot \log \left(\frac{-1}{x.im}\right)\right) - \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) \]
              6. associate-*r*73.9%

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

                \[\leadsto e^{\left(\frac{\left(0.5 \cdot \color{blue}{\left(x.re \cdot x.re\right)}\right) \cdot y.re}{x.im \cdot x.im} - y.re \cdot \log \left(\frac{-1}{x.im}\right)\right) - \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) \]
              8. associate-*r*73.9%

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

              \[\leadsto e^{\color{blue}{\left(\frac{\left(\left(0.5 \cdot x.re\right) \cdot x.re\right) \cdot y.re}{x.im \cdot x.im} - y.re \cdot \log \left(\frac{-1}{x.im}\right)\right)} - \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) \]
            5. Taylor expanded in y.re around 0 61.8%

              \[\leadsto e^{\left(\frac{\left(\left(0.5 \cdot x.re\right) \cdot x.re\right) \cdot y.re}{x.im \cdot x.im} - y.re \cdot \log \left(\frac{-1}{x.im}\right)\right) - \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)} \]
            6. Step-by-step derivation
              1. +-commutative47.3%

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

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

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

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

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

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

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

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

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

                \[\leadsto e^{\log \left(\frac{-1}{x.im}\right) \cdot \left(-y.re\right) - \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) \]
              11. hypot-def59.2%

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

              \[\leadsto e^{\left(\frac{\left(\left(0.5 \cdot x.re\right) \cdot x.re\right) \cdot y.re}{x.im \cdot x.im} - y.re \cdot \log \left(\frac{-1}{x.im}\right)\right) - \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)} \]

            if -1.29999999999999993e-295 < x.im < 6.00000000000000006e72

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

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

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

            if 6.00000000000000006e72 < x.im

            1. Initial program 22.8%

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

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

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

            \[\leadsto \begin{array}{l} \mathbf{if}\;x.im \leq -2.6 \cdot 10^{+26}:\\ \;\;\;\;e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right) - \log \left(\frac{-1}{x.im}\right) \cdot y.re} \cdot \cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\ \mathbf{elif}\;x.im \leq -2.1 \cdot 10^{-153}:\\ \;\;\;\;\cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \cdot e^{\left(\frac{y.re \cdot \left(x.re \cdot \left(x.re \cdot 0.5\right)\right)}{x.im \cdot x.im} - \log \left(\frac{-1}{x.im}\right) \cdot y.re\right) - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\ \mathbf{elif}\;x.im \leq -1.3 \cdot 10^{-295}:\\ \;\;\;\;e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right) - \log \left(\frac{-1}{x.im}\right) \cdot y.re} \cdot \cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\ \mathbf{elif}\;x.im \leq 6 \cdot 10^{+72}:\\ \;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right) - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\ \mathbf{else}:\\ \;\;\;\;\cos \left(y.im \cdot \log x.im + 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 3: 72.7% accurate, 1.3× speedup?

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

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

                \[\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 -inf 81.1%

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

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

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

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

                \[\leadsto e^{\color{blue}{\log \left(\frac{-1}{x.im}\right) \cdot \left(-y.re\right)} - \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) \]
              5. Taylor expanded in y.re around 0 39.7%

                \[\leadsto e^{\log \left(\frac{-1}{x.im}\right) \cdot \left(-y.re\right) - \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)} \]
              6. Step-by-step derivation
                1. +-commutative39.7%

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

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

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

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

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

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

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

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

                  \[\leadsto e^{\log \left(\frac{-1}{x.im}\right) \cdot \left(-y.re\right) - \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) \]
                10. unpow239.7%

                  \[\leadsto e^{\log \left(\frac{-1}{x.im}\right) \cdot \left(-y.re\right) - \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) \]
                11. hypot-def88.8%

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

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

              if -2.79999999999999993e-47 < x.im < -3.99999999999999995e-159

              1. Initial program 52.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. Simplified80.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.im around -inf 68.5%

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

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

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

                    \[\leadsto e^{\color{blue}{\left(0.5 \cdot \frac{{x.re}^{2} \cdot y.re}{{x.im}^{2}} - y.re \cdot \log \left(\frac{-1}{x.im}\right)\right)} - \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) \]
                  4. associate-*r/68.5%

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

                    \[\leadsto e^{\left(\frac{0.5 \cdot \left({x.re}^{2} \cdot y.re\right)}{\color{blue}{x.im \cdot x.im}} - y.re \cdot \log \left(\frac{-1}{x.im}\right)\right) - \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) \]
                  6. associate-*r*68.5%

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

                    \[\leadsto e^{\left(\frac{\left(0.5 \cdot \color{blue}{\left(x.re \cdot x.re\right)}\right) \cdot y.re}{x.im \cdot x.im} - y.re \cdot \log \left(\frac{-1}{x.im}\right)\right) - \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) \]
                  8. associate-*r*68.5%

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

                  \[\leadsto e^{\color{blue}{\left(\frac{\left(\left(0.5 \cdot x.re\right) \cdot x.re\right) \cdot y.re}{x.im \cdot x.im} - y.re \cdot \log \left(\frac{-1}{x.im}\right)\right)} - \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) \]
                5. Taylor expanded in y.im around 0 64.6%

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

                if -4.60000000000000004e-302 < x.im < 4.0000000000000003e69

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

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

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

                if 4.0000000000000003e69 < x.im

                1. Initial program 22.8%

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

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

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

                \[\leadsto \begin{array}{l} \mathbf{if}\;x.im \leq -2.8 \cdot 10^{-47}:\\ \;\;\;\;e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right) - \log \left(\frac{-1}{x.im}\right) \cdot y.re} \cdot \cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\ \mathbf{elif}\;x.im \leq -4 \cdot 10^{-159}:\\ \;\;\;\;e^{\left(\frac{y.re \cdot \left(x.re \cdot \left(x.re \cdot 0.5\right)\right)}{x.im \cdot x.im} - \log \left(\frac{-1}{x.im}\right) \cdot y.re\right) - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\ \mathbf{elif}\;x.im \leq -4.6 \cdot 10^{-302}:\\ \;\;\;\;e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right) - \log \left(\frac{-1}{x.im}\right) \cdot y.re} \cdot \cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\ \mathbf{elif}\;x.im \leq 4 \cdot 10^{+69}:\\ \;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right) - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\ \mathbf{else}:\\ \;\;\;\;\cos \left(y.im \cdot \log x.im + 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 4: 73.7% accurate, 1.3× speedup?

              \[\begin{array}{l} \\ \begin{array}{l} t_0 := \log \left(\frac{-1}{x.im}\right) \cdot y.re\\ t_1 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\ t_2 := e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right) - t_0} \cdot \cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\ \mathbf{if}\;x.im \leq -6.8 \cdot 10^{-37}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x.im \leq -2.7 \cdot 10^{-157}:\\ \;\;\;\;e^{\left(\frac{y.re \cdot \left(x.re \cdot \left(x.re \cdot 0.5\right)\right)}{x.im \cdot x.im} - t_0\right) - t_1} \cdot \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\ \mathbf{elif}\;x.im \leq -6 \cdot 10^{-309}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x.im \leq 0.00125:\\ \;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right) - t_1}\\ \mathbf{else}:\\ \;\;\;\;e^{y.re \cdot \log x.im - t_1}\\ \end{array} \end{array} \]
              (FPCore (x.re x.im y.re y.im)
               :precision binary64
               (let* ((t_0 (* (log (/ -1.0 x.im)) y.re))
                      (t_1 (* (atan2 x.im x.re) y.im))
                      (t_2
                       (*
                        (exp (- (* (atan2 x.im x.re) (- y.im)) t_0))
                        (cos (* y.im (log (hypot x.im x.re)))))))
                 (if (<= x.im -6.8e-37)
                   t_2
                   (if (<= x.im -2.7e-157)
                     (*
                      (exp (- (- (/ (* y.re (* x.re (* x.re 0.5))) (* x.im x.im)) t_0) t_1))
                      (cos (* y.re (atan2 x.im x.re))))
                     (if (<= x.im -6e-309)
                       t_2
                       (if (<= x.im 0.00125)
                         (exp (- (* y.re (log (sqrt (+ (* x.im x.im) (* x.re x.re))))) t_1))
                         (exp (- (* y.re (log x.im)) t_1))))))))
              double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
              	double t_0 = log((-1.0 / x_46_im)) * y_46_re;
              	double t_1 = atan2(x_46_im, x_46_re) * y_46_im;
              	double t_2 = exp(((atan2(x_46_im, x_46_re) * -y_46_im) - t_0)) * cos((y_46_im * log(hypot(x_46_im, x_46_re))));
              	double tmp;
              	if (x_46_im <= -6.8e-37) {
              		tmp = t_2;
              	} else if (x_46_im <= -2.7e-157) {
              		tmp = exp(((((y_46_re * (x_46_re * (x_46_re * 0.5))) / (x_46_im * x_46_im)) - t_0) - t_1)) * cos((y_46_re * atan2(x_46_im, x_46_re)));
              	} else if (x_46_im <= -6e-309) {
              		tmp = t_2;
              	} else if (x_46_im <= 0.00125) {
              		tmp = exp(((y_46_re * log(sqrt(((x_46_im * x_46_im) + (x_46_re * x_46_re))))) - t_1));
              	} else {
              		tmp = exp(((y_46_re * log(x_46_im)) - 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((-1.0 / x_46_im)) * y_46_re;
              	double t_1 = Math.atan2(x_46_im, x_46_re) * y_46_im;
              	double t_2 = Math.exp(((Math.atan2(x_46_im, x_46_re) * -y_46_im) - t_0)) * Math.cos((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re))));
              	double tmp;
              	if (x_46_im <= -6.8e-37) {
              		tmp = t_2;
              	} else if (x_46_im <= -2.7e-157) {
              		tmp = Math.exp(((((y_46_re * (x_46_re * (x_46_re * 0.5))) / (x_46_im * x_46_im)) - t_0) - t_1)) * Math.cos((y_46_re * Math.atan2(x_46_im, x_46_re)));
              	} else if (x_46_im <= -6e-309) {
              		tmp = t_2;
              	} else if (x_46_im <= 0.00125) {
              		tmp = Math.exp(((y_46_re * Math.log(Math.sqrt(((x_46_im * x_46_im) + (x_46_re * x_46_re))))) - t_1));
              	} else {
              		tmp = Math.exp(((y_46_re * Math.log(x_46_im)) - t_1));
              	}
              	return tmp;
              }
              
              def code(x_46_re, x_46_im, y_46_re, y_46_im):
              	t_0 = math.log((-1.0 / x_46_im)) * y_46_re
              	t_1 = math.atan2(x_46_im, x_46_re) * y_46_im
              	t_2 = math.exp(((math.atan2(x_46_im, x_46_re) * -y_46_im) - t_0)) * math.cos((y_46_im * math.log(math.hypot(x_46_im, x_46_re))))
              	tmp = 0
              	if x_46_im <= -6.8e-37:
              		tmp = t_2
              	elif x_46_im <= -2.7e-157:
              		tmp = math.exp(((((y_46_re * (x_46_re * (x_46_re * 0.5))) / (x_46_im * x_46_im)) - t_0) - t_1)) * math.cos((y_46_re * math.atan2(x_46_im, x_46_re)))
              	elif x_46_im <= -6e-309:
              		tmp = t_2
              	elif x_46_im <= 0.00125:
              		tmp = math.exp(((y_46_re * math.log(math.sqrt(((x_46_im * x_46_im) + (x_46_re * x_46_re))))) - t_1))
              	else:
              		tmp = math.exp(((y_46_re * math.log(x_46_im)) - t_1))
              	return tmp
              
              function code(x_46_re, x_46_im, y_46_re, y_46_im)
              	t_0 = Float64(log(Float64(-1.0 / x_46_im)) * y_46_re)
              	t_1 = Float64(atan(x_46_im, x_46_re) * y_46_im)
              	t_2 = Float64(exp(Float64(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)) - t_0)) * cos(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))))
              	tmp = 0.0
              	if (x_46_im <= -6.8e-37)
              		tmp = t_2;
              	elseif (x_46_im <= -2.7e-157)
              		tmp = Float64(exp(Float64(Float64(Float64(Float64(y_46_re * Float64(x_46_re * Float64(x_46_re * 0.5))) / Float64(x_46_im * x_46_im)) - t_0) - t_1)) * cos(Float64(y_46_re * atan(x_46_im, x_46_re))));
              	elseif (x_46_im <= -6e-309)
              		tmp = t_2;
              	elseif (x_46_im <= 0.00125)
              		tmp = exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_im * x_46_im) + Float64(x_46_re * x_46_re))))) - t_1));
              	else
              		tmp = exp(Float64(Float64(y_46_re * log(x_46_im)) - 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((-1.0 / x_46_im)) * y_46_re;
              	t_1 = atan2(x_46_im, x_46_re) * y_46_im;
              	t_2 = exp(((atan2(x_46_im, x_46_re) * -y_46_im) - t_0)) * cos((y_46_im * log(hypot(x_46_im, x_46_re))));
              	tmp = 0.0;
              	if (x_46_im <= -6.8e-37)
              		tmp = t_2;
              	elseif (x_46_im <= -2.7e-157)
              		tmp = exp(((((y_46_re * (x_46_re * (x_46_re * 0.5))) / (x_46_im * x_46_im)) - t_0) - t_1)) * cos((y_46_re * atan2(x_46_im, x_46_re)));
              	elseif (x_46_im <= -6e-309)
              		tmp = t_2;
              	elseif (x_46_im <= 0.00125)
              		tmp = exp(((y_46_re * log(sqrt(((x_46_im * x_46_im) + (x_46_re * x_46_re))))) - t_1));
              	else
              		tmp = exp(((y_46_re * log(x_46_im)) - 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[(-1.0 / x$46$im), $MachinePrecision]], $MachinePrecision] * y$46$re), $MachinePrecision]}, Block[{t$95$1 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, Block[{t$95$2 = N[(N[Exp[N[(N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision] * N[Cos[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x$46$im, -6.8e-37], t$95$2, If[LessEqual[x$46$im, -2.7e-157], N[(N[Exp[N[(N[(N[(N[(y$46$re * N[(x$46$re * N[(x$46$re * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision] - t$95$1), $MachinePrecision]], $MachinePrecision] * N[Cos[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$im, -6e-309], t$95$2, If[LessEqual[x$46$im, 0.00125], N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$im * x$46$im), $MachinePrecision] + N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]], $MachinePrecision], N[Exp[N[(N[(y$46$re * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]], $MachinePrecision]]]]]]]]
              
              \begin{array}{l}
              
              \\
              \begin{array}{l}
              t_0 := \log \left(\frac{-1}{x.im}\right) \cdot y.re\\
              t_1 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
              t_2 := e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right) - t_0} \cdot \cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
              \mathbf{if}\;x.im \leq -6.8 \cdot 10^{-37}:\\
              \;\;\;\;t_2\\
              
              \mathbf{elif}\;x.im \leq -2.7 \cdot 10^{-157}:\\
              \;\;\;\;e^{\left(\frac{y.re \cdot \left(x.re \cdot \left(x.re \cdot 0.5\right)\right)}{x.im \cdot x.im} - t_0\right) - t_1} \cdot \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
              
              \mathbf{elif}\;x.im \leq -6 \cdot 10^{-309}:\\
              \;\;\;\;t_2\\
              
              \mathbf{elif}\;x.im \leq 0.00125:\\
              \;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right) - t_1}\\
              
              \mathbf{else}:\\
              \;\;\;\;e^{y.re \cdot \log x.im - t_1}\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 4 regimes
              2. if x.im < -6.80000000000000037e-37 or -2.7e-157 < x.im < -6.000000000000001e-309

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

                    \[\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 -inf 81.1%

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

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

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

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

                    \[\leadsto e^{\color{blue}{\log \left(\frac{-1}{x.im}\right) \cdot \left(-y.re\right)} - \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) \]
                  5. Taylor expanded in y.re around 0 39.7%

                    \[\leadsto e^{\log \left(\frac{-1}{x.im}\right) \cdot \left(-y.re\right) - \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)} \]
                  6. Step-by-step derivation
                    1. +-commutative39.7%

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

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

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

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

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

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

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

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

                      \[\leadsto e^{\log \left(\frac{-1}{x.im}\right) \cdot \left(-y.re\right) - \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) \]
                    10. unpow239.7%

                      \[\leadsto e^{\log \left(\frac{-1}{x.im}\right) \cdot \left(-y.re\right) - \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) \]
                    11. hypot-def88.8%

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

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

                  if -6.80000000000000037e-37 < x.im < -2.7e-157

                  1. Initial program 52.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. Simplified80.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.im around -inf 68.5%

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

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

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

                        \[\leadsto e^{\color{blue}{\left(0.5 \cdot \frac{{x.re}^{2} \cdot y.re}{{x.im}^{2}} - y.re \cdot \log \left(\frac{-1}{x.im}\right)\right)} - \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) \]
                      4. associate-*r/68.5%

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

                        \[\leadsto e^{\left(\frac{0.5 \cdot \left({x.re}^{2} \cdot y.re\right)}{\color{blue}{x.im \cdot x.im}} - y.re \cdot \log \left(\frac{-1}{x.im}\right)\right) - \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) \]
                      6. associate-*r*68.5%

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

                        \[\leadsto e^{\left(\frac{\left(0.5 \cdot \color{blue}{\left(x.re \cdot x.re\right)}\right) \cdot y.re}{x.im \cdot x.im} - y.re \cdot \log \left(\frac{-1}{x.im}\right)\right) - \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) \]
                      8. associate-*r*68.5%

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

                      \[\leadsto e^{\color{blue}{\left(\frac{\left(\left(0.5 \cdot x.re\right) \cdot x.re\right) \cdot y.re}{x.im \cdot x.im} - y.re \cdot \log \left(\frac{-1}{x.im}\right)\right)} - \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) \]
                    5. Taylor expanded in y.im around 0 64.6%

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

                    if -6.000000000000001e-309 < x.im < 0.00125000000000000003

                    1. Initial program 51.2%

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

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

                    if 0.00125000000000000003 < x.im

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

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

                      \[\leadsto e^{\color{blue}{y.re \cdot \log x.im} - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot 1 \]
                    5. Step-by-step derivation
                      1. *-commutative86.8%

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

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

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

                  Alternative 5: 72.8% accurate, 1.6× speedup?

                  \[\begin{array}{l} \\ \begin{array}{l} t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\ t_1 := e^{y.re \cdot \log \left(-x.im\right) - t_0}\\ \mathbf{if}\;x.im \leq -7 \cdot 10^{+56}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x.im \leq -1.06 \cdot 10^{-157}:\\ \;\;\;\;e^{\left(\frac{y.re \cdot \left(x.re \cdot \left(x.re \cdot 0.5\right)\right)}{x.im \cdot x.im} - \log \left(\frac{-1}{x.im}\right) \cdot y.re\right) - t_0} \cdot \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\ \mathbf{elif}\;x.im \leq -2 \cdot 10^{-308}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x.im \leq 0.002:\\ \;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right) - t_0}\\ \mathbf{else}:\\ \;\;\;\;e^{y.re \cdot \log x.im - t_0}\\ \end{array} \end{array} \]
                  (FPCore (x.re x.im y.re y.im)
                   :precision binary64
                   (let* ((t_0 (* (atan2 x.im x.re) y.im))
                          (t_1 (exp (- (* y.re (log (- x.im))) t_0))))
                     (if (<= x.im -7e+56)
                       t_1
                       (if (<= x.im -1.06e-157)
                         (*
                          (exp
                           (-
                            (-
                             (/ (* y.re (* x.re (* x.re 0.5))) (* x.im x.im))
                             (* (log (/ -1.0 x.im)) y.re))
                            t_0))
                          (cos (* y.re (atan2 x.im x.re))))
                         (if (<= x.im -2e-308)
                           t_1
                           (if (<= x.im 0.002)
                             (exp (- (* y.re (log (sqrt (+ (* x.im x.im) (* x.re x.re))))) t_0))
                             (exp (- (* y.re (log x.im)) t_0))))))))
                  double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
                  	double t_0 = atan2(x_46_im, x_46_re) * y_46_im;
                  	double t_1 = exp(((y_46_re * log(-x_46_im)) - t_0));
                  	double tmp;
                  	if (x_46_im <= -7e+56) {
                  		tmp = t_1;
                  	} else if (x_46_im <= -1.06e-157) {
                  		tmp = exp(((((y_46_re * (x_46_re * (x_46_re * 0.5))) / (x_46_im * x_46_im)) - (log((-1.0 / x_46_im)) * y_46_re)) - t_0)) * cos((y_46_re * atan2(x_46_im, x_46_re)));
                  	} else if (x_46_im <= -2e-308) {
                  		tmp = t_1;
                  	} else if (x_46_im <= 0.002) {
                  		tmp = exp(((y_46_re * log(sqrt(((x_46_im * x_46_im) + (x_46_re * x_46_re))))) - t_0));
                  	} else {
                  		tmp = exp(((y_46_re * log(x_46_im)) - t_0));
                  	}
                  	return tmp;
                  }
                  
                  real(8) function code(x_46re, x_46im, y_46re, y_46im)
                      real(8), intent (in) :: x_46re
                      real(8), intent (in) :: x_46im
                      real(8), intent (in) :: y_46re
                      real(8), intent (in) :: y_46im
                      real(8) :: t_0
                      real(8) :: t_1
                      real(8) :: tmp
                      t_0 = atan2(x_46im, x_46re) * y_46im
                      t_1 = exp(((y_46re * log(-x_46im)) - t_0))
                      if (x_46im <= (-7d+56)) then
                          tmp = t_1
                      else if (x_46im <= (-1.06d-157)) then
                          tmp = exp(((((y_46re * (x_46re * (x_46re * 0.5d0))) / (x_46im * x_46im)) - (log(((-1.0d0) / x_46im)) * y_46re)) - t_0)) * cos((y_46re * atan2(x_46im, x_46re)))
                      else if (x_46im <= (-2d-308)) then
                          tmp = t_1
                      else if (x_46im <= 0.002d0) then
                          tmp = exp(((y_46re * log(sqrt(((x_46im * x_46im) + (x_46re * x_46re))))) - t_0))
                      else
                          tmp = exp(((y_46re * log(x_46im)) - t_0))
                      end if
                      code = tmp
                  end function
                  
                  public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
                  	double t_0 = Math.atan2(x_46_im, x_46_re) * y_46_im;
                  	double t_1 = Math.exp(((y_46_re * Math.log(-x_46_im)) - t_0));
                  	double tmp;
                  	if (x_46_im <= -7e+56) {
                  		tmp = t_1;
                  	} else if (x_46_im <= -1.06e-157) {
                  		tmp = Math.exp(((((y_46_re * (x_46_re * (x_46_re * 0.5))) / (x_46_im * x_46_im)) - (Math.log((-1.0 / x_46_im)) * y_46_re)) - t_0)) * Math.cos((y_46_re * Math.atan2(x_46_im, x_46_re)));
                  	} else if (x_46_im <= -2e-308) {
                  		tmp = t_1;
                  	} else if (x_46_im <= 0.002) {
                  		tmp = Math.exp(((y_46_re * Math.log(Math.sqrt(((x_46_im * x_46_im) + (x_46_re * x_46_re))))) - t_0));
                  	} else {
                  		tmp = Math.exp(((y_46_re * Math.log(x_46_im)) - t_0));
                  	}
                  	return tmp;
                  }
                  
                  def code(x_46_re, x_46_im, y_46_re, y_46_im):
                  	t_0 = math.atan2(x_46_im, x_46_re) * y_46_im
                  	t_1 = math.exp(((y_46_re * math.log(-x_46_im)) - t_0))
                  	tmp = 0
                  	if x_46_im <= -7e+56:
                  		tmp = t_1
                  	elif x_46_im <= -1.06e-157:
                  		tmp = math.exp(((((y_46_re * (x_46_re * (x_46_re * 0.5))) / (x_46_im * x_46_im)) - (math.log((-1.0 / x_46_im)) * y_46_re)) - t_0)) * math.cos((y_46_re * math.atan2(x_46_im, x_46_re)))
                  	elif x_46_im <= -2e-308:
                  		tmp = t_1
                  	elif x_46_im <= 0.002:
                  		tmp = math.exp(((y_46_re * math.log(math.sqrt(((x_46_im * x_46_im) + (x_46_re * x_46_re))))) - t_0))
                  	else:
                  		tmp = math.exp(((y_46_re * math.log(x_46_im)) - t_0))
                  	return tmp
                  
                  function code(x_46_re, x_46_im, y_46_re, y_46_im)
                  	t_0 = Float64(atan(x_46_im, x_46_re) * y_46_im)
                  	t_1 = exp(Float64(Float64(y_46_re * log(Float64(-x_46_im))) - t_0))
                  	tmp = 0.0
                  	if (x_46_im <= -7e+56)
                  		tmp = t_1;
                  	elseif (x_46_im <= -1.06e-157)
                  		tmp = Float64(exp(Float64(Float64(Float64(Float64(y_46_re * Float64(x_46_re * Float64(x_46_re * 0.5))) / Float64(x_46_im * x_46_im)) - Float64(log(Float64(-1.0 / x_46_im)) * y_46_re)) - t_0)) * cos(Float64(y_46_re * atan(x_46_im, x_46_re))));
                  	elseif (x_46_im <= -2e-308)
                  		tmp = t_1;
                  	elseif (x_46_im <= 0.002)
                  		tmp = exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_im * x_46_im) + Float64(x_46_re * x_46_re))))) - t_0));
                  	else
                  		tmp = exp(Float64(Float64(y_46_re * log(x_46_im)) - t_0));
                  	end
                  	return tmp
                  end
                  
                  function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im)
                  	t_0 = atan2(x_46_im, x_46_re) * y_46_im;
                  	t_1 = exp(((y_46_re * log(-x_46_im)) - t_0));
                  	tmp = 0.0;
                  	if (x_46_im <= -7e+56)
                  		tmp = t_1;
                  	elseif (x_46_im <= -1.06e-157)
                  		tmp = exp(((((y_46_re * (x_46_re * (x_46_re * 0.5))) / (x_46_im * x_46_im)) - (log((-1.0 / x_46_im)) * y_46_re)) - t_0)) * cos((y_46_re * atan2(x_46_im, x_46_re)));
                  	elseif (x_46_im <= -2e-308)
                  		tmp = t_1;
                  	elseif (x_46_im <= 0.002)
                  		tmp = exp(((y_46_re * log(sqrt(((x_46_im * x_46_im) + (x_46_re * x_46_re))))) - t_0));
                  	else
                  		tmp = exp(((y_46_re * log(x_46_im)) - t_0));
                  	end
                  	tmp_2 = tmp;
                  end
                  
                  code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, Block[{t$95$1 = N[Exp[N[(N[(y$46$re * N[Log[(-x$46$im)], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[x$46$im, -7e+56], t$95$1, If[LessEqual[x$46$im, -1.06e-157], N[(N[Exp[N[(N[(N[(N[(y$46$re * N[(x$46$re * N[(x$46$re * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision] - N[(N[Log[N[(-1.0 / x$46$im), $MachinePrecision]], $MachinePrecision] * y$46$re), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision] * N[Cos[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$im, -2e-308], t$95$1, If[LessEqual[x$46$im, 0.002], N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$im * x$46$im), $MachinePrecision] + N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision], N[Exp[N[(N[(y$46$re * N[Log[x$46$im], $MachinePrecision]), $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 := e^{y.re \cdot \log \left(-x.im\right) - t_0}\\
                  \mathbf{if}\;x.im \leq -7 \cdot 10^{+56}:\\
                  \;\;\;\;t_1\\
                  
                  \mathbf{elif}\;x.im \leq -1.06 \cdot 10^{-157}:\\
                  \;\;\;\;e^{\left(\frac{y.re \cdot \left(x.re \cdot \left(x.re \cdot 0.5\right)\right)}{x.im \cdot x.im} - \log \left(\frac{-1}{x.im}\right) \cdot y.re\right) - t_0} \cdot \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
                  
                  \mathbf{elif}\;x.im \leq -2 \cdot 10^{-308}:\\
                  \;\;\;\;t_1\\
                  
                  \mathbf{elif}\;x.im \leq 0.002:\\
                  \;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right) - t_0}\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;e^{y.re \cdot \log x.im - t_0}\\
                  
                  
                  \end{array}
                  \end{array}
                  
                  Derivation
                  1. Split input into 4 regimes
                  2. if x.im < -6.99999999999999999e56 or -1.06e-157 < x.im < -1.9999999999999998e-308

                    1. Initial program 31.0%

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

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

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

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

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

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

                    if -6.99999999999999999e56 < x.im < -1.06e-157

                    1. Initial program 62.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.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 -inf 73.7%

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

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

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

                          \[\leadsto e^{\color{blue}{\left(0.5 \cdot \frac{{x.re}^{2} \cdot y.re}{{x.im}^{2}} - y.re \cdot \log \left(\frac{-1}{x.im}\right)\right)} - \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) \]
                        4. associate-*r/73.7%

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

                          \[\leadsto e^{\left(\frac{0.5 \cdot \left({x.re}^{2} \cdot y.re\right)}{\color{blue}{x.im \cdot x.im}} - y.re \cdot \log \left(\frac{-1}{x.im}\right)\right) - \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) \]
                        6. associate-*r*73.7%

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

                          \[\leadsto e^{\left(\frac{\left(0.5 \cdot \color{blue}{\left(x.re \cdot x.re\right)}\right) \cdot y.re}{x.im \cdot x.im} - y.re \cdot \log \left(\frac{-1}{x.im}\right)\right) - \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) \]
                        8. associate-*r*73.7%

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

                        \[\leadsto e^{\color{blue}{\left(\frac{\left(\left(0.5 \cdot x.re\right) \cdot x.re\right) \cdot y.re}{x.im \cdot x.im} - y.re \cdot \log \left(\frac{-1}{x.im}\right)\right)} - \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) \]
                      5. Taylor expanded in y.im around 0 73.8%

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

                      if -1.9999999999999998e-308 < x.im < 2e-3

                      1. Initial program 51.2%

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

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

                      if 2e-3 < x.im

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

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

                        \[\leadsto e^{\color{blue}{y.re \cdot \log x.im} - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot 1 \]
                      5. Step-by-step derivation
                        1. *-commutative86.8%

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

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

                      \[\leadsto \begin{array}{l} \mathbf{if}\;x.im \leq -7 \cdot 10^{+56}:\\ \;\;\;\;e^{y.re \cdot \log \left(-x.im\right) - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\ \mathbf{elif}\;x.im \leq -1.06 \cdot 10^{-157}:\\ \;\;\;\;e^{\left(\frac{y.re \cdot \left(x.re \cdot \left(x.re \cdot 0.5\right)\right)}{x.im \cdot x.im} - \log \left(\frac{-1}{x.im}\right) \cdot y.re\right) - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\ \mathbf{elif}\;x.im \leq -2 \cdot 10^{-308}:\\ \;\;\;\;e^{y.re \cdot \log \left(-x.im\right) - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\ \mathbf{elif}\;x.im \leq 0.002:\\ \;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right) - \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}\\ \end{array} \]

                    Alternative 6: 73.8% accurate, 2.0× speedup?

                    \[\begin{array}{l} \\ \begin{array}{l} t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\ \mathbf{if}\;x.im \leq -3.2 \cdot 10^{-300}:\\ \;\;\;\;e^{y.re \cdot \log \left(-x.im\right) - t_0}\\ \mathbf{elif}\;x.im \leq 0.00017:\\ \;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right) - t_0}\\ \mathbf{else}:\\ \;\;\;\;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 -3.2e-300)
                         (exp (- (* y.re (log (- x.im))) t_0))
                         (if (<= x.im 0.00017)
                           (exp (- (* y.re (log (sqrt (+ (* x.im x.im) (* x.re x.re))))) t_0))
                           (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 <= -3.2e-300) {
                    		tmp = exp(((y_46_re * log(-x_46_im)) - t_0));
                    	} else if (x_46_im <= 0.00017) {
                    		tmp = exp(((y_46_re * log(sqrt(((x_46_im * x_46_im) + (x_46_re * x_46_re))))) - t_0));
                    	} else {
                    		tmp = exp(((y_46_re * log(x_46_im)) - t_0));
                    	}
                    	return tmp;
                    }
                    
                    real(8) function code(x_46re, x_46im, y_46re, y_46im)
                        real(8), intent (in) :: x_46re
                        real(8), intent (in) :: x_46im
                        real(8), intent (in) :: y_46re
                        real(8), intent (in) :: y_46im
                        real(8) :: t_0
                        real(8) :: tmp
                        t_0 = atan2(x_46im, x_46re) * y_46im
                        if (x_46im <= (-3.2d-300)) then
                            tmp = exp(((y_46re * log(-x_46im)) - t_0))
                        else if (x_46im <= 0.00017d0) then
                            tmp = exp(((y_46re * log(sqrt(((x_46im * x_46im) + (x_46re * x_46re))))) - t_0))
                        else
                            tmp = exp(((y_46re * log(x_46im)) - t_0))
                        end if
                        code = tmp
                    end function
                    
                    public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
                    	double t_0 = Math.atan2(x_46_im, x_46_re) * y_46_im;
                    	double tmp;
                    	if (x_46_im <= -3.2e-300) {
                    		tmp = Math.exp(((y_46_re * Math.log(-x_46_im)) - t_0));
                    	} else if (x_46_im <= 0.00017) {
                    		tmp = Math.exp(((y_46_re * Math.log(Math.sqrt(((x_46_im * x_46_im) + (x_46_re * x_46_re))))) - t_0));
                    	} else {
                    		tmp = 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 <= -3.2e-300:
                    		tmp = math.exp(((y_46_re * math.log(-x_46_im)) - t_0))
                    	elif x_46_im <= 0.00017:
                    		tmp = math.exp(((y_46_re * math.log(math.sqrt(((x_46_im * x_46_im) + (x_46_re * x_46_re))))) - t_0))
                    	else:
                    		tmp = 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 <= -3.2e-300)
                    		tmp = exp(Float64(Float64(y_46_re * log(Float64(-x_46_im))) - t_0));
                    	elseif (x_46_im <= 0.00017)
                    		tmp = exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_im * x_46_im) + Float64(x_46_re * x_46_re))))) - t_0));
                    	else
                    		tmp = 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 <= -3.2e-300)
                    		tmp = exp(((y_46_re * log(-x_46_im)) - t_0));
                    	elseif (x_46_im <= 0.00017)
                    		tmp = exp(((y_46_re * log(sqrt(((x_46_im * x_46_im) + (x_46_re * x_46_re))))) - t_0));
                    	else
                    		tmp = 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, -3.2e-300], N[Exp[N[(N[(y$46$re * N[Log[(-x$46$im)], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision], If[LessEqual[x$46$im, 0.00017], N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$im * x$46$im), $MachinePrecision] + N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision], N[Exp[N[(N[(y$46$re * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision] - t$95$0), $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 -3.2 \cdot 10^{-300}:\\
                    \;\;\;\;e^{y.re \cdot \log \left(-x.im\right) - t_0}\\
                    
                    \mathbf{elif}\;x.im \leq 0.00017:\\
                    \;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right) - t_0}\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;e^{y.re \cdot \log x.im - t_0}\\
                    
                    
                    \end{array}
                    \end{array}
                    
                    Derivation
                    1. Split input into 3 regimes
                    2. if x.im < -3.20000000000000021e-300

                      1. Initial program 41.9%

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

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

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

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

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

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

                      if -3.20000000000000021e-300 < x.im < 1.7e-4

                      1. Initial program 51.2%

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

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

                      if 1.7e-4 < x.im

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

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

                        \[\leadsto e^{\color{blue}{y.re \cdot \log x.im} - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot 1 \]
                      5. Step-by-step derivation
                        1. *-commutative86.8%

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

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

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

                    Alternative 7: 71.7% accurate, 2.7× speedup?

                    \[\begin{array}{l} \\ \begin{array}{l} t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\ \mathbf{if}\;x.im \leq -5 \cdot 10^{-310}:\\ \;\;\;\;e^{y.re \cdot \log \left(-x.im\right) - t_0}\\ \mathbf{else}:\\ \;\;\;\;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 -5e-310)
                         (exp (- (* y.re (log (- x.im))) t_0))
                         (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 <= -5e-310) {
                    		tmp = exp(((y_46_re * log(-x_46_im)) - t_0));
                    	} else {
                    		tmp = exp(((y_46_re * log(x_46_im)) - t_0));
                    	}
                    	return tmp;
                    }
                    
                    real(8) function code(x_46re, x_46im, y_46re, y_46im)
                        real(8), intent (in) :: x_46re
                        real(8), intent (in) :: x_46im
                        real(8), intent (in) :: y_46re
                        real(8), intent (in) :: y_46im
                        real(8) :: t_0
                        real(8) :: tmp
                        t_0 = atan2(x_46im, x_46re) * y_46im
                        if (x_46im <= (-5d-310)) then
                            tmp = exp(((y_46re * log(-x_46im)) - t_0))
                        else
                            tmp = exp(((y_46re * log(x_46im)) - t_0))
                        end if
                        code = tmp
                    end function
                    
                    public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
                    	double t_0 = Math.atan2(x_46_im, x_46_re) * y_46_im;
                    	double tmp;
                    	if (x_46_im <= -5e-310) {
                    		tmp = Math.exp(((y_46_re * Math.log(-x_46_im)) - t_0));
                    	} else {
                    		tmp = 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 <= -5e-310:
                    		tmp = math.exp(((y_46_re * math.log(-x_46_im)) - t_0))
                    	else:
                    		tmp = 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 <= -5e-310)
                    		tmp = exp(Float64(Float64(y_46_re * log(Float64(-x_46_im))) - t_0));
                    	else
                    		tmp = 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 <= -5e-310)
                    		tmp = exp(((y_46_re * log(-x_46_im)) - t_0));
                    	else
                    		tmp = 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, -5e-310], N[Exp[N[(N[(y$46$re * N[Log[(-x$46$im)], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision], N[Exp[N[(N[(y$46$re * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision] - t$95$0), $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 -5 \cdot 10^{-310}:\\
                    \;\;\;\;e^{y.re \cdot \log \left(-x.im\right) - t_0}\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;e^{y.re \cdot \log x.im - t_0}\\
                    
                    
                    \end{array}
                    \end{array}
                    
                    Derivation
                    1. Split input into 2 regimes
                    2. if x.im < -4.999999999999985e-310

                      1. Initial program 41.9%

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

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

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

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

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

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

                      if -4.999999999999985e-310 < x.im

                      1. Initial program 39.5%

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

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

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

                        \[\leadsto e^{\color{blue}{y.re \cdot \log x.im} - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot 1 \]
                      5. Step-by-step derivation
                        1. *-commutative74.1%

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

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

                      \[\leadsto \begin{array}{l} \mathbf{if}\;x.im \leq -5 \cdot 10^{-310}:\\ \;\;\;\;e^{y.re \cdot \log \left(-x.im\right) - \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}\\ \end{array} \]

                    Alternative 8: 53.5% accurate, 2.7× speedup?

                    \[\begin{array}{l} \\ \begin{array}{l} t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\ \mathbf{if}\;x.re \leq -9 \cdot 10^{-309}:\\ \;\;\;\;e^{y.re \cdot \log x.im - t_0}\\ \mathbf{else}:\\ \;\;\;\;e^{y.re \cdot \log x.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)))
                       (if (<= x.re -9e-309)
                         (exp (- (* y.re (log x.im)) t_0))
                         (exp (- (* y.re (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 = atan2(x_46_im, x_46_re) * y_46_im;
                    	double tmp;
                    	if (x_46_re <= -9e-309) {
                    		tmp = exp(((y_46_re * log(x_46_im)) - t_0));
                    	} else {
                    		tmp = exp(((y_46_re * log(x_46_re)) - t_0));
                    	}
                    	return tmp;
                    }
                    
                    real(8) function code(x_46re, x_46im, y_46re, y_46im)
                        real(8), intent (in) :: x_46re
                        real(8), intent (in) :: x_46im
                        real(8), intent (in) :: y_46re
                        real(8), intent (in) :: y_46im
                        real(8) :: t_0
                        real(8) :: tmp
                        t_0 = atan2(x_46im, x_46re) * y_46im
                        if (x_46re <= (-9d-309)) then
                            tmp = exp(((y_46re * log(x_46im)) - t_0))
                        else
                            tmp = exp(((y_46re * log(x_46re)) - t_0))
                        end if
                        code = tmp
                    end function
                    
                    public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
                    	double t_0 = Math.atan2(x_46_im, x_46_re) * y_46_im;
                    	double tmp;
                    	if (x_46_re <= -9e-309) {
                    		tmp = Math.exp(((y_46_re * Math.log(x_46_im)) - t_0));
                    	} else {
                    		tmp = Math.exp(((y_46_re * 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.atan2(x_46_im, x_46_re) * y_46_im
                    	tmp = 0
                    	if x_46_re <= -9e-309:
                    		tmp = math.exp(((y_46_re * math.log(x_46_im)) - t_0))
                    	else:
                    		tmp = math.exp(((y_46_re * 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 = Float64(atan(x_46_im, x_46_re) * y_46_im)
                    	tmp = 0.0
                    	if (x_46_re <= -9e-309)
                    		tmp = exp(Float64(Float64(y_46_re * log(x_46_im)) - t_0));
                    	else
                    		tmp = exp(Float64(Float64(y_46_re * 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 = atan2(x_46_im, x_46_re) * y_46_im;
                    	tmp = 0.0;
                    	if (x_46_re <= -9e-309)
                    		tmp = exp(((y_46_re * log(x_46_im)) - t_0));
                    	else
                    		tmp = exp(((y_46_re * 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[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, If[LessEqual[x$46$re, -9e-309], N[Exp[N[(N[(y$46$re * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision], N[Exp[N[(N[(y$46$re * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]]]
                    
                    \begin{array}{l}
                    
                    \\
                    \begin{array}{l}
                    t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
                    \mathbf{if}\;x.re \leq -9 \cdot 10^{-309}:\\
                    \;\;\;\;e^{y.re \cdot \log x.im - t_0}\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;e^{y.re \cdot \log x.re - t_0}\\
                    
                    
                    \end{array}
                    \end{array}
                    
                    Derivation
                    1. Split input into 2 regimes
                    2. if x.re < -9.0000000000000021e-309

                      1. Initial program 46.1%

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

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

                        \[\leadsto e^{\color{blue}{y.re \cdot \log x.im} - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot 1 \]
                      5. Step-by-step derivation
                        1. *-commutative40.5%

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

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

                      if -9.0000000000000021e-309 < x.re

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

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

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

                        \[\leadsto e^{\color{blue}{y.re \cdot \log x.re} - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot 1 \]
                      5. Step-by-step derivation
                        1. *-commutative67.1%

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

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

                      \[\leadsto \begin{array}{l} \mathbf{if}\;x.re \leq -9 \cdot 10^{-309}:\\ \;\;\;\;e^{y.re \cdot \log x.im - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\ \mathbf{else}:\\ \;\;\;\;e^{y.re \cdot \log x.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\ \end{array} \]

                    Alternative 9: 35.2% accurate, 2.7× speedup?

                    \[\begin{array}{l} \\ e^{y.re \cdot \log x.im - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \end{array} \]
                    (FPCore (x.re x.im y.re y.im)
                     :precision binary64
                     (exp (- (* y.re (log x.im)) (* (atan2 x.im x.re) y.im))))
                    double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
                    	return exp(((y_46_re * log(x_46_im)) - (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(((y_46re * log(x_46im)) - (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(((y_46_re * Math.log(x_46_im)) - (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(((y_46_re * math.log(x_46_im)) - (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(y_46_re * log(x_46_im)) - 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(((y_46_re * log(x_46_im)) - (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[(y$46$re * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
                    
                    \begin{array}{l}
                    
                    \\
                    e^{y.re \cdot \log x.im - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}
                    \end{array}
                    
                    Derivation
                    1. Initial program 40.7%

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

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

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

                      \[\leadsto e^{\color{blue}{y.re \cdot \log x.im} - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot 1 \]
                    5. Step-by-step derivation
                      1. *-commutative36.8%

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

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

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

                    Reproduce

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