powComplex, imaginary part

Percentage Accurate: 41.2% → 70.7%
Time: 22.7s
Alternatives: 27
Speedup: 3.5×

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 \sin \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)))
    (sin (+ (* 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))) * sin(((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))) * sin(((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.sin(((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.sin(((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))) * sin(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))) * sin(((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[Sin[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 \sin \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 27 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.2% 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 \sin \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)))
    (sin (+ (* 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))) * sin(((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))) * sin(((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.sin(((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.sin(((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))) * sin(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))) * sin(((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[Sin[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 \sin \left(t\_0 \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)
\end{array}
\end{array}

Alternative 1: 70.7% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
t_0 := y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := \log \left(\frac{-1}{x.im}\right)\\
t_2 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_3 := y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
\mathbf{if}\;x.im \leq -3.4 \cdot 10^{-49}:\\
\;\;\;\;e^{t\_1 \cdot \left(0 - y.re\right) - t\_0} \cdot \sin \left(t\_2 - t\_1 \cdot y.im\right)\\

\mathbf{elif}\;x.im \leq 1.3 \cdot 10^{+17}:\\
\;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - t\_0} \cdot \left(\sin t\_3 + y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot \cos t\_3\right)\right)\\

\mathbf{else}:\\
\;\;\;\;e^{y.re \cdot \log x.im - t\_0} \cdot \sin \left(t\_2 + y.im \cdot \log x.im\right)\\


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

    1. Initial program 31.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 \sin \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. Add Preprocessing
    3. Taylor expanded in x.im around -inf

      \[\leadsto \color{blue}{e^{-1 \cdot \left(y.re \cdot \log \left(\frac{-1}{x.im}\right)\right) - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \sin \left(-1 \cdot \left(y.im \cdot \log \left(\frac{-1}{x.im}\right)\right) + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
    4. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(e^{-1 \cdot \left(y.re \cdot \log \left(\frac{-1}{x.im}\right)\right) - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\right), \color{blue}{\sin \left(-1 \cdot \left(y.im \cdot \log \left(\frac{-1}{x.im}\right)\right) + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\right) \]
      2. exp-lowering-exp.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\left(-1 \cdot \left(y.re \cdot \log \left(\frac{-1}{x.im}\right)\right) - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right), \sin \color{blue}{\left(-1 \cdot \left(y.im \cdot \log \left(\frac{-1}{x.im}\right)\right) + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\right) \]
      3. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\left(-1 \cdot \left(y.re \cdot \log \left(\frac{-1}{x.im}\right)\right)\right), \left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right), \sin \left(\color{blue}{-1 \cdot \left(y.im \cdot \log \left(\frac{-1}{x.im}\right)\right)} + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
      4. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\left(\mathsf{neg}\left(y.re \cdot \log \left(\frac{-1}{x.im}\right)\right)\right), \left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right), \sin \left(\color{blue}{-1} \cdot \left(y.im \cdot \log \left(\frac{-1}{x.im}\right)\right) + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
      5. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\left(\mathsf{neg}\left(\log \left(\frac{-1}{x.im}\right) \cdot y.re\right)\right), \left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right), \sin \left(-1 \cdot \left(y.im \cdot \log \left(\frac{-1}{x.im}\right)\right) + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
      6. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\left(\log \left(\frac{-1}{x.im}\right) \cdot \left(\mathsf{neg}\left(y.re\right)\right)\right), \left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right), \sin \left(\color{blue}{-1} \cdot \left(y.im \cdot \log \left(\frac{-1}{x.im}\right)\right) + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
      7. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\left(\log \left(\frac{-1}{x.im}\right) \cdot \left(-1 \cdot y.re\right)\right), \left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right), \sin \left(-1 \cdot \left(y.im \cdot \log \left(\frac{-1}{x.im}\right)\right) + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\log \left(\frac{-1}{x.im}\right), \left(-1 \cdot y.re\right)\right), \left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right), \sin \left(\color{blue}{-1} \cdot \left(y.im \cdot \log \left(\frac{-1}{x.im}\right)\right) + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
      9. log-lowering-log.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\left(\frac{-1}{x.im}\right)\right), \left(-1 \cdot y.re\right)\right), \left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right), \sin \left(-1 \cdot \left(y.im \cdot \log \left(\frac{-1}{x.im}\right)\right) + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
      10. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{/.f64}\left(-1, x.im\right)\right), \left(-1 \cdot y.re\right)\right), \left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right), \sin \left(-1 \cdot \left(y.im \cdot \log \left(\frac{-1}{x.im}\right)\right) + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
      11. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{/.f64}\left(-1, x.im\right)\right), \left(\mathsf{neg}\left(y.re\right)\right)\right), \left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right), \sin \left(-1 \cdot \left(y.im \cdot \log \left(\frac{-1}{x.im}\right)\right) + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
      12. neg-lowering-neg.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{/.f64}\left(-1, x.im\right)\right), \mathsf{neg.f64}\left(y.re\right)\right), \left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right), \sin \left(-1 \cdot \left(y.im \cdot \log \left(\frac{-1}{x.im}\right)\right) + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
      13. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{/.f64}\left(-1, x.im\right)\right), \mathsf{neg.f64}\left(y.re\right)\right), \mathsf{*.f64}\left(y.im, \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right), \sin \left(-1 \cdot \color{blue}{\left(y.im \cdot \log \left(\frac{-1}{x.im}\right)\right)} + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
      14. atan2-lowering-atan2.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{/.f64}\left(-1, x.im\right)\right), \mathsf{neg.f64}\left(y.re\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right), \sin \left(-1 \cdot \left(y.im \cdot \color{blue}{\log \left(\frac{-1}{x.im}\right)}\right) + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
      15. sin-lowering-sin.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{/.f64}\left(-1, x.im\right)\right), \mathsf{neg.f64}\left(y.re\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right), \mathsf{sin.f64}\left(\left(-1 \cdot \left(y.im \cdot \log \left(\frac{-1}{x.im}\right)\right) + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
    5. Simplified75.2%

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

    if -3.40000000000000005e-49 < x.im < 1.3e17

    1. Initial program 50.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 \sin \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. Add Preprocessing
    3. Taylor expanded in y.re around 0

      \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \color{blue}{\left(\sin \left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right) + y.re \cdot \left(\cos \left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)}\right) \]
    4. Step-by-step derivation
      1. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{+.f64}\left(\sin \left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right), \color{blue}{\left(y.re \cdot \left(\cos \left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)}\right)\right) \]
      2. sin-lowering-sin.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{+.f64}\left(\mathsf{sin.f64}\left(\left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right), \left(\color{blue}{y.re} \cdot \left(\cos \left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right), \left(y.re \cdot \left(\cos \left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right) \]
      4. log-lowering-log.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right)\right), \left(y.re \cdot \left(\cos \left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right) \]
      5. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right)\right)\right)\right), \left(y.re \cdot \left(\cos \left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right) \]
      6. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)\right)\right)\right), \left(y.re \cdot \left(\cos \left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right) \]
      7. accelerator-lowering-hypot.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right), \left(y.re \cdot \left(\cos \left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right), \mathsf{*.f64}\left(y.re, \color{blue}{\left(\cos \left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\right)\right)\right) \]
      9. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right), \mathsf{*.f64}\left(y.re, \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot \color{blue}{\cos \left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)}\right)\right)\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right), \mathsf{*.f64}\left(y.re, \mathsf{*.f64}\left(\tan^{-1}_* \frac{x.im}{x.re}, \color{blue}{\cos \left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)}\right)\right)\right)\right) \]
      11. atan2-lowering-atan2.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right), \mathsf{*.f64}\left(y.re, \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), \cos \color{blue}{\left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)}\right)\right)\right)\right) \]
      12. cos-lowering-cos.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right), \mathsf{*.f64}\left(y.re, \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), \mathsf{cos.f64}\left(\left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right)\right)\right)\right)\right) \]
    5. Simplified70.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}{\left(\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) + y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot \cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\right)\right)} \]

    if 1.3e17 < x.im

    1. Initial program 25.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 \sin \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. Add Preprocessing
    3. Taylor expanded in x.im around inf

      \[\leadsto \color{blue}{e^{-1 \cdot \left(y.re \cdot \log \left(\frac{1}{x.im}\right)\right) - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \sin \left(-1 \cdot \left(y.im \cdot \log \left(\frac{1}{x.im}\right)\right) + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
    4. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(e^{-1 \cdot \left(y.re \cdot \log \left(\frac{1}{x.im}\right)\right) - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\right), \color{blue}{\sin \left(-1 \cdot \left(y.im \cdot \log \left(\frac{1}{x.im}\right)\right) + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\right) \]
      2. exp-lowering-exp.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\left(-1 \cdot \left(y.re \cdot \log \left(\frac{1}{x.im}\right)\right) - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right), \sin \color{blue}{\left(-1 \cdot \left(y.im \cdot \log \left(\frac{1}{x.im}\right)\right) + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\right) \]
      3. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\left(-1 \cdot \left(y.re \cdot \log \left(\frac{1}{x.im}\right)\right)\right), \left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right), \sin \left(\color{blue}{-1 \cdot \left(y.im \cdot \log \left(\frac{1}{x.im}\right)\right)} + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
      4. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\left(\mathsf{neg}\left(y.re \cdot \log \left(\frac{1}{x.im}\right)\right)\right), \left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right), \sin \left(\color{blue}{-1} \cdot \left(y.im \cdot \log \left(\frac{1}{x.im}\right)\right) + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
      5. neg-sub0N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\left(0 - y.re \cdot \log \left(\frac{1}{x.im}\right)\right), \left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right), \sin \left(\color{blue}{-1} \cdot \left(y.im \cdot \log \left(\frac{1}{x.im}\right)\right) + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
      6. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{\_.f64}\left(0, \left(y.re \cdot \log \left(\frac{1}{x.im}\right)\right)\right), \left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right), \sin \left(\color{blue}{-1} \cdot \left(y.im \cdot \log \left(\frac{1}{x.im}\right)\right) + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(y.re, \log \left(\frac{1}{x.im}\right)\right)\right), \left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right), \sin \left(-1 \cdot \left(y.im \cdot \log \left(\frac{1}{x.im}\right)\right) + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
      8. log-recN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(y.re, \left(\mathsf{neg}\left(\log x.im\right)\right)\right)\right), \left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right), \sin \left(-1 \cdot \left(y.im \cdot \log \left(\frac{1}{x.im}\right)\right) + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
      9. neg-sub0N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(y.re, \left(0 - \log x.im\right)\right)\right), \left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right), \sin \left(-1 \cdot \left(y.im \cdot \log \left(\frac{1}{x.im}\right)\right) + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
      10. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(y.re, \mathsf{\_.f64}\left(0, \log x.im\right)\right)\right), \left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right), \sin \left(-1 \cdot \left(y.im \cdot \log \left(\frac{1}{x.im}\right)\right) + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
      11. log-lowering-log.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(y.re, \mathsf{\_.f64}\left(0, \mathsf{log.f64}\left(x.im\right)\right)\right)\right), \left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right), \sin \left(-1 \cdot \left(y.im \cdot \log \left(\frac{1}{x.im}\right)\right) + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(y.re, \mathsf{\_.f64}\left(0, \mathsf{log.f64}\left(x.im\right)\right)\right)\right), \mathsf{*.f64}\left(y.im, \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right), \sin \left(-1 \cdot \color{blue}{\left(y.im \cdot \log \left(\frac{1}{x.im}\right)\right)} + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
      13. atan2-lowering-atan2.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(y.re, \mathsf{\_.f64}\left(0, \mathsf{log.f64}\left(x.im\right)\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right), \sin \left(-1 \cdot \left(y.im \cdot \color{blue}{\log \left(\frac{1}{x.im}\right)}\right) + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
      14. sin-lowering-sin.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(y.re, \mathsf{\_.f64}\left(0, \mathsf{log.f64}\left(x.im\right)\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right), \mathsf{sin.f64}\left(\left(-1 \cdot \left(y.im \cdot \log \left(\frac{1}{x.im}\right)\right) + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
    5. Simplified73.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x.im \leq -3.4 \cdot 10^{-49}:\\ \;\;\;\;e^{\log \left(\frac{-1}{x.im}\right) \cdot \left(0 - y.re\right) - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re} - \log \left(\frac{-1}{x.im}\right) \cdot y.im\right)\\ \mathbf{elif}\;x.im \leq 1.3 \cdot 10^{+17}:\\ \;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \left(\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) + y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot \cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;e^{y.re \cdot \log x.im - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re} + y.im \cdot \log x.im\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 2: 69.4% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
t_0 := y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_2 := \log \left(\frac{-1}{x.im}\right)\\
\mathbf{if}\;x.im \leq -6.5 \cdot 10^{-49}:\\
\;\;\;\;e^{t\_2 \cdot \left(0 - y.re\right) - t\_0} \cdot \sin \left(t\_1 - t\_2 \cdot y.im\right)\\

\mathbf{elif}\;x.im \leq 1.5 \cdot 10^{+138}:\\
\;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - t\_0} \cdot \left(\sin t\_1 + y.im \cdot \left(\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right) \cdot \cos t\_1\right)\right)\\

\mathbf{else}:\\
\;\;\;\;y.im \cdot \left(\log x.im \cdot e^{y.re \cdot \log x.im - t\_0}\right)\\


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

    1. Initial program 30.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 \sin \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. Add Preprocessing
    3. Taylor expanded in x.im around -inf

      \[\leadsto \color{blue}{e^{-1 \cdot \left(y.re \cdot \log \left(\frac{-1}{x.im}\right)\right) - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \sin \left(-1 \cdot \left(y.im \cdot \log \left(\frac{-1}{x.im}\right)\right) + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
    4. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(e^{-1 \cdot \left(y.re \cdot \log \left(\frac{-1}{x.im}\right)\right) - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\right), \color{blue}{\sin \left(-1 \cdot \left(y.im \cdot \log \left(\frac{-1}{x.im}\right)\right) + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\right) \]
      2. exp-lowering-exp.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\left(-1 \cdot \left(y.re \cdot \log \left(\frac{-1}{x.im}\right)\right) - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right), \sin \color{blue}{\left(-1 \cdot \left(y.im \cdot \log \left(\frac{-1}{x.im}\right)\right) + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\right) \]
      3. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\left(-1 \cdot \left(y.re \cdot \log \left(\frac{-1}{x.im}\right)\right)\right), \left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right), \sin \left(\color{blue}{-1 \cdot \left(y.im \cdot \log \left(\frac{-1}{x.im}\right)\right)} + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
      4. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\left(\mathsf{neg}\left(y.re \cdot \log \left(\frac{-1}{x.im}\right)\right)\right), \left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right), \sin \left(\color{blue}{-1} \cdot \left(y.im \cdot \log \left(\frac{-1}{x.im}\right)\right) + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
      5. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\left(\mathsf{neg}\left(\log \left(\frac{-1}{x.im}\right) \cdot y.re\right)\right), \left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right), \sin \left(-1 \cdot \left(y.im \cdot \log \left(\frac{-1}{x.im}\right)\right) + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
      6. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\left(\log \left(\frac{-1}{x.im}\right) \cdot \left(\mathsf{neg}\left(y.re\right)\right)\right), \left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right), \sin \left(\color{blue}{-1} \cdot \left(y.im \cdot \log \left(\frac{-1}{x.im}\right)\right) + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
      7. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\left(\log \left(\frac{-1}{x.im}\right) \cdot \left(-1 \cdot y.re\right)\right), \left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right), \sin \left(-1 \cdot \left(y.im \cdot \log \left(\frac{-1}{x.im}\right)\right) + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\log \left(\frac{-1}{x.im}\right), \left(-1 \cdot y.re\right)\right), \left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right), \sin \left(\color{blue}{-1} \cdot \left(y.im \cdot \log \left(\frac{-1}{x.im}\right)\right) + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
      9. log-lowering-log.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\left(\frac{-1}{x.im}\right)\right), \left(-1 \cdot y.re\right)\right), \left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right), \sin \left(-1 \cdot \left(y.im \cdot \log \left(\frac{-1}{x.im}\right)\right) + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
      10. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{/.f64}\left(-1, x.im\right)\right), \left(-1 \cdot y.re\right)\right), \left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right), \sin \left(-1 \cdot \left(y.im \cdot \log \left(\frac{-1}{x.im}\right)\right) + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
      11. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{/.f64}\left(-1, x.im\right)\right), \left(\mathsf{neg}\left(y.re\right)\right)\right), \left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right), \sin \left(-1 \cdot \left(y.im \cdot \log \left(\frac{-1}{x.im}\right)\right) + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
      12. neg-lowering-neg.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{/.f64}\left(-1, x.im\right)\right), \mathsf{neg.f64}\left(y.re\right)\right), \left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right), \sin \left(-1 \cdot \left(y.im \cdot \log \left(\frac{-1}{x.im}\right)\right) + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
      13. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{/.f64}\left(-1, x.im\right)\right), \mathsf{neg.f64}\left(y.re\right)\right), \mathsf{*.f64}\left(y.im, \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right), \sin \left(-1 \cdot \color{blue}{\left(y.im \cdot \log \left(\frac{-1}{x.im}\right)\right)} + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
      14. atan2-lowering-atan2.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{/.f64}\left(-1, x.im\right)\right), \mathsf{neg.f64}\left(y.re\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right), \sin \left(-1 \cdot \left(y.im \cdot \color{blue}{\log \left(\frac{-1}{x.im}\right)}\right) + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
      15. sin-lowering-sin.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{/.f64}\left(-1, x.im\right)\right), \mathsf{neg.f64}\left(y.re\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right), \mathsf{sin.f64}\left(\left(-1 \cdot \left(y.im \cdot \log \left(\frac{-1}{x.im}\right)\right) + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
    5. Simplified74.9%

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

    if -6.49999999999999968e-49 < x.im < 1.50000000000000005e138

    1. Initial program 54.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 \sin \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. Add Preprocessing
    3. Taylor expanded in y.im around 0

      \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \color{blue}{\left(\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) + y.im \cdot \left(\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right)}\right) \]
    4. Step-by-step derivation
      1. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{+.f64}\left(\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right), \color{blue}{\left(y.im \cdot \left(\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right)}\right)\right) \]
      2. sin-lowering-sin.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{+.f64}\left(\mathsf{sin.f64}\left(\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right), \left(\color{blue}{y.im} \cdot \left(\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right)\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}\right)\right), \left(y.im \cdot \left(\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right)\right)\right) \]
      4. atan2-lowering-atan2.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \left(y.im \cdot \left(\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{*.f64}\left(y.im, \color{blue}{\left(\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)}\right)\right)\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{*.f64}\left(y.im, \left(\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right) \cdot \color{blue}{\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\right)\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right), \color{blue}{\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\right)\right)\right)\right) \]
      8. log-lowering-log.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{log.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right), \cos \color{blue}{\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\right)\right)\right)\right) \]
      9. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right)\right), \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right)\right) \]
      10. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)\right), \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right)\right) \]
      11. accelerator-lowering-hypot.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right), \cos \left(\color{blue}{y.re} \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right)\right) \]
      12. cos-lowering-cos.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right), \mathsf{cos.f64}\left(\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right)\right)\right) \]
      13. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right)\right)\right) \]
      14. atan2-lowering-atan2.f6466.9%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right)\right)\right)\right) \]
    5. Simplified66.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}{\left(\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) + y.im \cdot \left(\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right) \cdot \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)} \]

    if 1.50000000000000005e138 < x.im

    1. Initial program 2.5%

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

      \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \color{blue}{\sin \left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)}\right) \]
    4. Step-by-step derivation
      1. sin-lowering-sin.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{sin.f64}\left(\left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right)\right) \]
      3. log-lowering-log.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right)\right)\right) \]
      4. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right)\right)\right)\right)\right) \]
      5. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)\right)\right)\right)\right) \]
      6. accelerator-lowering-hypot.f6443.5%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right)\right) \]
    5. Simplified43.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}{\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)} \]
    6. Taylor expanded in y.im around 0

      \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \color{blue}{\left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)}\right) \]
    7. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{*.f64}\left(y.im, \color{blue}{\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}\right)\right) \]
      2. log-lowering-log.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right)\right) \]
      3. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right)\right)\right)\right) \]
      4. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)\right)\right)\right) \]
      5. accelerator-lowering-hypot.f6446.0%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right) \]
    8. Simplified46.0%

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

      \[\leadsto \color{blue}{y.im \cdot \left(e^{y.re \cdot \log x.im - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \log x.im\right)} \]
    10. Step-by-step derivation
      1. *-lowering-*.f64N/A

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

        \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\left(e^{y.re \cdot \log x.im - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\right), \color{blue}{\log x.im}\right)\right) \]
      3. exp-lowering-exp.f64N/A

        \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\left(y.re \cdot \log x.im - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right), \log \color{blue}{x.im}\right)\right) \]
      4. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\left(y.re \cdot \log x.im\right), \left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right), \log x.im\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(y.re, \log x.im\right), \left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right), \log x.im\right)\right) \]
      6. log-lowering-log.f64N/A

        \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{log.f64}\left(x.im\right)\right), \left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right), \log x.im\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{log.f64}\left(x.im\right)\right), \mathsf{*.f64}\left(y.im, \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right), \log x.im\right)\right) \]
      8. atan2-lowering-atan2.f64N/A

        \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{log.f64}\left(x.im\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right), \log x.im\right)\right) \]
      9. log-lowering-log.f6469.5%

        \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{log.f64}\left(x.im\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right), \mathsf{log.f64}\left(x.im\right)\right)\right) \]
    11. Simplified69.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x.im \leq -6.5 \cdot 10^{-49}:\\ \;\;\;\;e^{\log \left(\frac{-1}{x.im}\right) \cdot \left(0 - y.re\right) - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re} - \log \left(\frac{-1}{x.im}\right) \cdot y.im\right)\\ \mathbf{elif}\;x.im \leq 1.5 \cdot 10^{+138}:\\ \;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \left(\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) + y.im \cdot \left(\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right) \cdot \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;y.im \cdot \left(\log x.im \cdot e^{y.re \cdot \log x.im - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 66.1% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\\ t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\ t_2 := \log \left(\frac{-1}{x.re}\right)\\ \mathbf{if}\;x.re \leq -260:\\ \;\;\;\;e^{\left(0 - y.re\right) \cdot t\_2 - t\_0} \cdot \sin \left(t\_1 - y.im \cdot t\_2\right)\\ \mathbf{elif}\;x.re \leq 2.2 \cdot 10^{-69}:\\ \;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - t\_0} \cdot \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\ \mathbf{elif}\;x.re \leq 1.65 \cdot 10^{+208}:\\ \;\;\;\;\frac{{x.re}^{y.re}}{e^{t\_0}} \cdot \sin \left(t\_1 + y.im \cdot \log x.re\right)\\ \mathbf{else}:\\ \;\;\;\;y.im \cdot \left(\log x.re \cdot e^{y.re \cdot \log x.re - t\_0}\right)\\ \end{array} \end{array} \]
(FPCore (x.re x.im y.re y.im)
 :precision binary64
 (let* ((t_0 (* y.im (atan2 x.im x.re)))
        (t_1 (* y.re (atan2 x.im x.re)))
        (t_2 (log (/ -1.0 x.re))))
   (if (<= x.re -260.0)
     (* (exp (- (* (- 0.0 y.re) t_2) t_0)) (sin (- t_1 (* y.im t_2))))
     (if (<= x.re 2.2e-69)
       (*
        (exp (- (* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im))))) t_0))
        (sin (* y.im (log (hypot x.im x.re)))))
       (if (<= x.re 1.65e+208)
         (* (/ (pow x.re y.re) (exp t_0)) (sin (+ t_1 (* y.im (log x.re)))))
         (* y.im (* (log x.re) (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 = y_46_im * atan2(x_46_im, x_46_re);
	double t_1 = y_46_re * atan2(x_46_im, x_46_re);
	double t_2 = log((-1.0 / x_46_re));
	double tmp;
	if (x_46_re <= -260.0) {
		tmp = exp((((0.0 - y_46_re) * t_2) - t_0)) * sin((t_1 - (y_46_im * t_2)));
	} else if (x_46_re <= 2.2e-69) {
		tmp = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0)) * sin((y_46_im * log(hypot(x_46_im, x_46_re))));
	} else if (x_46_re <= 1.65e+208) {
		tmp = (pow(x_46_re, y_46_re) / exp(t_0)) * sin((t_1 + (y_46_im * log(x_46_re))));
	} else {
		tmp = y_46_im * (log(x_46_re) * exp(((y_46_re * log(x_46_re)) - t_0)));
	}
	return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
	double t_0 = y_46_im * Math.atan2(x_46_im, x_46_re);
	double t_1 = y_46_re * Math.atan2(x_46_im, x_46_re);
	double t_2 = Math.log((-1.0 / x_46_re));
	double tmp;
	if (x_46_re <= -260.0) {
		tmp = Math.exp((((0.0 - y_46_re) * t_2) - t_0)) * Math.sin((t_1 - (y_46_im * t_2)));
	} else if (x_46_re <= 2.2e-69) {
		tmp = Math.exp(((y_46_re * Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0)) * Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re))));
	} else if (x_46_re <= 1.65e+208) {
		tmp = (Math.pow(x_46_re, y_46_re) / Math.exp(t_0)) * Math.sin((t_1 + (y_46_im * Math.log(x_46_re))));
	} else {
		tmp = y_46_im * (Math.log(x_46_re) * 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 = y_46_im * math.atan2(x_46_im, x_46_re)
	t_1 = y_46_re * math.atan2(x_46_im, x_46_re)
	t_2 = math.log((-1.0 / x_46_re))
	tmp = 0
	if x_46_re <= -260.0:
		tmp = math.exp((((0.0 - y_46_re) * t_2) - t_0)) * math.sin((t_1 - (y_46_im * t_2)))
	elif x_46_re <= 2.2e-69:
		tmp = math.exp(((y_46_re * math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0)) * math.sin((y_46_im * math.log(math.hypot(x_46_im, x_46_re))))
	elif x_46_re <= 1.65e+208:
		tmp = (math.pow(x_46_re, y_46_re) / math.exp(t_0)) * math.sin((t_1 + (y_46_im * math.log(x_46_re))))
	else:
		tmp = y_46_im * (math.log(x_46_re) * 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(y_46_im * atan(x_46_im, x_46_re))
	t_1 = Float64(y_46_re * atan(x_46_im, x_46_re))
	t_2 = log(Float64(-1.0 / x_46_re))
	tmp = 0.0
	if (x_46_re <= -260.0)
		tmp = Float64(exp(Float64(Float64(Float64(0.0 - y_46_re) * t_2) - t_0)) * sin(Float64(t_1 - Float64(y_46_im * t_2))));
	elseif (x_46_re <= 2.2e-69)
		tmp = Float64(exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - t_0)) * sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))));
	elseif (x_46_re <= 1.65e+208)
		tmp = Float64(Float64((x_46_re ^ y_46_re) / exp(t_0)) * sin(Float64(t_1 + Float64(y_46_im * log(x_46_re)))));
	else
		tmp = Float64(y_46_im * Float64(log(x_46_re) * 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 = y_46_im * atan2(x_46_im, x_46_re);
	t_1 = y_46_re * atan2(x_46_im, x_46_re);
	t_2 = log((-1.0 / x_46_re));
	tmp = 0.0;
	if (x_46_re <= -260.0)
		tmp = exp((((0.0 - y_46_re) * t_2) - t_0)) * sin((t_1 - (y_46_im * t_2)));
	elseif (x_46_re <= 2.2e-69)
		tmp = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0)) * sin((y_46_im * log(hypot(x_46_im, x_46_re))));
	elseif (x_46_re <= 1.65e+208)
		tmp = ((x_46_re ^ y_46_re) / exp(t_0)) * sin((t_1 + (y_46_im * log(x_46_re))));
	else
		tmp = y_46_im * (log(x_46_re) * 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[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $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[(-1.0 / x$46$re), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[x$46$re, -260.0], N[(N[Exp[N[(N[(N[(0.0 - y$46$re), $MachinePrecision] * t$95$2), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(t$95$1 - N[(y$46$im * t$95$2), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, 2.2e-69], N[(N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, 1.65e+208], N[(N[(N[Power[x$46$re, y$46$re], $MachinePrecision] / N[Exp[t$95$0], $MachinePrecision]), $MachinePrecision] * N[Sin[N[(t$95$1 + N[(y$46$im * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(y$46$im * N[(N[Log[x$46$re], $MachinePrecision] * N[Exp[N[(N[(y$46$re * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_2 := \log \left(\frac{-1}{x.re}\right)\\
\mathbf{if}\;x.re \leq -260:\\
\;\;\;\;e^{\left(0 - y.re\right) \cdot t\_2 - t\_0} \cdot \sin \left(t\_1 - y.im \cdot t\_2\right)\\

\mathbf{elif}\;x.re \leq 2.2 \cdot 10^{-69}:\\
\;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - t\_0} \cdot \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\

\mathbf{elif}\;x.re \leq 1.65 \cdot 10^{+208}:\\
\;\;\;\;\frac{{x.re}^{y.re}}{e^{t\_0}} \cdot \sin \left(t\_1 + y.im \cdot \log x.re\right)\\

\mathbf{else}:\\
\;\;\;\;y.im \cdot \left(\log x.re \cdot e^{y.re \cdot \log x.re - t\_0}\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if x.re < -260

    1. Initial program 21.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 \sin \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. Add Preprocessing
    3. Taylor expanded in x.re around -inf

      \[\leadsto \color{blue}{e^{-1 \cdot \left(y.re \cdot \log \left(\frac{-1}{x.re}\right)\right) - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \sin \left(-1 \cdot \left(y.im \cdot \log \left(\frac{-1}{x.re}\right)\right) + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
    4. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(e^{-1 \cdot \left(y.re \cdot \log \left(\frac{-1}{x.re}\right)\right) - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\right), \color{blue}{\sin \left(-1 \cdot \left(y.im \cdot \log \left(\frac{-1}{x.re}\right)\right) + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\right) \]
      2. exp-lowering-exp.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\left(-1 \cdot \left(y.re \cdot \log \left(\frac{-1}{x.re}\right)\right) - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right), \sin \color{blue}{\left(-1 \cdot \left(y.im \cdot \log \left(\frac{-1}{x.re}\right)\right) + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\right) \]
      3. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\left(-1 \cdot \left(y.re \cdot \log \left(\frac{-1}{x.re}\right)\right)\right), \left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right), \sin \left(\color{blue}{-1 \cdot \left(y.im \cdot \log \left(\frac{-1}{x.re}\right)\right)} + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
      4. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\left(\mathsf{neg}\left(y.re \cdot \log \left(\frac{-1}{x.re}\right)\right)\right), \left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right), \sin \left(\color{blue}{-1} \cdot \left(y.im \cdot \log \left(\frac{-1}{x.re}\right)\right) + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
      5. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\left(\mathsf{neg}\left(\log \left(\frac{-1}{x.re}\right) \cdot y.re\right)\right), \left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right), \sin \left(-1 \cdot \left(y.im \cdot \log \left(\frac{-1}{x.re}\right)\right) + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
      6. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\left(\log \left(\frac{-1}{x.re}\right) \cdot \left(\mathsf{neg}\left(y.re\right)\right)\right), \left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right), \sin \left(\color{blue}{-1} \cdot \left(y.im \cdot \log \left(\frac{-1}{x.re}\right)\right) + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
      7. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\left(\log \left(\frac{-1}{x.re}\right) \cdot \left(-1 \cdot y.re\right)\right), \left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right), \sin \left(-1 \cdot \left(y.im \cdot \log \left(\frac{-1}{x.re}\right)\right) + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\log \left(\frac{-1}{x.re}\right), \left(-1 \cdot y.re\right)\right), \left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right), \sin \left(\color{blue}{-1} \cdot \left(y.im \cdot \log \left(\frac{-1}{x.re}\right)\right) + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
      9. log-lowering-log.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\left(\frac{-1}{x.re}\right)\right), \left(-1 \cdot y.re\right)\right), \left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right), \sin \left(-1 \cdot \left(y.im \cdot \log \left(\frac{-1}{x.re}\right)\right) + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
      10. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{/.f64}\left(-1, x.re\right)\right), \left(-1 \cdot y.re\right)\right), \left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right), \sin \left(-1 \cdot \left(y.im \cdot \log \left(\frac{-1}{x.re}\right)\right) + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
      11. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{/.f64}\left(-1, x.re\right)\right), \left(\mathsf{neg}\left(y.re\right)\right)\right), \left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right), \sin \left(-1 \cdot \left(y.im \cdot \log \left(\frac{-1}{x.re}\right)\right) + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
      12. neg-lowering-neg.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{/.f64}\left(-1, x.re\right)\right), \mathsf{neg.f64}\left(y.re\right)\right), \left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right), \sin \left(-1 \cdot \left(y.im \cdot \log \left(\frac{-1}{x.re}\right)\right) + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
      13. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{/.f64}\left(-1, x.re\right)\right), \mathsf{neg.f64}\left(y.re\right)\right), \mathsf{*.f64}\left(y.im, \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right), \sin \left(-1 \cdot \color{blue}{\left(y.im \cdot \log \left(\frac{-1}{x.re}\right)\right)} + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
      14. atan2-lowering-atan2.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{/.f64}\left(-1, x.re\right)\right), \mathsf{neg.f64}\left(y.re\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right), \sin \left(-1 \cdot \left(y.im \cdot \color{blue}{\log \left(\frac{-1}{x.re}\right)}\right) + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
      15. sin-lowering-sin.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{/.f64}\left(-1, x.re\right)\right), \mathsf{neg.f64}\left(y.re\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right), \mathsf{sin.f64}\left(\left(-1 \cdot \left(y.im \cdot \log \left(\frac{-1}{x.re}\right)\right) + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
    5. Simplified81.5%

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

    if -260 < x.re < 2.2e-69

    1. Initial program 52.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 \sin \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. Add Preprocessing
    3. Taylor expanded in y.re around 0

      \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \color{blue}{\sin \left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)}\right) \]
    4. Step-by-step derivation
      1. sin-lowering-sin.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{sin.f64}\left(\left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right)\right) \]
      3. log-lowering-log.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right)\right)\right) \]
      4. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right)\right)\right)\right)\right) \]
      5. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)\right)\right)\right)\right) \]
      6. accelerator-lowering-hypot.f6464.4%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right)\right) \]
    5. Simplified64.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}{\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)} \]

    if 2.2e-69 < x.re < 1.65e208

    1. Initial program 48.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 \sin \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. Add Preprocessing
    3. Taylor expanded in x.im around 0

      \[\leadsto \color{blue}{e^{y.re \cdot \log x.re - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \sin \left(y.im \cdot \log x.re + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
    4. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(e^{y.re \cdot \log x.re - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\right), \color{blue}{\sin \left(y.im \cdot \log x.re + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\right) \]
      2. exp-diffN/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{e^{y.re \cdot \log x.re}}{e^{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}}\right), \sin \color{blue}{\left(y.im \cdot \log x.re + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(e^{y.re \cdot \log x.re}\right), \left(e^{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\right)\right), \sin \color{blue}{\left(y.im \cdot \log x.re + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\right) \]
      4. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(e^{\log x.re \cdot y.re}\right), \left(e^{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\right)\right), \sin \left(\color{blue}{y.im} \cdot \log x.re + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
      5. exp-to-powN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left({x.re}^{y.re}\right), \left(e^{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\right)\right), \sin \left(\color{blue}{y.im \cdot \log x.re} + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
      6. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(x.re, y.re\right), \left(e^{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\right)\right), \sin \left(\color{blue}{y.im \cdot \log x.re} + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
      7. exp-lowering-exp.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(x.re, y.re\right), \mathsf{exp.f64}\left(\left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right), \sin \left(y.im \cdot \log x.re + \color{blue}{y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}}\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(x.re, y.re\right), \mathsf{exp.f64}\left(\mathsf{*.f64}\left(y.im, \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right), \sin \left(y.im \cdot \log x.re + \color{blue}{y.re} \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
      9. atan2-lowering-atan2.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(x.re, y.re\right), \mathsf{exp.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right), \sin \left(y.im \cdot \log x.re + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
      10. sin-lowering-sin.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(x.re, y.re\right), \mathsf{exp.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right), \mathsf{sin.f64}\left(\left(y.im \cdot \log x.re + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
      11. +-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(x.re, y.re\right), \mathsf{exp.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right), \mathsf{sin.f64}\left(\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re} + y.im \cdot \log x.re\right)\right)\right) \]
      12. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(x.re, y.re\right), \mathsf{exp.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right), \mathsf{sin.f64}\left(\mathsf{+.f64}\left(\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right), \left(y.im \cdot \log x.re\right)\right)\right)\right) \]
      13. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(x.re, y.re\right), \mathsf{exp.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right), \mathsf{sin.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}\right), \left(y.im \cdot \log x.re\right)\right)\right)\right) \]
      14. atan2-lowering-atan2.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(x.re, y.re\right), \mathsf{exp.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right), \mathsf{sin.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right), \left(y.im \cdot \log x.re\right)\right)\right)\right) \]
      15. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(x.re, y.re\right), \mathsf{exp.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right), \mathsf{sin.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right), \mathsf{*.f64}\left(y.im, \log x.re\right)\right)\right)\right) \]
      16. log-lowering-log.f6472.0%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(x.re, y.re\right), \mathsf{exp.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right), \mathsf{sin.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(x.re\right)\right)\right)\right)\right) \]
    5. Simplified72.0%

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

    if 1.65e208 < x.re

    1. Initial program 0.0%

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

      \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \color{blue}{\sin \left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)}\right) \]
    4. Step-by-step derivation
      1. sin-lowering-sin.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{sin.f64}\left(\left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right)\right) \]
      3. log-lowering-log.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right)\right)\right) \]
      4. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right)\right)\right)\right)\right) \]
      5. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)\right)\right)\right)\right) \]
      6. accelerator-lowering-hypot.f6444.0%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right)\right) \]
    5. Simplified44.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}{\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)} \]
    6. Taylor expanded in y.im around 0

      \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \color{blue}{\left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)}\right) \]
    7. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{*.f64}\left(y.im, \color{blue}{\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}\right)\right) \]
      2. log-lowering-log.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right)\right) \]
      3. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right)\right)\right)\right) \]
      4. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)\right)\right)\right) \]
      5. accelerator-lowering-hypot.f6444.1%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right) \]
    8. Simplified44.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}{\left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)} \]
    9. Taylor expanded in x.im around 0

      \[\leadsto \color{blue}{y.im \cdot \left(e^{y.re \cdot \log x.re - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \log x.re\right)} \]
    10. Step-by-step derivation
      1. *-lowering-*.f64N/A

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

        \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\left(e^{y.re \cdot \log x.re - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\right), \color{blue}{\log x.re}\right)\right) \]
      3. exp-lowering-exp.f64N/A

        \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\left(y.re \cdot \log x.re - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right), \log \color{blue}{x.re}\right)\right) \]
      4. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\left(y.re \cdot \log x.re\right), \left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right), \log x.re\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(y.re, \log x.re\right), \left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right), \log x.re\right)\right) \]
      6. log-lowering-log.f64N/A

        \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{log.f64}\left(x.re\right)\right), \left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right), \log x.re\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{log.f64}\left(x.re\right)\right), \mathsf{*.f64}\left(y.im, \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right), \log x.re\right)\right) \]
      8. atan2-lowering-atan2.f64N/A

        \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{log.f64}\left(x.re\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right), \log x.re\right)\right) \]
      9. log-lowering-log.f6475.4%

        \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{log.f64}\left(x.re\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right), \mathsf{log.f64}\left(x.re\right)\right)\right) \]
    11. Simplified75.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x.re \leq -260:\\ \;\;\;\;e^{\left(0 - y.re\right) \cdot \log \left(\frac{-1}{x.re}\right) - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re} - y.im \cdot \log \left(\frac{-1}{x.re}\right)\right)\\ \mathbf{elif}\;x.re \leq 2.2 \cdot 10^{-69}:\\ \;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\ \mathbf{elif}\;x.re \leq 1.65 \cdot 10^{+208}:\\ \;\;\;\;\frac{{x.re}^{y.re}}{e^{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re} + y.im \cdot \log x.re\right)\\ \mathbf{else}:\\ \;\;\;\;y.im \cdot \left(\log x.re \cdot e^{y.re \cdot \log x.re - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 66.3% accurate, 1.6× speedup?

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

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

\mathbf{elif}\;y.re \leq 95000000000000:\\
\;\;\;\;t\_1 \cdot e^{y.im \cdot \left(0 - \tan^{-1}_* \frac{x.im}{x.re}\right)}\\

\mathbf{else}:\\
\;\;\;\;t\_1 \cdot t\_0\\


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

    1. Initial program 32.0%

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

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

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

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

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

      \[\leadsto \color{blue}{y.im \cdot \left(\left(\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot \left(\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}\right) + \frac{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}}{y.im}\right) - \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}\right)\right)} \]
    7. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(y.im, \color{blue}{\left(\left(\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot \left(\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}\right) + \frac{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}}{y.im}\right) - \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}\right)\right)}\right) \]
      2. associate--l+N/A

        \[\leadsto \mathsf{*.f64}\left(y.im, \left(\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot \left(\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}\right) + \color{blue}{\left(\frac{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}}{y.im} - \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}\right)\right)}\right)\right) \]
      3. +-lowering-+.f64N/A

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

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

      \[\leadsto \mathsf{*.f64}\left(y.im, \color{blue}{\left(\frac{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}}{y.im}\right)}\right) \]
    10. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{/.f64}\left(\left(\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}\right), \color{blue}{y.im}\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right), \left({\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}\right)\right), y.im\right)\right) \]
      3. sin-lowering-sin.f64N/A

        \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sin.f64}\left(\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right), \left({\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}\right)\right), y.im\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}\right)\right), \left({\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}\right)\right), y.im\right)\right) \]
      5. atan2-lowering-atan2.f64N/A

        \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \left({\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}\right)\right), y.im\right)\right) \]
      6. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right), y.re\right)\right), y.im\right)\right) \]
      7. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right), y.re\right)\right), y.im\right)\right) \]
      8. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right), y.re\right)\right), y.im\right)\right) \]
      9. accelerator-lowering-hypot.f6475.9%

        \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right)\right), y.im\right)\right) \]
    11. Simplified75.9%

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

    if -3e-68 < y.re < 9.5e13

    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 \sin \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. Add Preprocessing
    3. Taylor expanded in y.re around 0

      \[\leadsto \color{blue}{e^{\mathsf{neg}\left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \cdot \sin \left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)} \]
    4. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(e^{\mathsf{neg}\left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\right), \color{blue}{\sin \left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)}\right) \]
      2. exp-lowering-exp.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\left(\mathsf{neg}\left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right), \sin \color{blue}{\left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)}\right) \]
      3. neg-sub0N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\left(0 - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right), \sin \left(\color{blue}{y.im} \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right) \]
      4. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(0, \left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right), \sin \left(\color{blue}{y.im} \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(y.im, \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right), \sin \left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right) \]
      6. atan2-lowering-atan2.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(y.im, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right), \sin \left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right) \]
      7. sin-lowering-sin.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(y.im, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right), \mathsf{sin.f64}\left(\left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(y.im, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right)\right) \]
      9. log-lowering-log.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(y.im, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right)\right)\right) \]
      10. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(y.im, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right)\right)\right)\right)\right) \]
      11. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(y.im, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)\right)\right)\right)\right) \]
      12. accelerator-lowering-hypot.f6461.3%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(y.im, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right)\right) \]
    5. Simplified61.3%

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

    if 9.5e13 < y.re

    1. Initial program 38.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 \sin \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. Add Preprocessing
    3. Taylor expanded in y.re around 0

      \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \color{blue}{\sin \left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)}\right) \]
    4. Step-by-step derivation
      1. sin-lowering-sin.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{sin.f64}\left(\left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right)\right) \]
      3. log-lowering-log.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right)\right)\right) \]
      4. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right)\right)\right)\right)\right) \]
      5. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)\right)\right)\right)\right) \]
      6. accelerator-lowering-hypot.f6473.7%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right)\right) \]
    5. Simplified73.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}{\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)} \]
    6. Taylor expanded in y.im around 0

      \[\leadsto \mathsf{*.f64}\left(\color{blue}{\left({\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}\right)}, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right)\right) \]
    7. Step-by-step derivation
      1. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right), y.re\right), \mathsf{sin.f64}\left(\color{blue}{\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)}\right)\right) \]
      2. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right), y.re\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right)\right) \]
      3. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right), y.re\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right)\right) \]
      4. accelerator-lowering-hypot.f6472.0%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\color{blue}{y.im}, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right)\right) \]
    8. Simplified72.0%

      \[\leadsto \color{blue}{{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}} \cdot \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \]
  3. Recombined 3 regimes into one program.
  4. Final simplification68.1%

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

Alternative 5: 65.6% accurate, 1.6× speedup?

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

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

\mathbf{elif}\;y.re \leq 47000000000000:\\
\;\;\;\;t\_1 \cdot e^{y.im \cdot \left(0 - \tan^{-1}_* \frac{x.im}{x.re}\right)}\\

\mathbf{else}:\\
\;\;\;\;\sin t\_1 \cdot t\_0\\


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

    1. Initial program 32.0%

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

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

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

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

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

      \[\leadsto \color{blue}{y.im \cdot \left(\left(\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot \left(\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}\right) + \frac{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}}{y.im}\right) - \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}\right)\right)} \]
    7. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(y.im, \color{blue}{\left(\left(\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot \left(\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}\right) + \frac{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}}{y.im}\right) - \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}\right)\right)}\right) \]
      2. associate--l+N/A

        \[\leadsto \mathsf{*.f64}\left(y.im, \left(\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot \left(\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}\right) + \color{blue}{\left(\frac{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}}{y.im} - \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}\right)\right)}\right)\right) \]
      3. +-lowering-+.f64N/A

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

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

      \[\leadsto \mathsf{*.f64}\left(y.im, \color{blue}{\left(\frac{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}}{y.im}\right)}\right) \]
    10. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{/.f64}\left(\left(\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}\right), \color{blue}{y.im}\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right), \left({\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}\right)\right), y.im\right)\right) \]
      3. sin-lowering-sin.f64N/A

        \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sin.f64}\left(\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right), \left({\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}\right)\right), y.im\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}\right)\right), \left({\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}\right)\right), y.im\right)\right) \]
      5. atan2-lowering-atan2.f64N/A

        \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \left({\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}\right)\right), y.im\right)\right) \]
      6. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right), y.re\right)\right), y.im\right)\right) \]
      7. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right), y.re\right)\right), y.im\right)\right) \]
      8. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right), y.re\right)\right), y.im\right)\right) \]
      9. accelerator-lowering-hypot.f6475.9%

        \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right)\right), y.im\right)\right) \]
    11. Simplified75.9%

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

    if -3.9999999999999999e-69 < y.re < 4.7e13

    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 \sin \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. Add Preprocessing
    3. Taylor expanded in y.re around 0

      \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \color{blue}{\sin \left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)}\right) \]
    4. Step-by-step derivation
      1. sin-lowering-sin.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{sin.f64}\left(\left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right)\right) \]
      3. log-lowering-log.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right)\right)\right) \]
      4. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right)\right)\right)\right)\right) \]
      5. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)\right)\right)\right)\right) \]
      6. accelerator-lowering-hypot.f6441.9%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right)\right) \]
    5. Simplified41.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}{\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)} \]
    6. Taylor expanded in y.im around 0

      \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \color{blue}{\left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)}\right) \]
    7. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{*.f64}\left(y.im, \color{blue}{\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}\right)\right) \]
      2. log-lowering-log.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right)\right) \]
      3. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right)\right)\right)\right) \]
      4. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)\right)\right)\right) \]
      5. accelerator-lowering-hypot.f6436.6%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right) \]
    8. Simplified36.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}{\left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)} \]
    9. Taylor expanded in y.re around 0

      \[\leadsto \mathsf{*.f64}\left(\color{blue}{\left(e^{\mathsf{neg}\left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\right)}, \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right) \]
    10. Step-by-step derivation
      1. exp-lowering-exp.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\left(\mathsf{neg}\left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right), \mathsf{*.f64}\left(\color{blue}{y.im}, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right) \]
      2. neg-sub0N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\left(0 - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right) \]
      3. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(0, \left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(y.im, \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right) \]
      5. atan2-lowering-atan2.f6459.3%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(y.im, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right) \]
    11. Simplified59.3%

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

    if 4.7e13 < y.re

    1. Initial program 38.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 \sin \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. Add Preprocessing
    3. Taylor expanded in y.re around 0

      \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \color{blue}{\sin \left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)}\right) \]
    4. Step-by-step derivation
      1. sin-lowering-sin.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{sin.f64}\left(\left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right)\right) \]
      3. log-lowering-log.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right)\right)\right) \]
      4. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right)\right)\right)\right)\right) \]
      5. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)\right)\right)\right)\right) \]
      6. accelerator-lowering-hypot.f6473.7%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right)\right) \]
    5. Simplified73.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}{\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)} \]
    6. Taylor expanded in y.im around 0

      \[\leadsto \mathsf{*.f64}\left(\color{blue}{\left({\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}\right)}, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right)\right) \]
    7. Step-by-step derivation
      1. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right), y.re\right), \mathsf{sin.f64}\left(\color{blue}{\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)}\right)\right) \]
      2. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right), y.re\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right)\right) \]
      3. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right), y.re\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right)\right) \]
      4. accelerator-lowering-hypot.f6472.0%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\color{blue}{y.im}, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right)\right) \]
    8. Simplified72.0%

      \[\leadsto \color{blue}{{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}} \cdot \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \]
  3. Recombined 3 regimes into one program.
  4. Final simplification67.2%

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

Alternative 6: 54.5% accurate, 2.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := x.re \cdot x.re + x.im \cdot x.im\\ t_1 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\ t_2 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\ t_3 := y.im \cdot \left(\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right) \cdot t\_2\right)\\ \mathbf{if}\;y.im \leq -4.4 \cdot 10^{+27}:\\ \;\;\;\;t\_1 \cdot {\left(t\_0 \cdot t\_0\right)}^{\left(\frac{\frac{y.re}{2}}{2}\right)}\\ \mathbf{elif}\;y.im \leq -7 \cdot 10^{-112}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;y.im \leq 4.6 \cdot 10^{-131}:\\ \;\;\;\;t\_1 \cdot t\_2\\ \mathbf{else}:\\ \;\;\;\;t\_3\\ \end{array} \end{array} \]
(FPCore (x.re x.im y.re y.im)
 :precision binary64
 (let* ((t_0 (+ (* x.re x.re) (* x.im x.im)))
        (t_1 (sin (* y.re (atan2 x.im x.re))))
        (t_2 (pow (hypot x.im x.re) y.re))
        (t_3 (* y.im (* (log (hypot x.im x.re)) t_2))))
   (if (<= y.im -4.4e+27)
     (* t_1 (pow (* t_0 t_0) (/ (/ y.re 2.0) 2.0)))
     (if (<= y.im -7e-112) t_3 (if (<= y.im 4.6e-131) (* t_1 t_2) t_3)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
	double t_0 = (x_46_re * x_46_re) + (x_46_im * x_46_im);
	double t_1 = sin((y_46_re * atan2(x_46_im, x_46_re)));
	double t_2 = pow(hypot(x_46_im, x_46_re), y_46_re);
	double t_3 = y_46_im * (log(hypot(x_46_im, x_46_re)) * t_2);
	double tmp;
	if (y_46_im <= -4.4e+27) {
		tmp = t_1 * pow((t_0 * t_0), ((y_46_re / 2.0) / 2.0));
	} else if (y_46_im <= -7e-112) {
		tmp = t_3;
	} else if (y_46_im <= 4.6e-131) {
		tmp = t_1 * t_2;
	} else {
		tmp = t_3;
	}
	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 = (x_46_re * x_46_re) + (x_46_im * x_46_im);
	double t_1 = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
	double t_2 = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
	double t_3 = y_46_im * (Math.log(Math.hypot(x_46_im, x_46_re)) * t_2);
	double tmp;
	if (y_46_im <= -4.4e+27) {
		tmp = t_1 * Math.pow((t_0 * t_0), ((y_46_re / 2.0) / 2.0));
	} else if (y_46_im <= -7e-112) {
		tmp = t_3;
	} else if (y_46_im <= 4.6e-131) {
		tmp = t_1 * t_2;
	} else {
		tmp = t_3;
	}
	return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im):
	t_0 = (x_46_re * x_46_re) + (x_46_im * x_46_im)
	t_1 = math.sin((y_46_re * math.atan2(x_46_im, x_46_re)))
	t_2 = math.pow(math.hypot(x_46_im, x_46_re), y_46_re)
	t_3 = y_46_im * (math.log(math.hypot(x_46_im, x_46_re)) * t_2)
	tmp = 0
	if y_46_im <= -4.4e+27:
		tmp = t_1 * math.pow((t_0 * t_0), ((y_46_re / 2.0) / 2.0))
	elif y_46_im <= -7e-112:
		tmp = t_3
	elif y_46_im <= 4.6e-131:
		tmp = t_1 * t_2
	else:
		tmp = t_3
	return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im)
	t_0 = Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))
	t_1 = sin(Float64(y_46_re * atan(x_46_im, x_46_re)))
	t_2 = hypot(x_46_im, x_46_re) ^ y_46_re
	t_3 = Float64(y_46_im * Float64(log(hypot(x_46_im, x_46_re)) * t_2))
	tmp = 0.0
	if (y_46_im <= -4.4e+27)
		tmp = Float64(t_1 * (Float64(t_0 * t_0) ^ Float64(Float64(y_46_re / 2.0) / 2.0)));
	elseif (y_46_im <= -7e-112)
		tmp = t_3;
	elseif (y_46_im <= 4.6e-131)
		tmp = Float64(t_1 * t_2);
	else
		tmp = t_3;
	end
	return tmp
end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im)
	t_0 = (x_46_re * x_46_re) + (x_46_im * x_46_im);
	t_1 = sin((y_46_re * atan2(x_46_im, x_46_re)));
	t_2 = hypot(x_46_im, x_46_re) ^ y_46_re;
	t_3 = y_46_im * (log(hypot(x_46_im, x_46_re)) * t_2);
	tmp = 0.0;
	if (y_46_im <= -4.4e+27)
		tmp = t_1 * ((t_0 * t_0) ^ ((y_46_re / 2.0) / 2.0));
	elseif (y_46_im <= -7e-112)
		tmp = t_3;
	elseif (y_46_im <= 4.6e-131)
		tmp = t_1 * t_2;
	else
		tmp = t_3;
	end
	tmp_2 = tmp;
end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, Block[{t$95$3 = N[(y$46$im * N[(N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -4.4e+27], N[(t$95$1 * N[Power[N[(t$95$0 * t$95$0), $MachinePrecision], N[(N[(y$46$re / 2.0), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, -7e-112], t$95$3, If[LessEqual[y$46$im, 4.6e-131], N[(t$95$1 * t$95$2), $MachinePrecision], t$95$3]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := x.re \cdot x.re + x.im \cdot x.im\\
t_1 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
t_2 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
t_3 := y.im \cdot \left(\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right) \cdot t\_2\right)\\
\mathbf{if}\;y.im \leq -4.4 \cdot 10^{+27}:\\
\;\;\;\;t\_1 \cdot {\left(t\_0 \cdot t\_0\right)}^{\left(\frac{\frac{y.re}{2}}{2}\right)}\\

\mathbf{elif}\;y.im \leq -7 \cdot 10^{-112}:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;y.im \leq 4.6 \cdot 10^{-131}:\\
\;\;\;\;t\_1 \cdot t\_2\\

\mathbf{else}:\\
\;\;\;\;t\_3\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y.im < -4.3999999999999997e27

    1. Initial program 35.1%

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

      \[\leadsto \color{blue}{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}} \]
    4. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re} \cdot \color{blue}{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}\right), \color{blue}{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\right) \]
      3. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right), y.re\right), \sin \color{blue}{\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\right) \]
      4. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right), y.re\right), \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
      5. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right), y.re\right), \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
      6. accelerator-lowering-hypot.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \sin \left(\color{blue}{y.re} \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
      7. sin-lowering-sin.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \mathsf{sin.f64}\left(\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
      9. atan2-lowering-atan2.f6429.5%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
    5. Simplified29.5%

      \[\leadsto \color{blue}{{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
    6. Step-by-step derivation
      1. sqrt-pow2N/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(x.im \cdot x.im + x.re \cdot x.re\right)}^{\left(\frac{y.re}{2}\right)}\right), \mathsf{sin.f64}\left(\color{blue}{\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)}\right)\right) \]
      2. sqr-powN/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(x.im \cdot x.im + x.re \cdot x.re\right)}^{\left(\frac{\frac{y.re}{2}}{2}\right)} \cdot {\left(x.im \cdot x.im + x.re \cdot x.re\right)}^{\left(\frac{\frac{y.re}{2}}{2}\right)}\right), \mathsf{sin.f64}\left(\color{blue}{\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)}\right)\right) \]
      3. pow-prod-downN/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\left(x.im \cdot x.im + x.re \cdot x.re\right) \cdot \left(x.im \cdot x.im + x.re \cdot x.re\right)\right)}^{\left(\frac{\frac{y.re}{2}}{2}\right)}\right), \mathsf{sin.f64}\left(\color{blue}{\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)}\right)\right) \]
      4. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\left(x.im \cdot x.im + x.re \cdot x.re\right) \cdot \left(x.im \cdot x.im + x.re \cdot x.re\right)\right), \left(\frac{\frac{y.re}{2}}{2}\right)\right), \mathsf{sin.f64}\left(\color{blue}{\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)}\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(\left(x.im \cdot x.im + x.re \cdot x.re\right), \left(x.im \cdot x.im + x.re \cdot x.re\right)\right), \left(\frac{\frac{y.re}{2}}{2}\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\color{blue}{y.re}, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
      6. +-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(\left(x.re \cdot x.re + x.im \cdot x.im\right), \left(x.im \cdot x.im + x.re \cdot x.re\right)\right), \left(\frac{\frac{y.re}{2}}{2}\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
      7. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\left(x.re \cdot x.re\right), \left(x.im \cdot x.im\right)\right), \left(x.im \cdot x.im + x.re \cdot x.re\right)\right), \left(\frac{\frac{y.re}{2}}{2}\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \left(x.im \cdot x.im\right)\right), \left(x.im \cdot x.im + x.re \cdot x.re\right)\right), \left(\frac{\frac{y.re}{2}}{2}\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right), \left(x.im \cdot x.im + x.re \cdot x.re\right)\right), \left(\frac{\frac{y.re}{2}}{2}\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
      10. +-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right), \left(x.re \cdot x.re + x.im \cdot x.im\right)\right), \left(\frac{\frac{y.re}{2}}{2}\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
      11. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right), \mathsf{+.f64}\left(\left(x.re \cdot x.re\right), \left(x.im \cdot x.im\right)\right)\right), \left(\frac{\frac{y.re}{2}}{2}\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \left(x.im \cdot x.im\right)\right)\right), \left(\frac{\frac{y.re}{2}}{2}\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
      13. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right), \left(\frac{\frac{y.re}{2}}{2}\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
      14. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right), \mathsf{/.f64}\left(\left(\frac{y.re}{2}\right), 2\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \color{blue}{\mathsf{atan2.f64}\left(x.im, x.re\right)}\right)\right)\right) \]
      15. /-lowering-/.f6440.5%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(y.re, 2\right), 2\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(\color{blue}{x.im}, x.re\right)\right)\right)\right) \]
    7. Applied egg-rr40.5%

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

    if -4.3999999999999997e27 < y.im < -6.99999999999999988e-112 or 4.60000000000000044e-131 < y.im

    1. Initial program 32.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 \sin \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. Add Preprocessing
    3. Taylor expanded in y.re around 0

      \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \color{blue}{\sin \left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)}\right) \]
    4. Step-by-step derivation
      1. sin-lowering-sin.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{sin.f64}\left(\left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right)\right) \]
      3. log-lowering-log.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right)\right)\right) \]
      4. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right)\right)\right)\right)\right) \]
      5. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)\right)\right)\right)\right) \]
      6. accelerator-lowering-hypot.f6460.7%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right)\right) \]
    5. Simplified60.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}{\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)} \]
    6. Taylor expanded in y.im around 0

      \[\leadsto \color{blue}{y.im \cdot \left(\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}\right)} \]
    7. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(y.im, \color{blue}{\left(\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}\right)}\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right), \color{blue}{\left({\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}\right)}\right)\right) \]
      3. log-lowering-log.f64N/A

        \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{log.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right), \left({\color{blue}{\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}}^{y.re}\right)\right)\right) \]
      4. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right)\right), \left({\left(\sqrt{{\color{blue}{x.im}}^{2} + {x.re}^{2}}\right)}^{y.re}\right)\right)\right) \]
      5. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)\right), \left({\left(\sqrt{{x.im}^{\color{blue}{2}} + {x.re}^{2}}\right)}^{y.re}\right)\right)\right) \]
      6. accelerator-lowering-hypot.f64N/A

        \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right), \left({\left(\sqrt{\color{blue}{{x.im}^{2} + {x.re}^{2}}}\right)}^{y.re}\right)\right)\right) \]
      7. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right), \mathsf{pow.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right), \color{blue}{y.re}\right)\right)\right) \]
      8. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right), \mathsf{pow.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right), y.re\right)\right)\right) \]
      9. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right), \mathsf{pow.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right), y.re\right)\right)\right) \]
      10. accelerator-lowering-hypot.f6456.2%

        \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right)\right)\right) \]
    8. Simplified56.2%

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

    if -6.99999999999999988e-112 < y.im < 4.60000000000000044e-131

    1. Initial program 48.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 \sin \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. Add Preprocessing
    3. Taylor expanded in y.im around 0

      \[\leadsto \color{blue}{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}} \]
    4. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re} \cdot \color{blue}{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}\right), \color{blue}{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\right) \]
      3. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right), y.re\right), \sin \color{blue}{\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\right) \]
      4. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right), y.re\right), \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
      5. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right), y.re\right), \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
      6. accelerator-lowering-hypot.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \sin \left(\color{blue}{y.re} \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
      7. sin-lowering-sin.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \mathsf{sin.f64}\left(\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
      9. atan2-lowering-atan2.f6473.0%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
    5. Simplified73.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y.im \leq -4.4 \cdot 10^{+27}:\\ \;\;\;\;\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\left(x.re \cdot x.re + x.im \cdot x.im\right) \cdot \left(x.re \cdot x.re + x.im \cdot x.im\right)\right)}^{\left(\frac{\frac{y.re}{2}}{2}\right)}\\ \mathbf{elif}\;y.im \leq -7 \cdot 10^{-112}:\\ \;\;\;\;y.im \cdot \left(\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right) \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\right)\\ \mathbf{elif}\;y.im \leq 4.6 \cdot 10^{-131}:\\ \;\;\;\;\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\ \mathbf{else}:\\ \;\;\;\;y.im \cdot \left(\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right) \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 54.8% accurate, 2.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := x.re \cdot x.re + x.im \cdot x.im\\ t_1 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\ t_2 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\ t_3 := y.im \cdot \left(\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right) \cdot t\_1\right)\\ \mathbf{if}\;y.im \leq -3 \cdot 10^{+25}:\\ \;\;\;\;\sin t\_2 \cdot {\left(t\_0 \cdot t\_0\right)}^{\left(\frac{\frac{y.re}{2}}{2}\right)}\\ \mathbf{elif}\;y.im \leq -3.05 \cdot 10^{-204}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;y.im \leq 1.35 \cdot 10^{-132}:\\ \;\;\;\;t\_2 \cdot t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_3\\ \end{array} \end{array} \]
(FPCore (x.re x.im y.re y.im)
 :precision binary64
 (let* ((t_0 (+ (* x.re x.re) (* x.im x.im)))
        (t_1 (pow (hypot x.im x.re) y.re))
        (t_2 (* y.re (atan2 x.im x.re)))
        (t_3 (* y.im (* (log (hypot x.im x.re)) t_1))))
   (if (<= y.im -3e+25)
     (* (sin t_2) (pow (* t_0 t_0) (/ (/ y.re 2.0) 2.0)))
     (if (<= y.im -3.05e-204) t_3 (if (<= y.im 1.35e-132) (* t_2 t_1) t_3)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
	double t_0 = (x_46_re * x_46_re) + (x_46_im * x_46_im);
	double t_1 = pow(hypot(x_46_im, x_46_re), y_46_re);
	double t_2 = y_46_re * atan2(x_46_im, x_46_re);
	double t_3 = y_46_im * (log(hypot(x_46_im, x_46_re)) * t_1);
	double tmp;
	if (y_46_im <= -3e+25) {
		tmp = sin(t_2) * pow((t_0 * t_0), ((y_46_re / 2.0) / 2.0));
	} else if (y_46_im <= -3.05e-204) {
		tmp = t_3;
	} else if (y_46_im <= 1.35e-132) {
		tmp = t_2 * t_1;
	} else {
		tmp = t_3;
	}
	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 = (x_46_re * x_46_re) + (x_46_im * x_46_im);
	double t_1 = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
	double t_2 = y_46_re * Math.atan2(x_46_im, x_46_re);
	double t_3 = y_46_im * (Math.log(Math.hypot(x_46_im, x_46_re)) * t_1);
	double tmp;
	if (y_46_im <= -3e+25) {
		tmp = Math.sin(t_2) * Math.pow((t_0 * t_0), ((y_46_re / 2.0) / 2.0));
	} else if (y_46_im <= -3.05e-204) {
		tmp = t_3;
	} else if (y_46_im <= 1.35e-132) {
		tmp = t_2 * t_1;
	} else {
		tmp = t_3;
	}
	return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im):
	t_0 = (x_46_re * x_46_re) + (x_46_im * x_46_im)
	t_1 = math.pow(math.hypot(x_46_im, x_46_re), y_46_re)
	t_2 = y_46_re * math.atan2(x_46_im, x_46_re)
	t_3 = y_46_im * (math.log(math.hypot(x_46_im, x_46_re)) * t_1)
	tmp = 0
	if y_46_im <= -3e+25:
		tmp = math.sin(t_2) * math.pow((t_0 * t_0), ((y_46_re / 2.0) / 2.0))
	elif y_46_im <= -3.05e-204:
		tmp = t_3
	elif y_46_im <= 1.35e-132:
		tmp = t_2 * t_1
	else:
		tmp = t_3
	return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im)
	t_0 = Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))
	t_1 = hypot(x_46_im, x_46_re) ^ y_46_re
	t_2 = Float64(y_46_re * atan(x_46_im, x_46_re))
	t_3 = Float64(y_46_im * Float64(log(hypot(x_46_im, x_46_re)) * t_1))
	tmp = 0.0
	if (y_46_im <= -3e+25)
		tmp = Float64(sin(t_2) * (Float64(t_0 * t_0) ^ Float64(Float64(y_46_re / 2.0) / 2.0)));
	elseif (y_46_im <= -3.05e-204)
		tmp = t_3;
	elseif (y_46_im <= 1.35e-132)
		tmp = Float64(t_2 * t_1);
	else
		tmp = t_3;
	end
	return tmp
end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im)
	t_0 = (x_46_re * x_46_re) + (x_46_im * x_46_im);
	t_1 = hypot(x_46_im, x_46_re) ^ y_46_re;
	t_2 = y_46_re * atan2(x_46_im, x_46_re);
	t_3 = y_46_im * (log(hypot(x_46_im, x_46_re)) * t_1);
	tmp = 0.0;
	if (y_46_im <= -3e+25)
		tmp = sin(t_2) * ((t_0 * t_0) ^ ((y_46_re / 2.0) / 2.0));
	elseif (y_46_im <= -3.05e-204)
		tmp = t_3;
	elseif (y_46_im <= 1.35e-132)
		tmp = t_2 * t_1;
	else
		tmp = t_3;
	end
	tmp_2 = tmp;
end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, Block[{t$95$2 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(y$46$im * N[(N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -3e+25], N[(N[Sin[t$95$2], $MachinePrecision] * N[Power[N[(t$95$0 * t$95$0), $MachinePrecision], N[(N[(y$46$re / 2.0), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, -3.05e-204], t$95$3, If[LessEqual[y$46$im, 1.35e-132], N[(t$95$2 * t$95$1), $MachinePrecision], t$95$3]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := x.re \cdot x.re + x.im \cdot x.im\\
t_1 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
t_2 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_3 := y.im \cdot \left(\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right) \cdot t\_1\right)\\
\mathbf{if}\;y.im \leq -3 \cdot 10^{+25}:\\
\;\;\;\;\sin t\_2 \cdot {\left(t\_0 \cdot t\_0\right)}^{\left(\frac{\frac{y.re}{2}}{2}\right)}\\

\mathbf{elif}\;y.im \leq -3.05 \cdot 10^{-204}:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;y.im \leq 1.35 \cdot 10^{-132}:\\
\;\;\;\;t\_2 \cdot t\_1\\

\mathbf{else}:\\
\;\;\;\;t\_3\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y.im < -3.00000000000000006e25

    1. Initial program 35.1%

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

      \[\leadsto \color{blue}{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}} \]
    4. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re} \cdot \color{blue}{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}\right), \color{blue}{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\right) \]
      3. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right), y.re\right), \sin \color{blue}{\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\right) \]
      4. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right), y.re\right), \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
      5. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right), y.re\right), \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
      6. accelerator-lowering-hypot.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \sin \left(\color{blue}{y.re} \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
      7. sin-lowering-sin.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \mathsf{sin.f64}\left(\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
      9. atan2-lowering-atan2.f6429.5%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
    5. Simplified29.5%

      \[\leadsto \color{blue}{{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
    6. Step-by-step derivation
      1. sqrt-pow2N/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(x.im \cdot x.im + x.re \cdot x.re\right)}^{\left(\frac{y.re}{2}\right)}\right), \mathsf{sin.f64}\left(\color{blue}{\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)}\right)\right) \]
      2. sqr-powN/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(x.im \cdot x.im + x.re \cdot x.re\right)}^{\left(\frac{\frac{y.re}{2}}{2}\right)} \cdot {\left(x.im \cdot x.im + x.re \cdot x.re\right)}^{\left(\frac{\frac{y.re}{2}}{2}\right)}\right), \mathsf{sin.f64}\left(\color{blue}{\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)}\right)\right) \]
      3. pow-prod-downN/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\left(x.im \cdot x.im + x.re \cdot x.re\right) \cdot \left(x.im \cdot x.im + x.re \cdot x.re\right)\right)}^{\left(\frac{\frac{y.re}{2}}{2}\right)}\right), \mathsf{sin.f64}\left(\color{blue}{\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)}\right)\right) \]
      4. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\left(x.im \cdot x.im + x.re \cdot x.re\right) \cdot \left(x.im \cdot x.im + x.re \cdot x.re\right)\right), \left(\frac{\frac{y.re}{2}}{2}\right)\right), \mathsf{sin.f64}\left(\color{blue}{\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)}\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(\left(x.im \cdot x.im + x.re \cdot x.re\right), \left(x.im \cdot x.im + x.re \cdot x.re\right)\right), \left(\frac{\frac{y.re}{2}}{2}\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\color{blue}{y.re}, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
      6. +-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(\left(x.re \cdot x.re + x.im \cdot x.im\right), \left(x.im \cdot x.im + x.re \cdot x.re\right)\right), \left(\frac{\frac{y.re}{2}}{2}\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
      7. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\left(x.re \cdot x.re\right), \left(x.im \cdot x.im\right)\right), \left(x.im \cdot x.im + x.re \cdot x.re\right)\right), \left(\frac{\frac{y.re}{2}}{2}\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \left(x.im \cdot x.im\right)\right), \left(x.im \cdot x.im + x.re \cdot x.re\right)\right), \left(\frac{\frac{y.re}{2}}{2}\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right), \left(x.im \cdot x.im + x.re \cdot x.re\right)\right), \left(\frac{\frac{y.re}{2}}{2}\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
      10. +-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right), \left(x.re \cdot x.re + x.im \cdot x.im\right)\right), \left(\frac{\frac{y.re}{2}}{2}\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
      11. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right), \mathsf{+.f64}\left(\left(x.re \cdot x.re\right), \left(x.im \cdot x.im\right)\right)\right), \left(\frac{\frac{y.re}{2}}{2}\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \left(x.im \cdot x.im\right)\right)\right), \left(\frac{\frac{y.re}{2}}{2}\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
      13. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right), \left(\frac{\frac{y.re}{2}}{2}\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
      14. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right), \mathsf{/.f64}\left(\left(\frac{y.re}{2}\right), 2\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \color{blue}{\mathsf{atan2.f64}\left(x.im, x.re\right)}\right)\right)\right) \]
      15. /-lowering-/.f6440.5%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(y.re, 2\right), 2\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(\color{blue}{x.im}, x.re\right)\right)\right)\right) \]
    7. Applied egg-rr40.5%

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

    if -3.00000000000000006e25 < y.im < -3.04999999999999987e-204 or 1.34999999999999995e-132 < y.im

    1. Initial program 37.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 \sin \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. Add Preprocessing
    3. Taylor expanded in y.re around 0

      \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \color{blue}{\sin \left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)}\right) \]
    4. Step-by-step derivation
      1. sin-lowering-sin.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{sin.f64}\left(\left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right)\right) \]
      3. log-lowering-log.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right)\right)\right) \]
      4. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right)\right)\right)\right)\right) \]
      5. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)\right)\right)\right)\right) \]
      6. accelerator-lowering-hypot.f6458.5%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right)\right) \]
    5. Simplified58.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}{\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)} \]
    6. Taylor expanded in y.im around 0

      \[\leadsto \color{blue}{y.im \cdot \left(\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}\right)} \]
    7. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(y.im, \color{blue}{\left(\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}\right)}\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right), \color{blue}{\left({\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}\right)}\right)\right) \]
      3. log-lowering-log.f64N/A

        \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{log.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right), \left({\color{blue}{\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}}^{y.re}\right)\right)\right) \]
      4. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right)\right), \left({\left(\sqrt{{\color{blue}{x.im}}^{2} + {x.re}^{2}}\right)}^{y.re}\right)\right)\right) \]
      5. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)\right), \left({\left(\sqrt{{x.im}^{\color{blue}{2}} + {x.re}^{2}}\right)}^{y.re}\right)\right)\right) \]
      6. accelerator-lowering-hypot.f64N/A

        \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right), \left({\left(\sqrt{\color{blue}{{x.im}^{2} + {x.re}^{2}}}\right)}^{y.re}\right)\right)\right) \]
      7. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right), \mathsf{pow.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right), \color{blue}{y.re}\right)\right)\right) \]
      8. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right), \mathsf{pow.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right), y.re\right)\right)\right) \]
      9. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right), \mathsf{pow.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right), y.re\right)\right)\right) \]
      10. accelerator-lowering-hypot.f6456.3%

        \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right)\right)\right) \]
    8. Simplified56.3%

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

    if -3.04999999999999987e-204 < y.im < 1.34999999999999995e-132

    1. Initial program 43.5%

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

      \[\leadsto \color{blue}{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}} \]
    4. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re} \cdot \color{blue}{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}\right), \color{blue}{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\right) \]
      3. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right), y.re\right), \sin \color{blue}{\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\right) \]
      4. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right), y.re\right), \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
      5. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right), y.re\right), \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
      6. accelerator-lowering-hypot.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \sin \left(\color{blue}{y.re} \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
      7. sin-lowering-sin.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \mathsf{sin.f64}\left(\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
      9. atan2-lowering-atan2.f6480.2%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
    5. Simplified80.2%

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

      \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \color{blue}{\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\right) \]
    7. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \mathsf{*.f64}\left(y.re, \color{blue}{\tan^{-1}_* \frac{x.im}{x.re}}\right)\right) \]
      2. atan2-lowering-atan2.f6480.2%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, \color{blue}{x.re}\right)\right)\right) \]
    8. Simplified80.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y.im \leq -3 \cdot 10^{+25}:\\ \;\;\;\;\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\left(x.re \cdot x.re + x.im \cdot x.im\right) \cdot \left(x.re \cdot x.re + x.im \cdot x.im\right)\right)}^{\left(\frac{\frac{y.re}{2}}{2}\right)}\\ \mathbf{elif}\;y.im \leq -3.05 \cdot 10^{-204}:\\ \;\;\;\;y.im \cdot \left(\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right) \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\right)\\ \mathbf{elif}\;y.im \leq 1.35 \cdot 10^{-132}:\\ \;\;\;\;\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\ \mathbf{else}:\\ \;\;\;\;y.im \cdot \left(\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right) \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 65.4% accurate, 2.0× speedup?

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

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

\mathbf{elif}\;y.re \leq 8.6 \cdot 10^{+14}:\\
\;\;\;\;\left(y.im \cdot t\_1\right) \cdot e^{y.im \cdot \left(0 - \tan^{-1}_* \frac{x.im}{x.re}\right)}\\

\mathbf{else}:\\
\;\;\;\;y.im \cdot \left(t\_1 \cdot t\_0\right)\\


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

    1. Initial program 32.0%

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

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

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

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

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

      \[\leadsto \color{blue}{y.im \cdot \left(\left(\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot \left(\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}\right) + \frac{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}}{y.im}\right) - \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}\right)\right)} \]
    7. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(y.im, \color{blue}{\left(\left(\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot \left(\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}\right) + \frac{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}}{y.im}\right) - \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}\right)\right)}\right) \]
      2. associate--l+N/A

        \[\leadsto \mathsf{*.f64}\left(y.im, \left(\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot \left(\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}\right) + \color{blue}{\left(\frac{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}}{y.im} - \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}\right)\right)}\right)\right) \]
      3. +-lowering-+.f64N/A

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

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

      \[\leadsto \mathsf{*.f64}\left(y.im, \color{blue}{\left(\frac{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}}{y.im}\right)}\right) \]
    10. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{/.f64}\left(\left(\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}\right), \color{blue}{y.im}\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right), \left({\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}\right)\right), y.im\right)\right) \]
      3. sin-lowering-sin.f64N/A

        \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sin.f64}\left(\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right), \left({\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}\right)\right), y.im\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}\right)\right), \left({\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}\right)\right), y.im\right)\right) \]
      5. atan2-lowering-atan2.f64N/A

        \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \left({\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}\right)\right), y.im\right)\right) \]
      6. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right), y.re\right)\right), y.im\right)\right) \]
      7. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right), y.re\right)\right), y.im\right)\right) \]
      8. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right), y.re\right)\right), y.im\right)\right) \]
      9. accelerator-lowering-hypot.f6475.9%

        \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right)\right), y.im\right)\right) \]
    11. Simplified75.9%

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

    if -9.5000000000000007e-74 < y.re < 8.6e14

    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 \sin \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. Add Preprocessing
    3. Taylor expanded in y.re around 0

      \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \color{blue}{\sin \left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)}\right) \]
    4. Step-by-step derivation
      1. sin-lowering-sin.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{sin.f64}\left(\left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right)\right) \]
      3. log-lowering-log.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right)\right)\right) \]
      4. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right)\right)\right)\right)\right) \]
      5. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)\right)\right)\right)\right) \]
      6. accelerator-lowering-hypot.f6441.9%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right)\right) \]
    5. Simplified41.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}{\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)} \]
    6. Taylor expanded in y.im around 0

      \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \color{blue}{\left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)}\right) \]
    7. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{*.f64}\left(y.im, \color{blue}{\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}\right)\right) \]
      2. log-lowering-log.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right)\right) \]
      3. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right)\right)\right)\right) \]
      4. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)\right)\right)\right) \]
      5. accelerator-lowering-hypot.f6436.6%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right) \]
    8. Simplified36.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}{\left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)} \]
    9. Taylor expanded in y.re around 0

      \[\leadsto \mathsf{*.f64}\left(\color{blue}{\left(e^{\mathsf{neg}\left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\right)}, \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right) \]
    10. Step-by-step derivation
      1. exp-lowering-exp.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\left(\mathsf{neg}\left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right), \mathsf{*.f64}\left(\color{blue}{y.im}, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right) \]
      2. neg-sub0N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\left(0 - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right) \]
      3. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(0, \left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(y.im, \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right) \]
      5. atan2-lowering-atan2.f6459.3%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(y.im, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right) \]
    11. Simplified59.3%

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

    if 8.6e14 < y.re

    1. Initial program 38.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 \sin \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. Add Preprocessing
    3. Taylor expanded in y.re around 0

      \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \color{blue}{\sin \left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)}\right) \]
    4. Step-by-step derivation
      1. sin-lowering-sin.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{sin.f64}\left(\left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right)\right) \]
      3. log-lowering-log.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right)\right)\right) \]
      4. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right)\right)\right)\right)\right) \]
      5. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)\right)\right)\right)\right) \]
      6. accelerator-lowering-hypot.f6473.7%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right)\right) \]
    5. Simplified73.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}{\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)} \]
    6. Taylor expanded in y.im around 0

      \[\leadsto \color{blue}{y.im \cdot \left(\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}\right)} \]
    7. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(y.im, \color{blue}{\left(\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}\right)}\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right), \color{blue}{\left({\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}\right)}\right)\right) \]
      3. log-lowering-log.f64N/A

        \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{log.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right), \left({\color{blue}{\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}}^{y.re}\right)\right)\right) \]
      4. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right)\right), \left({\left(\sqrt{{\color{blue}{x.im}}^{2} + {x.re}^{2}}\right)}^{y.re}\right)\right)\right) \]
      5. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)\right), \left({\left(\sqrt{{x.im}^{\color{blue}{2}} + {x.re}^{2}}\right)}^{y.re}\right)\right)\right) \]
      6. accelerator-lowering-hypot.f64N/A

        \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right), \left({\left(\sqrt{\color{blue}{{x.im}^{2} + {x.re}^{2}}}\right)}^{y.re}\right)\right)\right) \]
      7. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right), \mathsf{pow.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right), \color{blue}{y.re}\right)\right)\right) \]
      8. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right), \mathsf{pow.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right), y.re\right)\right)\right) \]
      9. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right), \mathsf{pow.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right), y.re\right)\right)\right) \]
      10. accelerator-lowering-hypot.f6466.7%

        \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right)\right)\right) \]
    8. Simplified66.7%

      \[\leadsto \color{blue}{y.im \cdot \left(\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right) \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification66.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y.re \leq -9.5 \cdot 10^{-74}:\\ \;\;\;\;y.im \cdot \frac{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}}{y.im}\\ \mathbf{elif}\;y.re \leq 8.6 \cdot 10^{+14}:\\ \;\;\;\;\left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \cdot e^{y.im \cdot \left(0 - \tan^{-1}_* \frac{x.im}{x.re}\right)}\\ \mathbf{else}:\\ \;\;\;\;y.im \cdot \left(\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right) \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 65.2% accurate, 2.0× speedup?

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

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

\mathbf{elif}\;y.re \leq 46000000000000:\\
\;\;\;\;\left(y.im \cdot t\_0\right) \cdot e^{y.im \cdot \left(0 - \tan^{-1}_* \frac{x.im}{x.re}\right)}\\

\mathbf{else}:\\
\;\;\;\;y.im \cdot \left(t\_0 \cdot t\_1\right)\\


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

    1. Initial program 32.0%

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

      \[\leadsto \color{blue}{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}} \]
    4. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re} \cdot \color{blue}{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}\right), \color{blue}{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\right) \]
      3. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right), y.re\right), \sin \color{blue}{\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\right) \]
      4. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right), y.re\right), \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
      5. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right), y.re\right), \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
      6. accelerator-lowering-hypot.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \sin \left(\color{blue}{y.re} \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
      7. sin-lowering-sin.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \mathsf{sin.f64}\left(\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
      9. atan2-lowering-atan2.f6474.7%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
    5. Simplified74.7%

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

    if -4.4e-69 < y.re < 4.6e13

    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 \sin \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. Add Preprocessing
    3. Taylor expanded in y.re around 0

      \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \color{blue}{\sin \left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)}\right) \]
    4. Step-by-step derivation
      1. sin-lowering-sin.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{sin.f64}\left(\left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right)\right) \]
      3. log-lowering-log.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right)\right)\right) \]
      4. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right)\right)\right)\right)\right) \]
      5. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)\right)\right)\right)\right) \]
      6. accelerator-lowering-hypot.f6441.9%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right)\right) \]
    5. Simplified41.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}{\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)} \]
    6. Taylor expanded in y.im around 0

      \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \color{blue}{\left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)}\right) \]
    7. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{*.f64}\left(y.im, \color{blue}{\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}\right)\right) \]
      2. log-lowering-log.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right)\right) \]
      3. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right)\right)\right)\right) \]
      4. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)\right)\right)\right) \]
      5. accelerator-lowering-hypot.f6436.6%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right) \]
    8. Simplified36.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}{\left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)} \]
    9. Taylor expanded in y.re around 0

      \[\leadsto \mathsf{*.f64}\left(\color{blue}{\left(e^{\mathsf{neg}\left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\right)}, \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right) \]
    10. Step-by-step derivation
      1. exp-lowering-exp.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\left(\mathsf{neg}\left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right), \mathsf{*.f64}\left(\color{blue}{y.im}, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right) \]
      2. neg-sub0N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\left(0 - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right) \]
      3. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(0, \left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(y.im, \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right) \]
      5. atan2-lowering-atan2.f6459.3%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(y.im, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right) \]
    11. Simplified59.3%

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

    if 4.6e13 < y.re

    1. Initial program 38.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 \sin \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. Add Preprocessing
    3. Taylor expanded in y.re around 0

      \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \color{blue}{\sin \left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)}\right) \]
    4. Step-by-step derivation
      1. sin-lowering-sin.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{sin.f64}\left(\left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right)\right) \]
      3. log-lowering-log.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right)\right)\right) \]
      4. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right)\right)\right)\right)\right) \]
      5. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)\right)\right)\right)\right) \]
      6. accelerator-lowering-hypot.f6473.7%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right)\right) \]
    5. Simplified73.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}{\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)} \]
    6. Taylor expanded in y.im around 0

      \[\leadsto \color{blue}{y.im \cdot \left(\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}\right)} \]
    7. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(y.im, \color{blue}{\left(\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}\right)}\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right), \color{blue}{\left({\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}\right)}\right)\right) \]
      3. log-lowering-log.f64N/A

        \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{log.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right), \left({\color{blue}{\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}}^{y.re}\right)\right)\right) \]
      4. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right)\right), \left({\left(\sqrt{{\color{blue}{x.im}}^{2} + {x.re}^{2}}\right)}^{y.re}\right)\right)\right) \]
      5. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)\right), \left({\left(\sqrt{{x.im}^{\color{blue}{2}} + {x.re}^{2}}\right)}^{y.re}\right)\right)\right) \]
      6. accelerator-lowering-hypot.f64N/A

        \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right), \left({\left(\sqrt{\color{blue}{{x.im}^{2} + {x.re}^{2}}}\right)}^{y.re}\right)\right)\right) \]
      7. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right), \mathsf{pow.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right), \color{blue}{y.re}\right)\right)\right) \]
      8. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right), \mathsf{pow.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right), y.re\right)\right)\right) \]
      9. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right), \mathsf{pow.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right), y.re\right)\right)\right) \]
      10. accelerator-lowering-hypot.f6466.7%

        \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right)\right)\right) \]
    8. Simplified66.7%

      \[\leadsto \color{blue}{y.im \cdot \left(\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right) \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification65.6%

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

Alternative 10: 49.8% accurate, 2.5× speedup?

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

\\
\begin{array}{l}
t_0 := x.re \cdot x.re + x.im \cdot x.im\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.re \leq -4.5 \cdot 10^{-79}:\\
\;\;\;\;t\_1 \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\

\mathbf{elif}\;y.re \leq -1.32 \cdot 10^{-205}:\\
\;\;\;\;\left(y.im \cdot \log t\_0\right) \cdot 0.5\\

\mathbf{elif}\;y.re \leq 3.4 \cdot 10^{-96}:\\
\;\;\;\;\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\

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

\mathbf{else}:\\
\;\;\;\;\sin t\_1 \cdot {t\_0}^{\left(\frac{y.re}{2}\right)}\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if y.re < -4.5000000000000003e-79

    1. Initial program 32.5%

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

      \[\leadsto \color{blue}{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}} \]
    4. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re} \cdot \color{blue}{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}\right), \color{blue}{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\right) \]
      3. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right), y.re\right), \sin \color{blue}{\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\right) \]
      4. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right), y.re\right), \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
      5. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right), y.re\right), \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
      6. accelerator-lowering-hypot.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \sin \left(\color{blue}{y.re} \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
      7. sin-lowering-sin.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \mathsf{sin.f64}\left(\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
      9. atan2-lowering-atan2.f6474.1%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
    5. Simplified74.1%

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

      \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \color{blue}{\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\right) \]
    7. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \mathsf{*.f64}\left(y.re, \color{blue}{\tan^{-1}_* \frac{x.im}{x.re}}\right)\right) \]
      2. atan2-lowering-atan2.f6471.6%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, \color{blue}{x.re}\right)\right)\right) \]
    8. Simplified71.6%

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

    if -4.5000000000000003e-79 < y.re < -1.31999999999999992e-205

    1. Initial program 46.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 \sin \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. Add Preprocessing
    3. Taylor expanded in y.im around 0

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

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

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

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

      \[\leadsto \color{blue}{y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)} \]
    7. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(y.im, \color{blue}{\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}\right) \]
      2. log-lowering-log.f64N/A

        \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right) \]
      3. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right)\right)\right) \]
      4. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)\right)\right) \]
      5. accelerator-lowering-hypot.f6426.2%

        \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right) \]
    8. Simplified26.2%

      \[\leadsto \color{blue}{y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)} \]
    9. Step-by-step derivation
      1. pow1/2N/A

        \[\leadsto y.im \cdot \log \left({\left(x.im \cdot x.im + x.re \cdot x.re\right)}^{\frac{1}{2}}\right) \]
      2. +-commutativeN/A

        \[\leadsto y.im \cdot \log \left({\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\frac{1}{2}}\right) \]
      3. log-powN/A

        \[\leadsto y.im \cdot \left(\frac{1}{2} \cdot \color{blue}{\log \left(x.re \cdot x.re + x.im \cdot x.im\right)}\right) \]
      4. *-commutativeN/A

        \[\leadsto y.im \cdot \left(\log \left(x.re \cdot x.re + x.im \cdot x.im\right) \cdot \color{blue}{\frac{1}{2}}\right) \]
      5. associate-*r*N/A

        \[\leadsto \left(y.im \cdot \log \left(x.re \cdot x.re + x.im \cdot x.im\right)\right) \cdot \color{blue}{\frac{1}{2}} \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(y.im \cdot \log \left(x.re \cdot x.re + x.im \cdot x.im\right)\right), \color{blue}{\frac{1}{2}}\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(y.im, \log \left(x.re \cdot x.re + x.im \cdot x.im\right)\right), \frac{1}{2}\right) \]
      8. log-lowering-log.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(x.re \cdot x.re + x.im \cdot x.im\right)\right)\right), \frac{1}{2}\right) \]
      9. +-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(x.im \cdot x.im + x.re \cdot x.re\right)\right)\right), \frac{1}{2}\right) \]
      10. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{+.f64}\left(\left(x.im \cdot x.im\right), \left(x.re \cdot x.re\right)\right)\right)\right), \frac{1}{2}\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \left(x.re \cdot x.re\right)\right)\right)\right), \frac{1}{2}\right) \]
      12. *-lowering-*.f6441.4%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \mathsf{*.f64}\left(x.re, x.re\right)\right)\right)\right), \frac{1}{2}\right) \]
    10. Applied egg-rr41.4%

      \[\leadsto \color{blue}{\left(y.im \cdot \log \left(x.im \cdot x.im + x.re \cdot x.re\right)\right) \cdot 0.5} \]

    if -1.31999999999999992e-205 < y.re < 3.4000000000000001e-96

    1. Initial program 42.6%

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

      \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \color{blue}{\sin \left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)}\right) \]
    4. Step-by-step derivation
      1. sin-lowering-sin.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{sin.f64}\left(\left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right)\right) \]
      3. log-lowering-log.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right)\right)\right) \]
      4. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right)\right)\right)\right)\right) \]
      5. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)\right)\right)\right)\right) \]
      6. accelerator-lowering-hypot.f6444.3%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right)\right) \]
    5. Simplified44.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}{\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)} \]
    6. Taylor expanded in y.im around 0

      \[\leadsto \mathsf{*.f64}\left(\color{blue}{\left({\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}\right)}, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right)\right) \]
    7. Step-by-step derivation
      1. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right), y.re\right), \mathsf{sin.f64}\left(\color{blue}{\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)}\right)\right) \]
      2. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right), y.re\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right)\right) \]
      3. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right), y.re\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right)\right) \]
      4. accelerator-lowering-hypot.f6442.0%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\color{blue}{y.im}, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right)\right) \]
    8. Simplified42.0%

      \[\leadsto \color{blue}{{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}} \cdot \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \]
    9. Taylor expanded in y.re around 0

      \[\leadsto \color{blue}{\sin \left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)} \]
    10. Step-by-step derivation
      1. sin-lowering-sin.f64N/A

        \[\leadsto \mathsf{sin.f64}\left(\left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right) \]
      3. log-lowering-log.f64N/A

        \[\leadsto \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right)\right) \]
      4. unpow2N/A

        \[\leadsto \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right)\right)\right)\right) \]
      5. unpow2N/A

        \[\leadsto \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)\right)\right)\right) \]
      6. accelerator-lowering-hypot.f6442.0%

        \[\leadsto \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right) \]
    11. Simplified42.0%

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

    if 3.4000000000000001e-96 < y.re < 4.6e13

    1. Initial program 37.5%

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

      \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \color{blue}{\sin \left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)}\right) \]
    4. Step-by-step derivation
      1. sin-lowering-sin.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{sin.f64}\left(\left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right)\right) \]
      3. log-lowering-log.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right)\right)\right) \]
      4. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right)\right)\right)\right)\right) \]
      5. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)\right)\right)\right)\right) \]
      6. accelerator-lowering-hypot.f6435.0%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right)\right) \]
    5. Simplified35.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}{\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)} \]
    6. Taylor expanded in y.im around 0

      \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \color{blue}{\left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)}\right) \]
    7. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{*.f64}\left(y.im, \color{blue}{\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}\right)\right) \]
      2. log-lowering-log.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right)\right) \]
      3. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right)\right)\right)\right) \]
      4. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)\right)\right)\right) \]
      5. accelerator-lowering-hypot.f6428.1%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right) \]
    8. Simplified28.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}{\left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)} \]
    9. Taylor expanded in x.im around 0

      \[\leadsto \color{blue}{y.im \cdot \left(e^{y.re \cdot \log x.re - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \log x.re\right)} \]
    10. Step-by-step derivation
      1. *-lowering-*.f64N/A

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

        \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\left(e^{y.re \cdot \log x.re - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\right), \color{blue}{\log x.re}\right)\right) \]
      3. exp-lowering-exp.f64N/A

        \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\left(y.re \cdot \log x.re - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right), \log \color{blue}{x.re}\right)\right) \]
      4. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\left(y.re \cdot \log x.re\right), \left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right), \log x.re\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(y.re, \log x.re\right), \left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right), \log x.re\right)\right) \]
      6. log-lowering-log.f64N/A

        \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{log.f64}\left(x.re\right)\right), \left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right), \log x.re\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{log.f64}\left(x.re\right)\right), \mathsf{*.f64}\left(y.im, \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right), \log x.re\right)\right) \]
      8. atan2-lowering-atan2.f64N/A

        \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{log.f64}\left(x.re\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right), \log x.re\right)\right) \]
      9. log-lowering-log.f6437.2%

        \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{log.f64}\left(x.re\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right), \mathsf{log.f64}\left(x.re\right)\right)\right) \]
    11. Simplified37.2%

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

      \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\color{blue}{\left(e^{\mathsf{neg}\left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\right)}, \mathsf{log.f64}\left(x.re\right)\right)\right) \]
    13. Step-by-step derivation
      1. exp-lowering-exp.f64N/A

        \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\left(\mathsf{neg}\left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right), \mathsf{log.f64}\left(\color{blue}{x.re}\right)\right)\right) \]
      2. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\left(y.im \cdot \left(\mathsf{neg}\left(\tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right), \mathsf{log.f64}\left(x.re\right)\right)\right) \]
      3. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\left(y.im \cdot \left(-1 \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right), \mathsf{log.f64}\left(x.re\right)\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(y.im, \left(-1 \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right), \mathsf{log.f64}\left(x.re\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(-1, \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right), \mathsf{log.f64}\left(x.re\right)\right)\right) \]
      6. atan2-lowering-atan2.f6437.2%

        \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(-1, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right), \mathsf{log.f64}\left(x.re\right)\right)\right) \]
    14. Simplified37.2%

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

    if 4.6e13 < y.re

    1. Initial program 38.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 \sin \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. Add Preprocessing
    3. Taylor expanded in y.im around 0

      \[\leadsto \color{blue}{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}} \]
    4. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re} \cdot \color{blue}{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}\right), \color{blue}{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\right) \]
      3. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right), y.re\right), \sin \color{blue}{\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\right) \]
      4. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right), y.re\right), \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
      5. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right), y.re\right), \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
      6. accelerator-lowering-hypot.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \sin \left(\color{blue}{y.re} \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
      7. sin-lowering-sin.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \mathsf{sin.f64}\left(\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
      9. atan2-lowering-atan2.f6459.7%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
    5. Simplified59.7%

      \[\leadsto \color{blue}{{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
    6. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)}^{y.re}\right), \color{blue}{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\right) \]
      2. sqrt-pow2N/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(x.im \cdot x.im + x.re \cdot x.re\right)}^{\left(\frac{y.re}{2}\right)}\right), \sin \color{blue}{\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\right) \]
      3. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(x.im \cdot x.im + x.re \cdot x.re\right), \left(\frac{y.re}{2}\right)\right), \sin \color{blue}{\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\right) \]
      4. +-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(x.re \cdot x.re + x.im \cdot x.im\right), \left(\frac{y.re}{2}\right)\right), \sin \left(\color{blue}{y.re} \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
      5. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{+.f64}\left(\left(x.re \cdot x.re\right), \left(x.im \cdot x.im\right)\right), \left(\frac{y.re}{2}\right)\right), \sin \left(\color{blue}{y.re} \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \left(x.im \cdot x.im\right)\right), \left(\frac{y.re}{2}\right)\right), \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right), \left(\frac{y.re}{2}\right)\right), \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right), \mathsf{/.f64}\left(y.re, 2\right)\right), \sin \left(y.re \cdot \color{blue}{\tan^{-1}_* \frac{x.im}{x.re}}\right)\right) \]
      9. sin-lowering-sin.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right), \mathsf{/.f64}\left(y.re, 2\right)\right), \mathsf{sin.f64}\left(\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right), \mathsf{/.f64}\left(y.re, 2\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
      11. atan2-lowering-atan2.f6459.7%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right), \mathsf{/.f64}\left(y.re, 2\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
    7. Applied egg-rr59.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y.re \leq -4.5 \cdot 10^{-79}:\\ \;\;\;\;\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\ \mathbf{elif}\;y.re \leq -1.32 \cdot 10^{-205}:\\ \;\;\;\;\left(y.im \cdot \log \left(x.re \cdot x.re + x.im \cdot x.im\right)\right) \cdot 0.5\\ \mathbf{elif}\;y.re \leq 3.4 \cdot 10^{-96}:\\ \;\;\;\;\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\ \mathbf{elif}\;y.re \leq 46000000000000:\\ \;\;\;\;y.im \cdot \left(\log x.re \cdot e^{y.im \cdot \left(0 - \tan^{-1}_* \frac{x.im}{x.re}\right)}\right)\\ \mathbf{else}:\\ \;\;\;\;\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\left(\frac{y.re}{2}\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 50.3% accurate, 2.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\ \mathbf{if}\;y.re \leq -4.5 \cdot 10^{-79}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;y.re \leq -4 \cdot 10^{-205}:\\ \;\;\;\;\left(y.im \cdot \log \left(x.re \cdot x.re + x.im \cdot x.im\right)\right) \cdot 0.5\\ \mathbf{elif}\;y.re \leq 6 \cdot 10^{-93}:\\ \;\;\;\;\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\ \mathbf{elif}\;y.re \leq 2.55 \cdot 10^{-26}:\\ \;\;\;\;y.im \cdot \left(\log x.re \cdot e^{y.im \cdot \left(0 - \tan^{-1}_* \frac{x.im}{x.re}\right)}\right)\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \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)) (pow (hypot x.im x.re) y.re))))
   (if (<= y.re -4.5e-79)
     t_0
     (if (<= y.re -4e-205)
       (* (* y.im (log (+ (* x.re x.re) (* x.im x.im)))) 0.5)
       (if (<= y.re 6e-93)
         (sin (* y.im (log (hypot x.im x.re))))
         (if (<= y.re 2.55e-26)
           (* y.im (* (log x.re) (exp (* y.im (- 0.0 (atan2 x.im x.re))))))
           t_0))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
	double t_0 = (y_46_re * atan2(x_46_im, x_46_re)) * pow(hypot(x_46_im, x_46_re), y_46_re);
	double tmp;
	if (y_46_re <= -4.5e-79) {
		tmp = t_0;
	} else if (y_46_re <= -4e-205) {
		tmp = (y_46_im * log(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * 0.5;
	} else if (y_46_re <= 6e-93) {
		tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re))));
	} else if (y_46_re <= 2.55e-26) {
		tmp = y_46_im * (log(x_46_re) * exp((y_46_im * (0.0 - atan2(x_46_im, x_46_re)))));
	} else {
		tmp = t_0;
	}
	return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
	double t_0 = (y_46_re * Math.atan2(x_46_im, x_46_re)) * Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
	double tmp;
	if (y_46_re <= -4.5e-79) {
		tmp = t_0;
	} else if (y_46_re <= -4e-205) {
		tmp = (y_46_im * Math.log(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * 0.5;
	} else if (y_46_re <= 6e-93) {
		tmp = Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re))));
	} else if (y_46_re <= 2.55e-26) {
		tmp = y_46_im * (Math.log(x_46_re) * Math.exp((y_46_im * (0.0 - Math.atan2(x_46_im, x_46_re)))));
	} else {
		tmp = t_0;
	}
	return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im):
	t_0 = (y_46_re * math.atan2(x_46_im, x_46_re)) * math.pow(math.hypot(x_46_im, x_46_re), y_46_re)
	tmp = 0
	if y_46_re <= -4.5e-79:
		tmp = t_0
	elif y_46_re <= -4e-205:
		tmp = (y_46_im * math.log(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * 0.5
	elif y_46_re <= 6e-93:
		tmp = math.sin((y_46_im * math.log(math.hypot(x_46_im, x_46_re))))
	elif y_46_re <= 2.55e-26:
		tmp = y_46_im * (math.log(x_46_re) * math.exp((y_46_im * (0.0 - math.atan2(x_46_im, x_46_re)))))
	else:
		tmp = t_0
	return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im)
	t_0 = Float64(Float64(y_46_re * atan(x_46_im, x_46_re)) * (hypot(x_46_im, x_46_re) ^ y_46_re))
	tmp = 0.0
	if (y_46_re <= -4.5e-79)
		tmp = t_0;
	elseif (y_46_re <= -4e-205)
		tmp = Float64(Float64(y_46_im * log(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) * 0.5);
	elseif (y_46_re <= 6e-93)
		tmp = sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re))));
	elseif (y_46_re <= 2.55e-26)
		tmp = Float64(y_46_im * Float64(log(x_46_re) * exp(Float64(y_46_im * Float64(0.0 - atan(x_46_im, x_46_re))))));
	else
		tmp = t_0;
	end
	return tmp
end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im)
	t_0 = (y_46_re * atan2(x_46_im, x_46_re)) * (hypot(x_46_im, x_46_re) ^ y_46_re);
	tmp = 0.0;
	if (y_46_re <= -4.5e-79)
		tmp = t_0;
	elseif (y_46_re <= -4e-205)
		tmp = (y_46_im * log(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * 0.5;
	elseif (y_46_re <= 6e-93)
		tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re))));
	elseif (y_46_re <= 2.55e-26)
		tmp = y_46_im * (log(x_46_re) * exp((y_46_im * (0.0 - atan2(x_46_im, x_46_re)))));
	else
		tmp = 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[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision] * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -4.5e-79], t$95$0, If[LessEqual[y$46$re, -4e-205], N[(N[(y$46$im * N[Log[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * 0.5), $MachinePrecision], If[LessEqual[y$46$re, 6e-93], N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[y$46$re, 2.55e-26], N[(y$46$im * N[(N[Log[x$46$re], $MachinePrecision] * N[Exp[N[(y$46$im * N[(0.0 - N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{if}\;y.re \leq -4.5 \cdot 10^{-79}:\\
\;\;\;\;t\_0\\

\mathbf{elif}\;y.re \leq -4 \cdot 10^{-205}:\\
\;\;\;\;\left(y.im \cdot \log \left(x.re \cdot x.re + x.im \cdot x.im\right)\right) \cdot 0.5\\

\mathbf{elif}\;y.re \leq 6 \cdot 10^{-93}:\\
\;\;\;\;\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\

\mathbf{elif}\;y.re \leq 2.55 \cdot 10^{-26}:\\
\;\;\;\;y.im \cdot \left(\log x.re \cdot e^{y.im \cdot \left(0 - \tan^{-1}_* \frac{x.im}{x.re}\right)}\right)\\

\mathbf{else}:\\
\;\;\;\;t\_0\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y.re < -4.5000000000000003e-79 or 2.54999999999999995e-26 < y.re

    1. Initial program 35.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 \sin \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. Add Preprocessing
    3. Taylor expanded in y.im around 0

      \[\leadsto \color{blue}{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}} \]
    4. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re} \cdot \color{blue}{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}\right), \color{blue}{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\right) \]
      3. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right), y.re\right), \sin \color{blue}{\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\right) \]
      4. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right), y.re\right), \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
      5. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right), y.re\right), \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
      6. accelerator-lowering-hypot.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \sin \left(\color{blue}{y.re} \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
      7. sin-lowering-sin.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \mathsf{sin.f64}\left(\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
      9. atan2-lowering-atan2.f6466.2%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
    5. Simplified66.2%

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

      \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \color{blue}{\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\right) \]
    7. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \mathsf{*.f64}\left(y.re, \color{blue}{\tan^{-1}_* \frac{x.im}{x.re}}\right)\right) \]
      2. atan2-lowering-atan2.f6463.5%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, \color{blue}{x.re}\right)\right)\right) \]
    8. Simplified63.5%

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

    if -4.5000000000000003e-79 < y.re < -4e-205

    1. Initial program 46.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 \sin \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. Add Preprocessing
    3. Taylor expanded in y.im around 0

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

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

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

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

      \[\leadsto \color{blue}{y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)} \]
    7. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(y.im, \color{blue}{\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}\right) \]
      2. log-lowering-log.f64N/A

        \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right) \]
      3. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right)\right)\right) \]
      4. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)\right)\right) \]
      5. accelerator-lowering-hypot.f6426.2%

        \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right) \]
    8. Simplified26.2%

      \[\leadsto \color{blue}{y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)} \]
    9. Step-by-step derivation
      1. pow1/2N/A

        \[\leadsto y.im \cdot \log \left({\left(x.im \cdot x.im + x.re \cdot x.re\right)}^{\frac{1}{2}}\right) \]
      2. +-commutativeN/A

        \[\leadsto y.im \cdot \log \left({\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\frac{1}{2}}\right) \]
      3. log-powN/A

        \[\leadsto y.im \cdot \left(\frac{1}{2} \cdot \color{blue}{\log \left(x.re \cdot x.re + x.im \cdot x.im\right)}\right) \]
      4. *-commutativeN/A

        \[\leadsto y.im \cdot \left(\log \left(x.re \cdot x.re + x.im \cdot x.im\right) \cdot \color{blue}{\frac{1}{2}}\right) \]
      5. associate-*r*N/A

        \[\leadsto \left(y.im \cdot \log \left(x.re \cdot x.re + x.im \cdot x.im\right)\right) \cdot \color{blue}{\frac{1}{2}} \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(y.im \cdot \log \left(x.re \cdot x.re + x.im \cdot x.im\right)\right), \color{blue}{\frac{1}{2}}\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(y.im, \log \left(x.re \cdot x.re + x.im \cdot x.im\right)\right), \frac{1}{2}\right) \]
      8. log-lowering-log.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(x.re \cdot x.re + x.im \cdot x.im\right)\right)\right), \frac{1}{2}\right) \]
      9. +-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(x.im \cdot x.im + x.re \cdot x.re\right)\right)\right), \frac{1}{2}\right) \]
      10. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{+.f64}\left(\left(x.im \cdot x.im\right), \left(x.re \cdot x.re\right)\right)\right)\right), \frac{1}{2}\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \left(x.re \cdot x.re\right)\right)\right)\right), \frac{1}{2}\right) \]
      12. *-lowering-*.f6441.4%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \mathsf{*.f64}\left(x.re, x.re\right)\right)\right)\right), \frac{1}{2}\right) \]
    10. Applied egg-rr41.4%

      \[\leadsto \color{blue}{\left(y.im \cdot \log \left(x.im \cdot x.im + x.re \cdot x.re\right)\right) \cdot 0.5} \]

    if -4e-205 < y.re < 6.0000000000000003e-93

    1. Initial program 42.6%

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

      \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \color{blue}{\sin \left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)}\right) \]
    4. Step-by-step derivation
      1. sin-lowering-sin.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{sin.f64}\left(\left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right)\right) \]
      3. log-lowering-log.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right)\right)\right) \]
      4. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right)\right)\right)\right)\right) \]
      5. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)\right)\right)\right)\right) \]
      6. accelerator-lowering-hypot.f6444.3%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right)\right) \]
    5. Simplified44.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}{\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)} \]
    6. Taylor expanded in y.im around 0

      \[\leadsto \mathsf{*.f64}\left(\color{blue}{\left({\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}\right)}, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right)\right) \]
    7. Step-by-step derivation
      1. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right), y.re\right), \mathsf{sin.f64}\left(\color{blue}{\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)}\right)\right) \]
      2. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right), y.re\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right)\right) \]
      3. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right), y.re\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right)\right) \]
      4. accelerator-lowering-hypot.f6442.0%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\color{blue}{y.im}, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right)\right) \]
    8. Simplified42.0%

      \[\leadsto \color{blue}{{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}} \cdot \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \]
    9. Taylor expanded in y.re around 0

      \[\leadsto \color{blue}{\sin \left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)} \]
    10. Step-by-step derivation
      1. sin-lowering-sin.f64N/A

        \[\leadsto \mathsf{sin.f64}\left(\left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right) \]
      3. log-lowering-log.f64N/A

        \[\leadsto \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right)\right) \]
      4. unpow2N/A

        \[\leadsto \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right)\right)\right)\right) \]
      5. unpow2N/A

        \[\leadsto \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)\right)\right)\right) \]
      6. accelerator-lowering-hypot.f6442.0%

        \[\leadsto \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right) \]
    11. Simplified42.0%

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

    if 6.0000000000000003e-93 < y.re < 2.54999999999999995e-26

    1. Initial program 36.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 \sin \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. Add Preprocessing
    3. Taylor expanded in y.re around 0

      \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \color{blue}{\sin \left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)}\right) \]
    4. Step-by-step derivation
      1. sin-lowering-sin.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{sin.f64}\left(\left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right)\right) \]
      3. log-lowering-log.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right)\right)\right) \]
      4. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right)\right)\right)\right)\right) \]
      5. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)\right)\right)\right)\right) \]
      6. accelerator-lowering-hypot.f6433.0%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right)\right) \]
    5. Simplified33.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}{\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)} \]
    6. Taylor expanded in y.im around 0

      \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \color{blue}{\left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)}\right) \]
    7. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{*.f64}\left(y.im, \color{blue}{\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}\right)\right) \]
      2. log-lowering-log.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right)\right) \]
      3. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right)\right)\right)\right) \]
      4. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)\right)\right)\right) \]
      5. accelerator-lowering-hypot.f6431.5%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right) \]
    8. Simplified31.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}{\left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)} \]
    9. Taylor expanded in x.im around 0

      \[\leadsto \color{blue}{y.im \cdot \left(e^{y.re \cdot \log x.re - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \log x.re\right)} \]
    10. Step-by-step derivation
      1. *-lowering-*.f64N/A

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

        \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\left(e^{y.re \cdot \log x.re - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\right), \color{blue}{\log x.re}\right)\right) \]
      3. exp-lowering-exp.f64N/A

        \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\left(y.re \cdot \log x.re - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right), \log \color{blue}{x.re}\right)\right) \]
      4. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\left(y.re \cdot \log x.re\right), \left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right), \log x.re\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(y.re, \log x.re\right), \left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right), \log x.re\right)\right) \]
      6. log-lowering-log.f64N/A

        \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{log.f64}\left(x.re\right)\right), \left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right), \log x.re\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{log.f64}\left(x.re\right)\right), \mathsf{*.f64}\left(y.im, \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right), \log x.re\right)\right) \]
      8. atan2-lowering-atan2.f64N/A

        \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{log.f64}\left(x.re\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right), \log x.re\right)\right) \]
      9. log-lowering-log.f6443.6%

        \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{log.f64}\left(x.re\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right), \mathsf{log.f64}\left(x.re\right)\right)\right) \]
    11. Simplified43.6%

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

      \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\color{blue}{\left(e^{\mathsf{neg}\left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\right)}, \mathsf{log.f64}\left(x.re\right)\right)\right) \]
    13. Step-by-step derivation
      1. exp-lowering-exp.f64N/A

        \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\left(\mathsf{neg}\left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right), \mathsf{log.f64}\left(\color{blue}{x.re}\right)\right)\right) \]
      2. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\left(y.im \cdot \left(\mathsf{neg}\left(\tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right), \mathsf{log.f64}\left(x.re\right)\right)\right) \]
      3. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\left(y.im \cdot \left(-1 \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right), \mathsf{log.f64}\left(x.re\right)\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(y.im, \left(-1 \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right), \mathsf{log.f64}\left(x.re\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(-1, \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right), \mathsf{log.f64}\left(x.re\right)\right)\right) \]
      6. atan2-lowering-atan2.f6443.6%

        \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(-1, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right), \mathsf{log.f64}\left(x.re\right)\right)\right) \]
    14. Simplified43.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y.re \leq -4.5 \cdot 10^{-79}:\\ \;\;\;\;\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\ \mathbf{elif}\;y.re \leq -4 \cdot 10^{-205}:\\ \;\;\;\;\left(y.im \cdot \log \left(x.re \cdot x.re + x.im \cdot x.im\right)\right) \cdot 0.5\\ \mathbf{elif}\;y.re \leq 6 \cdot 10^{-93}:\\ \;\;\;\;\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\ \mathbf{elif}\;y.re \leq 2.55 \cdot 10^{-26}:\\ \;\;\;\;y.im \cdot \left(\log x.re \cdot e^{y.im \cdot \left(0 - \tan^{-1}_* \frac{x.im}{x.re}\right)}\right)\\ \mathbf{else}:\\ \;\;\;\;\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 46.0% accurate, 2.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\ t_1 := \sin t\_0\\ \mathbf{if}\;y.re \leq -48:\\ \;\;\;\;t\_0 \cdot {\left(x.im \cdot \left(\left(x.re \cdot 0.5\right) \cdot \frac{x.re}{x.im \cdot x.im} + 1\right)\right)}^{y.re}\\ \mathbf{elif}\;y.re \leq -4.5 \cdot 10^{-79}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y.re \leq -4.5 \cdot 10^{-205}:\\ \;\;\;\;\left(y.im \cdot \log \left(x.re \cdot x.re + x.im \cdot x.im\right)\right) \cdot 0.5\\ \mathbf{elif}\;y.re \leq 1.28 \cdot 10^{-21}:\\ \;\;\;\;\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1 \cdot {\left(0 - x.im\right)}^{y.re}\\ \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 (sin t_0)))
   (if (<= y.re -48.0)
     (*
      t_0
      (pow (* x.im (+ (* (* x.re 0.5) (/ x.re (* x.im x.im))) 1.0)) y.re))
     (if (<= y.re -4.5e-79)
       t_1
       (if (<= y.re -4.5e-205)
         (* (* y.im (log (+ (* x.re x.re) (* x.im x.im)))) 0.5)
         (if (<= y.re 1.28e-21)
           (sin (* y.im (log (hypot x.im x.re))))
           (* t_1 (pow (- 0.0 x.im) y.re))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
	double t_0 = y_46_re * atan2(x_46_im, x_46_re);
	double t_1 = sin(t_0);
	double tmp;
	if (y_46_re <= -48.0) {
		tmp = t_0 * pow((x_46_im * (((x_46_re * 0.5) * (x_46_re / (x_46_im * x_46_im))) + 1.0)), y_46_re);
	} else if (y_46_re <= -4.5e-79) {
		tmp = t_1;
	} else if (y_46_re <= -4.5e-205) {
		tmp = (y_46_im * log(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * 0.5;
	} else if (y_46_re <= 1.28e-21) {
		tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re))));
	} else {
		tmp = t_1 * pow((0.0 - x_46_im), y_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 = y_46_re * Math.atan2(x_46_im, x_46_re);
	double t_1 = Math.sin(t_0);
	double tmp;
	if (y_46_re <= -48.0) {
		tmp = t_0 * Math.pow((x_46_im * (((x_46_re * 0.5) * (x_46_re / (x_46_im * x_46_im))) + 1.0)), y_46_re);
	} else if (y_46_re <= -4.5e-79) {
		tmp = t_1;
	} else if (y_46_re <= -4.5e-205) {
		tmp = (y_46_im * Math.log(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * 0.5;
	} else if (y_46_re <= 1.28e-21) {
		tmp = Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re))));
	} else {
		tmp = t_1 * Math.pow((0.0 - x_46_im), y_46_re);
	}
	return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im):
	t_0 = y_46_re * math.atan2(x_46_im, x_46_re)
	t_1 = math.sin(t_0)
	tmp = 0
	if y_46_re <= -48.0:
		tmp = t_0 * math.pow((x_46_im * (((x_46_re * 0.5) * (x_46_re / (x_46_im * x_46_im))) + 1.0)), y_46_re)
	elif y_46_re <= -4.5e-79:
		tmp = t_1
	elif y_46_re <= -4.5e-205:
		tmp = (y_46_im * math.log(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * 0.5
	elif y_46_re <= 1.28e-21:
		tmp = math.sin((y_46_im * math.log(math.hypot(x_46_im, x_46_re))))
	else:
		tmp = t_1 * math.pow((0.0 - x_46_im), y_46_re)
	return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im)
	t_0 = Float64(y_46_re * atan(x_46_im, x_46_re))
	t_1 = sin(t_0)
	tmp = 0.0
	if (y_46_re <= -48.0)
		tmp = Float64(t_0 * (Float64(x_46_im * Float64(Float64(Float64(x_46_re * 0.5) * Float64(x_46_re / Float64(x_46_im * x_46_im))) + 1.0)) ^ y_46_re));
	elseif (y_46_re <= -4.5e-79)
		tmp = t_1;
	elseif (y_46_re <= -4.5e-205)
		tmp = Float64(Float64(y_46_im * log(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) * 0.5);
	elseif (y_46_re <= 1.28e-21)
		tmp = sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re))));
	else
		tmp = Float64(t_1 * (Float64(0.0 - x_46_im) ^ y_46_re));
	end
	return tmp
end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im)
	t_0 = y_46_re * atan2(x_46_im, x_46_re);
	t_1 = sin(t_0);
	tmp = 0.0;
	if (y_46_re <= -48.0)
		tmp = t_0 * ((x_46_im * (((x_46_re * 0.5) * (x_46_re / (x_46_im * x_46_im))) + 1.0)) ^ y_46_re);
	elseif (y_46_re <= -4.5e-79)
		tmp = t_1;
	elseif (y_46_re <= -4.5e-205)
		tmp = (y_46_im * log(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * 0.5;
	elseif (y_46_re <= 1.28e-21)
		tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re))));
	else
		tmp = t_1 * ((0.0 - x_46_im) ^ y_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[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sin[t$95$0], $MachinePrecision]}, If[LessEqual[y$46$re, -48.0], N[(t$95$0 * N[Power[N[(x$46$im * N[(N[(N[(x$46$re * 0.5), $MachinePrecision] * N[(x$46$re / N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, -4.5e-79], t$95$1, If[LessEqual[y$46$re, -4.5e-205], N[(N[(y$46$im * N[Log[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * 0.5), $MachinePrecision], If[LessEqual[y$46$re, 1.28e-21], N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(t$95$1 * N[Power[N[(0.0 - x$46$im), $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := \sin t\_0\\
\mathbf{if}\;y.re \leq -48:\\
\;\;\;\;t\_0 \cdot {\left(x.im \cdot \left(\left(x.re \cdot 0.5\right) \cdot \frac{x.re}{x.im \cdot x.im} + 1\right)\right)}^{y.re}\\

\mathbf{elif}\;y.re \leq -4.5 \cdot 10^{-79}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y.re \leq -4.5 \cdot 10^{-205}:\\
\;\;\;\;\left(y.im \cdot \log \left(x.re \cdot x.re + x.im \cdot x.im\right)\right) \cdot 0.5\\

\mathbf{elif}\;y.re \leq 1.28 \cdot 10^{-21}:\\
\;\;\;\;\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\

\mathbf{else}:\\
\;\;\;\;t\_1 \cdot {\left(0 - x.im\right)}^{y.re}\\


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

    1. Initial program 30.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 \sin \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. Add Preprocessing
    3. Taylor expanded in y.im around 0

      \[\leadsto \color{blue}{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}} \]
    4. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re} \cdot \color{blue}{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}\right), \color{blue}{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\right) \]
      3. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right), y.re\right), \sin \color{blue}{\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\right) \]
      4. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right), y.re\right), \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
      5. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right), y.re\right), \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
      6. accelerator-lowering-hypot.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \sin \left(\color{blue}{y.re} \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
      7. sin-lowering-sin.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \mathsf{sin.f64}\left(\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
      9. atan2-lowering-atan2.f6482.3%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
    5. Simplified82.3%

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

      \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\color{blue}{\left(x.im \cdot \left(1 + \frac{1}{2} \cdot \frac{{x.re}^{2}}{{x.im}^{2}}\right)\right)}, y.re\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
    7. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(x.im, \left(1 + \frac{1}{2} \cdot \frac{{x.re}^{2}}{{x.im}^{2}}\right)\right), y.re\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\color{blue}{y.re}, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
      2. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(x.im, \mathsf{+.f64}\left(1, \left(\frac{1}{2} \cdot \frac{{x.re}^{2}}{{x.im}^{2}}\right)\right)\right), y.re\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
      3. associate-*r/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(x.im, \mathsf{+.f64}\left(1, \left(\frac{\frac{1}{2} \cdot {x.re}^{2}}{{x.im}^{2}}\right)\right)\right), y.re\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(x.im, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{1}{2} \cdot {x.re}^{2}\right), \left({x.im}^{2}\right)\right)\right)\right), y.re\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(x.im, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \left({x.re}^{2}\right)\right), \left({x.im}^{2}\right)\right)\right)\right), y.re\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
      6. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(x.im, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \left(x.re \cdot x.re\right)\right), \left({x.im}^{2}\right)\right)\right)\right), y.re\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(x.im, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(x.re, x.re\right)\right), \left({x.im}^{2}\right)\right)\right)\right), y.re\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
      8. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(x.im, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(x.re, x.re\right)\right), \left(x.im \cdot x.im\right)\right)\right)\right), y.re\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
      9. *-lowering-*.f6457.4%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(x.im, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(x.re, x.re\right)\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
    8. Simplified57.4%

      \[\leadsto {\color{blue}{\left(x.im \cdot \left(1 + \frac{0.5 \cdot \left(x.re \cdot x.re\right)}{x.im \cdot x.im}\right)\right)}}^{y.re} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
    9. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(x.im, \mathsf{+.f64}\left(1, \left(\frac{\left(\frac{1}{2} \cdot x.re\right) \cdot x.re}{x.im \cdot x.im}\right)\right)\right), y.re\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
      2. associate-/l*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(x.im, \mathsf{+.f64}\left(1, \left(\left(\frac{1}{2} \cdot x.re\right) \cdot \frac{x.re}{x.im \cdot x.im}\right)\right)\right), y.re\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(x.im, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(\frac{1}{2} \cdot x.re\right), \left(\frac{x.re}{x.im \cdot x.im}\right)\right)\right)\right), y.re\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
      4. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(x.im, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(x.re \cdot \frac{1}{2}\right), \left(\frac{x.re}{x.im \cdot x.im}\right)\right)\right)\right), y.re\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(x.im, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x.re, \frac{1}{2}\right), \left(\frac{x.re}{x.im \cdot x.im}\right)\right)\right)\right), y.re\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(x.im, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x.re, \frac{1}{2}\right), \mathsf{/.f64}\left(x.re, \left(x.im \cdot x.im\right)\right)\right)\right)\right), y.re\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
      7. *-lowering-*.f6473.6%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(x.im, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x.re, \frac{1}{2}\right), \mathsf{/.f64}\left(x.re, \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right)\right), y.re\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
    10. Applied egg-rr73.6%

      \[\leadsto {\left(x.im \cdot \left(1 + \color{blue}{\left(x.re \cdot 0.5\right) \cdot \frac{x.re}{x.im \cdot x.im}}\right)\right)}^{y.re} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
    11. Taylor expanded in y.re around 0

      \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(x.im, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x.re, \frac{1}{2}\right), \mathsf{/.f64}\left(x.re, \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right)\right), y.re\right), \color{blue}{\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\right) \]
    12. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(x.im, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x.re, \frac{1}{2}\right), \mathsf{/.f64}\left(x.re, \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(y.re, \color{blue}{\tan^{-1}_* \frac{x.im}{x.re}}\right)\right) \]
      2. atan2-lowering-atan2.f6471.8%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(x.im, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x.re, \frac{1}{2}\right), \mathsf{/.f64}\left(x.re, \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, \color{blue}{x.re}\right)\right)\right) \]
    13. Simplified71.8%

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

    if -48 < y.re < -4.5000000000000003e-79

    1. Initial program 37.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 \sin \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. Add Preprocessing
    3. Taylor expanded in y.im around 0

      \[\leadsto \color{blue}{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}} \]
    4. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re} \cdot \color{blue}{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}\right), \color{blue}{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\right) \]
      3. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right), y.re\right), \sin \color{blue}{\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\right) \]
      4. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right), y.re\right), \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
      5. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right), y.re\right), \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
      6. accelerator-lowering-hypot.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \sin \left(\color{blue}{y.re} \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
      7. sin-lowering-sin.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \mathsf{sin.f64}\left(\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
      9. atan2-lowering-atan2.f6455.0%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
    5. Simplified55.0%

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

      \[\leadsto \mathsf{*.f64}\left(\color{blue}{1}, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
    7. Step-by-step derivation
      1. Simplified54.2%

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

      if -4.5000000000000003e-79 < y.re < -4.49999999999999956e-205

      1. Initial program 46.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 \sin \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. Add Preprocessing
      3. Taylor expanded in y.im around 0

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

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

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

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

        \[\leadsto \color{blue}{y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)} \]
      7. Step-by-step derivation
        1. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(y.im, \color{blue}{\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}\right) \]
        2. log-lowering-log.f64N/A

          \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right) \]
        3. unpow2N/A

          \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right)\right)\right) \]
        4. unpow2N/A

          \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)\right)\right) \]
        5. accelerator-lowering-hypot.f6426.2%

          \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right) \]
      8. Simplified26.2%

        \[\leadsto \color{blue}{y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)} \]
      9. Step-by-step derivation
        1. pow1/2N/A

          \[\leadsto y.im \cdot \log \left({\left(x.im \cdot x.im + x.re \cdot x.re\right)}^{\frac{1}{2}}\right) \]
        2. +-commutativeN/A

          \[\leadsto y.im \cdot \log \left({\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\frac{1}{2}}\right) \]
        3. log-powN/A

          \[\leadsto y.im \cdot \left(\frac{1}{2} \cdot \color{blue}{\log \left(x.re \cdot x.re + x.im \cdot x.im\right)}\right) \]
        4. *-commutativeN/A

          \[\leadsto y.im \cdot \left(\log \left(x.re \cdot x.re + x.im \cdot x.im\right) \cdot \color{blue}{\frac{1}{2}}\right) \]
        5. associate-*r*N/A

          \[\leadsto \left(y.im \cdot \log \left(x.re \cdot x.re + x.im \cdot x.im\right)\right) \cdot \color{blue}{\frac{1}{2}} \]
        6. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\left(y.im \cdot \log \left(x.re \cdot x.re + x.im \cdot x.im\right)\right), \color{blue}{\frac{1}{2}}\right) \]
        7. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(y.im, \log \left(x.re \cdot x.re + x.im \cdot x.im\right)\right), \frac{1}{2}\right) \]
        8. log-lowering-log.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(x.re \cdot x.re + x.im \cdot x.im\right)\right)\right), \frac{1}{2}\right) \]
        9. +-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(x.im \cdot x.im + x.re \cdot x.re\right)\right)\right), \frac{1}{2}\right) \]
        10. +-lowering-+.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{+.f64}\left(\left(x.im \cdot x.im\right), \left(x.re \cdot x.re\right)\right)\right)\right), \frac{1}{2}\right) \]
        11. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \left(x.re \cdot x.re\right)\right)\right)\right), \frac{1}{2}\right) \]
        12. *-lowering-*.f6441.4%

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \mathsf{*.f64}\left(x.re, x.re\right)\right)\right)\right), \frac{1}{2}\right) \]
      10. Applied egg-rr41.4%

        \[\leadsto \color{blue}{\left(y.im \cdot \log \left(x.im \cdot x.im + x.re \cdot x.re\right)\right) \cdot 0.5} \]

      if -4.49999999999999956e-205 < y.re < 1.27999999999999995e-21

      1. Initial program 40.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 \sin \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. Add Preprocessing
      3. Taylor expanded in y.re around 0

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \color{blue}{\sin \left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)}\right) \]
      4. Step-by-step derivation
        1. sin-lowering-sin.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{sin.f64}\left(\left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right)\right) \]
        2. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right)\right) \]
        3. log-lowering-log.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right)\right)\right) \]
        4. unpow2N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right)\right)\right)\right)\right) \]
        5. unpow2N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)\right)\right)\right)\right) \]
        6. accelerator-lowering-hypot.f6440.7%

          \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right)\right) \]
      5. Simplified40.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}{\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)} \]
      6. Taylor expanded in y.im around 0

        \[\leadsto \mathsf{*.f64}\left(\color{blue}{\left({\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}\right)}, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right)\right) \]
      7. Step-by-step derivation
        1. pow-lowering-pow.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right), y.re\right), \mathsf{sin.f64}\left(\color{blue}{\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)}\right)\right) \]
        2. unpow2N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right), y.re\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right)\right) \]
        3. unpow2N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right), y.re\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right)\right) \]
        4. accelerator-lowering-hypot.f6434.5%

          \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\color{blue}{y.im}, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right)\right) \]
      8. Simplified34.5%

        \[\leadsto \color{blue}{{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}} \cdot \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \]
      9. Taylor expanded in y.re around 0

        \[\leadsto \color{blue}{\sin \left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)} \]
      10. Step-by-step derivation
        1. sin-lowering-sin.f64N/A

          \[\leadsto \mathsf{sin.f64}\left(\left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right) \]
        2. *-lowering-*.f64N/A

          \[\leadsto \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right) \]
        3. log-lowering-log.f64N/A

          \[\leadsto \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right)\right) \]
        4. unpow2N/A

          \[\leadsto \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right)\right)\right)\right) \]
        5. unpow2N/A

          \[\leadsto \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)\right)\right)\right) \]
        6. accelerator-lowering-hypot.f6434.5%

          \[\leadsto \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right) \]
      11. Simplified34.5%

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

      if 1.27999999999999995e-21 < y.re

      1. Initial program 39.5%

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

        \[\leadsto \color{blue}{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}} \]
      4. Step-by-step derivation
        1. *-commutativeN/A

          \[\leadsto {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re} \cdot \color{blue}{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
        2. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\left({\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}\right), \color{blue}{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\right) \]
        3. pow-lowering-pow.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right), y.re\right), \sin \color{blue}{\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\right) \]
        4. unpow2N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right), y.re\right), \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
        5. unpow2N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right), y.re\right), \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
        6. accelerator-lowering-hypot.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \sin \left(\color{blue}{y.re} \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
        7. sin-lowering-sin.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \mathsf{sin.f64}\left(\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
        8. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
        9. atan2-lowering-atan2.f6455.8%

          \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
      5. Simplified55.8%

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\color{blue}{\left(-1 \cdot x.im\right)}, y.re\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
      7. Step-by-step derivation
        1. mul-1-negN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\mathsf{neg}\left(x.im\right)\right), y.re\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\color{blue}{y.re}, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
        2. neg-lowering-neg.f6452.7%

          \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{neg.f64}\left(x.im\right), y.re\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\color{blue}{y.re}, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
      8. Simplified52.7%

        \[\leadsto {\color{blue}{\left(-x.im\right)}}^{y.re} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
    8. Recombined 5 regimes into one program.
    9. Final simplification49.8%

      \[\leadsto \begin{array}{l} \mathbf{if}\;y.re \leq -48:\\ \;\;\;\;\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(x.im \cdot \left(\left(x.re \cdot 0.5\right) \cdot \frac{x.re}{x.im \cdot x.im} + 1\right)\right)}^{y.re}\\ \mathbf{elif}\;y.re \leq -4.5 \cdot 10^{-79}:\\ \;\;\;\;\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\ \mathbf{elif}\;y.re \leq -4.5 \cdot 10^{-205}:\\ \;\;\;\;\left(y.im \cdot \log \left(x.re \cdot x.re + x.im \cdot x.im\right)\right) \cdot 0.5\\ \mathbf{elif}\;y.re \leq 1.28 \cdot 10^{-21}:\\ \;\;\;\;\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(0 - x.im\right)}^{y.re}\\ \end{array} \]
    10. Add Preprocessing

    Alternative 13: 46.3% accurate, 2.5× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\ t_1 := \sin t\_0\\ \mathbf{if}\;y.re \leq -48:\\ \;\;\;\;t\_0 \cdot {\left(x.im \cdot \left(\left(x.re \cdot 0.5\right) \cdot \frac{x.re}{x.im \cdot x.im} + 1\right)\right)}^{y.re}\\ \mathbf{elif}\;y.re \leq -5 \cdot 10^{-79}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y.re \leq -5 \cdot 10^{-208}:\\ \;\;\;\;\left(y.im \cdot \log \left(x.re \cdot x.re + x.im \cdot x.im\right)\right) \cdot 0.5\\ \mathbf{elif}\;y.re \leq 4 \cdot 10^{-31}:\\ \;\;\;\;\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1 \cdot {x.im}^{y.re}\\ \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 (sin t_0)))
       (if (<= y.re -48.0)
         (*
          t_0
          (pow (* x.im (+ (* (* x.re 0.5) (/ x.re (* x.im x.im))) 1.0)) y.re))
         (if (<= y.re -5e-79)
           t_1
           (if (<= y.re -5e-208)
             (* (* y.im (log (+ (* x.re x.re) (* x.im x.im)))) 0.5)
             (if (<= y.re 4e-31)
               (sin (* y.im (log (hypot x.im x.re))))
               (* t_1 (pow x.im y.re))))))))
    double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
    	double t_0 = y_46_re * atan2(x_46_im, x_46_re);
    	double t_1 = sin(t_0);
    	double tmp;
    	if (y_46_re <= -48.0) {
    		tmp = t_0 * pow((x_46_im * (((x_46_re * 0.5) * (x_46_re / (x_46_im * x_46_im))) + 1.0)), y_46_re);
    	} else if (y_46_re <= -5e-79) {
    		tmp = t_1;
    	} else if (y_46_re <= -5e-208) {
    		tmp = (y_46_im * log(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * 0.5;
    	} else if (y_46_re <= 4e-31) {
    		tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re))));
    	} else {
    		tmp = t_1 * pow(x_46_im, y_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 = y_46_re * Math.atan2(x_46_im, x_46_re);
    	double t_1 = Math.sin(t_0);
    	double tmp;
    	if (y_46_re <= -48.0) {
    		tmp = t_0 * Math.pow((x_46_im * (((x_46_re * 0.5) * (x_46_re / (x_46_im * x_46_im))) + 1.0)), y_46_re);
    	} else if (y_46_re <= -5e-79) {
    		tmp = t_1;
    	} else if (y_46_re <= -5e-208) {
    		tmp = (y_46_im * Math.log(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * 0.5;
    	} else if (y_46_re <= 4e-31) {
    		tmp = Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re))));
    	} else {
    		tmp = t_1 * Math.pow(x_46_im, y_46_re);
    	}
    	return tmp;
    }
    
    def code(x_46_re, x_46_im, y_46_re, y_46_im):
    	t_0 = y_46_re * math.atan2(x_46_im, x_46_re)
    	t_1 = math.sin(t_0)
    	tmp = 0
    	if y_46_re <= -48.0:
    		tmp = t_0 * math.pow((x_46_im * (((x_46_re * 0.5) * (x_46_re / (x_46_im * x_46_im))) + 1.0)), y_46_re)
    	elif y_46_re <= -5e-79:
    		tmp = t_1
    	elif y_46_re <= -5e-208:
    		tmp = (y_46_im * math.log(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * 0.5
    	elif y_46_re <= 4e-31:
    		tmp = math.sin((y_46_im * math.log(math.hypot(x_46_im, x_46_re))))
    	else:
    		tmp = t_1 * math.pow(x_46_im, y_46_re)
    	return tmp
    
    function code(x_46_re, x_46_im, y_46_re, y_46_im)
    	t_0 = Float64(y_46_re * atan(x_46_im, x_46_re))
    	t_1 = sin(t_0)
    	tmp = 0.0
    	if (y_46_re <= -48.0)
    		tmp = Float64(t_0 * (Float64(x_46_im * Float64(Float64(Float64(x_46_re * 0.5) * Float64(x_46_re / Float64(x_46_im * x_46_im))) + 1.0)) ^ y_46_re));
    	elseif (y_46_re <= -5e-79)
    		tmp = t_1;
    	elseif (y_46_re <= -5e-208)
    		tmp = Float64(Float64(y_46_im * log(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) * 0.5);
    	elseif (y_46_re <= 4e-31)
    		tmp = sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re))));
    	else
    		tmp = Float64(t_1 * (x_46_im ^ y_46_re));
    	end
    	return tmp
    end
    
    function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im)
    	t_0 = y_46_re * atan2(x_46_im, x_46_re);
    	t_1 = sin(t_0);
    	tmp = 0.0;
    	if (y_46_re <= -48.0)
    		tmp = t_0 * ((x_46_im * (((x_46_re * 0.5) * (x_46_re / (x_46_im * x_46_im))) + 1.0)) ^ y_46_re);
    	elseif (y_46_re <= -5e-79)
    		tmp = t_1;
    	elseif (y_46_re <= -5e-208)
    		tmp = (y_46_im * log(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * 0.5;
    	elseif (y_46_re <= 4e-31)
    		tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re))));
    	else
    		tmp = t_1 * (x_46_im ^ y_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[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sin[t$95$0], $MachinePrecision]}, If[LessEqual[y$46$re, -48.0], N[(t$95$0 * N[Power[N[(x$46$im * N[(N[(N[(x$46$re * 0.5), $MachinePrecision] * N[(x$46$re / N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, -5e-79], t$95$1, If[LessEqual[y$46$re, -5e-208], N[(N[(y$46$im * N[Log[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * 0.5), $MachinePrecision], If[LessEqual[y$46$re, 4e-31], N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(t$95$1 * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision]]]]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
    t_1 := \sin t\_0\\
    \mathbf{if}\;y.re \leq -48:\\
    \;\;\;\;t\_0 \cdot {\left(x.im \cdot \left(\left(x.re \cdot 0.5\right) \cdot \frac{x.re}{x.im \cdot x.im} + 1\right)\right)}^{y.re}\\
    
    \mathbf{elif}\;y.re \leq -5 \cdot 10^{-79}:\\
    \;\;\;\;t\_1\\
    
    \mathbf{elif}\;y.re \leq -5 \cdot 10^{-208}:\\
    \;\;\;\;\left(y.im \cdot \log \left(x.re \cdot x.re + x.im \cdot x.im\right)\right) \cdot 0.5\\
    
    \mathbf{elif}\;y.re \leq 4 \cdot 10^{-31}:\\
    \;\;\;\;\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_1 \cdot {x.im}^{y.re}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 5 regimes
    2. if y.re < -48

      1. Initial program 30.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 \sin \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. Add Preprocessing
      3. Taylor expanded in y.im around 0

        \[\leadsto \color{blue}{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}} \]
      4. Step-by-step derivation
        1. *-commutativeN/A

          \[\leadsto {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re} \cdot \color{blue}{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
        2. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\left({\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}\right), \color{blue}{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\right) \]
        3. pow-lowering-pow.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right), y.re\right), \sin \color{blue}{\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\right) \]
        4. unpow2N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right), y.re\right), \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
        5. unpow2N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right), y.re\right), \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
        6. accelerator-lowering-hypot.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \sin \left(\color{blue}{y.re} \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
        7. sin-lowering-sin.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \mathsf{sin.f64}\left(\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
        8. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
        9. atan2-lowering-atan2.f6482.3%

          \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
      5. Simplified82.3%

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\color{blue}{\left(x.im \cdot \left(1 + \frac{1}{2} \cdot \frac{{x.re}^{2}}{{x.im}^{2}}\right)\right)}, y.re\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
      7. Step-by-step derivation
        1. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(x.im, \left(1 + \frac{1}{2} \cdot \frac{{x.re}^{2}}{{x.im}^{2}}\right)\right), y.re\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\color{blue}{y.re}, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
        2. +-lowering-+.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(x.im, \mathsf{+.f64}\left(1, \left(\frac{1}{2} \cdot \frac{{x.re}^{2}}{{x.im}^{2}}\right)\right)\right), y.re\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
        3. associate-*r/N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(x.im, \mathsf{+.f64}\left(1, \left(\frac{\frac{1}{2} \cdot {x.re}^{2}}{{x.im}^{2}}\right)\right)\right), y.re\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
        4. /-lowering-/.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(x.im, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{1}{2} \cdot {x.re}^{2}\right), \left({x.im}^{2}\right)\right)\right)\right), y.re\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
        5. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(x.im, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \left({x.re}^{2}\right)\right), \left({x.im}^{2}\right)\right)\right)\right), y.re\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
        6. unpow2N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(x.im, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \left(x.re \cdot x.re\right)\right), \left({x.im}^{2}\right)\right)\right)\right), y.re\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
        7. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(x.im, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(x.re, x.re\right)\right), \left({x.im}^{2}\right)\right)\right)\right), y.re\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
        8. unpow2N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(x.im, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(x.re, x.re\right)\right), \left(x.im \cdot x.im\right)\right)\right)\right), y.re\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
        9. *-lowering-*.f6457.4%

          \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(x.im, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(x.re, x.re\right)\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
      8. Simplified57.4%

        \[\leadsto {\color{blue}{\left(x.im \cdot \left(1 + \frac{0.5 \cdot \left(x.re \cdot x.re\right)}{x.im \cdot x.im}\right)\right)}}^{y.re} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
      9. Step-by-step derivation
        1. associate-*r*N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(x.im, \mathsf{+.f64}\left(1, \left(\frac{\left(\frac{1}{2} \cdot x.re\right) \cdot x.re}{x.im \cdot x.im}\right)\right)\right), y.re\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
        2. associate-/l*N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(x.im, \mathsf{+.f64}\left(1, \left(\left(\frac{1}{2} \cdot x.re\right) \cdot \frac{x.re}{x.im \cdot x.im}\right)\right)\right), y.re\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
        3. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(x.im, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(\frac{1}{2} \cdot x.re\right), \left(\frac{x.re}{x.im \cdot x.im}\right)\right)\right)\right), y.re\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
        4. *-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(x.im, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(x.re \cdot \frac{1}{2}\right), \left(\frac{x.re}{x.im \cdot x.im}\right)\right)\right)\right), y.re\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
        5. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(x.im, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x.re, \frac{1}{2}\right), \left(\frac{x.re}{x.im \cdot x.im}\right)\right)\right)\right), y.re\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
        6. /-lowering-/.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(x.im, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x.re, \frac{1}{2}\right), \mathsf{/.f64}\left(x.re, \left(x.im \cdot x.im\right)\right)\right)\right)\right), y.re\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
        7. *-lowering-*.f6473.6%

          \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(x.im, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x.re, \frac{1}{2}\right), \mathsf{/.f64}\left(x.re, \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right)\right), y.re\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
      10. Applied egg-rr73.6%

        \[\leadsto {\left(x.im \cdot \left(1 + \color{blue}{\left(x.re \cdot 0.5\right) \cdot \frac{x.re}{x.im \cdot x.im}}\right)\right)}^{y.re} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
      11. Taylor expanded in y.re around 0

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(x.im, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x.re, \frac{1}{2}\right), \mathsf{/.f64}\left(x.re, \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right)\right), y.re\right), \color{blue}{\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\right) \]
      12. Step-by-step derivation
        1. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(x.im, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x.re, \frac{1}{2}\right), \mathsf{/.f64}\left(x.re, \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(y.re, \color{blue}{\tan^{-1}_* \frac{x.im}{x.re}}\right)\right) \]
        2. atan2-lowering-atan2.f6471.8%

          \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(x.im, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x.re, \frac{1}{2}\right), \mathsf{/.f64}\left(x.re, \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, \color{blue}{x.re}\right)\right)\right) \]
      13. Simplified71.8%

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

      if -48 < y.re < -4.99999999999999999e-79

      1. Initial program 37.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 \sin \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. Add Preprocessing
      3. Taylor expanded in y.im around 0

        \[\leadsto \color{blue}{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}} \]
      4. Step-by-step derivation
        1. *-commutativeN/A

          \[\leadsto {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re} \cdot \color{blue}{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
        2. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\left({\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}\right), \color{blue}{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\right) \]
        3. pow-lowering-pow.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right), y.re\right), \sin \color{blue}{\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\right) \]
        4. unpow2N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right), y.re\right), \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
        5. unpow2N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right), y.re\right), \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
        6. accelerator-lowering-hypot.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \sin \left(\color{blue}{y.re} \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
        7. sin-lowering-sin.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \mathsf{sin.f64}\left(\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
        8. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
        9. atan2-lowering-atan2.f6455.0%

          \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
      5. Simplified55.0%

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

        \[\leadsto \mathsf{*.f64}\left(\color{blue}{1}, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
      7. Step-by-step derivation
        1. Simplified54.2%

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

        if -4.99999999999999999e-79 < y.re < -4.99999999999999963e-208

        1. Initial program 46.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 \sin \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. Add Preprocessing
        3. Taylor expanded in y.im around 0

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

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

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

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

          \[\leadsto \color{blue}{y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)} \]
        7. Step-by-step derivation
          1. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(y.im, \color{blue}{\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}\right) \]
          2. log-lowering-log.f64N/A

            \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right) \]
          3. unpow2N/A

            \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right)\right)\right) \]
          4. unpow2N/A

            \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)\right)\right) \]
          5. accelerator-lowering-hypot.f6426.2%

            \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right) \]
        8. Simplified26.2%

          \[\leadsto \color{blue}{y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)} \]
        9. Step-by-step derivation
          1. pow1/2N/A

            \[\leadsto y.im \cdot \log \left({\left(x.im \cdot x.im + x.re \cdot x.re\right)}^{\frac{1}{2}}\right) \]
          2. +-commutativeN/A

            \[\leadsto y.im \cdot \log \left({\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\frac{1}{2}}\right) \]
          3. log-powN/A

            \[\leadsto y.im \cdot \left(\frac{1}{2} \cdot \color{blue}{\log \left(x.re \cdot x.re + x.im \cdot x.im\right)}\right) \]
          4. *-commutativeN/A

            \[\leadsto y.im \cdot \left(\log \left(x.re \cdot x.re + x.im \cdot x.im\right) \cdot \color{blue}{\frac{1}{2}}\right) \]
          5. associate-*r*N/A

            \[\leadsto \left(y.im \cdot \log \left(x.re \cdot x.re + x.im \cdot x.im\right)\right) \cdot \color{blue}{\frac{1}{2}} \]
          6. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\left(y.im \cdot \log \left(x.re \cdot x.re + x.im \cdot x.im\right)\right), \color{blue}{\frac{1}{2}}\right) \]
          7. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(y.im, \log \left(x.re \cdot x.re + x.im \cdot x.im\right)\right), \frac{1}{2}\right) \]
          8. log-lowering-log.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(x.re \cdot x.re + x.im \cdot x.im\right)\right)\right), \frac{1}{2}\right) \]
          9. +-commutativeN/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(x.im \cdot x.im + x.re \cdot x.re\right)\right)\right), \frac{1}{2}\right) \]
          10. +-lowering-+.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{+.f64}\left(\left(x.im \cdot x.im\right), \left(x.re \cdot x.re\right)\right)\right)\right), \frac{1}{2}\right) \]
          11. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \left(x.re \cdot x.re\right)\right)\right)\right), \frac{1}{2}\right) \]
          12. *-lowering-*.f6441.4%

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \mathsf{*.f64}\left(x.re, x.re\right)\right)\right)\right), \frac{1}{2}\right) \]
        10. Applied egg-rr41.4%

          \[\leadsto \color{blue}{\left(y.im \cdot \log \left(x.im \cdot x.im + x.re \cdot x.re\right)\right) \cdot 0.5} \]

        if -4.99999999999999963e-208 < y.re < 4e-31

        1. Initial program 41.4%

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

          \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \color{blue}{\sin \left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)}\right) \]
        4. Step-by-step derivation
          1. sin-lowering-sin.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{sin.f64}\left(\left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right)\right) \]
          2. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right)\right) \]
          3. log-lowering-log.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right)\right)\right) \]
          4. unpow2N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right)\right)\right)\right)\right) \]
          5. unpow2N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)\right)\right)\right)\right) \]
          6. accelerator-lowering-hypot.f6441.6%

            \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right)\right) \]
        5. Simplified41.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}{\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)} \]
        6. Taylor expanded in y.im around 0

          \[\leadsto \mathsf{*.f64}\left(\color{blue}{\left({\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}\right)}, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right)\right) \]
        7. Step-by-step derivation
          1. pow-lowering-pow.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right), y.re\right), \mathsf{sin.f64}\left(\color{blue}{\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)}\right)\right) \]
          2. unpow2N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right), y.re\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right)\right) \]
          3. unpow2N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right), y.re\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right)\right) \]
          4. accelerator-lowering-hypot.f6435.3%

            \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\color{blue}{y.im}, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right)\right) \]
        8. Simplified35.3%

          \[\leadsto \color{blue}{{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}} \cdot \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \]
        9. Taylor expanded in y.re around 0

          \[\leadsto \color{blue}{\sin \left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)} \]
        10. Step-by-step derivation
          1. sin-lowering-sin.f64N/A

            \[\leadsto \mathsf{sin.f64}\left(\left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right) \]
          2. *-lowering-*.f64N/A

            \[\leadsto \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right) \]
          3. log-lowering-log.f64N/A

            \[\leadsto \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right)\right) \]
          4. unpow2N/A

            \[\leadsto \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right)\right)\right)\right) \]
          5. unpow2N/A

            \[\leadsto \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)\right)\right)\right) \]
          6. accelerator-lowering-hypot.f6435.3%

            \[\leadsto \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right) \]
        11. Simplified35.3%

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

        if 4e-31 < y.re

        1. Initial program 38.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 \sin \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. Add Preprocessing
        3. Taylor expanded in y.im around 0

          \[\leadsto \color{blue}{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}} \]
        4. Step-by-step derivation
          1. *-commutativeN/A

            \[\leadsto {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re} \cdot \color{blue}{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
          2. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\left({\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}\right), \color{blue}{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\right) \]
          3. pow-lowering-pow.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right), y.re\right), \sin \color{blue}{\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\right) \]
          4. unpow2N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right), y.re\right), \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
          5. unpow2N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right), y.re\right), \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
          6. accelerator-lowering-hypot.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \sin \left(\color{blue}{y.re} \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
          7. sin-lowering-sin.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \mathsf{sin.f64}\left(\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
          8. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
          9. atan2-lowering-atan2.f6455.6%

            \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
        5. Simplified55.6%

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

          \[\leadsto \mathsf{*.f64}\left(\color{blue}{\left({x.im}^{y.re}\right)}, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
        7. Step-by-step derivation
          1. pow-lowering-pow.f6449.7%

            \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(x.im, y.re\right), \mathsf{sin.f64}\left(\color{blue}{\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)}\right)\right) \]
        8. Simplified49.7%

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;y.re \leq -48:\\ \;\;\;\;\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(x.im \cdot \left(\left(x.re \cdot 0.5\right) \cdot \frac{x.re}{x.im \cdot x.im} + 1\right)\right)}^{y.re}\\ \mathbf{elif}\;y.re \leq -5 \cdot 10^{-79}:\\ \;\;\;\;\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\ \mathbf{elif}\;y.re \leq -5 \cdot 10^{-208}:\\ \;\;\;\;\left(y.im \cdot \log \left(x.re \cdot x.re + x.im \cdot x.im\right)\right) \cdot 0.5\\ \mathbf{elif}\;y.re \leq 4 \cdot 10^{-31}:\\ \;\;\;\;\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {x.im}^{y.re}\\ \end{array} \]
      10. Add Preprocessing

      Alternative 14: 44.9% accurate, 2.6× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\ t_1 := t\_0 \cdot {\left(x.im \cdot \left(\left(x.re \cdot 0.5\right) \cdot \frac{x.re}{x.im \cdot x.im} + 1\right)\right)}^{y.re}\\ \mathbf{if}\;y.re \leq -48:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y.re \leq -4.6 \cdot 10^{-79}:\\ \;\;\;\;\sin t\_0\\ \mathbf{elif}\;y.re \leq -3 \cdot 10^{-205}:\\ \;\;\;\;\left(y.im \cdot \log \left(x.re \cdot x.re + x.im \cdot x.im\right)\right) \cdot 0.5\\ \mathbf{elif}\;y.re \leq 7 \cdot 10^{-27}:\\ \;\;\;\;\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
      (FPCore (x.re x.im y.re y.im)
       :precision binary64
       (let* ((t_0 (* y.re (atan2 x.im x.re)))
              (t_1
               (*
                t_0
                (pow
                 (* x.im (+ (* (* x.re 0.5) (/ x.re (* x.im x.im))) 1.0))
                 y.re))))
         (if (<= y.re -48.0)
           t_1
           (if (<= y.re -4.6e-79)
             (sin t_0)
             (if (<= y.re -3e-205)
               (* (* y.im (log (+ (* x.re x.re) (* x.im x.im)))) 0.5)
               (if (<= y.re 7e-27) (sin (* 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 = y_46_re * atan2(x_46_im, x_46_re);
      	double t_1 = t_0 * pow((x_46_im * (((x_46_re * 0.5) * (x_46_re / (x_46_im * x_46_im))) + 1.0)), y_46_re);
      	double tmp;
      	if (y_46_re <= -48.0) {
      		tmp = t_1;
      	} else if (y_46_re <= -4.6e-79) {
      		tmp = sin(t_0);
      	} else if (y_46_re <= -3e-205) {
      		tmp = (y_46_im * log(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * 0.5;
      	} else if (y_46_re <= 7e-27) {
      		tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re))));
      	} else {
      		tmp = t_1;
      	}
      	return tmp;
      }
      
      public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
      	double t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
      	double t_1 = t_0 * Math.pow((x_46_im * (((x_46_re * 0.5) * (x_46_re / (x_46_im * x_46_im))) + 1.0)), y_46_re);
      	double tmp;
      	if (y_46_re <= -48.0) {
      		tmp = t_1;
      	} else if (y_46_re <= -4.6e-79) {
      		tmp = Math.sin(t_0);
      	} else if (y_46_re <= -3e-205) {
      		tmp = (y_46_im * Math.log(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * 0.5;
      	} else if (y_46_re <= 7e-27) {
      		tmp = Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re))));
      	} else {
      		tmp = t_1;
      	}
      	return tmp;
      }
      
      def code(x_46_re, x_46_im, y_46_re, y_46_im):
      	t_0 = y_46_re * math.atan2(x_46_im, x_46_re)
      	t_1 = t_0 * math.pow((x_46_im * (((x_46_re * 0.5) * (x_46_re / (x_46_im * x_46_im))) + 1.0)), y_46_re)
      	tmp = 0
      	if y_46_re <= -48.0:
      		tmp = t_1
      	elif y_46_re <= -4.6e-79:
      		tmp = math.sin(t_0)
      	elif y_46_re <= -3e-205:
      		tmp = (y_46_im * math.log(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * 0.5
      	elif y_46_re <= 7e-27:
      		tmp = math.sin((y_46_im * math.log(math.hypot(x_46_im, x_46_re))))
      	else:
      		tmp = t_1
      	return tmp
      
      function code(x_46_re, x_46_im, y_46_re, y_46_im)
      	t_0 = Float64(y_46_re * atan(x_46_im, x_46_re))
      	t_1 = Float64(t_0 * (Float64(x_46_im * Float64(Float64(Float64(x_46_re * 0.5) * Float64(x_46_re / Float64(x_46_im * x_46_im))) + 1.0)) ^ y_46_re))
      	tmp = 0.0
      	if (y_46_re <= -48.0)
      		tmp = t_1;
      	elseif (y_46_re <= -4.6e-79)
      		tmp = sin(t_0);
      	elseif (y_46_re <= -3e-205)
      		tmp = Float64(Float64(y_46_im * log(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) * 0.5);
      	elseif (y_46_re <= 7e-27)
      		tmp = sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re))));
      	else
      		tmp = t_1;
      	end
      	return tmp
      end
      
      function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im)
      	t_0 = y_46_re * atan2(x_46_im, x_46_re);
      	t_1 = t_0 * ((x_46_im * (((x_46_re * 0.5) * (x_46_re / (x_46_im * x_46_im))) + 1.0)) ^ y_46_re);
      	tmp = 0.0;
      	if (y_46_re <= -48.0)
      		tmp = t_1;
      	elseif (y_46_re <= -4.6e-79)
      		tmp = sin(t_0);
      	elseif (y_46_re <= -3e-205)
      		tmp = (y_46_im * log(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * 0.5;
      	elseif (y_46_re <= 7e-27)
      		tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re))));
      	else
      		tmp = t_1;
      	end
      	tmp_2 = tmp;
      end
      
      code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(t$95$0 * N[Power[N[(x$46$im * N[(N[(N[(x$46$re * 0.5), $MachinePrecision] * N[(x$46$re / N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -48.0], t$95$1, If[LessEqual[y$46$re, -4.6e-79], N[Sin[t$95$0], $MachinePrecision], If[LessEqual[y$46$re, -3e-205], N[(N[(y$46$im * N[Log[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * 0.5), $MachinePrecision], If[LessEqual[y$46$re, 7e-27], N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], t$95$1]]]]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
      t_1 := t\_0 \cdot {\left(x.im \cdot \left(\left(x.re \cdot 0.5\right) \cdot \frac{x.re}{x.im \cdot x.im} + 1\right)\right)}^{y.re}\\
      \mathbf{if}\;y.re \leq -48:\\
      \;\;\;\;t\_1\\
      
      \mathbf{elif}\;y.re \leq -4.6 \cdot 10^{-79}:\\
      \;\;\;\;\sin t\_0\\
      
      \mathbf{elif}\;y.re \leq -3 \cdot 10^{-205}:\\
      \;\;\;\;\left(y.im \cdot \log \left(x.re \cdot x.re + x.im \cdot x.im\right)\right) \cdot 0.5\\
      
      \mathbf{elif}\;y.re \leq 7 \cdot 10^{-27}:\\
      \;\;\;\;\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
      
      \mathbf{else}:\\
      \;\;\;\;t\_1\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 4 regimes
      2. if y.re < -48 or 7.0000000000000003e-27 < y.re

        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 \sin \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. Add Preprocessing
        3. Taylor expanded in y.im around 0

          \[\leadsto \color{blue}{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}} \]
        4. Step-by-step derivation
          1. *-commutativeN/A

            \[\leadsto {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re} \cdot \color{blue}{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
          2. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\left({\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}\right), \color{blue}{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\right) \]
          3. pow-lowering-pow.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right), y.re\right), \sin \color{blue}{\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\right) \]
          4. unpow2N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right), y.re\right), \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
          5. unpow2N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right), y.re\right), \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
          6. accelerator-lowering-hypot.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \sin \left(\color{blue}{y.re} \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
          7. sin-lowering-sin.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \mathsf{sin.f64}\left(\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
          8. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
          9. atan2-lowering-atan2.f6468.0%

            \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
        5. Simplified68.0%

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

          \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\color{blue}{\left(x.im \cdot \left(1 + \frac{1}{2} \cdot \frac{{x.re}^{2}}{{x.im}^{2}}\right)\right)}, y.re\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
        7. Step-by-step derivation
          1. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(x.im, \left(1 + \frac{1}{2} \cdot \frac{{x.re}^{2}}{{x.im}^{2}}\right)\right), y.re\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\color{blue}{y.re}, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
          2. +-lowering-+.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(x.im, \mathsf{+.f64}\left(1, \left(\frac{1}{2} \cdot \frac{{x.re}^{2}}{{x.im}^{2}}\right)\right)\right), y.re\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
          3. associate-*r/N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(x.im, \mathsf{+.f64}\left(1, \left(\frac{\frac{1}{2} \cdot {x.re}^{2}}{{x.im}^{2}}\right)\right)\right), y.re\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
          4. /-lowering-/.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(x.im, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{1}{2} \cdot {x.re}^{2}\right), \left({x.im}^{2}\right)\right)\right)\right), y.re\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
          5. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(x.im, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \left({x.re}^{2}\right)\right), \left({x.im}^{2}\right)\right)\right)\right), y.re\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
          6. unpow2N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(x.im, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \left(x.re \cdot x.re\right)\right), \left({x.im}^{2}\right)\right)\right)\right), y.re\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
          7. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(x.im, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(x.re, x.re\right)\right), \left({x.im}^{2}\right)\right)\right)\right), y.re\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
          8. unpow2N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(x.im, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(x.re, x.re\right)\right), \left(x.im \cdot x.im\right)\right)\right)\right), y.re\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
          9. *-lowering-*.f6449.0%

            \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(x.im, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(x.re, x.re\right)\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
        8. Simplified49.0%

          \[\leadsto {\color{blue}{\left(x.im \cdot \left(1 + \frac{0.5 \cdot \left(x.re \cdot x.re\right)}{x.im \cdot x.im}\right)\right)}}^{y.re} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
        9. Step-by-step derivation
          1. associate-*r*N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(x.im, \mathsf{+.f64}\left(1, \left(\frac{\left(\frac{1}{2} \cdot x.re\right) \cdot x.re}{x.im \cdot x.im}\right)\right)\right), y.re\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
          2. associate-/l*N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(x.im, \mathsf{+.f64}\left(1, \left(\left(\frac{1}{2} \cdot x.re\right) \cdot \frac{x.re}{x.im \cdot x.im}\right)\right)\right), y.re\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
          3. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(x.im, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(\frac{1}{2} \cdot x.re\right), \left(\frac{x.re}{x.im \cdot x.im}\right)\right)\right)\right), y.re\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
          4. *-commutativeN/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(x.im, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(x.re \cdot \frac{1}{2}\right), \left(\frac{x.re}{x.im \cdot x.im}\right)\right)\right)\right), y.re\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
          5. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(x.im, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x.re, \frac{1}{2}\right), \left(\frac{x.re}{x.im \cdot x.im}\right)\right)\right)\right), y.re\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
          6. /-lowering-/.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(x.im, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x.re, \frac{1}{2}\right), \mathsf{/.f64}\left(x.re, \left(x.im \cdot x.im\right)\right)\right)\right)\right), y.re\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
          7. *-lowering-*.f6457.4%

            \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(x.im, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x.re, \frac{1}{2}\right), \mathsf{/.f64}\left(x.re, \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right)\right), y.re\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
        10. Applied egg-rr57.4%

          \[\leadsto {\left(x.im \cdot \left(1 + \color{blue}{\left(x.re \cdot 0.5\right) \cdot \frac{x.re}{x.im \cdot x.im}}\right)\right)}^{y.re} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
        11. Taylor expanded in y.re around 0

          \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(x.im, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x.re, \frac{1}{2}\right), \mathsf{/.f64}\left(x.re, \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right)\right), y.re\right), \color{blue}{\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\right) \]
        12. Step-by-step derivation
          1. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(x.im, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x.re, \frac{1}{2}\right), \mathsf{/.f64}\left(x.re, \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(y.re, \color{blue}{\tan^{-1}_* \frac{x.im}{x.re}}\right)\right) \]
          2. atan2-lowering-atan2.f6454.1%

            \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(x.im, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x.re, \frac{1}{2}\right), \mathsf{/.f64}\left(x.re, \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, \color{blue}{x.re}\right)\right)\right) \]
        13. Simplified54.1%

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

        if -48 < y.re < -4.60000000000000023e-79

        1. Initial program 37.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 \sin \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. Add Preprocessing
        3. Taylor expanded in y.im around 0

          \[\leadsto \color{blue}{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}} \]
        4. Step-by-step derivation
          1. *-commutativeN/A

            \[\leadsto {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re} \cdot \color{blue}{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
          2. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\left({\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}\right), \color{blue}{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\right) \]
          3. pow-lowering-pow.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right), y.re\right), \sin \color{blue}{\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\right) \]
          4. unpow2N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right), y.re\right), \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
          5. unpow2N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right), y.re\right), \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
          6. accelerator-lowering-hypot.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \sin \left(\color{blue}{y.re} \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
          7. sin-lowering-sin.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \mathsf{sin.f64}\left(\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
          8. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
          9. atan2-lowering-atan2.f6455.0%

            \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
        5. Simplified55.0%

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

          \[\leadsto \mathsf{*.f64}\left(\color{blue}{1}, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
        7. Step-by-step derivation
          1. Simplified54.2%

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

          if -4.60000000000000023e-79 < y.re < -3e-205

          1. Initial program 46.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 \sin \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. Add Preprocessing
          3. Taylor expanded in y.im around 0

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

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

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

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

            \[\leadsto \color{blue}{y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)} \]
          7. Step-by-step derivation
            1. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(y.im, \color{blue}{\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}\right) \]
            2. log-lowering-log.f64N/A

              \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right) \]
            3. unpow2N/A

              \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right)\right)\right) \]
            4. unpow2N/A

              \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)\right)\right) \]
            5. accelerator-lowering-hypot.f6426.2%

              \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right) \]
          8. Simplified26.2%

            \[\leadsto \color{blue}{y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)} \]
          9. Step-by-step derivation
            1. pow1/2N/A

              \[\leadsto y.im \cdot \log \left({\left(x.im \cdot x.im + x.re \cdot x.re\right)}^{\frac{1}{2}}\right) \]
            2. +-commutativeN/A

              \[\leadsto y.im \cdot \log \left({\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\frac{1}{2}}\right) \]
            3. log-powN/A

              \[\leadsto y.im \cdot \left(\frac{1}{2} \cdot \color{blue}{\log \left(x.re \cdot x.re + x.im \cdot x.im\right)}\right) \]
            4. *-commutativeN/A

              \[\leadsto y.im \cdot \left(\log \left(x.re \cdot x.re + x.im \cdot x.im\right) \cdot \color{blue}{\frac{1}{2}}\right) \]
            5. associate-*r*N/A

              \[\leadsto \left(y.im \cdot \log \left(x.re \cdot x.re + x.im \cdot x.im\right)\right) \cdot \color{blue}{\frac{1}{2}} \]
            6. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\left(y.im \cdot \log \left(x.re \cdot x.re + x.im \cdot x.im\right)\right), \color{blue}{\frac{1}{2}}\right) \]
            7. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(y.im, \log \left(x.re \cdot x.re + x.im \cdot x.im\right)\right), \frac{1}{2}\right) \]
            8. log-lowering-log.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(x.re \cdot x.re + x.im \cdot x.im\right)\right)\right), \frac{1}{2}\right) \]
            9. +-commutativeN/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(x.im \cdot x.im + x.re \cdot x.re\right)\right)\right), \frac{1}{2}\right) \]
            10. +-lowering-+.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{+.f64}\left(\left(x.im \cdot x.im\right), \left(x.re \cdot x.re\right)\right)\right)\right), \frac{1}{2}\right) \]
            11. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \left(x.re \cdot x.re\right)\right)\right)\right), \frac{1}{2}\right) \]
            12. *-lowering-*.f6441.4%

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \mathsf{*.f64}\left(x.re, x.re\right)\right)\right)\right), \frac{1}{2}\right) \]
          10. Applied egg-rr41.4%

            \[\leadsto \color{blue}{\left(y.im \cdot \log \left(x.im \cdot x.im + x.re \cdot x.re\right)\right) \cdot 0.5} \]

          if -3e-205 < y.re < 7.0000000000000003e-27

          1. Initial program 41.4%

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

            \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \color{blue}{\sin \left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)}\right) \]
          4. Step-by-step derivation
            1. sin-lowering-sin.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{sin.f64}\left(\left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right)\right) \]
            2. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right)\right) \]
            3. log-lowering-log.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right)\right)\right) \]
            4. unpow2N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right)\right)\right)\right)\right) \]
            5. unpow2N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)\right)\right)\right)\right) \]
            6. accelerator-lowering-hypot.f6441.6%

              \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right)\right) \]
          5. Simplified41.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}{\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)} \]
          6. Taylor expanded in y.im around 0

            \[\leadsto \mathsf{*.f64}\left(\color{blue}{\left({\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}\right)}, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right)\right) \]
          7. Step-by-step derivation
            1. pow-lowering-pow.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right), y.re\right), \mathsf{sin.f64}\left(\color{blue}{\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)}\right)\right) \]
            2. unpow2N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right), y.re\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right)\right) \]
            3. unpow2N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right), y.re\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right)\right) \]
            4. accelerator-lowering-hypot.f6435.3%

              \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\color{blue}{y.im}, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right)\right) \]
          8. Simplified35.3%

            \[\leadsto \color{blue}{{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}} \cdot \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \]
          9. Taylor expanded in y.re around 0

            \[\leadsto \color{blue}{\sin \left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)} \]
          10. Step-by-step derivation
            1. sin-lowering-sin.f64N/A

              \[\leadsto \mathsf{sin.f64}\left(\left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right) \]
            2. *-lowering-*.f64N/A

              \[\leadsto \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right) \]
            3. log-lowering-log.f64N/A

              \[\leadsto \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right)\right) \]
            4. unpow2N/A

              \[\leadsto \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right)\right)\right)\right) \]
            5. unpow2N/A

              \[\leadsto \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)\right)\right)\right) \]
            6. accelerator-lowering-hypot.f6435.3%

              \[\leadsto \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right) \]
          11. Simplified35.3%

            \[\leadsto \color{blue}{\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)} \]
        8. Recombined 4 regimes into one program.
        9. Final simplification46.7%

          \[\leadsto \begin{array}{l} \mathbf{if}\;y.re \leq -48:\\ \;\;\;\;\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(x.im \cdot \left(\left(x.re \cdot 0.5\right) \cdot \frac{x.re}{x.im \cdot x.im} + 1\right)\right)}^{y.re}\\ \mathbf{elif}\;y.re \leq -4.6 \cdot 10^{-79}:\\ \;\;\;\;\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\ \mathbf{elif}\;y.re \leq -3 \cdot 10^{-205}:\\ \;\;\;\;\left(y.im \cdot \log \left(x.re \cdot x.re + x.im \cdot x.im\right)\right) \cdot 0.5\\ \mathbf{elif}\;y.re \leq 7 \cdot 10^{-27}:\\ \;\;\;\;\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(x.im \cdot \left(\left(x.re \cdot 0.5\right) \cdot \frac{x.re}{x.im \cdot x.im} + 1\right)\right)}^{y.re}\\ \end{array} \]
        10. Add Preprocessing

        Alternative 15: 50.6% accurate, 2.6× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} t_0 := \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\ \mathbf{if}\;y.re \leq -4.5 \cdot 10^{-79}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;y.re \leq -4.5 \cdot 10^{-205}:\\ \;\;\;\;\left(y.im \cdot \log \left(x.re \cdot x.re + x.im \cdot x.im\right)\right) \cdot 0.5\\ \mathbf{elif}\;y.re \leq 4.4 \cdot 10^{-112}:\\ \;\;\;\;\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \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)) (pow (hypot x.im x.re) y.re))))
           (if (<= y.re -4.5e-79)
             t_0
             (if (<= y.re -4.5e-205)
               (* (* y.im (log (+ (* x.re x.re) (* x.im x.im)))) 0.5)
               (if (<= y.re 4.4e-112) (sin (* y.im (log (hypot x.im x.re)))) t_0)))))
        double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
        	double t_0 = (y_46_re * atan2(x_46_im, x_46_re)) * pow(hypot(x_46_im, x_46_re), y_46_re);
        	double tmp;
        	if (y_46_re <= -4.5e-79) {
        		tmp = t_0;
        	} else if (y_46_re <= -4.5e-205) {
        		tmp = (y_46_im * log(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * 0.5;
        	} else if (y_46_re <= 4.4e-112) {
        		tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re))));
        	} else {
        		tmp = t_0;
        	}
        	return tmp;
        }
        
        public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
        	double t_0 = (y_46_re * Math.atan2(x_46_im, x_46_re)) * Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
        	double tmp;
        	if (y_46_re <= -4.5e-79) {
        		tmp = t_0;
        	} else if (y_46_re <= -4.5e-205) {
        		tmp = (y_46_im * Math.log(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * 0.5;
        	} else if (y_46_re <= 4.4e-112) {
        		tmp = Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re))));
        	} else {
        		tmp = t_0;
        	}
        	return tmp;
        }
        
        def code(x_46_re, x_46_im, y_46_re, y_46_im):
        	t_0 = (y_46_re * math.atan2(x_46_im, x_46_re)) * math.pow(math.hypot(x_46_im, x_46_re), y_46_re)
        	tmp = 0
        	if y_46_re <= -4.5e-79:
        		tmp = t_0
        	elif y_46_re <= -4.5e-205:
        		tmp = (y_46_im * math.log(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * 0.5
        	elif y_46_re <= 4.4e-112:
        		tmp = math.sin((y_46_im * math.log(math.hypot(x_46_im, x_46_re))))
        	else:
        		tmp = t_0
        	return tmp
        
        function code(x_46_re, x_46_im, y_46_re, y_46_im)
        	t_0 = Float64(Float64(y_46_re * atan(x_46_im, x_46_re)) * (hypot(x_46_im, x_46_re) ^ y_46_re))
        	tmp = 0.0
        	if (y_46_re <= -4.5e-79)
        		tmp = t_0;
        	elseif (y_46_re <= -4.5e-205)
        		tmp = Float64(Float64(y_46_im * log(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) * 0.5);
        	elseif (y_46_re <= 4.4e-112)
        		tmp = sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re))));
        	else
        		tmp = t_0;
        	end
        	return tmp
        end
        
        function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im)
        	t_0 = (y_46_re * atan2(x_46_im, x_46_re)) * (hypot(x_46_im, x_46_re) ^ y_46_re);
        	tmp = 0.0;
        	if (y_46_re <= -4.5e-79)
        		tmp = t_0;
        	elseif (y_46_re <= -4.5e-205)
        		tmp = (y_46_im * log(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * 0.5;
        	elseif (y_46_re <= 4.4e-112)
        		tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re))));
        	else
        		tmp = 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[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision] * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -4.5e-79], t$95$0, If[LessEqual[y$46$re, -4.5e-205], N[(N[(y$46$im * N[Log[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * 0.5), $MachinePrecision], If[LessEqual[y$46$re, 4.4e-112], N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], t$95$0]]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        t_0 := \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
        \mathbf{if}\;y.re \leq -4.5 \cdot 10^{-79}:\\
        \;\;\;\;t\_0\\
        
        \mathbf{elif}\;y.re \leq -4.5 \cdot 10^{-205}:\\
        \;\;\;\;\left(y.im \cdot \log \left(x.re \cdot x.re + x.im \cdot x.im\right)\right) \cdot 0.5\\
        
        \mathbf{elif}\;y.re \leq 4.4 \cdot 10^{-112}:\\
        \;\;\;\;\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
        
        \mathbf{else}:\\
        \;\;\;\;t\_0\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 3 regimes
        2. if y.re < -4.5000000000000003e-79 or 4.40000000000000042e-112 < y.re

          1. Initial program 35.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 \sin \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. Add Preprocessing
          3. Taylor expanded in y.im around 0

            \[\leadsto \color{blue}{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}} \]
          4. Step-by-step derivation
            1. *-commutativeN/A

              \[\leadsto {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re} \cdot \color{blue}{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
            2. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\left({\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}\right), \color{blue}{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\right) \]
            3. pow-lowering-pow.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right), y.re\right), \sin \color{blue}{\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\right) \]
            4. unpow2N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right), y.re\right), \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
            5. unpow2N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right), y.re\right), \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
            6. accelerator-lowering-hypot.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \sin \left(\color{blue}{y.re} \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
            7. sin-lowering-sin.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \mathsf{sin.f64}\left(\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
            8. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
            9. atan2-lowering-atan2.f6459.3%

              \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
          5. Simplified59.3%

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

            \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \color{blue}{\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\right) \]
          7. Step-by-step derivation
            1. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \mathsf{*.f64}\left(y.re, \color{blue}{\tan^{-1}_* \frac{x.im}{x.re}}\right)\right) \]
            2. atan2-lowering-atan2.f6457.0%

              \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, \color{blue}{x.re}\right)\right)\right) \]
          8. Simplified57.0%

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

          if -4.5000000000000003e-79 < y.re < -4.49999999999999956e-205

          1. Initial program 46.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 \sin \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. Add Preprocessing
          3. Taylor expanded in y.im around 0

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

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

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

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

            \[\leadsto \color{blue}{y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)} \]
          7. Step-by-step derivation
            1. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(y.im, \color{blue}{\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}\right) \]
            2. log-lowering-log.f64N/A

              \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right) \]
            3. unpow2N/A

              \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right)\right)\right) \]
            4. unpow2N/A

              \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)\right)\right) \]
            5. accelerator-lowering-hypot.f6426.2%

              \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right) \]
          8. Simplified26.2%

            \[\leadsto \color{blue}{y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)} \]
          9. Step-by-step derivation
            1. pow1/2N/A

              \[\leadsto y.im \cdot \log \left({\left(x.im \cdot x.im + x.re \cdot x.re\right)}^{\frac{1}{2}}\right) \]
            2. +-commutativeN/A

              \[\leadsto y.im \cdot \log \left({\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\frac{1}{2}}\right) \]
            3. log-powN/A

              \[\leadsto y.im \cdot \left(\frac{1}{2} \cdot \color{blue}{\log \left(x.re \cdot x.re + x.im \cdot x.im\right)}\right) \]
            4. *-commutativeN/A

              \[\leadsto y.im \cdot \left(\log \left(x.re \cdot x.re + x.im \cdot x.im\right) \cdot \color{blue}{\frac{1}{2}}\right) \]
            5. associate-*r*N/A

              \[\leadsto \left(y.im \cdot \log \left(x.re \cdot x.re + x.im \cdot x.im\right)\right) \cdot \color{blue}{\frac{1}{2}} \]
            6. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\left(y.im \cdot \log \left(x.re \cdot x.re + x.im \cdot x.im\right)\right), \color{blue}{\frac{1}{2}}\right) \]
            7. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(y.im, \log \left(x.re \cdot x.re + x.im \cdot x.im\right)\right), \frac{1}{2}\right) \]
            8. log-lowering-log.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(x.re \cdot x.re + x.im \cdot x.im\right)\right)\right), \frac{1}{2}\right) \]
            9. +-commutativeN/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(x.im \cdot x.im + x.re \cdot x.re\right)\right)\right), \frac{1}{2}\right) \]
            10. +-lowering-+.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{+.f64}\left(\left(x.im \cdot x.im\right), \left(x.re \cdot x.re\right)\right)\right)\right), \frac{1}{2}\right) \]
            11. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \left(x.re \cdot x.re\right)\right)\right)\right), \frac{1}{2}\right) \]
            12. *-lowering-*.f6441.4%

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \mathsf{*.f64}\left(x.re, x.re\right)\right)\right)\right), \frac{1}{2}\right) \]
          10. Applied egg-rr41.4%

            \[\leadsto \color{blue}{\left(y.im \cdot \log \left(x.im \cdot x.im + x.re \cdot x.re\right)\right) \cdot 0.5} \]

          if -4.49999999999999956e-205 < y.re < 4.40000000000000042e-112

          1. Initial program 44.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 \sin \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. Add Preprocessing
          3. Taylor expanded in y.re around 0

            \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \color{blue}{\sin \left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)}\right) \]
          4. Step-by-step derivation
            1. sin-lowering-sin.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{sin.f64}\left(\left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right)\right) \]
            2. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right)\right) \]
            3. log-lowering-log.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right)\right)\right) \]
            4. unpow2N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right)\right)\right)\right)\right) \]
            5. unpow2N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)\right)\right)\right)\right) \]
            6. accelerator-lowering-hypot.f6448.2%

              \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right)\right) \]
          5. Simplified48.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}{\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)} \]
          6. Taylor expanded in y.im around 0

            \[\leadsto \mathsf{*.f64}\left(\color{blue}{\left({\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}\right)}, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right)\right) \]
          7. Step-by-step derivation
            1. pow-lowering-pow.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right), y.re\right), \mathsf{sin.f64}\left(\color{blue}{\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)}\right)\right) \]
            2. unpow2N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right), y.re\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right)\right) \]
            3. unpow2N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right), y.re\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right)\right) \]
            4. accelerator-lowering-hypot.f6444.3%

              \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\color{blue}{y.im}, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right)\right) \]
          8. Simplified44.3%

            \[\leadsto \color{blue}{{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}} \cdot \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \]
          9. Taylor expanded in y.re around 0

            \[\leadsto \color{blue}{\sin \left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)} \]
          10. Step-by-step derivation
            1. sin-lowering-sin.f64N/A

              \[\leadsto \mathsf{sin.f64}\left(\left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right) \]
            2. *-lowering-*.f64N/A

              \[\leadsto \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right) \]
            3. log-lowering-log.f64N/A

              \[\leadsto \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right)\right) \]
            4. unpow2N/A

              \[\leadsto \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right)\right)\right)\right) \]
            5. unpow2N/A

              \[\leadsto \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)\right)\right)\right) \]
            6. accelerator-lowering-hypot.f6444.3%

              \[\leadsto \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right) \]
          11. Simplified44.3%

            \[\leadsto \color{blue}{\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)} \]
        3. Recombined 3 regimes into one program.
        4. Final simplification52.5%

          \[\leadsto \begin{array}{l} \mathbf{if}\;y.re \leq -4.5 \cdot 10^{-79}:\\ \;\;\;\;\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\ \mathbf{elif}\;y.re \leq -4.5 \cdot 10^{-205}:\\ \;\;\;\;\left(y.im \cdot \log \left(x.re \cdot x.re + x.im \cdot x.im\right)\right) \cdot 0.5\\ \mathbf{elif}\;y.re \leq 4.4 \cdot 10^{-112}:\\ \;\;\;\;\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\ \end{array} \]
        5. Add Preprocessing

        Alternative 16: 45.7% accurate, 3.5× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\ t_1 := t\_0 \cdot {\left(x.im \cdot \left(\left(x.re \cdot 0.5\right) \cdot \frac{x.re}{x.im \cdot x.im} + 1\right)\right)}^{y.re}\\ \mathbf{if}\;y.re \leq -48:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y.re \leq -1.25 \cdot 10^{-90}:\\ \;\;\;\;\sin t\_0\\ \mathbf{elif}\;y.re \leq 3 \cdot 10^{-31}:\\ \;\;\;\;y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
        (FPCore (x.re x.im y.re y.im)
         :precision binary64
         (let* ((t_0 (* y.re (atan2 x.im x.re)))
                (t_1
                 (*
                  t_0
                  (pow
                   (* x.im (+ (* (* x.re 0.5) (/ x.re (* x.im x.im))) 1.0))
                   y.re))))
           (if (<= y.re -48.0)
             t_1
             (if (<= y.re -1.25e-90)
               (sin t_0)
               (if (<= y.re 3e-31) (* 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 = y_46_re * atan2(x_46_im, x_46_re);
        	double t_1 = t_0 * pow((x_46_im * (((x_46_re * 0.5) * (x_46_re / (x_46_im * x_46_im))) + 1.0)), y_46_re);
        	double tmp;
        	if (y_46_re <= -48.0) {
        		tmp = t_1;
        	} else if (y_46_re <= -1.25e-90) {
        		tmp = sin(t_0);
        	} else if (y_46_re <= 3e-31) {
        		tmp = y_46_im * log(hypot(x_46_im, x_46_re));
        	} else {
        		tmp = t_1;
        	}
        	return tmp;
        }
        
        public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
        	double t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
        	double t_1 = t_0 * Math.pow((x_46_im * (((x_46_re * 0.5) * (x_46_re / (x_46_im * x_46_im))) + 1.0)), y_46_re);
        	double tmp;
        	if (y_46_re <= -48.0) {
        		tmp = t_1;
        	} else if (y_46_re <= -1.25e-90) {
        		tmp = Math.sin(t_0);
        	} else if (y_46_re <= 3e-31) {
        		tmp = y_46_im * Math.log(Math.hypot(x_46_im, x_46_re));
        	} else {
        		tmp = t_1;
        	}
        	return tmp;
        }
        
        def code(x_46_re, x_46_im, y_46_re, y_46_im):
        	t_0 = y_46_re * math.atan2(x_46_im, x_46_re)
        	t_1 = t_0 * math.pow((x_46_im * (((x_46_re * 0.5) * (x_46_re / (x_46_im * x_46_im))) + 1.0)), y_46_re)
        	tmp = 0
        	if y_46_re <= -48.0:
        		tmp = t_1
        	elif y_46_re <= -1.25e-90:
        		tmp = math.sin(t_0)
        	elif y_46_re <= 3e-31:
        		tmp = y_46_im * math.log(math.hypot(x_46_im, x_46_re))
        	else:
        		tmp = t_1
        	return tmp
        
        function code(x_46_re, x_46_im, y_46_re, y_46_im)
        	t_0 = Float64(y_46_re * atan(x_46_im, x_46_re))
        	t_1 = Float64(t_0 * (Float64(x_46_im * Float64(Float64(Float64(x_46_re * 0.5) * Float64(x_46_re / Float64(x_46_im * x_46_im))) + 1.0)) ^ y_46_re))
        	tmp = 0.0
        	if (y_46_re <= -48.0)
        		tmp = t_1;
        	elseif (y_46_re <= -1.25e-90)
        		tmp = sin(t_0);
        	elseif (y_46_re <= 3e-31)
        		tmp = Float64(y_46_im * log(hypot(x_46_im, x_46_re)));
        	else
        		tmp = t_1;
        	end
        	return tmp
        end
        
        function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im)
        	t_0 = y_46_re * atan2(x_46_im, x_46_re);
        	t_1 = t_0 * ((x_46_im * (((x_46_re * 0.5) * (x_46_re / (x_46_im * x_46_im))) + 1.0)) ^ y_46_re);
        	tmp = 0.0;
        	if (y_46_re <= -48.0)
        		tmp = t_1;
        	elseif (y_46_re <= -1.25e-90)
        		tmp = sin(t_0);
        	elseif (y_46_re <= 3e-31)
        		tmp = y_46_im * log(hypot(x_46_im, x_46_re));
        	else
        		tmp = t_1;
        	end
        	tmp_2 = tmp;
        end
        
        code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(t$95$0 * N[Power[N[(x$46$im * N[(N[(N[(x$46$re * 0.5), $MachinePrecision] * N[(x$46$re / N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -48.0], t$95$1, If[LessEqual[y$46$re, -1.25e-90], N[Sin[t$95$0], $MachinePrecision], If[LessEqual[y$46$re, 3e-31], N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
        t_1 := t\_0 \cdot {\left(x.im \cdot \left(\left(x.re \cdot 0.5\right) \cdot \frac{x.re}{x.im \cdot x.im} + 1\right)\right)}^{y.re}\\
        \mathbf{if}\;y.re \leq -48:\\
        \;\;\;\;t\_1\\
        
        \mathbf{elif}\;y.re \leq -1.25 \cdot 10^{-90}:\\
        \;\;\;\;\sin t\_0\\
        
        \mathbf{elif}\;y.re \leq 3 \cdot 10^{-31}:\\
        \;\;\;\;y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
        
        \mathbf{else}:\\
        \;\;\;\;t\_1\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 3 regimes
        2. if y.re < -48 or 2.99999999999999981e-31 < y.re

          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 \sin \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. Add Preprocessing
          3. Taylor expanded in y.im around 0

            \[\leadsto \color{blue}{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}} \]
          4. Step-by-step derivation
            1. *-commutativeN/A

              \[\leadsto {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re} \cdot \color{blue}{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
            2. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\left({\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}\right), \color{blue}{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\right) \]
            3. pow-lowering-pow.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right), y.re\right), \sin \color{blue}{\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\right) \]
            4. unpow2N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right), y.re\right), \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
            5. unpow2N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right), y.re\right), \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
            6. accelerator-lowering-hypot.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \sin \left(\color{blue}{y.re} \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
            7. sin-lowering-sin.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \mathsf{sin.f64}\left(\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
            8. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
            9. atan2-lowering-atan2.f6468.0%

              \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
          5. Simplified68.0%

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

            \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\color{blue}{\left(x.im \cdot \left(1 + \frac{1}{2} \cdot \frac{{x.re}^{2}}{{x.im}^{2}}\right)\right)}, y.re\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
          7. Step-by-step derivation
            1. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(x.im, \left(1 + \frac{1}{2} \cdot \frac{{x.re}^{2}}{{x.im}^{2}}\right)\right), y.re\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\color{blue}{y.re}, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
            2. +-lowering-+.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(x.im, \mathsf{+.f64}\left(1, \left(\frac{1}{2} \cdot \frac{{x.re}^{2}}{{x.im}^{2}}\right)\right)\right), y.re\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
            3. associate-*r/N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(x.im, \mathsf{+.f64}\left(1, \left(\frac{\frac{1}{2} \cdot {x.re}^{2}}{{x.im}^{2}}\right)\right)\right), y.re\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
            4. /-lowering-/.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(x.im, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{1}{2} \cdot {x.re}^{2}\right), \left({x.im}^{2}\right)\right)\right)\right), y.re\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
            5. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(x.im, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \left({x.re}^{2}\right)\right), \left({x.im}^{2}\right)\right)\right)\right), y.re\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
            6. unpow2N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(x.im, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \left(x.re \cdot x.re\right)\right), \left({x.im}^{2}\right)\right)\right)\right), y.re\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
            7. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(x.im, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(x.re, x.re\right)\right), \left({x.im}^{2}\right)\right)\right)\right), y.re\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
            8. unpow2N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(x.im, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(x.re, x.re\right)\right), \left(x.im \cdot x.im\right)\right)\right)\right), y.re\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
            9. *-lowering-*.f6449.0%

              \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(x.im, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(x.re, x.re\right)\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
          8. Simplified49.0%

            \[\leadsto {\color{blue}{\left(x.im \cdot \left(1 + \frac{0.5 \cdot \left(x.re \cdot x.re\right)}{x.im \cdot x.im}\right)\right)}}^{y.re} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
          9. Step-by-step derivation
            1. associate-*r*N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(x.im, \mathsf{+.f64}\left(1, \left(\frac{\left(\frac{1}{2} \cdot x.re\right) \cdot x.re}{x.im \cdot x.im}\right)\right)\right), y.re\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
            2. associate-/l*N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(x.im, \mathsf{+.f64}\left(1, \left(\left(\frac{1}{2} \cdot x.re\right) \cdot \frac{x.re}{x.im \cdot x.im}\right)\right)\right), y.re\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
            3. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(x.im, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(\frac{1}{2} \cdot x.re\right), \left(\frac{x.re}{x.im \cdot x.im}\right)\right)\right)\right), y.re\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
            4. *-commutativeN/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(x.im, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(x.re \cdot \frac{1}{2}\right), \left(\frac{x.re}{x.im \cdot x.im}\right)\right)\right)\right), y.re\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
            5. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(x.im, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x.re, \frac{1}{2}\right), \left(\frac{x.re}{x.im \cdot x.im}\right)\right)\right)\right), y.re\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
            6. /-lowering-/.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(x.im, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x.re, \frac{1}{2}\right), \mathsf{/.f64}\left(x.re, \left(x.im \cdot x.im\right)\right)\right)\right)\right), y.re\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
            7. *-lowering-*.f6457.4%

              \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(x.im, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x.re, \frac{1}{2}\right), \mathsf{/.f64}\left(x.re, \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right)\right), y.re\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
          10. Applied egg-rr57.4%

            \[\leadsto {\left(x.im \cdot \left(1 + \color{blue}{\left(x.re \cdot 0.5\right) \cdot \frac{x.re}{x.im \cdot x.im}}\right)\right)}^{y.re} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
          11. Taylor expanded in y.re around 0

            \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(x.im, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x.re, \frac{1}{2}\right), \mathsf{/.f64}\left(x.re, \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right)\right), y.re\right), \color{blue}{\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\right) \]
          12. Step-by-step derivation
            1. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(x.im, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x.re, \frac{1}{2}\right), \mathsf{/.f64}\left(x.re, \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(y.re, \color{blue}{\tan^{-1}_* \frac{x.im}{x.re}}\right)\right) \]
            2. atan2-lowering-atan2.f6454.1%

              \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(x.im, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(x.re, \frac{1}{2}\right), \mathsf{/.f64}\left(x.re, \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, \color{blue}{x.re}\right)\right)\right) \]
          13. Simplified54.1%

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

          if -48 < y.re < -1.25000000000000005e-90

          1. Initial program 40.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 \sin \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. Add Preprocessing
          3. Taylor expanded in y.im around 0

            \[\leadsto \color{blue}{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}} \]
          4. Step-by-step derivation
            1. *-commutativeN/A

              \[\leadsto {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re} \cdot \color{blue}{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
            2. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\left({\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}\right), \color{blue}{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\right) \]
            3. pow-lowering-pow.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right), y.re\right), \sin \color{blue}{\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\right) \]
            4. unpow2N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right), y.re\right), \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
            5. unpow2N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right), y.re\right), \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
            6. accelerator-lowering-hypot.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \sin \left(\color{blue}{y.re} \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
            7. sin-lowering-sin.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \mathsf{sin.f64}\left(\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
            8. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
            9. atan2-lowering-atan2.f6452.7%

              \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
          5. Simplified52.7%

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

            \[\leadsto \mathsf{*.f64}\left(\color{blue}{1}, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
          7. Step-by-step derivation
            1. Simplified52.0%

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

            if -1.25000000000000005e-90 < y.re < 2.99999999999999981e-31

            1. Initial program 42.1%

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

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

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

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

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

              \[\leadsto \color{blue}{y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)} \]
            7. Step-by-step derivation
              1. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(y.im, \color{blue}{\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}\right) \]
              2. log-lowering-log.f64N/A

                \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right) \]
              3. unpow2N/A

                \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right)\right)\right) \]
              4. unpow2N/A

                \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)\right)\right) \]
              5. accelerator-lowering-hypot.f6432.9%

                \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right) \]
            8. Simplified32.9%

              \[\leadsto \color{blue}{y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)} \]
          8. Recombined 3 regimes into one program.
          9. Final simplification44.9%

            \[\leadsto \begin{array}{l} \mathbf{if}\;y.re \leq -48:\\ \;\;\;\;\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(x.im \cdot \left(\left(x.re \cdot 0.5\right) \cdot \frac{x.re}{x.im \cdot x.im} + 1\right)\right)}^{y.re}\\ \mathbf{elif}\;y.re \leq -1.25 \cdot 10^{-90}:\\ \;\;\;\;\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\ \mathbf{elif}\;y.re \leq 3 \cdot 10^{-31}:\\ \;\;\;\;y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(x.im \cdot \left(\left(x.re \cdot 0.5\right) \cdot \frac{x.re}{x.im \cdot x.im} + 1\right)\right)}^{y.re}\\ \end{array} \]
          10. Add Preprocessing

          Alternative 17: 33.1% accurate, 3.6× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} t_0 := x.re \cdot x.re + x.im \cdot x.im\\ \mathbf{if}\;y.re \leq -210000:\\ \;\;\;\;{x.re}^{y.re} \cdot \left(y.im \cdot \log x.re\right)\\ \mathbf{elif}\;y.re \leq -1.52 \cdot 10^{-90}:\\ \;\;\;\;\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\ \mathbf{elif}\;y.re \leq 6.5 \cdot 10^{-97}:\\ \;\;\;\;y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\ \mathbf{else}:\\ \;\;\;\;y.im \cdot \log \left({\left(t\_0 \cdot t\_0\right)}^{0.25}\right)\\ \end{array} \end{array} \]
          (FPCore (x.re x.im y.re y.im)
           :precision binary64
           (let* ((t_0 (+ (* x.re x.re) (* x.im x.im))))
             (if (<= y.re -210000.0)
               (* (pow x.re y.re) (* y.im (log x.re)))
               (if (<= y.re -1.52e-90)
                 (sin (* y.re (atan2 x.im x.re)))
                 (if (<= y.re 6.5e-97)
                   (* y.im (log (hypot x.im x.re)))
                   (* y.im (log (pow (* t_0 t_0) 0.25))))))))
          double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
          	double t_0 = (x_46_re * x_46_re) + (x_46_im * x_46_im);
          	double tmp;
          	if (y_46_re <= -210000.0) {
          		tmp = pow(x_46_re, y_46_re) * (y_46_im * log(x_46_re));
          	} else if (y_46_re <= -1.52e-90) {
          		tmp = sin((y_46_re * atan2(x_46_im, x_46_re)));
          	} else if (y_46_re <= 6.5e-97) {
          		tmp = y_46_im * log(hypot(x_46_im, x_46_re));
          	} else {
          		tmp = y_46_im * log(pow((t_0 * t_0), 0.25));
          	}
          	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 = (x_46_re * x_46_re) + (x_46_im * x_46_im);
          	double tmp;
          	if (y_46_re <= -210000.0) {
          		tmp = Math.pow(x_46_re, y_46_re) * (y_46_im * Math.log(x_46_re));
          	} else if (y_46_re <= -1.52e-90) {
          		tmp = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
          	} else if (y_46_re <= 6.5e-97) {
          		tmp = y_46_im * Math.log(Math.hypot(x_46_im, x_46_re));
          	} else {
          		tmp = y_46_im * Math.log(Math.pow((t_0 * t_0), 0.25));
          	}
          	return tmp;
          }
          
          def code(x_46_re, x_46_im, y_46_re, y_46_im):
          	t_0 = (x_46_re * x_46_re) + (x_46_im * x_46_im)
          	tmp = 0
          	if y_46_re <= -210000.0:
          		tmp = math.pow(x_46_re, y_46_re) * (y_46_im * math.log(x_46_re))
          	elif y_46_re <= -1.52e-90:
          		tmp = math.sin((y_46_re * math.atan2(x_46_im, x_46_re)))
          	elif y_46_re <= 6.5e-97:
          		tmp = y_46_im * math.log(math.hypot(x_46_im, x_46_re))
          	else:
          		tmp = y_46_im * math.log(math.pow((t_0 * t_0), 0.25))
          	return tmp
          
          function code(x_46_re, x_46_im, y_46_re, y_46_im)
          	t_0 = Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))
          	tmp = 0.0
          	if (y_46_re <= -210000.0)
          		tmp = Float64((x_46_re ^ y_46_re) * Float64(y_46_im * log(x_46_re)));
          	elseif (y_46_re <= -1.52e-90)
          		tmp = sin(Float64(y_46_re * atan(x_46_im, x_46_re)));
          	elseif (y_46_re <= 6.5e-97)
          		tmp = Float64(y_46_im * log(hypot(x_46_im, x_46_re)));
          	else
          		tmp = Float64(y_46_im * log((Float64(t_0 * t_0) ^ 0.25)));
          	end
          	return tmp
          end
          
          function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im)
          	t_0 = (x_46_re * x_46_re) + (x_46_im * x_46_im);
          	tmp = 0.0;
          	if (y_46_re <= -210000.0)
          		tmp = (x_46_re ^ y_46_re) * (y_46_im * log(x_46_re));
          	elseif (y_46_re <= -1.52e-90)
          		tmp = sin((y_46_re * atan2(x_46_im, x_46_re)));
          	elseif (y_46_re <= 6.5e-97)
          		tmp = y_46_im * log(hypot(x_46_im, x_46_re));
          	else
          		tmp = y_46_im * log(((t_0 * t_0) ^ 0.25));
          	end
          	tmp_2 = tmp;
          end
          
          code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -210000.0], N[(N[Power[x$46$re, y$46$re], $MachinePrecision] * N[(y$46$im * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, -1.52e-90], N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[y$46$re, 6.5e-97], N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(y$46$im * N[Log[N[Power[N[(t$95$0 * t$95$0), $MachinePrecision], 0.25], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          t_0 := x.re \cdot x.re + x.im \cdot x.im\\
          \mathbf{if}\;y.re \leq -210000:\\
          \;\;\;\;{x.re}^{y.re} \cdot \left(y.im \cdot \log x.re\right)\\
          
          \mathbf{elif}\;y.re \leq -1.52 \cdot 10^{-90}:\\
          \;\;\;\;\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
          
          \mathbf{elif}\;y.re \leq 6.5 \cdot 10^{-97}:\\
          \;\;\;\;y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
          
          \mathbf{else}:\\
          \;\;\;\;y.im \cdot \log \left({\left(t\_0 \cdot t\_0\right)}^{0.25}\right)\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 4 regimes
          2. if y.re < -2.1e5

            1. Initial program 29.1%

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

              \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \color{blue}{\sin \left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)}\right) \]
            4. Step-by-step derivation
              1. sin-lowering-sin.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{sin.f64}\left(\left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right)\right) \]
              2. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right)\right) \]
              3. log-lowering-log.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right)\right)\right) \]
              4. unpow2N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right)\right)\right)\right)\right) \]
              5. unpow2N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)\right)\right)\right)\right) \]
              6. accelerator-lowering-hypot.f6483.8%

                \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right)\right) \]
            5. Simplified83.8%

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

              \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \color{blue}{\left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)}\right) \]
            7. Step-by-step derivation
              1. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{*.f64}\left(y.im, \color{blue}{\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}\right)\right) \]
              2. log-lowering-log.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right)\right) \]
              3. unpow2N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right)\right)\right)\right) \]
              4. unpow2N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)\right)\right)\right) \]
              5. accelerator-lowering-hypot.f6483.8%

                \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right) \]
            8. Simplified83.8%

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

              \[\leadsto \color{blue}{y.im \cdot \left(e^{y.re \cdot \log x.re - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \log x.re\right)} \]
            10. Step-by-step derivation
              1. *-lowering-*.f64N/A

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

                \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\left(e^{y.re \cdot \log x.re - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\right), \color{blue}{\log x.re}\right)\right) \]
              3. exp-lowering-exp.f64N/A

                \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\left(y.re \cdot \log x.re - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right), \log \color{blue}{x.re}\right)\right) \]
              4. --lowering--.f64N/A

                \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\left(y.re \cdot \log x.re\right), \left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right), \log x.re\right)\right) \]
              5. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(y.re, \log x.re\right), \left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right), \log x.re\right)\right) \]
              6. log-lowering-log.f64N/A

                \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{log.f64}\left(x.re\right)\right), \left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right), \log x.re\right)\right) \]
              7. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{log.f64}\left(x.re\right)\right), \mathsf{*.f64}\left(y.im, \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right), \log x.re\right)\right) \]
              8. atan2-lowering-atan2.f64N/A

                \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{log.f64}\left(x.re\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right), \log x.re\right)\right) \]
              9. log-lowering-log.f6436.4%

                \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{log.f64}\left(x.re\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right), \mathsf{log.f64}\left(x.re\right)\right)\right) \]
            11. Simplified36.4%

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

              \[\leadsto \color{blue}{y.im \cdot \left(\log x.re \cdot {x.re}^{y.re}\right)} \]
            13. Step-by-step derivation
              1. associate-*r*N/A

                \[\leadsto \left(y.im \cdot \log x.re\right) \cdot \color{blue}{{x.re}^{y.re}} \]
              2. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\left(y.im \cdot \log x.re\right), \color{blue}{\left({x.re}^{y.re}\right)}\right) \]
              3. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(y.im, \log x.re\right), \left({\color{blue}{x.re}}^{y.re}\right)\right) \]
              4. log-lowering-log.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(x.re\right)\right), \left({x.re}^{y.re}\right)\right) \]
              5. pow-lowering-pow.f6434.6%

                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(x.re\right)\right), \mathsf{pow.f64}\left(x.re, \color{blue}{y.re}\right)\right) \]
            14. Simplified34.6%

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

            if -2.1e5 < y.re < -1.51999999999999991e-90

            1. Initial program 42.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 \sin \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. Add Preprocessing
            3. Taylor expanded in y.im around 0

              \[\leadsto \color{blue}{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}} \]
            4. Step-by-step derivation
              1. *-commutativeN/A

                \[\leadsto {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re} \cdot \color{blue}{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
              2. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\left({\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}\right), \color{blue}{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\right) \]
              3. pow-lowering-pow.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right), y.re\right), \sin \color{blue}{\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\right) \]
              4. unpow2N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right), y.re\right), \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
              5. unpow2N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right), y.re\right), \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
              6. accelerator-lowering-hypot.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \sin \left(\color{blue}{y.re} \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
              7. sin-lowering-sin.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \mathsf{sin.f64}\left(\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
              8. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
              9. atan2-lowering-atan2.f6454.4%

                \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
            5. Simplified54.4%

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

              \[\leadsto \mathsf{*.f64}\left(\color{blue}{1}, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
            7. Step-by-step derivation
              1. Simplified50.3%

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

              if -1.51999999999999991e-90 < y.re < 6.5000000000000004e-97

              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 \sin \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. Add Preprocessing
              3. Taylor expanded in y.im around 0

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

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

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

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

                \[\leadsto \color{blue}{y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)} \]
              7. Step-by-step derivation
                1. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(y.im, \color{blue}{\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}\right) \]
                2. log-lowering-log.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right) \]
                3. unpow2N/A

                  \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right)\right)\right) \]
                4. unpow2N/A

                  \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)\right)\right) \]
                5. accelerator-lowering-hypot.f6437.6%

                  \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right) \]
              8. Simplified37.6%

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

              if 6.5000000000000004e-97 < y.re

              1. Initial program 38.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 \sin \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. Add Preprocessing
              3. Taylor expanded in y.im around 0

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

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

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

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

                \[\leadsto \color{blue}{y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)} \]
              7. Step-by-step derivation
                1. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(y.im, \color{blue}{\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}\right) \]
                2. log-lowering-log.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right) \]
                3. unpow2N/A

                  \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right)\right)\right) \]
                4. unpow2N/A

                  \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)\right)\right) \]
                5. accelerator-lowering-hypot.f646.0%

                  \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right) \]
              8. Simplified6.0%

                \[\leadsto \color{blue}{y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)} \]
              9. Step-by-step derivation
                1. pow1/2N/A

                  \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left({\left(x.im \cdot x.im + x.re \cdot x.re\right)}^{\frac{1}{2}}\right)\right)\right) \]
                2. +-commutativeN/A

                  \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left({\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\frac{1}{2}}\right)\right)\right) \]
                3. sqr-powN/A

                  \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left({\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\left(\frac{\frac{1}{2}}{2}\right)} \cdot {\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\left(\frac{\frac{1}{2}}{2}\right)}\right)\right)\right) \]
                4. pow-prod-downN/A

                  \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left({\left(\left(x.re \cdot x.re + x.im \cdot x.im\right) \cdot \left(x.re \cdot x.re + x.im \cdot x.im\right)\right)}^{\left(\frac{\frac{1}{2}}{2}\right)}\right)\right)\right) \]
                5. pow-lowering-pow.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{pow.f64}\left(\left(\left(x.re \cdot x.re + x.im \cdot x.im\right) \cdot \left(x.re \cdot x.re + x.im \cdot x.im\right)\right), \left(\frac{\frac{1}{2}}{2}\right)\right)\right)\right) \]
                6. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(\left(x.re \cdot x.re + x.im \cdot x.im\right), \left(x.re \cdot x.re + x.im \cdot x.im\right)\right), \left(\frac{\frac{1}{2}}{2}\right)\right)\right)\right) \]
                7. +-commutativeN/A

                  \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(\left(x.im \cdot x.im + x.re \cdot x.re\right), \left(x.re \cdot x.re + x.im \cdot x.im\right)\right), \left(\frac{\frac{1}{2}}{2}\right)\right)\right)\right) \]
                8. +-lowering-+.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\left(x.im \cdot x.im\right), \left(x.re \cdot x.re\right)\right), \left(x.re \cdot x.re + x.im \cdot x.im\right)\right), \left(\frac{\frac{1}{2}}{2}\right)\right)\right)\right) \]
                9. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \left(x.re \cdot x.re\right)\right), \left(x.re \cdot x.re + x.im \cdot x.im\right)\right), \left(\frac{\frac{1}{2}}{2}\right)\right)\right)\right) \]
                10. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \mathsf{*.f64}\left(x.re, x.re\right)\right), \left(x.re \cdot x.re + x.im \cdot x.im\right)\right), \left(\frac{\frac{1}{2}}{2}\right)\right)\right)\right) \]
                11. +-commutativeN/A

                  \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \mathsf{*.f64}\left(x.re, x.re\right)\right), \left(x.im \cdot x.im + x.re \cdot x.re\right)\right), \left(\frac{\frac{1}{2}}{2}\right)\right)\right)\right) \]
                12. +-lowering-+.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \mathsf{*.f64}\left(x.re, x.re\right)\right), \mathsf{+.f64}\left(\left(x.im \cdot x.im\right), \left(x.re \cdot x.re\right)\right)\right), \left(\frac{\frac{1}{2}}{2}\right)\right)\right)\right) \]
                13. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \mathsf{*.f64}\left(x.re, x.re\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \left(x.re \cdot x.re\right)\right)\right), \left(\frac{\frac{1}{2}}{2}\right)\right)\right)\right) \]
                14. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \mathsf{*.f64}\left(x.re, x.re\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \mathsf{*.f64}\left(x.re, x.re\right)\right)\right), \left(\frac{\frac{1}{2}}{2}\right)\right)\right)\right) \]
                15. metadata-eval29.7%

                  \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \mathsf{*.f64}\left(x.re, x.re\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \mathsf{*.f64}\left(x.re, x.re\right)\right)\right), \frac{1}{4}\right)\right)\right) \]
              10. Applied egg-rr29.7%

                \[\leadsto y.im \cdot \log \color{blue}{\left({\left(\left(x.im \cdot x.im + x.re \cdot x.re\right) \cdot \left(x.im \cdot x.im + x.re \cdot x.re\right)\right)}^{0.25}\right)} \]
            8. Recombined 4 regimes into one program.
            9. Final simplification35.6%

              \[\leadsto \begin{array}{l} \mathbf{if}\;y.re \leq -210000:\\ \;\;\;\;{x.re}^{y.re} \cdot \left(y.im \cdot \log x.re\right)\\ \mathbf{elif}\;y.re \leq -1.52 \cdot 10^{-90}:\\ \;\;\;\;\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\ \mathbf{elif}\;y.re \leq 6.5 \cdot 10^{-97}:\\ \;\;\;\;y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\ \mathbf{else}:\\ \;\;\;\;y.im \cdot \log \left({\left(\left(x.re \cdot x.re + x.im \cdot x.im\right) \cdot \left(x.re \cdot x.re + x.im \cdot x.im\right)\right)}^{0.25}\right)\\ \end{array} \]
            10. Add Preprocessing

            Alternative 18: 30.8% accurate, 3.8× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y.re \leq -210000:\\ \;\;\;\;{x.re}^{y.re} \cdot \left(y.im \cdot \log x.re\right)\\ \mathbf{elif}\;y.re \leq -5.2 \cdot 10^{-91}:\\ \;\;\;\;\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\ \mathbf{elif}\;y.re \leq 1.02 \cdot 10^{-44}:\\ \;\;\;\;y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(y.im \cdot \log \left(x.re \cdot x.re + x.im \cdot x.im\right)\right) \cdot 0.5\\ \end{array} \end{array} \]
            (FPCore (x.re x.im y.re y.im)
             :precision binary64
             (if (<= y.re -210000.0)
               (* (pow x.re y.re) (* y.im (log x.re)))
               (if (<= y.re -5.2e-91)
                 (sin (* y.re (atan2 x.im x.re)))
                 (if (<= y.re 1.02e-44)
                   (* y.im (log (hypot x.im x.re)))
                   (* (* y.im (log (+ (* x.re x.re) (* x.im x.im)))) 0.5)))))
            double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
            	double tmp;
            	if (y_46_re <= -210000.0) {
            		tmp = pow(x_46_re, y_46_re) * (y_46_im * log(x_46_re));
            	} else if (y_46_re <= -5.2e-91) {
            		tmp = sin((y_46_re * atan2(x_46_im, x_46_re)));
            	} else if (y_46_re <= 1.02e-44) {
            		tmp = y_46_im * log(hypot(x_46_im, x_46_re));
            	} else {
            		tmp = (y_46_im * log(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * 0.5;
            	}
            	return tmp;
            }
            
            public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
            	double tmp;
            	if (y_46_re <= -210000.0) {
            		tmp = Math.pow(x_46_re, y_46_re) * (y_46_im * Math.log(x_46_re));
            	} else if (y_46_re <= -5.2e-91) {
            		tmp = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
            	} else if (y_46_re <= 1.02e-44) {
            		tmp = y_46_im * Math.log(Math.hypot(x_46_im, x_46_re));
            	} else {
            		tmp = (y_46_im * Math.log(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * 0.5;
            	}
            	return tmp;
            }
            
            def code(x_46_re, x_46_im, y_46_re, y_46_im):
            	tmp = 0
            	if y_46_re <= -210000.0:
            		tmp = math.pow(x_46_re, y_46_re) * (y_46_im * math.log(x_46_re))
            	elif y_46_re <= -5.2e-91:
            		tmp = math.sin((y_46_re * math.atan2(x_46_im, x_46_re)))
            	elif y_46_re <= 1.02e-44:
            		tmp = y_46_im * math.log(math.hypot(x_46_im, x_46_re))
            	else:
            		tmp = (y_46_im * math.log(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * 0.5
            	return tmp
            
            function code(x_46_re, x_46_im, y_46_re, y_46_im)
            	tmp = 0.0
            	if (y_46_re <= -210000.0)
            		tmp = Float64((x_46_re ^ y_46_re) * Float64(y_46_im * log(x_46_re)));
            	elseif (y_46_re <= -5.2e-91)
            		tmp = sin(Float64(y_46_re * atan(x_46_im, x_46_re)));
            	elseif (y_46_re <= 1.02e-44)
            		tmp = Float64(y_46_im * log(hypot(x_46_im, x_46_re)));
            	else
            		tmp = Float64(Float64(y_46_im * log(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) * 0.5);
            	end
            	return tmp
            end
            
            function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im)
            	tmp = 0.0;
            	if (y_46_re <= -210000.0)
            		tmp = (x_46_re ^ y_46_re) * (y_46_im * log(x_46_re));
            	elseif (y_46_re <= -5.2e-91)
            		tmp = sin((y_46_re * atan2(x_46_im, x_46_re)));
            	elseif (y_46_re <= 1.02e-44)
            		tmp = y_46_im * log(hypot(x_46_im, x_46_re));
            	else
            		tmp = (y_46_im * log(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * 0.5;
            	end
            	tmp_2 = tmp;
            end
            
            code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[y$46$re, -210000.0], N[(N[Power[x$46$re, y$46$re], $MachinePrecision] * N[(y$46$im * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, -5.2e-91], N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[y$46$re, 1.02e-44], N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(y$46$im * N[Log[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * 0.5), $MachinePrecision]]]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            \mathbf{if}\;y.re \leq -210000:\\
            \;\;\;\;{x.re}^{y.re} \cdot \left(y.im \cdot \log x.re\right)\\
            
            \mathbf{elif}\;y.re \leq -5.2 \cdot 10^{-91}:\\
            \;\;\;\;\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
            
            \mathbf{elif}\;y.re \leq 1.02 \cdot 10^{-44}:\\
            \;\;\;\;y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
            
            \mathbf{else}:\\
            \;\;\;\;\left(y.im \cdot \log \left(x.re \cdot x.re + x.im \cdot x.im\right)\right) \cdot 0.5\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 4 regimes
            2. if y.re < -2.1e5

              1. Initial program 29.1%

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

                \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \color{blue}{\sin \left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)}\right) \]
              4. Step-by-step derivation
                1. sin-lowering-sin.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{sin.f64}\left(\left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right)\right) \]
                2. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right)\right) \]
                3. log-lowering-log.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right)\right)\right) \]
                4. unpow2N/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right)\right)\right)\right)\right) \]
                5. unpow2N/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)\right)\right)\right)\right) \]
                6. accelerator-lowering-hypot.f6483.8%

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right)\right) \]
              5. Simplified83.8%

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

                \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \color{blue}{\left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)}\right) \]
              7. Step-by-step derivation
                1. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{*.f64}\left(y.im, \color{blue}{\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}\right)\right) \]
                2. log-lowering-log.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right)\right) \]
                3. unpow2N/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right)\right)\right)\right) \]
                4. unpow2N/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)\right)\right)\right) \]
                5. accelerator-lowering-hypot.f6483.8%

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right)\right) \]
              8. Simplified83.8%

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

                \[\leadsto \color{blue}{y.im \cdot \left(e^{y.re \cdot \log x.re - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \log x.re\right)} \]
              10. Step-by-step derivation
                1. *-lowering-*.f64N/A

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

                  \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\left(e^{y.re \cdot \log x.re - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\right), \color{blue}{\log x.re}\right)\right) \]
                3. exp-lowering-exp.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\left(y.re \cdot \log x.re - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right), \log \color{blue}{x.re}\right)\right) \]
                4. --lowering--.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\left(y.re \cdot \log x.re\right), \left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right), \log x.re\right)\right) \]
                5. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(y.re, \log x.re\right), \left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right), \log x.re\right)\right) \]
                6. log-lowering-log.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{log.f64}\left(x.re\right)\right), \left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right), \log x.re\right)\right) \]
                7. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{log.f64}\left(x.re\right)\right), \mathsf{*.f64}\left(y.im, \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right), \log x.re\right)\right) \]
                8. atan2-lowering-atan2.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{log.f64}\left(x.re\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right), \log x.re\right)\right) \]
                9. log-lowering-log.f6436.4%

                  \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{log.f64}\left(x.re\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right), \mathsf{log.f64}\left(x.re\right)\right)\right) \]
              11. Simplified36.4%

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

                \[\leadsto \color{blue}{y.im \cdot \left(\log x.re \cdot {x.re}^{y.re}\right)} \]
              13. Step-by-step derivation
                1. associate-*r*N/A

                  \[\leadsto \left(y.im \cdot \log x.re\right) \cdot \color{blue}{{x.re}^{y.re}} \]
                2. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(\left(y.im \cdot \log x.re\right), \color{blue}{\left({x.re}^{y.re}\right)}\right) \]
                3. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(y.im, \log x.re\right), \left({\color{blue}{x.re}}^{y.re}\right)\right) \]
                4. log-lowering-log.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(x.re\right)\right), \left({x.re}^{y.re}\right)\right) \]
                5. pow-lowering-pow.f6434.6%

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(x.re\right)\right), \mathsf{pow.f64}\left(x.re, \color{blue}{y.re}\right)\right) \]
              14. Simplified34.6%

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

              if -2.1e5 < y.re < -5.20000000000000028e-91

              1. Initial program 42.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 \sin \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. Add Preprocessing
              3. Taylor expanded in y.im around 0

                \[\leadsto \color{blue}{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}} \]
              4. Step-by-step derivation
                1. *-commutativeN/A

                  \[\leadsto {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re} \cdot \color{blue}{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
                2. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(\left({\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}\right), \color{blue}{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\right) \]
                3. pow-lowering-pow.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right), y.re\right), \sin \color{blue}{\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\right) \]
                4. unpow2N/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right), y.re\right), \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
                5. unpow2N/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right), y.re\right), \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
                6. accelerator-lowering-hypot.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \sin \left(\color{blue}{y.re} \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
                7. sin-lowering-sin.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \mathsf{sin.f64}\left(\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
                8. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
                9. atan2-lowering-atan2.f6454.4%

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
              5. Simplified54.4%

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

                \[\leadsto \mathsf{*.f64}\left(\color{blue}{1}, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
              7. Step-by-step derivation
                1. Simplified50.3%

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

                if -5.20000000000000028e-91 < y.re < 1.0199999999999999e-44

                1. Initial program 42.2%

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

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

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

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

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

                  \[\leadsto \color{blue}{y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)} \]
                7. Step-by-step derivation
                  1. *-lowering-*.f64N/A

                    \[\leadsto \mathsf{*.f64}\left(y.im, \color{blue}{\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}\right) \]
                  2. log-lowering-log.f64N/A

                    \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right) \]
                  3. unpow2N/A

                    \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right)\right)\right) \]
                  4. unpow2N/A

                    \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)\right)\right) \]
                  5. accelerator-lowering-hypot.f6433.4%

                    \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right) \]
                8. Simplified33.4%

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

                if 1.0199999999999999e-44 < y.re

                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 \sin \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. Add Preprocessing
                3. Taylor expanded in y.im around 0

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

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

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

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

                  \[\leadsto \color{blue}{y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)} \]
                7. Step-by-step derivation
                  1. *-lowering-*.f64N/A

                    \[\leadsto \mathsf{*.f64}\left(y.im, \color{blue}{\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}\right) \]
                  2. log-lowering-log.f64N/A

                    \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right) \]
                  3. unpow2N/A

                    \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right)\right)\right) \]
                  4. unpow2N/A

                    \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)\right)\right) \]
                  5. accelerator-lowering-hypot.f644.1%

                    \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right) \]
                8. Simplified4.1%

                  \[\leadsto \color{blue}{y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)} \]
                9. Step-by-step derivation
                  1. pow1/2N/A

                    \[\leadsto y.im \cdot \log \left({\left(x.im \cdot x.im + x.re \cdot x.re\right)}^{\frac{1}{2}}\right) \]
                  2. +-commutativeN/A

                    \[\leadsto y.im \cdot \log \left({\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\frac{1}{2}}\right) \]
                  3. log-powN/A

                    \[\leadsto y.im \cdot \left(\frac{1}{2} \cdot \color{blue}{\log \left(x.re \cdot x.re + x.im \cdot x.im\right)}\right) \]
                  4. *-commutativeN/A

                    \[\leadsto y.im \cdot \left(\log \left(x.re \cdot x.re + x.im \cdot x.im\right) \cdot \color{blue}{\frac{1}{2}}\right) \]
                  5. associate-*r*N/A

                    \[\leadsto \left(y.im \cdot \log \left(x.re \cdot x.re + x.im \cdot x.im\right)\right) \cdot \color{blue}{\frac{1}{2}} \]
                  6. *-lowering-*.f64N/A

                    \[\leadsto \mathsf{*.f64}\left(\left(y.im \cdot \log \left(x.re \cdot x.re + x.im \cdot x.im\right)\right), \color{blue}{\frac{1}{2}}\right) \]
                  7. *-lowering-*.f64N/A

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(y.im, \log \left(x.re \cdot x.re + x.im \cdot x.im\right)\right), \frac{1}{2}\right) \]
                  8. log-lowering-log.f64N/A

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(x.re \cdot x.re + x.im \cdot x.im\right)\right)\right), \frac{1}{2}\right) \]
                  9. +-commutativeN/A

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(x.im \cdot x.im + x.re \cdot x.re\right)\right)\right), \frac{1}{2}\right) \]
                  10. +-lowering-+.f64N/A

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{+.f64}\left(\left(x.im \cdot x.im\right), \left(x.re \cdot x.re\right)\right)\right)\right), \frac{1}{2}\right) \]
                  11. *-lowering-*.f64N/A

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \left(x.re \cdot x.re\right)\right)\right)\right), \frac{1}{2}\right) \]
                  12. *-lowering-*.f6427.3%

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \mathsf{*.f64}\left(x.re, x.re\right)\right)\right)\right), \frac{1}{2}\right) \]
                10. Applied egg-rr27.3%

                  \[\leadsto \color{blue}{\left(y.im \cdot \log \left(x.im \cdot x.im + x.re \cdot x.re\right)\right) \cdot 0.5} \]
              8. Recombined 4 regimes into one program.
              9. Final simplification33.8%

                \[\leadsto \begin{array}{l} \mathbf{if}\;y.re \leq -210000:\\ \;\;\;\;{x.re}^{y.re} \cdot \left(y.im \cdot \log x.re\right)\\ \mathbf{elif}\;y.re \leq -5.2 \cdot 10^{-91}:\\ \;\;\;\;\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\ \mathbf{elif}\;y.re \leq 1.02 \cdot 10^{-44}:\\ \;\;\;\;y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(y.im \cdot \log \left(x.re \cdot x.re + x.im \cdot x.im\right)\right) \cdot 0.5\\ \end{array} \]
              10. Add Preprocessing

              Alternative 19: 25.4% accurate, 3.9× speedup?

              \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y.re \leq -7.5 \cdot 10^{-91}:\\ \;\;\;\;\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\ \mathbf{elif}\;y.re \leq 9 \cdot 10^{-45}:\\ \;\;\;\;y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(y.im \cdot \log \left(x.re \cdot x.re + x.im \cdot x.im\right)\right) \cdot 0.5\\ \end{array} \end{array} \]
              (FPCore (x.re x.im y.re y.im)
               :precision binary64
               (if (<= y.re -7.5e-91)
                 (sin (* y.re (atan2 x.im x.re)))
                 (if (<= y.re 9e-45)
                   (* y.im (log (hypot x.im x.re)))
                   (* (* y.im (log (+ (* x.re x.re) (* x.im x.im)))) 0.5))))
              double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
              	double tmp;
              	if (y_46_re <= -7.5e-91) {
              		tmp = sin((y_46_re * atan2(x_46_im, x_46_re)));
              	} else if (y_46_re <= 9e-45) {
              		tmp = y_46_im * log(hypot(x_46_im, x_46_re));
              	} else {
              		tmp = (y_46_im * log(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * 0.5;
              	}
              	return tmp;
              }
              
              public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
              	double tmp;
              	if (y_46_re <= -7.5e-91) {
              		tmp = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
              	} else if (y_46_re <= 9e-45) {
              		tmp = y_46_im * Math.log(Math.hypot(x_46_im, x_46_re));
              	} else {
              		tmp = (y_46_im * Math.log(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * 0.5;
              	}
              	return tmp;
              }
              
              def code(x_46_re, x_46_im, y_46_re, y_46_im):
              	tmp = 0
              	if y_46_re <= -7.5e-91:
              		tmp = math.sin((y_46_re * math.atan2(x_46_im, x_46_re)))
              	elif y_46_re <= 9e-45:
              		tmp = y_46_im * math.log(math.hypot(x_46_im, x_46_re))
              	else:
              		tmp = (y_46_im * math.log(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * 0.5
              	return tmp
              
              function code(x_46_re, x_46_im, y_46_re, y_46_im)
              	tmp = 0.0
              	if (y_46_re <= -7.5e-91)
              		tmp = sin(Float64(y_46_re * atan(x_46_im, x_46_re)));
              	elseif (y_46_re <= 9e-45)
              		tmp = Float64(y_46_im * log(hypot(x_46_im, x_46_re)));
              	else
              		tmp = Float64(Float64(y_46_im * log(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) * 0.5);
              	end
              	return tmp
              end
              
              function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im)
              	tmp = 0.0;
              	if (y_46_re <= -7.5e-91)
              		tmp = sin((y_46_re * atan2(x_46_im, x_46_re)));
              	elseif (y_46_re <= 9e-45)
              		tmp = y_46_im * log(hypot(x_46_im, x_46_re));
              	else
              		tmp = (y_46_im * log(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * 0.5;
              	end
              	tmp_2 = tmp;
              end
              
              code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[y$46$re, -7.5e-91], N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[y$46$re, 9e-45], N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(y$46$im * N[Log[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * 0.5), $MachinePrecision]]]
              
              \begin{array}{l}
              
              \\
              \begin{array}{l}
              \mathbf{if}\;y.re \leq -7.5 \cdot 10^{-91}:\\
              \;\;\;\;\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
              
              \mathbf{elif}\;y.re \leq 9 \cdot 10^{-45}:\\
              \;\;\;\;y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
              
              \mathbf{else}:\\
              \;\;\;\;\left(y.im \cdot \log \left(x.re \cdot x.re + x.im \cdot x.im\right)\right) \cdot 0.5\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 3 regimes
              2. if y.re < -7.50000000000000051e-91

                1. Initial program 33.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 \sin \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. Add Preprocessing
                3. Taylor expanded in y.im around 0

                  \[\leadsto \color{blue}{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}} \]
                4. Step-by-step derivation
                  1. *-commutativeN/A

                    \[\leadsto {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re} \cdot \color{blue}{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
                  2. *-lowering-*.f64N/A

                    \[\leadsto \mathsf{*.f64}\left(\left({\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}\right), \color{blue}{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\right) \]
                  3. pow-lowering-pow.f64N/A

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right), y.re\right), \sin \color{blue}{\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\right) \]
                  4. unpow2N/A

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right), y.re\right), \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
                  5. unpow2N/A

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right), y.re\right), \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
                  6. accelerator-lowering-hypot.f64N/A

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \sin \left(\color{blue}{y.re} \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
                  7. sin-lowering-sin.f64N/A

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \mathsf{sin.f64}\left(\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
                  8. *-lowering-*.f64N/A

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
                  9. atan2-lowering-atan2.f6472.6%

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
                5. Simplified72.6%

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

                  \[\leadsto \mathsf{*.f64}\left(\color{blue}{1}, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
                7. Step-by-step derivation
                  1. Simplified24.6%

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

                  if -7.50000000000000051e-91 < y.re < 8.9999999999999997e-45

                  1. Initial program 42.2%

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

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

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

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

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

                    \[\leadsto \color{blue}{y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)} \]
                  7. Step-by-step derivation
                    1. *-lowering-*.f64N/A

                      \[\leadsto \mathsf{*.f64}\left(y.im, \color{blue}{\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}\right) \]
                    2. log-lowering-log.f64N/A

                      \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right) \]
                    3. unpow2N/A

                      \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right)\right)\right) \]
                    4. unpow2N/A

                      \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)\right)\right) \]
                    5. accelerator-lowering-hypot.f6433.4%

                      \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right) \]
                  8. Simplified33.4%

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

                  if 8.9999999999999997e-45 < y.re

                  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 \sin \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. Add Preprocessing
                  3. Taylor expanded in y.im around 0

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

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

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

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

                    \[\leadsto \color{blue}{y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)} \]
                  7. Step-by-step derivation
                    1. *-lowering-*.f64N/A

                      \[\leadsto \mathsf{*.f64}\left(y.im, \color{blue}{\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}\right) \]
                    2. log-lowering-log.f64N/A

                      \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right) \]
                    3. unpow2N/A

                      \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right)\right)\right) \]
                    4. unpow2N/A

                      \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)\right)\right) \]
                    5. accelerator-lowering-hypot.f644.1%

                      \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right) \]
                  8. Simplified4.1%

                    \[\leadsto \color{blue}{y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)} \]
                  9. Step-by-step derivation
                    1. pow1/2N/A

                      \[\leadsto y.im \cdot \log \left({\left(x.im \cdot x.im + x.re \cdot x.re\right)}^{\frac{1}{2}}\right) \]
                    2. +-commutativeN/A

                      \[\leadsto y.im \cdot \log \left({\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\frac{1}{2}}\right) \]
                    3. log-powN/A

                      \[\leadsto y.im \cdot \left(\frac{1}{2} \cdot \color{blue}{\log \left(x.re \cdot x.re + x.im \cdot x.im\right)}\right) \]
                    4. *-commutativeN/A

                      \[\leadsto y.im \cdot \left(\log \left(x.re \cdot x.re + x.im \cdot x.im\right) \cdot \color{blue}{\frac{1}{2}}\right) \]
                    5. associate-*r*N/A

                      \[\leadsto \left(y.im \cdot \log \left(x.re \cdot x.re + x.im \cdot x.im\right)\right) \cdot \color{blue}{\frac{1}{2}} \]
                    6. *-lowering-*.f64N/A

                      \[\leadsto \mathsf{*.f64}\left(\left(y.im \cdot \log \left(x.re \cdot x.re + x.im \cdot x.im\right)\right), \color{blue}{\frac{1}{2}}\right) \]
                    7. *-lowering-*.f64N/A

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(y.im, \log \left(x.re \cdot x.re + x.im \cdot x.im\right)\right), \frac{1}{2}\right) \]
                    8. log-lowering-log.f64N/A

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(x.re \cdot x.re + x.im \cdot x.im\right)\right)\right), \frac{1}{2}\right) \]
                    9. +-commutativeN/A

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(x.im \cdot x.im + x.re \cdot x.re\right)\right)\right), \frac{1}{2}\right) \]
                    10. +-lowering-+.f64N/A

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{+.f64}\left(\left(x.im \cdot x.im\right), \left(x.re \cdot x.re\right)\right)\right)\right), \frac{1}{2}\right) \]
                    11. *-lowering-*.f64N/A

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \left(x.re \cdot x.re\right)\right)\right)\right), \frac{1}{2}\right) \]
                    12. *-lowering-*.f6427.3%

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \mathsf{*.f64}\left(x.re, x.re\right)\right)\right)\right), \frac{1}{2}\right) \]
                  10. Applied egg-rr27.3%

                    \[\leadsto \color{blue}{\left(y.im \cdot \log \left(x.im \cdot x.im + x.re \cdot x.re\right)\right) \cdot 0.5} \]
                8. Recombined 3 regimes into one program.
                9. Final simplification28.9%

                  \[\leadsto \begin{array}{l} \mathbf{if}\;y.re \leq -7.5 \cdot 10^{-91}:\\ \;\;\;\;\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\ \mathbf{elif}\;y.re \leq 9 \cdot 10^{-45}:\\ \;\;\;\;y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(y.im \cdot \log \left(x.re \cdot x.re + x.im \cdot x.im\right)\right) \cdot 0.5\\ \end{array} \]
                10. Add Preprocessing

                Alternative 20: 25.4% accurate, 3.9× speedup?

                \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y.re \leq -1 \cdot 10^{-90}:\\ \;\;\;\;y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\ \mathbf{elif}\;y.re \leq 1.05 \cdot 10^{-44}:\\ \;\;\;\;y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(y.im \cdot \log \left(x.re \cdot x.re + x.im \cdot x.im\right)\right) \cdot 0.5\\ \end{array} \end{array} \]
                (FPCore (x.re x.im y.re y.im)
                 :precision binary64
                 (if (<= y.re -1e-90)
                   (* y.re (atan2 x.im x.re))
                   (if (<= y.re 1.05e-44)
                     (* y.im (log (hypot x.im x.re)))
                     (* (* y.im (log (+ (* x.re x.re) (* x.im x.im)))) 0.5))))
                double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
                	double tmp;
                	if (y_46_re <= -1e-90) {
                		tmp = y_46_re * atan2(x_46_im, x_46_re);
                	} else if (y_46_re <= 1.05e-44) {
                		tmp = y_46_im * log(hypot(x_46_im, x_46_re));
                	} else {
                		tmp = (y_46_im * log(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * 0.5;
                	}
                	return tmp;
                }
                
                public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
                	double tmp;
                	if (y_46_re <= -1e-90) {
                		tmp = y_46_re * Math.atan2(x_46_im, x_46_re);
                	} else if (y_46_re <= 1.05e-44) {
                		tmp = y_46_im * Math.log(Math.hypot(x_46_im, x_46_re));
                	} else {
                		tmp = (y_46_im * Math.log(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * 0.5;
                	}
                	return tmp;
                }
                
                def code(x_46_re, x_46_im, y_46_re, y_46_im):
                	tmp = 0
                	if y_46_re <= -1e-90:
                		tmp = y_46_re * math.atan2(x_46_im, x_46_re)
                	elif y_46_re <= 1.05e-44:
                		tmp = y_46_im * math.log(math.hypot(x_46_im, x_46_re))
                	else:
                		tmp = (y_46_im * math.log(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * 0.5
                	return tmp
                
                function code(x_46_re, x_46_im, y_46_re, y_46_im)
                	tmp = 0.0
                	if (y_46_re <= -1e-90)
                		tmp = Float64(y_46_re * atan(x_46_im, x_46_re));
                	elseif (y_46_re <= 1.05e-44)
                		tmp = Float64(y_46_im * log(hypot(x_46_im, x_46_re)));
                	else
                		tmp = Float64(Float64(y_46_im * log(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) * 0.5);
                	end
                	return tmp
                end
                
                function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im)
                	tmp = 0.0;
                	if (y_46_re <= -1e-90)
                		tmp = y_46_re * atan2(x_46_im, x_46_re);
                	elseif (y_46_re <= 1.05e-44)
                		tmp = y_46_im * log(hypot(x_46_im, x_46_re));
                	else
                		tmp = (y_46_im * log(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * 0.5;
                	end
                	tmp_2 = tmp;
                end
                
                code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[y$46$re, -1e-90], N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 1.05e-44], N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(y$46$im * N[Log[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * 0.5), $MachinePrecision]]]
                
                \begin{array}{l}
                
                \\
                \begin{array}{l}
                \mathbf{if}\;y.re \leq -1 \cdot 10^{-90}:\\
                \;\;\;\;y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
                
                \mathbf{elif}\;y.re \leq 1.05 \cdot 10^{-44}:\\
                \;\;\;\;y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
                
                \mathbf{else}:\\
                \;\;\;\;\left(y.im \cdot \log \left(x.re \cdot x.re + x.im \cdot x.im\right)\right) \cdot 0.5\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 3 regimes
                2. if y.re < -9.99999999999999995e-91

                  1. Initial program 33.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 \sin \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. Add Preprocessing
                  3. Taylor expanded in y.im around 0

                    \[\leadsto \color{blue}{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}} \]
                  4. Step-by-step derivation
                    1. *-commutativeN/A

                      \[\leadsto {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re} \cdot \color{blue}{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
                    2. *-lowering-*.f64N/A

                      \[\leadsto \mathsf{*.f64}\left(\left({\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}\right), \color{blue}{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\right) \]
                    3. pow-lowering-pow.f64N/A

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right), y.re\right), \sin \color{blue}{\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\right) \]
                    4. unpow2N/A

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right), y.re\right), \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
                    5. unpow2N/A

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right), y.re\right), \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
                    6. accelerator-lowering-hypot.f64N/A

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \sin \left(\color{blue}{y.re} \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
                    7. sin-lowering-sin.f64N/A

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \mathsf{sin.f64}\left(\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
                    8. *-lowering-*.f64N/A

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
                    9. atan2-lowering-atan2.f6472.6%

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
                  5. Simplified72.6%

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

                    \[\leadsto \color{blue}{y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}} \]
                  7. Step-by-step derivation
                    1. *-lowering-*.f64N/A

                      \[\leadsto \mathsf{*.f64}\left(y.re, \color{blue}{\tan^{-1}_* \frac{x.im}{x.re}}\right) \]
                    2. atan2-lowering-atan2.f6424.3%

                      \[\leadsto \mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, \color{blue}{x.re}\right)\right) \]
                  8. Simplified24.3%

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

                  if -9.99999999999999995e-91 < y.re < 1.05000000000000001e-44

                  1. Initial program 42.2%

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

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

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

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

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

                    \[\leadsto \color{blue}{y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)} \]
                  7. Step-by-step derivation
                    1. *-lowering-*.f64N/A

                      \[\leadsto \mathsf{*.f64}\left(y.im, \color{blue}{\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}\right) \]
                    2. log-lowering-log.f64N/A

                      \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right) \]
                    3. unpow2N/A

                      \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right)\right)\right) \]
                    4. unpow2N/A

                      \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)\right)\right) \]
                    5. accelerator-lowering-hypot.f6433.4%

                      \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right) \]
                  8. Simplified33.4%

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

                  if 1.05000000000000001e-44 < y.re

                  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 \sin \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. Add Preprocessing
                  3. Taylor expanded in y.im around 0

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

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

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

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

                    \[\leadsto \color{blue}{y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)} \]
                  7. Step-by-step derivation
                    1. *-lowering-*.f64N/A

                      \[\leadsto \mathsf{*.f64}\left(y.im, \color{blue}{\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}\right) \]
                    2. log-lowering-log.f64N/A

                      \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right) \]
                    3. unpow2N/A

                      \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right)\right)\right) \]
                    4. unpow2N/A

                      \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)\right)\right) \]
                    5. accelerator-lowering-hypot.f644.1%

                      \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right) \]
                  8. Simplified4.1%

                    \[\leadsto \color{blue}{y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)} \]
                  9. Step-by-step derivation
                    1. pow1/2N/A

                      \[\leadsto y.im \cdot \log \left({\left(x.im \cdot x.im + x.re \cdot x.re\right)}^{\frac{1}{2}}\right) \]
                    2. +-commutativeN/A

                      \[\leadsto y.im \cdot \log \left({\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\frac{1}{2}}\right) \]
                    3. log-powN/A

                      \[\leadsto y.im \cdot \left(\frac{1}{2} \cdot \color{blue}{\log \left(x.re \cdot x.re + x.im \cdot x.im\right)}\right) \]
                    4. *-commutativeN/A

                      \[\leadsto y.im \cdot \left(\log \left(x.re \cdot x.re + x.im \cdot x.im\right) \cdot \color{blue}{\frac{1}{2}}\right) \]
                    5. associate-*r*N/A

                      \[\leadsto \left(y.im \cdot \log \left(x.re \cdot x.re + x.im \cdot x.im\right)\right) \cdot \color{blue}{\frac{1}{2}} \]
                    6. *-lowering-*.f64N/A

                      \[\leadsto \mathsf{*.f64}\left(\left(y.im \cdot \log \left(x.re \cdot x.re + x.im \cdot x.im\right)\right), \color{blue}{\frac{1}{2}}\right) \]
                    7. *-lowering-*.f64N/A

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(y.im, \log \left(x.re \cdot x.re + x.im \cdot x.im\right)\right), \frac{1}{2}\right) \]
                    8. log-lowering-log.f64N/A

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(x.re \cdot x.re + x.im \cdot x.im\right)\right)\right), \frac{1}{2}\right) \]
                    9. +-commutativeN/A

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(x.im \cdot x.im + x.re \cdot x.re\right)\right)\right), \frac{1}{2}\right) \]
                    10. +-lowering-+.f64N/A

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{+.f64}\left(\left(x.im \cdot x.im\right), \left(x.re \cdot x.re\right)\right)\right)\right), \frac{1}{2}\right) \]
                    11. *-lowering-*.f64N/A

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \left(x.re \cdot x.re\right)\right)\right)\right), \frac{1}{2}\right) \]
                    12. *-lowering-*.f6427.3%

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \mathsf{*.f64}\left(x.re, x.re\right)\right)\right)\right), \frac{1}{2}\right) \]
                  10. Applied egg-rr27.3%

                    \[\leadsto \color{blue}{\left(y.im \cdot \log \left(x.im \cdot x.im + x.re \cdot x.re\right)\right) \cdot 0.5} \]
                3. Recombined 3 regimes into one program.
                4. Final simplification28.8%

                  \[\leadsto \begin{array}{l} \mathbf{if}\;y.re \leq -1 \cdot 10^{-90}:\\ \;\;\;\;y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\ \mathbf{elif}\;y.re \leq 1.05 \cdot 10^{-44}:\\ \;\;\;\;y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(y.im \cdot \log \left(x.re \cdot x.re + x.im \cdot x.im\right)\right) \cdot 0.5\\ \end{array} \]
                5. Add Preprocessing

                Alternative 21: 20.5% accurate, 7.1× speedup?

                \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y.re \leq -4.5 \cdot 10^{-79}:\\ \;\;\;\;y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\ \mathbf{else}:\\ \;\;\;\;\left(y.im \cdot \log \left(x.re \cdot x.re + x.im \cdot x.im\right)\right) \cdot 0.5\\ \end{array} \end{array} \]
                (FPCore (x.re x.im y.re y.im)
                 :precision binary64
                 (if (<= y.re -4.5e-79)
                   (* y.re (atan2 x.im x.re))
                   (* (* y.im (log (+ (* x.re x.re) (* x.im x.im)))) 0.5)))
                double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
                	double tmp;
                	if (y_46_re <= -4.5e-79) {
                		tmp = y_46_re * atan2(x_46_im, x_46_re);
                	} else {
                		tmp = (y_46_im * log(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * 0.5;
                	}
                	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) :: tmp
                    if (y_46re <= (-4.5d-79)) then
                        tmp = y_46re * atan2(x_46im, x_46re)
                    else
                        tmp = (y_46im * log(((x_46re * x_46re) + (x_46im * x_46im)))) * 0.5d0
                    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 tmp;
                	if (y_46_re <= -4.5e-79) {
                		tmp = y_46_re * Math.atan2(x_46_im, x_46_re);
                	} else {
                		tmp = (y_46_im * Math.log(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * 0.5;
                	}
                	return tmp;
                }
                
                def code(x_46_re, x_46_im, y_46_re, y_46_im):
                	tmp = 0
                	if y_46_re <= -4.5e-79:
                		tmp = y_46_re * math.atan2(x_46_im, x_46_re)
                	else:
                		tmp = (y_46_im * math.log(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * 0.5
                	return tmp
                
                function code(x_46_re, x_46_im, y_46_re, y_46_im)
                	tmp = 0.0
                	if (y_46_re <= -4.5e-79)
                		tmp = Float64(y_46_re * atan(x_46_im, x_46_re));
                	else
                		tmp = Float64(Float64(y_46_im * log(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) * 0.5);
                	end
                	return tmp
                end
                
                function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im)
                	tmp = 0.0;
                	if (y_46_re <= -4.5e-79)
                		tmp = y_46_re * atan2(x_46_im, x_46_re);
                	else
                		tmp = (y_46_im * log(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * 0.5;
                	end
                	tmp_2 = tmp;
                end
                
                code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[y$46$re, -4.5e-79], N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision], N[(N[(y$46$im * N[Log[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * 0.5), $MachinePrecision]]
                
                \begin{array}{l}
                
                \\
                \begin{array}{l}
                \mathbf{if}\;y.re \leq -4.5 \cdot 10^{-79}:\\
                \;\;\;\;y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
                
                \mathbf{else}:\\
                \;\;\;\;\left(y.im \cdot \log \left(x.re \cdot x.re + x.im \cdot x.im\right)\right) \cdot 0.5\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 2 regimes
                2. if y.re < -4.5000000000000003e-79

                  1. Initial program 32.5%

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

                    \[\leadsto \color{blue}{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}} \]
                  4. Step-by-step derivation
                    1. *-commutativeN/A

                      \[\leadsto {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re} \cdot \color{blue}{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
                    2. *-lowering-*.f64N/A

                      \[\leadsto \mathsf{*.f64}\left(\left({\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}\right), \color{blue}{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\right) \]
                    3. pow-lowering-pow.f64N/A

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right), y.re\right), \sin \color{blue}{\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\right) \]
                    4. unpow2N/A

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right), y.re\right), \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
                    5. unpow2N/A

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right), y.re\right), \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
                    6. accelerator-lowering-hypot.f64N/A

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \sin \left(\color{blue}{y.re} \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
                    7. sin-lowering-sin.f64N/A

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \mathsf{sin.f64}\left(\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
                    8. *-lowering-*.f64N/A

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
                    9. atan2-lowering-atan2.f6474.1%

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
                  5. Simplified74.1%

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

                    \[\leadsto \color{blue}{y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}} \]
                  7. Step-by-step derivation
                    1. *-lowering-*.f64N/A

                      \[\leadsto \mathsf{*.f64}\left(y.re, \color{blue}{\tan^{-1}_* \frac{x.im}{x.re}}\right) \]
                    2. atan2-lowering-atan2.f6424.0%

                      \[\leadsto \mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, \color{blue}{x.re}\right)\right) \]
                  8. Simplified24.0%

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

                  if -4.5000000000000003e-79 < y.re

                  1. Initial program 41.1%

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

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

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

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

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

                    \[\leadsto \color{blue}{y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)} \]
                  7. Step-by-step derivation
                    1. *-lowering-*.f64N/A

                      \[\leadsto \mathsf{*.f64}\left(y.im, \color{blue}{\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}\right) \]
                    2. log-lowering-log.f64N/A

                      \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right) \]
                    3. unpow2N/A

                      \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right)\right)\right) \]
                    4. unpow2N/A

                      \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)\right)\right) \]
                    5. accelerator-lowering-hypot.f6421.3%

                      \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right) \]
                  8. Simplified21.3%

                    \[\leadsto \color{blue}{y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)} \]
                  9. Step-by-step derivation
                    1. pow1/2N/A

                      \[\leadsto y.im \cdot \log \left({\left(x.im \cdot x.im + x.re \cdot x.re\right)}^{\frac{1}{2}}\right) \]
                    2. +-commutativeN/A

                      \[\leadsto y.im \cdot \log \left({\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\frac{1}{2}}\right) \]
                    3. log-powN/A

                      \[\leadsto y.im \cdot \left(\frac{1}{2} \cdot \color{blue}{\log \left(x.re \cdot x.re + x.im \cdot x.im\right)}\right) \]
                    4. *-commutativeN/A

                      \[\leadsto y.im \cdot \left(\log \left(x.re \cdot x.re + x.im \cdot x.im\right) \cdot \color{blue}{\frac{1}{2}}\right) \]
                    5. associate-*r*N/A

                      \[\leadsto \left(y.im \cdot \log \left(x.re \cdot x.re + x.im \cdot x.im\right)\right) \cdot \color{blue}{\frac{1}{2}} \]
                    6. *-lowering-*.f64N/A

                      \[\leadsto \mathsf{*.f64}\left(\left(y.im \cdot \log \left(x.re \cdot x.re + x.im \cdot x.im\right)\right), \color{blue}{\frac{1}{2}}\right) \]
                    7. *-lowering-*.f64N/A

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(y.im, \log \left(x.re \cdot x.re + x.im \cdot x.im\right)\right), \frac{1}{2}\right) \]
                    8. log-lowering-log.f64N/A

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(x.re \cdot x.re + x.im \cdot x.im\right)\right)\right), \frac{1}{2}\right) \]
                    9. +-commutativeN/A

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(x.im \cdot x.im + x.re \cdot x.re\right)\right)\right), \frac{1}{2}\right) \]
                    10. +-lowering-+.f64N/A

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{+.f64}\left(\left(x.im \cdot x.im\right), \left(x.re \cdot x.re\right)\right)\right)\right), \frac{1}{2}\right) \]
                    11. *-lowering-*.f64N/A

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \left(x.re \cdot x.re\right)\right)\right)\right), \frac{1}{2}\right) \]
                    12. *-lowering-*.f6427.5%

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \mathsf{*.f64}\left(x.re, x.re\right)\right)\right)\right), \frac{1}{2}\right) \]
                  10. Applied egg-rr27.5%

                    \[\leadsto \color{blue}{\left(y.im \cdot \log \left(x.im \cdot x.im + x.re \cdot x.re\right)\right) \cdot 0.5} \]
                3. Recombined 2 regimes into one program.
                4. Final simplification26.4%

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

                Alternative 22: 16.2% accurate, 7.1× speedup?

                \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x.re \leq 2.6 \cdot 10^{-185}:\\ \;\;\;\;y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\ \mathbf{else}:\\ \;\;\;\;y.im \cdot \log \left(x.re + \frac{\left(x.im \cdot x.im\right) \cdot 0.5}{x.re}\right)\\ \end{array} \end{array} \]
                (FPCore (x.re x.im y.re y.im)
                 :precision binary64
                 (if (<= x.re 2.6e-185)
                   (* y.re (atan2 x.im x.re))
                   (* y.im (log (+ x.re (/ (* (* x.im x.im) 0.5) x.re))))))
                double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
                	double tmp;
                	if (x_46_re <= 2.6e-185) {
                		tmp = y_46_re * atan2(x_46_im, x_46_re);
                	} else {
                		tmp = y_46_im * log((x_46_re + (((x_46_im * x_46_im) * 0.5) / x_46_re)));
                	}
                	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) :: tmp
                    if (x_46re <= 2.6d-185) then
                        tmp = y_46re * atan2(x_46im, x_46re)
                    else
                        tmp = y_46im * log((x_46re + (((x_46im * x_46im) * 0.5d0) / x_46re)))
                    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 tmp;
                	if (x_46_re <= 2.6e-185) {
                		tmp = y_46_re * Math.atan2(x_46_im, x_46_re);
                	} else {
                		tmp = y_46_im * Math.log((x_46_re + (((x_46_im * x_46_im) * 0.5) / x_46_re)));
                	}
                	return tmp;
                }
                
                def code(x_46_re, x_46_im, y_46_re, y_46_im):
                	tmp = 0
                	if x_46_re <= 2.6e-185:
                		tmp = y_46_re * math.atan2(x_46_im, x_46_re)
                	else:
                		tmp = y_46_im * math.log((x_46_re + (((x_46_im * x_46_im) * 0.5) / x_46_re)))
                	return tmp
                
                function code(x_46_re, x_46_im, y_46_re, y_46_im)
                	tmp = 0.0
                	if (x_46_re <= 2.6e-185)
                		tmp = Float64(y_46_re * atan(x_46_im, x_46_re));
                	else
                		tmp = Float64(y_46_im * log(Float64(x_46_re + Float64(Float64(Float64(x_46_im * x_46_im) * 0.5) / x_46_re))));
                	end
                	return tmp
                end
                
                function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im)
                	tmp = 0.0;
                	if (x_46_re <= 2.6e-185)
                		tmp = y_46_re * atan2(x_46_im, x_46_re);
                	else
                		tmp = y_46_im * log((x_46_re + (((x_46_im * x_46_im) * 0.5) / x_46_re)));
                	end
                	tmp_2 = tmp;
                end
                
                code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[x$46$re, 2.6e-185], N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision], N[(y$46$im * N[Log[N[(x$46$re + N[(N[(N[(x$46$im * x$46$im), $MachinePrecision] * 0.5), $MachinePrecision] / x$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
                
                \begin{array}{l}
                
                \\
                \begin{array}{l}
                \mathbf{if}\;x.re \leq 2.6 \cdot 10^{-185}:\\
                \;\;\;\;y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
                
                \mathbf{else}:\\
                \;\;\;\;y.im \cdot \log \left(x.re + \frac{\left(x.im \cdot x.im\right) \cdot 0.5}{x.re}\right)\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 2 regimes
                2. if x.re < 2.59999999999999985e-185

                  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 \sin \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. Add Preprocessing
                  3. Taylor expanded in y.im around 0

                    \[\leadsto \color{blue}{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}} \]
                  4. Step-by-step derivation
                    1. *-commutativeN/A

                      \[\leadsto {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re} \cdot \color{blue}{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
                    2. *-lowering-*.f64N/A

                      \[\leadsto \mathsf{*.f64}\left(\left({\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}\right), \color{blue}{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\right) \]
                    3. pow-lowering-pow.f64N/A

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right), y.re\right), \sin \color{blue}{\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\right) \]
                    4. unpow2N/A

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right), y.re\right), \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
                    5. unpow2N/A

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right), y.re\right), \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
                    6. accelerator-lowering-hypot.f64N/A

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \sin \left(\color{blue}{y.re} \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
                    7. sin-lowering-sin.f64N/A

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \mathsf{sin.f64}\left(\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
                    8. *-lowering-*.f64N/A

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
                    9. atan2-lowering-atan2.f6445.3%

                      \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
                  5. Simplified45.3%

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

                    \[\leadsto \color{blue}{y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}} \]
                  7. Step-by-step derivation
                    1. *-lowering-*.f64N/A

                      \[\leadsto \mathsf{*.f64}\left(y.re, \color{blue}{\tan^{-1}_* \frac{x.im}{x.re}}\right) \]
                    2. atan2-lowering-atan2.f6417.7%

                      \[\leadsto \mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, \color{blue}{x.re}\right)\right) \]
                  8. Simplified17.7%

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

                  if 2.59999999999999985e-185 < x.re

                  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 \sin \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. Add Preprocessing
                  3. Taylor expanded in y.im around 0

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

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

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

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

                    \[\leadsto \color{blue}{y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)} \]
                  7. Step-by-step derivation
                    1. *-lowering-*.f64N/A

                      \[\leadsto \mathsf{*.f64}\left(y.im, \color{blue}{\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}\right) \]
                    2. log-lowering-log.f64N/A

                      \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right) \]
                    3. unpow2N/A

                      \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right)\right)\right) \]
                    4. unpow2N/A

                      \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)\right)\right) \]
                    5. accelerator-lowering-hypot.f6418.0%

                      \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right) \]
                  8. Simplified18.0%

                    \[\leadsto \color{blue}{y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)} \]
                  9. Taylor expanded in x.im around 0

                    \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\color{blue}{\left(x.re + \frac{1}{2} \cdot \frac{{x.im}^{2}}{x.re}\right)}\right)\right) \]
                  10. Step-by-step derivation
                    1. +-lowering-+.f64N/A

                      \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{+.f64}\left(x.re, \left(\frac{1}{2} \cdot \frac{{x.im}^{2}}{x.re}\right)\right)\right)\right) \]
                    2. associate-*r/N/A

                      \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{+.f64}\left(x.re, \left(\frac{\frac{1}{2} \cdot {x.im}^{2}}{x.re}\right)\right)\right)\right) \]
                    3. /-lowering-/.f64N/A

                      \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{+.f64}\left(x.re, \mathsf{/.f64}\left(\left(\frac{1}{2} \cdot {x.im}^{2}\right), x.re\right)\right)\right)\right) \]
                    4. *-lowering-*.f64N/A

                      \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{+.f64}\left(x.re, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \left({x.im}^{2}\right)\right), x.re\right)\right)\right)\right) \]
                    5. unpow2N/A

                      \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{+.f64}\left(x.re, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \left(x.im \cdot x.im\right)\right), x.re\right)\right)\right)\right) \]
                    6. *-lowering-*.f6421.5%

                      \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{+.f64}\left(x.re, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(x.im, x.im\right)\right), x.re\right)\right)\right)\right) \]
                  11. Simplified21.5%

                    \[\leadsto y.im \cdot \log \color{blue}{\left(x.re + \frac{0.5 \cdot \left(x.im \cdot x.im\right)}{x.re}\right)} \]
                3. Recombined 2 regimes into one program.
                4. Final simplification19.2%

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

                Alternative 23: 11.1% accurate, 7.3× speedup?

                \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x.im \leq -23000:\\ \;\;\;\;y.im \cdot \log \left(0 - x.im\right)\\ \mathbf{elif}\;x.im \leq 3 \cdot 10^{-116}:\\ \;\;\;\;y.im \cdot \log x.re\\ \mathbf{else}:\\ \;\;\;\;y.im \cdot \log x.im\\ \end{array} \end{array} \]
                (FPCore (x.re x.im y.re y.im)
                 :precision binary64
                 (if (<= x.im -23000.0)
                   (* y.im (log (- 0.0 x.im)))
                   (if (<= x.im 3e-116) (* y.im (log x.re)) (* y.im (log x.im)))))
                double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
                	double tmp;
                	if (x_46_im <= -23000.0) {
                		tmp = y_46_im * log((0.0 - x_46_im));
                	} else if (x_46_im <= 3e-116) {
                		tmp = y_46_im * log(x_46_re);
                	} else {
                		tmp = y_46_im * log(x_46_im);
                	}
                	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) :: tmp
                    if (x_46im <= (-23000.0d0)) then
                        tmp = y_46im * log((0.0d0 - x_46im))
                    else if (x_46im <= 3d-116) then
                        tmp = y_46im * log(x_46re)
                    else
                        tmp = y_46im * log(x_46im)
                    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 tmp;
                	if (x_46_im <= -23000.0) {
                		tmp = y_46_im * Math.log((0.0 - x_46_im));
                	} else if (x_46_im <= 3e-116) {
                		tmp = y_46_im * Math.log(x_46_re);
                	} else {
                		tmp = y_46_im * Math.log(x_46_im);
                	}
                	return tmp;
                }
                
                def code(x_46_re, x_46_im, y_46_re, y_46_im):
                	tmp = 0
                	if x_46_im <= -23000.0:
                		tmp = y_46_im * math.log((0.0 - x_46_im))
                	elif x_46_im <= 3e-116:
                		tmp = y_46_im * math.log(x_46_re)
                	else:
                		tmp = y_46_im * math.log(x_46_im)
                	return tmp
                
                function code(x_46_re, x_46_im, y_46_re, y_46_im)
                	tmp = 0.0
                	if (x_46_im <= -23000.0)
                		tmp = Float64(y_46_im * log(Float64(0.0 - x_46_im)));
                	elseif (x_46_im <= 3e-116)
                		tmp = Float64(y_46_im * log(x_46_re));
                	else
                		tmp = Float64(y_46_im * log(x_46_im));
                	end
                	return tmp
                end
                
                function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im)
                	tmp = 0.0;
                	if (x_46_im <= -23000.0)
                		tmp = y_46_im * log((0.0 - x_46_im));
                	elseif (x_46_im <= 3e-116)
                		tmp = y_46_im * log(x_46_re);
                	else
                		tmp = y_46_im * log(x_46_im);
                	end
                	tmp_2 = tmp;
                end
                
                code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[x$46$im, -23000.0], N[(y$46$im * N[Log[N[(0.0 - x$46$im), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$im, 3e-116], N[(y$46$im * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision], N[(y$46$im * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision]]]
                
                \begin{array}{l}
                
                \\
                \begin{array}{l}
                \mathbf{if}\;x.im \leq -23000:\\
                \;\;\;\;y.im \cdot \log \left(0 - x.im\right)\\
                
                \mathbf{elif}\;x.im \leq 3 \cdot 10^{-116}:\\
                \;\;\;\;y.im \cdot \log x.re\\
                
                \mathbf{else}:\\
                \;\;\;\;y.im \cdot \log x.im\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 3 regimes
                2. if x.im < -23000

                  1. Initial program 29.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 \sin \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. Add Preprocessing
                  3. Taylor expanded in y.im around 0

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

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

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

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

                    \[\leadsto \color{blue}{y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)} \]
                  7. Step-by-step derivation
                    1. *-lowering-*.f64N/A

                      \[\leadsto \mathsf{*.f64}\left(y.im, \color{blue}{\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}\right) \]
                    2. log-lowering-log.f64N/A

                      \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right) \]
                    3. unpow2N/A

                      \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right)\right)\right) \]
                    4. unpow2N/A

                      \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)\right)\right) \]
                    5. accelerator-lowering-hypot.f6413.5%

                      \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right) \]
                  8. Simplified13.5%

                    \[\leadsto \color{blue}{y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)} \]
                  9. Taylor expanded in x.im around -inf

                    \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\color{blue}{\left(-1 \cdot x.im\right)}\right)\right) \]
                  10. Step-by-step derivation
                    1. mul-1-negN/A

                      \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\mathsf{neg}\left(x.im\right)\right)\right)\right) \]
                    2. neg-lowering-neg.f6412.3%

                      \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{neg.f64}\left(x.im\right)\right)\right) \]
                  11. Simplified12.3%

                    \[\leadsto y.im \cdot \log \color{blue}{\left(-x.im\right)} \]

                  if -23000 < x.im < 3.00000000000000026e-116

                  1. Initial program 45.9%

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

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

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

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

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

                    \[\leadsto \color{blue}{y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)} \]
                  7. Step-by-step derivation
                    1. *-lowering-*.f64N/A

                      \[\leadsto \mathsf{*.f64}\left(y.im, \color{blue}{\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}\right) \]
                    2. log-lowering-log.f64N/A

                      \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right) \]
                    3. unpow2N/A

                      \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right)\right)\right) \]
                    4. unpow2N/A

                      \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)\right)\right) \]
                    5. accelerator-lowering-hypot.f6418.7%

                      \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right) \]
                  8. Simplified18.7%

                    \[\leadsto \color{blue}{y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)} \]
                  9. Taylor expanded in x.im around 0

                    \[\leadsto \color{blue}{y.im \cdot \log x.re} \]
                  10. Step-by-step derivation
                    1. *-lowering-*.f64N/A

                      \[\leadsto \mathsf{*.f64}\left(y.im, \color{blue}{\log x.re}\right) \]
                    2. log-lowering-log.f6411.5%

                      \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(x.re\right)\right) \]
                  11. Simplified11.5%

                    \[\leadsto \color{blue}{y.im \cdot \log x.re} \]

                  if 3.00000000000000026e-116 < x.im

                  1. Initial program 36.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 \sin \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. Add Preprocessing
                  3. Taylor expanded in y.im around 0

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

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

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

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

                    \[\leadsto \color{blue}{y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)} \]
                  7. Step-by-step derivation
                    1. *-lowering-*.f64N/A

                      \[\leadsto \mathsf{*.f64}\left(y.im, \color{blue}{\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}\right) \]
                    2. log-lowering-log.f64N/A

                      \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right) \]
                    3. unpow2N/A

                      \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right)\right)\right) \]
                    4. unpow2N/A

                      \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)\right)\right) \]
                    5. accelerator-lowering-hypot.f6417.1%

                      \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right) \]
                  8. Simplified17.1%

                    \[\leadsto \color{blue}{y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)} \]
                  9. Taylor expanded in x.re around 0

                    \[\leadsto \color{blue}{y.im \cdot \log x.im} \]
                  10. Step-by-step derivation
                    1. *-lowering-*.f64N/A

                      \[\leadsto \mathsf{*.f64}\left(y.im, \color{blue}{\log x.im}\right) \]
                    2. log-lowering-log.f6411.9%

                      \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(x.im\right)\right) \]
                  11. Simplified11.9%

                    \[\leadsto \color{blue}{y.im \cdot \log x.im} \]
                3. Recombined 3 regimes into one program.
                4. Final simplification11.9%

                  \[\leadsto \begin{array}{l} \mathbf{if}\;x.im \leq -23000:\\ \;\;\;\;y.im \cdot \log \left(0 - x.im\right)\\ \mathbf{elif}\;x.im \leq 3 \cdot 10^{-116}:\\ \;\;\;\;y.im \cdot \log x.re\\ \mathbf{else}:\\ \;\;\;\;y.im \cdot \log x.im\\ \end{array} \]
                5. Add Preprocessing

                Alternative 24: 11.6% accurate, 7.5× speedup?

                \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x.re \leq -1 \cdot 10^{-310}:\\ \;\;\;\;y.im \cdot \log \left(0 - x.re\right)\\ \mathbf{else}:\\ \;\;\;\;y.im \cdot \log x.re\\ \end{array} \end{array} \]
                (FPCore (x.re x.im y.re y.im)
                 :precision binary64
                 (if (<= x.re -1e-310) (* y.im (log (- 0.0 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 tmp;
                	if (x_46_re <= -1e-310) {
                		tmp = y_46_im * log((0.0 - x_46_re));
                	} else {
                		tmp = y_46_im * log(x_46_re);
                	}
                	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) :: tmp
                    if (x_46re <= (-1d-310)) then
                        tmp = y_46im * log((0.0d0 - x_46re))
                    else
                        tmp = y_46im * log(x_46re)
                    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 tmp;
                	if (x_46_re <= -1e-310) {
                		tmp = y_46_im * Math.log((0.0 - x_46_re));
                	} else {
                		tmp = y_46_im * Math.log(x_46_re);
                	}
                	return tmp;
                }
                
                def code(x_46_re, x_46_im, y_46_re, y_46_im):
                	tmp = 0
                	if x_46_re <= -1e-310:
                		tmp = y_46_im * math.log((0.0 - x_46_re))
                	else:
                		tmp = y_46_im * math.log(x_46_re)
                	return tmp
                
                function code(x_46_re, x_46_im, y_46_re, y_46_im)
                	tmp = 0.0
                	if (x_46_re <= -1e-310)
                		tmp = Float64(y_46_im * log(Float64(0.0 - x_46_re)));
                	else
                		tmp = 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)
                	tmp = 0.0;
                	if (x_46_re <= -1e-310)
                		tmp = y_46_im * log((0.0 - x_46_re));
                	else
                		tmp = 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_] := If[LessEqual[x$46$re, -1e-310], N[(y$46$im * N[Log[N[(0.0 - x$46$re), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(y$46$im * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision]]
                
                \begin{array}{l}
                
                \\
                \begin{array}{l}
                \mathbf{if}\;x.re \leq -1 \cdot 10^{-310}:\\
                \;\;\;\;y.im \cdot \log \left(0 - x.re\right)\\
                
                \mathbf{else}:\\
                \;\;\;\;y.im \cdot \log x.re\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 2 regimes
                2. if x.re < -9.999999999999969e-311

                  1. Initial program 39.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 \sin \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. Add Preprocessing
                  3. Taylor expanded in y.im around 0

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

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

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

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

                    \[\leadsto \color{blue}{y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)} \]
                  7. Step-by-step derivation
                    1. *-lowering-*.f64N/A

                      \[\leadsto \mathsf{*.f64}\left(y.im, \color{blue}{\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}\right) \]
                    2. log-lowering-log.f64N/A

                      \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right) \]
                    3. unpow2N/A

                      \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right)\right)\right) \]
                    4. unpow2N/A

                      \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)\right)\right) \]
                    5. accelerator-lowering-hypot.f6416.4%

                      \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right) \]
                  8. Simplified16.4%

                    \[\leadsto \color{blue}{y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)} \]
                  9. Taylor expanded in x.re around -inf

                    \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\color{blue}{\left(-1 \cdot x.re\right)}\right)\right) \]
                  10. Step-by-step derivation
                    1. mul-1-negN/A

                      \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\mathsf{neg}\left(x.re\right)\right)\right)\right) \]
                    2. neg-lowering-neg.f6410.6%

                      \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{neg.f64}\left(x.re\right)\right)\right) \]
                  11. Simplified10.6%

                    \[\leadsto y.im \cdot \log \color{blue}{\left(-x.re\right)} \]

                  if -9.999999999999969e-311 < x.re

                  1. Initial program 37.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 \sin \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. Add Preprocessing
                  3. Taylor expanded in y.im around 0

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

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

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

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

                    \[\leadsto \color{blue}{y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)} \]
                  7. Step-by-step derivation
                    1. *-lowering-*.f64N/A

                      \[\leadsto \mathsf{*.f64}\left(y.im, \color{blue}{\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}\right) \]
                    2. log-lowering-log.f64N/A

                      \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right) \]
                    3. unpow2N/A

                      \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right)\right)\right) \]
                    4. unpow2N/A

                      \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)\right)\right) \]
                    5. accelerator-lowering-hypot.f6417.3%

                      \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right) \]
                  8. Simplified17.3%

                    \[\leadsto \color{blue}{y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)} \]
                  9. Taylor expanded in x.im around 0

                    \[\leadsto \color{blue}{y.im \cdot \log x.re} \]
                  10. Step-by-step derivation
                    1. *-lowering-*.f64N/A

                      \[\leadsto \mathsf{*.f64}\left(y.im, \color{blue}{\log x.re}\right) \]
                    2. log-lowering-log.f6414.1%

                      \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(x.re\right)\right) \]
                  11. Simplified14.1%

                    \[\leadsto \color{blue}{y.im \cdot \log x.re} \]
                3. Recombined 2 regimes into one program.
                4. Final simplification12.2%

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

                Alternative 25: 9.4% accurate, 7.7× speedup?

                \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x.re \leq -7.9 \cdot 10^{-305}:\\ \;\;\;\;y.im \cdot \log x.im\\ \mathbf{else}:\\ \;\;\;\;y.im \cdot \log x.re\\ \end{array} \end{array} \]
                (FPCore (x.re x.im y.re y.im)
                 :precision binary64
                 (if (<= x.re -7.9e-305) (* y.im (log x.im)) (* y.im (log x.re))))
                double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
                	double tmp;
                	if (x_46_re <= -7.9e-305) {
                		tmp = y_46_im * log(x_46_im);
                	} else {
                		tmp = y_46_im * log(x_46_re);
                	}
                	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) :: tmp
                    if (x_46re <= (-7.9d-305)) then
                        tmp = y_46im * log(x_46im)
                    else
                        tmp = y_46im * log(x_46re)
                    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 tmp;
                	if (x_46_re <= -7.9e-305) {
                		tmp = y_46_im * Math.log(x_46_im);
                	} else {
                		tmp = y_46_im * Math.log(x_46_re);
                	}
                	return tmp;
                }
                
                def code(x_46_re, x_46_im, y_46_re, y_46_im):
                	tmp = 0
                	if x_46_re <= -7.9e-305:
                		tmp = y_46_im * math.log(x_46_im)
                	else:
                		tmp = y_46_im * math.log(x_46_re)
                	return tmp
                
                function code(x_46_re, x_46_im, y_46_re, y_46_im)
                	tmp = 0.0
                	if (x_46_re <= -7.9e-305)
                		tmp = Float64(y_46_im * log(x_46_im));
                	else
                		tmp = 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)
                	tmp = 0.0;
                	if (x_46_re <= -7.9e-305)
                		tmp = y_46_im * log(x_46_im);
                	else
                		tmp = 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_] := If[LessEqual[x$46$re, -7.9e-305], N[(y$46$im * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision], N[(y$46$im * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision]]
                
                \begin{array}{l}
                
                \\
                \begin{array}{l}
                \mathbf{if}\;x.re \leq -7.9 \cdot 10^{-305}:\\
                \;\;\;\;y.im \cdot \log x.im\\
                
                \mathbf{else}:\\
                \;\;\;\;y.im \cdot \log x.re\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 2 regimes
                2. if x.re < -7.90000000000000024e-305

                  1. Initial program 38.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 \sin \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. Add Preprocessing
                  3. Taylor expanded in y.im around 0

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

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

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

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

                    \[\leadsto \color{blue}{y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)} \]
                  7. Step-by-step derivation
                    1. *-lowering-*.f64N/A

                      \[\leadsto \mathsf{*.f64}\left(y.im, \color{blue}{\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}\right) \]
                    2. log-lowering-log.f64N/A

                      \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right) \]
                    3. unpow2N/A

                      \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right)\right)\right) \]
                    4. unpow2N/A

                      \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)\right)\right) \]
                    5. accelerator-lowering-hypot.f6416.5%

                      \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right) \]
                  8. Simplified16.5%

                    \[\leadsto \color{blue}{y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)} \]
                  9. Taylor expanded in x.re around 0

                    \[\leadsto \color{blue}{y.im \cdot \log x.im} \]
                  10. Step-by-step derivation
                    1. *-lowering-*.f64N/A

                      \[\leadsto \mathsf{*.f64}\left(y.im, \color{blue}{\log x.im}\right) \]
                    2. log-lowering-log.f646.1%

                      \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(x.im\right)\right) \]
                  11. Simplified6.1%

                    \[\leadsto \color{blue}{y.im \cdot \log x.im} \]

                  if -7.90000000000000024e-305 < x.re

                  1. Initial program 38.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 \sin \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. Add Preprocessing
                  3. Taylor expanded in y.im around 0

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

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

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

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

                    \[\leadsto \color{blue}{y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)} \]
                  7. Step-by-step derivation
                    1. *-lowering-*.f64N/A

                      \[\leadsto \mathsf{*.f64}\left(y.im, \color{blue}{\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}\right) \]
                    2. log-lowering-log.f64N/A

                      \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right) \]
                    3. unpow2N/A

                      \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right)\right)\right) \]
                    4. unpow2N/A

                      \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)\right)\right) \]
                    5. accelerator-lowering-hypot.f6417.1%

                      \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right) \]
                  8. Simplified17.1%

                    \[\leadsto \color{blue}{y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)} \]
                  9. Taylor expanded in x.im around 0

                    \[\leadsto \color{blue}{y.im \cdot \log x.re} \]
                  10. Step-by-step derivation
                    1. *-lowering-*.f64N/A

                      \[\leadsto \mathsf{*.f64}\left(y.im, \color{blue}{\log x.re}\right) \]
                    2. log-lowering-log.f6414.0%

                      \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(x.re\right)\right) \]
                  11. Simplified14.0%

                    \[\leadsto \color{blue}{y.im \cdot \log x.re} \]
                3. Recombined 2 regimes into one program.
                4. Add Preprocessing

                Alternative 26: 13.4% accurate, 8.0× speedup?

                \[\begin{array}{l} \\ y.re \cdot \tan^{-1}_* \frac{x.im}{x.re} \end{array} \]
                (FPCore (x.re x.im y.re y.im) :precision binary64 (* 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) {
                	return y_46_re * atan2(x_46_im, x_46_re);
                }
                
                real(8) function code(x_46re, x_46im, y_46re, y_46im)
                    real(8), intent (in) :: x_46re
                    real(8), intent (in) :: x_46im
                    real(8), intent (in) :: y_46re
                    real(8), intent (in) :: y_46im
                    code = y_46re * atan2(x_46im, x_46re)
                end function
                
                public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
                	return y_46_re * Math.atan2(x_46_im, x_46_re);
                }
                
                def code(x_46_re, x_46_im, y_46_re, y_46_im):
                	return y_46_re * math.atan2(x_46_im, x_46_re)
                
                function code(x_46_re, x_46_im, y_46_re, y_46_im)
                	return Float64(y_46_re * atan(x_46_im, x_46_re))
                end
                
                function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im)
                	tmp = y_46_re * atan2(x_46_im, x_46_re);
                end
                
                code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]
                
                \begin{array}{l}
                
                \\
                y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}
                \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 \sin \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. Add Preprocessing
                3. Taylor expanded in y.im around 0

                  \[\leadsto \color{blue}{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}} \]
                4. Step-by-step derivation
                  1. *-commutativeN/A

                    \[\leadsto {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re} \cdot \color{blue}{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
                  2. *-lowering-*.f64N/A

                    \[\leadsto \mathsf{*.f64}\left(\left({\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}\right), \color{blue}{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\right) \]
                  3. pow-lowering-pow.f64N/A

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right), y.re\right), \sin \color{blue}{\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}\right) \]
                  4. unpow2N/A

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right), y.re\right), \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
                  5. unpow2N/A

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right), y.re\right), \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
                  6. accelerator-lowering-hypot.f64N/A

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \sin \left(\color{blue}{y.re} \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
                  7. sin-lowering-sin.f64N/A

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \mathsf{sin.f64}\left(\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
                  8. *-lowering-*.f64N/A

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
                  9. atan2-lowering-atan2.f6444.2%

                    \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
                5. Simplified44.2%

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

                  \[\leadsto \color{blue}{y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}} \]
                7. Step-by-step derivation
                  1. *-lowering-*.f64N/A

                    \[\leadsto \mathsf{*.f64}\left(y.re, \color{blue}{\tan^{-1}_* \frac{x.im}{x.re}}\right) \]
                  2. atan2-lowering-atan2.f6415.7%

                    \[\leadsto \mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, \color{blue}{x.re}\right)\right) \]
                8. Simplified15.7%

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

                Alternative 27: 5.1% accurate, 8.0× speedup?

                \[\begin{array}{l} \\ y.im \cdot \log x.im \end{array} \]
                (FPCore (x.re x.im y.re y.im) :precision binary64 (* y.im (log x.im)))
                double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
                	return y_46_im * log(x_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 = y_46im * log(x_46im)
                end function
                
                public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
                	return y_46_im * Math.log(x_46_im);
                }
                
                def code(x_46_re, x_46_im, y_46_re, y_46_im):
                	return y_46_im * math.log(x_46_im)
                
                function code(x_46_re, x_46_im, y_46_re, y_46_im)
                	return Float64(y_46_im * log(x_46_im))
                end
                
                function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im)
                	tmp = y_46_im * log(x_46_im);
                end
                
                code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[(y$46$im * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision]
                
                \begin{array}{l}
                
                \\
                y.im \cdot \log x.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 \sin \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. Add Preprocessing
                3. Taylor expanded in y.im around 0

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

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

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

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

                  \[\leadsto \color{blue}{y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)} \]
                7. Step-by-step derivation
                  1. *-lowering-*.f64N/A

                    \[\leadsto \mathsf{*.f64}\left(y.im, \color{blue}{\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}\right) \]
                  2. log-lowering-log.f64N/A

                    \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right) \]
                  3. unpow2N/A

                    \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right)\right)\right) \]
                  4. unpow2N/A

                    \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)\right)\right) \]
                  5. accelerator-lowering-hypot.f6416.8%

                    \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right) \]
                8. Simplified16.8%

                  \[\leadsto \color{blue}{y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)} \]
                9. Taylor expanded in x.re around 0

                  \[\leadsto \color{blue}{y.im \cdot \log x.im} \]
                10. Step-by-step derivation
                  1. *-lowering-*.f64N/A

                    \[\leadsto \mathsf{*.f64}\left(y.im, \color{blue}{\log x.im}\right) \]
                  2. log-lowering-log.f645.1%

                    \[\leadsto \mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(x.im\right)\right) \]
                11. Simplified5.1%

                  \[\leadsto \color{blue}{y.im \cdot \log x.im} \]
                12. Add Preprocessing

                Reproduce

                ?
                herbie shell --seed 2024194 
                (FPCore (x.re x.im y.re y.im)
                  :name "powComplex, imaginary part"
                  :precision binary64
                  (* (exp (- (* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.re) (* (atan2 x.im x.re) y.im))) (sin (+ (* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.im) (* (atan2 x.im x.re) y.re)))))