powComplex, imaginary part

Percentage Accurate: 41.5% → 79.8%
Time: 44.3s
Alternatives: 18
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 18 alternatives:

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

Initial Program: 41.5% accurate, 1.0× speedup?

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

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

Alternative 1: 79.8% accurate, 0.7× speedup?

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

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

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

\mathbf{else}:\\
\;\;\;\;t\_2 \cdot \sin \left(\mathsf{fma}\left(t\_1, y.im, t\_0\right)\right)\\


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

    1. Initial program 51.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. Step-by-step derivation
      1. fma-neg51.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.8000000000000001e115 < y.im < -8.19999999999999967e26

    1. Initial program 9.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. Step-by-step derivation
      1. add-sqr-sqrt1.5%

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

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

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

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

        \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \left|\sin \color{blue}{\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}\right| \]
      4. hypot-undefine68.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 \left|\sin \left(\log \color{blue}{\left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)} \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\right| \]
      5. unpow268.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 \left|\sin \left(\log \left(\sqrt{\color{blue}{{x.re}^{2}} + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\right| \]
      6. unpow268.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 \left|\sin \left(\log \left(\sqrt{{x.re}^{2} + \color{blue}{{x.im}^{2}}}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\right| \]
      7. +-commutative68.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 \left|\sin \left(\log \left(\sqrt{\color{blue}{{x.im}^{2} + {x.re}^{2}}}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\right| \]
      8. *-commutative68.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 \left|\sin \left(\color{blue}{y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)} + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\right| \]
      9. *-commutative68.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 \left|\sin \left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right) + \color{blue}{y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}}\right)\right| \]
      10. fma-define68.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 \left|\sin \color{blue}{\left(\mathsf{fma}\left(y.im, \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right), y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)}\right| \]
    6. Simplified84.8%

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

    if -8.19999999999999967e26 < y.im

    1. Initial program 49.2%

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

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

        \[\leadsto e^{\mathsf{fma}\left(\log \color{blue}{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}, y.re, -\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\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) \]
      3. distribute-rgt-neg-out49.2%

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

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

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

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

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

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

Alternative 2: 76.3% accurate, 0.5× speedup?

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

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


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

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

    if 4.0000000000000001e-13 < (*.f64 (exp.f64 (-.f64 (*.f64 (log.f64 (sqrt.f64 (+.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)))) y.re) (*.f64 (atan2.f64 x.im x.re) y.im))) (sin.f64 (+.f64 (*.f64 (log.f64 (sqrt.f64 (+.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)))) y.im) (*.f64 (atan2.f64 x.im x.re) y.re))))

    1. Initial program 9.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 78.3% accurate, 0.8× speedup?

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

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

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

\mathbf{elif}\;y.re \leq 2.7 \cdot 10^{+85}:\\
\;\;\;\;t\_2 \cdot \sin t\_3\\

\mathbf{elif}\;y.re \leq 2.6 \cdot 10^{+160}:\\
\;\;\;\;t\_4 \cdot \frac{t\_0}{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re} + 1}\\

\mathbf{else}:\\
\;\;\;\;t\_2 \cdot \sin \left({\left(\sqrt[3]{t\_3}\right)}^{3}\right)\\


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

    1. Initial program 51.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. Step-by-step derivation
      1. fma-neg51.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.70000000000000018 < y.re < 3.7999999999999998

    1. Initial program 51.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. Step-by-step derivation
      1. exp-diff51.0%

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

        \[\leadsto \frac{\color{blue}{{\left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)}^{y.re}}}{e^{\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) \]
      3. hypot-define51.0%

        \[\leadsto \frac{{\color{blue}{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}}^{y.re}}{e^{\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) \]
      4. *-commutative51.0%

        \[\leadsto \frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{e^{\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. exp-prod50.7%

        \[\leadsto \frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{\color{blue}{{\left(e^{y.im}\right)}^{\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. fma-define50.7%

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

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

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

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

    if 3.7999999999999998 < y.re < 2.69999999999999983e85

    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. Step-by-step derivation
      1. fma-neg43.8%

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

        \[\leadsto e^{\mathsf{fma}\left(\log \color{blue}{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}, y.re, -\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\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) \]
      3. distribute-rgt-neg-out43.8%

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

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

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

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

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

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

    if 2.69999999999999983e85 < y.re < 2.6e160

    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. Step-by-step derivation
      1. exp-diff38.5%

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

        \[\leadsto \frac{\color{blue}{{\left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)}^{y.re}}}{e^{\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) \]
      3. hypot-define38.5%

        \[\leadsto \frac{{\color{blue}{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}}^{y.re}}{e^{\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) \]
      4. *-commutative38.5%

        \[\leadsto \frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{e^{\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. exp-prod38.5%

        \[\leadsto \frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{\color{blue}{{\left(e^{y.im}\right)}^{\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. fma-define38.5%

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

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

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

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

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

    if 2.6e160 < y.re

    1. Initial program 29.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 80.3% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
e^{\mathsf{fma}\left(t\_0, y.re, y.im \cdot \left(-\tan^{-1}_* \frac{x.im}{x.re}\right)\right)} \cdot \sin \left(\mathsf{fma}\left(t\_0, y.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)
\end{array}
\end{array}
Derivation
  1. Initial program 47.8%

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

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

      \[\leadsto e^{\mathsf{fma}\left(\log \color{blue}{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}, y.re, -\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\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) \]
    3. distribute-rgt-neg-out47.8%

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

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

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

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

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

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

Alternative 5: 78.2% accurate, 1.0× speedup?

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

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

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

\mathbf{elif}\;y.im \leq 1.55 \cdot 10^{+23}:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(t\_1, y.im, t\_0\right)\right) \cdot {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y.im < -1.0500000000000001e117 or 1.54999999999999985e23 < y.im

    1. Initial program 41.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.0500000000000001e117 < y.im < -0.062

    1. Initial program 17.7%

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

      \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \color{blue}{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
    4. Step-by-step derivation
      1. add-sqr-sqrt39.1%

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

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

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

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

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

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

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

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

    if -0.062 < y.im < 1.54999999999999985e23

    1. Initial program 57.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. Step-by-step derivation
      1. exp-diff57.0%

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

        \[\leadsto \frac{\color{blue}{{\left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)}^{y.re}}}{e^{\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) \]
      3. hypot-define57.0%

        \[\leadsto \frac{{\color{blue}{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}}^{y.re}}{e^{\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) \]
      4. *-commutative57.0%

        \[\leadsto \frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{e^{\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. exp-prod57.0%

        \[\leadsto \frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{\color{blue}{{\left(e^{y.im}\right)}^{\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. fma-define57.0%

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

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

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

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

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

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

Alternative 6: 77.4% accurate, 1.1× speedup?

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

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

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

\mathbf{elif}\;y.im \leq 0.48:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(t\_2, y.im, t\_0\right)\right) \cdot {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y.im < -1.35e172 or 0.47999999999999998 < y.im

    1. Initial program 35.0%

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

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

        \[\leadsto e^{\mathsf{fma}\left(\log \color{blue}{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}, y.re, -\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\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) \]
      3. distribute-rgt-neg-out35.0%

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

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

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

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

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

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

    if -1.35e172 < y.im < -0.062

    1. Initial program 45.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 65.7%

      \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \color{blue}{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
    4. Step-by-step derivation
      1. add-sqr-sqrt41.5%

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

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

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

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

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

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

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

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

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

    if -0.062 < y.im < 0.47999999999999998

    1. Initial program 58.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. Step-by-step derivation
      1. exp-diff58.6%

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

        \[\leadsto \frac{\color{blue}{{\left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)}^{y.re}}}{e^{\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) \]
      3. hypot-define58.6%

        \[\leadsto \frac{{\color{blue}{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}}^{y.re}}{e^{\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) \]
      4. *-commutative58.6%

        \[\leadsto \frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{e^{\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. exp-prod58.6%

        \[\leadsto \frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{\color{blue}{{\left(e^{y.im}\right)}^{\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. fma-define58.6%

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

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

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

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

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

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

Alternative 7: 63.7% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := {\left(e^{y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}\\ t_1 := y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\\ t_2 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\ t_3 := \sin t\_2\\ t_4 := e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - t\_1} \cdot t\_3\\ t_5 := {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\\ \mathbf{if}\;y.re \leq -1.25 \cdot 10^{-47}:\\ \;\;\;\;t\_4\\ \mathbf{elif}\;y.re \leq 6.4 \cdot 10^{-202}:\\ \;\;\;\;\frac{\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\right)}{t\_0}\\ \mathbf{elif}\;y.re \leq 1.12 \cdot 10^{-48}:\\ \;\;\;\;\frac{t\_5}{t\_0} \cdot t\_3\\ \mathbf{elif}\;y.re \leq 3.5 \cdot 10^{+50}:\\ \;\;\;\;\frac{\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)}{{\left(e^{\tan^{-1}_* \frac{x.im}{x.re}}\right)}^{y.im}}\\ \mathbf{elif}\;y.re \leq 2 \cdot 10^{+138}:\\ \;\;\;\;t\_4\\ \mathbf{elif}\;y.re \leq 1.5 \cdot 10^{+182}:\\ \;\;\;\;e^{y.re \cdot \log x.re - t\_1} \cdot \sin \left(t\_2 + y.im \cdot \log x.re\right)\\ \mathbf{else}:\\ \;\;\;\;t\_5 \cdot t\_3\\ \end{array} \end{array} \]
(FPCore (x.re x.im y.re y.im)
 :precision binary64
 (let* ((t_0 (pow (exp y.im) (atan2 x.im x.re)))
        (t_1 (* y.im (atan2 x.im x.re)))
        (t_2 (* y.re (atan2 x.im x.re)))
        (t_3 (sin t_2))
        (t_4
         (*
          (exp (- (* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im))))) t_1))
          t_3))
        (t_5 (pow (hypot x.re x.im) y.re)))
   (if (<= y.re -1.25e-47)
     t_4
     (if (<= y.re 6.4e-202)
       (/ (sin (* y.im (log (hypot x.re x.im)))) t_0)
       (if (<= y.re 1.12e-48)
         (* (/ t_5 t_0) t_3)
         (if (<= y.re 3.5e+50)
           (/
            (sin (* y.im (log (hypot x.im x.re))))
            (pow (exp (atan2 x.im x.re)) y.im))
           (if (<= y.re 2e+138)
             t_4
             (if (<= y.re 1.5e+182)
               (*
                (exp (- (* y.re (log x.re)) t_1))
                (sin (+ t_2 (* y.im (log x.re)))))
               (* t_5 t_3)))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
	double t_0 = pow(exp(y_46_im), atan2(x_46_im, x_46_re));
	double t_1 = y_46_im * atan2(x_46_im, x_46_re);
	double t_2 = y_46_re * atan2(x_46_im, x_46_re);
	double t_3 = sin(t_2);
	double t_4 = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_1)) * t_3;
	double t_5 = pow(hypot(x_46_re, x_46_im), y_46_re);
	double tmp;
	if (y_46_re <= -1.25e-47) {
		tmp = t_4;
	} else if (y_46_re <= 6.4e-202) {
		tmp = sin((y_46_im * log(hypot(x_46_re, x_46_im)))) / t_0;
	} else if (y_46_re <= 1.12e-48) {
		tmp = (t_5 / t_0) * t_3;
	} else if (y_46_re <= 3.5e+50) {
		tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) / pow(exp(atan2(x_46_im, x_46_re)), y_46_im);
	} else if (y_46_re <= 2e+138) {
		tmp = t_4;
	} else if (y_46_re <= 1.5e+182) {
		tmp = exp(((y_46_re * log(x_46_re)) - t_1)) * sin((t_2 + (y_46_im * log(x_46_re))));
	} else {
		tmp = t_5 * t_3;
	}
	return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
	double t_0 = Math.pow(Math.exp(y_46_im), Math.atan2(x_46_im, x_46_re));
	double t_1 = y_46_im * Math.atan2(x_46_im, x_46_re);
	double t_2 = y_46_re * Math.atan2(x_46_im, x_46_re);
	double t_3 = Math.sin(t_2);
	double t_4 = Math.exp(((y_46_re * Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_1)) * t_3;
	double t_5 = Math.pow(Math.hypot(x_46_re, x_46_im), y_46_re);
	double tmp;
	if (y_46_re <= -1.25e-47) {
		tmp = t_4;
	} else if (y_46_re <= 6.4e-202) {
		tmp = Math.sin((y_46_im * Math.log(Math.hypot(x_46_re, x_46_im)))) / t_0;
	} else if (y_46_re <= 1.12e-48) {
		tmp = (t_5 / t_0) * t_3;
	} else if (y_46_re <= 3.5e+50) {
		tmp = Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re)))) / Math.pow(Math.exp(Math.atan2(x_46_im, x_46_re)), y_46_im);
	} else if (y_46_re <= 2e+138) {
		tmp = t_4;
	} else if (y_46_re <= 1.5e+182) {
		tmp = Math.exp(((y_46_re * Math.log(x_46_re)) - t_1)) * Math.sin((t_2 + (y_46_im * Math.log(x_46_re))));
	} else {
		tmp = t_5 * t_3;
	}
	return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im):
	t_0 = math.pow(math.exp(y_46_im), math.atan2(x_46_im, x_46_re))
	t_1 = y_46_im * math.atan2(x_46_im, x_46_re)
	t_2 = y_46_re * math.atan2(x_46_im, x_46_re)
	t_3 = math.sin(t_2)
	t_4 = math.exp(((y_46_re * math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_1)) * t_3
	t_5 = math.pow(math.hypot(x_46_re, x_46_im), y_46_re)
	tmp = 0
	if y_46_re <= -1.25e-47:
		tmp = t_4
	elif y_46_re <= 6.4e-202:
		tmp = math.sin((y_46_im * math.log(math.hypot(x_46_re, x_46_im)))) / t_0
	elif y_46_re <= 1.12e-48:
		tmp = (t_5 / t_0) * t_3
	elif y_46_re <= 3.5e+50:
		tmp = math.sin((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) / math.pow(math.exp(math.atan2(x_46_im, x_46_re)), y_46_im)
	elif y_46_re <= 2e+138:
		tmp = t_4
	elif y_46_re <= 1.5e+182:
		tmp = math.exp(((y_46_re * math.log(x_46_re)) - t_1)) * math.sin((t_2 + (y_46_im * math.log(x_46_re))))
	else:
		tmp = t_5 * t_3
	return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im)
	t_0 = exp(y_46_im) ^ atan(x_46_im, x_46_re)
	t_1 = Float64(y_46_im * atan(x_46_im, x_46_re))
	t_2 = Float64(y_46_re * atan(x_46_im, x_46_re))
	t_3 = sin(t_2)
	t_4 = 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_3)
	t_5 = hypot(x_46_re, x_46_im) ^ y_46_re
	tmp = 0.0
	if (y_46_re <= -1.25e-47)
		tmp = t_4;
	elseif (y_46_re <= 6.4e-202)
		tmp = Float64(sin(Float64(y_46_im * log(hypot(x_46_re, x_46_im)))) / t_0);
	elseif (y_46_re <= 1.12e-48)
		tmp = Float64(Float64(t_5 / t_0) * t_3);
	elseif (y_46_re <= 3.5e+50)
		tmp = Float64(sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) / (exp(atan(x_46_im, x_46_re)) ^ y_46_im));
	elseif (y_46_re <= 2e+138)
		tmp = t_4;
	elseif (y_46_re <= 1.5e+182)
		tmp = Float64(exp(Float64(Float64(y_46_re * log(x_46_re)) - t_1)) * sin(Float64(t_2 + Float64(y_46_im * log(x_46_re)))));
	else
		tmp = Float64(t_5 * t_3);
	end
	return tmp
end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im)
	t_0 = exp(y_46_im) ^ atan2(x_46_im, x_46_re);
	t_1 = y_46_im * atan2(x_46_im, x_46_re);
	t_2 = y_46_re * atan2(x_46_im, x_46_re);
	t_3 = sin(t_2);
	t_4 = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_1)) * t_3;
	t_5 = hypot(x_46_re, x_46_im) ^ y_46_re;
	tmp = 0.0;
	if (y_46_re <= -1.25e-47)
		tmp = t_4;
	elseif (y_46_re <= 6.4e-202)
		tmp = sin((y_46_im * log(hypot(x_46_re, x_46_im)))) / t_0;
	elseif (y_46_re <= 1.12e-48)
		tmp = (t_5 / t_0) * t_3;
	elseif (y_46_re <= 3.5e+50)
		tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) / (exp(atan2(x_46_im, x_46_re)) ^ y_46_im);
	elseif (y_46_re <= 2e+138)
		tmp = t_4;
	elseif (y_46_re <= 1.5e+182)
		tmp = exp(((y_46_re * log(x_46_re)) - t_1)) * sin((t_2 + (y_46_im * log(x_46_re))));
	else
		tmp = t_5 * t_3;
	end
	tmp_2 = tmp;
end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Power[N[Exp[y$46$im], $MachinePrecision], N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[Sin[t$95$2], $MachinePrecision]}, Block[{t$95$4 = 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$3), $MachinePrecision]}, Block[{t$95$5 = N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, If[LessEqual[y$46$re, -1.25e-47], t$95$4, If[LessEqual[y$46$re, 6.4e-202], N[(N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t$95$0), $MachinePrecision], If[LessEqual[y$46$re, 1.12e-48], N[(N[(t$95$5 / t$95$0), $MachinePrecision] * t$95$3), $MachinePrecision], If[LessEqual[y$46$re, 3.5e+50], N[(N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Power[N[Exp[N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision], y$46$im], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 2e+138], t$95$4, If[LessEqual[y$46$re, 1.5e+182], N[(N[Exp[N[(N[(y$46$re * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(t$95$2 + N[(y$46$im * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$5 * t$95$3), $MachinePrecision]]]]]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;y.re \leq 6.4 \cdot 10^{-202}:\\
\;\;\;\;\frac{\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\right)}{t\_0}\\

\mathbf{elif}\;y.re \leq 1.12 \cdot 10^{-48}:\\
\;\;\;\;\frac{t\_5}{t\_0} \cdot t\_3\\

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

\mathbf{elif}\;y.re \leq 2 \cdot 10^{+138}:\\
\;\;\;\;t\_4\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if y.re < -1.25000000000000003e-47 or 3.50000000000000006e50 < y.re < 2.0000000000000001e138

    1. Initial program 51.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 82.4%

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

    if -1.25000000000000003e-47 < y.re < 6.4000000000000002e-202

    1. Initial program 55.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. Step-by-step derivation
      1. exp-diff55.8%

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

        \[\leadsto \frac{\color{blue}{{\left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)}^{y.re}}}{e^{\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) \]
      3. hypot-define55.8%

        \[\leadsto \frac{{\color{blue}{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}}^{y.re}}{e^{\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) \]
      4. *-commutative55.8%

        \[\leadsto \frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{e^{\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. exp-prod55.6%

        \[\leadsto \frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{\color{blue}{{\left(e^{y.im}\right)}^{\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. fma-define55.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 6.4000000000000002e-202 < y.re < 1.11999999999999999e-48

    1. Initial program 40.5%

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

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

        \[\leadsto \frac{\color{blue}{{\left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)}^{y.re}}}{e^{\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) \]
      3. hypot-define40.5%

        \[\leadsto \frac{{\color{blue}{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}}^{y.re}}{e^{\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) \]
      4. *-commutative40.5%

        \[\leadsto \frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{e^{\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. exp-prod40.5%

        \[\leadsto \frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{\color{blue}{{\left(e^{y.im}\right)}^{\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. fma-define40.5%

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

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

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

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

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

    if 1.11999999999999999e-48 < y.re < 3.50000000000000006e50

    1. Initial program 34.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. Step-by-step derivation
      1. exp-diff27.6%

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

        \[\leadsto \frac{\color{blue}{{\left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)}^{y.re}}}{e^{\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) \]
      3. hypot-define27.6%

        \[\leadsto \frac{{\color{blue}{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}}^{y.re}}{e^{\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) \]
      4. *-commutative27.6%

        \[\leadsto \frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{e^{\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. exp-prod26.7%

        \[\leadsto \frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{\color{blue}{{\left(e^{y.im}\right)}^{\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. fma-define26.7%

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

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

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

      \[\leadsto \color{blue}{\frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{{\left(e^{y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}} \cdot \sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. expm1-log1p-u59.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.0000000000000001e138 < y.re < 1.5000000000000001e182

    1. Initial program 36.4%

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

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

        \[\leadsto e^{\mathsf{fma}\left(\log \color{blue}{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}, y.re, -\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\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) \]
      3. distribute-rgt-neg-out36.4%

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

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

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

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

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

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

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

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

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

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

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

    if 1.5000000000000001e182 < y.re

    1. Initial program 30.0%

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

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

        \[\leadsto \frac{\color{blue}{{\left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)}^{y.re}}}{e^{\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) \]
      3. hypot-define30.0%

        \[\leadsto \frac{{\color{blue}{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}}^{y.re}}{e^{\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) \]
      4. *-commutative30.0%

        \[\leadsto \frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{e^{\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. exp-prod30.0%

        \[\leadsto \frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{\color{blue}{{\left(e^{y.im}\right)}^{\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. fma-define30.0%

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

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

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

      \[\leadsto \color{blue}{\frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{{\left(e^{y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}} \cdot \sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. expm1-log1p-u65.0%

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y.re \leq -1.25 \cdot 10^{-47}:\\ \;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\ \mathbf{elif}\;y.re \leq 6.4 \cdot 10^{-202}:\\ \;\;\;\;\frac{\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\right)}{{\left(e^{y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}}\\ \mathbf{elif}\;y.re \leq 1.12 \cdot 10^{-48}:\\ \;\;\;\;\frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{{\left(e^{y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\ \mathbf{elif}\;y.re \leq 3.5 \cdot 10^{+50}:\\ \;\;\;\;\frac{\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)}{{\left(e^{\tan^{-1}_* \frac{x.im}{x.re}}\right)}^{y.im}}\\ \mathbf{elif}\;y.re \leq 2 \cdot 10^{+138}:\\ \;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\ \mathbf{elif}\;y.re \leq 1.5 \cdot 10^{+182}:\\ \;\;\;\;e^{y.re \cdot \log x.re - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re} + y.im \cdot \log x.re\right)\\ \mathbf{else}:\\ \;\;\;\;{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 78.2% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\ t_1 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\ \mathbf{if}\;y.im \leq -1900000000 \lor \neg \left(y.im \leq 0.48\right):\\ \;\;\;\;e^{\mathsf{fma}\left(t\_1, y.re, y.im \cdot \left(-\tan^{-1}_* \frac{x.im}{x.re}\right)\right)} \cdot \sin t\_0\\ \mathbf{else}:\\ \;\;\;\;\sin \left(\mathsf{fma}\left(t\_1, y.im, t\_0\right)\right) \cdot {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\\ \end{array} \end{array} \]
(FPCore (x.re x.im y.re y.im)
 :precision binary64
 (let* ((t_0 (* y.re (atan2 x.im x.re))) (t_1 (log (hypot x.re x.im))))
   (if (or (<= y.im -1900000000.0) (not (<= y.im 0.48)))
     (* (exp (fma t_1 y.re (* y.im (- (atan2 x.im x.re))))) (sin t_0))
     (* (sin (fma t_1 y.im t_0)) (pow (hypot x.re x.im) y.re)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
	double t_0 = y_46_re * atan2(x_46_im, x_46_re);
	double t_1 = log(hypot(x_46_re, x_46_im));
	double tmp;
	if ((y_46_im <= -1900000000.0) || !(y_46_im <= 0.48)) {
		tmp = exp(fma(t_1, y_46_re, (y_46_im * -atan2(x_46_im, x_46_re)))) * sin(t_0);
	} else {
		tmp = sin(fma(t_1, y_46_im, t_0)) * pow(hypot(x_46_re, x_46_im), y_46_re);
	}
	return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im)
	t_0 = Float64(y_46_re * atan(x_46_im, x_46_re))
	t_1 = log(hypot(x_46_re, x_46_im))
	tmp = 0.0
	if ((y_46_im <= -1900000000.0) || !(y_46_im <= 0.48))
		tmp = Float64(exp(fma(t_1, y_46_re, Float64(y_46_im * Float64(-atan(x_46_im, x_46_re))))) * sin(t_0));
	else
		tmp = Float64(sin(fma(t_1, y_46_im, t_0)) * (hypot(x_46_re, x_46_im) ^ y_46_re));
	end
	return tmp
end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, If[Or[LessEqual[y$46$im, -1900000000.0], N[Not[LessEqual[y$46$im, 0.48]], $MachinePrecision]], N[(N[Exp[N[(t$95$1 * y$46$re + N[(y$46$im * (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision], N[(N[Sin[N[(t$95$1 * y$46$im + t$95$0), $MachinePrecision]], $MachinePrecision] * N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y.im < -1.9e9 or 0.47999999999999998 < y.im

    1. Initial program 37.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. Step-by-step derivation
      1. fma-neg37.1%

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

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

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

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

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

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

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

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

    if -1.9e9 < y.im < 0.47999999999999998

    1. Initial program 58.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. Step-by-step derivation
      1. exp-diff58.4%

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

        \[\leadsto \frac{\color{blue}{{\left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)}^{y.re}}}{e^{\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) \]
      3. hypot-define58.4%

        \[\leadsto \frac{{\color{blue}{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}}^{y.re}}{e^{\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) \]
      4. *-commutative58.4%

        \[\leadsto \frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{e^{\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. exp-prod58.4%

        \[\leadsto \frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{\color{blue}{{\left(e^{y.im}\right)}^{\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. fma-define58.4%

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

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

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x.re < 6.8000000000000001e-123

    1. Initial program 49.9%

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

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

        \[\leadsto e^{\mathsf{fma}\left(\log \color{blue}{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}, y.re, -\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\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) \]
      3. distribute-rgt-neg-out49.9%

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

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

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

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

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

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

    if 6.8000000000000001e-123 < x.re

    1. Initial program 43.9%

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

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

        \[\leadsto e^{\mathsf{fma}\left(\log \color{blue}{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}, y.re, -\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\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) \]
      3. distribute-rgt-neg-out43.9%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 65.8% accurate, 1.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y.re \leq -1.3 \cdot 10^{-47} \lor \neg \left(y.re \leq 3.5 \cdot 10^{+50}\right):\\ \;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\right)}{{\left(e^{y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}}\\ \end{array} \end{array} \]
(FPCore (x.re x.im y.re y.im)
 :precision binary64
 (if (or (<= y.re -1.3e-47) (not (<= y.re 3.5e+50)))
   (*
    (exp
     (-
      (* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
      (* y.im (atan2 x.im x.re))))
    (sin (* y.re (atan2 x.im x.re))))
   (/
    (sin (* y.im (log (hypot x.re x.im))))
    (pow (exp y.im) (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 <= -1.3e-47) || !(y_46_re <= 3.5e+50)) {
		tmp = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (y_46_im * atan2(x_46_im, x_46_re)))) * sin((y_46_re * atan2(x_46_im, x_46_re)));
	} else {
		tmp = sin((y_46_im * log(hypot(x_46_re, x_46_im)))) / pow(exp(y_46_im), atan2(x_46_im, x_46_re));
	}
	return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
	double tmp;
	if ((y_46_re <= -1.3e-47) || !(y_46_re <= 3.5e+50)) {
		tmp = Math.exp(((y_46_re * Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (y_46_im * Math.atan2(x_46_im, x_46_re)))) * Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
	} else {
		tmp = Math.sin((y_46_im * Math.log(Math.hypot(x_46_re, x_46_im)))) / Math.pow(Math.exp(y_46_im), Math.atan2(x_46_im, x_46_re));
	}
	return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im):
	tmp = 0
	if (y_46_re <= -1.3e-47) or not (y_46_re <= 3.5e+50):
		tmp = math.exp(((y_46_re * math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (y_46_im * math.atan2(x_46_im, x_46_re)))) * math.sin((y_46_re * math.atan2(x_46_im, x_46_re)))
	else:
		tmp = math.sin((y_46_im * math.log(math.hypot(x_46_re, x_46_im)))) / math.pow(math.exp(y_46_im), math.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 <= -1.3e-47) || !(y_46_re <= 3.5e+50))
		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))))) - Float64(y_46_im * atan(x_46_im, x_46_re)))) * sin(Float64(y_46_re * atan(x_46_im, x_46_re))));
	else
		tmp = Float64(sin(Float64(y_46_im * log(hypot(x_46_re, x_46_im)))) / (exp(y_46_im) ^ atan(x_46_im, x_46_re)));
	end
	return tmp
end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im)
	tmp = 0.0;
	if ((y_46_re <= -1.3e-47) || ~((y_46_re <= 3.5e+50)))
		tmp = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (y_46_im * atan2(x_46_im, x_46_re)))) * sin((y_46_re * atan2(x_46_im, x_46_re)));
	else
		tmp = sin((y_46_im * log(hypot(x_46_re, x_46_im)))) / (exp(y_46_im) ^ atan2(x_46_im, x_46_re));
	end
	tmp_2 = tmp;
end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[Or[LessEqual[y$46$re, -1.3e-47], N[Not[LessEqual[y$46$re, 3.5e+50]], $MachinePrecision]], 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] - N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Power[N[Exp[y$46$im], $MachinePrecision], N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y.re \leq -1.3 \cdot 10^{-47} \lor \neg \left(y.re \leq 3.5 \cdot 10^{+50}\right):\\
\;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y.re < -1.3e-47 or 3.50000000000000006e50 < y.re

    1. Initial program 46.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 77.9%

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

    if -1.3e-47 < y.re < 3.50000000000000006e50

    1. Initial program 49.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. Step-by-step derivation
      1. exp-diff48.2%

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

        \[\leadsto \frac{\color{blue}{{\left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)}^{y.re}}}{e^{\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) \]
      3. hypot-define48.2%

        \[\leadsto \frac{{\color{blue}{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}}^{y.re}}{e^{\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) \]
      4. *-commutative48.2%

        \[\leadsto \frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{e^{\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. exp-prod48.0%

        \[\leadsto \frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{\color{blue}{{\left(e^{y.im}\right)}^{\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. fma-define48.0%

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

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

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

      \[\leadsto \color{blue}{\frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{{\left(e^{y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}} \cdot \sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. expm1-log1p-u82.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 61.4% accurate, 1.3× speedup?

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

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

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

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


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

    1. Initial program 53.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. Step-by-step derivation
      1. exp-diff45.4%

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

        \[\leadsto \frac{\color{blue}{{\left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)}^{y.re}}}{e^{\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) \]
      3. hypot-define45.4%

        \[\leadsto \frac{{\color{blue}{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}}^{y.re}}{e^{\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) \]
      4. *-commutative45.4%

        \[\leadsto \frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{e^{\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. exp-prod45.2%

        \[\leadsto \frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{\color{blue}{{\left(e^{y.im}\right)}^{\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. fma-define45.2%

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

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

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

      \[\leadsto \color{blue}{\frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{{\left(e^{y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}} \cdot \sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. expm1-log1p-u72.6%

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

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

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

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

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

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

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

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

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

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

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

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

    if -7.50000000000000049e-41 < y.re < 6.20000000000000006e50

    1. Initial program 48.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. Step-by-step derivation
      1. exp-diff47.5%

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

        \[\leadsto \frac{\color{blue}{{\left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)}^{y.re}}}{e^{\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) \]
      3. hypot-define47.5%

        \[\leadsto \frac{{\color{blue}{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}}^{y.re}}{e^{\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) \]
      4. *-commutative47.5%

        \[\leadsto \frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{e^{\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. exp-prod47.3%

        \[\leadsto \frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{\color{blue}{{\left(e^{y.im}\right)}^{\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. fma-define47.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 6.20000000000000006e50 < y.re

    1. Initial program 38.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. Step-by-step derivation
      1. exp-diff32.0%

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

        \[\leadsto \frac{\color{blue}{{\left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)}^{y.re}}}{e^{\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) \]
      3. hypot-define32.0%

        \[\leadsto \frac{{\color{blue}{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}}^{y.re}}{e^{\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) \]
      4. *-commutative32.0%

        \[\leadsto \frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{e^{\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. exp-prod32.0%

        \[\leadsto \frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{\color{blue}{{\left(e^{y.im}\right)}^{\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. fma-define32.0%

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

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

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

      \[\leadsto \color{blue}{\frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{{\left(e^{y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}} \cdot \sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. expm1-log1p-u62.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 12: 62.7% accurate, 1.3× speedup?

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

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

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

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


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

    1. Initial program 53.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. Step-by-step derivation
      1. exp-diff44.7%

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

        \[\leadsto \frac{\color{blue}{{\left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)}^{y.re}}}{e^{\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) \]
      3. hypot-define44.7%

        \[\leadsto \frac{{\color{blue}{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}}^{y.re}}{e^{\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) \]
      4. *-commutative44.7%

        \[\leadsto \frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{e^{\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. exp-prod44.5%

        \[\leadsto \frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{\color{blue}{{\left(e^{y.im}\right)}^{\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. fma-define44.5%

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

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

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

      \[\leadsto \color{blue}{\frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{{\left(e^{y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}} \cdot \sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. expm1-log1p-u72.2%

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.3e-40 < y.re < 5.2000000000000004e50

    1. Initial program 48.7%

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

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

        \[\leadsto \frac{\color{blue}{{\left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)}^{y.re}}}{e^{\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) \]
      3. hypot-define47.9%

        \[\leadsto \frac{{\color{blue}{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}}^{y.re}}{e^{\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) \]
      4. *-commutative47.9%

        \[\leadsto \frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{e^{\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. exp-prod47.7%

        \[\leadsto \frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{\color{blue}{{\left(e^{y.im}\right)}^{\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. fma-define47.7%

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

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

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

      \[\leadsto \color{blue}{\frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{{\left(e^{y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}} \cdot \sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. expm1-log1p-u82.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.2000000000000004e50 < y.re

    1. Initial program 38.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. Step-by-step derivation
      1. exp-diff32.0%

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

        \[\leadsto \frac{\color{blue}{{\left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)}^{y.re}}}{e^{\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) \]
      3. hypot-define32.0%

        \[\leadsto \frac{{\color{blue}{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}}^{y.re}}{e^{\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) \]
      4. *-commutative32.0%

        \[\leadsto \frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{e^{\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. exp-prod32.0%

        \[\leadsto \frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{\color{blue}{{\left(e^{y.im}\right)}^{\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. fma-define32.0%

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

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

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

      \[\leadsto \color{blue}{\frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{{\left(e^{y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}} \cdot \sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. expm1-log1p-u62.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 13: 55.6% accurate, 1.6× speedup?

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

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

\mathbf{elif}\;x.re \leq -1.6 \cdot 10^{-103}:\\
\;\;\;\;{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re} \cdot t\_1\\

\mathbf{elif}\;x.re \leq -1 \cdot 10^{-309}:\\
\;\;\;\;t\_2\\

\mathbf{else}:\\
\;\;\;\;t\_1 \cdot e^{y.re \cdot \log x.re - t\_0}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x.re < -62000 or -1.59999999999999988e-103 < x.re < -1.000000000000002e-309

    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 57.5%

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

      \[\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) \]
    5. Step-by-step derivation
      1. mul-1-neg70.9%

        \[\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) \]
    6. Simplified70.9%

      \[\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 -62000 < x.re < -1.59999999999999988e-103

    1. Initial program 63.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. Step-by-step derivation
      1. exp-diff54.5%

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

        \[\leadsto \frac{\color{blue}{{\left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)}^{y.re}}}{e^{\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) \]
      3. hypot-define54.5%

        \[\leadsto \frac{{\color{blue}{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}}^{y.re}}{e^{\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) \]
      4. *-commutative54.5%

        \[\leadsto \frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{e^{\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. exp-prod54.5%

        \[\leadsto \frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{\color{blue}{{\left(e^{y.im}\right)}^{\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. fma-define54.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.000000000000002e-309 < x.re

    1. Initial program 48.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 52.8%

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

      \[\leadsto e^{\log \color{blue}{x.re} \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) \]
  3. Recombined 3 regimes into one program.
  4. Final simplification63.3%

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

Alternative 14: 49.9% accurate, 1.6× speedup?

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

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

\mathbf{elif}\;x.im \leq -1.55 \cdot 10^{-45}:\\
\;\;\;\;t\_0 \cdot \sin \left(\left|t\_1\right|\right)\\

\mathbf{elif}\;x.im \leq -1.5 \cdot 10^{-306}:\\
\;\;\;\;t\_3\\

\mathbf{else}:\\
\;\;\;\;t\_2 \cdot e^{y.re \cdot \log x.im - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x.im < -3.3e54 or -1.55e-45 < x.im < -1.50000000000000012e-306

    1. Initial program 52.7%

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

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

        \[\leadsto \frac{\color{blue}{{\left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)}^{y.re}}}{e^{\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) \]
      3. hypot-define47.6%

        \[\leadsto \frac{{\color{blue}{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}}^{y.re}}{e^{\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) \]
      4. *-commutative47.6%

        \[\leadsto \frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{e^{\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. exp-prod47.5%

        \[\leadsto \frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{\color{blue}{{\left(e^{y.im}\right)}^{\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. fma-define47.5%

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

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

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

      \[\leadsto \color{blue}{\frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{{\left(e^{y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}} \cdot \sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. expm1-log1p-u77.9%

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.3e54 < x.im < -1.55e-45

    1. Initial program 52.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. Step-by-step derivation
      1. exp-diff40.0%

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

        \[\leadsto \frac{\color{blue}{{\left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)}^{y.re}}}{e^{\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) \]
      3. hypot-define40.0%

        \[\leadsto \frac{{\color{blue}{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}}^{y.re}}{e^{\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) \]
      4. *-commutative40.0%

        \[\leadsto \frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{e^{\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. exp-prod40.0%

        \[\leadsto \frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{\color{blue}{{\left(e^{y.im}\right)}^{\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. fma-define40.0%

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

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

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

      \[\leadsto \color{blue}{\frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{{\left(e^{y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}} \cdot \sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. expm1-log1p-u51.9%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}} \]
    10. Step-by-step derivation
      1. *-commutative67.9%

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

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

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

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

      \[\leadsto \sin \color{blue}{\left(\sqrt{{\left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}^{2}}\right)} \cdot {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re} \]
    12. Step-by-step derivation
      1. *-commutative51.9%

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

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

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

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

    if -1.50000000000000012e-306 < x.im

    1. Initial program 43.3%

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

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

      \[\leadsto e^{\log \color{blue}{x.im} \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) \]
  3. Recombined 3 regimes into one program.
  4. Final simplification57.3%

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

Alternative 15: 55.5% accurate, 1.6× speedup?

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

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

\mathbf{elif}\;x.im \leq -1.5 \cdot 10^{-306}:\\
\;\;\;\;{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re} \cdot t\_1\\

\mathbf{else}:\\
\;\;\;\;t\_1 \cdot e^{y.re \cdot \log x.im - t\_0}\\


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

    1. Initial program 32.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 68.2%

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

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

        \[\leadsto e^{\log \color{blue}{\left(-x.im\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) \]
    6. Simplified79.9%

      \[\leadsto e^{\log \color{blue}{\left(-x.im\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 -3700 < x.im < -1.50000000000000012e-306

    1. Initial program 71.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. Step-by-step derivation
      1. exp-diff63.3%

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

        \[\leadsto \frac{\color{blue}{{\left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)}^{y.re}}}{e^{\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) \]
      3. hypot-define63.3%

        \[\leadsto \frac{{\color{blue}{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}}^{y.re}}{e^{\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) \]
      4. *-commutative63.3%

        \[\leadsto \frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{e^{\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. exp-prod63.1%

        \[\leadsto \frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{\color{blue}{{\left(e^{y.im}\right)}^{\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. fma-define63.1%

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

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

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

      \[\leadsto \color{blue}{\frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{{\left(e^{y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}} \cdot \sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. expm1-log1p-u81.8%

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.50000000000000012e-306 < x.im

    1. Initial program 43.3%

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

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

      \[\leadsto e^{\log \color{blue}{x.im} \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) \]
  3. Recombined 3 regimes into one program.
  4. Final simplification61.7%

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

Alternative 16: 45.6% accurate, 2.0× speedup?

\[\begin{array}{l} \\ {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \end{array} \]
(FPCore (x.re x.im y.re y.im)
 :precision binary64
 (* (pow (hypot x.re x.im) y.re) (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 pow(hypot(x_46_re, x_46_im), y_46_re) * sin((y_46_re * atan2(x_46_im, x_46_re)));
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
	return Math.pow(Math.hypot(x_46_re, x_46_im), y_46_re) * 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.pow(math.hypot(x_46_re, x_46_im), y_46_re) * 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 Float64((hypot(x_46_re, x_46_im) ^ y_46_re) * 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 = (hypot(x_46_re, x_46_im) ^ y_46_re) * 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[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)
\end{array}
Derivation
  1. Initial program 47.8%

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

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

      \[\leadsto \frac{\color{blue}{{\left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)}^{y.re}}}{e^{\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) \]
    3. hypot-define43.9%

      \[\leadsto \frac{{\color{blue}{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}}^{y.re}}{e^{\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) \]
    4. *-commutative43.9%

      \[\leadsto \frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{e^{\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. exp-prod43.7%

      \[\leadsto \frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{\color{blue}{{\left(e^{y.im}\right)}^{\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. fma-define43.7%

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

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

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

    \[\leadsto \color{blue}{\frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{{\left(e^{y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}} \cdot \sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)} \]
  4. Add Preprocessing
  5. Step-by-step derivation
    1. expm1-log1p-u75.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 17: 37.1% accurate, 2.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\ \mathbf{if}\;x.im \leq -1.6 \cdot 10^{+36} \lor \neg \left(x.im \leq 1.22 \cdot 10^{-70}\right):\\ \;\;\;\;t\_0 \cdot {x.im}^{y.re}\\ \mathbf{else}:\\ \;\;\;\;t\_0 \cdot {x.re}^{y.re}\\ \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)))))
   (if (or (<= x.im -1.6e+36) (not (<= x.im 1.22e-70)))
     (* t_0 (pow x.im y.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 = sin((y_46_re * atan2(x_46_im, x_46_re)));
	double tmp;
	if ((x_46_im <= -1.6e+36) || !(x_46_im <= 1.22e-70)) {
		tmp = t_0 * pow(x_46_im, y_46_re);
	} else {
		tmp = t_0 * pow(x_46_re, y_46_re);
	}
	return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
    real(8), intent (in) :: x_46re
    real(8), intent (in) :: x_46im
    real(8), intent (in) :: y_46re
    real(8), intent (in) :: y_46im
    real(8) :: t_0
    real(8) :: tmp
    t_0 = sin((y_46re * atan2(x_46im, x_46re)))
    if ((x_46im <= (-1.6d+36)) .or. (.not. (x_46im <= 1.22d-70))) then
        tmp = t_0 * (x_46im ** y_46re)
    else
        tmp = t_0 * (x_46re ** y_46re)
    end if
    code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
	double t_0 = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
	double tmp;
	if ((x_46_im <= -1.6e+36) || !(x_46_im <= 1.22e-70)) {
		tmp = t_0 * Math.pow(x_46_im, y_46_re);
	} else {
		tmp = t_0 * Math.pow(x_46_re, y_46_re);
	}
	return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im):
	t_0 = math.sin((y_46_re * math.atan2(x_46_im, x_46_re)))
	tmp = 0
	if (x_46_im <= -1.6e+36) or not (x_46_im <= 1.22e-70):
		tmp = t_0 * math.pow(x_46_im, y_46_re)
	else:
		tmp = t_0 * math.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 = sin(Float64(y_46_re * atan(x_46_im, x_46_re)))
	tmp = 0.0
	if ((x_46_im <= -1.6e+36) || !(x_46_im <= 1.22e-70))
		tmp = Float64(t_0 * (x_46_im ^ y_46_re));
	else
		tmp = Float64(t_0 * (x_46_re ^ y_46_re));
	end
	return tmp
end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im)
	t_0 = sin((y_46_re * atan2(x_46_im, x_46_re)));
	tmp = 0.0;
	if ((x_46_im <= -1.6e+36) || ~((x_46_im <= 1.22e-70)))
		tmp = t_0 * (x_46_im ^ y_46_re);
	else
		tmp = t_0 * (x_46_re ^ y_46_re);
	end
	tmp_2 = tmp;
end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[Or[LessEqual[x$46$im, -1.6e+36], N[Not[LessEqual[x$46$im, 1.22e-70]], $MachinePrecision]], N[(t$95$0 * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[Power[x$46$re, y$46$re], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{if}\;x.im \leq -1.6 \cdot 10^{+36} \lor \neg \left(x.im \leq 1.22 \cdot 10^{-70}\right):\\
\;\;\;\;t\_0 \cdot {x.im}^{y.re}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x.im < -1.5999999999999999e36 or 1.22e-70 < x.im

    1. Initial program 36.8%

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

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

        \[\leadsto \frac{\color{blue}{{\left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)}^{y.re}}}{e^{\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) \]
      3. hypot-define34.5%

        \[\leadsto \frac{{\color{blue}{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}}^{y.re}}{e^{\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) \]
      4. *-commutative34.5%

        \[\leadsto \frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{e^{\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. exp-prod34.3%

        \[\leadsto \frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{\color{blue}{{\left(e^{y.im}\right)}^{\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. fma-define34.3%

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

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

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

      \[\leadsto \color{blue}{\frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{{\left(e^{y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}} \cdot \sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. expm1-log1p-u73.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.5999999999999999e36 < x.im < 1.22e-70

    1. Initial program 58.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. Step-by-step derivation
      1. exp-diff53.3%

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

        \[\leadsto \frac{\color{blue}{{\left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)}^{y.re}}}{e^{\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) \]
      3. hypot-define53.3%

        \[\leadsto \frac{{\color{blue}{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}}^{y.re}}{e^{\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) \]
      4. *-commutative53.3%

        \[\leadsto \frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{e^{\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. exp-prod53.1%

        \[\leadsto \frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{\color{blue}{{\left(e^{y.im}\right)}^{\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. fma-define53.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x.im \leq -1.6 \cdot 10^{+36} \lor \neg \left(x.im \leq 1.22 \cdot 10^{-70}\right):\\ \;\;\;\;\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {x.im}^{y.re}\\ \mathbf{else}:\\ \;\;\;\;\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {x.re}^{y.re}\\ \end{array} \]
  5. Add Preprocessing

Alternative 18: 31.3% accurate, 2.7× speedup?

\[\begin{array}{l} \\ \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {x.im}^{y.re} \end{array} \]
(FPCore (x.re x.im y.re y.im)
 :precision binary64
 (* (sin (* y.re (atan2 x.im x.re))) (pow x.im y.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))) * pow(x_46_im, y_46_re);
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
    real(8), intent (in) :: x_46re
    real(8), intent (in) :: x_46im
    real(8), intent (in) :: y_46re
    real(8), intent (in) :: y_46im
    code = sin((y_46re * atan2(x_46im, x_46re))) * (x_46im ** y_46re)
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
	return Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re))) * Math.pow(x_46_im, y_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))) * math.pow(x_46_im, y_46_re)
function code(x_46_re, x_46_im, y_46_re, y_46_im)
	return Float64(sin(Float64(y_46_re * atan(x_46_im, x_46_re))) * (x_46_im ^ y_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))) * (x_46_im ^ y_46_re);
end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[(N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {x.im}^{y.re}
\end{array}
Derivation
  1. Initial program 47.8%

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

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

      \[\leadsto \frac{\color{blue}{{\left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)}^{y.re}}}{e^{\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) \]
    3. hypot-define43.9%

      \[\leadsto \frac{{\color{blue}{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}}^{y.re}}{e^{\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) \]
    4. *-commutative43.9%

      \[\leadsto \frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{e^{\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. exp-prod43.7%

      \[\leadsto \frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{\color{blue}{{\left(e^{y.im}\right)}^{\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. fma-define43.7%

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

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

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

    \[\leadsto \color{blue}{\frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{{\left(e^{y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}} \cdot \sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)} \]
  4. Add Preprocessing
  5. Step-by-step derivation
    1. expm1-log1p-u75.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Reproduce

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