powComplex, real part

Percentage Accurate: 40.4% → 81.0%
Time: 24.5s
Alternatives: 14
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 14 alternatives:

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

Initial Program: 40.4% accurate, 1.0× speedup?

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

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

Alternative 1: 81.0% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\ t_1 := \sqrt[3]{\mathsf{fma}\left(t_0, y.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\\ t_2 := e^{t_0 \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\ \mathbf{if}\;y.im \leq -2.5 \cdot 10^{+45} \lor \neg \left(y.im \leq 1.08 \cdot 10^{+74}\right):\\ \;\;\;\;t_2 \cdot \cos \left(t_1 \cdot {t_1}^{2}\right)\\ \mathbf{else}:\\ \;\;\;\;t_2 \cdot \langle \left( \langle \left( \cos \left(t_1 \cdot \sqrt[3]{{\left(t_0 \cdot y.im\right)}^{2}}\right) \right)_{\text{binary64}} \rangle_{\text{binary32}} \right)_{\text{binary32}} \rangle_{\text{binary64}}\\ \end{array} \end{array} \]
(FPCore (x.re x.im y.re y.im)
 :precision binary64
 (let* ((t_0 (log (hypot x.re x.im)))
        (t_1 (cbrt (fma t_0 y.im (* y.re (atan2 x.im x.re)))))
        (t_2 (exp (- (* t_0 y.re) (* (atan2 x.im x.re) y.im)))))
   (if (or (<= y.im -2.5e+45) (not (<= y.im 1.08e+74)))
     (* t_2 (cos (* t_1 (pow t_1 2.0))))
     (*
      t_2
      (cast
       (!
        :precision
        binary32
        (cast
         (!
          :precision
          binary64
          (cos (* t_1 (cbrt (pow (* t_0 y.im) 2.0))))))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
	double t_0 = log(hypot(x_46_re, x_46_im));
	double t_1 = cbrt(fma(t_0, y_46_im, (y_46_re * atan2(x_46_im, x_46_re))));
	double t_2 = exp(((t_0 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im)));
	double tmp;
	if ((y_46_im <= -2.5e+45) || !(y_46_im <= 1.08e+74)) {
		tmp = t_2 * cos((t_1 * pow(t_1, 2.0)));
	} else {
		double tmp_3 = cos((t_1 * cbrt(pow((t_0 * y_46_im), 2.0))));
		double tmp_2 = (float) tmp_3;
		tmp = t_2 * ((double) tmp_2);
	}
	return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im)
	t_0 = log(hypot(x_46_re, x_46_im))
	t_1 = cbrt(fma(t_0, y_46_im, Float64(y_46_re * atan(x_46_im, x_46_re))))
	t_2 = exp(Float64(Float64(t_0 * y_46_re) - Float64(atan(x_46_im, x_46_re) * y_46_im)))
	tmp = 0.0
	if ((y_46_im <= -2.5e+45) || !(y_46_im <= 1.08e+74))
		tmp = Float64(t_2 * cos(Float64(t_1 * (t_1 ^ 2.0))));
	else
		tmp_3 = cos(Float64(t_1 * cbrt((Float64(t_0 * y_46_im) ^ 2.0))))
		tmp_2 = Float32(tmp_3)
		tmp = Float64(t_2 * Float64(tmp_2));
	end
	return tmp
end
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
t_1 := \sqrt[3]{\mathsf{fma}\left(t_0, y.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\\
t_2 := e^{t_0 \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\
\mathbf{if}\;y.im \leq -2.5 \cdot 10^{+45} \lor \neg \left(y.im \leq 1.08 \cdot 10^{+74}\right):\\
\;\;\;\;t_2 \cdot \cos \left(t_1 \cdot {t_1}^{2}\right)\\

\mathbf{else}:\\
\;\;\;\;t_2 \cdot \langle \left( \langle \left( \cos \left(t_1 \cdot \sqrt[3]{{\left(t_0 \cdot y.im\right)}^{2}}\right) \right)_{\text{binary64}} \rangle_{\text{binary32}} \right)_{\text{binary32}} \rangle_{\text{binary64}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y.im < -2.5e45 or 1.08e74 < y.im

    1. Initial program 43.8%

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

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

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

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

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

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

      if -2.5e45 < y.im < 1.08e74

      1. Initial program 35.5%

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

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

            \[\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(\left(\sqrt[3]{\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)} \cdot \sqrt[3]{\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\right) \cdot \sqrt[3]{\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 rewrite-once78.9%

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

          \[\leadsto e^{\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \cos \left(\color{blue}{{\left({y.im}^{2} \cdot {\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{2}\right)}^{0.3333333333333333}} \cdot \sqrt[3]{\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. Step-by-step derivation
          1. unpow1/341.1%

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

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

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

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

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

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

          \[\leadsto e^{\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \cos \left(\color{blue}{\sqrt[3]{\left(y.im \cdot y.im\right) \cdot {\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{2}}} \cdot \sqrt[3]{\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. Step-by-step derivation
          1. rewrite-binary64/binary32-simplify87.8%

            \[\leadsto \color{blue}{e^{\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \langle \left( \langle \left( \cos \left(\sqrt[3]{\left(y.im \cdot y.im\right) \cdot {\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{2}} \cdot \sqrt[3]{\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\right) \right)_{\text{binary64}} \rangle_{\text{binary32}} \right)_{\text{binary32}} \rangle_{\text{binary64}}} \]
        8. Applied rewrite-once87.8%

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

            \[\leadsto e^{\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \langle \left( \langle \left( \cos \left(\sqrt[3]{\color{blue}{\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)}} \cdot \sqrt[3]{\left(y.im \cdot y.im\right) \cdot {\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{2}}\right) \right)_{\text{binary64}} \rangle_{\text{binary32}} \right)_{\text{binary32}} \rangle_{\text{binary64}} \]
          2. unpow287.8%

            \[\leadsto e^{\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \langle \left( \langle \left( \cos \left(\sqrt[3]{\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)} \cdot \sqrt[3]{\left(y.im \cdot y.im\right) \cdot \left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\right)}\right) \right)_{\text{binary64}} \rangle_{\text{binary32}} \right)_{\text{binary32}} \rangle_{\text{binary64}} \]
          3. swap-sqr89.1%

            \[\leadsto e^{\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \langle \left( \langle \left( \cos \left(\sqrt[3]{\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)} \cdot \sqrt[3]{\left(y.im \cdot \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\right) \cdot \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\right)}\right) \right)_{\text{binary64}} \rangle_{\text{binary32}} \right)_{\text{binary32}} \rangle_{\text{binary64}} \]
          4. unpow289.1%

            \[\leadsto e^{\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \langle \left( \langle \left( \cos \left(\sqrt[3]{\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)} \cdot \sqrt[3]{{\left(y.im \cdot \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\right)}^{2}}\right) \right)_{\text{binary64}} \rangle_{\text{binary32}} \right)_{\text{binary32}} \rangle_{\text{binary64}} \]
        10. Simplified89.1%

          \[\leadsto e^{\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \color{blue}{\langle \color{blue}{\left( \color{blue}{\langle \color{blue}{\left( \color{blue}{\cos \left(\sqrt[3]{\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)} \cdot \sqrt[3]{{\left(y.im \cdot \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\right)}^{2}}\right)} \right)_{\text{binary64}}} \rangle_{\text{binary32}}} \right)_{\text{binary32}}} \rangle_{\text{binary64}}} \]
      3. Recombined 2 regimes into one program.
      4. Final simplification86.8%

        \[\leadsto \begin{array}{l} \mathbf{if}\;y.im \leq -2.5 \cdot 10^{+45} \lor \neg \left(y.im \leq 1.08 \cdot 10^{+74}\right):\\ \;\;\;\;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(\sqrt[3]{\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)} \cdot {\left(\sqrt[3]{\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}\right)\\ \mathbf{else}:\\ \;\;\;\;e^{\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \langle \left( \langle \left( \cos \left(\sqrt[3]{\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)} \cdot \sqrt[3]{{\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im\right)}^{2}}\right) \right)_{\text{binary64}} \rangle_{\text{binary32}} \right)_{\text{binary32}} \rangle_{\text{binary64}}\\ \end{array} \]

      Alternative 2: 81.0% accurate, 0.5× speedup?

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

        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. Simplified80.0%

            \[\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. add-cube-cbrt_binary6479.2%

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

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

            \[\leadsto e^{\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \cos \left(\color{blue}{{\left({y.im}^{2} \cdot {\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{2}\right)}^{0.3333333333333333}} \cdot \sqrt[3]{\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. Step-by-step derivation
            1. unpow1/336.2%

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

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

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

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

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

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

            \[\leadsto e^{\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \cos \left(\color{blue}{\sqrt[3]{\left(y.im \cdot y.im\right) \cdot {\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{2}}} \cdot \sqrt[3]{\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. Step-by-step derivation
            1. cbrt-prod66.2%

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

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

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

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

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

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

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

          if 5.0000000000000002e-237 < x.re

          1. Initial program 36.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. Simplified76.0%

              \[\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. add-cube-cbrt_binary6482.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(\left(\sqrt[3]{\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)} \cdot \sqrt[3]{\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\right) \cdot \sqrt[3]{\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 rewrite-once82.1%

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

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

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

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

          Alternative 3: 80.9% accurate, 0.9× speedup?

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

            1. Initial program 42.8%

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

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

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

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

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

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

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

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

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

              if 6.20000000000000018 < y.re

              1. Initial program 28.8%

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

                \[\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} \]
            3. Recombined 2 regimes into one program.
            4. Final simplification82.8%

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

            Alternative 4: 80.7% accurate, 0.9× speedup?

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

              1. Initial program 42.8%

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

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

                if 6.20000000000000018 < y.re

                1. Initial program 28.8%

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

                  \[\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} \]
              3. Recombined 2 regimes into one program.
              4. Final simplification82.3%

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

              Alternative 5: 79.6% accurate, 1.2× speedup?

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

                1. Initial program 40.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 86.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)} \]

                if -4.6999999999999999e-9 < y.re < 2.6000000000000001e-9

                1. Initial program 43.2%

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

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

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto e^{\color{blue}{y.im \cdot \left(-\tan^{-1}_* \frac{x.im}{x.re}\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) \]
                6. Simplified79.2%

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

                if 2.6000000000000001e-9 < y.re

                1. Initial program 30.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 66.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 79.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} \]
              3. Recombined 3 regimes into one program.
              4. Final simplification81.0%

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

              Alternative 6: 81.8% accurate, 1.2× speedup?

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

                1. Initial program 44.5%

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

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

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

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

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

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

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

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

                  if 0.0029 < x.re

                  1. Initial program 24.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 x.re around inf 24.7%

                    \[\leadsto e^{\log \color{blue}{x.re} \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) \]
                  3. Taylor expanded in y.re around 0 26.1%

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

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

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

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

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

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

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

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

                Alternative 7: 72.4% accurate, 1.3× speedup?

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

                  1. Initial program 42.6%

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

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

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

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

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

                  if -9.999999999999969e-311 < x.re < 6.99999999999999997e-175

                  1. Initial program 24.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 55.9%

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

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

                  if 6.99999999999999997e-175 < x.re < 5.39999999999999989e-73

                  1. Initial program 65.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 95.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)} \]

                  if 5.39999999999999989e-73 < x.re

                  1. Initial program 31.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 inf 31.8%

                    \[\leadsto e^{\log \color{blue}{x.re} \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) \]
                  3. Taylor expanded in y.re around 0 32.9%

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

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

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

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

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

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

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

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

                Alternative 8: 72.3% accurate, 1.6× speedup?

                \[\begin{array}{l} \\ \begin{array}{l} t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\ \mathbf{if}\;x.re \leq -3.9 \cdot 10^{-302}:\\ \;\;\;\;\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot e^{y.re \cdot \log \left(-x.re\right) - t_0}\\ \mathbf{elif}\;x.re \leq 1.2 \cdot 10^{-26}:\\ \;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.im \cdot x.im}\right) - 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 -3.9e-302)
                     (* (cos (* y.re (atan2 x.im x.re))) (exp (- (* y.re (log (- x.re))) t_0)))
                     (if (<= x.re 1.2e-26)
                       (exp (- (* y.re (log (sqrt (* x.im 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 <= -3.9e-302) {
                		tmp = cos((y_46_re * atan2(x_46_im, x_46_re))) * exp(((y_46_re * log(-x_46_re)) - t_0));
                	} else if (x_46_re <= 1.2e-26) {
                		tmp = exp(((y_46_re * log(sqrt((x_46_im * 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 <= (-3.9d-302)) then
                        tmp = cos((y_46re * atan2(x_46im, x_46re))) * exp(((y_46re * log(-x_46re)) - t_0))
                    else if (x_46re <= 1.2d-26) then
                        tmp = exp(((y_46re * log(sqrt((x_46im * 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 <= -3.9e-302) {
                		tmp = Math.cos((y_46_re * Math.atan2(x_46_im, x_46_re))) * Math.exp(((y_46_re * Math.log(-x_46_re)) - t_0));
                	} else if (x_46_re <= 1.2e-26) {
                		tmp = Math.exp(((y_46_re * Math.log(Math.sqrt((x_46_im * 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 <= -3.9e-302:
                		tmp = math.cos((y_46_re * math.atan2(x_46_im, x_46_re))) * math.exp(((y_46_re * math.log(-x_46_re)) - t_0))
                	elif x_46_re <= 1.2e-26:
                		tmp = math.exp(((y_46_re * math.log(math.sqrt((x_46_im * 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 <= -3.9e-302)
                		tmp = Float64(cos(Float64(y_46_re * atan(x_46_im, x_46_re))) * exp(Float64(Float64(y_46_re * log(Float64(-x_46_re))) - t_0)));
                	elseif (x_46_re <= 1.2e-26)
                		tmp = exp(Float64(Float64(y_46_re * log(sqrt(Float64(x_46_im * 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 <= -3.9e-302)
                		tmp = cos((y_46_re * atan2(x_46_im, x_46_re))) * exp(((y_46_re * log(-x_46_re)) - t_0));
                	elseif (x_46_re <= 1.2e-26)
                		tmp = exp(((y_46_re * log(sqrt((x_46_im * 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, -3.9e-302], N[(N[Cos[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Exp[N[(N[(y$46$re * N[Log[(-x$46$re)], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, 1.2e-26], N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(x$46$im * x$46$im), $MachinePrecision]], $MachinePrecision]], $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 -3.9 \cdot 10^{-302}:\\
                \;\;\;\;\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot e^{y.re \cdot \log \left(-x.re\right) - t_0}\\
                
                \mathbf{elif}\;x.re \leq 1.2 \cdot 10^{-26}:\\
                \;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.im \cdot x.im}\right) - t_0}\\
                
                \mathbf{else}:\\
                \;\;\;\;e^{y.re \cdot \log x.re - t_0}\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 3 regimes
                2. if x.re < -3.8999999999999999e-302

                  1. Initial program 42.1%

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

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

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

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

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

                  if -3.8999999999999999e-302 < x.re < 1.2e-26

                  1. Initial program 47.6%

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

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

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

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

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

                  if 1.2e-26 < x.re

                  1. Initial program 26.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 x.re around inf 27.0%

                    \[\leadsto e^{\log \color{blue}{x.re} \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) \]
                  3. Taylor expanded in y.re around 0 28.2%

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

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

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

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

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

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

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

                  \[\leadsto \begin{array}{l} \mathbf{if}\;x.re \leq -3.9 \cdot 10^{-302}:\\ \;\;\;\;\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot e^{y.re \cdot \log \left(-x.re\right) - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\ \mathbf{elif}\;x.re \leq 1.2 \cdot 10^{-26}:\\ \;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.im \cdot x.im}\right) - \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: 72.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.re \leq -2.75 \cdot 10^{-304}:\\ \;\;\;\;e^{y.re \cdot \log \left(-x.re\right) - t_0}\\ \mathbf{elif}\;x.re \leq 5.5 \cdot 10^{-29}:\\ \;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.im \cdot x.im}\right) - 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 -2.75e-304)
                     (exp (- (* y.re (log (- x.re))) t_0))
                     (if (<= x.re 5.5e-29)
                       (exp (- (* y.re (log (sqrt (* x.im 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 <= -2.75e-304) {
                		tmp = exp(((y_46_re * log(-x_46_re)) - t_0));
                	} else if (x_46_re <= 5.5e-29) {
                		tmp = exp(((y_46_re * log(sqrt((x_46_im * 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 <= (-2.75d-304)) then
                        tmp = exp(((y_46re * log(-x_46re)) - t_0))
                    else if (x_46re <= 5.5d-29) then
                        tmp = exp(((y_46re * log(sqrt((x_46im * 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 <= -2.75e-304) {
                		tmp = Math.exp(((y_46_re * Math.log(-x_46_re)) - t_0));
                	} else if (x_46_re <= 5.5e-29) {
                		tmp = Math.exp(((y_46_re * Math.log(Math.sqrt((x_46_im * 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 <= -2.75e-304:
                		tmp = math.exp(((y_46_re * math.log(-x_46_re)) - t_0))
                	elif x_46_re <= 5.5e-29:
                		tmp = math.exp(((y_46_re * math.log(math.sqrt((x_46_im * 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 <= -2.75e-304)
                		tmp = exp(Float64(Float64(y_46_re * log(Float64(-x_46_re))) - t_0));
                	elseif (x_46_re <= 5.5e-29)
                		tmp = exp(Float64(Float64(y_46_re * log(sqrt(Float64(x_46_im * 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 <= -2.75e-304)
                		tmp = exp(((y_46_re * log(-x_46_re)) - t_0));
                	elseif (x_46_re <= 5.5e-29)
                		tmp = exp(((y_46_re * log(sqrt((x_46_im * 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, -2.75e-304], N[Exp[N[(N[(y$46$re * N[Log[(-x$46$re)], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision], If[LessEqual[x$46$re, 5.5e-29], N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(x$46$im * x$46$im), $MachinePrecision]], $MachinePrecision]], $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 -2.75 \cdot 10^{-304}:\\
                \;\;\;\;e^{y.re \cdot \log \left(-x.re\right) - t_0}\\
                
                \mathbf{elif}\;x.re \leq 5.5 \cdot 10^{-29}:\\
                \;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.im \cdot x.im}\right) - t_0}\\
                
                \mathbf{else}:\\
                \;\;\;\;e^{y.re \cdot \log x.re - t_0}\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 3 regimes
                2. if x.re < -2.75000000000000017e-304

                  1. Initial program 42.1%

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

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

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

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

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

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

                  if -2.75000000000000017e-304 < x.re < 5.4999999999999999e-29

                  1. Initial program 47.6%

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

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

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

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

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

                  if 5.4999999999999999e-29 < x.re

                  1. Initial program 26.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 x.re around inf 27.0%

                    \[\leadsto e^{\log \color{blue}{x.re} \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) \]
                  3. Taylor expanded in y.re around 0 28.2%

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

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

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

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

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

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

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

                  \[\leadsto \begin{array}{l} \mathbf{if}\;x.re \leq -2.75 \cdot 10^{-304}:\\ \;\;\;\;e^{y.re \cdot \log \left(-x.re\right) - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\ \mathbf{elif}\;x.re \leq 5.5 \cdot 10^{-29}:\\ \;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.im \cdot x.im}\right) - \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 10: 72.3% accurate, 2.6× speedup?

                \[\begin{array}{l} \\ \begin{array}{l} t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\ \mathbf{if}\;x.re \leq -1 \cdot 10^{-310}:\\ \;\;\;\;e^{y.re \cdot \log \left(-x.re\right) - t_0}\\ \mathbf{elif}\;x.re \leq 4.35 \cdot 10^{-76}:\\ \;\;\;\;e^{y.re \cdot \log \left(x.re + \frac{\left(x.im \cdot x.im\right) \cdot 0.5}{x.re}\right) - 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 -1e-310)
                     (exp (- (* y.re (log (- x.re))) t_0))
                     (if (<= x.re 4.35e-76)
                       (exp (- (* y.re (log (+ x.re (/ (* (* x.im x.im) 0.5) x.re)))) 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 <= -1e-310) {
                		tmp = exp(((y_46_re * log(-x_46_re)) - t_0));
                	} else if (x_46_re <= 4.35e-76) {
                		tmp = exp(((y_46_re * log((x_46_re + (((x_46_im * x_46_im) * 0.5) / x_46_re)))) - 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 <= (-1d-310)) then
                        tmp = exp(((y_46re * log(-x_46re)) - t_0))
                    else if (x_46re <= 4.35d-76) then
                        tmp = exp(((y_46re * log((x_46re + (((x_46im * x_46im) * 0.5d0) / x_46re)))) - 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 <= -1e-310) {
                		tmp = Math.exp(((y_46_re * Math.log(-x_46_re)) - t_0));
                	} else if (x_46_re <= 4.35e-76) {
                		tmp = Math.exp(((y_46_re * Math.log((x_46_re + (((x_46_im * x_46_im) * 0.5) / x_46_re)))) - 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 <= -1e-310:
                		tmp = math.exp(((y_46_re * math.log(-x_46_re)) - t_0))
                	elif x_46_re <= 4.35e-76:
                		tmp = math.exp(((y_46_re * math.log((x_46_re + (((x_46_im * x_46_im) * 0.5) / x_46_re)))) - 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 <= -1e-310)
                		tmp = exp(Float64(Float64(y_46_re * log(Float64(-x_46_re))) - t_0));
                	elseif (x_46_re <= 4.35e-76)
                		tmp = exp(Float64(Float64(y_46_re * log(Float64(x_46_re + Float64(Float64(Float64(x_46_im * x_46_im) * 0.5) / x_46_re)))) - 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 <= -1e-310)
                		tmp = exp(((y_46_re * log(-x_46_re)) - t_0));
                	elseif (x_46_re <= 4.35e-76)
                		tmp = exp(((y_46_re * log((x_46_re + (((x_46_im * x_46_im) * 0.5) / x_46_re)))) - 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, -1e-310], N[Exp[N[(N[(y$46$re * N[Log[(-x$46$re)], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision], If[LessEqual[x$46$re, 4.35e-76], N[Exp[N[(N[(y$46$re * N[Log[N[(x$46$re + N[(N[(N[(x$46$im * x$46$im), $MachinePrecision] * 0.5), $MachinePrecision] / x$46$re), $MachinePrecision]), $MachinePrecision]], $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 -1 \cdot 10^{-310}:\\
                \;\;\;\;e^{y.re \cdot \log \left(-x.re\right) - t_0}\\
                
                \mathbf{elif}\;x.re \leq 4.35 \cdot 10^{-76}:\\
                \;\;\;\;e^{y.re \cdot \log \left(x.re + \frac{\left(x.im \cdot x.im\right) \cdot 0.5}{x.re}\right) - t_0}\\
                
                \mathbf{else}:\\
                \;\;\;\;e^{y.re \cdot \log x.re - t_0}\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 3 regimes
                2. if x.re < -9.999999999999969e-311

                  1. Initial program 42.6%

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

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

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

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

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

                  if -9.999999999999969e-311 < x.re < 4.3500000000000003e-76

                  1. Initial program 42.3%

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

                    \[\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 74.5%

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

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

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

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

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

                  if 4.3500000000000003e-76 < x.re

                  1. Initial program 31.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 inf 31.8%

                    \[\leadsto e^{\log \color{blue}{x.re} \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) \]
                  3. Taylor expanded in y.re around 0 32.9%

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

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

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

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

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

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

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

                  \[\leadsto \begin{array}{l} \mathbf{if}\;x.re \leq -1 \cdot 10^{-310}:\\ \;\;\;\;e^{y.re \cdot \log \left(-x.re\right) - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\ \mathbf{elif}\;x.re \leq 4.35 \cdot 10^{-76}:\\ \;\;\;\;e^{y.re \cdot \log \left(x.re + \frac{\left(x.im \cdot x.im\right) \cdot 0.5}{x.re}\right) - \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 11: 71.9% 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 -4 \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 -4e-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 <= -4e-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 <= (-4d-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 <= -4e-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 <= -4e-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 <= -4e-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 <= -4e-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, -4e-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 -4 \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 < -3.999999999999988e-310

                  1. Initial program 32.0%

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

                    \[\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 59.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} \]
                  4. Taylor expanded in x.im around -inf 69.3%

                    \[\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-neg69.3%

                      \[\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. Simplified69.3%

                    \[\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.999999999999988e-310 < x.im

                  1. Initial program 45.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.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 73.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.re around 0 68.0%

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

                  \[\leadsto \begin{array}{l} \mathbf{if}\;x.im \leq -4 \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 12: 72.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 -1 \cdot 10^{-310}:\\ \;\;\;\;e^{y.re \cdot \log \left(-x.re\right) - 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 -1e-310)
                     (exp (- (* y.re (log (- x.re))) 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 <= -1e-310) {
                		tmp = exp(((y_46_re * log(-x_46_re)) - 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 <= (-1d-310)) then
                        tmp = exp(((y_46re * log(-x_46re)) - 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 <= -1e-310) {
                		tmp = Math.exp(((y_46_re * Math.log(-x_46_re)) - 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 <= -1e-310:
                		tmp = math.exp(((y_46_re * math.log(-x_46_re)) - 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 <= -1e-310)
                		tmp = exp(Float64(Float64(y_46_re * log(Float64(-x_46_re))) - 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 <= -1e-310)
                		tmp = exp(((y_46_re * log(-x_46_re)) - 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, -1e-310], N[Exp[N[(N[(y$46$re * N[Log[(-x$46$re)], $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 -1 \cdot 10^{-310}:\\
                \;\;\;\;e^{y.re \cdot \log \left(-x.re\right) - 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.999999999999969e-311

                  1. Initial program 42.6%

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

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

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

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

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

                  if -9.999999999999969e-311 < x.re

                  1. Initial program 35.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 x.re around inf 33.8%

                    \[\leadsto e^{\log \color{blue}{x.re} \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) \]
                  3. Taylor expanded in y.re around 0 32.3%

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

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

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

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

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

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

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

                  \[\leadsto \begin{array}{l} \mathbf{if}\;x.re \leq -1 \cdot 10^{-310}:\\ \;\;\;\;e^{y.re \cdot \log \left(-x.re\right) - \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 13: 54.1% 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 -7.4 \cdot 10^{-306}:\\ \;\;\;\;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 -7.4e-306)
                     (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 <= -7.4e-306) {
                		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 <= (-7.4d-306)) 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 <= -7.4e-306) {
                		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 <= -7.4e-306:
                		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 <= -7.4e-306)
                		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 <= -7.4e-306)
                		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, -7.4e-306], 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 -7.4 \cdot 10^{-306}:\\
                \;\;\;\;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 < -7.400000000000001e-306

                  1. Initial program 42.1%

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

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

                    \[\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 37.8%

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

                  if -7.400000000000001e-306 < x.re

                  1. Initial program 36.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 x.re around inf 33.5%

                    \[\leadsto e^{\log \color{blue}{x.re} \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) \]
                  3. Taylor expanded in y.re around 0 32.1%

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

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

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

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

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

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

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

                  \[\leadsto \begin{array}{l} \mathbf{if}\;x.re \leq -7.4 \cdot 10^{-306}:\\ \;\;\;\;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 14: 36.8% 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 38.8%

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

                  \[\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 66.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} \]
                4. Taylor expanded in x.re around 0 34.8%

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

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

                Reproduce

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