powComplex, imaginary part

Percentage Accurate: 41.3% → 79.5%
Time: 18.5s
Alternatives: 23
Speedup: 2.1×

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 23 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: 79.5% accurate, 0.7× speedup?

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

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

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

\mathbf{else}:\\
\;\;\;\;\sin \left(t\_0 \cdot y.im\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}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y.re < -1.86e21

    1. Initial program 34.8%

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

      \[\leadsto e^{\color{blue}{\mathsf{fma}\left(-y.im, \frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.re}, \log \left(\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. Taylor expanded in y.im around 0

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

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

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

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

    if -1.86e21 < y.re < 1.02e8

    1. Initial program 40.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. 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. lower-/.f64N/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}}} \]
    4. Applied rewrites82.7%

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

    if 1.02e8 < y.re

    1. Initial program 25.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 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. +-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) \]
      5. 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) \]
      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{x.re \cdot x.re + \color{blue}{x.im \cdot x.im}}\right) \cdot y.im\right) \]
      7. lower-hypot.f6470.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 \left(\log \color{blue}{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)} \cdot y.im\right) \]
    5. Applied rewrites70.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(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification80.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y.re \leq -1.86 \cdot 10^{+21}:\\ \;\;\;\;\sin \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \cdot e^{\mathsf{fma}\left(-y.im, \frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.re}, \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\right) \cdot y.re}\\ \mathbf{elif}\;y.re \leq 102000000:\\ \;\;\;\;\frac{\sin \left(\mathsf{fma}\left(y.im, \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right), \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\right) \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}}{{\left(e^{y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}}\\ \mathbf{else}:\\ \;\;\;\;\sin \left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im\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 2: 79.6% accurate, 0.9× speedup?

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

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

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

\mathbf{else}:\\
\;\;\;\;\sin \left(t\_0 \cdot y.im\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}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y.re < -1.32e-16

    1. Initial program 35.6%

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

      \[\leadsto e^{\color{blue}{\mathsf{fma}\left(-y.im, \frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.re}, \log \left(\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. Taylor expanded in y.im around 0

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

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

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

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

    if -1.32e-16 < y.re < 0.0280000000000000006

    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. Step-by-step derivation
      1. lift-+.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.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. flip-+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 \color{blue}{\left(\frac{\left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im\right) \cdot \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im\right) - \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re}\right)} \]
      3. clear-numN/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(\frac{1}{\frac{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re}{\left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im\right) \cdot \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im\right) - \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}}\right)} \]
      4. 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(\frac{1}{\frac{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re}{\left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im\right) \cdot \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im\right) - \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}}\right)} \]
      5. clear-numN/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(\frac{1}{\color{blue}{\frac{1}{\frac{\left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im\right) \cdot \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im\right) - \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}{\log \left(\sqrt{x.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. Applied rewrites46.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(\frac{1}{{\left(\mathsf{fma}\left(y.im, \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right), y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)}^{-1}}\right)} \]
    5. 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(\frac{1}{{\left(\mathsf{fma}\left(y.im, \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right), y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)}^{-1}}\right) \]
    6. 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(\frac{1}{{\left(\mathsf{fma}\left(y.im, \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right), y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)}^{-1}}\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(\frac{1}{{\left(\mathsf{fma}\left(y.im, \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right), y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)}^{-1}}\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(\frac{1}{{\left(\mathsf{fma}\left(y.im, \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right), y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)}^{-1}}\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(\frac{1}{{\left(\mathsf{fma}\left(y.im, \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right), y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)}^{-1}}\right) \]
      5. lower-atan2.f6481.5

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

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

    if 0.0280000000000000006 < y.re

    1. Initial program 25.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 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. +-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) \]
      5. 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) \]
      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{x.re \cdot x.re + \color{blue}{x.im \cdot x.im}}\right) \cdot y.im\right) \]
      7. lower-hypot.f6469.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(\log \color{blue}{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)} \cdot y.im\right) \]
    5. Applied rewrites69.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(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification80.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y.re \leq -1.32 \cdot 10^{-16}:\\ \;\;\;\;\sin \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \cdot e^{\mathsf{fma}\left(-y.im, \frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.re}, \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\right) \cdot y.re}\\ \mathbf{elif}\;y.re \leq 0.028:\\ \;\;\;\;\sin \left(\frac{1}{{\left(\mathsf{fma}\left(y.im, \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right), \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\right)}^{-1}}\right) \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\ \mathbf{else}:\\ \;\;\;\;\sin \left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im\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 3: 79.6% accurate, 1.0× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;\sin t\_1 \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}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y.re < -1.32e-16

    1. Initial program 35.6%

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

      \[\leadsto e^{\color{blue}{\mathsf{fma}\left(-y.im, \frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.re}, \log \left(\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. Taylor expanded in y.im around 0

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

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

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

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

    if -1.32e-16 < y.re < 0.0280000000000000006

    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. Step-by-step derivation
      1. lift-+.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.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. flip-+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 \color{blue}{\left(\frac{\left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im\right) \cdot \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im\right) - \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re}\right)} \]
      3. clear-numN/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(\frac{1}{\frac{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re}{\left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im\right) \cdot \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im\right) - \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}}\right)} \]
      4. 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(\frac{1}{\frac{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re}{\left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im\right) \cdot \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im\right) - \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}}\right)} \]
      5. clear-numN/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(\frac{1}{\color{blue}{\frac{1}{\frac{\left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im\right) \cdot \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im\right) - \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}{\log \left(\sqrt{x.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. Applied rewrites46.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(\frac{1}{{\left(\mathsf{fma}\left(y.im, \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right), y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)}^{-1}}\right)} \]
    5. Step-by-step derivation
      1. lift-/.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(\frac{1}{{\left(\mathsf{fma}\left(y.im, \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right), y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)}^{-1}}\right)} \]
      2. lift-pow.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(\frac{1}{\color{blue}{{\left(\mathsf{fma}\left(y.im, \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right), y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)}^{-1}}}\right) \]
      3. unpow-1N/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(\frac{1}{\color{blue}{\frac{1}{\mathsf{fma}\left(y.im, \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right), y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}}}\right) \]
      4. remove-double-div46.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.im, \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right), y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)} \]
      5. lift-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 \color{blue}{\left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right) + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
      6. +-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(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re} + y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)} \]
      7. lift-*.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}{y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}} + y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \]
      8. *-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}{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re} + y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \]
      9. *-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(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re + \color{blue}{\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right) \cdot y.im}\right) \]
      10. lift-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(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re + \color{blue}{\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)} \cdot y.im\right) \]
      11. lift-hypot.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(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re + \log \color{blue}{\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)} \cdot y.im\right) \]
      12. lift-*.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(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re + \log \left(\sqrt{\color{blue}{x.im \cdot x.im} + x.re \cdot x.re}\right) \cdot y.im\right) \]
      13. lift-*.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(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re + \log \left(\sqrt{x.im \cdot x.im + \color{blue}{x.re \cdot x.re}}\right) \cdot y.im\right) \]
      14. +-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(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re + \log \left(\sqrt{\color{blue}{x.re \cdot x.re + x.im \cdot x.im}}\right) \cdot y.im\right) \]
      15. lift-*.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(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re + \log \left(\sqrt{\color{blue}{x.re \cdot x.re} + x.im \cdot x.im}\right) \cdot y.im\right) \]
      16. lift-*.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(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re + \log \left(\sqrt{x.re \cdot x.re + \color{blue}{x.im \cdot x.im}}\right) \cdot y.im\right) \]
      17. 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 \color{blue}{\left(\mathsf{fma}\left(\tan^{-1}_* \frac{x.im}{x.re}, y.re, \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im\right)\right)} \]
    6. Applied rewrites46.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(\tan^{-1}_* \frac{x.im}{x.re}, y.re, \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im\right)\right)} \]
    7. 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(\tan^{-1}_* \frac{x.im}{x.re}, y.re, \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im\right)\right) \]
    8. 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(\tan^{-1}_* \frac{x.im}{x.re}, y.re, \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im\right)\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(\tan^{-1}_* \frac{x.im}{x.re}, y.re, \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im\right)\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(\tan^{-1}_* \frac{x.im}{x.re}, y.re, \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im\right)\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(\tan^{-1}_* \frac{x.im}{x.re}, y.re, \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im\right)\right) \]
      5. lower-atan2.f6481.4

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

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

    if 0.0280000000000000006 < y.re

    1. Initial program 25.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 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. +-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) \]
      5. 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) \]
      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{x.re \cdot x.re + \color{blue}{x.im \cdot x.im}}\right) \cdot y.im\right) \]
      7. lower-hypot.f6469.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(\log \color{blue}{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)} \cdot y.im\right) \]
    5. Applied rewrites69.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(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification79.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y.re \leq -1.32 \cdot 10^{-16}:\\ \;\;\;\;\sin \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \cdot e^{\mathsf{fma}\left(-y.im, \frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.re}, \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\right) \cdot y.re}\\ \mathbf{elif}\;y.re \leq 0.028:\\ \;\;\;\;\sin \left(\mathsf{fma}\left(\tan^{-1}_* \frac{x.im}{x.re}, y.re, \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im\right)\right) \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\ \mathbf{else}:\\ \;\;\;\;\sin \left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im\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 4: 80.3% accurate, 1.0× speedup?

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

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

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

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


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

    1. Initial program 35.6%

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

      \[\leadsto e^{\color{blue}{\mathsf{fma}\left(-y.im, \frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.re}, \log \left(\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. Taylor expanded in y.im around 0

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

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

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

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

    if -1.32e-16 < y.re < 0.00440000000000000027

    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. Step-by-step derivation
      1. lift-+.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.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. flip-+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 \color{blue}{\left(\frac{\left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im\right) \cdot \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im\right) - \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re}\right)} \]
      3. clear-numN/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(\frac{1}{\frac{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re}{\left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im\right) \cdot \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im\right) - \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}}\right)} \]
      4. 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(\frac{1}{\frac{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re}{\left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im\right) \cdot \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im\right) - \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}}\right)} \]
      5. clear-numN/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(\frac{1}{\color{blue}{\frac{1}{\frac{\left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im\right) \cdot \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im\right) - \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}{\log \left(\sqrt{x.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. Applied rewrites46.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(\frac{1}{{\left(\mathsf{fma}\left(y.im, \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right), y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)}^{-1}}\right)} \]
    5. Step-by-step derivation
      1. lift-/.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(\frac{1}{{\left(\mathsf{fma}\left(y.im, \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right), y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)}^{-1}}\right)} \]
      2. lift-pow.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(\frac{1}{\color{blue}{{\left(\mathsf{fma}\left(y.im, \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right), y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)}^{-1}}}\right) \]
      3. unpow-1N/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(\frac{1}{\color{blue}{\frac{1}{\mathsf{fma}\left(y.im, \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right), y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}}}\right) \]
      4. remove-double-div46.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.im, \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right), y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)} \]
      5. lift-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 \color{blue}{\left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right) + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
      6. +-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(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re} + y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)} \]
      7. lift-*.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}{y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}} + y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \]
      8. *-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}{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re} + y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \]
      9. *-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(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re + \color{blue}{\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right) \cdot y.im}\right) \]
      10. lift-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(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re + \color{blue}{\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)} \cdot y.im\right) \]
      11. lift-hypot.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(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re + \log \color{blue}{\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)} \cdot y.im\right) \]
      12. lift-*.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(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re + \log \left(\sqrt{\color{blue}{x.im \cdot x.im} + x.re \cdot x.re}\right) \cdot y.im\right) \]
      13. lift-*.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(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re + \log \left(\sqrt{x.im \cdot x.im + \color{blue}{x.re \cdot x.re}}\right) \cdot y.im\right) \]
      14. +-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(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re + \log \left(\sqrt{\color{blue}{x.re \cdot x.re + x.im \cdot x.im}}\right) \cdot y.im\right) \]
      15. lift-*.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(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re + \log \left(\sqrt{\color{blue}{x.re \cdot x.re} + x.im \cdot x.im}\right) \cdot y.im\right) \]
      16. lift-*.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(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re + \log \left(\sqrt{x.re \cdot x.re + \color{blue}{x.im \cdot x.im}}\right) \cdot y.im\right) \]
      17. 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 \color{blue}{\left(\mathsf{fma}\left(\tan^{-1}_* \frac{x.im}{x.re}, y.re, \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im\right)\right)} \]
    6. Applied rewrites46.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(\tan^{-1}_* \frac{x.im}{x.re}, y.re, \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im\right)\right)} \]
    7. 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(\tan^{-1}_* \frac{x.im}{x.re}, y.re, \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im\right)\right) \]
    8. 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(\tan^{-1}_* \frac{x.im}{x.re}, y.re, \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im\right)\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(\tan^{-1}_* \frac{x.im}{x.re}, y.re, \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im\right)\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(\tan^{-1}_* \frac{x.im}{x.re}, y.re, \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im\right)\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(\tan^{-1}_* \frac{x.im}{x.re}, y.re, \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im\right)\right) \]
      5. lower-atan2.f6481.4

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

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

    if 0.00440000000000000027 < y.re

    1. Initial program 25.4%

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

      \[\leadsto e^{\color{blue}{\mathsf{fma}\left(-y.im, \frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.re}, \log \left(\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. Taylor expanded in y.im around 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 5: 79.6% accurate, 1.0× speedup?

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

      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.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 rewrites30.3%

        \[\leadsto e^{\color{blue}{\mathsf{fma}\left(-y.im, \frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.re}, \log \left(\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. Taylor expanded in y.im around 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        if -19 < y.re < 0.00440000000000000027

        1. Initial program 40.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. Step-by-step derivation
          1. lift-+.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.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. flip-+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 \color{blue}{\left(\frac{\left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im\right) \cdot \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im\right) - \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re}\right)} \]
          3. clear-numN/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(\frac{1}{\frac{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re}{\left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im\right) \cdot \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im\right) - \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}}\right)} \]
          4. 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(\frac{1}{\frac{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re}{\left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im\right) \cdot \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im\right) - \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}}\right)} \]
          5. clear-numN/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(\frac{1}{\color{blue}{\frac{1}{\frac{\left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im\right) \cdot \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im\right) - \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}{\log \left(\sqrt{x.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. Applied rewrites47.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(\frac{1}{{\left(\mathsf{fma}\left(y.im, \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right), y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)}^{-1}}\right)} \]
        5. Step-by-step derivation
          1. lift-/.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(\frac{1}{{\left(\mathsf{fma}\left(y.im, \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right), y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)}^{-1}}\right)} \]
          2. lift-pow.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(\frac{1}{\color{blue}{{\left(\mathsf{fma}\left(y.im, \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right), y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)}^{-1}}}\right) \]
          3. unpow-1N/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(\frac{1}{\color{blue}{\frac{1}{\mathsf{fma}\left(y.im, \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right), y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}}}\right) \]
          4. remove-double-div47.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(\mathsf{fma}\left(y.im, \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right), y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)} \]
          5. lift-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 \color{blue}{\left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right) + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
          6. +-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(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re} + y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)} \]
          7. lift-*.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}{y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}} + y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \]
          8. *-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}{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re} + y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \]
          9. *-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(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re + \color{blue}{\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right) \cdot y.im}\right) \]
          10. lift-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(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re + \color{blue}{\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)} \cdot y.im\right) \]
          11. lift-hypot.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(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re + \log \color{blue}{\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)} \cdot y.im\right) \]
          12. lift-*.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(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re + \log \left(\sqrt{\color{blue}{x.im \cdot x.im} + x.re \cdot x.re}\right) \cdot y.im\right) \]
          13. lift-*.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(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re + \log \left(\sqrt{x.im \cdot x.im + \color{blue}{x.re \cdot x.re}}\right) \cdot y.im\right) \]
          14. +-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(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re + \log \left(\sqrt{\color{blue}{x.re \cdot x.re + x.im \cdot x.im}}\right) \cdot y.im\right) \]
          15. lift-*.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(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re + \log \left(\sqrt{\color{blue}{x.re \cdot x.re} + x.im \cdot x.im}\right) \cdot y.im\right) \]
          16. lift-*.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(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re + \log \left(\sqrt{x.re \cdot x.re + \color{blue}{x.im \cdot x.im}}\right) \cdot y.im\right) \]
          17. 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 \color{blue}{\left(\mathsf{fma}\left(\tan^{-1}_* \frac{x.im}{x.re}, y.re, \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im\right)\right)} \]
        6. Applied rewrites47.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(\tan^{-1}_* \frac{x.im}{x.re}, y.re, \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im\right)\right)} \]
        7. 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(\tan^{-1}_* \frac{x.im}{x.re}, y.re, \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im\right)\right) \]
        8. 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(\tan^{-1}_* \frac{x.im}{x.re}, y.re, \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im\right)\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(\tan^{-1}_* \frac{x.im}{x.re}, y.re, \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im\right)\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(\tan^{-1}_* \frac{x.im}{x.re}, y.re, \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im\right)\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(\tan^{-1}_* \frac{x.im}{x.re}, y.re, \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im\right)\right) \]
          5. lower-atan2.f6481.3

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

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

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

      Alternative 6: 75.2% accurate, 1.1× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_0 := {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{\left(0.5 \cdot y.re\right)}\\ \mathbf{if}\;y.re \leq -1.45 \cdot 10^{-16}:\\ \;\;\;\;\left(\sin \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \cdot t\_0\right) \cdot t\_0\\ \mathbf{elif}\;y.re \leq 0.03:\\ \;\;\;\;\sin \left(\mathsf{fma}\left(\tan^{-1}_* \frac{x.im}{x.re}, y.re, \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im\right)\right) \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\ \mathbf{else}:\\ \;\;\;\;\sin \left(\mathsf{fma}\left(y.im, \frac{\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)}{y.re}, \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot y.re\right) \cdot {\left(\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 (pow (hypot x.re x.im) (* 0.5 y.re))))
         (if (<= y.re -1.45e-16)
           (* (* (sin (* (atan2 x.im x.re) y.re)) t_0) t_0)
           (if (<= y.re 0.03)
             (*
              (sin (fma (atan2 x.im x.re) y.re (* (log (hypot x.re x.im)) y.im)))
              (exp (* (atan2 x.im x.re) (- y.im))))
             (*
              (sin
               (*
                (fma y.im (/ (log (hypot x.im x.re)) y.re) (atan2 x.im x.re))
                y.re))
              (pow (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 = pow(hypot(x_46_re, x_46_im), (0.5 * y_46_re));
      	double tmp;
      	if (y_46_re <= -1.45e-16) {
      		tmp = (sin((atan2(x_46_im, x_46_re) * y_46_re)) * t_0) * t_0;
      	} else if (y_46_re <= 0.03) {
      		tmp = sin(fma(atan2(x_46_im, x_46_re), y_46_re, (log(hypot(x_46_re, x_46_im)) * y_46_im))) * exp((atan2(x_46_im, x_46_re) * -y_46_im));
      	} else {
      		tmp = sin((fma(y_46_im, (log(hypot(x_46_im, x_46_re)) / y_46_re), atan2(x_46_im, x_46_re)) * y_46_re)) * pow(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 = hypot(x_46_re, x_46_im) ^ Float64(0.5 * y_46_re)
      	tmp = 0.0
      	if (y_46_re <= -1.45e-16)
      		tmp = Float64(Float64(sin(Float64(atan(x_46_im, x_46_re) * y_46_re)) * t_0) * t_0);
      	elseif (y_46_re <= 0.03)
      		tmp = Float64(sin(fma(atan(x_46_im, x_46_re), y_46_re, Float64(log(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 = Float64(sin(Float64(fma(y_46_im, Float64(log(hypot(x_46_im, x_46_re)) / y_46_re), atan(x_46_im, x_46_re)) * y_46_re)) * (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[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], N[(0.5 * y$46$re), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -1.45e-16], N[(N[(N[Sin[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]], $MachinePrecision] * t$95$0), $MachinePrecision] * t$95$0), $MachinePrecision], If[LessEqual[y$46$re, 0.03], N[(N[Sin[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re + N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Sin[N[(N[(y$46$im * N[(N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision] / y$46$re), $MachinePrecision] + N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision] * y$46$re), $MachinePrecision]], $MachinePrecision] * N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_0 := {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{\left(0.5 \cdot y.re\right)}\\
      \mathbf{if}\;y.re \leq -1.45 \cdot 10^{-16}:\\
      \;\;\;\;\left(\sin \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \cdot t\_0\right) \cdot t\_0\\
      
      \mathbf{elif}\;y.re \leq 0.03:\\
      \;\;\;\;\sin \left(\mathsf{fma}\left(\tan^{-1}_* \frac{x.im}{x.re}, y.re, \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im\right)\right) \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\
      
      \mathbf{else}:\\
      \;\;\;\;\sin \left(\mathsf{fma}\left(y.im, \frac{\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)}{y.re}, \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot y.re\right) \cdot {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 3 regimes
      2. if y.re < -1.4499999999999999e-16

        1. Initial program 35.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. +-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) \]
          5. 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) \]
          6. 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) \]
          7. lower-hypot.f64N/A

            \[\leadsto {\color{blue}{\left(\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) \]
          8. lower-sin.f64N/A

            \[\leadsto {\left(\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)} \]
          9. *-commutativeN/A

            \[\leadsto {\left(\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)} \]
          10. lower-*.f64N/A

            \[\leadsto {\left(\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-atan2.f6479.5

            \[\leadsto {\left(\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 rewrites79.5%

          \[\leadsto \color{blue}{{\left(\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. Step-by-step derivation
          1. Applied rewrites79.6%

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

          if -1.4499999999999999e-16 < y.re < 0.029999999999999999

          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. Step-by-step derivation
            1. lift-+.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.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. flip-+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 \color{blue}{\left(\frac{\left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im\right) \cdot \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im\right) - \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re}\right)} \]
            3. clear-numN/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(\frac{1}{\frac{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re}{\left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im\right) \cdot \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im\right) - \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}}\right)} \]
            4. 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(\frac{1}{\frac{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re}{\left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im\right) \cdot \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im\right) - \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}}\right)} \]
            5. clear-numN/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(\frac{1}{\color{blue}{\frac{1}{\frac{\left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im\right) \cdot \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im\right) - \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}{\log \left(\sqrt{x.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. Applied rewrites47.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(\frac{1}{{\left(\mathsf{fma}\left(y.im, \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right), y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)}^{-1}}\right)} \]
          5. Step-by-step derivation
            1. lift-/.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(\frac{1}{{\left(\mathsf{fma}\left(y.im, \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right), y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)}^{-1}}\right)} \]
            2. lift-pow.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(\frac{1}{\color{blue}{{\left(\mathsf{fma}\left(y.im, \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right), y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)}^{-1}}}\right) \]
            3. unpow-1N/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(\frac{1}{\color{blue}{\frac{1}{\mathsf{fma}\left(y.im, \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right), y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}}}\right) \]
            4. remove-double-div47.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(\mathsf{fma}\left(y.im, \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right), y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)} \]
            5. lift-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 \color{blue}{\left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right) + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
            6. +-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(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re} + y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)} \]
            7. lift-*.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}{y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}} + y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \]
            8. *-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}{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re} + y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \]
            9. *-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(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re + \color{blue}{\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right) \cdot y.im}\right) \]
            10. lift-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(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re + \color{blue}{\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)} \cdot y.im\right) \]
            11. lift-hypot.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(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re + \log \color{blue}{\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)} \cdot y.im\right) \]
            12. lift-*.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(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re + \log \left(\sqrt{\color{blue}{x.im \cdot x.im} + x.re \cdot x.re}\right) \cdot y.im\right) \]
            13. lift-*.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(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re + \log \left(\sqrt{x.im \cdot x.im + \color{blue}{x.re \cdot x.re}}\right) \cdot y.im\right) \]
            14. +-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(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re + \log \left(\sqrt{\color{blue}{x.re \cdot x.re + x.im \cdot x.im}}\right) \cdot y.im\right) \]
            15. lift-*.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(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re + \log \left(\sqrt{\color{blue}{x.re \cdot x.re} + x.im \cdot x.im}\right) \cdot y.im\right) \]
            16. lift-*.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(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re + \log \left(\sqrt{x.re \cdot x.re + \color{blue}{x.im \cdot x.im}}\right) \cdot y.im\right) \]
            17. 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 \color{blue}{\left(\mathsf{fma}\left(\tan^{-1}_* \frac{x.im}{x.re}, y.re, \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im\right)\right)} \]
          6. Applied rewrites47.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(\mathsf{fma}\left(\tan^{-1}_* \frac{x.im}{x.re}, y.re, \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im\right)\right)} \]
          7. 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(\tan^{-1}_* \frac{x.im}{x.re}, y.re, \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im\right)\right) \]
          8. 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(\tan^{-1}_* \frac{x.im}{x.re}, y.re, \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im\right)\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(\tan^{-1}_* \frac{x.im}{x.re}, y.re, \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im\right)\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(\tan^{-1}_* \frac{x.im}{x.re}, y.re, \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im\right)\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(\tan^{-1}_* \frac{x.im}{x.re}, y.re, \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im\right)\right) \]
            5. lower-atan2.f6481.5

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

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

          if 0.029999999999999999 < y.re

          1. Initial program 25.8%

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

            \[\leadsto e^{\color{blue}{\mathsf{fma}\left(-y.im, \frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.re}, \log \left(\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. Taylor expanded in y.re around inf

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        Alternative 7: 75.2% accurate, 1.1× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} t_0 := \sin \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\\ t_1 := {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{\left(0.5 \cdot y.re\right)}\\ \mathbf{if}\;y.re \leq -1.45 \cdot 10^{-16}:\\ \;\;\;\;\left(t\_0 \cdot t\_1\right) \cdot t\_1\\ \mathbf{elif}\;y.re \leq 0.045:\\ \;\;\;\;\sin \left(\mathsf{fma}\left(\tan^{-1}_* \frac{x.im}{x.re}, y.re, \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im\right)\right) \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\ \mathbf{else}:\\ \;\;\;\;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 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)))
                (t_1 (pow (hypot x.re x.im) (* 0.5 y.re))))
           (if (<= y.re -1.45e-16)
             (* (* t_0 t_1) t_1)
             (if (<= y.re 0.045)
               (*
                (sin (fma (atan2 x.im x.re) y.re (* (log (hypot x.re x.im)) y.im)))
                (exp (* (atan2 x.im x.re) (- y.im))))
               (*
                (exp
                 (-
                  (* (log (sqrt (+ (* x.im x.im) (* x.re x.re)))) y.re)
                  (* (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));
        	double t_1 = pow(hypot(x_46_re, x_46_im), (0.5 * y_46_re));
        	double tmp;
        	if (y_46_re <= -1.45e-16) {
        		tmp = (t_0 * t_1) * t_1;
        	} else if (y_46_re <= 0.045) {
        		tmp = sin(fma(atan2(x_46_im, x_46_re), y_46_re, (log(hypot(x_46_re, x_46_im)) * y_46_im))) * exp((atan2(x_46_im, x_46_re) * -y_46_im));
        	} else {
        		tmp = 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))) * 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))
        	t_1 = hypot(x_46_re, x_46_im) ^ Float64(0.5 * y_46_re)
        	tmp = 0.0
        	if (y_46_re <= -1.45e-16)
        		tmp = Float64(Float64(t_0 * t_1) * t_1);
        	elseif (y_46_re <= 0.045)
        		tmp = Float64(sin(fma(atan(x_46_im, x_46_re), y_46_re, Float64(log(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 = Float64(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))) * 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]}, Block[{t$95$1 = N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], N[(0.5 * y$46$re), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -1.45e-16], N[(N[(t$95$0 * t$95$1), $MachinePrecision] * t$95$1), $MachinePrecision], If[LessEqual[y$46$re, 0.045], N[(N[Sin[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re + N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 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] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $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)\\
        t_1 := {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{\left(0.5 \cdot y.re\right)}\\
        \mathbf{if}\;y.re \leq -1.45 \cdot 10^{-16}:\\
        \;\;\;\;\left(t\_0 \cdot t\_1\right) \cdot t\_1\\
        
        \mathbf{elif}\;y.re \leq 0.045:\\
        \;\;\;\;\sin \left(\mathsf{fma}\left(\tan^{-1}_* \frac{x.im}{x.re}, y.re, \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im\right)\right) \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\
        
        \mathbf{else}:\\
        \;\;\;\;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 t\_0\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 3 regimes
        2. if y.re < -1.4499999999999999e-16

          1. Initial program 35.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. +-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) \]
            5. 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) \]
            6. 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) \]
            7. lower-hypot.f64N/A

              \[\leadsto {\color{blue}{\left(\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) \]
            8. lower-sin.f64N/A

              \[\leadsto {\left(\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)} \]
            9. *-commutativeN/A

              \[\leadsto {\left(\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)} \]
            10. lower-*.f64N/A

              \[\leadsto {\left(\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-atan2.f6479.5

              \[\leadsto {\left(\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 rewrites79.5%

            \[\leadsto \color{blue}{{\left(\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. Step-by-step derivation
            1. Applied rewrites79.6%

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

            if -1.4499999999999999e-16 < y.re < 0.044999999999999998

            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. Step-by-step derivation
              1. lift-+.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.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. flip-+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 \color{blue}{\left(\frac{\left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im\right) \cdot \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im\right) - \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re}\right)} \]
              3. clear-numN/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(\frac{1}{\frac{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re}{\left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im\right) \cdot \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im\right) - \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}}\right)} \]
              4. 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(\frac{1}{\frac{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re}{\left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im\right) \cdot \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im\right) - \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}}\right)} \]
              5. clear-numN/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(\frac{1}{\color{blue}{\frac{1}{\frac{\left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im\right) \cdot \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im\right) - \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}{\log \left(\sqrt{x.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. Applied rewrites47.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(\frac{1}{{\left(\mathsf{fma}\left(y.im, \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right), y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)}^{-1}}\right)} \]
            5. Step-by-step derivation
              1. lift-/.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(\frac{1}{{\left(\mathsf{fma}\left(y.im, \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right), y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)}^{-1}}\right)} \]
              2. lift-pow.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(\frac{1}{\color{blue}{{\left(\mathsf{fma}\left(y.im, \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right), y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)}^{-1}}}\right) \]
              3. unpow-1N/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(\frac{1}{\color{blue}{\frac{1}{\mathsf{fma}\left(y.im, \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right), y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}}}\right) \]
              4. remove-double-div47.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(\mathsf{fma}\left(y.im, \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right), y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)} \]
              5. lift-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 \color{blue}{\left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right) + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
              6. +-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(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re} + y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)} \]
              7. lift-*.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}{y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}} + y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \]
              8. *-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}{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re} + y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \]
              9. *-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(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re + \color{blue}{\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right) \cdot y.im}\right) \]
              10. lift-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(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re + \color{blue}{\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)} \cdot y.im\right) \]
              11. lift-hypot.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(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re + \log \color{blue}{\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)} \cdot y.im\right) \]
              12. lift-*.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(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re + \log \left(\sqrt{\color{blue}{x.im \cdot x.im} + x.re \cdot x.re}\right) \cdot y.im\right) \]
              13. lift-*.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(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re + \log \left(\sqrt{x.im \cdot x.im + \color{blue}{x.re \cdot x.re}}\right) \cdot y.im\right) \]
              14. +-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(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re + \log \left(\sqrt{\color{blue}{x.re \cdot x.re + x.im \cdot x.im}}\right) \cdot y.im\right) \]
              15. lift-*.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(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re + \log \left(\sqrt{\color{blue}{x.re \cdot x.re} + x.im \cdot x.im}\right) \cdot y.im\right) \]
              16. lift-*.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(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re + \log \left(\sqrt{x.re \cdot x.re + \color{blue}{x.im \cdot x.im}}\right) \cdot y.im\right) \]
              17. 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 \color{blue}{\left(\mathsf{fma}\left(\tan^{-1}_* \frac{x.im}{x.re}, y.re, \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im\right)\right)} \]
            6. Applied rewrites47.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(\mathsf{fma}\left(\tan^{-1}_* \frac{x.im}{x.re}, y.re, \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im\right)\right)} \]
            7. 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(\tan^{-1}_* \frac{x.im}{x.re}, y.re, \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im\right)\right) \]
            8. 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(\tan^{-1}_* \frac{x.im}{x.re}, y.re, \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im\right)\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(\tan^{-1}_* \frac{x.im}{x.re}, y.re, \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im\right)\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(\tan^{-1}_* \frac{x.im}{x.re}, y.re, \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im\right)\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(\tan^{-1}_* \frac{x.im}{x.re}, y.re, \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im\right)\right) \]
              5. lower-atan2.f6481.5

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

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

            if 0.044999999999999998 < y.re

            1. Initial program 25.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 e^{\log \left(\sqrt{x.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.f6459.7

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

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

            \[\leadsto \begin{array}{l} \mathbf{if}\;y.re \leq -1.45 \cdot 10^{-16}:\\ \;\;\;\;\left(\sin \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \cdot {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{\left(0.5 \cdot y.re\right)}\right) \cdot {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{\left(0.5 \cdot y.re\right)}\\ \mathbf{elif}\;y.re \leq 0.045:\\ \;\;\;\;\sin \left(\mathsf{fma}\left(\tan^{-1}_* \frac{x.im}{x.re}, y.re, \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im\right)\right) \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\ \mathbf{else}:\\ \;\;\;\;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(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\\ \end{array} \]
          9. Add Preprocessing

          Alternative 8: 75.2% accurate, 1.1× 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 -1.45 \cdot 10^{-16}:\\ \;\;\;\;{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re} \cdot t\_0\\ \mathbf{elif}\;y.re \leq 0.045:\\ \;\;\;\;\sin \left(\mathsf{fma}\left(\tan^{-1}_* \frac{x.im}{x.re}, y.re, \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im\right)\right) \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\ \mathbf{else}:\\ \;\;\;\;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 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 -1.45e-16)
               (* (pow (hypot x.re x.im) y.re) t_0)
               (if (<= y.re 0.045)
                 (*
                  (sin (fma (atan2 x.im x.re) y.re (* (log (hypot x.re x.im)) y.im)))
                  (exp (* (atan2 x.im x.re) (- y.im))))
                 (*
                  (exp
                   (-
                    (* (log (sqrt (+ (* x.im x.im) (* x.re x.re)))) y.re)
                    (* (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));
          	double tmp;
          	if (y_46_re <= -1.45e-16) {
          		tmp = pow(hypot(x_46_re, x_46_im), y_46_re) * t_0;
          	} else if (y_46_re <= 0.045) {
          		tmp = sin(fma(atan2(x_46_im, x_46_re), y_46_re, (log(hypot(x_46_re, x_46_im)) * y_46_im))) * exp((atan2(x_46_im, x_46_re) * -y_46_im));
          	} else {
          		tmp = 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))) * 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 <= -1.45e-16)
          		tmp = Float64((hypot(x_46_re, x_46_im) ^ y_46_re) * t_0);
          	elseif (y_46_re <= 0.045)
          		tmp = Float64(sin(fma(atan(x_46_im, x_46_re), y_46_re, Float64(log(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 = Float64(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))) * 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, -1.45e-16], N[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * t$95$0), $MachinePrecision], If[LessEqual[y$46$re, 0.045], N[(N[Sin[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re + N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 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] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $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 -1.45 \cdot 10^{-16}:\\
          \;\;\;\;{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re} \cdot t\_0\\
          
          \mathbf{elif}\;y.re \leq 0.045:\\
          \;\;\;\;\sin \left(\mathsf{fma}\left(\tan^{-1}_* \frac{x.im}{x.re}, y.re, \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im\right)\right) \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\
          
          \mathbf{else}:\\
          \;\;\;\;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 t\_0\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 3 regimes
          2. if y.re < -1.4499999999999999e-16

            1. Initial program 35.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. +-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) \]
              5. 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) \]
              6. 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) \]
              7. lower-hypot.f64N/A

                \[\leadsto {\color{blue}{\left(\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) \]
              8. lower-sin.f64N/A

                \[\leadsto {\left(\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)} \]
              9. *-commutativeN/A

                \[\leadsto {\left(\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)} \]
              10. lower-*.f64N/A

                \[\leadsto {\left(\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-atan2.f6479.5

                \[\leadsto {\left(\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 rewrites79.5%

              \[\leadsto \color{blue}{{\left(\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.4499999999999999e-16 < y.re < 0.044999999999999998

            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. Step-by-step derivation
              1. lift-+.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.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. flip-+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 \color{blue}{\left(\frac{\left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im\right) \cdot \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im\right) - \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re}\right)} \]
              3. clear-numN/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(\frac{1}{\frac{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re}{\left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im\right) \cdot \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im\right) - \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}}\right)} \]
              4. 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(\frac{1}{\frac{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re}{\left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im\right) \cdot \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im\right) - \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}}\right)} \]
              5. clear-numN/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(\frac{1}{\color{blue}{\frac{1}{\frac{\left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im\right) \cdot \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im\right) - \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}{\log \left(\sqrt{x.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. Applied rewrites47.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(\frac{1}{{\left(\mathsf{fma}\left(y.im, \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right), y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)}^{-1}}\right)} \]
            5. Step-by-step derivation
              1. lift-/.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(\frac{1}{{\left(\mathsf{fma}\left(y.im, \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right), y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)}^{-1}}\right)} \]
              2. lift-pow.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(\frac{1}{\color{blue}{{\left(\mathsf{fma}\left(y.im, \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right), y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)}^{-1}}}\right) \]
              3. unpow-1N/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(\frac{1}{\color{blue}{\frac{1}{\mathsf{fma}\left(y.im, \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right), y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}}}\right) \]
              4. remove-double-div47.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(\mathsf{fma}\left(y.im, \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right), y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)} \]
              5. lift-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 \color{blue}{\left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right) + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
              6. +-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(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re} + y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)} \]
              7. lift-*.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}{y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}} + y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \]
              8. *-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}{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re} + y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \]
              9. *-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(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re + \color{blue}{\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right) \cdot y.im}\right) \]
              10. lift-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(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re + \color{blue}{\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)} \cdot y.im\right) \]
              11. lift-hypot.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(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re + \log \color{blue}{\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)} \cdot y.im\right) \]
              12. lift-*.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(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re + \log \left(\sqrt{\color{blue}{x.im \cdot x.im} + x.re \cdot x.re}\right) \cdot y.im\right) \]
              13. lift-*.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(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re + \log \left(\sqrt{x.im \cdot x.im + \color{blue}{x.re \cdot x.re}}\right) \cdot y.im\right) \]
              14. +-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(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re + \log \left(\sqrt{\color{blue}{x.re \cdot x.re + x.im \cdot x.im}}\right) \cdot y.im\right) \]
              15. lift-*.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(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re + \log \left(\sqrt{\color{blue}{x.re \cdot x.re} + x.im \cdot x.im}\right) \cdot y.im\right) \]
              16. lift-*.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(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re + \log \left(\sqrt{x.re \cdot x.re + \color{blue}{x.im \cdot x.im}}\right) \cdot y.im\right) \]
              17. 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 \color{blue}{\left(\mathsf{fma}\left(\tan^{-1}_* \frac{x.im}{x.re}, y.re, \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im\right)\right)} \]
            6. Applied rewrites47.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(\mathsf{fma}\left(\tan^{-1}_* \frac{x.im}{x.re}, y.re, \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im\right)\right)} \]
            7. 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(\tan^{-1}_* \frac{x.im}{x.re}, y.re, \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im\right)\right) \]
            8. 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(\tan^{-1}_* \frac{x.im}{x.re}, y.re, \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im\right)\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(\tan^{-1}_* \frac{x.im}{x.re}, y.re, \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im\right)\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(\tan^{-1}_* \frac{x.im}{x.re}, y.re, \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im\right)\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(\tan^{-1}_* \frac{x.im}{x.re}, y.re, \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im\right)\right) \]
              5. lower-atan2.f6481.5

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

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

            if 0.044999999999999998 < y.re

            1. Initial program 25.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 e^{\log \left(\sqrt{x.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.f6459.7

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

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

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

          Alternative 9: 65.6% accurate, 1.1× 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 -8.5 \cdot 10^{-17}:\\ \;\;\;\;{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re} \cdot t\_0\\ \mathbf{elif}\;y.re \leq 0.045:\\ \;\;\;\;\frac{\sin \left(\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right) \cdot y.im\right)}{{\left(e^{y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}}\\ \mathbf{else}:\\ \;\;\;\;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 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 -8.5e-17)
               (* (pow (hypot x.re x.im) y.re) t_0)
               (if (<= y.re 0.045)
                 (/
                  (sin (* (log (hypot x.im x.re)) y.im))
                  (pow (exp y.im) (atan2 x.im x.re)))
                 (*
                  (exp
                   (-
                    (* (log (sqrt (+ (* x.im x.im) (* x.re x.re)))) y.re)
                    (* (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));
          	double tmp;
          	if (y_46_re <= -8.5e-17) {
          		tmp = pow(hypot(x_46_re, x_46_im), y_46_re) * t_0;
          	} else if (y_46_re <= 0.045) {
          		tmp = sin((log(hypot(x_46_im, x_46_re)) * y_46_im)) / pow(exp(y_46_im), atan2(x_46_im, x_46_re));
          	} else {
          		tmp = 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))) * t_0;
          	}
          	return tmp;
          }
          
          public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
          	double t_0 = Math.sin((Math.atan2(x_46_im, x_46_re) * y_46_re));
          	double tmp;
          	if (y_46_re <= -8.5e-17) {
          		tmp = Math.pow(Math.hypot(x_46_re, x_46_im), y_46_re) * t_0;
          	} else if (y_46_re <= 0.045) {
          		tmp = Math.sin((Math.log(Math.hypot(x_46_im, x_46_re)) * y_46_im)) / Math.pow(Math.exp(y_46_im), Math.atan2(x_46_im, x_46_re));
          	} else {
          		tmp = Math.exp(((Math.log(Math.sqrt(((x_46_im * x_46_im) + (x_46_re * x_46_re)))) * y_46_re) - (Math.atan2(x_46_im, x_46_re) * y_46_im))) * t_0;
          	}
          	return tmp;
          }
          
          def code(x_46_re, x_46_im, y_46_re, y_46_im):
          	t_0 = math.sin((math.atan2(x_46_im, x_46_re) * y_46_re))
          	tmp = 0
          	if y_46_re <= -8.5e-17:
          		tmp = math.pow(math.hypot(x_46_re, x_46_im), y_46_re) * t_0
          	elif y_46_re <= 0.045:
          		tmp = math.sin((math.log(math.hypot(x_46_im, x_46_re)) * y_46_im)) / math.pow(math.exp(y_46_im), math.atan2(x_46_im, x_46_re))
          	else:
          		tmp = math.exp(((math.log(math.sqrt(((x_46_im * x_46_im) + (x_46_re * x_46_re)))) * y_46_re) - (math.atan2(x_46_im, x_46_re) * y_46_im))) * 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 <= -8.5e-17)
          		tmp = Float64((hypot(x_46_re, x_46_im) ^ y_46_re) * t_0);
          	elseif (y_46_re <= 0.045)
          		tmp = Float64(sin(Float64(log(hypot(x_46_im, x_46_re)) * y_46_im)) / (exp(y_46_im) ^ atan(x_46_im, x_46_re)));
          	else
          		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) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * t_0);
          	end
          	return tmp
          end
          
          function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im)
          	t_0 = sin((atan2(x_46_im, x_46_re) * y_46_re));
          	tmp = 0.0;
          	if (y_46_re <= -8.5e-17)
          		tmp = (hypot(x_46_re, x_46_im) ^ y_46_re) * t_0;
          	elseif (y_46_re <= 0.045)
          		tmp = sin((log(hypot(x_46_im, x_46_re)) * y_46_im)) / (exp(y_46_im) ^ atan2(x_46_im, x_46_re));
          	else
          		tmp = 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))) * t_0;
          	end
          	tmp_2 = tmp;
          end
          
          code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Sin[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -8.5e-17], N[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * t$95$0), $MachinePrecision], If[LessEqual[y$46$re, 0.045], N[(N[Sin[N[(N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im), $MachinePrecision]], $MachinePrecision] / N[Power[N[Exp[y$46$im], $MachinePrecision], N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 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] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $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 -8.5 \cdot 10^{-17}:\\
          \;\;\;\;{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re} \cdot t\_0\\
          
          \mathbf{elif}\;y.re \leq 0.045:\\
          \;\;\;\;\frac{\sin \left(\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right) \cdot y.im\right)}{{\left(e^{y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}}\\
          
          \mathbf{else}:\\
          \;\;\;\;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 t\_0\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 3 regimes
          2. if y.re < -8.5e-17

            1. Initial program 35.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. +-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) \]
              5. 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) \]
              6. 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) \]
              7. lower-hypot.f64N/A

                \[\leadsto {\color{blue}{\left(\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) \]
              8. lower-sin.f64N/A

                \[\leadsto {\left(\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)} \]
              9. *-commutativeN/A

                \[\leadsto {\left(\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)} \]
              10. lower-*.f64N/A

                \[\leadsto {\left(\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-atan2.f6479.5

                \[\leadsto {\left(\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 rewrites79.5%

              \[\leadsto \color{blue}{{\left(\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 -8.5e-17 < y.re < 0.044999999999999998

            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. 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. clear-numN/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{1}{\frac{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}{e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re}}}} \]
              7. un-div-invN/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)}{\frac{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}{e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re}}}} \]
              8. lower-/.f64N/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)}{\frac{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}{e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re}}}} \]
            4. Applied rewrites81.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            if 0.044999999999999998 < y.re

            1. Initial program 25.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 e^{\log \left(\sqrt{x.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.f6459.7

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

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

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

          Alternative 10: 65.6% accurate, 1.1× 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 -8.5 \cdot 10^{-17}:\\ \;\;\;\;{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re} \cdot t\_0\\ \mathbf{elif}\;y.re \leq 0.045:\\ \;\;\;\;{\left(e^{y.im}\right)}^{\left(-\tan^{-1}_* \frac{x.im}{x.re}\right)} \cdot \sin \left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im\right)\\ \mathbf{else}:\\ \;\;\;\;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 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 -8.5e-17)
               (* (pow (hypot x.re x.im) y.re) t_0)
               (if (<= y.re 0.045)
                 (*
                  (pow (exp y.im) (- (atan2 x.im x.re)))
                  (sin (* (log (hypot x.re x.im)) y.im)))
                 (*
                  (exp
                   (-
                    (* (log (sqrt (+ (* x.im x.im) (* x.re x.re)))) y.re)
                    (* (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));
          	double tmp;
          	if (y_46_re <= -8.5e-17) {
          		tmp = pow(hypot(x_46_re, x_46_im), y_46_re) * t_0;
          	} else if (y_46_re <= 0.045) {
          		tmp = pow(exp(y_46_im), -atan2(x_46_im, x_46_re)) * sin((log(hypot(x_46_re, x_46_im)) * y_46_im));
          	} else {
          		tmp = 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))) * t_0;
          	}
          	return tmp;
          }
          
          public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
          	double t_0 = Math.sin((Math.atan2(x_46_im, x_46_re) * y_46_re));
          	double tmp;
          	if (y_46_re <= -8.5e-17) {
          		tmp = Math.pow(Math.hypot(x_46_re, x_46_im), y_46_re) * t_0;
          	} else if (y_46_re <= 0.045) {
          		tmp = Math.pow(Math.exp(y_46_im), -Math.atan2(x_46_im, x_46_re)) * Math.sin((Math.log(Math.hypot(x_46_re, x_46_im)) * y_46_im));
          	} else {
          		tmp = Math.exp(((Math.log(Math.sqrt(((x_46_im * x_46_im) + (x_46_re * x_46_re)))) * y_46_re) - (Math.atan2(x_46_im, x_46_re) * y_46_im))) * t_0;
          	}
          	return tmp;
          }
          
          def code(x_46_re, x_46_im, y_46_re, y_46_im):
          	t_0 = math.sin((math.atan2(x_46_im, x_46_re) * y_46_re))
          	tmp = 0
          	if y_46_re <= -8.5e-17:
          		tmp = math.pow(math.hypot(x_46_re, x_46_im), y_46_re) * t_0
          	elif y_46_re <= 0.045:
          		tmp = math.pow(math.exp(y_46_im), -math.atan2(x_46_im, x_46_re)) * math.sin((math.log(math.hypot(x_46_re, x_46_im)) * y_46_im))
          	else:
          		tmp = math.exp(((math.log(math.sqrt(((x_46_im * x_46_im) + (x_46_re * x_46_re)))) * y_46_re) - (math.atan2(x_46_im, x_46_re) * y_46_im))) * 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 <= -8.5e-17)
          		tmp = Float64((hypot(x_46_re, x_46_im) ^ y_46_re) * t_0);
          	elseif (y_46_re <= 0.045)
          		tmp = Float64((exp(y_46_im) ^ Float64(-atan(x_46_im, x_46_re))) * sin(Float64(log(hypot(x_46_re, x_46_im)) * y_46_im)));
          	else
          		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) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * t_0);
          	end
          	return tmp
          end
          
          function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im)
          	t_0 = sin((atan2(x_46_im, x_46_re) * y_46_re));
          	tmp = 0.0;
          	if (y_46_re <= -8.5e-17)
          		tmp = (hypot(x_46_re, x_46_im) ^ y_46_re) * t_0;
          	elseif (y_46_re <= 0.045)
          		tmp = (exp(y_46_im) ^ -atan2(x_46_im, x_46_re)) * sin((log(hypot(x_46_re, x_46_im)) * y_46_im));
          	else
          		tmp = 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))) * t_0;
          	end
          	tmp_2 = tmp;
          end
          
          code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Sin[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -8.5e-17], N[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * t$95$0), $MachinePrecision], If[LessEqual[y$46$re, 0.045], N[(N[Power[N[Exp[y$46$im], $MachinePrecision], (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])], $MachinePrecision] * N[Sin[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 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] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $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 -8.5 \cdot 10^{-17}:\\
          \;\;\;\;{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re} \cdot t\_0\\
          
          \mathbf{elif}\;y.re \leq 0.045:\\
          \;\;\;\;{\left(e^{y.im}\right)}^{\left(-\tan^{-1}_* \frac{x.im}{x.re}\right)} \cdot \sin \left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im\right)\\
          
          \mathbf{else}:\\
          \;\;\;\;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 t\_0\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 3 regimes
          2. if y.re < -8.5e-17

            1. Initial program 35.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. +-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) \]
              5. 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) \]
              6. 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) \]
              7. lower-hypot.f64N/A

                \[\leadsto {\color{blue}{\left(\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) \]
              8. lower-sin.f64N/A

                \[\leadsto {\left(\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)} \]
              9. *-commutativeN/A

                \[\leadsto {\left(\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)} \]
              10. lower-*.f64N/A

                \[\leadsto {\left(\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-atan2.f6479.5

                \[\leadsto {\left(\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 rewrites79.5%

              \[\leadsto \color{blue}{{\left(\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 -8.5e-17 < y.re < 0.044999999999999998

            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.re around 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            if 0.044999999999999998 < y.re

            1. Initial program 25.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 e^{\log \left(\sqrt{x.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.f6459.7

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

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

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

          Alternative 11: 60.9% accurate, 1.2× 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 := \sin t\_1\\ \mathbf{if}\;x.re \leq -5.5 \cdot 10^{-288}:\\ \;\;\;\;e^{-\mathsf{fma}\left(\log \left(\frac{-1}{x.re}\right), y.re, t\_0\right)} \cdot t\_2\\ \mathbf{elif}\;x.re \leq 1.2 \cdot 10^{+17}:\\ \;\;\;\;e^{\log \left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right) \cdot y.re - t\_0} \cdot t\_2\\ \mathbf{elif}\;x.re \leq 4.2 \cdot 10^{+121}:\\ \;\;\;\;\sin \left(\log x.re \cdot y.im\right) \cdot e^{\mathsf{fma}\left(y.re, \log x.re, \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\sin \left(\mathsf{fma}\left(y.im, \log x.re, t\_1\right)\right) \cdot e^{\log x.re \cdot y.re}\\ \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 (sin t_1)))
             (if (<= x.re -5.5e-288)
               (* (exp (- (fma (log (/ -1.0 x.re)) y.re t_0))) t_2)
               (if (<= x.re 1.2e+17)
                 (*
                  (exp (- (* (log (sqrt (+ (* x.im x.im) (* x.re x.re)))) y.re) t_0))
                  t_2)
                 (if (<= x.re 4.2e+121)
                   (*
                    (sin (* (log x.re) y.im))
                    (exp (fma y.re (log x.re) (* (atan2 x.im x.re) (- y.im)))))
                   (* (sin (fma y.im (log x.re) t_1)) (exp (* (log 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 = 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 = sin(t_1);
          	double tmp;
          	if (x_46_re <= -5.5e-288) {
          		tmp = exp(-fma(log((-1.0 / x_46_re)), y_46_re, t_0)) * t_2;
          	} else if (x_46_re <= 1.2e+17) {
          		tmp = exp(((log(sqrt(((x_46_im * x_46_im) + (x_46_re * x_46_re)))) * y_46_re) - t_0)) * t_2;
          	} else if (x_46_re <= 4.2e+121) {
          		tmp = sin((log(x_46_re) * y_46_im)) * exp(fma(y_46_re, log(x_46_re), (atan2(x_46_im, x_46_re) * -y_46_im)));
          	} else {
          		tmp = sin(fma(y_46_im, log(x_46_re), t_1)) * exp((log(x_46_re) * y_46_re));
          	}
          	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 = sin(t_1)
          	tmp = 0.0
          	if (x_46_re <= -5.5e-288)
          		tmp = Float64(exp(Float64(-fma(log(Float64(-1.0 / x_46_re)), y_46_re, t_0))) * t_2);
          	elseif (x_46_re <= 1.2e+17)
          		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)) * t_2);
          	elseif (x_46_re <= 4.2e+121)
          		tmp = Float64(sin(Float64(log(x_46_re) * y_46_im)) * exp(fma(y_46_re, log(x_46_re), Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))));
          	else
          		tmp = Float64(sin(fma(y_46_im, log(x_46_re), t_1)) * exp(Float64(log(x_46_re) * 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[(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[Sin[t$95$1], $MachinePrecision]}, If[LessEqual[x$46$re, -5.5e-288], N[(N[Exp[(-N[(N[Log[N[(-1.0 / x$46$re), $MachinePrecision]], $MachinePrecision] * y$46$re + t$95$0), $MachinePrecision])], $MachinePrecision] * t$95$2), $MachinePrecision], If[LessEqual[x$46$re, 1.2e+17], 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] * t$95$2), $MachinePrecision], If[LessEqual[x$46$re, 4.2e+121], N[(N[Sin[N[(N[Log[x$46$re], $MachinePrecision] * y$46$im), $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], N[(N[Sin[N[(y$46$im * N[Log[x$46$re], $MachinePrecision] + t$95$1), $MachinePrecision]], $MachinePrecision] * N[Exp[N[(N[Log[x$46$re], $MachinePrecision] * y$46$re), $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 := \sin t\_1\\
          \mathbf{if}\;x.re \leq -5.5 \cdot 10^{-288}:\\
          \;\;\;\;e^{-\mathsf{fma}\left(\log \left(\frac{-1}{x.re}\right), y.re, t\_0\right)} \cdot t\_2\\
          
          \mathbf{elif}\;x.re \leq 1.2 \cdot 10^{+17}:\\
          \;\;\;\;e^{\log \left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right) \cdot y.re - t\_0} \cdot t\_2\\
          
          \mathbf{elif}\;x.re \leq 4.2 \cdot 10^{+121}:\\
          \;\;\;\;\sin \left(\log x.re \cdot y.im\right) \cdot e^{\mathsf{fma}\left(y.re, \log x.re, \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)\right)}\\
          
          \mathbf{else}:\\
          \;\;\;\;\sin \left(\mathsf{fma}\left(y.im, \log x.re, t\_1\right)\right) \cdot e^{\log x.re \cdot y.re}\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 4 regimes
          2. if x.re < -5.5e-288

            1. Initial program 38.8%

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

              \[\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)}} \]
            6. Taylor expanded in y.im around 0

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

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

              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 e^{\log \left(\sqrt{x.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.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 rewrites67.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 1.2e17 < x.re < 4.2000000000000003e121

              1. Initial program 57.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. +-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) \]
                5. 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) \]
                6. 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) \]
                7. lower-hypot.f64N/A

                  \[\leadsto {\color{blue}{\left(\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) \]
                8. lower-sin.f64N/A

                  \[\leadsto {\left(\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)} \]
                9. *-commutativeN/A

                  \[\leadsto {\left(\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)} \]
                10. lower-*.f64N/A

                  \[\leadsto {\left(\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-atan2.f6426.0

                  \[\leadsto {\left(\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 rewrites26.0%

                \[\leadsto \color{blue}{{\left(\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.f6461.6

                  \[\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 rewrites61.6%

                \[\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)} \]
              9. Taylor expanded in y.re around 0

                \[\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(y.im \cdot \log x.re\right) \]
              10. Step-by-step derivation
                1. Applied rewrites69.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(y.im \cdot \log x.re\right) \]

                if 4.2000000000000003e121 < x.re

                1. Initial program 8.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. +-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) \]
                  5. 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) \]
                  6. 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) \]
                  7. lower-hypot.f64N/A

                    \[\leadsto {\color{blue}{\left(\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) \]
                  8. lower-sin.f64N/A

                    \[\leadsto {\left(\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)} \]
                  9. *-commutativeN/A

                    \[\leadsto {\left(\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)} \]
                  10. lower-*.f64N/A

                    \[\leadsto {\left(\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-atan2.f6444.0

                    \[\leadsto {\left(\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 rewrites44.0%

                  \[\leadsto \color{blue}{{\left(\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.f6473.5

                    \[\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 rewrites73.5%

                  \[\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)} \]
                9. Taylor expanded in y.im around 0

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

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

                  \[\leadsto \begin{array}{l} \mathbf{if}\;x.re \leq -5.5 \cdot 10^{-288}:\\ \;\;\;\;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(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\\ \mathbf{elif}\;x.re \leq 1.2 \cdot 10^{+17}:\\ \;\;\;\;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(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\\ \mathbf{elif}\;x.re \leq 4.2 \cdot 10^{+121}:\\ \;\;\;\;\sin \left(\log x.re \cdot y.im\right) \cdot e^{\mathsf{fma}\left(y.re, \log x.re, \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\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^{\log x.re \cdot y.re}\\ \end{array} \]
                13. Add Preprocessing

                Alternative 12: 60.3% accurate, 1.3× 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\\ \mathbf{if}\;x.re \leq -3 \cdot 10^{-298}:\\ \;\;\;\;e^{-\mathsf{fma}\left(\log \left(\frac{-1}{x.re}\right), y.re, t\_0\right)} \cdot \sin t\_1\\ \mathbf{elif}\;x.re \leq 1.2 \cdot 10^{+17}:\\ \;\;\;\;t\_1 \cdot e^{\log \left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right) \cdot y.re - t\_0}\\ \mathbf{elif}\;x.re \leq 4.2 \cdot 10^{+121}:\\ \;\;\;\;\sin \left(\log x.re \cdot y.im\right) \cdot e^{\mathsf{fma}\left(y.re, \log x.re, \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\sin \left(\mathsf{fma}\left(y.im, \log x.re, t\_1\right)\right) \cdot e^{\log x.re \cdot y.re}\\ \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)))
                   (if (<= x.re -3e-298)
                     (* (exp (- (fma (log (/ -1.0 x.re)) y.re t_0))) (sin t_1))
                     (if (<= x.re 1.2e+17)
                       (*
                        t_1
                        (exp (- (* (log (sqrt (+ (* x.im x.im) (* x.re x.re)))) y.re) t_0)))
                       (if (<= x.re 4.2e+121)
                         (*
                          (sin (* (log x.re) y.im))
                          (exp (fma y.re (log x.re) (* (atan2 x.im x.re) (- y.im)))))
                         (* (sin (fma y.im (log x.re) t_1)) (exp (* (log 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 = atan2(x_46_im, x_46_re) * y_46_im;
                	double t_1 = atan2(x_46_im, x_46_re) * y_46_re;
                	double tmp;
                	if (x_46_re <= -3e-298) {
                		tmp = exp(-fma(log((-1.0 / x_46_re)), y_46_re, t_0)) * sin(t_1);
                	} else if (x_46_re <= 1.2e+17) {
                		tmp = t_1 * exp(((log(sqrt(((x_46_im * x_46_im) + (x_46_re * x_46_re)))) * y_46_re) - t_0));
                	} else if (x_46_re <= 4.2e+121) {
                		tmp = sin((log(x_46_re) * y_46_im)) * exp(fma(y_46_re, log(x_46_re), (atan2(x_46_im, x_46_re) * -y_46_im)));
                	} else {
                		tmp = sin(fma(y_46_im, log(x_46_re), t_1)) * exp((log(x_46_re) * y_46_re));
                	}
                	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)
                	tmp = 0.0
                	if (x_46_re <= -3e-298)
                		tmp = Float64(exp(Float64(-fma(log(Float64(-1.0 / x_46_re)), y_46_re, t_0))) * sin(t_1));
                	elseif (x_46_re <= 1.2e+17)
                		tmp = Float64(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)));
                	elseif (x_46_re <= 4.2e+121)
                		tmp = Float64(sin(Float64(log(x_46_re) * y_46_im)) * exp(fma(y_46_re, log(x_46_re), Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))));
                	else
                		tmp = Float64(sin(fma(y_46_im, log(x_46_re), t_1)) * exp(Float64(log(x_46_re) * 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[(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]}, If[LessEqual[x$46$re, -3e-298], N[(N[Exp[(-N[(N[Log[N[(-1.0 / x$46$re), $MachinePrecision]], $MachinePrecision] * y$46$re + t$95$0), $MachinePrecision])], $MachinePrecision] * N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, 1.2e+17], N[(t$95$1 * 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], If[LessEqual[x$46$re, 4.2e+121], N[(N[Sin[N[(N[Log[x$46$re], $MachinePrecision] * y$46$im), $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], N[(N[Sin[N[(y$46$im * N[Log[x$46$re], $MachinePrecision] + t$95$1), $MachinePrecision]], $MachinePrecision] * N[Exp[N[(N[Log[x$46$re], $MachinePrecision] * y$46$re), $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\\
                \mathbf{if}\;x.re \leq -3 \cdot 10^{-298}:\\
                \;\;\;\;e^{-\mathsf{fma}\left(\log \left(\frac{-1}{x.re}\right), y.re, t\_0\right)} \cdot \sin t\_1\\
                
                \mathbf{elif}\;x.re \leq 1.2 \cdot 10^{+17}:\\
                \;\;\;\;t\_1 \cdot e^{\log \left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right) \cdot y.re - t\_0}\\
                
                \mathbf{elif}\;x.re \leq 4.2 \cdot 10^{+121}:\\
                \;\;\;\;\sin \left(\log x.re \cdot y.im\right) \cdot e^{\mathsf{fma}\left(y.re, \log x.re, \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)\right)}\\
                
                \mathbf{else}:\\
                \;\;\;\;\sin \left(\mathsf{fma}\left(y.im, \log x.re, t\_1\right)\right) \cdot e^{\log x.re \cdot y.re}\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 4 regimes
                2. if x.re < -2.9999999999999999e-298

                  1. Initial program 39.5%

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

                    \[\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)}} \]
                  6. Taylor expanded in y.im around 0

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

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

                    if -2.9999999999999999e-298 < x.re < 1.2e17

                    1. Initial program 36.7%

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

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

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

                      if 1.2e17 < x.re < 4.2000000000000003e121

                      1. Initial program 57.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. +-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) \]
                        5. 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) \]
                        6. 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) \]
                        7. lower-hypot.f64N/A

                          \[\leadsto {\color{blue}{\left(\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) \]
                        8. lower-sin.f64N/A

                          \[\leadsto {\left(\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)} \]
                        9. *-commutativeN/A

                          \[\leadsto {\left(\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)} \]
                        10. lower-*.f64N/A

                          \[\leadsto {\left(\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-atan2.f6426.0

                          \[\leadsto {\left(\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 rewrites26.0%

                        \[\leadsto \color{blue}{{\left(\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.f6461.6

                          \[\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 rewrites61.6%

                        \[\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)} \]
                      9. Taylor expanded in y.re around 0

                        \[\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(y.im \cdot \log x.re\right) \]
                      10. Step-by-step derivation
                        1. Applied rewrites69.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(y.im \cdot \log x.re\right) \]

                        if 4.2000000000000003e121 < x.re

                        1. Initial program 8.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. +-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) \]
                          5. 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) \]
                          6. 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) \]
                          7. lower-hypot.f64N/A

                            \[\leadsto {\color{blue}{\left(\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) \]
                          8. lower-sin.f64N/A

                            \[\leadsto {\left(\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)} \]
                          9. *-commutativeN/A

                            \[\leadsto {\left(\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)} \]
                          10. lower-*.f64N/A

                            \[\leadsto {\left(\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-atan2.f6444.0

                            \[\leadsto {\left(\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 rewrites44.0%

                          \[\leadsto \color{blue}{{\left(\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.f6473.5

                            \[\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 rewrites73.5%

                          \[\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)} \]
                        9. Taylor expanded in y.im around 0

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

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

                          \[\leadsto \begin{array}{l} \mathbf{if}\;x.re \leq -3 \cdot 10^{-298}:\\ \;\;\;\;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(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\\ \mathbf{elif}\;x.re \leq 1.2 \cdot 10^{+17}:\\ \;\;\;\;\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}\;x.re \leq 4.2 \cdot 10^{+121}:\\ \;\;\;\;\sin \left(\log x.re \cdot y.im\right) \cdot e^{\mathsf{fma}\left(y.re, \log x.re, \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\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^{\log x.re \cdot y.re}\\ \end{array} \]
                        13. Add Preprocessing

                        Alternative 13: 58.1% accurate, 1.3× speedup?

                        \[\begin{array}{l} \\ \begin{array}{l} t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\\ \mathbf{if}\;x.re \leq -1.08 \cdot 10^{+213}:\\ \;\;\;\;\left(-{\left(e^{y.im}\right)}^{\left(-\tan^{-1}_* \frac{x.im}{x.re}\right)}\right) \cdot \sin \left(\log \left(\frac{-1}{x.re}\right) \cdot y.im\right)\\ \mathbf{elif}\;x.re \leq 1.2 \cdot 10^{+17}:\\ \;\;\;\;t\_0 \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}\;x.re \leq 4.2 \cdot 10^{+121}:\\ \;\;\;\;\sin \left(\log x.re \cdot y.im\right) \cdot e^{\mathsf{fma}\left(y.re, \log x.re, \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\sin \left(\mathsf{fma}\left(y.im, \log x.re, t\_0\right)\right) \cdot e^{\log x.re \cdot y.re}\\ \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 -1.08e+213)
                             (*
                              (- (pow (exp y.im) (- (atan2 x.im x.re))))
                              (sin (* (log (/ -1.0 x.re)) y.im)))
                             (if (<= x.re 1.2e+17)
                               (*
                                t_0
                                (exp
                                 (-
                                  (* (log (sqrt (+ (* x.im x.im) (* x.re x.re)))) y.re)
                                  (* (atan2 x.im x.re) y.im))))
                               (if (<= x.re 4.2e+121)
                                 (*
                                  (sin (* (log x.re) y.im))
                                  (exp (fma y.re (log x.re) (* (atan2 x.im x.re) (- y.im)))))
                                 (* (sin (fma y.im (log x.re) t_0)) (exp (* (log 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 = atan2(x_46_im, x_46_re) * y_46_re;
                        	double tmp;
                        	if (x_46_re <= -1.08e+213) {
                        		tmp = -pow(exp(y_46_im), -atan2(x_46_im, x_46_re)) * sin((log((-1.0 / x_46_re)) * y_46_im));
                        	} else if (x_46_re <= 1.2e+17) {
                        		tmp = t_0 * 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)));
                        	} else if (x_46_re <= 4.2e+121) {
                        		tmp = sin((log(x_46_re) * y_46_im)) * exp(fma(y_46_re, log(x_46_re), (atan2(x_46_im, x_46_re) * -y_46_im)));
                        	} else {
                        		tmp = sin(fma(y_46_im, log(x_46_re), t_0)) * exp((log(x_46_re) * y_46_re));
                        	}
                        	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 <= -1.08e+213)
                        		tmp = Float64(Float64(-(exp(y_46_im) ^ Float64(-atan(x_46_im, x_46_re)))) * sin(Float64(log(Float64(-1.0 / x_46_re)) * y_46_im)));
                        	elseif (x_46_re <= 1.2e+17)
                        		tmp = Float64(t_0 * 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))));
                        	elseif (x_46_re <= 4.2e+121)
                        		tmp = Float64(sin(Float64(log(x_46_re) * y_46_im)) * exp(fma(y_46_re, log(x_46_re), Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))));
                        	else
                        		tmp = Float64(sin(fma(y_46_im, log(x_46_re), t_0)) * exp(Float64(log(x_46_re) * 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[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]}, If[LessEqual[x$46$re, -1.08e+213], N[((-N[Power[N[Exp[y$46$im], $MachinePrecision], (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])], $MachinePrecision]) * N[Sin[N[(N[Log[N[(-1.0 / x$46$re), $MachinePrecision]], $MachinePrecision] * y$46$im), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, 1.2e+17], N[(t$95$0 * 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[x$46$re, 4.2e+121], N[(N[Sin[N[(N[Log[x$46$re], $MachinePrecision] * y$46$im), $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], N[(N[Sin[N[(y$46$im * N[Log[x$46$re], $MachinePrecision] + t$95$0), $MachinePrecision]], $MachinePrecision] * N[Exp[N[(N[Log[x$46$re], $MachinePrecision] * y$46$re), $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 -1.08 \cdot 10^{+213}:\\
                        \;\;\;\;\left(-{\left(e^{y.im}\right)}^{\left(-\tan^{-1}_* \frac{x.im}{x.re}\right)}\right) \cdot \sin \left(\log \left(\frac{-1}{x.re}\right) \cdot y.im\right)\\
                        
                        \mathbf{elif}\;x.re \leq 1.2 \cdot 10^{+17}:\\
                        \;\;\;\;t\_0 \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}\;x.re \leq 4.2 \cdot 10^{+121}:\\
                        \;\;\;\;\sin \left(\log x.re \cdot y.im\right) \cdot e^{\mathsf{fma}\left(y.re, \log x.re, \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)\right)}\\
                        
                        \mathbf{else}:\\
                        \;\;\;\;\sin \left(\mathsf{fma}\left(y.im, \log x.re, t\_0\right)\right) \cdot e^{\log x.re \cdot y.re}\\
                        
                        
                        \end{array}
                        \end{array}
                        
                        Derivation
                        1. Split input into 4 regimes
                        2. if x.re < -1.08e213

                          1. Initial program 0.0%

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

                            \[\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)}} \]
                          6. Taylor expanded in y.re around 0

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

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

                            if -1.08e213 < x.re < 1.2e17

                            1. Initial program 42.7%

                              \[e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \]
                            2. Add Preprocessing
                            3. Taylor expanded in y.re 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 \color{blue}{\left(\sin \left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right) + y.re \cdot \left(\frac{-1}{2} \cdot \left(y.re \cdot \left(\sin \left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right) \cdot {\tan^{-1}_* \frac{x.im}{x.re}}^{2}\right)\right) + \cos \left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)} \]
                            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 \color{blue}{\left(y.re \cdot \left(\frac{-1}{2} \cdot \left(y.re \cdot \left(\sin \left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right) \cdot {\tan^{-1}_* \frac{x.im}{x.re}}^{2}\right)\right) + \cos \left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) + \sin \left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right)} \]
                              2. *-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 \left(\color{blue}{\left(\frac{-1}{2} \cdot \left(y.re \cdot \left(\sin \left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right) \cdot {\tan^{-1}_* \frac{x.im}{x.re}}^{2}\right)\right) + \cos \left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot y.re} + \sin \left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right) \]
                              3. 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 \color{blue}{\mathsf{fma}\left(\frac{-1}{2} \cdot \left(y.re \cdot \left(\sin \left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right) \cdot {\tan^{-1}_* \frac{x.im}{x.re}}^{2}\right)\right) + \cos \left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}, y.re, \sin \left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right)} \]
                            5. Applied rewrites53.3%

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

                              if 1.2e17 < x.re < 4.2000000000000003e121

                              1. Initial program 57.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. +-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) \]
                                5. 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) \]
                                6. 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) \]
                                7. lower-hypot.f64N/A

                                  \[\leadsto {\color{blue}{\left(\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) \]
                                8. lower-sin.f64N/A

                                  \[\leadsto {\left(\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)} \]
                                9. *-commutativeN/A

                                  \[\leadsto {\left(\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)} \]
                                10. lower-*.f64N/A

                                  \[\leadsto {\left(\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-atan2.f6426.0

                                  \[\leadsto {\left(\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 rewrites26.0%

                                \[\leadsto \color{blue}{{\left(\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.f6461.6

                                  \[\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 rewrites61.6%

                                \[\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)} \]
                              9. Taylor expanded in y.re around 0

                                \[\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(y.im \cdot \log x.re\right) \]
                              10. Step-by-step derivation
                                1. Applied rewrites69.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(y.im \cdot \log x.re\right) \]

                                if 4.2000000000000003e121 < x.re

                                1. Initial program 8.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. +-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) \]
                                  5. 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) \]
                                  6. 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) \]
                                  7. lower-hypot.f64N/A

                                    \[\leadsto {\color{blue}{\left(\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) \]
                                  8. lower-sin.f64N/A

                                    \[\leadsto {\left(\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)} \]
                                  9. *-commutativeN/A

                                    \[\leadsto {\left(\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)} \]
                                  10. lower-*.f64N/A

                                    \[\leadsto {\left(\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-atan2.f6444.0

                                    \[\leadsto {\left(\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 rewrites44.0%

                                  \[\leadsto \color{blue}{{\left(\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.f6473.5

                                    \[\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 rewrites73.5%

                                  \[\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)} \]
                                9. Taylor expanded in y.im around 0

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

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

                                  \[\leadsto \begin{array}{l} \mathbf{if}\;x.re \leq -1.08 \cdot 10^{+213}:\\ \;\;\;\;\left(-{\left(e^{y.im}\right)}^{\left(-\tan^{-1}_* \frac{x.im}{x.re}\right)}\right) \cdot \sin \left(\log \left(\frac{-1}{x.re}\right) \cdot y.im\right)\\ \mathbf{elif}\;x.re \leq 1.2 \cdot 10^{+17}:\\ \;\;\;\;\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}\;x.re \leq 4.2 \cdot 10^{+121}:\\ \;\;\;\;\sin \left(\log x.re \cdot y.im\right) \cdot e^{\mathsf{fma}\left(y.re, \log x.re, \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\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^{\log x.re \cdot y.re}\\ \end{array} \]
                                13. Add Preprocessing

                                Alternative 14: 57.9% accurate, 1.3× speedup?

                                \[\begin{array}{l} \\ \begin{array}{l} t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\\ \mathbf{if}\;x.re \leq 1.2 \cdot 10^{+17}:\\ \;\;\;\;t\_0 \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}\;x.re \leq 4.2 \cdot 10^{+121}:\\ \;\;\;\;\sin \left(\log x.re \cdot y.im\right) \cdot e^{\mathsf{fma}\left(y.re, \log x.re, \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\sin \left(\mathsf{fma}\left(y.im, \log x.re, t\_0\right)\right) \cdot e^{\log x.re \cdot y.re}\\ \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 1.2e+17)
                                     (*
                                      t_0
                                      (exp
                                       (-
                                        (* (log (sqrt (+ (* x.im x.im) (* x.re x.re)))) y.re)
                                        (* (atan2 x.im x.re) y.im))))
                                     (if (<= x.re 4.2e+121)
                                       (*
                                        (sin (* (log x.re) y.im))
                                        (exp (fma y.re (log x.re) (* (atan2 x.im x.re) (- y.im)))))
                                       (* (sin (fma y.im (log x.re) t_0)) (exp (* (log 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 = atan2(x_46_im, x_46_re) * y_46_re;
                                	double tmp;
                                	if (x_46_re <= 1.2e+17) {
                                		tmp = t_0 * 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)));
                                	} else if (x_46_re <= 4.2e+121) {
                                		tmp = sin((log(x_46_re) * y_46_im)) * exp(fma(y_46_re, log(x_46_re), (atan2(x_46_im, x_46_re) * -y_46_im)));
                                	} else {
                                		tmp = sin(fma(y_46_im, log(x_46_re), t_0)) * exp((log(x_46_re) * y_46_re));
                                	}
                                	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 <= 1.2e+17)
                                		tmp = Float64(t_0 * 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))));
                                	elseif (x_46_re <= 4.2e+121)
                                		tmp = Float64(sin(Float64(log(x_46_re) * y_46_im)) * exp(fma(y_46_re, log(x_46_re), Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))));
                                	else
                                		tmp = Float64(sin(fma(y_46_im, log(x_46_re), t_0)) * exp(Float64(log(x_46_re) * 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[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]}, If[LessEqual[x$46$re, 1.2e+17], N[(t$95$0 * 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[x$46$re, 4.2e+121], N[(N[Sin[N[(N[Log[x$46$re], $MachinePrecision] * y$46$im), $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], N[(N[Sin[N[(y$46$im * N[Log[x$46$re], $MachinePrecision] + t$95$0), $MachinePrecision]], $MachinePrecision] * N[Exp[N[(N[Log[x$46$re], $MachinePrecision] * y$46$re), $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 1.2 \cdot 10^{+17}:\\
                                \;\;\;\;t\_0 \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}\;x.re \leq 4.2 \cdot 10^{+121}:\\
                                \;\;\;\;\sin \left(\log x.re \cdot y.im\right) \cdot e^{\mathsf{fma}\left(y.re, \log x.re, \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)\right)}\\
                                
                                \mathbf{else}:\\
                                \;\;\;\;\sin \left(\mathsf{fma}\left(y.im, \log x.re, t\_0\right)\right) \cdot e^{\log x.re \cdot y.re}\\
                                
                                
                                \end{array}
                                \end{array}
                                
                                Derivation
                                1. Split input into 3 regimes
                                2. if x.re < 1.2e17

                                  1. Initial program 38.6%

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

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

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

                                    if 1.2e17 < x.re < 4.2000000000000003e121

                                    1. Initial program 57.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. +-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) \]
                                      5. 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) \]
                                      6. 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) \]
                                      7. lower-hypot.f64N/A

                                        \[\leadsto {\color{blue}{\left(\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) \]
                                      8. lower-sin.f64N/A

                                        \[\leadsto {\left(\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)} \]
                                      9. *-commutativeN/A

                                        \[\leadsto {\left(\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)} \]
                                      10. lower-*.f64N/A

                                        \[\leadsto {\left(\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-atan2.f6426.0

                                        \[\leadsto {\left(\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 rewrites26.0%

                                      \[\leadsto \color{blue}{{\left(\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.f6461.6

                                        \[\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 rewrites61.6%

                                      \[\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)} \]
                                    9. Taylor expanded in y.re around 0

                                      \[\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(y.im \cdot \log x.re\right) \]
                                    10. Step-by-step derivation
                                      1. Applied rewrites69.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(y.im \cdot \log x.re\right) \]

                                      if 4.2000000000000003e121 < x.re

                                      1. Initial program 8.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. +-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) \]
                                        5. 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) \]
                                        6. 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) \]
                                        7. lower-hypot.f64N/A

                                          \[\leadsto {\color{blue}{\left(\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) \]
                                        8. lower-sin.f64N/A

                                          \[\leadsto {\left(\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)} \]
                                        9. *-commutativeN/A

                                          \[\leadsto {\left(\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)} \]
                                        10. lower-*.f64N/A

                                          \[\leadsto {\left(\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-atan2.f6444.0

                                          \[\leadsto {\left(\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 rewrites44.0%

                                        \[\leadsto \color{blue}{{\left(\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.f6473.5

                                          \[\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 rewrites73.5%

                                        \[\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)} \]
                                      9. Taylor expanded in y.im around 0

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

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

                                        \[\leadsto \begin{array}{l} \mathbf{if}\;x.re \leq 1.2 \cdot 10^{+17}:\\ \;\;\;\;\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}\;x.re \leq 4.2 \cdot 10^{+121}:\\ \;\;\;\;\sin \left(\log x.re \cdot y.im\right) \cdot e^{\mathsf{fma}\left(y.re, \log x.re, \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\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^{\log x.re \cdot y.re}\\ \end{array} \]
                                      13. Add Preprocessing

                                      Alternative 15: 56.5% accurate, 1.5× speedup?

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

                                        1. Initial program 36.8%

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

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

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

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

                                          if -1.6e-139 < y.im < 1.2e49

                                          1. Initial program 33.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. +-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) \]
                                            5. 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) \]
                                            6. 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) \]
                                            7. lower-hypot.f64N/A

                                              \[\leadsto {\color{blue}{\left(\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) \]
                                            8. lower-sin.f64N/A

                                              \[\leadsto {\left(\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)} \]
                                            9. *-commutativeN/A

                                              \[\leadsto {\left(\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)} \]
                                            10. lower-*.f64N/A

                                              \[\leadsto {\left(\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-atan2.f6456.6

                                              \[\leadsto {\left(\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 rewrites56.6%

                                            \[\leadsto \color{blue}{{\left(\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 simplification57.2%

                                          \[\leadsto \begin{array}{l} \mathbf{if}\;y.im \leq -1.6 \cdot 10^{-139}:\\ \;\;\;\;\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.im \leq 1.2 \cdot 10^{+49}:\\ \;\;\;\;{\left(\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)\\ \mathbf{else}:\\ \;\;\;\;\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} \]
                                        10. Add Preprocessing

                                        Alternative 16: 59.0% accurate, 1.6× speedup?

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

                                          1. Initial program 31.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. +-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) \]
                                            5. 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) \]
                                            6. 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) \]
                                            7. lower-hypot.f64N/A

                                              \[\leadsto {\color{blue}{\left(\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) \]
                                            8. lower-sin.f64N/A

                                              \[\leadsto {\left(\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)} \]
                                            9. *-commutativeN/A

                                              \[\leadsto {\left(\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)} \]
                                            10. lower-*.f64N/A

                                              \[\leadsto {\left(\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-atan2.f6468.7

                                              \[\leadsto {\left(\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 rewrites68.7%

                                            \[\leadsto \color{blue}{{\left(\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.4499999999999999e-16 < y.re < 1.7e-4

                                          1. Initial program 39.7%

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

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

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

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

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

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

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

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

                                          Alternative 17: 57.3% accurate, 1.9× 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.45 \cdot 10^{-16}:\\ \;\;\;\;t\_0 \cdot {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\\ \mathbf{elif}\;y.re \leq 0.00086:\\ \;\;\;\;t\_0 \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\ \mathbf{else}:\\ \;\;\;\;{\left(\frac{x.im \cdot x.im}{x.re} \cdot 0.5 + x.re\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.45e-16)
                                               (* t_0 (pow (hypot x.re x.im) y.re))
                                               (if (<= y.re 0.00086)
                                                 (* t_0 (exp (* (atan2 x.im x.re) (- y.im))))
                                                 (* (pow (+ (* (/ (* x.im x.im) x.re) 0.5) x.re) y.re) (sin t_0))))))
                                          double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
                                          	double t_0 = atan2(x_46_im, x_46_re) * y_46_re;
                                          	double tmp;
                                          	if (y_46_re <= -1.45e-16) {
                                          		tmp = t_0 * pow(hypot(x_46_re, x_46_im), y_46_re);
                                          	} else if (y_46_re <= 0.00086) {
                                          		tmp = t_0 * exp((atan2(x_46_im, x_46_re) * -y_46_im));
                                          	} else {
                                          		tmp = pow(((((x_46_im * x_46_im) / x_46_re) * 0.5) + x_46_re), y_46_re) * sin(t_0);
                                          	}
                                          	return tmp;
                                          }
                                          
                                          public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
                                          	double t_0 = Math.atan2(x_46_im, x_46_re) * y_46_re;
                                          	double tmp;
                                          	if (y_46_re <= -1.45e-16) {
                                          		tmp = t_0 * Math.pow(Math.hypot(x_46_re, x_46_im), y_46_re);
                                          	} else if (y_46_re <= 0.00086) {
                                          		tmp = t_0 * Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im));
                                          	} else {
                                          		tmp = Math.pow(((((x_46_im * x_46_im) / x_46_re) * 0.5) + x_46_re), y_46_re) * Math.sin(t_0);
                                          	}
                                          	return tmp;
                                          }
                                          
                                          def code(x_46_re, x_46_im, y_46_re, y_46_im):
                                          	t_0 = math.atan2(x_46_im, x_46_re) * y_46_re
                                          	tmp = 0
                                          	if y_46_re <= -1.45e-16:
                                          		tmp = t_0 * math.pow(math.hypot(x_46_re, x_46_im), y_46_re)
                                          	elif y_46_re <= 0.00086:
                                          		tmp = t_0 * math.exp((math.atan2(x_46_im, x_46_re) * -y_46_im))
                                          	else:
                                          		tmp = math.pow(((((x_46_im * x_46_im) / x_46_re) * 0.5) + x_46_re), y_46_re) * math.sin(t_0)
                                          	return tmp
                                          
                                          function code(x_46_re, x_46_im, y_46_re, y_46_im)
                                          	t_0 = Float64(atan(x_46_im, x_46_re) * y_46_re)
                                          	tmp = 0.0
                                          	if (y_46_re <= -1.45e-16)
                                          		tmp = Float64(t_0 * (hypot(x_46_re, x_46_im) ^ y_46_re));
                                          	elseif (y_46_re <= 0.00086)
                                          		tmp = Float64(t_0 * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))));
                                          	else
                                          		tmp = Float64((Float64(Float64(Float64(Float64(x_46_im * x_46_im) / x_46_re) * 0.5) + x_46_re) ^ y_46_re) * sin(t_0));
                                          	end
                                          	return tmp
                                          end
                                          
                                          function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im)
                                          	t_0 = atan2(x_46_im, x_46_re) * y_46_re;
                                          	tmp = 0.0;
                                          	if (y_46_re <= -1.45e-16)
                                          		tmp = t_0 * (hypot(x_46_re, x_46_im) ^ y_46_re);
                                          	elseif (y_46_re <= 0.00086)
                                          		tmp = t_0 * exp((atan2(x_46_im, x_46_re) * -y_46_im));
                                          	else
                                          		tmp = (((((x_46_im * x_46_im) / x_46_re) * 0.5) + x_46_re) ^ y_46_re) * sin(t_0);
                                          	end
                                          	tmp_2 = tmp;
                                          end
                                          
                                          code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]}, If[LessEqual[y$46$re, -1.45e-16], N[(t$95$0 * N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 0.00086], N[(t$95$0 * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Power[N[(N[(N[(N[(x$46$im * x$46$im), $MachinePrecision] / x$46$re), $MachinePrecision] * 0.5), $MachinePrecision] + x$46$re), $MachinePrecision], 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.45 \cdot 10^{-16}:\\
                                          \;\;\;\;t\_0 \cdot {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\\
                                          
                                          \mathbf{elif}\;y.re \leq 0.00086:\\
                                          \;\;\;\;t\_0 \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\
                                          
                                          \mathbf{else}:\\
                                          \;\;\;\;{\left(\frac{x.im \cdot x.im}{x.re} \cdot 0.5 + x.re\right)}^{y.re} \cdot \sin t\_0\\
                                          
                                          
                                          \end{array}
                                          \end{array}
                                          
                                          Derivation
                                          1. Split input into 3 regimes
                                          2. if y.re < -1.4499999999999999e-16

                                            1. Initial program 35.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. +-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) \]
                                              5. 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) \]
                                              6. 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) \]
                                              7. lower-hypot.f64N/A

                                                \[\leadsto {\color{blue}{\left(\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) \]
                                              8. lower-sin.f64N/A

                                                \[\leadsto {\left(\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)} \]
                                              9. *-commutativeN/A

                                                \[\leadsto {\left(\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)} \]
                                              10. lower-*.f64N/A

                                                \[\leadsto {\left(\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-atan2.f6479.5

                                                \[\leadsto {\left(\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 rewrites79.5%

                                              \[\leadsto \color{blue}{{\left(\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 {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re} \cdot \left(y.re \cdot \color{blue}{\tan^{-1}_* \frac{x.im}{x.re}}\right) \]
                                            7. Step-by-step derivation
                                              1. Applied rewrites76.8%

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

                                              if -1.4499999999999999e-16 < y.re < 8.59999999999999979e-4

                                              1. Initial program 39.7%

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

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

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

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

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

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

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

                                                if 8.59999999999999979e-4 < y.re

                                                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. +-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) \]
                                                  5. 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) \]
                                                  6. 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) \]
                                                  7. lower-hypot.f64N/A

                                                    \[\leadsto {\color{blue}{\left(\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) \]
                                                  8. lower-sin.f64N/A

                                                    \[\leadsto {\left(\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)} \]
                                                  9. *-commutativeN/A

                                                    \[\leadsto {\left(\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)} \]
                                                  10. lower-*.f64N/A

                                                    \[\leadsto {\left(\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-atan2.f6456.4

                                                    \[\leadsto {\left(\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 rewrites56.4%

                                                  \[\leadsto \color{blue}{{\left(\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 rewrites54.8%

                                                    \[\leadsto {\left(x.re + 0.5 \cdot \frac{x.im \cdot x.im}{x.re}\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 simplification55.6%

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

                                                Alternative 18: 56.9% 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.45 \cdot 10^{-16}:\\ \;\;\;\;t\_0 \cdot {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\\ \mathbf{elif}\;y.re \leq 32000000000:\\ \;\;\;\;t\_0 \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\ \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.45e-16)
                                                     (* t_0 (pow (hypot x.re x.im) y.re))
                                                     (if (<= y.re 32000000000.0)
                                                       (* t_0 (exp (* (atan2 x.im x.re) (- y.im))))
                                                       (* (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.45e-16) {
                                                		tmp = t_0 * pow(hypot(x_46_re, x_46_im), y_46_re);
                                                	} else if (y_46_re <= 32000000000.0) {
                                                		tmp = t_0 * exp((atan2(x_46_im, x_46_re) * -y_46_im));
                                                	} else {
                                                		tmp = pow(-x_46_im, y_46_re) * sin(t_0);
                                                	}
                                                	return tmp;
                                                }
                                                
                                                public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
                                                	double t_0 = Math.atan2(x_46_im, x_46_re) * y_46_re;
                                                	double tmp;
                                                	if (y_46_re <= -1.45e-16) {
                                                		tmp = t_0 * Math.pow(Math.hypot(x_46_re, x_46_im), y_46_re);
                                                	} else if (y_46_re <= 32000000000.0) {
                                                		tmp = t_0 * Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im));
                                                	} else {
                                                		tmp = Math.pow(-x_46_im, y_46_re) * Math.sin(t_0);
                                                	}
                                                	return tmp;
                                                }
                                                
                                                def code(x_46_re, x_46_im, y_46_re, y_46_im):
                                                	t_0 = math.atan2(x_46_im, x_46_re) * y_46_re
                                                	tmp = 0
                                                	if y_46_re <= -1.45e-16:
                                                		tmp = t_0 * math.pow(math.hypot(x_46_re, x_46_im), y_46_re)
                                                	elif y_46_re <= 32000000000.0:
                                                		tmp = t_0 * math.exp((math.atan2(x_46_im, x_46_re) * -y_46_im))
                                                	else:
                                                		tmp = math.pow(-x_46_im, y_46_re) * math.sin(t_0)
                                                	return tmp
                                                
                                                function code(x_46_re, x_46_im, y_46_re, y_46_im)
                                                	t_0 = Float64(atan(x_46_im, x_46_re) * y_46_re)
                                                	tmp = 0.0
                                                	if (y_46_re <= -1.45e-16)
                                                		tmp = Float64(t_0 * (hypot(x_46_re, x_46_im) ^ y_46_re));
                                                	elseif (y_46_re <= 32000000000.0)
                                                		tmp = Float64(t_0 * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))));
                                                	else
                                                		tmp = Float64((Float64(-x_46_im) ^ y_46_re) * sin(t_0));
                                                	end
                                                	return tmp
                                                end
                                                
                                                function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im)
                                                	t_0 = atan2(x_46_im, x_46_re) * y_46_re;
                                                	tmp = 0.0;
                                                	if (y_46_re <= -1.45e-16)
                                                		tmp = t_0 * (hypot(x_46_re, x_46_im) ^ y_46_re);
                                                	elseif (y_46_re <= 32000000000.0)
                                                		tmp = t_0 * exp((atan2(x_46_im, x_46_re) * -y_46_im));
                                                	else
                                                		tmp = (-x_46_im ^ y_46_re) * sin(t_0);
                                                	end
                                                	tmp_2 = tmp;
                                                end
                                                
                                                code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]}, If[LessEqual[y$46$re, -1.45e-16], N[(t$95$0 * N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 32000000000.0], N[(t$95$0 * 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] * 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.45 \cdot 10^{-16}:\\
                                                \;\;\;\;t\_0 \cdot {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\\
                                                
                                                \mathbf{elif}\;y.re \leq 32000000000:\\
                                                \;\;\;\;t\_0 \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\
                                                
                                                \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.4499999999999999e-16

                                                  1. Initial program 35.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. +-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) \]
                                                    5. 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) \]
                                                    6. 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) \]
                                                    7. lower-hypot.f64N/A

                                                      \[\leadsto {\color{blue}{\left(\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) \]
                                                    8. lower-sin.f64N/A

                                                      \[\leadsto {\left(\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)} \]
                                                    9. *-commutativeN/A

                                                      \[\leadsto {\left(\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)} \]
                                                    10. lower-*.f64N/A

                                                      \[\leadsto {\left(\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-atan2.f6479.5

                                                      \[\leadsto {\left(\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 rewrites79.5%

                                                    \[\leadsto \color{blue}{{\left(\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 {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re} \cdot \left(y.re \cdot \color{blue}{\tan^{-1}_* \frac{x.im}{x.re}}\right) \]
                                                  7. Step-by-step derivation
                                                    1. Applied rewrites76.8%

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

                                                    if -1.4499999999999999e-16 < y.re < 3.2e10

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

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

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

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

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

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

                                                      if 3.2e10 < y.re

                                                      1. Initial program 22.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. +-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) \]
                                                        5. 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) \]
                                                        6. 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) \]
                                                        7. lower-hypot.f64N/A

                                                          \[\leadsto {\color{blue}{\left(\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) \]
                                                        8. lower-sin.f64N/A

                                                          \[\leadsto {\left(\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)} \]
                                                        9. *-commutativeN/A

                                                          \[\leadsto {\left(\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)} \]
                                                        10. lower-*.f64N/A

                                                          \[\leadsto {\left(\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-atan2.f6455.3

                                                          \[\leadsto {\left(\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 rewrites55.3%

                                                        \[\leadsto \color{blue}{{\left(\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 rewrites53.9%

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

                                                        \[\leadsto \begin{array}{l} \mathbf{if}\;y.re \leq -1.45 \cdot 10^{-16}:\\ \;\;\;\;\left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \cdot {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\\ \mathbf{elif}\;y.re \leq 32000000000:\\ \;\;\;\;\left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\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 19: 34.8% accurate, 2.1× speedup?

                                                      \[\begin{array}{l} \\ \begin{array}{l} t_0 := \sin \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\\ t_1 := {x.im}^{y.re} \cdot t\_0\\ \mathbf{if}\;x.im \leq -1.8 \cdot 10^{+152}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x.im \leq 2.2 \cdot 10^{-248}:\\ \;\;\;\;{x.re}^{y.re} \cdot t\_0\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \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 (* (pow x.im y.re) t_0)))
                                                         (if (<= x.im -1.8e+152)
                                                           t_1
                                                           (if (<= x.im 2.2e-248) (* (pow x.re y.re) 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 = sin((atan2(x_46_im, x_46_re) * y_46_re));
                                                      	double t_1 = pow(x_46_im, y_46_re) * t_0;
                                                      	double tmp;
                                                      	if (x_46_im <= -1.8e+152) {
                                                      		tmp = t_1;
                                                      	} else if (x_46_im <= 2.2e-248) {
                                                      		tmp = pow(x_46_re, y_46_re) * t_0;
                                                      	} else {
                                                      		tmp = t_1;
                                                      	}
                                                      	return tmp;
                                                      }
                                                      
                                                      real(8) function code(x_46re, x_46im, y_46re, y_46im)
                                                          real(8), intent (in) :: x_46re
                                                          real(8), intent (in) :: x_46im
                                                          real(8), intent (in) :: y_46re
                                                          real(8), intent (in) :: y_46im
                                                          real(8) :: t_0
                                                          real(8) :: t_1
                                                          real(8) :: tmp
                                                          t_0 = sin((atan2(x_46im, x_46re) * y_46re))
                                                          t_1 = (x_46im ** y_46re) * t_0
                                                          if (x_46im <= (-1.8d+152)) then
                                                              tmp = t_1
                                                          else if (x_46im <= 2.2d-248) then
                                                              tmp = (x_46re ** y_46re) * t_0
                                                          else
                                                              tmp = t_1
                                                          end if
                                                          code = tmp
                                                      end function
                                                      
                                                      public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
                                                      	double t_0 = Math.sin((Math.atan2(x_46_im, x_46_re) * y_46_re));
                                                      	double t_1 = Math.pow(x_46_im, y_46_re) * t_0;
                                                      	double tmp;
                                                      	if (x_46_im <= -1.8e+152) {
                                                      		tmp = t_1;
                                                      	} else if (x_46_im <= 2.2e-248) {
                                                      		tmp = Math.pow(x_46_re, y_46_re) * t_0;
                                                      	} else {
                                                      		tmp = t_1;
                                                      	}
                                                      	return tmp;
                                                      }
                                                      
                                                      def code(x_46_re, x_46_im, y_46_re, y_46_im):
                                                      	t_0 = math.sin((math.atan2(x_46_im, x_46_re) * y_46_re))
                                                      	t_1 = math.pow(x_46_im, y_46_re) * t_0
                                                      	tmp = 0
                                                      	if x_46_im <= -1.8e+152:
                                                      		tmp = t_1
                                                      	elif x_46_im <= 2.2e-248:
                                                      		tmp = math.pow(x_46_re, y_46_re) * t_0
                                                      	else:
                                                      		tmp = t_1
                                                      	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 = Float64((x_46_im ^ y_46_re) * t_0)
                                                      	tmp = 0.0
                                                      	if (x_46_im <= -1.8e+152)
                                                      		tmp = t_1;
                                                      	elseif (x_46_im <= 2.2e-248)
                                                      		tmp = Float64((x_46_re ^ y_46_re) * t_0);
                                                      	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 = sin((atan2(x_46_im, x_46_re) * y_46_re));
                                                      	t_1 = (x_46_im ^ y_46_re) * t_0;
                                                      	tmp = 0.0;
                                                      	if (x_46_im <= -1.8e+152)
                                                      		tmp = t_1;
                                                      	elseif (x_46_im <= 2.2e-248)
                                                      		tmp = (x_46_re ^ y_46_re) * t_0;
                                                      	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[Sin[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(N[Power[x$46$im, y$46$re], $MachinePrecision] * t$95$0), $MachinePrecision]}, If[LessEqual[x$46$im, -1.8e+152], t$95$1, If[LessEqual[x$46$im, 2.2e-248], N[(N[Power[x$46$re, y$46$re], $MachinePrecision] * t$95$0), $MachinePrecision], t$95$1]]]]
                                                      
                                                      \begin{array}{l}
                                                      
                                                      \\
                                                      \begin{array}{l}
                                                      t_0 := \sin \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\\
                                                      t_1 := {x.im}^{y.re} \cdot t\_0\\
                                                      \mathbf{if}\;x.im \leq -1.8 \cdot 10^{+152}:\\
                                                      \;\;\;\;t\_1\\
                                                      
                                                      \mathbf{elif}\;x.im \leq 2.2 \cdot 10^{-248}:\\
                                                      \;\;\;\;{x.re}^{y.re} \cdot t\_0\\
                                                      
                                                      \mathbf{else}:\\
                                                      \;\;\;\;t\_1\\
                                                      
                                                      
                                                      \end{array}
                                                      \end{array}
                                                      
                                                      Derivation
                                                      1. Split input into 2 regimes
                                                      2. if x.im < -1.7999999999999999e152 or 2.19999999999999999e-248 < x.im

                                                        1. Initial program 28.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. +-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) \]
                                                          5. 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) \]
                                                          6. 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) \]
                                                          7. lower-hypot.f64N/A

                                                            \[\leadsto {\color{blue}{\left(\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) \]
                                                          8. lower-sin.f64N/A

                                                            \[\leadsto {\left(\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)} \]
                                                          9. *-commutativeN/A

                                                            \[\leadsto {\left(\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)} \]
                                                          10. lower-*.f64N/A

                                                            \[\leadsto {\left(\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-atan2.f6446.3

                                                            \[\leadsto {\left(\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 rewrites46.3%

                                                          \[\leadsto \color{blue}{{\left(\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 rewrites43.0%

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

                                                          if -1.7999999999999999e152 < x.im < 2.19999999999999999e-248

                                                          1. Initial program 46.4%

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

                                                            \[\leadsto \color{blue}{\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. +-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) \]
                                                            5. 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) \]
                                                            6. 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) \]
                                                            7. lower-hypot.f64N/A

                                                              \[\leadsto {\color{blue}{\left(\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) \]
                                                            8. lower-sin.f64N/A

                                                              \[\leadsto {\left(\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)} \]
                                                            9. *-commutativeN/A

                                                              \[\leadsto {\left(\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)} \]
                                                            10. lower-*.f64N/A

                                                              \[\leadsto {\left(\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-atan2.f6445.5

                                                              \[\leadsto {\left(\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.5%

                                                            \[\leadsto \color{blue}{{\left(\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 rewrites39.4%

                                                              \[\leadsto {x.re}^{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. Add Preprocessing

                                                          Alternative 20: 36.0% accurate, 2.1× speedup?

                                                          \[\begin{array}{l} \\ \begin{array}{l} t_0 := \sin \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\\ t_1 := {x.im}^{y.re} \cdot t\_0\\ \mathbf{if}\;y.re \leq -19:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y.re \leq 880:\\ \;\;\;\;1 \cdot t\_0\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \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 (* (pow x.im y.re) t_0)))
                                                             (if (<= y.re -19.0) t_1 (if (<= y.re 880.0) (* 1.0 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 = sin((atan2(x_46_im, x_46_re) * y_46_re));
                                                          	double t_1 = pow(x_46_im, y_46_re) * t_0;
                                                          	double tmp;
                                                          	if (y_46_re <= -19.0) {
                                                          		tmp = t_1;
                                                          	} else if (y_46_re <= 880.0) {
                                                          		tmp = 1.0 * t_0;
                                                          	} else {
                                                          		tmp = t_1;
                                                          	}
                                                          	return tmp;
                                                          }
                                                          
                                                          real(8) function code(x_46re, x_46im, y_46re, y_46im)
                                                              real(8), intent (in) :: x_46re
                                                              real(8), intent (in) :: x_46im
                                                              real(8), intent (in) :: y_46re
                                                              real(8), intent (in) :: y_46im
                                                              real(8) :: t_0
                                                              real(8) :: t_1
                                                              real(8) :: tmp
                                                              t_0 = sin((atan2(x_46im, x_46re) * y_46re))
                                                              t_1 = (x_46im ** y_46re) * t_0
                                                              if (y_46re <= (-19.0d0)) then
                                                                  tmp = t_1
                                                              else if (y_46re <= 880.0d0) then
                                                                  tmp = 1.0d0 * t_0
                                                              else
                                                                  tmp = t_1
                                                              end if
                                                              code = tmp
                                                          end function
                                                          
                                                          public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
                                                          	double t_0 = Math.sin((Math.atan2(x_46_im, x_46_re) * y_46_re));
                                                          	double t_1 = Math.pow(x_46_im, y_46_re) * t_0;
                                                          	double tmp;
                                                          	if (y_46_re <= -19.0) {
                                                          		tmp = t_1;
                                                          	} else if (y_46_re <= 880.0) {
                                                          		tmp = 1.0 * t_0;
                                                          	} else {
                                                          		tmp = t_1;
                                                          	}
                                                          	return tmp;
                                                          }
                                                          
                                                          def code(x_46_re, x_46_im, y_46_re, y_46_im):
                                                          	t_0 = math.sin((math.atan2(x_46_im, x_46_re) * y_46_re))
                                                          	t_1 = math.pow(x_46_im, y_46_re) * t_0
                                                          	tmp = 0
                                                          	if y_46_re <= -19.0:
                                                          		tmp = t_1
                                                          	elif y_46_re <= 880.0:
                                                          		tmp = 1.0 * t_0
                                                          	else:
                                                          		tmp = t_1
                                                          	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 = Float64((x_46_im ^ y_46_re) * t_0)
                                                          	tmp = 0.0
                                                          	if (y_46_re <= -19.0)
                                                          		tmp = t_1;
                                                          	elseif (y_46_re <= 880.0)
                                                          		tmp = Float64(1.0 * t_0);
                                                          	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 = sin((atan2(x_46_im, x_46_re) * y_46_re));
                                                          	t_1 = (x_46_im ^ y_46_re) * t_0;
                                                          	tmp = 0.0;
                                                          	if (y_46_re <= -19.0)
                                                          		tmp = t_1;
                                                          	elseif (y_46_re <= 880.0)
                                                          		tmp = 1.0 * t_0;
                                                          	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[Sin[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(N[Power[x$46$im, y$46$re], $MachinePrecision] * t$95$0), $MachinePrecision]}, If[LessEqual[y$46$re, -19.0], t$95$1, If[LessEqual[y$46$re, 880.0], N[(1.0 * t$95$0), $MachinePrecision], t$95$1]]]]
                                                          
                                                          \begin{array}{l}
                                                          
                                                          \\
                                                          \begin{array}{l}
                                                          t_0 := \sin \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\\
                                                          t_1 := {x.im}^{y.re} \cdot t\_0\\
                                                          \mathbf{if}\;y.re \leq -19:\\
                                                          \;\;\;\;t\_1\\
                                                          
                                                          \mathbf{elif}\;y.re \leq 880:\\
                                                          \;\;\;\;1 \cdot t\_0\\
                                                          
                                                          \mathbf{else}:\\
                                                          \;\;\;\;t\_1\\
                                                          
                                                          
                                                          \end{array}
                                                          \end{array}
                                                          
                                                          Derivation
                                                          1. Split input into 2 regimes
                                                          2. if y.re < -19 or 880 < y.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. +-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) \]
                                                              5. 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) \]
                                                              6. 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) \]
                                                              7. lower-hypot.f64N/A

                                                                \[\leadsto {\color{blue}{\left(\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) \]
                                                              8. lower-sin.f64N/A

                                                                \[\leadsto {\left(\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)} \]
                                                              9. *-commutativeN/A

                                                                \[\leadsto {\left(\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)} \]
                                                              10. lower-*.f64N/A

                                                                \[\leadsto {\left(\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-atan2.f6467.8

                                                                \[\leadsto {\left(\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 rewrites67.8%

                                                              \[\leadsto \color{blue}{{\left(\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 rewrites53.5%

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

                                                              if -19 < y.re < 880

                                                              1. Initial program 40.6%

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

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

                                                                  \[\leadsto \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. +-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) \]
                                                                5. 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) \]
                                                                6. 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) \]
                                                                7. lower-hypot.f64N/A

                                                                  \[\leadsto {\color{blue}{\left(\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) \]
                                                                8. lower-sin.f64N/A

                                                                  \[\leadsto {\left(\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)} \]
                                                                9. *-commutativeN/A

                                                                  \[\leadsto {\left(\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)} \]
                                                                10. lower-*.f64N/A

                                                                  \[\leadsto {\left(\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-atan2.f6423.4

                                                                  \[\leadsto {\left(\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 rewrites23.4%

                                                                \[\leadsto \color{blue}{{\left(\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 rewrites20.6%

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

                                                              Alternative 21: 44.1% accurate, 2.1× speedup?

                                                              \[\begin{array}{l} \\ \begin{array}{l} t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\\ \mathbf{if}\;x.im \leq 3.65 \cdot 10^{-19}:\\ \;\;\;\;t\_0 \cdot {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\\ \mathbf{else}:\\ \;\;\;\;{x.im}^{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 (<= x.im 3.65e-19)
                                                                   (* t_0 (pow (hypot x.re x.im) y.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 (x_46_im <= 3.65e-19) {
                                                              		tmp = t_0 * pow(hypot(x_46_re, x_46_im), y_46_re);
                                                              	} else {
                                                              		tmp = pow(x_46_im, y_46_re) * sin(t_0);
                                                              	}
                                                              	return tmp;
                                                              }
                                                              
                                                              public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
                                                              	double t_0 = Math.atan2(x_46_im, x_46_re) * y_46_re;
                                                              	double tmp;
                                                              	if (x_46_im <= 3.65e-19) {
                                                              		tmp = t_0 * Math.pow(Math.hypot(x_46_re, x_46_im), y_46_re);
                                                              	} else {
                                                              		tmp = Math.pow(x_46_im, y_46_re) * Math.sin(t_0);
                                                              	}
                                                              	return tmp;
                                                              }
                                                              
                                                              def code(x_46_re, x_46_im, y_46_re, y_46_im):
                                                              	t_0 = math.atan2(x_46_im, x_46_re) * y_46_re
                                                              	tmp = 0
                                                              	if x_46_im <= 3.65e-19:
                                                              		tmp = t_0 * math.pow(math.hypot(x_46_re, x_46_im), y_46_re)
                                                              	else:
                                                              		tmp = math.pow(x_46_im, y_46_re) * math.sin(t_0)
                                                              	return tmp
                                                              
                                                              function code(x_46_re, x_46_im, y_46_re, y_46_im)
                                                              	t_0 = Float64(atan(x_46_im, x_46_re) * y_46_re)
                                                              	tmp = 0.0
                                                              	if (x_46_im <= 3.65e-19)
                                                              		tmp = Float64(t_0 * (hypot(x_46_re, x_46_im) ^ y_46_re));
                                                              	else
                                                              		tmp = Float64((x_46_im ^ y_46_re) * sin(t_0));
                                                              	end
                                                              	return tmp
                                                              end
                                                              
                                                              function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im)
                                                              	t_0 = atan2(x_46_im, x_46_re) * y_46_re;
                                                              	tmp = 0.0;
                                                              	if (x_46_im <= 3.65e-19)
                                                              		tmp = t_0 * (hypot(x_46_re, x_46_im) ^ y_46_re);
                                                              	else
                                                              		tmp = (x_46_im ^ y_46_re) * sin(t_0);
                                                              	end
                                                              	tmp_2 = tmp;
                                                              end
                                                              
                                                              code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]}, If[LessEqual[x$46$im, 3.65e-19], N[(t$95$0 * N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$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}\;x.im \leq 3.65 \cdot 10^{-19}:\\
                                                              \;\;\;\;t\_0 \cdot {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\\
                                                              
                                                              \mathbf{else}:\\
                                                              \;\;\;\;{x.im}^{y.re} \cdot \sin t\_0\\
                                                              
                                                              
                                                              \end{array}
                                                              \end{array}
                                                              
                                                              Derivation
                                                              1. Split input into 2 regimes
                                                              2. if x.im < 3.6499999999999998e-19

                                                                1. Initial program 36.4%

                                                                  \[e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \]
                                                                2. Add Preprocessing
                                                                3. Taylor expanded in y.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. +-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) \]
                                                                  5. 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) \]
                                                                  6. 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) \]
                                                                  7. lower-hypot.f64N/A

                                                                    \[\leadsto {\color{blue}{\left(\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) \]
                                                                  8. lower-sin.f64N/A

                                                                    \[\leadsto {\left(\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)} \]
                                                                  9. *-commutativeN/A

                                                                    \[\leadsto {\left(\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)} \]
                                                                  10. lower-*.f64N/A

                                                                    \[\leadsto {\left(\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-atan2.f6444.6

                                                                    \[\leadsto {\left(\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 rewrites44.6%

                                                                  \[\leadsto \color{blue}{{\left(\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 {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re} \cdot \left(y.re \cdot \color{blue}{\tan^{-1}_* \frac{x.im}{x.re}}\right) \]
                                                                7. Step-by-step derivation
                                                                  1. Applied rewrites43.5%

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

                                                                  if 3.6499999999999998e-19 < x.im

                                                                  1. Initial program 31.8%

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

                                                                      \[\leadsto {\color{blue}{\left(\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) \]
                                                                    8. lower-sin.f64N/A

                                                                      \[\leadsto {\left(\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)} \]
                                                                    9. *-commutativeN/A

                                                                      \[\leadsto {\left(\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)} \]
                                                                    10. lower-*.f64N/A

                                                                      \[\leadsto {\left(\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-atan2.f6449.9

                                                                      \[\leadsto {\left(\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(\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 rewrites49.9%

                                                                      \[\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 simplification45.2%

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

                                                                  Alternative 22: 13.6% 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 35.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. +-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) \]
                                                                    5. 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) \]
                                                                    6. 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) \]
                                                                    7. lower-hypot.f64N/A

                                                                      \[\leadsto {\color{blue}{\left(\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) \]
                                                                    8. lower-sin.f64N/A

                                                                      \[\leadsto {\left(\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)} \]
                                                                    9. *-commutativeN/A

                                                                      \[\leadsto {\left(\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)} \]
                                                                    10. lower-*.f64N/A

                                                                      \[\leadsto {\left(\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-atan2.f6446.0

                                                                      \[\leadsto {\left(\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 rewrites46.0%

                                                                    \[\leadsto \color{blue}{{\left(\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 rewrites13.7%

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

                                                                    Alternative 23: 13.6% 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 35.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. +-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) \]
                                                                      5. 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) \]
                                                                      6. 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) \]
                                                                      7. lower-hypot.f64N/A

                                                                        \[\leadsto {\color{blue}{\left(\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) \]
                                                                      8. lower-sin.f64N/A

                                                                        \[\leadsto {\left(\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)} \]
                                                                      9. *-commutativeN/A

                                                                        \[\leadsto {\left(\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)} \]
                                                                      10. lower-*.f64N/A

                                                                        \[\leadsto {\left(\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-atan2.f6446.0

                                                                        \[\leadsto {\left(\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 rewrites46.0%

                                                                      \[\leadsto \color{blue}{{\left(\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 rewrites13.6%

                                                                        \[\leadsto y.re \cdot \color{blue}{\tan^{-1}_* \frac{x.im}{x.re}} \]
                                                                      2. Final simplification13.6%

                                                                        \[\leadsto \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re \]
                                                                      3. Add Preprocessing

                                                                      Reproduce

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