powComplex, real part

Percentage Accurate: 41.3% → 82.1%
Time: 18.5s
Alternatives: 16
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 16 alternatives:

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

Initial Program: 41.3% accurate, 1.0× speedup?

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

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

Alternative 1: 82.1% accurate, 0.3× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;t_4 \cdot \left|\sqrt[3]{{\cos \left(t_5 \cdot {t_5}^{2}\right)}^{3}}\right|\\


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

    1. Initial program 51.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. Simplified51.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. *-commutative51.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(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, \color{blue}{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re}\right)\right) \]
        2. add-cube-cbrt71.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(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, \color{blue}{\left(\sqrt[3]{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re} \cdot \sqrt[3]{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re}\right) \cdot \sqrt[3]{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re}}\right)\right) \]
        3. pow371.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(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, \color{blue}{{\left(\sqrt[3]{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re}\right)}^{3}}\right)\right) \]
      3. Applied egg-rr71.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(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, \color{blue}{{\left(\sqrt[3]{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re}\right)}^{3}}\right)\right) \]

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

      1. Initial program 37.3%

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

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

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

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

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

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

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

            \[\leadsto e^{\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \color{blue}{\left|\cos \left(\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)\right|} \]
          3. fma-udef84.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 \left|\cos \color{blue}{\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}\right| \]
          4. *-commutative84.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 \left|\cos \left(\color{blue}{y.im \cdot \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)} + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\right| \]
          5. fma-def84.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 \left|\cos \color{blue}{\left(\mathsf{fma}\left(y.im, \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\right)}\right| \]
          6. hypot-def37.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 \left|\cos \left(\mathsf{fma}\left(y.im, \log \color{blue}{\left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)}, \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\right)\right| \]
          7. unpow237.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 \left|\cos \left(\mathsf{fma}\left(y.im, \log \left(\sqrt{\color{blue}{{x.re}^{2}} + x.im \cdot x.im}\right), \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\right)\right| \]
          8. unpow237.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 \left|\cos \left(\mathsf{fma}\left(y.im, \log \left(\sqrt{{x.re}^{2} + \color{blue}{{x.im}^{2}}}\right), \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\right)\right| \]
          9. +-commutative37.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 \left|\cos \left(\mathsf{fma}\left(y.im, \log \left(\sqrt{\color{blue}{{x.im}^{2} + {x.re}^{2}}}\right), \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\right)\right| \]
          10. unpow237.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 \left|\cos \left(\mathsf{fma}\left(y.im, \log \left(\sqrt{\color{blue}{x.im \cdot x.im} + {x.re}^{2}}\right), \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\right)\right| \]
          11. unpow237.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 \left|\cos \left(\mathsf{fma}\left(y.im, \log \left(\sqrt{x.im \cdot x.im + \color{blue}{x.re \cdot x.re}}\right), \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\right)\right| \]
          12. hypot-def84.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 \left|\cos \left(\mathsf{fma}\left(y.im, \log \color{blue}{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}, \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\right)\right| \]
          13. *-commutative84.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 \left|\cos \left(\mathsf{fma}\left(y.im, \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right), \color{blue}{y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}}\right)\right)\right| \]
        7. Simplified84.4%

          \[\leadsto e^{\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \color{blue}{\left|\cos \left(\mathsf{fma}\left(y.im, \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right), y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right|} \]
        8. Step-by-step derivation
          1. add-cbrt-cube84.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 \left|\color{blue}{\sqrt[3]{\left(\cos \left(\mathsf{fma}\left(y.im, \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right), y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \cdot \cos \left(\mathsf{fma}\left(y.im, \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right), y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \cdot \cos \left(\mathsf{fma}\left(y.im, \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right), y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)}}\right| \]
          2. pow384.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 \left|\sqrt[3]{\color{blue}{{\cos \left(\mathsf{fma}\left(y.im, \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right), y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)}^{3}}}\right| \]
        9. Applied egg-rr84.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 \left|\color{blue}{\sqrt[3]{{\cos \left(\mathsf{fma}\left(y.im, \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right), y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)}^{3}}}\right| \]
        10. Step-by-step derivation
          1. add-cube-cbrt84.5%

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

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

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

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

      Alternative 2: 82.1% accurate, 0.4× speedup?

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

        1. Initial program 51.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. Simplified51.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. *-commutative51.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(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, \color{blue}{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re}\right)\right) \]
            2. add-cube-cbrt71.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(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, \color{blue}{\left(\sqrt[3]{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re} \cdot \sqrt[3]{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re}\right) \cdot \sqrt[3]{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re}}\right)\right) \]
            3. pow371.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(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, \color{blue}{{\left(\sqrt[3]{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re}\right)}^{3}}\right)\right) \]
          3. Applied egg-rr71.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(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, \color{blue}{{\left(\sqrt[3]{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re}\right)}^{3}}\right)\right) \]

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

          1. Initial program 37.3%

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

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

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

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

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

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

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

                \[\leadsto e^{\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \color{blue}{\left|\cos \left(\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)\right|} \]
              3. fma-udef84.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 \left|\cos \color{blue}{\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}\right| \]
              4. *-commutative84.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 \left|\cos \left(\color{blue}{y.im \cdot \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)} + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\right| \]
              5. fma-def84.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 \left|\cos \color{blue}{\left(\mathsf{fma}\left(y.im, \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\right)}\right| \]
              6. hypot-def37.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 \left|\cos \left(\mathsf{fma}\left(y.im, \log \color{blue}{\left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)}, \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\right)\right| \]
              7. unpow237.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 \left|\cos \left(\mathsf{fma}\left(y.im, \log \left(\sqrt{\color{blue}{{x.re}^{2}} + x.im \cdot x.im}\right), \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\right)\right| \]
              8. unpow237.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 \left|\cos \left(\mathsf{fma}\left(y.im, \log \left(\sqrt{{x.re}^{2} + \color{blue}{{x.im}^{2}}}\right), \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\right)\right| \]
              9. +-commutative37.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 \left|\cos \left(\mathsf{fma}\left(y.im, \log \left(\sqrt{\color{blue}{{x.im}^{2} + {x.re}^{2}}}\right), \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\right)\right| \]
              10. unpow237.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 \left|\cos \left(\mathsf{fma}\left(y.im, \log \left(\sqrt{\color{blue}{x.im \cdot x.im} + {x.re}^{2}}\right), \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\right)\right| \]
              11. unpow237.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 \left|\cos \left(\mathsf{fma}\left(y.im, \log \left(\sqrt{x.im \cdot x.im + \color{blue}{x.re \cdot x.re}}\right), \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\right)\right| \]
              12. hypot-def84.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 \left|\cos \left(\mathsf{fma}\left(y.im, \log \color{blue}{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}, \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\right)\right| \]
              13. *-commutative84.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 \left|\cos \left(\mathsf{fma}\left(y.im, \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right), \color{blue}{y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}}\right)\right)\right| \]
            7. Simplified84.4%

              \[\leadsto e^{\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \color{blue}{\left|\cos \left(\mathsf{fma}\left(y.im, \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right), y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right|} \]
            8. Step-by-step derivation
              1. add-cbrt-cube84.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 \left|\color{blue}{\sqrt[3]{\left(\cos \left(\mathsf{fma}\left(y.im, \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right), y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \cdot \cos \left(\mathsf{fma}\left(y.im, \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right), y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \cdot \cos \left(\mathsf{fma}\left(y.im, \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right), y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)}}\right| \]
              2. pow384.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 \left|\sqrt[3]{\color{blue}{{\cos \left(\mathsf{fma}\left(y.im, \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right), y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)}^{3}}}\right| \]
            9. Applied egg-rr84.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 \left|\color{blue}{\sqrt[3]{{\cos \left(\mathsf{fma}\left(y.im, \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right), y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)}^{3}}}\right| \]
            10. Step-by-step derivation
              1. add-cube-cbrt84.5%

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

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

          Alternative 3: 82.1% accurate, 0.4× speedup?

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

            1. Initial program 51.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. Simplified51.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. *-commutative51.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(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, \color{blue}{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re}\right)\right) \]
                2. add-cube-cbrt71.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(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, \color{blue}{\left(\sqrt[3]{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re} \cdot \sqrt[3]{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re}\right) \cdot \sqrt[3]{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re}}\right)\right) \]
                3. pow371.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(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, \color{blue}{{\left(\sqrt[3]{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re}\right)}^{3}}\right)\right) \]
              3. Applied egg-rr71.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(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, \color{blue}{{\left(\sqrt[3]{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re}\right)}^{3}}\right)\right) \]

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

              1. Initial program 37.3%

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

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

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

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

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

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

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

                    \[\leadsto e^{\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \color{blue}{\left|\cos \left(\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)\right|} \]
                  3. fma-udef84.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 \left|\cos \color{blue}{\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}\right| \]
                  4. *-commutative84.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 \left|\cos \left(\color{blue}{y.im \cdot \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)} + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\right| \]
                  5. fma-def84.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 \left|\cos \color{blue}{\left(\mathsf{fma}\left(y.im, \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\right)}\right| \]
                  6. hypot-def37.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 \left|\cos \left(\mathsf{fma}\left(y.im, \log \color{blue}{\left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)}, \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\right)\right| \]
                  7. unpow237.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 \left|\cos \left(\mathsf{fma}\left(y.im, \log \left(\sqrt{\color{blue}{{x.re}^{2}} + x.im \cdot x.im}\right), \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\right)\right| \]
                  8. unpow237.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 \left|\cos \left(\mathsf{fma}\left(y.im, \log \left(\sqrt{{x.re}^{2} + \color{blue}{{x.im}^{2}}}\right), \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\right)\right| \]
                  9. +-commutative37.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 \left|\cos \left(\mathsf{fma}\left(y.im, \log \left(\sqrt{\color{blue}{{x.im}^{2} + {x.re}^{2}}}\right), \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\right)\right| \]
                  10. unpow237.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 \left|\cos \left(\mathsf{fma}\left(y.im, \log \left(\sqrt{\color{blue}{x.im \cdot x.im} + {x.re}^{2}}\right), \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\right)\right| \]
                  11. unpow237.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 \left|\cos \left(\mathsf{fma}\left(y.im, \log \left(\sqrt{x.im \cdot x.im + \color{blue}{x.re \cdot x.re}}\right), \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\right)\right| \]
                  12. hypot-def84.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 \left|\cos \left(\mathsf{fma}\left(y.im, \log \color{blue}{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}, \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\right)\right| \]
                  13. *-commutative84.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 \left|\cos \left(\mathsf{fma}\left(y.im, \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right), \color{blue}{y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}}\right)\right)\right| \]
                7. Simplified84.4%

                  \[\leadsto e^{\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \color{blue}{\left|\cos \left(\mathsf{fma}\left(y.im, \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right), y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right|} \]
                8. Step-by-step derivation
                  1. add-cbrt-cube84.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 \left|\color{blue}{\sqrt[3]{\left(\cos \left(\mathsf{fma}\left(y.im, \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right), y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \cdot \cos \left(\mathsf{fma}\left(y.im, \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right), y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \cdot \cos \left(\mathsf{fma}\left(y.im, \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right), y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)}}\right| \]
                  2. pow384.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 \left|\sqrt[3]{\color{blue}{{\cos \left(\mathsf{fma}\left(y.im, \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right), y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)}^{3}}}\right| \]
                9. Applied egg-rr84.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 \left|\color{blue}{\sqrt[3]{{\cos \left(\mathsf{fma}\left(y.im, \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right), y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)}^{3}}}\right| \]
                10. Step-by-step derivation
                  1. add-log-exp84.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 \left|\sqrt[3]{{\color{blue}{\log \left(e^{\cos \left(\mathsf{fma}\left(y.im, \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right), y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)}\right)}}^{3}}\right| \]
                11. Applied egg-rr84.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 \left|\sqrt[3]{{\color{blue}{\log \left(e^{\cos \left(\mathsf{fma}\left(y.im, \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right), y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)}\right)}}^{3}}\right| \]
              3. Recombined 2 regimes into one program.
              4. Final simplification83.4%

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

              Alternative 4: 82.1% accurate, 0.4× speedup?

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

                1. Initial program 51.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. Simplified51.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. *-commutative51.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(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, \color{blue}{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re}\right)\right) \]
                    2. add-cube-cbrt71.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(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, \color{blue}{\left(\sqrt[3]{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re} \cdot \sqrt[3]{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re}\right) \cdot \sqrt[3]{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re}}\right)\right) \]
                    3. pow371.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(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, \color{blue}{{\left(\sqrt[3]{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re}\right)}^{3}}\right)\right) \]
                  3. Applied egg-rr71.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(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, \color{blue}{{\left(\sqrt[3]{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re}\right)}^{3}}\right)\right) \]

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

                  1. Initial program 37.3%

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

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

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

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

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

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

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

                        \[\leadsto e^{\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \color{blue}{\left|\cos \left(\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)\right|} \]
                      3. fma-udef84.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 \left|\cos \color{blue}{\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}\right| \]
                      4. *-commutative84.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 \left|\cos \left(\color{blue}{y.im \cdot \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)} + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\right| \]
                      5. fma-def84.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 \left|\cos \color{blue}{\left(\mathsf{fma}\left(y.im, \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\right)}\right| \]
                      6. hypot-def37.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 \left|\cos \left(\mathsf{fma}\left(y.im, \log \color{blue}{\left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)}, \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\right)\right| \]
                      7. unpow237.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 \left|\cos \left(\mathsf{fma}\left(y.im, \log \left(\sqrt{\color{blue}{{x.re}^{2}} + x.im \cdot x.im}\right), \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\right)\right| \]
                      8. unpow237.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 \left|\cos \left(\mathsf{fma}\left(y.im, \log \left(\sqrt{{x.re}^{2} + \color{blue}{{x.im}^{2}}}\right), \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\right)\right| \]
                      9. +-commutative37.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 \left|\cos \left(\mathsf{fma}\left(y.im, \log \left(\sqrt{\color{blue}{{x.im}^{2} + {x.re}^{2}}}\right), \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\right)\right| \]
                      10. unpow237.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 \left|\cos \left(\mathsf{fma}\left(y.im, \log \left(\sqrt{\color{blue}{x.im \cdot x.im} + {x.re}^{2}}\right), \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\right)\right| \]
                      11. unpow237.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 \left|\cos \left(\mathsf{fma}\left(y.im, \log \left(\sqrt{x.im \cdot x.im + \color{blue}{x.re \cdot x.re}}\right), \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\right)\right| \]
                      12. hypot-def84.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 \left|\cos \left(\mathsf{fma}\left(y.im, \log \color{blue}{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}, \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\right)\right| \]
                      13. *-commutative84.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 \left|\cos \left(\mathsf{fma}\left(y.im, \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right), \color{blue}{y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}}\right)\right)\right| \]
                    7. Simplified84.4%

                      \[\leadsto e^{\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \color{blue}{\left|\cos \left(\mathsf{fma}\left(y.im, \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right), y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right|} \]
                    8. Step-by-step derivation
                      1. add-cbrt-cube84.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 \left|\color{blue}{\sqrt[3]{\left(\cos \left(\mathsf{fma}\left(y.im, \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right), y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \cdot \cos \left(\mathsf{fma}\left(y.im, \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right), y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \cdot \cos \left(\mathsf{fma}\left(y.im, \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right), y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)}}\right| \]
                      2. pow384.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 \left|\sqrt[3]{\color{blue}{{\cos \left(\mathsf{fma}\left(y.im, \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right), y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)}^{3}}}\right| \]
                    9. Applied egg-rr84.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 \left|\color{blue}{\sqrt[3]{{\cos \left(\mathsf{fma}\left(y.im, \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right), y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)}^{3}}}\right| \]
                  3. Recombined 2 regimes into one program.
                  4. Final simplification83.4%

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

                  Alternative 5: 82.1% accurate, 0.4× speedup?

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

                    1. Initial program 51.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. Simplified51.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. *-commutative51.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(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, \color{blue}{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re}\right)\right) \]
                        2. add-cube-cbrt71.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(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, \color{blue}{\left(\sqrt[3]{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re} \cdot \sqrt[3]{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re}\right) \cdot \sqrt[3]{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re}}\right)\right) \]
                        3. pow371.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(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, \color{blue}{{\left(\sqrt[3]{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re}\right)}^{3}}\right)\right) \]
                      3. Applied egg-rr71.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(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, \color{blue}{{\left(\sqrt[3]{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re}\right)}^{3}}\right)\right) \]

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

                      1. Initial program 37.3%

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

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

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

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

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

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

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

                            \[\leadsto e^{\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \color{blue}{\left|\cos \left(\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)\right|} \]
                          3. fma-udef84.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 \left|\cos \color{blue}{\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}\right| \]
                          4. *-commutative84.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 \left|\cos \left(\color{blue}{y.im \cdot \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)} + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\right| \]
                          5. fma-def84.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 \left|\cos \color{blue}{\left(\mathsf{fma}\left(y.im, \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\right)}\right| \]
                          6. hypot-def37.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 \left|\cos \left(\mathsf{fma}\left(y.im, \log \color{blue}{\left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)}, \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\right)\right| \]
                          7. unpow237.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 \left|\cos \left(\mathsf{fma}\left(y.im, \log \left(\sqrt{\color{blue}{{x.re}^{2}} + x.im \cdot x.im}\right), \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\right)\right| \]
                          8. unpow237.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 \left|\cos \left(\mathsf{fma}\left(y.im, \log \left(\sqrt{{x.re}^{2} + \color{blue}{{x.im}^{2}}}\right), \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\right)\right| \]
                          9. +-commutative37.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 \left|\cos \left(\mathsf{fma}\left(y.im, \log \left(\sqrt{\color{blue}{{x.im}^{2} + {x.re}^{2}}}\right), \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\right)\right| \]
                          10. unpow237.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 \left|\cos \left(\mathsf{fma}\left(y.im, \log \left(\sqrt{\color{blue}{x.im \cdot x.im} + {x.re}^{2}}\right), \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\right)\right| \]
                          11. unpow237.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 \left|\cos \left(\mathsf{fma}\left(y.im, \log \left(\sqrt{x.im \cdot x.im + \color{blue}{x.re \cdot x.re}}\right), \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\right)\right| \]
                          12. hypot-def84.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 \left|\cos \left(\mathsf{fma}\left(y.im, \log \color{blue}{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}, \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\right)\right| \]
                          13. *-commutative84.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 \left|\cos \left(\mathsf{fma}\left(y.im, \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right), \color{blue}{y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}}\right)\right)\right| \]
                        7. Simplified84.4%

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

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

                      Alternative 6: 82.2% accurate, 0.7× speedup?

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

                        1. Initial program 42.4%

                          \[e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \]
                        2. Step-by-step derivation
                          1. Simplified78.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(\mathsf{fma}\left(\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. *-commutative78.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(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, \color{blue}{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re}\right)\right) \]
                            2. add-cube-cbrt81.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(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, \color{blue}{\left(\sqrt[3]{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re} \cdot \sqrt[3]{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re}\right) \cdot \sqrt[3]{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re}}\right)\right) \]
                            3. pow380.5%

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

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

                              \[\leadsto e^{\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \color{blue}{\sqrt{\cos \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, {\left(\sqrt[3]{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re}\right)}^{3}\right)\right) \cdot \cos \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, {\left(\sqrt[3]{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re}\right)}^{3}\right)\right)}} \]
                            3. pow284.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 \sqrt{\color{blue}{{\cos \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, {\left(\sqrt[3]{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re}\right)}^{3}\right)\right)}^{2}}} \]
                            4. rem-cube-cbrt84.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 \sqrt{{\cos \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, \color{blue}{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re}\right)\right)}^{2}} \]
                          5. Applied egg-rr84.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}{\sqrt{{\cos \left(\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)}^{2}}} \]
                          6. Step-by-step derivation
                            1. unpow284.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 \sqrt{\color{blue}{\cos \left(\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) \cdot \cos \left(\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)}} \]
                            2. rem-sqrt-square84.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}{\left|\cos \left(\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)\right|} \]
                            3. fma-udef84.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 \left|\cos \color{blue}{\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}\right| \]
                            4. *-commutative84.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 \left|\cos \left(\color{blue}{y.im \cdot \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)} + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\right| \]
                            5. fma-def84.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 \left|\cos \color{blue}{\left(\mathsf{fma}\left(y.im, \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\right)}\right| \]
                            6. hypot-def41.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 \left|\cos \left(\mathsf{fma}\left(y.im, \log \color{blue}{\left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)}, \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\right)\right| \]
                            7. unpow241.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 \left|\cos \left(\mathsf{fma}\left(y.im, \log \left(\sqrt{\color{blue}{{x.re}^{2}} + x.im \cdot x.im}\right), \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\right)\right| \]
                            8. unpow241.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 \left|\cos \left(\mathsf{fma}\left(y.im, \log \left(\sqrt{{x.re}^{2} + \color{blue}{{x.im}^{2}}}\right), \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\right)\right| \]
                            9. +-commutative41.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 \left|\cos \left(\mathsf{fma}\left(y.im, \log \left(\sqrt{\color{blue}{{x.im}^{2} + {x.re}^{2}}}\right), \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\right)\right| \]
                            10. unpow241.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 \left|\cos \left(\mathsf{fma}\left(y.im, \log \left(\sqrt{\color{blue}{x.im \cdot x.im} + {x.re}^{2}}\right), \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\right)\right| \]
                            11. unpow241.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 \left|\cos \left(\mathsf{fma}\left(y.im, \log \left(\sqrt{x.im \cdot x.im + \color{blue}{x.re \cdot x.re}}\right), \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\right)\right| \]
                            12. hypot-def84.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 \left|\cos \left(\mathsf{fma}\left(y.im, \log \color{blue}{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}, \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\right)\right| \]
                            13. *-commutative84.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 \left|\cos \left(\mathsf{fma}\left(y.im, \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right), \color{blue}{y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}}\right)\right)\right| \]
                          7. Simplified84.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}{\left|\cos \left(\mathsf{fma}\left(y.im, \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right), y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right|} \]

                          if 1.9999999999999998e-71 < x.re

                          1. Initial program 28.3%

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

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

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

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

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

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

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

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

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

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

                          Alternative 7: 82.4% accurate, 0.8× speedup?

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

                            1. Initial program 42.4%

                              \[e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \]
                            2. Step-by-step derivation
                              1. Simplified78.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(\mathsf{fma}\left(\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. *-commutative78.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(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, \color{blue}{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re}\right)\right) \]
                                2. add-cube-cbrt81.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(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, \color{blue}{\left(\sqrt[3]{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re} \cdot \sqrt[3]{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re}\right) \cdot \sqrt[3]{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re}}\right)\right) \]
                                3. pow380.5%

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

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

                                  \[\leadsto e^{\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \color{blue}{\sqrt{\cos \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, {\left(\sqrt[3]{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re}\right)}^{3}\right)\right) \cdot \cos \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, {\left(\sqrt[3]{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re}\right)}^{3}\right)\right)}} \]
                                3. pow284.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 \sqrt{\color{blue}{{\cos \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, {\left(\sqrt[3]{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re}\right)}^{3}\right)\right)}^{2}}} \]
                                4. rem-cube-cbrt84.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 \sqrt{{\cos \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, \color{blue}{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re}\right)\right)}^{2}} \]
                              5. Applied egg-rr84.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}{\sqrt{{\cos \left(\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)}^{2}}} \]
                              6. Step-by-step derivation
                                1. unpow284.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 \sqrt{\color{blue}{\cos \left(\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) \cdot \cos \left(\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)}} \]
                                2. rem-sqrt-square84.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}{\left|\cos \left(\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)\right|} \]
                                3. fma-udef84.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 \left|\cos \color{blue}{\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}\right| \]
                                4. *-commutative84.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 \left|\cos \left(\color{blue}{y.im \cdot \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)} + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\right| \]
                                5. fma-def84.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 \left|\cos \color{blue}{\left(\mathsf{fma}\left(y.im, \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\right)}\right| \]
                                6. hypot-def41.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 \left|\cos \left(\mathsf{fma}\left(y.im, \log \color{blue}{\left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)}, \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\right)\right| \]
                                7. unpow241.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 \left|\cos \left(\mathsf{fma}\left(y.im, \log \left(\sqrt{\color{blue}{{x.re}^{2}} + x.im \cdot x.im}\right), \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\right)\right| \]
                                8. unpow241.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 \left|\cos \left(\mathsf{fma}\left(y.im, \log \left(\sqrt{{x.re}^{2} + \color{blue}{{x.im}^{2}}}\right), \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\right)\right| \]
                                9. +-commutative41.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 \left|\cos \left(\mathsf{fma}\left(y.im, \log \left(\sqrt{\color{blue}{{x.im}^{2} + {x.re}^{2}}}\right), \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\right)\right| \]
                                10. unpow241.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 \left|\cos \left(\mathsf{fma}\left(y.im, \log \left(\sqrt{\color{blue}{x.im \cdot x.im} + {x.re}^{2}}\right), \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\right)\right| \]
                                11. unpow241.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 \left|\cos \left(\mathsf{fma}\left(y.im, \log \left(\sqrt{x.im \cdot x.im + \color{blue}{x.re \cdot x.re}}\right), \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\right)\right| \]
                                12. hypot-def84.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 \left|\cos \left(\mathsf{fma}\left(y.im, \log \color{blue}{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}, \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\right)\right| \]
                                13. *-commutative84.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 \left|\cos \left(\mathsf{fma}\left(y.im, \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right), \color{blue}{y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}}\right)\right)\right| \]
                              7. Simplified84.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}{\left|\cos \left(\mathsf{fma}\left(y.im, \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right), y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right|} \]

                              if 1.9999999999999999e-75 < x.re

                              1. Initial program 28.3%

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

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

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

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

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

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

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

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

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

                              Alternative 8: 82.3% accurate, 0.8× speedup?

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

                                1. Initial program 42.4%

                                  \[e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \]
                                2. Step-by-step derivation
                                  1. Simplified78.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(\mathsf{fma}\left(\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. *-commutative78.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(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, \color{blue}{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re}\right)\right) \]
                                    2. add-cube-cbrt81.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(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, \color{blue}{\left(\sqrt[3]{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re} \cdot \sqrt[3]{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re}\right) \cdot \sqrt[3]{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re}}\right)\right) \]
                                    3. pow380.5%

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

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

                                      \[\leadsto e^{\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \color{blue}{\sqrt{\cos \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, {\left(\sqrt[3]{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re}\right)}^{3}\right)\right) \cdot \cos \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, {\left(\sqrt[3]{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re}\right)}^{3}\right)\right)}} \]
                                    3. pow284.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 \sqrt{\color{blue}{{\cos \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, {\left(\sqrt[3]{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re}\right)}^{3}\right)\right)}^{2}}} \]
                                    4. rem-cube-cbrt84.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 \sqrt{{\cos \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, \color{blue}{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re}\right)\right)}^{2}} \]
                                  5. Applied egg-rr84.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}{\sqrt{{\cos \left(\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)}^{2}}} \]
                                  6. Step-by-step derivation
                                    1. unpow284.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 \sqrt{\color{blue}{\cos \left(\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) \cdot \cos \left(\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)}} \]
                                    2. rem-sqrt-square84.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}{\left|\cos \left(\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)\right|} \]
                                    3. fma-udef84.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 \left|\cos \color{blue}{\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}\right| \]
                                    4. *-commutative84.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 \left|\cos \left(\color{blue}{y.im \cdot \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)} + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\right| \]
                                    5. fma-def84.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 \left|\cos \color{blue}{\left(\mathsf{fma}\left(y.im, \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\right)}\right| \]
                                    6. hypot-def41.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 \left|\cos \left(\mathsf{fma}\left(y.im, \log \color{blue}{\left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)}, \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\right)\right| \]
                                    7. unpow241.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 \left|\cos \left(\mathsf{fma}\left(y.im, \log \left(\sqrt{\color{blue}{{x.re}^{2}} + x.im \cdot x.im}\right), \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\right)\right| \]
                                    8. unpow241.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 \left|\cos \left(\mathsf{fma}\left(y.im, \log \left(\sqrt{{x.re}^{2} + \color{blue}{{x.im}^{2}}}\right), \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\right)\right| \]
                                    9. +-commutative41.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 \left|\cos \left(\mathsf{fma}\left(y.im, \log \left(\sqrt{\color{blue}{{x.im}^{2} + {x.re}^{2}}}\right), \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\right)\right| \]
                                    10. unpow241.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 \left|\cos \left(\mathsf{fma}\left(y.im, \log \left(\sqrt{\color{blue}{x.im \cdot x.im} + {x.re}^{2}}\right), \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\right)\right| \]
                                    11. unpow241.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 \left|\cos \left(\mathsf{fma}\left(y.im, \log \left(\sqrt{x.im \cdot x.im + \color{blue}{x.re \cdot x.re}}\right), \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\right)\right| \]
                                    12. hypot-def84.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 \left|\cos \left(\mathsf{fma}\left(y.im, \log \color{blue}{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}, \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\right)\right| \]
                                    13. *-commutative84.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 \left|\cos \left(\mathsf{fma}\left(y.im, \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right), \color{blue}{y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}}\right)\right)\right| \]
                                  7. Simplified84.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}{\left|\cos \left(\mathsf{fma}\left(y.im, \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right), y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right|} \]
                                  8. Step-by-step derivation
                                    1. add-cbrt-cube84.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 \left|\color{blue}{\sqrt[3]{\left(\cos \left(\mathsf{fma}\left(y.im, \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right), y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \cdot \cos \left(\mathsf{fma}\left(y.im, \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right), y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \cdot \cos \left(\mathsf{fma}\left(y.im, \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right), y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)}}\right| \]
                                    2. pow384.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 \left|\sqrt[3]{\color{blue}{{\cos \left(\mathsf{fma}\left(y.im, \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right), y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)}^{3}}}\right| \]
                                  9. Applied egg-rr84.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 \left|\color{blue}{\sqrt[3]{{\cos \left(\mathsf{fma}\left(y.im, \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right), y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)}^{3}}}\right| \]
                                  10. Taylor expanded in y.im around inf 41.5%

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

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

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

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

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

                                  if 1.9999999999999999e-75 < x.re

                                  1. Initial program 28.3%

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

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

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

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

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

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

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

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

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

                                  Alternative 9: 82.1% accurate, 0.8× speedup?

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

                                    1. Initial program 42.4%

                                      \[e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \]
                                    2. Step-by-step derivation
                                      1. Simplified78.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(\mathsf{fma}\left(\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. *-commutative78.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(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, \color{blue}{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re}\right)\right) \]
                                        2. add-cube-cbrt81.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(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, \color{blue}{\left(\sqrt[3]{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re} \cdot \sqrt[3]{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re}\right) \cdot \sqrt[3]{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re}}\right)\right) \]
                                        3. pow380.5%

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

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

                                          \[\leadsto e^{\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \color{blue}{\sqrt{\cos \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, {\left(\sqrt[3]{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re}\right)}^{3}\right)\right) \cdot \cos \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, {\left(\sqrt[3]{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re}\right)}^{3}\right)\right)}} \]
                                        3. pow284.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 \sqrt{\color{blue}{{\cos \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, {\left(\sqrt[3]{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re}\right)}^{3}\right)\right)}^{2}}} \]
                                        4. rem-cube-cbrt84.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 \sqrt{{\cos \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, \color{blue}{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re}\right)\right)}^{2}} \]
                                      5. Applied egg-rr84.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}{\sqrt{{\cos \left(\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)}^{2}}} \]
                                      6. Step-by-step derivation
                                        1. unpow284.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 \sqrt{\color{blue}{\cos \left(\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) \cdot \cos \left(\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)}} \]
                                        2. rem-sqrt-square84.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}{\left|\cos \left(\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)\right|} \]
                                        3. fma-udef84.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 \left|\cos \color{blue}{\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}\right| \]
                                        4. *-commutative84.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 \left|\cos \left(\color{blue}{y.im \cdot \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)} + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\right| \]
                                        5. fma-def84.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 \left|\cos \color{blue}{\left(\mathsf{fma}\left(y.im, \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\right)}\right| \]
                                        6. hypot-def41.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 \left|\cos \left(\mathsf{fma}\left(y.im, \log \color{blue}{\left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)}, \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\right)\right| \]
                                        7. unpow241.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 \left|\cos \left(\mathsf{fma}\left(y.im, \log \left(\sqrt{\color{blue}{{x.re}^{2}} + x.im \cdot x.im}\right), \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\right)\right| \]
                                        8. unpow241.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 \left|\cos \left(\mathsf{fma}\left(y.im, \log \left(\sqrt{{x.re}^{2} + \color{blue}{{x.im}^{2}}}\right), \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\right)\right| \]
                                        9. +-commutative41.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 \left|\cos \left(\mathsf{fma}\left(y.im, \log \left(\sqrt{\color{blue}{{x.im}^{2} + {x.re}^{2}}}\right), \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\right)\right| \]
                                        10. unpow241.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 \left|\cos \left(\mathsf{fma}\left(y.im, \log \left(\sqrt{\color{blue}{x.im \cdot x.im} + {x.re}^{2}}\right), \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\right)\right| \]
                                        11. unpow241.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 \left|\cos \left(\mathsf{fma}\left(y.im, \log \left(\sqrt{x.im \cdot x.im + \color{blue}{x.re \cdot x.re}}\right), \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\right)\right| \]
                                        12. hypot-def84.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 \left|\cos \left(\mathsf{fma}\left(y.im, \log \color{blue}{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}, \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\right)\right| \]
                                        13. *-commutative84.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 \left|\cos \left(\mathsf{fma}\left(y.im, \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right), \color{blue}{y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}}\right)\right)\right| \]
                                      7. Simplified84.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}{\left|\cos \left(\mathsf{fma}\left(y.im, \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right), y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right|} \]
                                      8. Step-by-step derivation
                                        1. add-cbrt-cube84.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 \left|\color{blue}{\sqrt[3]{\left(\cos \left(\mathsf{fma}\left(y.im, \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right), y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \cdot \cos \left(\mathsf{fma}\left(y.im, \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right), y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \cdot \cos \left(\mathsf{fma}\left(y.im, \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right), y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)}}\right| \]
                                        2. pow384.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 \left|\sqrt[3]{\color{blue}{{\cos \left(\mathsf{fma}\left(y.im, \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right), y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)}^{3}}}\right| \]
                                      9. Applied egg-rr84.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 \left|\color{blue}{\sqrt[3]{{\cos \left(\mathsf{fma}\left(y.im, \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right), y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)}^{3}}}\right| \]
                                      10. Taylor expanded in y.im around inf 41.5%

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

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

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

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

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

                                      if 1.2499999999999999e-72 < x.re

                                      1. Initial program 28.3%

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

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

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

                                      Alternative 10: 82.1% accurate, 0.9× speedup?

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

                                        1. Initial program 42.4%

                                          \[e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \]
                                        2. Step-by-step derivation
                                          1. Simplified78.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(\mathsf{fma}\left(\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. *-commutative78.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(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, \color{blue}{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re}\right)\right) \]
                                            2. add-cube-cbrt81.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(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, \color{blue}{\left(\sqrt[3]{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re} \cdot \sqrt[3]{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re}\right) \cdot \sqrt[3]{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re}}\right)\right) \]
                                            3. pow380.5%

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

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

                                              \[\leadsto e^{\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \color{blue}{\sqrt{\cos \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, {\left(\sqrt[3]{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re}\right)}^{3}\right)\right) \cdot \cos \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, {\left(\sqrt[3]{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re}\right)}^{3}\right)\right)}} \]
                                            3. pow284.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 \sqrt{\color{blue}{{\cos \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, {\left(\sqrt[3]{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re}\right)}^{3}\right)\right)}^{2}}} \]
                                            4. rem-cube-cbrt84.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 \sqrt{{\cos \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, \color{blue}{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re}\right)\right)}^{2}} \]
                                          5. Applied egg-rr84.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}{\sqrt{{\cos \left(\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)}^{2}}} \]
                                          6. Step-by-step derivation
                                            1. unpow284.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 \sqrt{\color{blue}{\cos \left(\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) \cdot \cos \left(\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)}} \]
                                            2. rem-sqrt-square84.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}{\left|\cos \left(\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)\right|} \]
                                            3. fma-udef84.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 \left|\cos \color{blue}{\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}\right| \]
                                            4. *-commutative84.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 \left|\cos \left(\color{blue}{y.im \cdot \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)} + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\right| \]
                                            5. fma-def84.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 \left|\cos \color{blue}{\left(\mathsf{fma}\left(y.im, \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\right)}\right| \]
                                            6. hypot-def41.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 \left|\cos \left(\mathsf{fma}\left(y.im, \log \color{blue}{\left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)}, \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\right)\right| \]
                                            7. unpow241.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 \left|\cos \left(\mathsf{fma}\left(y.im, \log \left(\sqrt{\color{blue}{{x.re}^{2}} + x.im \cdot x.im}\right), \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\right)\right| \]
                                            8. unpow241.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 \left|\cos \left(\mathsf{fma}\left(y.im, \log \left(\sqrt{{x.re}^{2} + \color{blue}{{x.im}^{2}}}\right), \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\right)\right| \]
                                            9. +-commutative41.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 \left|\cos \left(\mathsf{fma}\left(y.im, \log \left(\sqrt{\color{blue}{{x.im}^{2} + {x.re}^{2}}}\right), \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\right)\right| \]
                                            10. unpow241.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 \left|\cos \left(\mathsf{fma}\left(y.im, \log \left(\sqrt{\color{blue}{x.im \cdot x.im} + {x.re}^{2}}\right), \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\right)\right| \]
                                            11. unpow241.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 \left|\cos \left(\mathsf{fma}\left(y.im, \log \left(\sqrt{x.im \cdot x.im + \color{blue}{x.re \cdot x.re}}\right), \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\right)\right| \]
                                            12. hypot-def84.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 \left|\cos \left(\mathsf{fma}\left(y.im, \log \color{blue}{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}, \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\right)\right| \]
                                            13. *-commutative84.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 \left|\cos \left(\mathsf{fma}\left(y.im, \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right), \color{blue}{y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}}\right)\right)\right| \]
                                          7. Simplified84.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}{\left|\cos \left(\mathsf{fma}\left(y.im, \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right), y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right|} \]
                                          8. Taylor expanded in y.re around 0 41.5%

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

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

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

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

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

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

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

                                          if 9.9999999999999997e-73 < x.re

                                          1. Initial program 28.3%

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

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

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

                                          Alternative 11: 82.2% accurate, 1.0× speedup?

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

                                            1. Initial program 42.4%

                                              \[e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \cos \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \]
                                            2. Step-by-step derivation
                                              1. Simplified78.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(\mathsf{fma}\left(\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. *-commutative78.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(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, \color{blue}{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re}\right)\right) \]
                                                2. add-cube-cbrt81.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(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, \color{blue}{\left(\sqrt[3]{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re} \cdot \sqrt[3]{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re}\right) \cdot \sqrt[3]{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re}}\right)\right) \]
                                                3. pow380.5%

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

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

                                                  \[\leadsto e^{\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \color{blue}{\sqrt{\cos \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, {\left(\sqrt[3]{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re}\right)}^{3}\right)\right) \cdot \cos \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, {\left(\sqrt[3]{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re}\right)}^{3}\right)\right)}} \]
                                                3. pow284.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 \sqrt{\color{blue}{{\cos \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, {\left(\sqrt[3]{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re}\right)}^{3}\right)\right)}^{2}}} \]
                                                4. rem-cube-cbrt84.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 \sqrt{{\cos \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, \color{blue}{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re}\right)\right)}^{2}} \]
                                              5. Applied egg-rr84.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}{\sqrt{{\cos \left(\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)}^{2}}} \]
                                              6. Step-by-step derivation
                                                1. unpow284.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 \sqrt{\color{blue}{\cos \left(\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) \cdot \cos \left(\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)}} \]
                                                2. rem-sqrt-square84.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}{\left|\cos \left(\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)\right|} \]
                                                3. fma-udef84.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 \left|\cos \color{blue}{\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}\right| \]
                                                4. *-commutative84.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 \left|\cos \left(\color{blue}{y.im \cdot \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)} + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\right| \]
                                                5. fma-def84.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 \left|\cos \color{blue}{\left(\mathsf{fma}\left(y.im, \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\right)}\right| \]
                                                6. hypot-def41.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 \left|\cos \left(\mathsf{fma}\left(y.im, \log \color{blue}{\left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)}, \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\right)\right| \]
                                                7. unpow241.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 \left|\cos \left(\mathsf{fma}\left(y.im, \log \left(\sqrt{\color{blue}{{x.re}^{2}} + x.im \cdot x.im}\right), \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\right)\right| \]
                                                8. unpow241.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 \left|\cos \left(\mathsf{fma}\left(y.im, \log \left(\sqrt{{x.re}^{2} + \color{blue}{{x.im}^{2}}}\right), \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\right)\right| \]
                                                9. +-commutative41.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 \left|\cos \left(\mathsf{fma}\left(y.im, \log \left(\sqrt{\color{blue}{{x.im}^{2} + {x.re}^{2}}}\right), \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\right)\right| \]
                                                10. unpow241.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 \left|\cos \left(\mathsf{fma}\left(y.im, \log \left(\sqrt{\color{blue}{x.im \cdot x.im} + {x.re}^{2}}\right), \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\right)\right| \]
                                                11. unpow241.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 \left|\cos \left(\mathsf{fma}\left(y.im, \log \left(\sqrt{x.im \cdot x.im + \color{blue}{x.re \cdot x.re}}\right), \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\right)\right| \]
                                                12. hypot-def84.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 \left|\cos \left(\mathsf{fma}\left(y.im, \log \color{blue}{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}, \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\right)\right| \]
                                                13. *-commutative84.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 \left|\cos \left(\mathsf{fma}\left(y.im, \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right), \color{blue}{y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}}\right)\right)\right| \]
                                              7. Simplified84.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}{\left|\cos \left(\mathsf{fma}\left(y.im, \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right), y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right|} \]
                                              8. Taylor expanded in y.re around 0 41.5%

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

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

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

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

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

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

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

                                              if 1.0500000000000001e-71 < x.re

                                              1. Initial program 28.3%

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

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

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

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

                                              Alternative 12: 79.0% accurate, 1.6× speedup?

                                              \[\begin{array}{l} \\ \begin{array}{l} t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\ \mathbf{if}\;x.im \leq -2.2 \cdot 10^{-8}:\\ \;\;\;\;e^{y.re \cdot \log \left(-x.im\right) - t_0}\\ \mathbf{elif}\;x.im \leq 4.2 \cdot 10^{-114}:\\ \;\;\;\;e^{\log \left({\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\right) - t_0}\\ \mathbf{else}:\\ \;\;\;\;e^{y.re \cdot \log x.im - t_0}\\ \end{array} \end{array} \]
                                              (FPCore (x.re x.im y.re y.im)
                                               :precision binary64
                                               (let* ((t_0 (* (atan2 x.im x.re) y.im)))
                                                 (if (<= x.im -2.2e-8)
                                                   (exp (- (* y.re (log (- x.im))) t_0))
                                                   (if (<= x.im 4.2e-114)
                                                     (exp (- (log (pow (hypot x.re x.im) y.re)) t_0))
                                                     (exp (- (* y.re (log x.im)) t_0))))))
                                              double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
                                              	double t_0 = atan2(x_46_im, x_46_re) * y_46_im;
                                              	double tmp;
                                              	if (x_46_im <= -2.2e-8) {
                                              		tmp = exp(((y_46_re * log(-x_46_im)) - t_0));
                                              	} else if (x_46_im <= 4.2e-114) {
                                              		tmp = exp((log(pow(hypot(x_46_re, x_46_im), y_46_re)) - t_0));
                                              	} else {
                                              		tmp = exp(((y_46_re * log(x_46_im)) - t_0));
                                              	}
                                              	return tmp;
                                              }
                                              
                                              public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
                                              	double t_0 = Math.atan2(x_46_im, x_46_re) * y_46_im;
                                              	double tmp;
                                              	if (x_46_im <= -2.2e-8) {
                                              		tmp = Math.exp(((y_46_re * Math.log(-x_46_im)) - t_0));
                                              	} else if (x_46_im <= 4.2e-114) {
                                              		tmp = Math.exp((Math.log(Math.pow(Math.hypot(x_46_re, x_46_im), y_46_re)) - t_0));
                                              	} else {
                                              		tmp = Math.exp(((y_46_re * Math.log(x_46_im)) - t_0));
                                              	}
                                              	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 <= -2.2e-8:
                                              		tmp = math.exp(((y_46_re * math.log(-x_46_im)) - t_0))
                                              	elif x_46_im <= 4.2e-114:
                                              		tmp = math.exp((math.log(math.pow(math.hypot(x_46_re, x_46_im), y_46_re)) - t_0))
                                              	else:
                                              		tmp = math.exp(((y_46_re * math.log(x_46_im)) - t_0))
                                              	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 <= -2.2e-8)
                                              		tmp = exp(Float64(Float64(y_46_re * log(Float64(-x_46_im))) - t_0));
                                              	elseif (x_46_im <= 4.2e-114)
                                              		tmp = exp(Float64(log((hypot(x_46_re, x_46_im) ^ y_46_re)) - t_0));
                                              	else
                                              		tmp = exp(Float64(Float64(y_46_re * log(x_46_im)) - t_0));
                                              	end
                                              	return tmp
                                              end
                                              
                                              function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im)
                                              	t_0 = atan2(x_46_im, x_46_re) * y_46_im;
                                              	tmp = 0.0;
                                              	if (x_46_im <= -2.2e-8)
                                              		tmp = exp(((y_46_re * log(-x_46_im)) - t_0));
                                              	elseif (x_46_im <= 4.2e-114)
                                              		tmp = exp((log((hypot(x_46_re, x_46_im) ^ y_46_re)) - t_0));
                                              	else
                                              		tmp = exp(((y_46_re * log(x_46_im)) - t_0));
                                              	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, -2.2e-8], N[Exp[N[(N[(y$46$re * N[Log[(-x$46$im)], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision], If[LessEqual[x$46$im, 4.2e-114], N[Exp[N[(N[Log[N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $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 -2.2 \cdot 10^{-8}:\\
                                              \;\;\;\;e^{y.re \cdot \log \left(-x.im\right) - t_0}\\
                                              
                                              \mathbf{elif}\;x.im \leq 4.2 \cdot 10^{-114}:\\
                                              \;\;\;\;e^{\log \left({\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\right) - t_0}\\
                                              
                                              \mathbf{else}:\\
                                              \;\;\;\;e^{y.re \cdot \log x.im - t_0}\\
                                              
                                              
                                              \end{array}
                                              \end{array}
                                              
                                              Derivation
                                              1. Split input into 3 regimes
                                              2. if x.im < -2.1999999999999998e-8

                                                1. Initial program 33.8%

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

                                                  \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \color{blue}{1} \]
                                                4. Taylor expanded in x.im around -inf 81.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-neg81.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. Simplified81.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 -2.1999999999999998e-8 < x.im < 4.19999999999999985e-114

                                                1. Initial program 43.4%

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

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

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

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

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

                                                if 4.19999999999999985e-114 < x.im

                                                1. Initial program 36.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 60.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 65.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 83.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 3 regimes into one program.
                                              4. Final simplification80.9%

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

                                              Alternative 13: 73.8% accurate, 2.0× speedup?

                                              \[\begin{array}{l} \\ \begin{array}{l} t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\ t_1 := e^{y.re \cdot \log \left(-x.im\right) - t_0}\\ \mathbf{if}\;x.im \leq -1.6 \cdot 10^{-8}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x.im \leq -2.15 \cdot 10^{-173}:\\ \;\;\;\;e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - t_0}\\ \mathbf{elif}\;x.im \leq -5 \cdot 10^{-310}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;e^{y.re \cdot \log x.im - t_0}\\ \end{array} \end{array} \]
                                              (FPCore (x.re x.im y.re y.im)
                                               :precision binary64
                                               (let* ((t_0 (* (atan2 x.im x.re) y.im))
                                                      (t_1 (exp (- (* y.re (log (- x.im))) t_0))))
                                                 (if (<= x.im -1.6e-8)
                                                   t_1
                                                   (if (<= x.im -2.15e-173)
                                                     (exp (- (* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.re) t_0))
                                                     (if (<= x.im -5e-310) t_1 (exp (- (* y.re (log x.im)) t_0)))))))
                                              double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
                                              	double t_0 = atan2(x_46_im, x_46_re) * y_46_im;
                                              	double t_1 = exp(((y_46_re * log(-x_46_im)) - t_0));
                                              	double tmp;
                                              	if (x_46_im <= -1.6e-8) {
                                              		tmp = t_1;
                                              	} else if (x_46_im <= -2.15e-173) {
                                              		tmp = exp(((log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - t_0));
                                              	} else if (x_46_im <= -5e-310) {
                                              		tmp = t_1;
                                              	} else {
                                              		tmp = exp(((y_46_re * log(x_46_im)) - t_0));
                                              	}
                                              	return tmp;
                                              }
                                              
                                              real(8) function code(x_46re, x_46im, y_46re, y_46im)
                                                  real(8), intent (in) :: x_46re
                                                  real(8), intent (in) :: x_46im
                                                  real(8), intent (in) :: y_46re
                                                  real(8), intent (in) :: y_46im
                                                  real(8) :: t_0
                                                  real(8) :: t_1
                                                  real(8) :: tmp
                                                  t_0 = atan2(x_46im, x_46re) * y_46im
                                                  t_1 = exp(((y_46re * log(-x_46im)) - t_0))
                                                  if (x_46im <= (-1.6d-8)) then
                                                      tmp = t_1
                                                  else if (x_46im <= (-2.15d-173)) then
                                                      tmp = exp(((log(sqrt(((x_46re * x_46re) + (x_46im * x_46im)))) * y_46re) - t_0))
                                                  else if (x_46im <= (-5d-310)) then
                                                      tmp = t_1
                                                  else
                                                      tmp = exp(((y_46re * log(x_46im)) - t_0))
                                                  end if
                                                  code = tmp
                                              end function
                                              
                                              public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
                                              	double t_0 = Math.atan2(x_46_im, x_46_re) * y_46_im;
                                              	double t_1 = Math.exp(((y_46_re * Math.log(-x_46_im)) - t_0));
                                              	double tmp;
                                              	if (x_46_im <= -1.6e-8) {
                                              		tmp = t_1;
                                              	} else if (x_46_im <= -2.15e-173) {
                                              		tmp = Math.exp(((Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - t_0));
                                              	} else if (x_46_im <= -5e-310) {
                                              		tmp = t_1;
                                              	} else {
                                              		tmp = Math.exp(((y_46_re * Math.log(x_46_im)) - t_0));
                                              	}
                                              	return tmp;
                                              }
                                              
                                              def code(x_46_re, x_46_im, y_46_re, y_46_im):
                                              	t_0 = math.atan2(x_46_im, x_46_re) * y_46_im
                                              	t_1 = math.exp(((y_46_re * math.log(-x_46_im)) - t_0))
                                              	tmp = 0
                                              	if x_46_im <= -1.6e-8:
                                              		tmp = t_1
                                              	elif x_46_im <= -2.15e-173:
                                              		tmp = math.exp(((math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - t_0))
                                              	elif x_46_im <= -5e-310:
                                              		tmp = t_1
                                              	else:
                                              		tmp = math.exp(((y_46_re * math.log(x_46_im)) - t_0))
                                              	return tmp
                                              
                                              function code(x_46_re, x_46_im, y_46_re, y_46_im)
                                              	t_0 = Float64(atan(x_46_im, x_46_re) * y_46_im)
                                              	t_1 = exp(Float64(Float64(y_46_re * log(Float64(-x_46_im))) - t_0))
                                              	tmp = 0.0
                                              	if (x_46_im <= -1.6e-8)
                                              		tmp = t_1;
                                              	elseif (x_46_im <= -2.15e-173)
                                              		tmp = exp(Float64(Float64(log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) * y_46_re) - t_0));
                                              	elseif (x_46_im <= -5e-310)
                                              		tmp = t_1;
                                              	else
                                              		tmp = exp(Float64(Float64(y_46_re * log(x_46_im)) - t_0));
                                              	end
                                              	return tmp
                                              end
                                              
                                              function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im)
                                              	t_0 = atan2(x_46_im, x_46_re) * y_46_im;
                                              	t_1 = exp(((y_46_re * log(-x_46_im)) - t_0));
                                              	tmp = 0.0;
                                              	if (x_46_im <= -1.6e-8)
                                              		tmp = t_1;
                                              	elseif (x_46_im <= -2.15e-173)
                                              		tmp = exp(((log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - t_0));
                                              	elseif (x_46_im <= -5e-310)
                                              		tmp = t_1;
                                              	else
                                              		tmp = exp(((y_46_re * log(x_46_im)) - t_0));
                                              	end
                                              	tmp_2 = tmp;
                                              end
                                              
                                              code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, Block[{t$95$1 = N[Exp[N[(N[(y$46$re * N[Log[(-x$46$im)], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[x$46$im, -1.6e-8], t$95$1, If[LessEqual[x$46$im, -2.15e-173], N[Exp[N[(N[(N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * y$46$re), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision], If[LessEqual[x$46$im, -5e-310], t$95$1, N[Exp[N[(N[(y$46$re * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]]]]]]
                                              
                                              \begin{array}{l}
                                              
                                              \\
                                              \begin{array}{l}
                                              t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
                                              t_1 := e^{y.re \cdot \log \left(-x.im\right) - t_0}\\
                                              \mathbf{if}\;x.im \leq -1.6 \cdot 10^{-8}:\\
                                              \;\;\;\;t_1\\
                                              
                                              \mathbf{elif}\;x.im \leq -2.15 \cdot 10^{-173}:\\
                                              \;\;\;\;e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - t_0}\\
                                              
                                              \mathbf{elif}\;x.im \leq -5 \cdot 10^{-310}:\\
                                              \;\;\;\;t_1\\
                                              
                                              \mathbf{else}:\\
                                              \;\;\;\;e^{y.re \cdot \log x.im - t_0}\\
                                              
                                              
                                              \end{array}
                                              \end{array}
                                              
                                              Derivation
                                              1. Split input into 3 regimes
                                              2. if x.im < -1.6000000000000001e-8 or -2.1500000000000002e-173 < x.im < -4.999999999999985e-310

                                                1. Initial program 36.0%

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

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

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

                                                  \[\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-neg81.9%

                                                    \[\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. Simplified81.9%

                                                  \[\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 -1.6000000000000001e-8 < x.im < -2.1500000000000002e-173

                                                1. Initial program 63.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 67.0%

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

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

                                                if -4.999999999999985e-310 < x.im

                                                1. Initial program 34.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 57.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 60.1%

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

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

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

                                              Alternative 14: 72.7% accurate, 2.7× speedup?

                                              \[\begin{array}{l} \\ \begin{array}{l} t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\ \mathbf{if}\;x.im \leq -5 \cdot 10^{-310}:\\ \;\;\;\;e^{y.re \cdot \log \left(-x.im\right) - t_0}\\ \mathbf{else}:\\ \;\;\;\;e^{y.re \cdot \log x.im - t_0}\\ \end{array} \end{array} \]
                                              (FPCore (x.re x.im y.re y.im)
                                               :precision binary64
                                               (let* ((t_0 (* (atan2 x.im x.re) y.im)))
                                                 (if (<= x.im -5e-310)
                                                   (exp (- (* y.re (log (- x.im))) t_0))
                                                   (exp (- (* y.re (log x.im)) t_0)))))
                                              double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
                                              	double t_0 = atan2(x_46_im, x_46_re) * y_46_im;
                                              	double tmp;
                                              	if (x_46_im <= -5e-310) {
                                              		tmp = exp(((y_46_re * log(-x_46_im)) - t_0));
                                              	} else {
                                              		tmp = exp(((y_46_re * log(x_46_im)) - t_0));
                                              	}
                                              	return tmp;
                                              }
                                              
                                              real(8) function code(x_46re, x_46im, y_46re, y_46im)
                                                  real(8), intent (in) :: x_46re
                                                  real(8), intent (in) :: x_46im
                                                  real(8), intent (in) :: y_46re
                                                  real(8), intent (in) :: y_46im
                                                  real(8) :: t_0
                                                  real(8) :: tmp
                                                  t_0 = atan2(x_46im, x_46re) * y_46im
                                                  if (x_46im <= (-5d-310)) then
                                                      tmp = exp(((y_46re * log(-x_46im)) - t_0))
                                                  else
                                                      tmp = exp(((y_46re * log(x_46im)) - t_0))
                                                  end if
                                                  code = tmp
                                              end function
                                              
                                              public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
                                              	double t_0 = Math.atan2(x_46_im, x_46_re) * y_46_im;
                                              	double tmp;
                                              	if (x_46_im <= -5e-310) {
                                              		tmp = Math.exp(((y_46_re * Math.log(-x_46_im)) - t_0));
                                              	} else {
                                              		tmp = Math.exp(((y_46_re * Math.log(x_46_im)) - t_0));
                                              	}
                                              	return tmp;
                                              }
                                              
                                              def code(x_46_re, x_46_im, y_46_re, y_46_im):
                                              	t_0 = math.atan2(x_46_im, x_46_re) * y_46_im
                                              	tmp = 0
                                              	if x_46_im <= -5e-310:
                                              		tmp = math.exp(((y_46_re * math.log(-x_46_im)) - t_0))
                                              	else:
                                              		tmp = math.exp(((y_46_re * math.log(x_46_im)) - t_0))
                                              	return tmp
                                              
                                              function code(x_46_re, x_46_im, y_46_re, y_46_im)
                                              	t_0 = Float64(atan(x_46_im, x_46_re) * y_46_im)
                                              	tmp = 0.0
                                              	if (x_46_im <= -5e-310)
                                              		tmp = exp(Float64(Float64(y_46_re * log(Float64(-x_46_im))) - t_0));
                                              	else
                                              		tmp = exp(Float64(Float64(y_46_re * log(x_46_im)) - t_0));
                                              	end
                                              	return tmp
                                              end
                                              
                                              function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im)
                                              	t_0 = atan2(x_46_im, x_46_re) * y_46_im;
                                              	tmp = 0.0;
                                              	if (x_46_im <= -5e-310)
                                              		tmp = exp(((y_46_re * log(-x_46_im)) - t_0));
                                              	else
                                              		tmp = exp(((y_46_re * log(x_46_im)) - t_0));
                                              	end
                                              	tmp_2 = tmp;
                                              end
                                              
                                              code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, If[LessEqual[x$46$im, -5e-310], N[Exp[N[(N[(y$46$re * N[Log[(-x$46$im)], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision], N[Exp[N[(N[(y$46$re * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]]]
                                              
                                              \begin{array}{l}
                                              
                                              \\
                                              \begin{array}{l}
                                              t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
                                              \mathbf{if}\;x.im \leq -5 \cdot 10^{-310}:\\
                                              \;\;\;\;e^{y.re \cdot \log \left(-x.im\right) - t_0}\\
                                              
                                              \mathbf{else}:\\
                                              \;\;\;\;e^{y.re \cdot \log x.im - t_0}\\
                                              
                                              
                                              \end{array}
                                              \end{array}
                                              
                                              Derivation
                                              1. Split input into 2 regimes
                                              2. if x.im < -4.999999999999985e-310

                                                1. Initial program 42.9%

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

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

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

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

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

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

                                                if -4.999999999999985e-310 < x.im

                                                1. Initial program 34.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 57.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 60.1%

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

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

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

                                              Alternative 15: 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 -5.4 \cdot 10^{-285}:\\ \;\;\;\;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 -5.4e-285)
                                                   (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 <= -5.4e-285) {
                                              		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 <= (-5.4d-285)) 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 <= -5.4e-285) {
                                              		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 <= -5.4e-285:
                                              		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 <= -5.4e-285)
                                              		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 <= -5.4e-285)
                                              		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, -5.4e-285], 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 -5.4 \cdot 10^{-285}:\\
                                              \;\;\;\;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 < -5.3999999999999997e-285

                                                1. Initial program 41.8%

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

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

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

                                                if -5.3999999999999997e-285 < x.re

                                                1. Initial program 34.7%

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

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

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

                                                \[\leadsto \begin{array}{l} \mathbf{if}\;x.re \leq -5.4 \cdot 10^{-285}:\\ \;\;\;\;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 16: 36.2% accurate, 2.7× speedup?

                                              \[\begin{array}{l} \\ e^{y.re \cdot \log x.im - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \end{array} \]
                                              (FPCore (x.re x.im y.re y.im)
                                               :precision binary64
                                               (exp (- (* y.re (log x.im)) (* (atan2 x.im x.re) y.im))))
                                              double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
                                              	return exp(((y_46_re * log(x_46_im)) - (atan2(x_46_im, x_46_re) * y_46_im)));
                                              }
                                              
                                              real(8) function code(x_46re, x_46im, y_46re, y_46im)
                                                  real(8), intent (in) :: x_46re
                                                  real(8), intent (in) :: x_46im
                                                  real(8), intent (in) :: y_46re
                                                  real(8), intent (in) :: y_46im
                                                  code = exp(((y_46re * log(x_46im)) - (atan2(x_46im, x_46re) * y_46im)))
                                              end function
                                              
                                              public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
                                              	return Math.exp(((y_46_re * Math.log(x_46_im)) - (Math.atan2(x_46_im, x_46_re) * y_46_im)));
                                              }
                                              
                                              def code(x_46_re, x_46_im, y_46_re, y_46_im):
                                              	return math.exp(((y_46_re * math.log(x_46_im)) - (math.atan2(x_46_im, x_46_re) * y_46_im)))
                                              
                                              function code(x_46_re, x_46_im, y_46_re, y_46_im)
                                              	return exp(Float64(Float64(y_46_re * log(x_46_im)) - Float64(atan(x_46_im, x_46_re) * y_46_im)))
                                              end
                                              
                                              function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im)
                                              	tmp = exp(((y_46_re * log(x_46_im)) - (atan2(x_46_im, x_46_re) * y_46_im)));
                                              end
                                              
                                              code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[Exp[N[(N[(y$46$re * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
                                              
                                              \begin{array}{l}
                                              
                                              \\
                                              e^{y.re \cdot \log x.im - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}
                                              \end{array}
                                              
                                              Derivation
                                              1. Initial program 38.4%

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

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

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

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

                                              Reproduce

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