powComplex, imaginary part

Percentage Accurate: 40.2% → 62.1%
Time: 44.3s
Alternatives: 16
Speedup: 2.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 16 alternatives:

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

Initial Program: 40.2% accurate, 1.0× speedup?

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

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

Alternative 1: 62.1% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;x.re \leq 4.5 \cdot 10^{-49}:\\
\;\;\;\;\frac{\sin \left(\mathsf{fma}\left(\tan^{-1}_* \frac{x.im}{x.re}, y.re, 0\right)\right)}{e^{\mathsf{fma}\left(y.re \cdot \left(0 - 0.5\right), \log \left(\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)\right), \mathsf{fma}\left(\tan^{-1}_* \frac{x.im}{x.re}, y.im, 0\right)\right)}}\\

\mathbf{elif}\;x.re \leq 2.3 \cdot 10^{+228}:\\
\;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - t\_1} \cdot t\_2\\

\mathbf{else}:\\
\;\;\;\;t\_2 \cdot {x.re}^{y.re}\\


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

    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 e^{\log \left(\sqrt{x.re \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. *-lowering-*.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.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
      2. atan2-lowering-atan2.f6454.3

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

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

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

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

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

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

    if -9.5e10 < x.re < 4.5000000000000002e-49

    1. Initial program 52.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. *-lowering-*.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.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
      2. atan2-lowering-atan2.f6455.3

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

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

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

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

        \[\leadsto \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}}}} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
      4. div-expN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.5000000000000002e-49 < x.re < 2.30000000000000013e228

    1. Initial program 53.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 e^{\log \left(\sqrt{x.re \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(-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. mul-1-negN/A

        \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(\color{blue}{\left(\mathsf{neg}\left(y.im \cdot \log \left(\frac{1}{x.re}\right)\right)\right)} + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
      2. distribute-rgt-neg-inN/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.im \cdot \left(\mathsf{neg}\left(\log \left(\frac{1}{x.re}\right)\right)\right)} + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
      3. log-recN/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(y.im \cdot \left(\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(\log x.re\right)\right)}\right)\right) + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
      4. remove-double-negN/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(y.im \cdot \color{blue}{\log x.re} + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
      5. accelerator-lowering-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(y.im, \log x.re, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)} \]
      6. log-lowering-log.f64N/A

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

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

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

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

    if 2.30000000000000013e228 < x.re

    1. Initial program 0.0%

      \[e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \]
    2. Add Preprocessing
    3. Taylor expanded in x.re 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(-1 \cdot \left(y.im \cdot \log \left(\frac{1}{x.re}\right)\right) + \left(\frac{1}{2} \cdot \frac{{x.im}^{2} \cdot y.im}{{x.re}^{2}} + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)} \]
    4. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(\color{blue}{\left(\mathsf{neg}\left(y.im \cdot \log \left(\frac{1}{x.re}\right)\right)\right)} + \left(\frac{1}{2} \cdot \frac{{x.im}^{2} \cdot y.im}{{x.re}^{2}} + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
      2. distribute-rgt-neg-inN/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.im \cdot \left(\mathsf{neg}\left(\log \left(\frac{1}{x.re}\right)\right)\right)} + \left(\frac{1}{2} \cdot \frac{{x.im}^{2} \cdot y.im}{{x.re}^{2}} + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
      3. log-recN/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(y.im \cdot \left(\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(\log x.re\right)\right)}\right)\right) + \left(\frac{1}{2} \cdot \frac{{x.im}^{2} \cdot y.im}{{x.re}^{2}} + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
      4. remove-double-negN/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(y.im \cdot \color{blue}{\log x.re} + \left(\frac{1}{2} \cdot \frac{{x.im}^{2} \cdot y.im}{{x.re}^{2}} + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
      5. accelerator-lowering-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(y.im, \log x.re, \frac{1}{2} \cdot \frac{{x.im}^{2} \cdot y.im}{{x.re}^{2}} + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)} \]
      6. log-lowering-log.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(\mathsf{fma}\left(y.im, \log x.re, \mathsf{fma}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}, \frac{\left(0.5 \cdot \left(x.im \cdot x.im\right)\right) \cdot y.im}{\color{blue}{x.re \cdot x.re}}\right)\right)\right) \]
    5. Simplified49.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 x.re, \mathsf{fma}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}, \frac{\left(0.5 \cdot \left(x.im \cdot x.im\right)\right) \cdot y.im}{x.re \cdot x.re}\right)\right)\right)} \]
    6. Taylor expanded in y.im around 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 61.7% accurate, 1.2× speedup?

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

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

\mathbf{elif}\;y.re \leq 3.5 \cdot 10^{-16}:\\
\;\;\;\;\frac{t\_2}{e^{t\_0}}\\

\mathbf{elif}\;y.re \leq 7 \cdot 10^{+208}:\\
\;\;\;\;t\_1 \cdot \frac{1}{e^{\mathsf{fma}\left(\tan^{-1}_* \frac{x.im}{x.re}, y.im, 0\right) - y.re \cdot \left(0.5 \cdot t\_3\right)}}\\

\mathbf{else}:\\
\;\;\;\;\frac{t\_2}{e^{t\_3 \cdot \left(y.re \cdot -0.5\right)}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y.re < -6.79999999999999948e-7

    1. Initial program 43.5%

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

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

    if -6.79999999999999948e-7 < y.re < 3.50000000000000017e-16

    1. Initial program 43.8%

      \[e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(\log \left(\sqrt{x.re \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. *-lowering-*.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.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
      2. atan2-lowering-atan2.f6435.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(y.re \cdot \color{blue}{\tan^{-1}_* \frac{x.im}{x.re}}\right) \]
    5. Simplified35.0%

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

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

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

        \[\leadsto \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}}}} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
      4. div-expN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\mathsf{neg}\left(\sin \left(\mathsf{fma}\left(\tan^{-1}_* \frac{x.im}{x.re}, y.re, 0\right)\right)\right)}{0 - e^{\color{blue}{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}} \]
      4. atan2-lowering-atan2.f6457.5

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

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

    if 3.50000000000000017e-16 < y.re < 7.00000000000000033e208

    1. Initial program 44.6%

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

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

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

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

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

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

        \[\leadsto \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}}}} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
      4. div-expN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 7.00000000000000033e208 < y.re

    1. Initial program 30.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. *-lowering-*.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.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
      2. atan2-lowering-atan2.f6438.5

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

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

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

        \[\leadsto \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}}}} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
      4. div-expN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 61.7% accurate, 1.2× speedup?

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

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

\mathbf{elif}\;y.re \leq 3.2 \cdot 10^{-16}:\\
\;\;\;\;\frac{t\_2}{e^{t\_0}}\\

\mathbf{elif}\;y.re \leq 1.1 \cdot 10^{+212}:\\
\;\;\;\;t\_1\\

\mathbf{else}:\\
\;\;\;\;\frac{t\_2}{e^{\log \left(\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)\right) \cdot \left(y.re \cdot -0.5\right)}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y.re < -4.0999999999999999e-7 or 3.20000000000000023e-16 < y.re < 1.09999999999999998e212

    1. Initial program 44.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 e^{\log \left(\sqrt{x.re \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. *-lowering-*.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.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
      2. atan2-lowering-atan2.f6478.3

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

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

    if -4.0999999999999999e-7 < y.re < 3.20000000000000023e-16

    1. Initial program 43.8%

      \[e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(\log \left(\sqrt{x.re \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. *-lowering-*.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.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
      2. atan2-lowering-atan2.f6435.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(y.re \cdot \color{blue}{\tan^{-1}_* \frac{x.im}{x.re}}\right) \]
    5. Simplified35.0%

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

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

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

        \[\leadsto \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}}}} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
      4. div-expN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\mathsf{neg}\left(\sin \left(\mathsf{fma}\left(\tan^{-1}_* \frac{x.im}{x.re}, y.re, 0\right)\right)\right)}{0 - e^{\color{blue}{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}} \]
      4. atan2-lowering-atan2.f6457.5

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

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

    if 1.09999999999999998e212 < y.re

    1. Initial program 30.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. *-lowering-*.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.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
      2. atan2-lowering-atan2.f6438.5

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

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

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

        \[\leadsto \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}}}} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
      4. div-expN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 61.5% accurate, 1.2× speedup?

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

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

\mathbf{elif}\;x.re \leq 1.85 \cdot 10^{-48}:\\
\;\;\;\;\frac{\sin \left(\mathsf{fma}\left(\tan^{-1}_* \frac{x.im}{x.re}, y.re, 0\right)\right)}{e^{\mathsf{fma}\left(y.re \cdot \left(0 - 0.5\right), \log \left(\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)\right), \mathsf{fma}\left(\tan^{-1}_* \frac{x.im}{x.re}, y.im, 0\right)\right)}}\\

\mathbf{else}:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(y.im, \log x.re, t\_0\right)\right) \cdot {x.re}^{y.re}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x.re < -5.2e10

    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 e^{\log \left(\sqrt{x.re \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. *-lowering-*.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.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
      2. atan2-lowering-atan2.f6454.3

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

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

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

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

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

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

    if -5.2e10 < x.re < 1.8499999999999999e-48

    1. Initial program 52.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. *-lowering-*.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.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
      2. atan2-lowering-atan2.f6455.3

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

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

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

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

        \[\leadsto \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}}}} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
      4. div-expN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.8499999999999999e-48 < x.re

    1. Initial program 37.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 x.re 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(-1 \cdot \left(y.im \cdot \log \left(\frac{1}{x.re}\right)\right) + \left(\frac{1}{2} \cdot \frac{{x.im}^{2} \cdot y.im}{{x.re}^{2}} + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)} \]
    4. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(\color{blue}{\left(\mathsf{neg}\left(y.im \cdot \log \left(\frac{1}{x.re}\right)\right)\right)} + \left(\frac{1}{2} \cdot \frac{{x.im}^{2} \cdot y.im}{{x.re}^{2}} + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
      2. distribute-rgt-neg-inN/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.im \cdot \left(\mathsf{neg}\left(\log \left(\frac{1}{x.re}\right)\right)\right)} + \left(\frac{1}{2} \cdot \frac{{x.im}^{2} \cdot y.im}{{x.re}^{2}} + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
      3. log-recN/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(y.im \cdot \left(\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(\log x.re\right)\right)}\right)\right) + \left(\frac{1}{2} \cdot \frac{{x.im}^{2} \cdot y.im}{{x.re}^{2}} + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
      4. remove-double-negN/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(y.im \cdot \color{blue}{\log x.re} + \left(\frac{1}{2} \cdot \frac{{x.im}^{2} \cdot y.im}{{x.re}^{2}} + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
      5. accelerator-lowering-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(y.im, \log x.re, \frac{1}{2} \cdot \frac{{x.im}^{2} \cdot y.im}{{x.re}^{2}} + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)} \]
      6. log-lowering-log.f64N/A

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(\mathsf{fma}\left(y.im, \log x.re, \mathsf{fma}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}, \frac{\left(\frac{1}{2} \cdot \left(x.im \cdot x.im\right)\right) \cdot y.im}{\color{blue}{x.re \cdot x.re}}\right)\right)\right) \]
      18. *-lowering-*.f6451.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 \sin \left(\mathsf{fma}\left(y.im, \log x.re, \mathsf{fma}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}, \frac{\left(0.5 \cdot \left(x.im \cdot x.im\right)\right) \cdot y.im}{\color{blue}{x.re \cdot x.re}}\right)\right)\right) \]
    5. Simplified51.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 \sin \color{blue}{\left(\mathsf{fma}\left(y.im, \log x.re, \mathsf{fma}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}, \frac{\left(0.5 \cdot \left(x.im \cdot x.im\right)\right) \cdot y.im}{x.re \cdot x.re}\right)\right)\right)} \]
    6. Taylor expanded in y.im around 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 60.3% accurate, 1.5× speedup?

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

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

\mathbf{elif}\;y.re \leq 1.28 \cdot 10^{-14}:\\
\;\;\;\;\frac{t\_3}{e^{t\_1}}\\

\mathbf{elif}\;y.re \leq 2 \cdot 10^{+206}:\\
\;\;\;\;\frac{\sin t\_2}{t\_0}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y.re < -9.99999999999999955e-7

    1. Initial program 43.5%

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

      \[\leadsto e^{\log \left(\sqrt{x.re \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. *-lowering-*.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.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
      2. atan2-lowering-atan2.f6478.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(y.re \cdot \color{blue}{\tan^{-1}_* \frac{x.im}{x.re}}\right) \]
    5. Simplified78.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)} \]
    6. 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(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
    7. Step-by-step derivation
      1. *-lowering-*.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}{\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
      2. atan2-lowering-atan2.f6475.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) \]
    8. Simplified75.9%

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

    if -9.99999999999999955e-7 < y.re < 1.28e-14

    1. Initial program 44.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 e^{\log \left(\sqrt{x.re \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. *-lowering-*.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.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
      2. atan2-lowering-atan2.f6435.5

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

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

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

        \[\leadsto \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}}}} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
      4. div-expN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\mathsf{neg}\left(\sin \left(\mathsf{fma}\left(\tan^{-1}_* \frac{x.im}{x.re}, y.re, 0\right)\right)\right)}{0 - e^{\color{blue}{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}} \]
      4. atan2-lowering-atan2.f6457.9

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

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

    if 1.28e-14 < y.re < 2.0000000000000001e206

    1. Initial program 43.4%

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

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

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

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

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

        \[\leadsto \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}}}} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
      4. div-expN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.0000000000000001e206 < y.re

    1. Initial program 30.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. *-lowering-*.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.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
      2. atan2-lowering-atan2.f6438.5

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

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

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

        \[\leadsto \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}}}} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
      4. div-expN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 59.7% accurate, 1.5× speedup?

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

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

\mathbf{elif}\;y.re \leq 1.28 \cdot 10^{-14}:\\
\;\;\;\;\frac{t\_0}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y.re < -1.1e-5 or 5.2000000000000001e209 < y.re

    1. Initial program 39.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. *-lowering-*.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.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
      2. atan2-lowering-atan2.f6466.4

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

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

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

        \[\leadsto \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}}}} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
      4. div-expN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.1e-5 < y.re < 1.28e-14

    1. Initial program 44.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 e^{\log \left(\sqrt{x.re \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. *-lowering-*.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.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
      2. atan2-lowering-atan2.f6435.5

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

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

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

        \[\leadsto \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}}}} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
      4. div-expN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\mathsf{neg}\left(\sin \left(\mathsf{fma}\left(\tan^{-1}_* \frac{x.im}{x.re}, y.re, 0\right)\right)\right)}{0 - e^{\color{blue}{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}} \]
      4. atan2-lowering-atan2.f6457.9

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

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

    if 1.28e-14 < y.re < 5.2000000000000001e209

    1. Initial program 43.4%

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

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

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

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

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

        \[\leadsto \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}}}} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
      4. div-expN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 59.7% accurate, 1.5× speedup?

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

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

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

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


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

    1. Initial program 43.5%

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

      \[\leadsto e^{\log \left(\sqrt{x.re \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. *-lowering-*.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.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
      2. atan2-lowering-atan2.f6478.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(y.re \cdot \color{blue}{\tan^{-1}_* \frac{x.im}{x.re}}\right) \]
    5. Simplified78.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)} \]
    6. 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 \tan^{-1}_* \frac{x.im}{x.re}\right) \]
    7. Step-by-step derivation
      1. pow-lowering-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) \]
      2. sqrt-lowering-sqrt.f64N/A

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

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

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

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

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

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

    if -9.5000000000000005e-6 < y.re < 1.28e-14

    1. Initial program 44.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 e^{\log \left(\sqrt{x.re \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. *-lowering-*.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.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
      2. atan2-lowering-atan2.f6435.5

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

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

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

        \[\leadsto \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}}}} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
      4. div-expN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\mathsf{neg}\left(\sin \left(\mathsf{fma}\left(\tan^{-1}_* \frac{x.im}{x.re}, y.re, 0\right)\right)\right)}{0 - e^{\color{blue}{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}} \]
      4. atan2-lowering-atan2.f6457.9

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

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

    if 1.28e-14 < y.re

    1. Initial program 38.9%

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

      \[\leadsto e^{\log \left(\sqrt{x.re \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. *-lowering-*.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.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
      2. atan2-lowering-atan2.f6463.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(y.re \cdot \color{blue}{\tan^{-1}_* \frac{x.im}{x.re}}\right) \]
    5. Simplified63.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(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
    6. Step-by-step derivation
      1. exp-diffN/A

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

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

        \[\leadsto \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}}}} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
      4. div-expN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 59.7% accurate, 1.6× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y.re < -1.1e-5 or 1.28e-14 < y.re

    1. Initial program 41.0%

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

      \[\leadsto e^{\log \left(\sqrt{x.re \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. *-lowering-*.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.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
      2. atan2-lowering-atan2.f6470.5

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

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

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

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

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

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

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

    if -1.1e-5 < y.re < 1.28e-14

    1. Initial program 44.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 e^{\log \left(\sqrt{x.re \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. *-lowering-*.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.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
      2. atan2-lowering-atan2.f6435.5

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

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

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

        \[\leadsto \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}}}} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
      4. div-expN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\mathsf{neg}\left(\sin \left(\mathsf{fma}\left(\tan^{-1}_* \frac{x.im}{x.re}, y.re, 0\right)\right)\right)}{0 - e^{\color{blue}{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}} \]
      4. atan2-lowering-atan2.f6457.9

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

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

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

Alternative 9: 59.7% accurate, 1.6× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y.re < -1.1e-5 or 1.28e-14 < y.re

    1. Initial program 41.0%

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

      \[\leadsto e^{\log \left(\sqrt{x.re \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. *-lowering-*.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.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
      2. atan2-lowering-atan2.f6470.5

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

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

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

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

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

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

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

    if -1.1e-5 < y.re < 1.28e-14

    1. Initial program 44.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 e^{\log \left(\sqrt{x.re \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. *-lowering-*.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.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
      2. atan2-lowering-atan2.f6435.5

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

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

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

        \[\leadsto \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}}}} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
      4. div-expN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto e^{y.im \cdot \color{blue}{\left(\mathsf{neg}\left(\tan^{-1}_* \frac{x.im}{x.re}\right)\right)}} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
      8. atan2-lowering-atan2.f6449.6

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

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

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

Alternative 10: 59.9% accurate, 2.0× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y.re < -1.65000000000000008e-6 or 1.28e-14 < y.re

    1. Initial program 41.0%

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

      \[\leadsto e^{\log \left(\sqrt{x.re \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. *-lowering-*.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.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
      2. atan2-lowering-atan2.f6470.5

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

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

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

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

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

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

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

    if -1.65000000000000008e-6 < y.re < 1.28e-14

    1. Initial program 44.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 e^{\log \left(\sqrt{x.re \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. *-lowering-*.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.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
      2. atan2-lowering-atan2.f6435.5

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

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

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

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

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

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

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

        \[\leadsto y.re \cdot \left(e^{0 - \color{blue}{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}} \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
      7. atan2-lowering-atan2.f64N/A

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

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

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

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

Alternative 11: 42.6% accurate, 2.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y.re \leq -3 \cdot 10^{+148}:\\ \;\;\;\;{\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{y.re} \cdot \sin \left(\frac{0.5 \cdot \left(y.im \cdot \left(x.im \cdot x.im\right)\right)}{x.re \cdot x.re}\right)\\ \mathbf{elif}\;y.re \leq 3.7 \cdot 10^{+173}:\\ \;\;\;\;y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(0 - y.im\right)}\right)\\ \mathbf{else}:\\ \;\;\;\;y.re \cdot \mathsf{fma}\left(-0.16666666666666666 \cdot \left(y.re \cdot y.re\right), {\tan^{-1}_* \frac{x.im}{x.re}}^{3}, \tan^{-1}_* \frac{x.im}{x.re}\right)\\ \end{array} \end{array} \]
(FPCore (x.re x.im y.re y.im)
 :precision binary64
 (if (<= y.re -3e+148)
   (*
    (pow (sqrt (fma x.im x.im (* x.re x.re))) y.re)
    (sin (/ (* 0.5 (* y.im (* x.im x.im))) (* x.re x.re))))
   (if (<= y.re 3.7e+173)
     (* y.re (* (atan2 x.im x.re) (exp (* (atan2 x.im x.re) (- 0.0 y.im)))))
     (*
      y.re
      (fma
       (* -0.16666666666666666 (* y.re y.re))
       (pow (atan2 x.im x.re) 3.0)
       (atan2 x.im x.re))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
	double tmp;
	if (y_46_re <= -3e+148) {
		tmp = pow(sqrt(fma(x_46_im, x_46_im, (x_46_re * x_46_re))), y_46_re) * sin(((0.5 * (y_46_im * (x_46_im * x_46_im))) / (x_46_re * x_46_re)));
	} else if (y_46_re <= 3.7e+173) {
		tmp = y_46_re * (atan2(x_46_im, x_46_re) * exp((atan2(x_46_im, x_46_re) * (0.0 - y_46_im))));
	} else {
		tmp = y_46_re * fma((-0.16666666666666666 * (y_46_re * y_46_re)), pow(atan2(x_46_im, x_46_re), 3.0), atan2(x_46_im, x_46_re));
	}
	return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im)
	tmp = 0.0
	if (y_46_re <= -3e+148)
		tmp = Float64((sqrt(fma(x_46_im, x_46_im, Float64(x_46_re * x_46_re))) ^ y_46_re) * sin(Float64(Float64(0.5 * Float64(y_46_im * Float64(x_46_im * x_46_im))) / Float64(x_46_re * x_46_re))));
	elseif (y_46_re <= 3.7e+173)
		tmp = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * exp(Float64(atan(x_46_im, x_46_re) * Float64(0.0 - y_46_im)))));
	else
		tmp = Float64(y_46_re * fma(Float64(-0.16666666666666666 * Float64(y_46_re * y_46_re)), (atan(x_46_im, x_46_re) ^ 3.0), atan(x_46_im, x_46_re)));
	end
	return tmp
end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[y$46$re, -3e+148], N[(N[Power[N[Sqrt[N[(x$46$im * x$46$im + N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], y$46$re], $MachinePrecision] * N[Sin[N[(N[(0.5 * N[(y$46$im * N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 3.7e+173], N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[(0.0 - y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y$46$re * N[(N[(-0.16666666666666666 * N[(y$46$re * y$46$re), $MachinePrecision]), $MachinePrecision] * N[Power[N[ArcTan[x$46$im / x$46$re], $MachinePrecision], 3.0], $MachinePrecision] + N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y.re \leq -3 \cdot 10^{+148}:\\
\;\;\;\;{\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{y.re} \cdot \sin \left(\frac{0.5 \cdot \left(y.im \cdot \left(x.im \cdot x.im\right)\right)}{x.re \cdot x.re}\right)\\

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

\mathbf{else}:\\
\;\;\;\;y.re \cdot \mathsf{fma}\left(-0.16666666666666666 \cdot \left(y.re \cdot y.re\right), {\tan^{-1}_* \frac{x.im}{x.re}}^{3}, \tan^{-1}_* \frac{x.im}{x.re}\right)\\


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

    1. Initial program 42.3%

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

        \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(\color{blue}{\left(\mathsf{neg}\left(y.im \cdot \log \left(\frac{1}{x.re}\right)\right)\right)} + \left(\frac{1}{2} \cdot \frac{{x.im}^{2} \cdot y.im}{{x.re}^{2}} + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
      2. distribute-rgt-neg-inN/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.im \cdot \left(\mathsf{neg}\left(\log \left(\frac{1}{x.re}\right)\right)\right)} + \left(\frac{1}{2} \cdot \frac{{x.im}^{2} \cdot y.im}{{x.re}^{2}} + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
      3. log-recN/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(y.im \cdot \left(\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(\log x.re\right)\right)}\right)\right) + \left(\frac{1}{2} \cdot \frac{{x.im}^{2} \cdot y.im}{{x.re}^{2}} + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
      4. remove-double-negN/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(y.im \cdot \color{blue}{\log x.re} + \left(\frac{1}{2} \cdot \frac{{x.im}^{2} \cdot y.im}{{x.re}^{2}} + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
      5. accelerator-lowering-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(y.im, \log x.re, \frac{1}{2} \cdot \frac{{x.im}^{2} \cdot y.im}{{x.re}^{2}} + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)} \]
      6. log-lowering-log.f64N/A

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

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

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

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

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

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

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

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

        \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(\mathsf{fma}\left(y.im, \log x.re, \mathsf{fma}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}, \frac{\color{blue}{\left(\frac{1}{2} \cdot {x.im}^{2}\right)} \cdot y.im}{{x.re}^{2}}\right)\right)\right) \]
      15. unpow2N/A

        \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(\mathsf{fma}\left(y.im, \log x.re, \mathsf{fma}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}, \frac{\left(\frac{1}{2} \cdot \color{blue}{\left(x.im \cdot x.im\right)}\right) \cdot y.im}{{x.re}^{2}}\right)\right)\right) \]
      16. *-lowering-*.f64N/A

        \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(\mathsf{fma}\left(y.im, \log x.re, \mathsf{fma}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}, \frac{\left(\frac{1}{2} \cdot \color{blue}{\left(x.im \cdot x.im\right)}\right) \cdot y.im}{{x.re}^{2}}\right)\right)\right) \]
      17. unpow2N/A

        \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(\mathsf{fma}\left(y.im, \log x.re, \mathsf{fma}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}, \frac{\left(\frac{1}{2} \cdot \left(x.im \cdot x.im\right)\right) \cdot y.im}{\color{blue}{x.re \cdot x.re}}\right)\right)\right) \]
      18. *-lowering-*.f6430.8

        \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(\mathsf{fma}\left(y.im, \log x.re, \mathsf{fma}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}, \frac{\left(0.5 \cdot \left(x.im \cdot x.im\right)\right) \cdot y.im}{\color{blue}{x.re \cdot x.re}}\right)\right)\right) \]
    5. Simplified30.8%

      \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \color{blue}{\left(\mathsf{fma}\left(y.im, \log x.re, \mathsf{fma}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}, \frac{\left(0.5 \cdot \left(x.im \cdot x.im\right)\right) \cdot y.im}{x.re \cdot x.re}\right)\right)\right)} \]
    6. Taylor expanded in y.im around 0

      \[\leadsto \color{blue}{{\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}} \cdot \sin \left(\mathsf{fma}\left(y.im, \log x.re, \mathsf{fma}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}, \frac{\left(\frac{1}{2} \cdot \left(x.im \cdot x.im\right)\right) \cdot y.im}{x.re \cdot x.re}\right)\right)\right) \]
    7. Step-by-step derivation
      1. pow-lowering-pow.f64N/A

        \[\leadsto \color{blue}{{\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}} \cdot \sin \left(\mathsf{fma}\left(y.im, \log x.re, \mathsf{fma}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}, \frac{\left(\frac{1}{2} \cdot \left(x.im \cdot x.im\right)\right) \cdot y.im}{x.re \cdot x.re}\right)\right)\right) \]
      2. sqrt-lowering-sqrt.f64N/A

        \[\leadsto {\color{blue}{\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}}^{y.re} \cdot \sin \left(\mathsf{fma}\left(y.im, \log x.re, \mathsf{fma}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}, \frac{\left(\frac{1}{2} \cdot \left(x.im \cdot x.im\right)\right) \cdot y.im}{x.re \cdot x.re}\right)\right)\right) \]
      3. unpow2N/A

        \[\leadsto {\left(\sqrt{\color{blue}{x.im \cdot x.im} + {x.re}^{2}}\right)}^{y.re} \cdot \sin \left(\mathsf{fma}\left(y.im, \log x.re, \mathsf{fma}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}, \frac{\left(\frac{1}{2} \cdot \left(x.im \cdot x.im\right)\right) \cdot y.im}{x.re \cdot x.re}\right)\right)\right) \]
      4. accelerator-lowering-fma.f64N/A

        \[\leadsto {\left(\sqrt{\color{blue}{\mathsf{fma}\left(x.im, x.im, {x.re}^{2}\right)}}\right)}^{y.re} \cdot \sin \left(\mathsf{fma}\left(y.im, \log x.re, \mathsf{fma}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}, \frac{\left(\frac{1}{2} \cdot \left(x.im \cdot x.im\right)\right) \cdot y.im}{x.re \cdot x.re}\right)\right)\right) \]
      5. unpow2N/A

        \[\leadsto {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, \color{blue}{x.re \cdot x.re}\right)}\right)}^{y.re} \cdot \sin \left(\mathsf{fma}\left(y.im, \log x.re, \mathsf{fma}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}, \frac{\left(\frac{1}{2} \cdot \left(x.im \cdot x.im\right)\right) \cdot y.im}{x.re \cdot x.re}\right)\right)\right) \]
      6. *-lowering-*.f6430.8

        \[\leadsto {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, \color{blue}{x.re \cdot x.re}\right)}\right)}^{y.re} \cdot \sin \left(\mathsf{fma}\left(y.im, \log x.re, \mathsf{fma}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}, \frac{\left(0.5 \cdot \left(x.im \cdot x.im\right)\right) \cdot y.im}{x.re \cdot x.re}\right)\right)\right) \]
    8. Simplified30.8%

      \[\leadsto \color{blue}{{\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{y.re}} \cdot \sin \left(\mathsf{fma}\left(y.im, \log x.re, \mathsf{fma}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}, \frac{\left(0.5 \cdot \left(x.im \cdot x.im\right)\right) \cdot y.im}{x.re \cdot x.re}\right)\right)\right) \]
    9. Taylor expanded in x.re around 0

      \[\leadsto {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{y.re} \cdot \sin \color{blue}{\left(\frac{1}{2} \cdot \frac{{x.im}^{2} \cdot y.im}{{x.re}^{2}}\right)} \]
    10. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{y.re} \cdot \sin \color{blue}{\left(\frac{\frac{1}{2} \cdot \left({x.im}^{2} \cdot y.im\right)}{{x.re}^{2}}\right)} \]
      2. /-lowering-/.f64N/A

        \[\leadsto {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{y.re} \cdot \sin \color{blue}{\left(\frac{\frac{1}{2} \cdot \left({x.im}^{2} \cdot y.im\right)}{{x.re}^{2}}\right)} \]
      3. *-lowering-*.f64N/A

        \[\leadsto {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{y.re} \cdot \sin \left(\frac{\color{blue}{\frac{1}{2} \cdot \left({x.im}^{2} \cdot y.im\right)}}{{x.re}^{2}}\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{y.re} \cdot \sin \left(\frac{\frac{1}{2} \cdot \color{blue}{\left({x.im}^{2} \cdot y.im\right)}}{{x.re}^{2}}\right) \]
      5. unpow2N/A

        \[\leadsto {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{y.re} \cdot \sin \left(\frac{\frac{1}{2} \cdot \left(\color{blue}{\left(x.im \cdot x.im\right)} \cdot y.im\right)}{{x.re}^{2}}\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{y.re} \cdot \sin \left(\frac{\frac{1}{2} \cdot \left(\color{blue}{\left(x.im \cdot x.im\right)} \cdot y.im\right)}{{x.re}^{2}}\right) \]
      7. unpow2N/A

        \[\leadsto {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{y.re} \cdot \sin \left(\frac{\frac{1}{2} \cdot \left(\left(x.im \cdot x.im\right) \cdot y.im\right)}{\color{blue}{x.re \cdot x.re}}\right) \]
      8. *-lowering-*.f6446.2

        \[\leadsto {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{y.re} \cdot \sin \left(\frac{0.5 \cdot \left(\left(x.im \cdot x.im\right) \cdot y.im\right)}{\color{blue}{x.re \cdot x.re}}\right) \]
    11. Simplified46.2%

      \[\leadsto {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{y.re} \cdot \sin \color{blue}{\left(\frac{0.5 \cdot \left(\left(x.im \cdot x.im\right) \cdot y.im\right)}{x.re \cdot x.re}\right)} \]

    if -3.00000000000000015e148 < y.re < 3.69999999999999986e173

    1. Initial program 44.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 e^{\log \left(\sqrt{x.re \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. *-lowering-*.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.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
      2. atan2-lowering-atan2.f6450.3

        \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(y.re \cdot \color{blue}{\tan^{-1}_* \frac{x.im}{x.re}}\right) \]
    5. Simplified50.3%

      \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \color{blue}{\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
    6. Taylor expanded in y.re around 0

      \[\leadsto \color{blue}{y.re \cdot \left(e^{\mathsf{neg}\left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
    7. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \color{blue}{y.re \cdot \left(e^{\mathsf{neg}\left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
      2. *-lowering-*.f64N/A

        \[\leadsto y.re \cdot \color{blue}{\left(e^{\mathsf{neg}\left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
      3. exp-lowering-exp.f64N/A

        \[\leadsto y.re \cdot \left(\color{blue}{e^{\mathsf{neg}\left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}} \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
      4. neg-sub0N/A

        \[\leadsto y.re \cdot \left(e^{\color{blue}{0 - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}} \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
      5. --lowering--.f64N/A

        \[\leadsto y.re \cdot \left(e^{\color{blue}{0 - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}} \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto y.re \cdot \left(e^{0 - \color{blue}{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}} \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
      7. atan2-lowering-atan2.f64N/A

        \[\leadsto y.re \cdot \left(e^{0 - y.im \cdot \color{blue}{\tan^{-1}_* \frac{x.im}{x.re}}} \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
      8. atan2-lowering-atan2.f6441.9

        \[\leadsto y.re \cdot \left(e^{0 - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \color{blue}{\tan^{-1}_* \frac{x.im}{x.re}}\right) \]
    8. Simplified41.9%

      \[\leadsto \color{blue}{y.re \cdot \left(e^{0 - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]

    if 3.69999999999999986e173 < y.re

    1. Initial program 35.1%

      \[e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \]
    2. Add Preprocessing
    3. Taylor expanded in y.re around 0

      \[\leadsto e^{\color{blue}{-1 \cdot \left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.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. mul-1-negN/A

        \[\leadsto e^{\color{blue}{\mathsf{neg}\left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.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) \]
      2. neg-sub0N/A

        \[\leadsto e^{\color{blue}{0 - y.im \cdot \tan^{-1}_* \frac{x.im}{x.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) \]
      3. --lowering--.f64N/A

        \[\leadsto e^{\color{blue}{0 - y.im \cdot \tan^{-1}_* \frac{x.im}{x.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) \]
      4. *-lowering-*.f64N/A

        \[\leadsto e^{0 - \color{blue}{y.im \cdot \tan^{-1}_* \frac{x.im}{x.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. atan2-lowering-atan2.f6411.7

        \[\leadsto e^{0 - y.im \cdot \color{blue}{\tan^{-1}_* \frac{x.im}{x.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. Simplified11.7%

      \[\leadsto e^{\color{blue}{0 - y.im \cdot \tan^{-1}_* \frac{x.im}{x.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 \color{blue}{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
    7. Step-by-step derivation
      1. sin-lowering-sin.f64N/A

        \[\leadsto \color{blue}{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
      2. *-lowering-*.f64N/A

        \[\leadsto \sin \color{blue}{\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
      3. atan2-lowering-atan2.f642.0

        \[\leadsto \sin \left(y.re \cdot \color{blue}{\tan^{-1}_* \frac{x.im}{x.re}}\right) \]
    8. Simplified2.0%

      \[\leadsto \color{blue}{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
    9. Taylor expanded in y.re around 0

      \[\leadsto \color{blue}{y.re \cdot \left(\frac{-1}{6} \cdot \left({y.re}^{2} \cdot {\tan^{-1}_* \frac{x.im}{x.re}}^{3}\right) + \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
    10. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \color{blue}{y.re \cdot \left(\frac{-1}{6} \cdot \left({y.re}^{2} \cdot {\tan^{-1}_* \frac{x.im}{x.re}}^{3}\right) + \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
      2. associate-*r*N/A

        \[\leadsto y.re \cdot \left(\color{blue}{\left(\frac{-1}{6} \cdot {y.re}^{2}\right) \cdot {\tan^{-1}_* \frac{x.im}{x.re}}^{3}} + \tan^{-1}_* \frac{x.im}{x.re}\right) \]
      3. accelerator-lowering-fma.f64N/A

        \[\leadsto y.re \cdot \color{blue}{\mathsf{fma}\left(\frac{-1}{6} \cdot {y.re}^{2}, {\tan^{-1}_* \frac{x.im}{x.re}}^{3}, \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
      4. *-lowering-*.f64N/A

        \[\leadsto y.re \cdot \mathsf{fma}\left(\color{blue}{\frac{-1}{6} \cdot {y.re}^{2}}, {\tan^{-1}_* \frac{x.im}{x.re}}^{3}, \tan^{-1}_* \frac{x.im}{x.re}\right) \]
      5. unpow2N/A

        \[\leadsto y.re \cdot \mathsf{fma}\left(\frac{-1}{6} \cdot \color{blue}{\left(y.re \cdot y.re\right)}, {\tan^{-1}_* \frac{x.im}{x.re}}^{3}, \tan^{-1}_* \frac{x.im}{x.re}\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto y.re \cdot \mathsf{fma}\left(\frac{-1}{6} \cdot \color{blue}{\left(y.re \cdot y.re\right)}, {\tan^{-1}_* \frac{x.im}{x.re}}^{3}, \tan^{-1}_* \frac{x.im}{x.re}\right) \]
      7. pow-lowering-pow.f64N/A

        \[\leadsto y.re \cdot \mathsf{fma}\left(\frac{-1}{6} \cdot \left(y.re \cdot y.re\right), \color{blue}{{\tan^{-1}_* \frac{x.im}{x.re}}^{3}}, \tan^{-1}_* \frac{x.im}{x.re}\right) \]
      8. atan2-lowering-atan2.f64N/A

        \[\leadsto y.re \cdot \mathsf{fma}\left(\frac{-1}{6} \cdot \left(y.re \cdot y.re\right), {\color{blue}{\tan^{-1}_* \frac{x.im}{x.re}}}^{3}, \tan^{-1}_* \frac{x.im}{x.re}\right) \]
      9. atan2-lowering-atan2.f6438.1

        \[\leadsto y.re \cdot \mathsf{fma}\left(-0.16666666666666666 \cdot \left(y.re \cdot y.re\right), {\tan^{-1}_* \frac{x.im}{x.re}}^{3}, \color{blue}{\tan^{-1}_* \frac{x.im}{x.re}}\right) \]
    11. Simplified38.1%

      \[\leadsto \color{blue}{y.re \cdot \mathsf{fma}\left(-0.16666666666666666 \cdot \left(y.re \cdot y.re\right), {\tan^{-1}_* \frac{x.im}{x.re}}^{3}, \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification41.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y.re \leq -3 \cdot 10^{+148}:\\ \;\;\;\;{\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{y.re} \cdot \sin \left(\frac{0.5 \cdot \left(y.im \cdot \left(x.im \cdot x.im\right)\right)}{x.re \cdot x.re}\right)\\ \mathbf{elif}\;y.re \leq 3.7 \cdot 10^{+173}:\\ \;\;\;\;y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(0 - y.im\right)}\right)\\ \mathbf{else}:\\ \;\;\;\;y.re \cdot \mathsf{fma}\left(-0.16666666666666666 \cdot \left(y.re \cdot y.re\right), {\tan^{-1}_* \frac{x.im}{x.re}}^{3}, \tan^{-1}_* \frac{x.im}{x.re}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 40.6% accurate, 2.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{y.re} \cdot \sin \left(\frac{0.5 \cdot \left(y.im \cdot \left(x.im \cdot x.im\right)\right)}{x.re \cdot x.re}\right)\\ \mathbf{if}\;y.re \leq -2.95 \cdot 10^{+147}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;y.re \leq 8.8 \cdot 10^{+98}:\\ \;\;\;\;y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(0 - y.im\right)}\right)\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
(FPCore (x.re x.im y.re y.im)
 :precision binary64
 (let* ((t_0
         (*
          (pow (sqrt (fma x.im x.im (* x.re x.re))) y.re)
          (sin (/ (* 0.5 (* y.im (* x.im x.im))) (* x.re x.re))))))
   (if (<= y.re -2.95e+147)
     t_0
     (if (<= y.re 8.8e+98)
       (* y.re (* (atan2 x.im x.re) (exp (* (atan2 x.im x.re) (- 0.0 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 = pow(sqrt(fma(x_46_im, x_46_im, (x_46_re * x_46_re))), y_46_re) * sin(((0.5 * (y_46_im * (x_46_im * x_46_im))) / (x_46_re * x_46_re)));
	double tmp;
	if (y_46_re <= -2.95e+147) {
		tmp = t_0;
	} else if (y_46_re <= 8.8e+98) {
		tmp = y_46_re * (atan2(x_46_im, x_46_re) * exp((atan2(x_46_im, x_46_re) * (0.0 - y_46_im))));
	} else {
		tmp = t_0;
	}
	return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im)
	t_0 = Float64((sqrt(fma(x_46_im, x_46_im, Float64(x_46_re * x_46_re))) ^ y_46_re) * sin(Float64(Float64(0.5 * Float64(y_46_im * Float64(x_46_im * x_46_im))) / Float64(x_46_re * x_46_re))))
	tmp = 0.0
	if (y_46_re <= -2.95e+147)
		tmp = t_0;
	elseif (y_46_re <= 8.8e+98)
		tmp = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * exp(Float64(atan(x_46_im, x_46_re) * Float64(0.0 - y_46_im)))));
	else
		tmp = t_0;
	end
	return tmp
end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[Power[N[Sqrt[N[(x$46$im * x$46$im + N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], y$46$re], $MachinePrecision] * N[Sin[N[(N[(0.5 * N[(y$46$im * N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -2.95e+147], t$95$0, If[LessEqual[y$46$re, 8.8e+98], N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[(0.0 - y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{y.re} \cdot \sin \left(\frac{0.5 \cdot \left(y.im \cdot \left(x.im \cdot x.im\right)\right)}{x.re \cdot x.re}\right)\\
\mathbf{if}\;y.re \leq -2.95 \cdot 10^{+147}:\\
\;\;\;\;t\_0\\

\mathbf{elif}\;y.re \leq 8.8 \cdot 10^{+98}:\\
\;\;\;\;y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(0 - y.im\right)}\right)\\

\mathbf{else}:\\
\;\;\;\;t\_0\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y.re < -2.9500000000000001e147 or 8.80000000000000034e98 < y.re

    1. Initial program 39.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 x.re 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(-1 \cdot \left(y.im \cdot \log \left(\frac{1}{x.re}\right)\right) + \left(\frac{1}{2} \cdot \frac{{x.im}^{2} \cdot y.im}{{x.re}^{2}} + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)} \]
    4. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(\color{blue}{\left(\mathsf{neg}\left(y.im \cdot \log \left(\frac{1}{x.re}\right)\right)\right)} + \left(\frac{1}{2} \cdot \frac{{x.im}^{2} \cdot y.im}{{x.re}^{2}} + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
      2. distribute-rgt-neg-inN/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.im \cdot \left(\mathsf{neg}\left(\log \left(\frac{1}{x.re}\right)\right)\right)} + \left(\frac{1}{2} \cdot \frac{{x.im}^{2} \cdot y.im}{{x.re}^{2}} + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
      3. log-recN/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(y.im \cdot \left(\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(\log x.re\right)\right)}\right)\right) + \left(\frac{1}{2} \cdot \frac{{x.im}^{2} \cdot y.im}{{x.re}^{2}} + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
      4. remove-double-negN/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(y.im \cdot \color{blue}{\log x.re} + \left(\frac{1}{2} \cdot \frac{{x.im}^{2} \cdot y.im}{{x.re}^{2}} + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
      5. accelerator-lowering-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(y.im, \log x.re, \frac{1}{2} \cdot \frac{{x.im}^{2} \cdot y.im}{{x.re}^{2}} + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)} \]
      6. log-lowering-log.f64N/A

        \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(\mathsf{fma}\left(y.im, \color{blue}{\log x.re}, \frac{1}{2} \cdot \frac{{x.im}^{2} \cdot y.im}{{x.re}^{2}} + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
      7. +-commutativeN/A

        \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(\mathsf{fma}\left(y.im, \log x.re, \color{blue}{y.re \cdot \tan^{-1}_* \frac{x.im}{x.re} + \frac{1}{2} \cdot \frac{{x.im}^{2} \cdot y.im}{{x.re}^{2}}}\right)\right) \]
      8. accelerator-lowering-fma.f64N/A

        \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(\mathsf{fma}\left(y.im, \log x.re, \color{blue}{\mathsf{fma}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}, \frac{1}{2} \cdot \frac{{x.im}^{2} \cdot y.im}{{x.re}^{2}}\right)}\right)\right) \]
      9. atan2-lowering-atan2.f64N/A

        \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(\mathsf{fma}\left(y.im, \log x.re, \mathsf{fma}\left(y.re, \color{blue}{\tan^{-1}_* \frac{x.im}{x.re}}, \frac{1}{2} \cdot \frac{{x.im}^{2} \cdot y.im}{{x.re}^{2}}\right)\right)\right) \]
      10. associate-*r/N/A

        \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(\mathsf{fma}\left(y.im, \log x.re, \mathsf{fma}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}, \color{blue}{\frac{\frac{1}{2} \cdot \left({x.im}^{2} \cdot y.im\right)}{{x.re}^{2}}}\right)\right)\right) \]
      11. /-lowering-/.f64N/A

        \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(\mathsf{fma}\left(y.im, \log x.re, \mathsf{fma}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}, \color{blue}{\frac{\frac{1}{2} \cdot \left({x.im}^{2} \cdot y.im\right)}{{x.re}^{2}}}\right)\right)\right) \]
      12. associate-*r*N/A

        \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(\mathsf{fma}\left(y.im, \log x.re, \mathsf{fma}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}, \frac{\color{blue}{\left(\frac{1}{2} \cdot {x.im}^{2}\right) \cdot y.im}}{{x.re}^{2}}\right)\right)\right) \]
      13. *-lowering-*.f64N/A

        \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(\mathsf{fma}\left(y.im, \log x.re, \mathsf{fma}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}, \frac{\color{blue}{\left(\frac{1}{2} \cdot {x.im}^{2}\right) \cdot y.im}}{{x.re}^{2}}\right)\right)\right) \]
      14. *-lowering-*.f64N/A

        \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(\mathsf{fma}\left(y.im, \log x.re, \mathsf{fma}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}, \frac{\color{blue}{\left(\frac{1}{2} \cdot {x.im}^{2}\right)} \cdot y.im}{{x.re}^{2}}\right)\right)\right) \]
      15. unpow2N/A

        \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(\mathsf{fma}\left(y.im, \log x.re, \mathsf{fma}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}, \frac{\left(\frac{1}{2} \cdot \color{blue}{\left(x.im \cdot x.im\right)}\right) \cdot y.im}{{x.re}^{2}}\right)\right)\right) \]
      16. *-lowering-*.f64N/A

        \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(\mathsf{fma}\left(y.im, \log x.re, \mathsf{fma}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}, \frac{\left(\frac{1}{2} \cdot \color{blue}{\left(x.im \cdot x.im\right)}\right) \cdot y.im}{{x.re}^{2}}\right)\right)\right) \]
      17. unpow2N/A

        \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(\mathsf{fma}\left(y.im, \log x.re, \mathsf{fma}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}, \frac{\left(\frac{1}{2} \cdot \left(x.im \cdot x.im\right)\right) \cdot y.im}{\color{blue}{x.re \cdot x.re}}\right)\right)\right) \]
      18. *-lowering-*.f6422.8

        \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(\mathsf{fma}\left(y.im, \log x.re, \mathsf{fma}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}, \frac{\left(0.5 \cdot \left(x.im \cdot x.im\right)\right) \cdot y.im}{\color{blue}{x.re \cdot x.re}}\right)\right)\right) \]
    5. Simplified22.8%

      \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \color{blue}{\left(\mathsf{fma}\left(y.im, \log x.re, \mathsf{fma}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}, \frac{\left(0.5 \cdot \left(x.im \cdot x.im\right)\right) \cdot y.im}{x.re \cdot x.re}\right)\right)\right)} \]
    6. Taylor expanded in y.im around 0

      \[\leadsto \color{blue}{{\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}} \cdot \sin \left(\mathsf{fma}\left(y.im, \log x.re, \mathsf{fma}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}, \frac{\left(\frac{1}{2} \cdot \left(x.im \cdot x.im\right)\right) \cdot y.im}{x.re \cdot x.re}\right)\right)\right) \]
    7. Step-by-step derivation
      1. pow-lowering-pow.f64N/A

        \[\leadsto \color{blue}{{\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}} \cdot \sin \left(\mathsf{fma}\left(y.im, \log x.re, \mathsf{fma}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}, \frac{\left(\frac{1}{2} \cdot \left(x.im \cdot x.im\right)\right) \cdot y.im}{x.re \cdot x.re}\right)\right)\right) \]
      2. sqrt-lowering-sqrt.f64N/A

        \[\leadsto {\color{blue}{\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}}^{y.re} \cdot \sin \left(\mathsf{fma}\left(y.im, \log x.re, \mathsf{fma}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}, \frac{\left(\frac{1}{2} \cdot \left(x.im \cdot x.im\right)\right) \cdot y.im}{x.re \cdot x.re}\right)\right)\right) \]
      3. unpow2N/A

        \[\leadsto {\left(\sqrt{\color{blue}{x.im \cdot x.im} + {x.re}^{2}}\right)}^{y.re} \cdot \sin \left(\mathsf{fma}\left(y.im, \log x.re, \mathsf{fma}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}, \frac{\left(\frac{1}{2} \cdot \left(x.im \cdot x.im\right)\right) \cdot y.im}{x.re \cdot x.re}\right)\right)\right) \]
      4. accelerator-lowering-fma.f64N/A

        \[\leadsto {\left(\sqrt{\color{blue}{\mathsf{fma}\left(x.im, x.im, {x.re}^{2}\right)}}\right)}^{y.re} \cdot \sin \left(\mathsf{fma}\left(y.im, \log x.re, \mathsf{fma}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}, \frac{\left(\frac{1}{2} \cdot \left(x.im \cdot x.im\right)\right) \cdot y.im}{x.re \cdot x.re}\right)\right)\right) \]
      5. unpow2N/A

        \[\leadsto {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, \color{blue}{x.re \cdot x.re}\right)}\right)}^{y.re} \cdot \sin \left(\mathsf{fma}\left(y.im, \log x.re, \mathsf{fma}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}, \frac{\left(\frac{1}{2} \cdot \left(x.im \cdot x.im\right)\right) \cdot y.im}{x.re \cdot x.re}\right)\right)\right) \]
      6. *-lowering-*.f6422.8

        \[\leadsto {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, \color{blue}{x.re \cdot x.re}\right)}\right)}^{y.re} \cdot \sin \left(\mathsf{fma}\left(y.im, \log x.re, \mathsf{fma}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}, \frac{\left(0.5 \cdot \left(x.im \cdot x.im\right)\right) \cdot y.im}{x.re \cdot x.re}\right)\right)\right) \]
    8. Simplified22.8%

      \[\leadsto \color{blue}{{\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{y.re}} \cdot \sin \left(\mathsf{fma}\left(y.im, \log x.re, \mathsf{fma}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}, \frac{\left(0.5 \cdot \left(x.im \cdot x.im\right)\right) \cdot y.im}{x.re \cdot x.re}\right)\right)\right) \]
    9. Taylor expanded in x.re around 0

      \[\leadsto {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{y.re} \cdot \sin \color{blue}{\left(\frac{1}{2} \cdot \frac{{x.im}^{2} \cdot y.im}{{x.re}^{2}}\right)} \]
    10. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{y.re} \cdot \sin \color{blue}{\left(\frac{\frac{1}{2} \cdot \left({x.im}^{2} \cdot y.im\right)}{{x.re}^{2}}\right)} \]
      2. /-lowering-/.f64N/A

        \[\leadsto {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{y.re} \cdot \sin \color{blue}{\left(\frac{\frac{1}{2} \cdot \left({x.im}^{2} \cdot y.im\right)}{{x.re}^{2}}\right)} \]
      3. *-lowering-*.f64N/A

        \[\leadsto {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{y.re} \cdot \sin \left(\frac{\color{blue}{\frac{1}{2} \cdot \left({x.im}^{2} \cdot y.im\right)}}{{x.re}^{2}}\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{y.re} \cdot \sin \left(\frac{\frac{1}{2} \cdot \color{blue}{\left({x.im}^{2} \cdot y.im\right)}}{{x.re}^{2}}\right) \]
      5. unpow2N/A

        \[\leadsto {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{y.re} \cdot \sin \left(\frac{\frac{1}{2} \cdot \left(\color{blue}{\left(x.im \cdot x.im\right)} \cdot y.im\right)}{{x.re}^{2}}\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{y.re} \cdot \sin \left(\frac{\frac{1}{2} \cdot \left(\color{blue}{\left(x.im \cdot x.im\right)} \cdot y.im\right)}{{x.re}^{2}}\right) \]
      7. unpow2N/A

        \[\leadsto {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{y.re} \cdot \sin \left(\frac{\frac{1}{2} \cdot \left(\left(x.im \cdot x.im\right) \cdot y.im\right)}{\color{blue}{x.re \cdot x.re}}\right) \]
      8. *-lowering-*.f6436.7

        \[\leadsto {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{y.re} \cdot \sin \left(\frac{0.5 \cdot \left(\left(x.im \cdot x.im\right) \cdot y.im\right)}{\color{blue}{x.re \cdot x.re}}\right) \]
    11. Simplified36.7%

      \[\leadsto {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{y.re} \cdot \sin \color{blue}{\left(\frac{0.5 \cdot \left(\left(x.im \cdot x.im\right) \cdot y.im\right)}{x.re \cdot x.re}\right)} \]

    if -2.9500000000000001e147 < y.re < 8.80000000000000034e98

    1. Initial program 44.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 e^{\log \left(\sqrt{x.re \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. *-lowering-*.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.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
      2. atan2-lowering-atan2.f6447.5

        \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(y.re \cdot \color{blue}{\tan^{-1}_* \frac{x.im}{x.re}}\right) \]
    5. Simplified47.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(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
    6. Taylor expanded in y.re around 0

      \[\leadsto \color{blue}{y.re \cdot \left(e^{\mathsf{neg}\left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
    7. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \color{blue}{y.re \cdot \left(e^{\mathsf{neg}\left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
      2. *-lowering-*.f64N/A

        \[\leadsto y.re \cdot \color{blue}{\left(e^{\mathsf{neg}\left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
      3. exp-lowering-exp.f64N/A

        \[\leadsto y.re \cdot \left(\color{blue}{e^{\mathsf{neg}\left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}} \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
      4. neg-sub0N/A

        \[\leadsto y.re \cdot \left(e^{\color{blue}{0 - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}} \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
      5. --lowering--.f64N/A

        \[\leadsto y.re \cdot \left(e^{\color{blue}{0 - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}} \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto y.re \cdot \left(e^{0 - \color{blue}{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}} \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
      7. atan2-lowering-atan2.f64N/A

        \[\leadsto y.re \cdot \left(e^{0 - y.im \cdot \color{blue}{\tan^{-1}_* \frac{x.im}{x.re}}} \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
      8. atan2-lowering-atan2.f6443.3

        \[\leadsto y.re \cdot \left(e^{0 - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \color{blue}{\tan^{-1}_* \frac{x.im}{x.re}}\right) \]
    8. Simplified43.3%

      \[\leadsto \color{blue}{y.re \cdot \left(e^{0 - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification41.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y.re \leq -2.95 \cdot 10^{+147}:\\ \;\;\;\;{\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{y.re} \cdot \sin \left(\frac{0.5 \cdot \left(y.im \cdot \left(x.im \cdot x.im\right)\right)}{x.re \cdot x.re}\right)\\ \mathbf{elif}\;y.re \leq 8.8 \cdot 10^{+98}:\\ \;\;\;\;y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(0 - y.im\right)}\right)\\ \mathbf{else}:\\ \;\;\;\;{\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{y.re} \cdot \sin \left(\frac{0.5 \cdot \left(y.im \cdot \left(x.im \cdot x.im\right)\right)}{x.re \cdot x.re}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 25.0% accurate, 2.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{y.re} \cdot \sin \left(\frac{0.5 \cdot \left(y.im \cdot \left(x.im \cdot x.im\right)\right)}{x.re \cdot x.re}\right)\\ \mathbf{if}\;y.re \leq -9.5 \cdot 10^{-14}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;y.re \leq 45000000000:\\ \;\;\;\;y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
(FPCore (x.re x.im y.re y.im)
 :precision binary64
 (let* ((t_0
         (*
          (pow (sqrt (fma x.im x.im (* x.re x.re))) y.re)
          (sin (/ (* 0.5 (* y.im (* x.im x.im))) (* x.re x.re))))))
   (if (<= y.re -9.5e-14)
     t_0
     (if (<= y.re 45000000000.0) (* y.re (atan2 x.im x.re)) t_0))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
	double t_0 = pow(sqrt(fma(x_46_im, x_46_im, (x_46_re * x_46_re))), y_46_re) * sin(((0.5 * (y_46_im * (x_46_im * x_46_im))) / (x_46_re * x_46_re)));
	double tmp;
	if (y_46_re <= -9.5e-14) {
		tmp = t_0;
	} else if (y_46_re <= 45000000000.0) {
		tmp = y_46_re * atan2(x_46_im, x_46_re);
	} else {
		tmp = t_0;
	}
	return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im)
	t_0 = Float64((sqrt(fma(x_46_im, x_46_im, Float64(x_46_re * x_46_re))) ^ y_46_re) * sin(Float64(Float64(0.5 * Float64(y_46_im * Float64(x_46_im * x_46_im))) / Float64(x_46_re * x_46_re))))
	tmp = 0.0
	if (y_46_re <= -9.5e-14)
		tmp = t_0;
	elseif (y_46_re <= 45000000000.0)
		tmp = Float64(y_46_re * atan(x_46_im, x_46_re));
	else
		tmp = t_0;
	end
	return tmp
end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[Power[N[Sqrt[N[(x$46$im * x$46$im + N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], y$46$re], $MachinePrecision] * N[Sin[N[(N[(0.5 * N[(y$46$im * N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -9.5e-14], t$95$0, If[LessEqual[y$46$re, 45000000000.0], N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{y.re} \cdot \sin \left(\frac{0.5 \cdot \left(y.im \cdot \left(x.im \cdot x.im\right)\right)}{x.re \cdot x.re}\right)\\
\mathbf{if}\;y.re \leq -9.5 \cdot 10^{-14}:\\
\;\;\;\;t\_0\\

\mathbf{elif}\;y.re \leq 45000000000:\\
\;\;\;\;y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\

\mathbf{else}:\\
\;\;\;\;t\_0\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y.re < -9.4999999999999999e-14 or 4.5e10 < y.re

    1. Initial program 40.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 x.re 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(-1 \cdot \left(y.im \cdot \log \left(\frac{1}{x.re}\right)\right) + \left(\frac{1}{2} \cdot \frac{{x.im}^{2} \cdot y.im}{{x.re}^{2}} + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)} \]
    4. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(\color{blue}{\left(\mathsf{neg}\left(y.im \cdot \log \left(\frac{1}{x.re}\right)\right)\right)} + \left(\frac{1}{2} \cdot \frac{{x.im}^{2} \cdot y.im}{{x.re}^{2}} + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
      2. distribute-rgt-neg-inN/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.im \cdot \left(\mathsf{neg}\left(\log \left(\frac{1}{x.re}\right)\right)\right)} + \left(\frac{1}{2} \cdot \frac{{x.im}^{2} \cdot y.im}{{x.re}^{2}} + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
      3. log-recN/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(y.im \cdot \left(\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(\log x.re\right)\right)}\right)\right) + \left(\frac{1}{2} \cdot \frac{{x.im}^{2} \cdot y.im}{{x.re}^{2}} + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
      4. remove-double-negN/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(y.im \cdot \color{blue}{\log x.re} + \left(\frac{1}{2} \cdot \frac{{x.im}^{2} \cdot y.im}{{x.re}^{2}} + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
      5. accelerator-lowering-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(y.im, \log x.re, \frac{1}{2} \cdot \frac{{x.im}^{2} \cdot y.im}{{x.re}^{2}} + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)} \]
      6. log-lowering-log.f64N/A

        \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(\mathsf{fma}\left(y.im, \color{blue}{\log x.re}, \frac{1}{2} \cdot \frac{{x.im}^{2} \cdot y.im}{{x.re}^{2}} + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
      7. +-commutativeN/A

        \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(\mathsf{fma}\left(y.im, \log x.re, \color{blue}{y.re \cdot \tan^{-1}_* \frac{x.im}{x.re} + \frac{1}{2} \cdot \frac{{x.im}^{2} \cdot y.im}{{x.re}^{2}}}\right)\right) \]
      8. accelerator-lowering-fma.f64N/A

        \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(\mathsf{fma}\left(y.im, \log x.re, \color{blue}{\mathsf{fma}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}, \frac{1}{2} \cdot \frac{{x.im}^{2} \cdot y.im}{{x.re}^{2}}\right)}\right)\right) \]
      9. atan2-lowering-atan2.f64N/A

        \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(\mathsf{fma}\left(y.im, \log x.re, \mathsf{fma}\left(y.re, \color{blue}{\tan^{-1}_* \frac{x.im}{x.re}}, \frac{1}{2} \cdot \frac{{x.im}^{2} \cdot y.im}{{x.re}^{2}}\right)\right)\right) \]
      10. associate-*r/N/A

        \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(\mathsf{fma}\left(y.im, \log x.re, \mathsf{fma}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}, \color{blue}{\frac{\frac{1}{2} \cdot \left({x.im}^{2} \cdot y.im\right)}{{x.re}^{2}}}\right)\right)\right) \]
      11. /-lowering-/.f64N/A

        \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(\mathsf{fma}\left(y.im, \log x.re, \mathsf{fma}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}, \color{blue}{\frac{\frac{1}{2} \cdot \left({x.im}^{2} \cdot y.im\right)}{{x.re}^{2}}}\right)\right)\right) \]
      12. associate-*r*N/A

        \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(\mathsf{fma}\left(y.im, \log x.re, \mathsf{fma}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}, \frac{\color{blue}{\left(\frac{1}{2} \cdot {x.im}^{2}\right) \cdot y.im}}{{x.re}^{2}}\right)\right)\right) \]
      13. *-lowering-*.f64N/A

        \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(\mathsf{fma}\left(y.im, \log x.re, \mathsf{fma}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}, \frac{\color{blue}{\left(\frac{1}{2} \cdot {x.im}^{2}\right) \cdot y.im}}{{x.re}^{2}}\right)\right)\right) \]
      14. *-lowering-*.f64N/A

        \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(\mathsf{fma}\left(y.im, \log x.re, \mathsf{fma}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}, \frac{\color{blue}{\left(\frac{1}{2} \cdot {x.im}^{2}\right)} \cdot y.im}{{x.re}^{2}}\right)\right)\right) \]
      15. unpow2N/A

        \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(\mathsf{fma}\left(y.im, \log x.re, \mathsf{fma}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}, \frac{\left(\frac{1}{2} \cdot \color{blue}{\left(x.im \cdot x.im\right)}\right) \cdot y.im}{{x.re}^{2}}\right)\right)\right) \]
      16. *-lowering-*.f64N/A

        \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(\mathsf{fma}\left(y.im, \log x.re, \mathsf{fma}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}, \frac{\left(\frac{1}{2} \cdot \color{blue}{\left(x.im \cdot x.im\right)}\right) \cdot y.im}{{x.re}^{2}}\right)\right)\right) \]
      17. unpow2N/A

        \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(\mathsf{fma}\left(y.im, \log x.re, \mathsf{fma}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}, \frac{\left(\frac{1}{2} \cdot \left(x.im \cdot x.im\right)\right) \cdot y.im}{\color{blue}{x.re \cdot x.re}}\right)\right)\right) \]
      18. *-lowering-*.f6425.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(\mathsf{fma}\left(y.im, \log x.re, \mathsf{fma}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}, \frac{\left(0.5 \cdot \left(x.im \cdot x.im\right)\right) \cdot y.im}{\color{blue}{x.re \cdot x.re}}\right)\right)\right) \]
    5. Simplified25.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(\mathsf{fma}\left(y.im, \log x.re, \mathsf{fma}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}, \frac{\left(0.5 \cdot \left(x.im \cdot x.im\right)\right) \cdot y.im}{x.re \cdot x.re}\right)\right)\right)} \]
    6. Taylor expanded in y.im around 0

      \[\leadsto \color{blue}{{\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}} \cdot \sin \left(\mathsf{fma}\left(y.im, \log x.re, \mathsf{fma}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}, \frac{\left(\frac{1}{2} \cdot \left(x.im \cdot x.im\right)\right) \cdot y.im}{x.re \cdot x.re}\right)\right)\right) \]
    7. Step-by-step derivation
      1. pow-lowering-pow.f64N/A

        \[\leadsto \color{blue}{{\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}} \cdot \sin \left(\mathsf{fma}\left(y.im, \log x.re, \mathsf{fma}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}, \frac{\left(\frac{1}{2} \cdot \left(x.im \cdot x.im\right)\right) \cdot y.im}{x.re \cdot x.re}\right)\right)\right) \]
      2. sqrt-lowering-sqrt.f64N/A

        \[\leadsto {\color{blue}{\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}}^{y.re} \cdot \sin \left(\mathsf{fma}\left(y.im, \log x.re, \mathsf{fma}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}, \frac{\left(\frac{1}{2} \cdot \left(x.im \cdot x.im\right)\right) \cdot y.im}{x.re \cdot x.re}\right)\right)\right) \]
      3. unpow2N/A

        \[\leadsto {\left(\sqrt{\color{blue}{x.im \cdot x.im} + {x.re}^{2}}\right)}^{y.re} \cdot \sin \left(\mathsf{fma}\left(y.im, \log x.re, \mathsf{fma}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}, \frac{\left(\frac{1}{2} \cdot \left(x.im \cdot x.im\right)\right) \cdot y.im}{x.re \cdot x.re}\right)\right)\right) \]
      4. accelerator-lowering-fma.f64N/A

        \[\leadsto {\left(\sqrt{\color{blue}{\mathsf{fma}\left(x.im, x.im, {x.re}^{2}\right)}}\right)}^{y.re} \cdot \sin \left(\mathsf{fma}\left(y.im, \log x.re, \mathsf{fma}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}, \frac{\left(\frac{1}{2} \cdot \left(x.im \cdot x.im\right)\right) \cdot y.im}{x.re \cdot x.re}\right)\right)\right) \]
      5. unpow2N/A

        \[\leadsto {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, \color{blue}{x.re \cdot x.re}\right)}\right)}^{y.re} \cdot \sin \left(\mathsf{fma}\left(y.im, \log x.re, \mathsf{fma}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}, \frac{\left(\frac{1}{2} \cdot \left(x.im \cdot x.im\right)\right) \cdot y.im}{x.re \cdot x.re}\right)\right)\right) \]
      6. *-lowering-*.f6425.1

        \[\leadsto {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, \color{blue}{x.re \cdot x.re}\right)}\right)}^{y.re} \cdot \sin \left(\mathsf{fma}\left(y.im, \log x.re, \mathsf{fma}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}, \frac{\left(0.5 \cdot \left(x.im \cdot x.im\right)\right) \cdot y.im}{x.re \cdot x.re}\right)\right)\right) \]
    8. Simplified25.1%

      \[\leadsto \color{blue}{{\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{y.re}} \cdot \sin \left(\mathsf{fma}\left(y.im, \log x.re, \mathsf{fma}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}, \frac{\left(0.5 \cdot \left(x.im \cdot x.im\right)\right) \cdot y.im}{x.re \cdot x.re}\right)\right)\right) \]
    9. Taylor expanded in x.re around 0

      \[\leadsto {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{y.re} \cdot \sin \color{blue}{\left(\frac{1}{2} \cdot \frac{{x.im}^{2} \cdot y.im}{{x.re}^{2}}\right)} \]
    10. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{y.re} \cdot \sin \color{blue}{\left(\frac{\frac{1}{2} \cdot \left({x.im}^{2} \cdot y.im\right)}{{x.re}^{2}}\right)} \]
      2. /-lowering-/.f64N/A

        \[\leadsto {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{y.re} \cdot \sin \color{blue}{\left(\frac{\frac{1}{2} \cdot \left({x.im}^{2} \cdot y.im\right)}{{x.re}^{2}}\right)} \]
      3. *-lowering-*.f64N/A

        \[\leadsto {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{y.re} \cdot \sin \left(\frac{\color{blue}{\frac{1}{2} \cdot \left({x.im}^{2} \cdot y.im\right)}}{{x.re}^{2}}\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{y.re} \cdot \sin \left(\frac{\frac{1}{2} \cdot \color{blue}{\left({x.im}^{2} \cdot y.im\right)}}{{x.re}^{2}}\right) \]
      5. unpow2N/A

        \[\leadsto {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{y.re} \cdot \sin \left(\frac{\frac{1}{2} \cdot \left(\color{blue}{\left(x.im \cdot x.im\right)} \cdot y.im\right)}{{x.re}^{2}}\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{y.re} \cdot \sin \left(\frac{\frac{1}{2} \cdot \left(\color{blue}{\left(x.im \cdot x.im\right)} \cdot y.im\right)}{{x.re}^{2}}\right) \]
      7. unpow2N/A

        \[\leadsto {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{y.re} \cdot \sin \left(\frac{\frac{1}{2} \cdot \left(\left(x.im \cdot x.im\right) \cdot y.im\right)}{\color{blue}{x.re \cdot x.re}}\right) \]
      8. *-lowering-*.f6430.9

        \[\leadsto {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{y.re} \cdot \sin \left(\frac{0.5 \cdot \left(\left(x.im \cdot x.im\right) \cdot y.im\right)}{\color{blue}{x.re \cdot x.re}}\right) \]
    11. Simplified30.9%

      \[\leadsto {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{y.re} \cdot \sin \color{blue}{\left(\frac{0.5 \cdot \left(\left(x.im \cdot x.im\right) \cdot y.im\right)}{x.re \cdot x.re}\right)} \]

    if -9.4999999999999999e-14 < y.re < 4.5e10

    1. Initial program 44.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 0

      \[\leadsto e^{\color{blue}{-1 \cdot \left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.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. mul-1-negN/A

        \[\leadsto e^{\color{blue}{\mathsf{neg}\left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.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) \]
      2. neg-sub0N/A

        \[\leadsto e^{\color{blue}{0 - y.im \cdot \tan^{-1}_* \frac{x.im}{x.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) \]
      3. --lowering--.f64N/A

        \[\leadsto e^{\color{blue}{0 - y.im \cdot \tan^{-1}_* \frac{x.im}{x.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) \]
      4. *-lowering-*.f64N/A

        \[\leadsto e^{0 - \color{blue}{y.im \cdot \tan^{-1}_* \frac{x.im}{x.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. atan2-lowering-atan2.f6443.9

        \[\leadsto e^{0 - y.im \cdot \color{blue}{\tan^{-1}_* \frac{x.im}{x.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. Simplified43.9%

      \[\leadsto e^{\color{blue}{0 - y.im \cdot \tan^{-1}_* \frac{x.im}{x.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 \color{blue}{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
    7. Step-by-step derivation
      1. sin-lowering-sin.f64N/A

        \[\leadsto \color{blue}{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
      2. *-lowering-*.f64N/A

        \[\leadsto \sin \color{blue}{\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
      3. atan2-lowering-atan2.f6423.4

        \[\leadsto \sin \left(y.re \cdot \color{blue}{\tan^{-1}_* \frac{x.im}{x.re}}\right) \]
    8. Simplified23.4%

      \[\leadsto \color{blue}{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
    9. Taylor expanded in y.re around 0

      \[\leadsto \color{blue}{y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}} \]
    10. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \color{blue}{y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}} \]
      2. atan2-lowering-atan2.f6423.4

        \[\leadsto y.re \cdot \color{blue}{\tan^{-1}_* \frac{x.im}{x.re}} \]
    11. Simplified23.4%

      \[\leadsto \color{blue}{y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification27.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y.re \leq -9.5 \cdot 10^{-14}:\\ \;\;\;\;{\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{y.re} \cdot \sin \left(\frac{0.5 \cdot \left(y.im \cdot \left(x.im \cdot x.im\right)\right)}{x.re \cdot x.re}\right)\\ \mathbf{elif}\;y.re \leq 45000000000:\\ \;\;\;\;y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\ \mathbf{else}:\\ \;\;\;\;{\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{y.re} \cdot \sin \left(\frac{0.5 \cdot \left(y.im \cdot \left(x.im \cdot x.im\right)\right)}{x.re \cdot x.re}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 14.5% accurate, 2.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x.re \leq 4.4 \cdot 10^{-62}:\\ \;\;\;\;\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\ \mathbf{else}:\\ \;\;\;\;\sin \left(\mathsf{fma}\left(0.5, \frac{y.im \cdot \left(x.im \cdot x.im\right)}{x.re \cdot x.re}, y.im \cdot \log x.re\right)\right)\\ \end{array} \end{array} \]
(FPCore (x.re x.im y.re y.im)
 :precision binary64
 (if (<= x.re 4.4e-62)
   (sin (* y.re (atan2 x.im x.re)))
   (sin
    (fma 0.5 (/ (* y.im (* x.im x.im)) (* x.re x.re)) (* y.im (log x.re))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
	double tmp;
	if (x_46_re <= 4.4e-62) {
		tmp = sin((y_46_re * atan2(x_46_im, x_46_re)));
	} else {
		tmp = sin(fma(0.5, ((y_46_im * (x_46_im * x_46_im)) / (x_46_re * x_46_re)), (y_46_im * log(x_46_re))));
	}
	return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im)
	tmp = 0.0
	if (x_46_re <= 4.4e-62)
		tmp = sin(Float64(y_46_re * atan(x_46_im, x_46_re)));
	else
		tmp = sin(fma(0.5, Float64(Float64(y_46_im * Float64(x_46_im * x_46_im)) / Float64(x_46_re * x_46_re)), Float64(y_46_im * log(x_46_re))));
	end
	return tmp
end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[x$46$re, 4.4e-62], N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sin[N[(0.5 * N[(N[(y$46$im * N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision] / N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision] + N[(y$46$im * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x.re \leq 4.4 \cdot 10^{-62}:\\
\;\;\;\;\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\

\mathbf{else}:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(0.5, \frac{y.im \cdot \left(x.im \cdot x.im\right)}{x.re \cdot x.re}, y.im \cdot \log x.re\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x.re < 4.40000000000000035e-62

    1. Initial program 44.5%

      \[e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(\log \left(\sqrt{x.re \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^{\color{blue}{-1 \cdot \left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.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. mul-1-negN/A

        \[\leadsto e^{\color{blue}{\mathsf{neg}\left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.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) \]
      2. neg-sub0N/A

        \[\leadsto e^{\color{blue}{0 - y.im \cdot \tan^{-1}_* \frac{x.im}{x.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) \]
      3. --lowering--.f64N/A

        \[\leadsto e^{\color{blue}{0 - y.im \cdot \tan^{-1}_* \frac{x.im}{x.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) \]
      4. *-lowering-*.f64N/A

        \[\leadsto e^{0 - \color{blue}{y.im \cdot \tan^{-1}_* \frac{x.im}{x.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. atan2-lowering-atan2.f6432.8

        \[\leadsto e^{0 - y.im \cdot \color{blue}{\tan^{-1}_* \frac{x.im}{x.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. Simplified32.8%

      \[\leadsto e^{\color{blue}{0 - y.im \cdot \tan^{-1}_* \frac{x.im}{x.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 \color{blue}{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
    7. Step-by-step derivation
      1. sin-lowering-sin.f64N/A

        \[\leadsto \color{blue}{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
      2. *-lowering-*.f64N/A

        \[\leadsto \sin \color{blue}{\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
      3. atan2-lowering-atan2.f6415.7

        \[\leadsto \sin \left(y.re \cdot \color{blue}{\tan^{-1}_* \frac{x.im}{x.re}}\right) \]
    8. Simplified15.7%

      \[\leadsto \color{blue}{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]

    if 4.40000000000000035e-62 < x.re

    1. Initial program 38.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 e^{\log \left(\sqrt{x.re \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(-1 \cdot \left(y.im \cdot \log \left(\frac{1}{x.re}\right)\right) + \left(\frac{1}{2} \cdot \frac{{x.im}^{2} \cdot y.im}{{x.re}^{2}} + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)} \]
    4. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(\color{blue}{\left(\mathsf{neg}\left(y.im \cdot \log \left(\frac{1}{x.re}\right)\right)\right)} + \left(\frac{1}{2} \cdot \frac{{x.im}^{2} \cdot y.im}{{x.re}^{2}} + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
      2. distribute-rgt-neg-inN/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.im \cdot \left(\mathsf{neg}\left(\log \left(\frac{1}{x.re}\right)\right)\right)} + \left(\frac{1}{2} \cdot \frac{{x.im}^{2} \cdot y.im}{{x.re}^{2}} + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
      3. log-recN/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(y.im \cdot \left(\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(\log x.re\right)\right)}\right)\right) + \left(\frac{1}{2} \cdot \frac{{x.im}^{2} \cdot y.im}{{x.re}^{2}} + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
      4. remove-double-negN/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(y.im \cdot \color{blue}{\log x.re} + \left(\frac{1}{2} \cdot \frac{{x.im}^{2} \cdot y.im}{{x.re}^{2}} + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
      5. accelerator-lowering-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(y.im, \log x.re, \frac{1}{2} \cdot \frac{{x.im}^{2} \cdot y.im}{{x.re}^{2}} + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)} \]
      6. log-lowering-log.f64N/A

        \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(\mathsf{fma}\left(y.im, \color{blue}{\log x.re}, \frac{1}{2} \cdot \frac{{x.im}^{2} \cdot y.im}{{x.re}^{2}} + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
      7. +-commutativeN/A

        \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(\mathsf{fma}\left(y.im, \log x.re, \color{blue}{y.re \cdot \tan^{-1}_* \frac{x.im}{x.re} + \frac{1}{2} \cdot \frac{{x.im}^{2} \cdot y.im}{{x.re}^{2}}}\right)\right) \]
      8. accelerator-lowering-fma.f64N/A

        \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(\mathsf{fma}\left(y.im, \log x.re, \color{blue}{\mathsf{fma}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}, \frac{1}{2} \cdot \frac{{x.im}^{2} \cdot y.im}{{x.re}^{2}}\right)}\right)\right) \]
      9. atan2-lowering-atan2.f64N/A

        \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(\mathsf{fma}\left(y.im, \log x.re, \mathsf{fma}\left(y.re, \color{blue}{\tan^{-1}_* \frac{x.im}{x.re}}, \frac{1}{2} \cdot \frac{{x.im}^{2} \cdot y.im}{{x.re}^{2}}\right)\right)\right) \]
      10. associate-*r/N/A

        \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(\mathsf{fma}\left(y.im, \log x.re, \mathsf{fma}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}, \color{blue}{\frac{\frac{1}{2} \cdot \left({x.im}^{2} \cdot y.im\right)}{{x.re}^{2}}}\right)\right)\right) \]
      11. /-lowering-/.f64N/A

        \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(\mathsf{fma}\left(y.im, \log x.re, \mathsf{fma}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}, \color{blue}{\frac{\frac{1}{2} \cdot \left({x.im}^{2} \cdot y.im\right)}{{x.re}^{2}}}\right)\right)\right) \]
      12. associate-*r*N/A

        \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(\mathsf{fma}\left(y.im, \log x.re, \mathsf{fma}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}, \frac{\color{blue}{\left(\frac{1}{2} \cdot {x.im}^{2}\right) \cdot y.im}}{{x.re}^{2}}\right)\right)\right) \]
      13. *-lowering-*.f64N/A

        \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(\mathsf{fma}\left(y.im, \log x.re, \mathsf{fma}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}, \frac{\color{blue}{\left(\frac{1}{2} \cdot {x.im}^{2}\right) \cdot y.im}}{{x.re}^{2}}\right)\right)\right) \]
      14. *-lowering-*.f64N/A

        \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(\mathsf{fma}\left(y.im, \log x.re, \mathsf{fma}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}, \frac{\color{blue}{\left(\frac{1}{2} \cdot {x.im}^{2}\right)} \cdot y.im}{{x.re}^{2}}\right)\right)\right) \]
      15. unpow2N/A

        \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(\mathsf{fma}\left(y.im, \log x.re, \mathsf{fma}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}, \frac{\left(\frac{1}{2} \cdot \color{blue}{\left(x.im \cdot x.im\right)}\right) \cdot y.im}{{x.re}^{2}}\right)\right)\right) \]
      16. *-lowering-*.f64N/A

        \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(\mathsf{fma}\left(y.im, \log x.re, \mathsf{fma}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}, \frac{\left(\frac{1}{2} \cdot \color{blue}{\left(x.im \cdot x.im\right)}\right) \cdot y.im}{{x.re}^{2}}\right)\right)\right) \]
      17. unpow2N/A

        \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(\mathsf{fma}\left(y.im, \log x.re, \mathsf{fma}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}, \frac{\left(\frac{1}{2} \cdot \left(x.im \cdot x.im\right)\right) \cdot y.im}{\color{blue}{x.re \cdot x.re}}\right)\right)\right) \]
      18. *-lowering-*.f6451.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(\mathsf{fma}\left(y.im, \log x.re, \mathsf{fma}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}, \frac{\left(0.5 \cdot \left(x.im \cdot x.im\right)\right) \cdot y.im}{\color{blue}{x.re \cdot x.re}}\right)\right)\right) \]
    5. Simplified51.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(\mathsf{fma}\left(y.im, \log x.re, \mathsf{fma}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}, \frac{\left(0.5 \cdot \left(x.im \cdot x.im\right)\right) \cdot y.im}{x.re \cdot x.re}\right)\right)\right)} \]
    6. Taylor expanded in y.im around 0

      \[\leadsto \color{blue}{{\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}} \cdot \sin \left(\mathsf{fma}\left(y.im, \log x.re, \mathsf{fma}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}, \frac{\left(\frac{1}{2} \cdot \left(x.im \cdot x.im\right)\right) \cdot y.im}{x.re \cdot x.re}\right)\right)\right) \]
    7. Step-by-step derivation
      1. pow-lowering-pow.f64N/A

        \[\leadsto \color{blue}{{\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}} \cdot \sin \left(\mathsf{fma}\left(y.im, \log x.re, \mathsf{fma}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}, \frac{\left(\frac{1}{2} \cdot \left(x.im \cdot x.im\right)\right) \cdot y.im}{x.re \cdot x.re}\right)\right)\right) \]
      2. sqrt-lowering-sqrt.f64N/A

        \[\leadsto {\color{blue}{\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}}^{y.re} \cdot \sin \left(\mathsf{fma}\left(y.im, \log x.re, \mathsf{fma}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}, \frac{\left(\frac{1}{2} \cdot \left(x.im \cdot x.im\right)\right) \cdot y.im}{x.re \cdot x.re}\right)\right)\right) \]
      3. unpow2N/A

        \[\leadsto {\left(\sqrt{\color{blue}{x.im \cdot x.im} + {x.re}^{2}}\right)}^{y.re} \cdot \sin \left(\mathsf{fma}\left(y.im, \log x.re, \mathsf{fma}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}, \frac{\left(\frac{1}{2} \cdot \left(x.im \cdot x.im\right)\right) \cdot y.im}{x.re \cdot x.re}\right)\right)\right) \]
      4. accelerator-lowering-fma.f64N/A

        \[\leadsto {\left(\sqrt{\color{blue}{\mathsf{fma}\left(x.im, x.im, {x.re}^{2}\right)}}\right)}^{y.re} \cdot \sin \left(\mathsf{fma}\left(y.im, \log x.re, \mathsf{fma}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}, \frac{\left(\frac{1}{2} \cdot \left(x.im \cdot x.im\right)\right) \cdot y.im}{x.re \cdot x.re}\right)\right)\right) \]
      5. unpow2N/A

        \[\leadsto {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, \color{blue}{x.re \cdot x.re}\right)}\right)}^{y.re} \cdot \sin \left(\mathsf{fma}\left(y.im, \log x.re, \mathsf{fma}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}, \frac{\left(\frac{1}{2} \cdot \left(x.im \cdot x.im\right)\right) \cdot y.im}{x.re \cdot x.re}\right)\right)\right) \]
      6. *-lowering-*.f6447.7

        \[\leadsto {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, \color{blue}{x.re \cdot x.re}\right)}\right)}^{y.re} \cdot \sin \left(\mathsf{fma}\left(y.im, \log x.re, \mathsf{fma}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}, \frac{\left(0.5 \cdot \left(x.im \cdot x.im\right)\right) \cdot y.im}{x.re \cdot x.re}\right)\right)\right) \]
    8. Simplified47.7%

      \[\leadsto \color{blue}{{\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{y.re}} \cdot \sin \left(\mathsf{fma}\left(y.im, \log x.re, \mathsf{fma}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}, \frac{\left(0.5 \cdot \left(x.im \cdot x.im\right)\right) \cdot y.im}{x.re \cdot x.re}\right)\right)\right) \]
    9. Taylor expanded in y.re around 0

      \[\leadsto \color{blue}{\sin \left(\frac{1}{2} \cdot \frac{{x.im}^{2} \cdot y.im}{{x.re}^{2}} + y.im \cdot \log x.re\right)} \]
    10. Step-by-step derivation
      1. sin-lowering-sin.f64N/A

        \[\leadsto \color{blue}{\sin \left(\frac{1}{2} \cdot \frac{{x.im}^{2} \cdot y.im}{{x.re}^{2}} + y.im \cdot \log x.re\right)} \]
      2. accelerator-lowering-fma.f64N/A

        \[\leadsto \sin \color{blue}{\left(\mathsf{fma}\left(\frac{1}{2}, \frac{{x.im}^{2} \cdot y.im}{{x.re}^{2}}, y.im \cdot \log x.re\right)\right)} \]
      3. /-lowering-/.f64N/A

        \[\leadsto \sin \left(\mathsf{fma}\left(\frac{1}{2}, \color{blue}{\frac{{x.im}^{2} \cdot y.im}{{x.re}^{2}}}, y.im \cdot \log x.re\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \sin \left(\mathsf{fma}\left(\frac{1}{2}, \frac{\color{blue}{{x.im}^{2} \cdot y.im}}{{x.re}^{2}}, y.im \cdot \log x.re\right)\right) \]
      5. unpow2N/A

        \[\leadsto \sin \left(\mathsf{fma}\left(\frac{1}{2}, \frac{\color{blue}{\left(x.im \cdot x.im\right)} \cdot y.im}{{x.re}^{2}}, y.im \cdot \log x.re\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \sin \left(\mathsf{fma}\left(\frac{1}{2}, \frac{\color{blue}{\left(x.im \cdot x.im\right)} \cdot y.im}{{x.re}^{2}}, y.im \cdot \log x.re\right)\right) \]
      7. unpow2N/A

        \[\leadsto \sin \left(\mathsf{fma}\left(\frac{1}{2}, \frac{\left(x.im \cdot x.im\right) \cdot y.im}{\color{blue}{x.re \cdot x.re}}, y.im \cdot \log x.re\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \sin \left(\mathsf{fma}\left(\frac{1}{2}, \frac{\left(x.im \cdot x.im\right) \cdot y.im}{\color{blue}{x.re \cdot x.re}}, y.im \cdot \log x.re\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \sin \left(\mathsf{fma}\left(\frac{1}{2}, \frac{\left(x.im \cdot x.im\right) \cdot y.im}{x.re \cdot x.re}, \color{blue}{y.im \cdot \log x.re}\right)\right) \]
      10. log-lowering-log.f6418.7

        \[\leadsto \sin \left(\mathsf{fma}\left(0.5, \frac{\left(x.im \cdot x.im\right) \cdot y.im}{x.re \cdot x.re}, y.im \cdot \color{blue}{\log x.re}\right)\right) \]
    11. Simplified18.7%

      \[\leadsto \color{blue}{\sin \left(\mathsf{fma}\left(0.5, \frac{\left(x.im \cdot x.im\right) \cdot y.im}{x.re \cdot x.re}, y.im \cdot \log x.re\right)\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification16.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x.re \leq 4.4 \cdot 10^{-62}:\\ \;\;\;\;\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\ \mathbf{else}:\\ \;\;\;\;\sin \left(\mathsf{fma}\left(0.5, \frac{y.im \cdot \left(x.im \cdot x.im\right)}{x.re \cdot x.re}, y.im \cdot \log x.re\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 14.3% accurate, 3.3× speedup?

\[\begin{array}{l} \\ \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \end{array} \]
(FPCore (x.re x.im y.re y.im)
 :precision binary64
 (sin (* y.re (atan2 x.im x.re))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
	return sin((y_46_re * atan2(x_46_im, x_46_re)));
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
    real(8), intent (in) :: x_46re
    real(8), intent (in) :: x_46im
    real(8), intent (in) :: y_46re
    real(8), intent (in) :: y_46im
    code = sin((y_46re * atan2(x_46im, x_46re)))
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
	return Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
}
def code(x_46_re, x_46_im, y_46_re, y_46_im):
	return math.sin((y_46_re * math.atan2(x_46_im, x_46_re)))
function code(x_46_re, x_46_im, y_46_re, y_46_im)
	return sin(Float64(y_46_re * atan(x_46_im, x_46_re)))
end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im)
	tmp = sin((y_46_re * atan2(x_46_im, x_46_re)));
end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}

\\
\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)
\end{array}
Derivation
  1. Initial program 42.5%

    \[e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \]
  2. Add Preprocessing
  3. Taylor expanded in y.re around 0

    \[\leadsto e^{\color{blue}{-1 \cdot \left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.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. mul-1-negN/A

      \[\leadsto e^{\color{blue}{\mathsf{neg}\left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.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) \]
    2. neg-sub0N/A

      \[\leadsto e^{\color{blue}{0 - y.im \cdot \tan^{-1}_* \frac{x.im}{x.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) \]
    3. --lowering--.f64N/A

      \[\leadsto e^{\color{blue}{0 - y.im \cdot \tan^{-1}_* \frac{x.im}{x.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) \]
    4. *-lowering-*.f64N/A

      \[\leadsto e^{0 - \color{blue}{y.im \cdot \tan^{-1}_* \frac{x.im}{x.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. atan2-lowering-atan2.f6428.4

      \[\leadsto e^{0 - y.im \cdot \color{blue}{\tan^{-1}_* \frac{x.im}{x.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. Simplified28.4%

    \[\leadsto e^{\color{blue}{0 - y.im \cdot \tan^{-1}_* \frac{x.im}{x.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 \color{blue}{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
  7. Step-by-step derivation
    1. sin-lowering-sin.f64N/A

      \[\leadsto \color{blue}{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
    2. *-lowering-*.f64N/A

      \[\leadsto \sin \color{blue}{\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
    3. atan2-lowering-atan2.f6414.8

      \[\leadsto \sin \left(y.re \cdot \color{blue}{\tan^{-1}_* \frac{x.im}{x.re}}\right) \]
  8. Simplified14.8%

    \[\leadsto \color{blue}{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
  9. Add Preprocessing

Alternative 16: 14.2% accurate, 6.4× speedup?

\[\begin{array}{l} \\ y.re \cdot \tan^{-1}_* \frac{x.im}{x.re} \end{array} \]
(FPCore (x.re x.im y.re y.im) :precision binary64 (* y.re (atan2 x.im x.re)))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
	return y_46_re * atan2(x_46_im, x_46_re);
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
    real(8), intent (in) :: x_46re
    real(8), intent (in) :: x_46im
    real(8), intent (in) :: y_46re
    real(8), intent (in) :: y_46im
    code = y_46re * atan2(x_46im, x_46re)
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
	return y_46_re * Math.atan2(x_46_im, x_46_re);
}
def code(x_46_re, x_46_im, y_46_re, y_46_im):
	return y_46_re * math.atan2(x_46_im, x_46_re)
function code(x_46_re, x_46_im, y_46_re, y_46_im)
	return Float64(y_46_re * atan(x_46_im, x_46_re))
end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im)
	tmp = y_46_re * atan2(x_46_im, x_46_re);
end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}
\end{array}
Derivation
  1. Initial program 42.5%

    \[e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \]
  2. Add Preprocessing
  3. Taylor expanded in y.re around 0

    \[\leadsto e^{\color{blue}{-1 \cdot \left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.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. mul-1-negN/A

      \[\leadsto e^{\color{blue}{\mathsf{neg}\left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.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) \]
    2. neg-sub0N/A

      \[\leadsto e^{\color{blue}{0 - y.im \cdot \tan^{-1}_* \frac{x.im}{x.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) \]
    3. --lowering--.f64N/A

      \[\leadsto e^{\color{blue}{0 - y.im \cdot \tan^{-1}_* \frac{x.im}{x.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) \]
    4. *-lowering-*.f64N/A

      \[\leadsto e^{0 - \color{blue}{y.im \cdot \tan^{-1}_* \frac{x.im}{x.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. atan2-lowering-atan2.f6428.4

      \[\leadsto e^{0 - y.im \cdot \color{blue}{\tan^{-1}_* \frac{x.im}{x.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. Simplified28.4%

    \[\leadsto e^{\color{blue}{0 - y.im \cdot \tan^{-1}_* \frac{x.im}{x.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 \color{blue}{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
  7. Step-by-step derivation
    1. sin-lowering-sin.f64N/A

      \[\leadsto \color{blue}{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
    2. *-lowering-*.f64N/A

      \[\leadsto \sin \color{blue}{\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
    3. atan2-lowering-atan2.f6414.8

      \[\leadsto \sin \left(y.re \cdot \color{blue}{\tan^{-1}_* \frac{x.im}{x.re}}\right) \]
  8. Simplified14.8%

    \[\leadsto \color{blue}{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
  9. Taylor expanded in y.re around 0

    \[\leadsto \color{blue}{y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}} \]
  10. Step-by-step derivation
    1. *-lowering-*.f64N/A

      \[\leadsto \color{blue}{y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}} \]
    2. atan2-lowering-atan2.f6414.7

      \[\leadsto y.re \cdot \color{blue}{\tan^{-1}_* \frac{x.im}{x.re}} \]
  11. Simplified14.7%

    \[\leadsto \color{blue}{y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}} \]
  12. Add Preprocessing

Reproduce

?
herbie shell --seed 2024198 
(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)))))