powComplex, imaginary part

Percentage Accurate: 41.3% → 72.9%
Time: 20.5s
Alternatives: 24
Speedup: 2.0×

Specification

?
\[\begin{array}{l} \\ \begin{array}{l} t_0 := \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)\\ e^{t\_0 \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \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 24 alternatives:

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

Initial Program: 41.3% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)\\ e^{t\_0 \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \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: 72.9% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;x.re \leq 0.014:\\
\;\;\;\;e^{\mathsf{fma}\left(y.im, \frac{-\tan^{-1}_* \frac{x.im}{x.re}}{y.re}, t\_0\right) \cdot y.re} \cdot \frac{-1}{\frac{-1}{\sin \left(\mathsf{fma}\left(t\_0, y.im, t\_1\right)\right)}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x.re < -5.8000000000000003e-12

    1. Initial program 32.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.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. *-commutativeN/A

        \[\leadsto \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) \cdot 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}}} \]
      2. lower-*.f64N/A

        \[\leadsto \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) \cdot 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}}} \]
      3. lower-sin.f64N/A

        \[\leadsto \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)} \cdot 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}} \]
      4. associate-*r*N/A

        \[\leadsto \sin \left(\color{blue}{\left(-1 \cdot y.im\right) \cdot \log \left(\frac{-1}{x.re}\right)} + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot 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}} \]
      5. lower-fma.f64N/A

        \[\leadsto \sin \color{blue}{\left(\mathsf{fma}\left(-1 \cdot y.im, \log \left(\frac{-1}{x.re}\right), y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)} \cdot 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}} \]
      6. neg-mul-1N/A

        \[\leadsto \sin \left(\mathsf{fma}\left(\color{blue}{\mathsf{neg}\left(y.im\right)}, \log \left(\frac{-1}{x.re}\right), y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \cdot 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}} \]
      7. lower-neg.f64N/A

        \[\leadsto \sin \left(\mathsf{fma}\left(\color{blue}{-y.im}, \log \left(\frac{-1}{x.re}\right), y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \cdot 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}} \]
      8. lower-log.f64N/A

        \[\leadsto \sin \left(\mathsf{fma}\left(-y.im, \color{blue}{\log \left(\frac{-1}{x.re}\right)}, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \cdot 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}} \]
      9. lower-/.f64N/A

        \[\leadsto \sin \left(\mathsf{fma}\left(-y.im, \log \color{blue}{\left(\frac{-1}{x.re}\right)}, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \cdot 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}} \]
      10. *-commutativeN/A

        \[\leadsto \sin \left(\mathsf{fma}\left(-y.im, \log \left(\frac{-1}{x.re}\right), \color{blue}{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re}\right)\right) \cdot 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}} \]
      11. lower-*.f64N/A

        \[\leadsto \sin \left(\mathsf{fma}\left(-y.im, \log \left(\frac{-1}{x.re}\right), \color{blue}{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re}\right)\right) \cdot 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}} \]
      12. lower-atan2.f64N/A

        \[\leadsto \sin \left(\mathsf{fma}\left(-y.im, \log \left(\frac{-1}{x.re}\right), \color{blue}{\tan^{-1}_* \frac{x.im}{x.re}} \cdot y.re\right)\right) \cdot 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}} \]
      13. lower-exp.f64N/A

        \[\leadsto \sin \left(\mathsf{fma}\left(-y.im, \log \left(\frac{-1}{x.re}\right), \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\right) \cdot \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}}} \]
      14. sub-negN/A

        \[\leadsto \sin \left(\mathsf{fma}\left(-y.im, \log \left(\frac{-1}{x.re}\right), \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\right) \cdot e^{\color{blue}{-1 \cdot \left(y.re \cdot \log \left(\frac{-1}{x.re}\right)\right) + \left(\mathsf{neg}\left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)}} \]
    5. Applied rewrites75.0%

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

    if -5.8000000000000003e-12 < x.re < 0.0140000000000000003

    1. Initial program 49.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.re around inf

      \[\leadsto e^{\color{blue}{y.re \cdot \left(\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right) + -1 \cdot \frac{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}{y.re}\right)}} \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) \]
    4. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto e^{\color{blue}{\left(\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right) + -1 \cdot \frac{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}{y.re}\right) \cdot y.re}} \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. lower-*.f64N/A

        \[\leadsto e^{\color{blue}{\left(\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right) + -1 \cdot \frac{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}{y.re}\right) \cdot y.re}} \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) \]
    5. Applied rewrites48.4%

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

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

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

    if 0.0140000000000000003 < x.re

    1. Initial program 29.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 \color{blue}{{\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
      2. lower-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{{\left(\sqrt{\mathsf{hypot}\left(x.re, x.im\right)}\right)}^{y.re} \cdot \sin \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)} \]
    6. 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)} \]
    7. Step-by-step derivation
      1. lower-*.f64N/A

        \[\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)} \]
      2. lower-exp.f64N/A

        \[\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) \]
      3. sub-negN/A

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

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

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

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

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

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

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

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

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

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

        \[\leadsto e^{\mathsf{fma}\left(y.re, \log x.re, \left(-y.im\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \cdot \sin \left(\mathsf{fma}\left(y.im, \log x.re, \color{blue}{y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}}\right)\right) \]
      14. lower-atan2.f6476.8

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

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

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

Alternative 2: 68.8% accurate, 0.9× speedup?

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

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

\mathbf{elif}\;x.re \leq 6.2 \cdot 10^{+15}:\\
\;\;\;\;\sin \left(t\_2 \cdot y.im\right) \cdot e^{\mathsf{fma}\left(y.im, \frac{-\tan^{-1}_* \frac{x.im}{x.re}}{y.re}, t\_2\right) \cdot y.re}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x.re < -7.4999999999999996e-14

    1. Initial program 32.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.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. *-commutativeN/A

        \[\leadsto \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) \cdot 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}}} \]
      2. lower-*.f64N/A

        \[\leadsto \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) \cdot 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}}} \]
      3. lower-sin.f64N/A

        \[\leadsto \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)} \cdot 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}} \]
      4. associate-*r*N/A

        \[\leadsto \sin \left(\color{blue}{\left(-1 \cdot y.im\right) \cdot \log \left(\frac{-1}{x.re}\right)} + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot 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}} \]
      5. lower-fma.f64N/A

        \[\leadsto \sin \color{blue}{\left(\mathsf{fma}\left(-1 \cdot y.im, \log \left(\frac{-1}{x.re}\right), y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)} \cdot 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}} \]
      6. neg-mul-1N/A

        \[\leadsto \sin \left(\mathsf{fma}\left(\color{blue}{\mathsf{neg}\left(y.im\right)}, \log \left(\frac{-1}{x.re}\right), y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \cdot 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}} \]
      7. lower-neg.f64N/A

        \[\leadsto \sin \left(\mathsf{fma}\left(\color{blue}{-y.im}, \log \left(\frac{-1}{x.re}\right), y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \cdot 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}} \]
      8. lower-log.f64N/A

        \[\leadsto \sin \left(\mathsf{fma}\left(-y.im, \color{blue}{\log \left(\frac{-1}{x.re}\right)}, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \cdot 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}} \]
      9. lower-/.f64N/A

        \[\leadsto \sin \left(\mathsf{fma}\left(-y.im, \log \color{blue}{\left(\frac{-1}{x.re}\right)}, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \cdot 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}} \]
      10. *-commutativeN/A

        \[\leadsto \sin \left(\mathsf{fma}\left(-y.im, \log \left(\frac{-1}{x.re}\right), \color{blue}{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re}\right)\right) \cdot 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}} \]
      11. lower-*.f64N/A

        \[\leadsto \sin \left(\mathsf{fma}\left(-y.im, \log \left(\frac{-1}{x.re}\right), \color{blue}{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re}\right)\right) \cdot 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}} \]
      12. lower-atan2.f64N/A

        \[\leadsto \sin \left(\mathsf{fma}\left(-y.im, \log \left(\frac{-1}{x.re}\right), \color{blue}{\tan^{-1}_* \frac{x.im}{x.re}} \cdot y.re\right)\right) \cdot 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}} \]
      13. lower-exp.f64N/A

        \[\leadsto \sin \left(\mathsf{fma}\left(-y.im, \log \left(\frac{-1}{x.re}\right), \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\right) \cdot \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}}} \]
      14. sub-negN/A

        \[\leadsto \sin \left(\mathsf{fma}\left(-y.im, \log \left(\frac{-1}{x.re}\right), \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\right) \cdot e^{\color{blue}{-1 \cdot \left(y.re \cdot \log \left(\frac{-1}{x.re}\right)\right) + \left(\mathsf{neg}\left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)}} \]
    5. Applied rewrites75.0%

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

    if -7.4999999999999996e-14 < x.re < 6.2e15

    1. Initial program 49.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 inf

      \[\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 \sin \color{blue}{\left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)} \]
    4. Step-by-step derivation
      1. *-commutativeN/A

        \[\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 \sin \color{blue}{\left(\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right) \cdot y.im\right)} \]
      2. lower-*.f64N/A

        \[\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 \sin \color{blue}{\left(\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right) \cdot y.im\right)} \]
      3. lower-log.f64N/A

        \[\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 \sin \left(\color{blue}{\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)} \cdot y.im\right) \]
      4. lower-sqrt.f64N/A

        \[\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 \sin \left(\log \color{blue}{\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)} \cdot y.im\right) \]
      5. +-commutativeN/A

        \[\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 \sin \left(\log \left(\sqrt{\color{blue}{{x.re}^{2} + {x.im}^{2}}}\right) \cdot y.im\right) \]
      6. unpow2N/A

        \[\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 \sin \left(\log \left(\sqrt{\color{blue}{x.re \cdot x.re} + {x.im}^{2}}\right) \cdot y.im\right) \]
      7. unpow2N/A

        \[\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 \sin \left(\log \left(\sqrt{x.re \cdot x.re + \color{blue}{x.im \cdot x.im}}\right) \cdot y.im\right) \]
      8. lower-hypot.f6469.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 \sin \left(\log \left(\sqrt{\color{blue}{\mathsf{hypot}\left(x.re, x.im\right)}}\right) \cdot y.im\right) \]
    5. Applied rewrites69.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 \sin \color{blue}{\left(\log \left(\sqrt{\mathsf{hypot}\left(x.re, x.im\right)}\right) \cdot y.im\right)} \]
    6. Taylor expanded in y.re around inf

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

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

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

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

    if 6.2e15 < x.re

    1. Initial program 26.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 \color{blue}{{\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
      2. lower-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{{\left(\sqrt{\mathsf{hypot}\left(x.re, x.im\right)}\right)}^{y.re} \cdot \sin \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)} \]
    6. 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)} \]
    7. Step-by-step derivation
      1. lower-*.f64N/A

        \[\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)} \]
      2. lower-exp.f64N/A

        \[\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) \]
      3. sub-negN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 66.1% accurate, 1.0× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x.re < -7.4999999999999996e-14

    1. Initial program 32.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.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. *-commutativeN/A

        \[\leadsto \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) \cdot 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}}} \]
      2. lower-*.f64N/A

        \[\leadsto \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) \cdot 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}}} \]
      3. lower-sin.f64N/A

        \[\leadsto \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)} \cdot 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}} \]
      4. associate-*r*N/A

        \[\leadsto \sin \left(\color{blue}{\left(-1 \cdot y.im\right) \cdot \log \left(\frac{-1}{x.re}\right)} + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot 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}} \]
      5. lower-fma.f64N/A

        \[\leadsto \sin \color{blue}{\left(\mathsf{fma}\left(-1 \cdot y.im, \log \left(\frac{-1}{x.re}\right), y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)} \cdot 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}} \]
      6. neg-mul-1N/A

        \[\leadsto \sin \left(\mathsf{fma}\left(\color{blue}{\mathsf{neg}\left(y.im\right)}, \log \left(\frac{-1}{x.re}\right), y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \cdot 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}} \]
      7. lower-neg.f64N/A

        \[\leadsto \sin \left(\mathsf{fma}\left(\color{blue}{-y.im}, \log \left(\frac{-1}{x.re}\right), y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \cdot 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}} \]
      8. lower-log.f64N/A

        \[\leadsto \sin \left(\mathsf{fma}\left(-y.im, \color{blue}{\log \left(\frac{-1}{x.re}\right)}, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \cdot 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}} \]
      9. lower-/.f64N/A

        \[\leadsto \sin \left(\mathsf{fma}\left(-y.im, \log \color{blue}{\left(\frac{-1}{x.re}\right)}, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \cdot 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}} \]
      10. *-commutativeN/A

        \[\leadsto \sin \left(\mathsf{fma}\left(-y.im, \log \left(\frac{-1}{x.re}\right), \color{blue}{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re}\right)\right) \cdot 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}} \]
      11. lower-*.f64N/A

        \[\leadsto \sin \left(\mathsf{fma}\left(-y.im, \log \left(\frac{-1}{x.re}\right), \color{blue}{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re}\right)\right) \cdot 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}} \]
      12. lower-atan2.f64N/A

        \[\leadsto \sin \left(\mathsf{fma}\left(-y.im, \log \left(\frac{-1}{x.re}\right), \color{blue}{\tan^{-1}_* \frac{x.im}{x.re}} \cdot y.re\right)\right) \cdot 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}} \]
      13. lower-exp.f64N/A

        \[\leadsto \sin \left(\mathsf{fma}\left(-y.im, \log \left(\frac{-1}{x.re}\right), \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\right) \cdot \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}}} \]
      14. sub-negN/A

        \[\leadsto \sin \left(\mathsf{fma}\left(-y.im, \log \left(\frac{-1}{x.re}\right), \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\right) \cdot e^{\color{blue}{-1 \cdot \left(y.re \cdot \log \left(\frac{-1}{x.re}\right)\right) + \left(\mathsf{neg}\left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)}} \]
    5. Applied rewrites75.0%

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

    if -7.4999999999999996e-14 < x.re < 5.5e15

    1. Initial program 49.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 inf

      \[\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 \sin \color{blue}{\left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)} \]
    4. Step-by-step derivation
      1. *-commutativeN/A

        \[\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 \sin \color{blue}{\left(\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right) \cdot y.im\right)} \]
      2. lower-*.f64N/A

        \[\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 \sin \color{blue}{\left(\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right) \cdot y.im\right)} \]
      3. lower-log.f64N/A

        \[\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 \sin \left(\color{blue}{\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)} \cdot y.im\right) \]
      4. lower-sqrt.f64N/A

        \[\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 \sin \left(\log \color{blue}{\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)} \cdot y.im\right) \]
      5. +-commutativeN/A

        \[\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 \sin \left(\log \left(\sqrt{\color{blue}{{x.re}^{2} + {x.im}^{2}}}\right) \cdot y.im\right) \]
      6. unpow2N/A

        \[\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 \sin \left(\log \left(\sqrt{\color{blue}{x.re \cdot x.re} + {x.im}^{2}}\right) \cdot y.im\right) \]
      7. unpow2N/A

        \[\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 \sin \left(\log \left(\sqrt{x.re \cdot x.re + \color{blue}{x.im \cdot x.im}}\right) \cdot y.im\right) \]
      8. lower-hypot.f6469.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 \sin \left(\log \left(\sqrt{\color{blue}{\mathsf{hypot}\left(x.re, x.im\right)}}\right) \cdot y.im\right) \]
    5. Applied rewrites69.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 \sin \color{blue}{\left(\log \left(\sqrt{\mathsf{hypot}\left(x.re, x.im\right)}\right) \cdot y.im\right)} \]

    if 5.5e15 < x.re

    1. Initial program 26.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 \color{blue}{{\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
      2. lower-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{{\left(\sqrt{\mathsf{hypot}\left(x.re, x.im\right)}\right)}^{y.re} \cdot \sin \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)} \]
    6. 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)} \]
    7. Step-by-step derivation
      1. lower-*.f64N/A

        \[\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)} \]
      2. lower-exp.f64N/A

        \[\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) \]
      3. sub-negN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 68.0% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;x.re \leq 0.095:\\
\;\;\;\;\sin t\_1 \cdot e^{\log \left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right) \cdot y.re - t\_0}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x.re < -4.00000000000000007e-87

    1. Initial program 40.8%

      \[e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \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. *-commutativeN/A

        \[\leadsto \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) \cdot 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}}} \]
      2. lower-*.f64N/A

        \[\leadsto \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) \cdot 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}}} \]
      3. lower-sin.f64N/A

        \[\leadsto \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)} \cdot 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}} \]
      4. associate-*r*N/A

        \[\leadsto \sin \left(\color{blue}{\left(-1 \cdot y.im\right) \cdot \log \left(\frac{-1}{x.re}\right)} + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot 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}} \]
      5. lower-fma.f64N/A

        \[\leadsto \sin \color{blue}{\left(\mathsf{fma}\left(-1 \cdot y.im, \log \left(\frac{-1}{x.re}\right), y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)} \cdot 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}} \]
      6. neg-mul-1N/A

        \[\leadsto \sin \left(\mathsf{fma}\left(\color{blue}{\mathsf{neg}\left(y.im\right)}, \log \left(\frac{-1}{x.re}\right), y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \cdot 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}} \]
      7. lower-neg.f64N/A

        \[\leadsto \sin \left(\mathsf{fma}\left(\color{blue}{-y.im}, \log \left(\frac{-1}{x.re}\right), y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \cdot 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}} \]
      8. lower-log.f64N/A

        \[\leadsto \sin \left(\mathsf{fma}\left(-y.im, \color{blue}{\log \left(\frac{-1}{x.re}\right)}, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \cdot 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}} \]
      9. lower-/.f64N/A

        \[\leadsto \sin \left(\mathsf{fma}\left(-y.im, \log \color{blue}{\left(\frac{-1}{x.re}\right)}, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \cdot 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}} \]
      10. *-commutativeN/A

        \[\leadsto \sin \left(\mathsf{fma}\left(-y.im, \log \left(\frac{-1}{x.re}\right), \color{blue}{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re}\right)\right) \cdot 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}} \]
      11. lower-*.f64N/A

        \[\leadsto \sin \left(\mathsf{fma}\left(-y.im, \log \left(\frac{-1}{x.re}\right), \color{blue}{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re}\right)\right) \cdot 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}} \]
      12. lower-atan2.f64N/A

        \[\leadsto \sin \left(\mathsf{fma}\left(-y.im, \log \left(\frac{-1}{x.re}\right), \color{blue}{\tan^{-1}_* \frac{x.im}{x.re}} \cdot y.re\right)\right) \cdot 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}} \]
      13. lower-exp.f64N/A

        \[\leadsto \sin \left(\mathsf{fma}\left(-y.im, \log \left(\frac{-1}{x.re}\right), \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\right) \cdot \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}}} \]
      14. sub-negN/A

        \[\leadsto \sin \left(\mathsf{fma}\left(-y.im, \log \left(\frac{-1}{x.re}\right), \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\right) \cdot e^{\color{blue}{-1 \cdot \left(y.re \cdot \log \left(\frac{-1}{x.re}\right)\right) + \left(\mathsf{neg}\left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)}} \]
    5. Applied rewrites74.4%

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

    if -4.00000000000000007e-87 < x.re < 0.095000000000000001

    1. Initial program 46.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 e^{\log \left(\sqrt{x.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 \color{blue}{\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
    4. Step-by-step derivation
      1. *-commutativeN/A

        \[\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 \sin \color{blue}{\left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)} \]
      2. lower-*.f64N/A

        \[\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 \sin \color{blue}{\left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)} \]
      3. lower-atan2.f6467.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 \sin \left(\color{blue}{\tan^{-1}_* \frac{x.im}{x.re}} \cdot y.re\right) \]
    5. Applied rewrites67.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 \sin \color{blue}{\left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)} \]

    if 0.095000000000000001 < x.re

    1. Initial program 29.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 \color{blue}{{\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
      2. lower-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{{\left(\sqrt{\mathsf{hypot}\left(x.re, x.im\right)}\right)}^{y.re} \cdot \sin \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)} \]
    6. 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)} \]
    7. Step-by-step derivation
      1. lower-*.f64N/A

        \[\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)} \]
      2. lower-exp.f64N/A

        \[\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) \]
      3. sub-negN/A

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

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

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

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

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

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

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

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

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

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

        \[\leadsto e^{\mathsf{fma}\left(y.re, \log x.re, \left(-y.im\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \cdot \sin \left(\mathsf{fma}\left(y.im, \log x.re, \color{blue}{y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}}\right)\right) \]
      14. lower-atan2.f6476.8

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

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

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

Alternative 5: 64.3% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
t_0 := \sin \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \cdot e^{\log \left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\
\mathbf{if}\;y.re \leq -9.2 \cdot 10^{-10}:\\
\;\;\;\;t\_0\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y.re < -9.20000000000000028e-10 or 0.017000000000000001 < y.re

    1. Initial program 41.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 e^{\log \left(\sqrt{x.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 \color{blue}{\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
    4. Step-by-step derivation
      1. *-commutativeN/A

        \[\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 \sin \color{blue}{\left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)} \]
      2. lower-*.f64N/A

        \[\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 \sin \color{blue}{\left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)} \]
      3. lower-atan2.f6477.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 \sin \left(\color{blue}{\tan^{-1}_* \frac{x.im}{x.re}} \cdot y.re\right) \]
    5. Applied rewrites77.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 \sin \color{blue}{\left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)} \]

    if -9.20000000000000028e-10 < y.re < 0.017000000000000001

    1. Initial program 40.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 inf

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

        \[\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 \sin \color{blue}{\left(\left(\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right) + \frac{y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}}{y.im}\right) \cdot y.im\right)} \]
      2. lower-*.f64N/A

        \[\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 \sin \color{blue}{\left(\left(\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right) + \frac{y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}}{y.im}\right) \cdot y.im\right)} \]
      3. +-commutativeN/A

        \[\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 \sin \left(\color{blue}{\left(\frac{y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}}{y.im} + \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)} \cdot y.im\right) \]
      4. associate-/l*N/A

        \[\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 \sin \left(\left(\color{blue}{y.re \cdot \frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.im}} + \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right) \cdot y.im\right) \]
      5. lower-fma.f64N/A

        \[\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 \sin \left(\color{blue}{\mathsf{fma}\left(y.re, \frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.im}, \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)} \cdot y.im\right) \]
      6. lower-/.f64N/A

        \[\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 \sin \left(\mathsf{fma}\left(y.re, \color{blue}{\frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.im}}, \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right) \cdot y.im\right) \]
      7. lower-atan2.f64N/A

        \[\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 \sin \left(\mathsf{fma}\left(y.re, \frac{\color{blue}{\tan^{-1}_* \frac{x.im}{x.re}}}{y.im}, \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right) \cdot y.im\right) \]
      8. lower-log.f64N/A

        \[\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 \sin \left(\mathsf{fma}\left(y.re, \frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.im}, \color{blue}{\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}\right) \cdot y.im\right) \]
      9. lower-sqrt.f64N/A

        \[\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 \sin \left(\mathsf{fma}\left(y.re, \frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.im}, \log \color{blue}{\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}\right) \cdot y.im\right) \]
      10. +-commutativeN/A

        \[\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 \sin \left(\mathsf{fma}\left(y.re, \frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.im}, \log \left(\sqrt{\color{blue}{{x.re}^{2} + {x.im}^{2}}}\right)\right) \cdot y.im\right) \]
      11. unpow2N/A

        \[\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 \sin \left(\mathsf{fma}\left(y.re, \frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.im}, \log \left(\sqrt{\color{blue}{x.re \cdot x.re} + {x.im}^{2}}\right)\right) \cdot y.im\right) \]
      12. unpow2N/A

        \[\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 \sin \left(\mathsf{fma}\left(y.re, \frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.im}, \log \left(\sqrt{x.re \cdot x.re + \color{blue}{x.im \cdot x.im}}\right)\right) \cdot y.im\right) \]
      13. lower-hypot.f6444.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 \sin \left(\mathsf{fma}\left(y.re, \frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.im}, \log \left(\sqrt{\color{blue}{\mathsf{hypot}\left(x.re, x.im\right)}}\right)\right) \cdot y.im\right) \]
    5. Applied rewrites44.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 \sin \color{blue}{\left(\mathsf{fma}\left(y.re, \frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.im}, \log \left(\sqrt{\mathsf{hypot}\left(x.re, x.im\right)}\right)\right) \cdot y.im\right)} \]
    6. Taylor expanded in y.im around inf

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

        \[\leadsto e^{\color{blue}{\mathsf{neg}\left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}} \cdot \sin \left(\mathsf{fma}\left(y.re, \frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.im}, \log \left(\sqrt{\mathsf{hypot}\left(x.re, x.im\right)}\right)\right) \cdot y.im\right) \]
      2. distribute-lft-neg-inN/A

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

        \[\leadsto e^{\color{blue}{\left(\mathsf{neg}\left(y.im\right)\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}}} \cdot \sin \left(\mathsf{fma}\left(y.re, \frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.im}, \log \left(\sqrt{\mathsf{hypot}\left(x.re, x.im\right)}\right)\right) \cdot y.im\right) \]
      4. lower-neg.f64N/A

        \[\leadsto e^{\color{blue}{\left(-y.im\right)} \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \sin \left(\mathsf{fma}\left(y.re, \frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.im}, \log \left(\sqrt{\mathsf{hypot}\left(x.re, x.im\right)}\right)\right) \cdot y.im\right) \]
      5. lower-atan2.f6460.8

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

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

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

Alternative 6: 62.8% accurate, 1.1× speedup?

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

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

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

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


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

    1. Initial program 41.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 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. *-commutativeN/A

        \[\leadsto \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) \cdot 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}}} \]
      2. lower-*.f64N/A

        \[\leadsto \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) \cdot 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}}} \]
      3. lower-sin.f64N/A

        \[\leadsto \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)} \cdot 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}} \]
      4. associate-*r*N/A

        \[\leadsto \sin \left(\color{blue}{\left(-1 \cdot y.im\right) \cdot \log \left(\frac{-1}{x.im}\right)} + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot 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}} \]
      5. lower-fma.f64N/A

        \[\leadsto \sin \color{blue}{\left(\mathsf{fma}\left(-1 \cdot y.im, \log \left(\frac{-1}{x.im}\right), y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)} \cdot 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}} \]
      6. neg-mul-1N/A

        \[\leadsto \sin \left(\mathsf{fma}\left(\color{blue}{\mathsf{neg}\left(y.im\right)}, \log \left(\frac{-1}{x.im}\right), y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \cdot 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}} \]
      7. lower-neg.f64N/A

        \[\leadsto \sin \left(\mathsf{fma}\left(\color{blue}{-y.im}, \log \left(\frac{-1}{x.im}\right), y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \cdot 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}} \]
      8. lower-log.f64N/A

        \[\leadsto \sin \left(\mathsf{fma}\left(-y.im, \color{blue}{\log \left(\frac{-1}{x.im}\right)}, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \cdot 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}} \]
      9. lower-/.f64N/A

        \[\leadsto \sin \left(\mathsf{fma}\left(-y.im, \log \color{blue}{\left(\frac{-1}{x.im}\right)}, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \cdot 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}} \]
      10. *-commutativeN/A

        \[\leadsto \sin \left(\mathsf{fma}\left(-y.im, \log \left(\frac{-1}{x.im}\right), \color{blue}{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re}\right)\right) \cdot 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}} \]
      11. lower-*.f64N/A

        \[\leadsto \sin \left(\mathsf{fma}\left(-y.im, \log \left(\frac{-1}{x.im}\right), \color{blue}{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re}\right)\right) \cdot 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}} \]
      12. lower-atan2.f64N/A

        \[\leadsto \sin \left(\mathsf{fma}\left(-y.im, \log \left(\frac{-1}{x.im}\right), \color{blue}{\tan^{-1}_* \frac{x.im}{x.re}} \cdot y.re\right)\right) \cdot 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}} \]
      13. lower-exp.f64N/A

        \[\leadsto \sin \left(\mathsf{fma}\left(-y.im, \log \left(\frac{-1}{x.im}\right), \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\right) \cdot \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}}} \]
      14. sub-negN/A

        \[\leadsto \sin \left(\mathsf{fma}\left(-y.im, \log \left(\frac{-1}{x.im}\right), \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\right) \cdot e^{\color{blue}{-1 \cdot \left(y.re \cdot \log \left(\frac{-1}{x.im}\right)\right) + \left(\mathsf{neg}\left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)}} \]
    5. Applied rewrites77.6%

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

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

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

      if -1.7999999999999999e-104 < x.im < 11.5

      1. Initial program 48.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 e^{\log \left(\sqrt{x.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 \color{blue}{\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
      4. Step-by-step derivation
        1. *-commutativeN/A

          \[\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 \sin \color{blue}{\left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)} \]
        2. lower-*.f64N/A

          \[\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 \sin \color{blue}{\left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)} \]
        3. lower-atan2.f6462.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 \sin \left(\color{blue}{\tan^{-1}_* \frac{x.im}{x.re}} \cdot y.re\right) \]
      5. Applied rewrites62.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 \sin \color{blue}{\left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)} \]

      if 11.5 < x.im

      1. Initial program 27.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 \color{blue}{{\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
        2. lower-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{{\left(\sqrt{\mathsf{hypot}\left(x.re, x.im\right)}\right)}^{y.re} \cdot \sin \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)} \]
      6. 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)} \]
      7. Step-by-step derivation
        1. lower-*.f64N/A

          \[\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)} \]
        2. lower-exp.f64N/A

          \[\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) \]
        3. lower--.f64N/A

          \[\leadsto e^{\color{blue}{-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. mul-1-negN/A

          \[\leadsto e^{\color{blue}{\left(\mathsf{neg}\left(y.re \cdot \log \left(\frac{1}{x.im}\right)\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) \]
        5. lower-neg.f64N/A

          \[\leadsto e^{\color{blue}{\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) \]
        6. lower-*.f64N/A

          \[\leadsto e^{\left(-\color{blue}{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) \]
        7. log-recN/A

          \[\leadsto e^{\left(-y.re \cdot \color{blue}{\left(\mathsf{neg}\left(\log x.im\right)\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) \]
        8. lower-neg.f64N/A

          \[\leadsto e^{\left(-y.re \cdot \color{blue}{\left(-\log 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) \]
        9. lower-log.f64N/A

          \[\leadsto e^{\left(-y.re \cdot \left(-\color{blue}{\log 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) \]
        10. lower-*.f64N/A

          \[\leadsto e^{\left(-y.re \cdot \left(-\log x.im\right)\right) - \color{blue}{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) \]
        11. lower-atan2.f64N/A

          \[\leadsto e^{\left(-y.re \cdot \left(-\log x.im\right)\right) - y.im \cdot \color{blue}{\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) \]
        12. lower-sin.f64N/A

          \[\leadsto e^{\left(-y.re \cdot \left(-\log x.im\right)\right) - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \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)} \]
        13. +-commutativeN/A

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

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;x.im \leq -1.8 \cdot 10^{-104}:\\ \;\;\;\;e^{-\mathsf{fma}\left(\log \left(\frac{-1}{x.im}\right), y.re, \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\right)} \cdot \sin \left(\log \left(\frac{-1}{x.im}\right) \cdot \left(-y.im\right)\right)\\ \mathbf{elif}\;x.im \leq 11.5:\\ \;\;\;\;\sin \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \cdot e^{\log \left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\ \mathbf{else}:\\ \;\;\;\;\sin \left(\mathsf{fma}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}, \log x.im \cdot y.im\right)\right) \cdot e^{\log x.im \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\ \end{array} \]
    10. Add Preprocessing

    Alternative 7: 62.8% accurate, 1.1× speedup?

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

      1. Initial program 41.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 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. *-commutativeN/A

          \[\leadsto \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) \cdot 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}}} \]
        2. lower-*.f64N/A

          \[\leadsto \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) \cdot 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}}} \]
        3. lower-sin.f64N/A

          \[\leadsto \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)} \cdot 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}} \]
        4. associate-*r*N/A

          \[\leadsto \sin \left(\color{blue}{\left(-1 \cdot y.im\right) \cdot \log \left(\frac{-1}{x.im}\right)} + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot 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}} \]
        5. lower-fma.f64N/A

          \[\leadsto \sin \color{blue}{\left(\mathsf{fma}\left(-1 \cdot y.im, \log \left(\frac{-1}{x.im}\right), y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)} \cdot 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}} \]
        6. neg-mul-1N/A

          \[\leadsto \sin \left(\mathsf{fma}\left(\color{blue}{\mathsf{neg}\left(y.im\right)}, \log \left(\frac{-1}{x.im}\right), y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \cdot 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}} \]
        7. lower-neg.f64N/A

          \[\leadsto \sin \left(\mathsf{fma}\left(\color{blue}{-y.im}, \log \left(\frac{-1}{x.im}\right), y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \cdot 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}} \]
        8. lower-log.f64N/A

          \[\leadsto \sin \left(\mathsf{fma}\left(-y.im, \color{blue}{\log \left(\frac{-1}{x.im}\right)}, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \cdot 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}} \]
        9. lower-/.f64N/A

          \[\leadsto \sin \left(\mathsf{fma}\left(-y.im, \log \color{blue}{\left(\frac{-1}{x.im}\right)}, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \cdot 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}} \]
        10. *-commutativeN/A

          \[\leadsto \sin \left(\mathsf{fma}\left(-y.im, \log \left(\frac{-1}{x.im}\right), \color{blue}{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re}\right)\right) \cdot 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}} \]
        11. lower-*.f64N/A

          \[\leadsto \sin \left(\mathsf{fma}\left(-y.im, \log \left(\frac{-1}{x.im}\right), \color{blue}{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re}\right)\right) \cdot 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}} \]
        12. lower-atan2.f64N/A

          \[\leadsto \sin \left(\mathsf{fma}\left(-y.im, \log \left(\frac{-1}{x.im}\right), \color{blue}{\tan^{-1}_* \frac{x.im}{x.re}} \cdot y.re\right)\right) \cdot 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}} \]
        13. lower-exp.f64N/A

          \[\leadsto \sin \left(\mathsf{fma}\left(-y.im, \log \left(\frac{-1}{x.im}\right), \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\right) \cdot \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}}} \]
        14. sub-negN/A

          \[\leadsto \sin \left(\mathsf{fma}\left(-y.im, \log \left(\frac{-1}{x.im}\right), \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\right) \cdot e^{\color{blue}{-1 \cdot \left(y.re \cdot \log \left(\frac{-1}{x.im}\right)\right) + \left(\mathsf{neg}\left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)}} \]
      5. Applied rewrites77.6%

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

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

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

        if -1.7999999999999999e-104 < x.im < 11.5

        1. Initial program 48.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 e^{\log \left(\sqrt{x.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 \color{blue}{\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
        4. Step-by-step derivation
          1. *-commutativeN/A

            \[\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 \sin \color{blue}{\left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)} \]
          2. lower-*.f64N/A

            \[\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 \sin \color{blue}{\left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)} \]
          3. lower-atan2.f6462.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 \sin \left(\color{blue}{\tan^{-1}_* \frac{x.im}{x.re}} \cdot y.re\right) \]
        5. Applied rewrites62.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 \sin \color{blue}{\left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)} \]

        if 11.5 < x.im

        1. Initial program 27.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 \color{blue}{{\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
          2. lower-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto e^{\mathsf{fma}\left(y.re, \log x.im, \left(-y.im\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \cdot \sin \left(\mathsf{fma}\left(y.im, \log x.im, \color{blue}{y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}}\right)\right) \]
          14. lower-atan2.f6472.3

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

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;x.im \leq -1.8 \cdot 10^{-104}:\\ \;\;\;\;e^{-\mathsf{fma}\left(\log \left(\frac{-1}{x.im}\right), y.re, \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\right)} \cdot \sin \left(\log \left(\frac{-1}{x.im}\right) \cdot \left(-y.im\right)\right)\\ \mathbf{elif}\;x.im \leq 11.5:\\ \;\;\;\;\sin \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \cdot e^{\log \left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\ \mathbf{else}:\\ \;\;\;\;\sin \left(\mathsf{fma}\left(y.im, \log x.im, \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\right) \cdot e^{\mathsf{fma}\left(y.re, \log x.im, \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)\right)}\\ \end{array} \]
      10. Add Preprocessing

      Alternative 8: 59.8% accurate, 1.2× speedup?

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

        1. Initial program 41.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 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. *-commutativeN/A

            \[\leadsto \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) \cdot 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}}} \]
          2. lower-*.f64N/A

            \[\leadsto \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) \cdot 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}}} \]
          3. lower-sin.f64N/A

            \[\leadsto \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)} \cdot 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}} \]
          4. associate-*r*N/A

            \[\leadsto \sin \left(\color{blue}{\left(-1 \cdot y.im\right) \cdot \log \left(\frac{-1}{x.im}\right)} + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot 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}} \]
          5. lower-fma.f64N/A

            \[\leadsto \sin \color{blue}{\left(\mathsf{fma}\left(-1 \cdot y.im, \log \left(\frac{-1}{x.im}\right), y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)} \cdot 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}} \]
          6. neg-mul-1N/A

            \[\leadsto \sin \left(\mathsf{fma}\left(\color{blue}{\mathsf{neg}\left(y.im\right)}, \log \left(\frac{-1}{x.im}\right), y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \cdot 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}} \]
          7. lower-neg.f64N/A

            \[\leadsto \sin \left(\mathsf{fma}\left(\color{blue}{-y.im}, \log \left(\frac{-1}{x.im}\right), y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \cdot 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}} \]
          8. lower-log.f64N/A

            \[\leadsto \sin \left(\mathsf{fma}\left(-y.im, \color{blue}{\log \left(\frac{-1}{x.im}\right)}, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \cdot 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}} \]
          9. lower-/.f64N/A

            \[\leadsto \sin \left(\mathsf{fma}\left(-y.im, \log \color{blue}{\left(\frac{-1}{x.im}\right)}, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \cdot 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}} \]
          10. *-commutativeN/A

            \[\leadsto \sin \left(\mathsf{fma}\left(-y.im, \log \left(\frac{-1}{x.im}\right), \color{blue}{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re}\right)\right) \cdot 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}} \]
          11. lower-*.f64N/A

            \[\leadsto \sin \left(\mathsf{fma}\left(-y.im, \log \left(\frac{-1}{x.im}\right), \color{blue}{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re}\right)\right) \cdot 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}} \]
          12. lower-atan2.f64N/A

            \[\leadsto \sin \left(\mathsf{fma}\left(-y.im, \log \left(\frac{-1}{x.im}\right), \color{blue}{\tan^{-1}_* \frac{x.im}{x.re}} \cdot y.re\right)\right) \cdot 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}} \]
          13. lower-exp.f64N/A

            \[\leadsto \sin \left(\mathsf{fma}\left(-y.im, \log \left(\frac{-1}{x.im}\right), \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\right) \cdot \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}}} \]
          14. sub-negN/A

            \[\leadsto \sin \left(\mathsf{fma}\left(-y.im, \log \left(\frac{-1}{x.im}\right), \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\right) \cdot e^{\color{blue}{-1 \cdot \left(y.re \cdot \log \left(\frac{-1}{x.im}\right)\right) + \left(\mathsf{neg}\left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)}} \]
        5. Applied rewrites77.6%

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

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

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

          if -1.7999999999999999e-104 < x.im < 5.4999999999999999e-6

          1. Initial program 48.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 e^{\log \left(\sqrt{x.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 \color{blue}{\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
          4. Step-by-step derivation
            1. *-commutativeN/A

              \[\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 \sin \color{blue}{\left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)} \]
            2. lower-*.f64N/A

              \[\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 \sin \color{blue}{\left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)} \]
            3. lower-atan2.f6462.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 \sin \left(\color{blue}{\tan^{-1}_* \frac{x.im}{x.re}} \cdot y.re\right) \]
          5. Applied rewrites62.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 \sin \color{blue}{\left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)} \]

          if 5.4999999999999999e-6 < x.im

          1. Initial program 26.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 \color{blue}{{\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
            2. lower-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto e^{\mathsf{fma}\left(y.re, \log x.im, \left(-y.im\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \cdot \sin \left(\mathsf{fma}\left(y.im, \log x.im, \color{blue}{y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}}\right)\right) \]
            14. lower-atan2.f6471.2

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

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

            \[\leadsto e^{\mathsf{fma}\left(y.re, \log x.im, \left(-y.im\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \cdot \sin \left(y.im \cdot \log x.im\right) \]
          10. Step-by-step derivation
            1. Applied rewrites67.2%

              \[\leadsto e^{\mathsf{fma}\left(y.re, \log x.im, \left(-y.im\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \cdot \sin \left(\log x.im \cdot y.im\right) \]
          11. Recombined 3 regimes into one program.
          12. Final simplification66.9%

            \[\leadsto \begin{array}{l} \mathbf{if}\;x.im \leq -1.8 \cdot 10^{-104}:\\ \;\;\;\;e^{-\mathsf{fma}\left(\log \left(\frac{-1}{x.im}\right), y.re, \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\right)} \cdot \sin \left(\log \left(\frac{-1}{x.im}\right) \cdot \left(-y.im\right)\right)\\ \mathbf{elif}\;x.im \leq 5.5 \cdot 10^{-6}:\\ \;\;\;\;\sin \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \cdot e^{\log \left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\ \mathbf{else}:\\ \;\;\;\;\sin \left(\log x.im \cdot y.im\right) \cdot e^{\mathsf{fma}\left(y.re, \log x.im, \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)\right)}\\ \end{array} \]
          13. Add Preprocessing

          Alternative 9: 55.8% accurate, 1.2× speedup?

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

            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 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. *-commutativeN/A

                \[\leadsto \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) \cdot 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}}} \]
              2. lower-*.f64N/A

                \[\leadsto \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) \cdot 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}}} \]
              3. lower-sin.f64N/A

                \[\leadsto \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)} \cdot 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}} \]
              4. associate-*r*N/A

                \[\leadsto \sin \left(\color{blue}{\left(-1 \cdot y.im\right) \cdot \log \left(\frac{-1}{x.im}\right)} + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot 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}} \]
              5. lower-fma.f64N/A

                \[\leadsto \sin \color{blue}{\left(\mathsf{fma}\left(-1 \cdot y.im, \log \left(\frac{-1}{x.im}\right), y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)} \cdot 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}} \]
              6. neg-mul-1N/A

                \[\leadsto \sin \left(\mathsf{fma}\left(\color{blue}{\mathsf{neg}\left(y.im\right)}, \log \left(\frac{-1}{x.im}\right), y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \cdot 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}} \]
              7. lower-neg.f64N/A

                \[\leadsto \sin \left(\mathsf{fma}\left(\color{blue}{-y.im}, \log \left(\frac{-1}{x.im}\right), y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \cdot 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}} \]
              8. lower-log.f64N/A

                \[\leadsto \sin \left(\mathsf{fma}\left(-y.im, \color{blue}{\log \left(\frac{-1}{x.im}\right)}, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \cdot 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}} \]
              9. lower-/.f64N/A

                \[\leadsto \sin \left(\mathsf{fma}\left(-y.im, \log \color{blue}{\left(\frac{-1}{x.im}\right)}, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \cdot 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}} \]
              10. *-commutativeN/A

                \[\leadsto \sin \left(\mathsf{fma}\left(-y.im, \log \left(\frac{-1}{x.im}\right), \color{blue}{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re}\right)\right) \cdot 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}} \]
              11. lower-*.f64N/A

                \[\leadsto \sin \left(\mathsf{fma}\left(-y.im, \log \left(\frac{-1}{x.im}\right), \color{blue}{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re}\right)\right) \cdot 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}} \]
              12. lower-atan2.f64N/A

                \[\leadsto \sin \left(\mathsf{fma}\left(-y.im, \log \left(\frac{-1}{x.im}\right), \color{blue}{\tan^{-1}_* \frac{x.im}{x.re}} \cdot y.re\right)\right) \cdot 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}} \]
              13. lower-exp.f64N/A

                \[\leadsto \sin \left(\mathsf{fma}\left(-y.im, \log \left(\frac{-1}{x.im}\right), \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\right) \cdot \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}}} \]
              14. sub-negN/A

                \[\leadsto \sin \left(\mathsf{fma}\left(-y.im, \log \left(\frac{-1}{x.im}\right), \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\right) \cdot e^{\color{blue}{-1 \cdot \left(y.re \cdot \log \left(\frac{-1}{x.im}\right)\right) + \left(\mathsf{neg}\left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)}} \]
            5. Applied rewrites78.6%

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

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

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

              if -4.99999999999999966e-103 < x.im < 9.80000000000000006e-167

              1. Initial program 38.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 \color{blue}{{\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
                2. lower-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

              if 9.80000000000000006e-167 < x.im

              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}{\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 \color{blue}{{\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
                2. lower-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto e^{\mathsf{fma}\left(y.re, \log x.im, \left(-y.im\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \cdot \sin \left(\mathsf{fma}\left(y.im, \log x.im, \color{blue}{y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}}\right)\right) \]
                14. lower-atan2.f6461.8

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

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

                \[\leadsto e^{\mathsf{fma}\left(y.re, \log x.im, \left(-y.im\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
              10. Step-by-step derivation
                1. Applied rewrites62.5%

                  \[\leadsto e^{\mathsf{fma}\left(y.re, \log x.im, \left(-y.im\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \cdot \sin \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \]
              11. Recombined 3 regimes into one program.
              12. Final simplification62.9%

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

              Alternative 10: 53.2% accurate, 1.3× speedup?

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

                1. Initial program 41.9%

                  \[e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \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 \color{blue}{{\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
                  2. lower-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

                if -1.18000000000000004e-17 < y.re < 7.99999999999999996e-55

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

                  \[\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 \sin \color{blue}{\left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)} \]
                4. Step-by-step derivation
                  1. *-commutativeN/A

                    \[\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 \sin \color{blue}{\left(\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right) \cdot y.im\right)} \]
                  2. lower-*.f64N/A

                    \[\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 \sin \color{blue}{\left(\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right) \cdot y.im\right)} \]
                  3. lower-log.f64N/A

                    \[\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 \sin \left(\color{blue}{\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)} \cdot y.im\right) \]
                  4. lower-sqrt.f64N/A

                    \[\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 \sin \left(\log \color{blue}{\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)} \cdot y.im\right) \]
                  5. +-commutativeN/A

                    \[\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 \sin \left(\log \left(\sqrt{\color{blue}{{x.re}^{2} + {x.im}^{2}}}\right) \cdot y.im\right) \]
                  6. unpow2N/A

                    \[\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 \sin \left(\log \left(\sqrt{\color{blue}{x.re \cdot x.re} + {x.im}^{2}}\right) \cdot y.im\right) \]
                  7. unpow2N/A

                    \[\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 \sin \left(\log \left(\sqrt{x.re \cdot x.re + \color{blue}{x.im \cdot x.im}}\right) \cdot y.im\right) \]
                  8. lower-hypot.f6441.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 \sin \left(\log \left(\sqrt{\color{blue}{\mathsf{hypot}\left(x.re, x.im\right)}}\right) \cdot y.im\right) \]
                5. Applied rewrites41.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 \sin \color{blue}{\left(\log \left(\sqrt{\mathsf{hypot}\left(x.re, x.im\right)}\right) \cdot y.im\right)} \]
                6. Taylor expanded in y.im around inf

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

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

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

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

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

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

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

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

              Alternative 11: 50.6% accurate, 1.3× speedup?

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

                1. Initial program 40.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 \color{blue}{{\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
                  2. lower-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

                if 9.80000000000000006e-167 < x.im

                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}{\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 \color{blue}{{\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
                  2. lower-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto e^{\mathsf{fma}\left(y.re, \log x.im, \left(-y.im\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \cdot \sin \left(\mathsf{fma}\left(y.im, \log x.im, \color{blue}{y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}}\right)\right) \]
                  14. lower-atan2.f6461.8

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

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

                  \[\leadsto e^{\mathsf{fma}\left(y.re, \log x.im, \left(-y.im\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
                10. Step-by-step derivation
                  1. Applied rewrites62.5%

                    \[\leadsto e^{\mathsf{fma}\left(y.re, \log x.im, \left(-y.im\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \cdot \sin \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \]
                11. Recombined 2 regimes into one program.
                12. Final simplification54.8%

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

                Alternative 12: 49.8% accurate, 1.3× speedup?

                \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x.im \leq 4.5 \cdot 10^{-6}:\\ \;\;\;\;\sin \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \cdot {\left(\sqrt{\mathsf{hypot}\left(x.re, x.im\right)}\right)}^{y.re}\\ \mathbf{else}:\\ \;\;\;\;\sin \left(\log x.im \cdot y.im\right) \cdot e^{\mathsf{fma}\left(y.re, \log x.im, \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)\right)}\\ \end{array} \end{array} \]
                (FPCore (x.re x.im y.re y.im)
                 :precision binary64
                 (if (<= x.im 4.5e-6)
                   (* (sin (* (atan2 x.im x.re) y.re)) (pow (sqrt (hypot x.re x.im)) y.re))
                   (*
                    (sin (* (log x.im) y.im))
                    (exp (fma y.re (log x.im) (* (atan2 x.im x.re) (- y.im)))))))
                double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
                	double tmp;
                	if (x_46_im <= 4.5e-6) {
                		tmp = sin((atan2(x_46_im, x_46_re) * y_46_re)) * pow(sqrt(hypot(x_46_re, x_46_im)), y_46_re);
                	} else {
                		tmp = sin((log(x_46_im) * y_46_im)) * exp(fma(y_46_re, log(x_46_im), (atan2(x_46_im, x_46_re) * -y_46_im)));
                	}
                	return tmp;
                }
                
                function code(x_46_re, x_46_im, y_46_re, y_46_im)
                	tmp = 0.0
                	if (x_46_im <= 4.5e-6)
                		tmp = Float64(sin(Float64(atan(x_46_im, x_46_re) * y_46_re)) * (sqrt(hypot(x_46_re, x_46_im)) ^ y_46_re));
                	else
                		tmp = Float64(sin(Float64(log(x_46_im) * y_46_im)) * exp(fma(y_46_re, log(x_46_im), Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))));
                	end
                	return tmp
                end
                
                code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[x$46$im, 4.5e-6], N[(N[Sin[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]], $MachinePrecision] * N[Power[N[Sqrt[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], N[(N[Sin[N[(N[Log[x$46$im], $MachinePrecision] * y$46$im), $MachinePrecision]], $MachinePrecision] * N[Exp[N[(y$46$re * N[Log[x$46$im], $MachinePrecision] + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
                
                \begin{array}{l}
                
                \\
                \begin{array}{l}
                \mathbf{if}\;x.im \leq 4.5 \cdot 10^{-6}:\\
                \;\;\;\;\sin \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \cdot {\left(\sqrt{\mathsf{hypot}\left(x.re, x.im\right)}\right)}^{y.re}\\
                
                \mathbf{else}:\\
                \;\;\;\;\sin \left(\log x.im \cdot y.im\right) \cdot e^{\mathsf{fma}\left(y.re, \log x.im, \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)\right)}\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 2 regimes
                2. if x.im < 4.50000000000000011e-6

                  1. Initial program 45.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 \color{blue}{{\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
                    2. lower-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

                  if 4.50000000000000011e-6 < x.im

                  1. Initial program 26.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 \color{blue}{{\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
                    2. lower-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto e^{\mathsf{fma}\left(y.re, \log x.im, \left(-y.im\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \cdot \sin \left(\mathsf{fma}\left(y.im, \log x.im, \color{blue}{y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}}\right)\right) \]
                    14. lower-atan2.f6471.2

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

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

                    \[\leadsto e^{\mathsf{fma}\left(y.re, \log x.im, \left(-y.im\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \cdot \sin \left(y.im \cdot \log x.im\right) \]
                  10. Step-by-step derivation
                    1. Applied rewrites67.2%

                      \[\leadsto e^{\mathsf{fma}\left(y.re, \log x.im, \left(-y.im\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \cdot \sin \left(\log x.im \cdot y.im\right) \]
                  11. Recombined 2 regimes into one program.
                  12. Final simplification54.1%

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

                  Alternative 13: 49.4% accurate, 1.5× speedup?

                  \[\begin{array}{l} \\ \begin{array}{l} t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\\ \mathbf{if}\;x.re \leq 0.5:\\ \;\;\;\;\sin t\_0 \cdot {\left(\sqrt{\mathsf{hypot}\left(x.re, x.im\right)}\right)}^{y.re}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\frac{1}{{x.re}^{y.re} \cdot \sin \left(\mathsf{fma}\left(y.im, \log x.re, t\_0\right)\right)}}\\ \end{array} \end{array} \]
                  (FPCore (x.re x.im y.re y.im)
                   :precision binary64
                   (let* ((t_0 (* (atan2 x.im x.re) y.re)))
                     (if (<= x.re 0.5)
                       (* (sin t_0) (pow (sqrt (hypot x.re x.im)) y.re))
                       (/ 1.0 (/ 1.0 (* (pow x.re y.re) (sin (fma y.im (log x.re) t_0))))))))
                  double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
                  	double t_0 = atan2(x_46_im, x_46_re) * y_46_re;
                  	double tmp;
                  	if (x_46_re <= 0.5) {
                  		tmp = sin(t_0) * pow(sqrt(hypot(x_46_re, x_46_im)), y_46_re);
                  	} else {
                  		tmp = 1.0 / (1.0 / (pow(x_46_re, y_46_re) * sin(fma(y_46_im, log(x_46_re), t_0))));
                  	}
                  	return tmp;
                  }
                  
                  function code(x_46_re, x_46_im, y_46_re, y_46_im)
                  	t_0 = Float64(atan(x_46_im, x_46_re) * y_46_re)
                  	tmp = 0.0
                  	if (x_46_re <= 0.5)
                  		tmp = Float64(sin(t_0) * (sqrt(hypot(x_46_re, x_46_im)) ^ y_46_re));
                  	else
                  		tmp = Float64(1.0 / Float64(1.0 / Float64((x_46_re ^ y_46_re) * sin(fma(y_46_im, log(x_46_re), t_0)))));
                  	end
                  	return tmp
                  end
                  
                  code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]}, If[LessEqual[x$46$re, 0.5], N[(N[Sin[t$95$0], $MachinePrecision] * N[Power[N[Sqrt[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(1.0 / N[(N[Power[x$46$re, y$46$re], $MachinePrecision] * N[Sin[N[(y$46$im * N[Log[x$46$re], $MachinePrecision] + t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
                  
                  \begin{array}{l}
                  
                  \\
                  \begin{array}{l}
                  t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\\
                  \mathbf{if}\;x.re \leq 0.5:\\
                  \;\;\;\;\sin t\_0 \cdot {\left(\sqrt{\mathsf{hypot}\left(x.re, x.im\right)}\right)}^{y.re}\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;\frac{1}{\frac{1}{{x.re}^{y.re} \cdot \sin \left(\mathsf{fma}\left(y.im, \log x.re, t\_0\right)\right)}}\\
                  
                  
                  \end{array}
                  \end{array}
                  
                  Derivation
                  1. Split input into 2 regimes
                  2. if x.re < 0.5

                    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.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 \color{blue}{{\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
                      2. lower-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

                    if 0.5 < x.re

                    1. Initial program 28.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. Step-by-step derivation
                      1. lift-*.f64N/A

                        \[\leadsto \color{blue}{e^{\log \left(\sqrt{x.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. *-commutativeN/A

                        \[\leadsto \color{blue}{\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) \cdot e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}} \]
                      3. lift-exp.f64N/A

                        \[\leadsto \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) \cdot \color{blue}{e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}} \]
                      4. lift--.f64N/A

                        \[\leadsto \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) \cdot e^{\color{blue}{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}} \]
                      5. exp-diffN/A

                        \[\leadsto \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) \cdot \color{blue}{\frac{e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re}}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}} \]
                      6. associate-*r/N/A

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

                        \[\leadsto \color{blue}{\frac{1}{\frac{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}{\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) \cdot e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re}}}} \]
                    4. Applied rewrites52.6%

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

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

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

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

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

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

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

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

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

                          \[\leadsto \frac{1}{\frac{1}{\sin \left(\mathsf{fma}\left(y.im, \log x.re, y.re \cdot \color{blue}{\tan^{-1}_* \frac{x.im}{x.re}}\right)\right) \cdot {x.re}^{y.re}}} \]
                        7. lower-pow.f6462.8

                          \[\leadsto \frac{1}{\frac{1}{\sin \left(\mathsf{fma}\left(y.im, \log x.re, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \cdot \color{blue}{{x.re}^{y.re}}}} \]
                      4. Applied rewrites62.8%

                        \[\leadsto \frac{1}{\frac{1}{\color{blue}{\sin \left(\mathsf{fma}\left(y.im, \log x.re, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \cdot {x.re}^{y.re}}}} \]
                    7. Recombined 2 regimes into one program.
                    8. Final simplification52.6%

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

                    Alternative 14: 42.5% accurate, 1.6× speedup?

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

                      1. Initial program 43.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}{\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 \color{blue}{{\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
                        2. lower-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

                        \[\leadsto {\left(x.im + \frac{1}{2} \cdot \frac{{x.re}^{2}}{x.im}\right)}^{y.re} \cdot \sin \left(\color{blue}{\tan^{-1}_* \frac{x.im}{x.re}} \cdot y.re\right) \]
                      7. Step-by-step derivation
                        1. Applied rewrites59.3%

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

                        if -3.6999999999999999e-184 < y.re < 5.3999999999999998e-44

                        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.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 \color{blue}{{\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
                          2. lower-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                            \[\leadsto e^{\mathsf{fma}\left(y.re, \log x.im, \left(-y.im\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \cdot \sin \left(\mathsf{fma}\left(y.im, \log x.im, \color{blue}{y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}}\right)\right) \]
                          14. lower-atan2.f6428.9

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

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

                          \[\leadsto e^{y.re \cdot \log x.im} \cdot \sin \left(\mathsf{fma}\left(\color{blue}{y.im}, \log x.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
                        10. Step-by-step derivation
                          1. Applied rewrites15.0%

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

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

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

                            if 5.3999999999999998e-44 < y.re

                            1. Initial program 40.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 \color{blue}{{\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
                              2. lower-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

                              \[\leadsto {\left(-1 \cdot x.im\right)}^{y.re} \cdot \sin \left(\color{blue}{\tan^{-1}_* \frac{x.im}{x.re}} \cdot y.re\right) \]
                            7. Step-by-step derivation
                              1. Applied rewrites61.3%

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

                              \[\leadsto \begin{array}{l} \mathbf{if}\;y.re \leq -3.7 \cdot 10^{-184}:\\ \;\;\;\;{\left(\mathsf{fma}\left(0.5, \frac{x.re \cdot x.re}{x.im}, x.im\right)\right)}^{y.re} \cdot \sin \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\\ \mathbf{elif}\;y.re \leq 5.4 \cdot 10^{-44}:\\ \;\;\;\;\sin \left(\log x.im \cdot y.im\right) \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\ \mathbf{else}:\\ \;\;\;\;{\left(-x.im\right)}^{y.re} \cdot \sin \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\\ \end{array} \]
                            10. Add Preprocessing

                            Alternative 15: 45.0% accurate, 1.6× speedup?

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

                              1. Initial program 40.0%

                                \[e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \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 \color{blue}{{\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
                                2. lower-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                if -5e8 < y.im

                                1. Initial program 41.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 \color{blue}{{\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
                                  2. lower-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

                                \[\leadsto \begin{array}{l} \mathbf{if}\;y.im \leq -500000000:\\ \;\;\;\;{\left(\mathsf{fma}\left(0.5, \frac{x.im \cdot x.im}{x.re}, x.re\right)\right)}^{y.re} \cdot \sin \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\\ \mathbf{else}:\\ \;\;\;\;\sin \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \cdot {\left(\sqrt{\mathsf{hypot}\left(x.re, x.im\right)}\right)}^{y.re}\\ \end{array} \]
                              10. Add Preprocessing

                              Alternative 16: 42.9% accurate, 2.0× speedup?

                              \[\begin{array}{l} \\ \begin{array}{l} t_0 := \sin \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\\ \mathbf{if}\;x.re \leq -1.02:\\ \;\;\;\;{\left(\mathsf{fma}\left(0.5, \frac{x.re \cdot x.re}{x.im}, x.im\right)\right)}^{y.re} \cdot t\_0\\ \mathbf{elif}\;x.re \leq 1.25 \cdot 10^{-74}:\\ \;\;\;\;{\left(\sqrt{x.im \cdot x.im}\right)}^{y.re} \cdot t\_0\\ \mathbf{else}:\\ \;\;\;\;{\left(\mathsf{fma}\left(0.5, \frac{x.im \cdot x.im}{x.re}, x.re\right)\right)}^{y.re} \cdot t\_0\\ \end{array} \end{array} \]
                              (FPCore (x.re x.im y.re y.im)
                               :precision binary64
                               (let* ((t_0 (sin (* (atan2 x.im x.re) y.re))))
                                 (if (<= x.re -1.02)
                                   (* (pow (fma 0.5 (/ (* x.re x.re) x.im) x.im) y.re) t_0)
                                   (if (<= x.re 1.25e-74)
                                     (* (pow (sqrt (* x.im x.im)) y.re) t_0)
                                     (* (pow (fma 0.5 (/ (* x.im x.im) x.re) x.re) y.re) t_0)))))
                              double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
                              	double t_0 = sin((atan2(x_46_im, x_46_re) * y_46_re));
                              	double tmp;
                              	if (x_46_re <= -1.02) {
                              		tmp = pow(fma(0.5, ((x_46_re * x_46_re) / x_46_im), x_46_im), y_46_re) * t_0;
                              	} else if (x_46_re <= 1.25e-74) {
                              		tmp = pow(sqrt((x_46_im * x_46_im)), y_46_re) * t_0;
                              	} else {
                              		tmp = pow(fma(0.5, ((x_46_im * x_46_im) / x_46_re), x_46_re), y_46_re) * t_0;
                              	}
                              	return tmp;
                              }
                              
                              function code(x_46_re, x_46_im, y_46_re, y_46_im)
                              	t_0 = sin(Float64(atan(x_46_im, x_46_re) * y_46_re))
                              	tmp = 0.0
                              	if (x_46_re <= -1.02)
                              		tmp = Float64((fma(0.5, Float64(Float64(x_46_re * x_46_re) / x_46_im), x_46_im) ^ y_46_re) * t_0);
                              	elseif (x_46_re <= 1.25e-74)
                              		tmp = Float64((sqrt(Float64(x_46_im * x_46_im)) ^ y_46_re) * t_0);
                              	else
                              		tmp = Float64((fma(0.5, Float64(Float64(x_46_im * x_46_im) / x_46_re), x_46_re) ^ y_46_re) * t_0);
                              	end
                              	return tmp
                              end
                              
                              code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Sin[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[x$46$re, -1.02], N[(N[Power[N[(0.5 * N[(N[(x$46$re * x$46$re), $MachinePrecision] / x$46$im), $MachinePrecision] + x$46$im), $MachinePrecision], y$46$re], $MachinePrecision] * t$95$0), $MachinePrecision], If[LessEqual[x$46$re, 1.25e-74], N[(N[Power[N[Sqrt[N[(x$46$im * x$46$im), $MachinePrecision]], $MachinePrecision], y$46$re], $MachinePrecision] * t$95$0), $MachinePrecision], N[(N[Power[N[(0.5 * N[(N[(x$46$im * x$46$im), $MachinePrecision] / x$46$re), $MachinePrecision] + x$46$re), $MachinePrecision], y$46$re], $MachinePrecision] * t$95$0), $MachinePrecision]]]]
                              
                              \begin{array}{l}
                              
                              \\
                              \begin{array}{l}
                              t_0 := \sin \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\\
                              \mathbf{if}\;x.re \leq -1.02:\\
                              \;\;\;\;{\left(\mathsf{fma}\left(0.5, \frac{x.re \cdot x.re}{x.im}, x.im\right)\right)}^{y.re} \cdot t\_0\\
                              
                              \mathbf{elif}\;x.re \leq 1.25 \cdot 10^{-74}:\\
                              \;\;\;\;{\left(\sqrt{x.im \cdot x.im}\right)}^{y.re} \cdot t\_0\\
                              
                              \mathbf{else}:\\
                              \;\;\;\;{\left(\mathsf{fma}\left(0.5, \frac{x.im \cdot x.im}{x.re}, x.re\right)\right)}^{y.re} \cdot t\_0\\
                              
                              
                              \end{array}
                              \end{array}
                              
                              Derivation
                              1. Split input into 3 regimes
                              2. if x.re < -1.02

                                1. Initial program 30.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 \color{blue}{{\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
                                  2. lower-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

                                  \[\leadsto {\left(x.im + \frac{1}{2} \cdot \frac{{x.re}^{2}}{x.im}\right)}^{y.re} \cdot \sin \left(\color{blue}{\tan^{-1}_* \frac{x.im}{x.re}} \cdot y.re\right) \]
                                7. Step-by-step derivation
                                  1. Applied rewrites41.0%

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

                                  if -1.02 < x.re < 1.25e-74

                                  1. Initial program 47.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}{\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 \color{blue}{{\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
                                    2. lower-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

                                    \[\leadsto {\left(\sqrt{{x.im}^{2}}\right)}^{y.re} \cdot \sin \left(\tan^{-1}_* \frac{\color{blue}{x.im}}{x.re} \cdot y.re\right) \]
                                  7. Step-by-step derivation
                                    1. Applied rewrites53.8%

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

                                    if 1.25e-74 < x.re

                                    1. Initial program 38.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 \color{blue}{{\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
                                      2. lower-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

                                      \[\leadsto {\left(x.re + \frac{1}{2} \cdot \frac{{x.im}^{2}}{x.re}\right)}^{y.re} \cdot \sin \left(\color{blue}{\tan^{-1}_* \frac{x.im}{x.re}} \cdot y.re\right) \]
                                    7. Step-by-step derivation
                                      1. Applied rewrites47.2%

                                        \[\leadsto {\left(\mathsf{fma}\left(0.5, \frac{x.im \cdot x.im}{x.re}, x.re\right)\right)}^{y.re} \cdot \sin \left(\color{blue}{\tan^{-1}_* \frac{x.im}{x.re}} \cdot y.re\right) \]
                                    8. Recombined 3 regimes into one program.
                                    9. Add Preprocessing

                                    Alternative 17: 42.8% accurate, 2.0× speedup?

                                    \[\begin{array}{l} \\ \begin{array}{l} t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\\ t_1 := \sin t\_0\\ \mathbf{if}\;x.re \leq -50000:\\ \;\;\;\;t\_0 \cdot {\left(\mathsf{fma}\left(0.5, \frac{x.re \cdot x.re}{x.im}, x.im\right)\right)}^{y.re}\\ \mathbf{elif}\;x.re \leq 1.25 \cdot 10^{-74}:\\ \;\;\;\;{\left(\sqrt{x.im \cdot x.im}\right)}^{y.re} \cdot t\_1\\ \mathbf{else}:\\ \;\;\;\;{\left(\mathsf{fma}\left(0.5, \frac{x.im \cdot x.im}{x.re}, x.re\right)\right)}^{y.re} \cdot t\_1\\ \end{array} \end{array} \]
                                    (FPCore (x.re x.im y.re y.im)
                                     :precision binary64
                                     (let* ((t_0 (* (atan2 x.im x.re) y.re)) (t_1 (sin t_0)))
                                       (if (<= x.re -50000.0)
                                         (* t_0 (pow (fma 0.5 (/ (* x.re x.re) x.im) x.im) y.re))
                                         (if (<= x.re 1.25e-74)
                                           (* (pow (sqrt (* x.im x.im)) y.re) t_1)
                                           (* (pow (fma 0.5 (/ (* x.im x.im) x.re) x.re) y.re) t_1)))))
                                    double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
                                    	double t_0 = atan2(x_46_im, x_46_re) * y_46_re;
                                    	double t_1 = sin(t_0);
                                    	double tmp;
                                    	if (x_46_re <= -50000.0) {
                                    		tmp = t_0 * pow(fma(0.5, ((x_46_re * x_46_re) / x_46_im), x_46_im), y_46_re);
                                    	} else if (x_46_re <= 1.25e-74) {
                                    		tmp = pow(sqrt((x_46_im * x_46_im)), y_46_re) * t_1;
                                    	} else {
                                    		tmp = pow(fma(0.5, ((x_46_im * x_46_im) / x_46_re), x_46_re), y_46_re) * t_1;
                                    	}
                                    	return tmp;
                                    }
                                    
                                    function code(x_46_re, x_46_im, y_46_re, y_46_im)
                                    	t_0 = Float64(atan(x_46_im, x_46_re) * y_46_re)
                                    	t_1 = sin(t_0)
                                    	tmp = 0.0
                                    	if (x_46_re <= -50000.0)
                                    		tmp = Float64(t_0 * (fma(0.5, Float64(Float64(x_46_re * x_46_re) / x_46_im), x_46_im) ^ y_46_re));
                                    	elseif (x_46_re <= 1.25e-74)
                                    		tmp = Float64((sqrt(Float64(x_46_im * x_46_im)) ^ y_46_re) * t_1);
                                    	else
                                    		tmp = Float64((fma(0.5, Float64(Float64(x_46_im * x_46_im) / x_46_re), x_46_re) ^ y_46_re) * t_1);
                                    	end
                                    	return tmp
                                    end
                                    
                                    code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]}, Block[{t$95$1 = N[Sin[t$95$0], $MachinePrecision]}, If[LessEqual[x$46$re, -50000.0], N[(t$95$0 * N[Power[N[(0.5 * N[(N[(x$46$re * x$46$re), $MachinePrecision] / x$46$im), $MachinePrecision] + x$46$im), $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, 1.25e-74], N[(N[Power[N[Sqrt[N[(x$46$im * x$46$im), $MachinePrecision]], $MachinePrecision], y$46$re], $MachinePrecision] * t$95$1), $MachinePrecision], N[(N[Power[N[(0.5 * N[(N[(x$46$im * x$46$im), $MachinePrecision] / x$46$re), $MachinePrecision] + x$46$re), $MachinePrecision], y$46$re], $MachinePrecision] * t$95$1), $MachinePrecision]]]]]
                                    
                                    \begin{array}{l}
                                    
                                    \\
                                    \begin{array}{l}
                                    t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\\
                                    t_1 := \sin t\_0\\
                                    \mathbf{if}\;x.re \leq -50000:\\
                                    \;\;\;\;t\_0 \cdot {\left(\mathsf{fma}\left(0.5, \frac{x.re \cdot x.re}{x.im}, x.im\right)\right)}^{y.re}\\
                                    
                                    \mathbf{elif}\;x.re \leq 1.25 \cdot 10^{-74}:\\
                                    \;\;\;\;{\left(\sqrt{x.im \cdot x.im}\right)}^{y.re} \cdot t\_1\\
                                    
                                    \mathbf{else}:\\
                                    \;\;\;\;{\left(\mathsf{fma}\left(0.5, \frac{x.im \cdot x.im}{x.re}, x.re\right)\right)}^{y.re} \cdot t\_1\\
                                    
                                    
                                    \end{array}
                                    \end{array}
                                    
                                    Derivation
                                    1. Split input into 3 regimes
                                    2. if x.re < -5e4

                                      1. Initial program 30.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 \color{blue}{{\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
                                        2. lower-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

                                        \[\leadsto {\left(x.im + \frac{1}{2} \cdot \frac{{x.re}^{2}}{x.im}\right)}^{y.re} \cdot \sin \left(\color{blue}{\tan^{-1}_* \frac{x.im}{x.re}} \cdot y.re\right) \]
                                      7. Step-by-step derivation
                                        1. Applied rewrites41.0%

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

                                          \[\leadsto {\left(\mathsf{fma}\left(\frac{1}{2}, \frac{x.re \cdot x.re}{x.im}, x.im\right)\right)}^{y.re} \cdot \left(y.re \cdot \color{blue}{\tan^{-1}_* \frac{x.im}{x.re}}\right) \]
                                        3. Step-by-step derivation
                                          1. Applied rewrites39.2%

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

                                          if -5e4 < x.re < 1.25e-74

                                          1. Initial program 47.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}{\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 \color{blue}{{\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
                                            2. lower-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

                                            \[\leadsto {\left(\sqrt{{x.im}^{2}}\right)}^{y.re} \cdot \sin \left(\tan^{-1}_* \frac{\color{blue}{x.im}}{x.re} \cdot y.re\right) \]
                                          7. Step-by-step derivation
                                            1. Applied rewrites53.8%

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

                                            if 1.25e-74 < x.re

                                            1. Initial program 38.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 \color{blue}{{\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
                                              2. lower-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

                                              \[\leadsto {\left(x.re + \frac{1}{2} \cdot \frac{{x.im}^{2}}{x.re}\right)}^{y.re} \cdot \sin \left(\color{blue}{\tan^{-1}_* \frac{x.im}{x.re}} \cdot y.re\right) \]
                                            7. Step-by-step derivation
                                              1. Applied rewrites47.2%

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

                                              \[\leadsto \begin{array}{l} \mathbf{if}\;x.re \leq -50000:\\ \;\;\;\;\left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \cdot {\left(\mathsf{fma}\left(0.5, \frac{x.re \cdot x.re}{x.im}, x.im\right)\right)}^{y.re}\\ \mathbf{elif}\;x.re \leq 1.25 \cdot 10^{-74}:\\ \;\;\;\;{\left(\sqrt{x.im \cdot x.im}\right)}^{y.re} \cdot \sin \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\\ \mathbf{else}:\\ \;\;\;\;{\left(\mathsf{fma}\left(0.5, \frac{x.im \cdot x.im}{x.re}, x.re\right)\right)}^{y.re} \cdot \sin \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\\ \end{array} \]
                                            10. Add Preprocessing

                                            Alternative 18: 42.9% accurate, 2.0× speedup?

                                            \[\begin{array}{l} \\ \begin{array}{l} t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\\ t_1 := \sin t\_0\\ \mathbf{if}\;x.re \leq -50000:\\ \;\;\;\;t\_0 \cdot {\left(\mathsf{fma}\left(0.5, \frac{x.re \cdot x.re}{x.im}, x.im\right)\right)}^{y.re}\\ \mathbf{elif}\;x.re \leq 0.095:\\ \;\;\;\;{\left(\sqrt{x.im \cdot x.im}\right)}^{y.re} \cdot t\_1\\ \mathbf{else}:\\ \;\;\;\;{x.re}^{y.re} \cdot t\_1\\ \end{array} \end{array} \]
                                            (FPCore (x.re x.im y.re y.im)
                                             :precision binary64
                                             (let* ((t_0 (* (atan2 x.im x.re) y.re)) (t_1 (sin t_0)))
                                               (if (<= x.re -50000.0)
                                                 (* t_0 (pow (fma 0.5 (/ (* x.re x.re) x.im) x.im) y.re))
                                                 (if (<= x.re 0.095)
                                                   (* (pow (sqrt (* x.im x.im)) y.re) t_1)
                                                   (* (pow x.re y.re) t_1)))))
                                            double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
                                            	double t_0 = atan2(x_46_im, x_46_re) * y_46_re;
                                            	double t_1 = sin(t_0);
                                            	double tmp;
                                            	if (x_46_re <= -50000.0) {
                                            		tmp = t_0 * pow(fma(0.5, ((x_46_re * x_46_re) / x_46_im), x_46_im), y_46_re);
                                            	} else if (x_46_re <= 0.095) {
                                            		tmp = pow(sqrt((x_46_im * x_46_im)), y_46_re) * t_1;
                                            	} else {
                                            		tmp = pow(x_46_re, y_46_re) * t_1;
                                            	}
                                            	return tmp;
                                            }
                                            
                                            function code(x_46_re, x_46_im, y_46_re, y_46_im)
                                            	t_0 = Float64(atan(x_46_im, x_46_re) * y_46_re)
                                            	t_1 = sin(t_0)
                                            	tmp = 0.0
                                            	if (x_46_re <= -50000.0)
                                            		tmp = Float64(t_0 * (fma(0.5, Float64(Float64(x_46_re * x_46_re) / x_46_im), x_46_im) ^ y_46_re));
                                            	elseif (x_46_re <= 0.095)
                                            		tmp = Float64((sqrt(Float64(x_46_im * x_46_im)) ^ y_46_re) * t_1);
                                            	else
                                            		tmp = Float64((x_46_re ^ y_46_re) * t_1);
                                            	end
                                            	return tmp
                                            end
                                            
                                            code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]}, Block[{t$95$1 = N[Sin[t$95$0], $MachinePrecision]}, If[LessEqual[x$46$re, -50000.0], N[(t$95$0 * N[Power[N[(0.5 * N[(N[(x$46$re * x$46$re), $MachinePrecision] / x$46$im), $MachinePrecision] + x$46$im), $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, 0.095], N[(N[Power[N[Sqrt[N[(x$46$im * x$46$im), $MachinePrecision]], $MachinePrecision], y$46$re], $MachinePrecision] * t$95$1), $MachinePrecision], N[(N[Power[x$46$re, y$46$re], $MachinePrecision] * t$95$1), $MachinePrecision]]]]]
                                            
                                            \begin{array}{l}
                                            
                                            \\
                                            \begin{array}{l}
                                            t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\\
                                            t_1 := \sin t\_0\\
                                            \mathbf{if}\;x.re \leq -50000:\\
                                            \;\;\;\;t\_0 \cdot {\left(\mathsf{fma}\left(0.5, \frac{x.re \cdot x.re}{x.im}, x.im\right)\right)}^{y.re}\\
                                            
                                            \mathbf{elif}\;x.re \leq 0.095:\\
                                            \;\;\;\;{\left(\sqrt{x.im \cdot x.im}\right)}^{y.re} \cdot t\_1\\
                                            
                                            \mathbf{else}:\\
                                            \;\;\;\;{x.re}^{y.re} \cdot t\_1\\
                                            
                                            
                                            \end{array}
                                            \end{array}
                                            
                                            Derivation
                                            1. Split input into 3 regimes
                                            2. if x.re < -5e4

                                              1. Initial program 30.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 \color{blue}{{\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
                                                2. lower-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

                                                \[\leadsto {\left(x.im + \frac{1}{2} \cdot \frac{{x.re}^{2}}{x.im}\right)}^{y.re} \cdot \sin \left(\color{blue}{\tan^{-1}_* \frac{x.im}{x.re}} \cdot y.re\right) \]
                                              7. Step-by-step derivation
                                                1. Applied rewrites41.0%

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

                                                  \[\leadsto {\left(\mathsf{fma}\left(\frac{1}{2}, \frac{x.re \cdot x.re}{x.im}, x.im\right)\right)}^{y.re} \cdot \left(y.re \cdot \color{blue}{\tan^{-1}_* \frac{x.im}{x.re}}\right) \]
                                                3. Step-by-step derivation
                                                  1. Applied rewrites39.2%

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

                                                  if -5e4 < x.re < 0.095000000000000001

                                                  1. Initial program 49.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}{\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 \color{blue}{{\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
                                                    2. lower-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

                                                    \[\leadsto {\left(\sqrt{{x.im}^{2}}\right)}^{y.re} \cdot \sin \left(\tan^{-1}_* \frac{\color{blue}{x.im}}{x.re} \cdot y.re\right) \]
                                                  7. Step-by-step derivation
                                                    1. Applied rewrites53.2%

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

                                                    if 0.095000000000000001 < x.re

                                                    1. Initial program 29.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 \color{blue}{{\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
                                                      2. lower-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                      \[\leadsto \begin{array}{l} \mathbf{if}\;x.re \leq -50000:\\ \;\;\;\;\left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \cdot {\left(\mathsf{fma}\left(0.5, \frac{x.re \cdot x.re}{x.im}, x.im\right)\right)}^{y.re}\\ \mathbf{elif}\;x.re \leq 0.095:\\ \;\;\;\;{\left(\sqrt{x.im \cdot x.im}\right)}^{y.re} \cdot \sin \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\\ \mathbf{else}:\\ \;\;\;\;{x.re}^{y.re} \cdot \sin \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\\ \end{array} \]
                                                    10. Add Preprocessing

                                                    Alternative 19: 40.5% accurate, 2.0× speedup?

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

                                                      1. Initial program 45.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 \color{blue}{{\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
                                                        2. lower-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

                                                        \[\leadsto {\left(x.im + \frac{1}{2} \cdot \frac{{x.re}^{2}}{x.im}\right)}^{y.re} \cdot \sin \left(\color{blue}{\tan^{-1}_* \frac{x.im}{x.re}} \cdot y.re\right) \]
                                                      7. Step-by-step derivation
                                                        1. Applied rewrites67.2%

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

                                                          \[\leadsto {\left(\mathsf{fma}\left(\frac{1}{2}, \frac{x.re \cdot x.re}{x.im}, x.im\right)\right)}^{y.re} \cdot \left(y.re \cdot \color{blue}{\tan^{-1}_* \frac{x.im}{x.re}}\right) \]
                                                        3. Step-by-step derivation
                                                          1. Applied rewrites61.2%

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

                                                          if -1.55e-96 < y.re < 1.0000000000000001e-123

                                                          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 \color{blue}{{\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
                                                            2. lower-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                              if 1.0000000000000001e-123 < y.re

                                                              1. Initial program 39.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 \color{blue}{{\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
                                                                2. lower-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

                                                                \[\leadsto {\left(-1 \cdot x.im\right)}^{y.re} \cdot \sin \left(\color{blue}{\tan^{-1}_* \frac{x.im}{x.re}} \cdot y.re\right) \]
                                                              7. Step-by-step derivation
                                                                1. Applied rewrites54.6%

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

                                                                \[\leadsto \begin{array}{l} \mathbf{if}\;y.re \leq -1.55 \cdot 10^{-96}:\\ \;\;\;\;\left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \cdot {\left(\mathsf{fma}\left(0.5, \frac{x.re \cdot x.re}{x.im}, x.im\right)\right)}^{y.re}\\ \mathbf{elif}\;y.re \leq 10^{-123}:\\ \;\;\;\;\left(\left(y.re \cdot y.re\right) \cdot \log \left(\sqrt{\mathsf{hypot}\left(x.re, x.im\right)}\right)\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}\\ \mathbf{else}:\\ \;\;\;\;{\left(-x.im\right)}^{y.re} \cdot \sin \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\\ \end{array} \]
                                                              10. Add Preprocessing

                                                              Alternative 20: 40.1% accurate, 2.1× speedup?

                                                              \[\begin{array}{l} \\ \begin{array}{l} t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\\ t_1 := \sin t\_0\\ \mathbf{if}\;x.re \leq -50000:\\ \;\;\;\;t\_0 \cdot {\left(\mathsf{fma}\left(0.5, \frac{x.re \cdot x.re}{x.im}, x.im\right)\right)}^{y.re}\\ \mathbf{elif}\;x.re \leq 0.095:\\ \;\;\;\;{x.im}^{y.re} \cdot t\_1\\ \mathbf{else}:\\ \;\;\;\;{x.re}^{y.re} \cdot t\_1\\ \end{array} \end{array} \]
                                                              (FPCore (x.re x.im y.re y.im)
                                                               :precision binary64
                                                               (let* ((t_0 (* (atan2 x.im x.re) y.re)) (t_1 (sin t_0)))
                                                                 (if (<= x.re -50000.0)
                                                                   (* t_0 (pow (fma 0.5 (/ (* x.re x.re) x.im) x.im) y.re))
                                                                   (if (<= x.re 0.095) (* (pow x.im y.re) t_1) (* (pow x.re y.re) t_1)))))
                                                              double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
                                                              	double t_0 = atan2(x_46_im, x_46_re) * y_46_re;
                                                              	double t_1 = sin(t_0);
                                                              	double tmp;
                                                              	if (x_46_re <= -50000.0) {
                                                              		tmp = t_0 * pow(fma(0.5, ((x_46_re * x_46_re) / x_46_im), x_46_im), y_46_re);
                                                              	} else if (x_46_re <= 0.095) {
                                                              		tmp = pow(x_46_im, y_46_re) * t_1;
                                                              	} else {
                                                              		tmp = pow(x_46_re, y_46_re) * t_1;
                                                              	}
                                                              	return tmp;
                                                              }
                                                              
                                                              function code(x_46_re, x_46_im, y_46_re, y_46_im)
                                                              	t_0 = Float64(atan(x_46_im, x_46_re) * y_46_re)
                                                              	t_1 = sin(t_0)
                                                              	tmp = 0.0
                                                              	if (x_46_re <= -50000.0)
                                                              		tmp = Float64(t_0 * (fma(0.5, Float64(Float64(x_46_re * x_46_re) / x_46_im), x_46_im) ^ y_46_re));
                                                              	elseif (x_46_re <= 0.095)
                                                              		tmp = Float64((x_46_im ^ y_46_re) * t_1);
                                                              	else
                                                              		tmp = Float64((x_46_re ^ y_46_re) * t_1);
                                                              	end
                                                              	return tmp
                                                              end
                                                              
                                                              code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]}, Block[{t$95$1 = N[Sin[t$95$0], $MachinePrecision]}, If[LessEqual[x$46$re, -50000.0], N[(t$95$0 * N[Power[N[(0.5 * N[(N[(x$46$re * x$46$re), $MachinePrecision] / x$46$im), $MachinePrecision] + x$46$im), $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, 0.095], N[(N[Power[x$46$im, y$46$re], $MachinePrecision] * t$95$1), $MachinePrecision], N[(N[Power[x$46$re, y$46$re], $MachinePrecision] * t$95$1), $MachinePrecision]]]]]
                                                              
                                                              \begin{array}{l}
                                                              
                                                              \\
                                                              \begin{array}{l}
                                                              t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\\
                                                              t_1 := \sin t\_0\\
                                                              \mathbf{if}\;x.re \leq -50000:\\
                                                              \;\;\;\;t\_0 \cdot {\left(\mathsf{fma}\left(0.5, \frac{x.re \cdot x.re}{x.im}, x.im\right)\right)}^{y.re}\\
                                                              
                                                              \mathbf{elif}\;x.re \leq 0.095:\\
                                                              \;\;\;\;{x.im}^{y.re} \cdot t\_1\\
                                                              
                                                              \mathbf{else}:\\
                                                              \;\;\;\;{x.re}^{y.re} \cdot t\_1\\
                                                              
                                                              
                                                              \end{array}
                                                              \end{array}
                                                              
                                                              Derivation
                                                              1. Split input into 3 regimes
                                                              2. if x.re < -5e4

                                                                1. Initial program 30.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 \color{blue}{{\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
                                                                  2. lower-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

                                                                  \[\leadsto {\left(x.im + \frac{1}{2} \cdot \frac{{x.re}^{2}}{x.im}\right)}^{y.re} \cdot \sin \left(\color{blue}{\tan^{-1}_* \frac{x.im}{x.re}} \cdot y.re\right) \]
                                                                7. Step-by-step derivation
                                                                  1. Applied rewrites41.0%

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

                                                                    \[\leadsto {\left(\mathsf{fma}\left(\frac{1}{2}, \frac{x.re \cdot x.re}{x.im}, x.im\right)\right)}^{y.re} \cdot \left(y.re \cdot \color{blue}{\tan^{-1}_* \frac{x.im}{x.re}}\right) \]
                                                                  3. Step-by-step derivation
                                                                    1. Applied rewrites39.2%

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

                                                                    if -5e4 < x.re < 0.095000000000000001

                                                                    1. Initial program 49.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}{\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 \color{blue}{{\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
                                                                      2. lower-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

                                                                      \[\leadsto {x.im}^{y.re} \cdot \sin \color{blue}{\left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)} \]
                                                                    7. Step-by-step derivation
                                                                      1. Applied rewrites50.8%

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

                                                                      if 0.095000000000000001 < x.re

                                                                      1. Initial program 29.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 \color{blue}{{\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
                                                                        2. lower-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                        \[\leadsto \begin{array}{l} \mathbf{if}\;x.re \leq -50000:\\ \;\;\;\;\left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \cdot {\left(\mathsf{fma}\left(0.5, \frac{x.re \cdot x.re}{x.im}, x.im\right)\right)}^{y.re}\\ \mathbf{elif}\;x.re \leq 0.095:\\ \;\;\;\;{x.im}^{y.re} \cdot \sin \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\\ \mathbf{else}:\\ \;\;\;\;{x.re}^{y.re} \cdot \sin \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\\ \end{array} \]
                                                                      10. Add Preprocessing

                                                                      Alternative 21: 39.3% accurate, 2.1× speedup?

                                                                      \[\begin{array}{l} \\ \begin{array}{l} t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\\ t_1 := t\_0 \cdot {\left(\mathsf{fma}\left(0.5, \frac{x.re \cdot x.re}{x.im}, x.im\right)\right)}^{y.re}\\ \mathbf{if}\;x.re \leq -50000:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x.re \leq 0.122:\\ \;\;\;\;{x.im}^{y.re} \cdot \sin t\_0\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                                                                      (FPCore (x.re x.im y.re y.im)
                                                                       :precision binary64
                                                                       (let* ((t_0 (* (atan2 x.im x.re) y.re))
                                                                              (t_1 (* t_0 (pow (fma 0.5 (/ (* x.re x.re) x.im) x.im) y.re))))
                                                                         (if (<= x.re -50000.0)
                                                                           t_1
                                                                           (if (<= x.re 0.122) (* (pow x.im y.re) (sin 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 = atan2(x_46_im, x_46_re) * y_46_re;
                                                                      	double t_1 = t_0 * pow(fma(0.5, ((x_46_re * x_46_re) / x_46_im), x_46_im), y_46_re);
                                                                      	double tmp;
                                                                      	if (x_46_re <= -50000.0) {
                                                                      		tmp = t_1;
                                                                      	} else if (x_46_re <= 0.122) {
                                                                      		tmp = pow(x_46_im, y_46_re) * sin(t_0);
                                                                      	} else {
                                                                      		tmp = t_1;
                                                                      	}
                                                                      	return tmp;
                                                                      }
                                                                      
                                                                      function code(x_46_re, x_46_im, y_46_re, y_46_im)
                                                                      	t_0 = Float64(atan(x_46_im, x_46_re) * y_46_re)
                                                                      	t_1 = Float64(t_0 * (fma(0.5, Float64(Float64(x_46_re * x_46_re) / x_46_im), x_46_im) ^ y_46_re))
                                                                      	tmp = 0.0
                                                                      	if (x_46_re <= -50000.0)
                                                                      		tmp = t_1;
                                                                      	elseif (x_46_re <= 0.122)
                                                                      		tmp = Float64((x_46_im ^ y_46_re) * sin(t_0));
                                                                      	else
                                                                      		tmp = t_1;
                                                                      	end
                                                                      	return tmp
                                                                      end
                                                                      
                                                                      code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]}, Block[{t$95$1 = N[(t$95$0 * N[Power[N[(0.5 * N[(N[(x$46$re * x$46$re), $MachinePrecision] / x$46$im), $MachinePrecision] + x$46$im), $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x$46$re, -50000.0], t$95$1, If[LessEqual[x$46$re, 0.122], N[(N[Power[x$46$im, y$46$re], $MachinePrecision] * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision], t$95$1]]]]
                                                                      
                                                                      \begin{array}{l}
                                                                      
                                                                      \\
                                                                      \begin{array}{l}
                                                                      t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\\
                                                                      t_1 := t\_0 \cdot {\left(\mathsf{fma}\left(0.5, \frac{x.re \cdot x.re}{x.im}, x.im\right)\right)}^{y.re}\\
                                                                      \mathbf{if}\;x.re \leq -50000:\\
                                                                      \;\;\;\;t\_1\\
                                                                      
                                                                      \mathbf{elif}\;x.re \leq 0.122:\\
                                                                      \;\;\;\;{x.im}^{y.re} \cdot \sin t\_0\\
                                                                      
                                                                      \mathbf{else}:\\
                                                                      \;\;\;\;t\_1\\
                                                                      
                                                                      
                                                                      \end{array}
                                                                      \end{array}
                                                                      
                                                                      Derivation
                                                                      1. Split input into 2 regimes
                                                                      2. if x.re < -5e4 or 0.122 < x.re

                                                                        1. Initial program 30.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 \color{blue}{{\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
                                                                          2. lower-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

                                                                          \[\leadsto {\left(x.im + \frac{1}{2} \cdot \frac{{x.re}^{2}}{x.im}\right)}^{y.re} \cdot \sin \left(\color{blue}{\tan^{-1}_* \frac{x.im}{x.re}} \cdot y.re\right) \]
                                                                        7. Step-by-step derivation
                                                                          1. Applied rewrites40.2%

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

                                                                            \[\leadsto {\left(\mathsf{fma}\left(\frac{1}{2}, \frac{x.re \cdot x.re}{x.im}, x.im\right)\right)}^{y.re} \cdot \left(y.re \cdot \color{blue}{\tan^{-1}_* \frac{x.im}{x.re}}\right) \]
                                                                          3. Step-by-step derivation
                                                                            1. Applied rewrites37.5%

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

                                                                            if -5e4 < x.re < 0.122

                                                                            1. Initial program 49.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}{\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 \color{blue}{{\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
                                                                              2. lower-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

                                                                              \[\leadsto {x.im}^{y.re} \cdot \sin \color{blue}{\left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)} \]
                                                                            7. Step-by-step derivation
                                                                              1. Applied rewrites50.8%

                                                                                \[\leadsto {x.im}^{y.re} \cdot \sin \color{blue}{\left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)} \]
                                                                            8. Recombined 2 regimes into one program.
                                                                            9. Final simplification44.9%

                                                                              \[\leadsto \begin{array}{l} \mathbf{if}\;x.re \leq -50000:\\ \;\;\;\;\left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \cdot {\left(\mathsf{fma}\left(0.5, \frac{x.re \cdot x.re}{x.im}, x.im\right)\right)}^{y.re}\\ \mathbf{elif}\;x.re \leq 0.122:\\ \;\;\;\;{x.im}^{y.re} \cdot \sin \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \cdot {\left(\mathsf{fma}\left(0.5, \frac{x.re \cdot x.re}{x.im}, x.im\right)\right)}^{y.re}\\ \end{array} \]
                                                                            10. Add Preprocessing

                                                                            Alternative 22: 37.2% accurate, 2.9× speedup?

                                                                            \[\begin{array}{l} \\ \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \cdot {\left(\mathsf{fma}\left(0.5, \frac{x.re \cdot x.re}{x.im}, x.im\right)\right)}^{y.re} \end{array} \]
                                                                            (FPCore (x.re x.im y.re y.im)
                                                                             :precision binary64
                                                                             (*
                                                                              (* (atan2 x.im x.re) y.re)
                                                                              (pow (fma 0.5 (/ (* x.re x.re) x.im) x.im) y.re)))
                                                                            double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
                                                                            	return (atan2(x_46_im, x_46_re) * y_46_re) * pow(fma(0.5, ((x_46_re * x_46_re) / x_46_im), x_46_im), y_46_re);
                                                                            }
                                                                            
                                                                            function code(x_46_re, x_46_im, y_46_re, y_46_im)
                                                                            	return Float64(Float64(atan(x_46_im, x_46_re) * y_46_re) * (fma(0.5, Float64(Float64(x_46_re * x_46_re) / x_46_im), x_46_im) ^ y_46_re))
                                                                            end
                                                                            
                                                                            code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[(N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision] * N[Power[N[(0.5 * N[(N[(x$46$re * x$46$re), $MachinePrecision] / x$46$im), $MachinePrecision] + x$46$im), $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]
                                                                            
                                                                            \begin{array}{l}
                                                                            
                                                                            \\
                                                                            \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \cdot {\left(\mathsf{fma}\left(0.5, \frac{x.re \cdot x.re}{x.im}, x.im\right)\right)}^{y.re}
                                                                            \end{array}
                                                                            
                                                                            Derivation
                                                                            1. Initial program 41.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 \color{blue}{{\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
                                                                              2. lower-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

                                                                              \[\leadsto {\left(x.im + \frac{1}{2} \cdot \frac{{x.re}^{2}}{x.im}\right)}^{y.re} \cdot \sin \left(\color{blue}{\tan^{-1}_* \frac{x.im}{x.re}} \cdot y.re\right) \]
                                                                            7. Step-by-step derivation
                                                                              1. Applied rewrites42.2%

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

                                                                                \[\leadsto {\left(\mathsf{fma}\left(\frac{1}{2}, \frac{x.re \cdot x.re}{x.im}, x.im\right)\right)}^{y.re} \cdot \left(y.re \cdot \color{blue}{\tan^{-1}_* \frac{x.im}{x.re}}\right) \]
                                                                              3. Step-by-step derivation
                                                                                1. Applied rewrites37.1%

                                                                                  \[\leadsto {\left(\mathsf{fma}\left(0.5, \frac{x.re \cdot x.re}{x.im}, x.im\right)\right)}^{y.re} \cdot \left(y.re \cdot \color{blue}{\tan^{-1}_* \frac{x.im}{x.re}}\right) \]
                                                                                2. Final simplification37.1%

                                                                                  \[\leadsto \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \cdot {\left(\mathsf{fma}\left(0.5, \frac{x.re \cdot x.re}{x.im}, x.im\right)\right)}^{y.re} \]
                                                                                3. Add Preprocessing

                                                                                Alternative 23: 13.1% accurate, 3.2× speedup?

                                                                                \[\begin{array}{l} \\ 1 \cdot \sin \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \end{array} \]
                                                                                (FPCore (x.re x.im y.re y.im)
                                                                                 :precision binary64
                                                                                 (* 1.0 (sin (* (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) {
                                                                                	return 1.0 * sin((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
                                                                                    code = 1.0d0 * sin((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) {
                                                                                	return 1.0 * Math.sin((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):
                                                                                	return 1.0 * math.sin((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)
                                                                                	return Float64(1.0 * sin(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)
                                                                                	tmp = 1.0 * sin((atan2(x_46_im, x_46_re) * y_46_re));
                                                                                end
                                                                                
                                                                                code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[(1.0 * N[Sin[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
                                                                                
                                                                                \begin{array}{l}
                                                                                
                                                                                \\
                                                                                1 \cdot \sin \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)
                                                                                \end{array}
                                                                                
                                                                                Derivation
                                                                                1. Initial program 41.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 \color{blue}{{\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
                                                                                  2. lower-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                  \[\leadsto 1 \cdot \sin \color{blue}{\left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)} \]
                                                                                7. Step-by-step derivation
                                                                                  1. Applied rewrites11.4%

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

                                                                                  Alternative 24: 13.1% accurate, 6.4× speedup?

                                                                                  \[\begin{array}{l} \\ \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re \end{array} \]
                                                                                  (FPCore (x.re x.im y.re y.im) :precision binary64 (* (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) {
                                                                                  	return 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
                                                                                      code = 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) {
                                                                                  	return 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):
                                                                                  	return 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)
                                                                                  	return 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)
                                                                                  	tmp = atan2(x_46_im, x_46_re) * y_46_re;
                                                                                  end
                                                                                  
                                                                                  code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]
                                                                                  
                                                                                  \begin{array}{l}
                                                                                  
                                                                                  \\
                                                                                  \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re
                                                                                  \end{array}
                                                                                  
                                                                                  Derivation
                                                                                  1. Initial program 41.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 \color{blue}{{\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
                                                                                    2. lower-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                    \[\leadsto y.re \cdot \color{blue}{\tan^{-1}_* \frac{x.im}{x.re}} \]
                                                                                  7. Step-by-step derivation
                                                                                    1. Applied rewrites11.3%

                                                                                      \[\leadsto y.re \cdot \color{blue}{\tan^{-1}_* \frac{x.im}{x.re}} \]
                                                                                    2. Final simplification11.3%

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

                                                                                    Reproduce

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