powComplex, imaginary part

Percentage Accurate: 41.1% → 78.1%
Time: 17.1s
Alternatives: 21
Speedup: 2.1×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 21 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.1% 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: 78.1% accurate, 0.8× speedup?

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

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

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

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


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

    1. Initial program 38.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5 < y.re < 6.39999999999999964e59

    1. Initial program 43.0%

      \[e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 6.39999999999999964e59 < y.re

    1. Initial program 44.7%

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

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

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

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

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

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

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

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

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

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

Alternative 2: 14.2% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\\ t_1 := \log \left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)\\ \mathbf{if}\;\sin \left(y.im \cdot t\_1 + t\_0\right) \cdot e^{t\_1 \cdot y.re - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \leq -0.0002:\\ \;\;\;\;\left(\log x.re + \frac{0.5 \cdot \left(x.im \cdot x.im\right)}{x.re \cdot x.re}\right) \cdot y.im\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
(FPCore (x.re x.im y.re y.im)
 :precision binary64
 (let* ((t_0 (* (atan2 x.im x.re) y.re))
        (t_1 (log (sqrt (+ (* x.im x.im) (* x.re x.re))))))
   (if (<=
        (*
         (sin (+ (* y.im t_1) t_0))
         (exp (- (* t_1 y.re) (* y.im (atan2 x.im x.re)))))
        -0.0002)
     (* (+ (log x.re) (/ (* 0.5 (* x.im x.im)) (* x.re x.re))) y.im)
     t_0)))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
	double t_0 = atan2(x_46_im, x_46_re) * y_46_re;
	double t_1 = log(sqrt(((x_46_im * x_46_im) + (x_46_re * x_46_re))));
	double tmp;
	if ((sin(((y_46_im * t_1) + t_0)) * exp(((t_1 * y_46_re) - (y_46_im * atan2(x_46_im, x_46_re))))) <= -0.0002) {
		tmp = (log(x_46_re) + ((0.5 * (x_46_im * x_46_im)) / (x_46_re * x_46_re))) * y_46_im;
	} else {
		tmp = t_0;
	}
	return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
    real(8), intent (in) :: x_46re
    real(8), intent (in) :: x_46im
    real(8), intent (in) :: y_46re
    real(8), intent (in) :: y_46im
    real(8) :: t_0
    real(8) :: t_1
    real(8) :: tmp
    t_0 = atan2(x_46im, x_46re) * y_46re
    t_1 = log(sqrt(((x_46im * x_46im) + (x_46re * x_46re))))
    if ((sin(((y_46im * t_1) + t_0)) * exp(((t_1 * y_46re) - (y_46im * atan2(x_46im, x_46re))))) <= (-0.0002d0)) then
        tmp = (log(x_46re) + ((0.5d0 * (x_46im * x_46im)) / (x_46re * x_46re))) * y_46im
    else
        tmp = t_0
    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.atan2(x_46_im, x_46_re) * y_46_re;
	double t_1 = Math.log(Math.sqrt(((x_46_im * x_46_im) + (x_46_re * x_46_re))));
	double tmp;
	if ((Math.sin(((y_46_im * t_1) + t_0)) * Math.exp(((t_1 * y_46_re) - (y_46_im * Math.atan2(x_46_im, x_46_re))))) <= -0.0002) {
		tmp = (Math.log(x_46_re) + ((0.5 * (x_46_im * x_46_im)) / (x_46_re * x_46_re))) * y_46_im;
	} else {
		tmp = t_0;
	}
	return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im):
	t_0 = math.atan2(x_46_im, x_46_re) * y_46_re
	t_1 = math.log(math.sqrt(((x_46_im * x_46_im) + (x_46_re * x_46_re))))
	tmp = 0
	if (math.sin(((y_46_im * t_1) + t_0)) * math.exp(((t_1 * y_46_re) - (y_46_im * math.atan2(x_46_im, x_46_re))))) <= -0.0002:
		tmp = (math.log(x_46_re) + ((0.5 * (x_46_im * x_46_im)) / (x_46_re * x_46_re))) * y_46_im
	else:
		tmp = t_0
	return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im)
	t_0 = Float64(atan(x_46_im, x_46_re) * y_46_re)
	t_1 = log(sqrt(Float64(Float64(x_46_im * x_46_im) + Float64(x_46_re * x_46_re))))
	tmp = 0.0
	if (Float64(sin(Float64(Float64(y_46_im * t_1) + t_0)) * exp(Float64(Float64(t_1 * y_46_re) - Float64(y_46_im * atan(x_46_im, x_46_re))))) <= -0.0002)
		tmp = Float64(Float64(log(x_46_re) + Float64(Float64(0.5 * Float64(x_46_im * x_46_im)) / Float64(x_46_re * x_46_re))) * y_46_im);
	else
		tmp = t_0;
	end
	return tmp
end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im)
	t_0 = atan2(x_46_im, x_46_re) * y_46_re;
	t_1 = log(sqrt(((x_46_im * x_46_im) + (x_46_re * x_46_re))));
	tmp = 0.0;
	if ((sin(((y_46_im * t_1) + t_0)) * exp(((t_1 * y_46_re) - (y_46_im * atan2(x_46_im, x_46_re))))) <= -0.0002)
		tmp = (log(x_46_re) + ((0.5 * (x_46_im * x_46_im)) / (x_46_re * x_46_re))) * y_46_im;
	else
		tmp = t_0;
	end
	tmp_2 = tmp;
end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]}, Block[{t$95$1 = N[Log[N[Sqrt[N[(N[(x$46$im * x$46$im), $MachinePrecision] + N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]}, If[LessEqual[N[(N[Sin[N[(N[(y$46$im * t$95$1), $MachinePrecision] + t$95$0), $MachinePrecision]], $MachinePrecision] * N[Exp[N[(N[(t$95$1 * y$46$re), $MachinePrecision] - N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], -0.0002], N[(N[(N[Log[x$46$re], $MachinePrecision] + N[(N[(0.5 * N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision] / N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * y$46$im), $MachinePrecision], t$95$0]]]
\begin{array}{l}

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

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


\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)))) < -2.0000000000000001e-4

    1. Initial program 53.7%

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

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

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

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

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

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

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

        \[\leadsto y.im \cdot \color{blue}{\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)} \]
      3. Step-by-step derivation
        1. Applied rewrites3.9%

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

          \[\leadsto y.im \cdot \left(\log x.re + \frac{1}{2} \cdot \color{blue}{\frac{{x.im}^{2}}{{x.re}^{2}}}\right) \]
        3. Step-by-step derivation
          1. Applied rewrites24.5%

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

          if -2.0000000000000001e-4 < (*.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 40.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto y.re \cdot \color{blue}{\tan^{-1}_* \frac{x.im}{x.re}} \]
            3. Step-by-step derivation
              1. Applied rewrites13.8%

                \[\leadsto y.re \cdot \color{blue}{\tan^{-1}_* \frac{x.im}{x.re}} \]
            4. Recombined 2 regimes into one program.
            5. Final simplification15.2%

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

            Alternative 3: 78.0% accurate, 0.9× speedup?

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

              1. Initial program 40.5%

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

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

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

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

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

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

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

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

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

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

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

              if -3.80000000000000028e-8 < y.re < 0.0749999999999999972

              1. Initial program 40.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              if 0.0749999999999999972 < y.re

              1. Initial program 47.4%

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

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

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

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

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

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

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

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

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

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

            Alternative 4: 77.8% accurate, 1.0× speedup?

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

              1. Initial program 41.0%

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

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

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

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

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

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

              if -1.70000000000000001e-18 < y.re < 0.0749999999999999972

              1. Initial program 40.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              if 0.0749999999999999972 < y.re

              1. Initial program 47.4%

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

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

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

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

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

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

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

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

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

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

            Alternative 5: 75.5% accurate, 1.0× speedup?

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

              1. Initial program 43.8%

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

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

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

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

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

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

              if -1.70000000000000001e-18 < y.re < 0.062

              1. Initial program 40.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            Alternative 6: 66.5% accurate, 1.2× speedup?

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

              1. Initial program 41.4%

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

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

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

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

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

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

              if -6.9999999999999995e-73 < y.re < 3.7e-47

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            Alternative 7: 63.9% accurate, 1.2× speedup?

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

              1. Initial program 39.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

              if -27 < y.re < 4.6000000000000001e-48

              1. Initial program 44.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. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            Alternative 8: 63.9% accurate, 1.3× speedup?

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

              1. Initial program 39.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

              if -27 < y.re < 4.6000000000000001e-48

              1. Initial program 44.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            Alternative 9: 49.0% accurate, 1.5× speedup?

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

              1. Initial program 44.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

              if -5.50000000000000022e-41 < y.re < -4.79999999999999994e-294

              1. Initial program 35.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                if -4.79999999999999994e-294 < y.re < 5.80000000000000038e-186

                1. Initial program 44.4%

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

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

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

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

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

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

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

                    \[\leadsto y.im \cdot \color{blue}{\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)} \]
                  3. Step-by-step derivation
                    1. Applied rewrites49.2%

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

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

                  Alternative 10: 51.5% accurate, 1.6× speedup?

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

                    1. Initial program 44.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

                    if -1.75e-72 < y.re < 5.80000000000000038e-186

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

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

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

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

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

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

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

                        \[\leadsto y.im \cdot \color{blue}{\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)} \]
                      3. Step-by-step derivation
                        1. Applied rewrites34.1%

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

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

                      Alternative 11: 46.5% accurate, 2.0× speedup?

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

                        1. Initial program 41.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                          if -9e-72 < y.re < 5.80000000000000038e-186

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

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

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

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

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

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

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

                              \[\leadsto y.im \cdot \color{blue}{\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)} \]
                            3. Step-by-step derivation
                              1. Applied rewrites34.1%

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

                              if 5.80000000000000038e-186 < y.re < 1.00000000000000006e-9

                              1. Initial program 50.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                  \[\leadsto y.re \cdot \color{blue}{\tan^{-1}_* \frac{x.im}{x.re}} \]
                                3. Step-by-step derivation
                                  1. Applied rewrites30.5%

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

                                  if 1.00000000000000006e-9 < y.re

                                  1. Initial program 44.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                  Alternative 12: 46.5% accurate, 2.0× speedup?

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

                                    1. Initial program 40.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                      if -1.50000000000000001e-51 < y.re < 5.80000000000000038e-186

                                      1. Initial program 38.5%

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

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

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

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

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

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

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

                                          \[\leadsto y.im \cdot \color{blue}{\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)} \]
                                        3. Step-by-step derivation
                                          1. Applied rewrites33.7%

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

                                          if 5.80000000000000038e-186 < y.re < 1.00000000000000006e-9

                                          1. Initial program 50.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                              \[\leadsto y.re \cdot \color{blue}{\tan^{-1}_* \frac{x.im}{x.re}} \]
                                            3. Step-by-step derivation
                                              1. Applied rewrites30.5%

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

                                              if 1.00000000000000006e-9 < y.re

                                              1. Initial program 44.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                              Alternative 13: 41.9% accurate, 2.1× speedup?

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

                                                1. Initial program 40.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                  if -1.55000000000000005e-40 < y.re < 5.80000000000000038e-186

                                                  1. Initial program 38.5%

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

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

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

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

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

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

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

                                                      \[\leadsto y.im \cdot \color{blue}{\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)} \]
                                                    3. Step-by-step derivation
                                                      1. Applied rewrites31.7%

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

                                                      if 5.80000000000000038e-186 < y.re < 1.00000000000000006e-9

                                                      1. Initial program 50.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                          \[\leadsto y.re \cdot \color{blue}{\tan^{-1}_* \frac{x.im}{x.re}} \]
                                                        3. Step-by-step derivation
                                                          1. Applied rewrites30.5%

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

                                                          if 1.00000000000000006e-9 < y.re

                                                          1. Initial program 44.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                          Alternative 14: 41.9% accurate, 2.1× speedup?

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

                                                            1. Initial program 42.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                              if -2.49999999999999986e-68 < y.re < 5.80000000000000038e-186

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

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

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

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

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

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

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

                                                                  \[\leadsto y.im \cdot \color{blue}{\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)} \]
                                                                3. Step-by-step derivation
                                                                  1. Applied rewrites34.1%

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

                                                                  if 5.80000000000000038e-186 < y.re < 1.00000000000000006e-9

                                                                  1. Initial program 50.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                      \[\leadsto y.re \cdot \color{blue}{\tan^{-1}_* \frac{x.im}{x.re}} \]
                                                                    3. Step-by-step derivation
                                                                      1. Applied rewrites30.5%

                                                                        \[\leadsto y.re \cdot \color{blue}{\tan^{-1}_* \frac{x.im}{x.re}} \]
                                                                    4. Recombined 3 regimes into one program.
                                                                    5. Final simplification40.9%

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

                                                                    Alternative 15: 24.9% accurate, 2.1× speedup?

                                                                    \[\begin{array}{l} \\ \begin{array}{l} t_0 := 1 \cdot \sin \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\\ \mathbf{if}\;y.re \leq -1.75 \cdot 10^{-72}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;y.re \leq 5.8 \cdot 10^{-186}:\\ \;\;\;\;\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right) \cdot y.im\\ \mathbf{elif}\;y.re \leq 1.3 \cdot 10^{+54}:\\ \;\;\;\;t\_0\\ \mathbf{else}:\\ \;\;\;\;\left(\log \left({\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{2}\right) \cdot 0.5\right) \cdot y.im\\ \end{array} \end{array} \]
                                                                    (FPCore (x.re x.im y.re y.im)
                                                                     :precision binary64
                                                                     (let* ((t_0 (* 1.0 (sin (* (atan2 x.im x.re) y.re)))))
                                                                       (if (<= y.re -1.75e-72)
                                                                         t_0
                                                                         (if (<= y.re 5.8e-186)
                                                                           (* (log (hypot x.im x.re)) y.im)
                                                                           (if (<= y.re 1.3e+54)
                                                                             t_0
                                                                             (* (* (log (pow (hypot x.im x.re) 2.0)) 0.5) y.im))))))
                                                                    double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
                                                                    	double t_0 = 1.0 * sin((atan2(x_46_im, x_46_re) * y_46_re));
                                                                    	double tmp;
                                                                    	if (y_46_re <= -1.75e-72) {
                                                                    		tmp = t_0;
                                                                    	} else if (y_46_re <= 5.8e-186) {
                                                                    		tmp = log(hypot(x_46_im, x_46_re)) * y_46_im;
                                                                    	} else if (y_46_re <= 1.3e+54) {
                                                                    		tmp = t_0;
                                                                    	} else {
                                                                    		tmp = (log(pow(hypot(x_46_im, x_46_re), 2.0)) * 0.5) * y_46_im;
                                                                    	}
                                                                    	return tmp;
                                                                    }
                                                                    
                                                                    public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
                                                                    	double t_0 = 1.0 * Math.sin((Math.atan2(x_46_im, x_46_re) * y_46_re));
                                                                    	double tmp;
                                                                    	if (y_46_re <= -1.75e-72) {
                                                                    		tmp = t_0;
                                                                    	} else if (y_46_re <= 5.8e-186) {
                                                                    		tmp = Math.log(Math.hypot(x_46_im, x_46_re)) * y_46_im;
                                                                    	} else if (y_46_re <= 1.3e+54) {
                                                                    		tmp = t_0;
                                                                    	} else {
                                                                    		tmp = (Math.log(Math.pow(Math.hypot(x_46_im, x_46_re), 2.0)) * 0.5) * y_46_im;
                                                                    	}
                                                                    	return tmp;
                                                                    }
                                                                    
                                                                    def code(x_46_re, x_46_im, y_46_re, y_46_im):
                                                                    	t_0 = 1.0 * math.sin((math.atan2(x_46_im, x_46_re) * y_46_re))
                                                                    	tmp = 0
                                                                    	if y_46_re <= -1.75e-72:
                                                                    		tmp = t_0
                                                                    	elif y_46_re <= 5.8e-186:
                                                                    		tmp = math.log(math.hypot(x_46_im, x_46_re)) * y_46_im
                                                                    	elif y_46_re <= 1.3e+54:
                                                                    		tmp = t_0
                                                                    	else:
                                                                    		tmp = (math.log(math.pow(math.hypot(x_46_im, x_46_re), 2.0)) * 0.5) * y_46_im
                                                                    	return tmp
                                                                    
                                                                    function code(x_46_re, x_46_im, y_46_re, y_46_im)
                                                                    	t_0 = Float64(1.0 * sin(Float64(atan(x_46_im, x_46_re) * y_46_re)))
                                                                    	tmp = 0.0
                                                                    	if (y_46_re <= -1.75e-72)
                                                                    		tmp = t_0;
                                                                    	elseif (y_46_re <= 5.8e-186)
                                                                    		tmp = Float64(log(hypot(x_46_im, x_46_re)) * y_46_im);
                                                                    	elseif (y_46_re <= 1.3e+54)
                                                                    		tmp = t_0;
                                                                    	else
                                                                    		tmp = Float64(Float64(log((hypot(x_46_im, x_46_re) ^ 2.0)) * 0.5) * y_46_im);
                                                                    	end
                                                                    	return tmp
                                                                    end
                                                                    
                                                                    function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im)
                                                                    	t_0 = 1.0 * sin((atan2(x_46_im, x_46_re) * y_46_re));
                                                                    	tmp = 0.0;
                                                                    	if (y_46_re <= -1.75e-72)
                                                                    		tmp = t_0;
                                                                    	elseif (y_46_re <= 5.8e-186)
                                                                    		tmp = log(hypot(x_46_im, x_46_re)) * y_46_im;
                                                                    	elseif (y_46_re <= 1.3e+54)
                                                                    		tmp = t_0;
                                                                    	else
                                                                    		tmp = (log((hypot(x_46_im, x_46_re) ^ 2.0)) * 0.5) * y_46_im;
                                                                    	end
                                                                    	tmp_2 = tmp;
                                                                    end
                                                                    
                                                                    code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(1.0 * N[Sin[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -1.75e-72], t$95$0, If[LessEqual[y$46$re, 5.8e-186], N[(N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im), $MachinePrecision], If[LessEqual[y$46$re, 1.3e+54], t$95$0, N[(N[(N[Log[N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], 2.0], $MachinePrecision]], $MachinePrecision] * 0.5), $MachinePrecision] * y$46$im), $MachinePrecision]]]]]
                                                                    
                                                                    \begin{array}{l}
                                                                    
                                                                    \\
                                                                    \begin{array}{l}
                                                                    t_0 := 1 \cdot \sin \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\\
                                                                    \mathbf{if}\;y.re \leq -1.75 \cdot 10^{-72}:\\
                                                                    \;\;\;\;t\_0\\
                                                                    
                                                                    \mathbf{elif}\;y.re \leq 5.8 \cdot 10^{-186}:\\
                                                                    \;\;\;\;\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right) \cdot y.im\\
                                                                    
                                                                    \mathbf{elif}\;y.re \leq 1.3 \cdot 10^{+54}:\\
                                                                    \;\;\;\;t\_0\\
                                                                    
                                                                    \mathbf{else}:\\
                                                                    \;\;\;\;\left(\log \left({\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{2}\right) \cdot 0.5\right) \cdot y.im\\
                                                                    
                                                                    
                                                                    \end{array}
                                                                    \end{array}
                                                                    
                                                                    Derivation
                                                                    1. Split input into 3 regimes
                                                                    2. if y.re < -1.75e-72 or 5.80000000000000038e-186 < y.re < 1.30000000000000003e54

                                                                      1. Initial program 44.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                        if -1.75e-72 < y.re < 5.80000000000000038e-186

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

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

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

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

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

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

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

                                                                            \[\leadsto y.im \cdot \color{blue}{\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)} \]
                                                                          3. Step-by-step derivation
                                                                            1. Applied rewrites34.1%

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

                                                                            if 1.30000000000000003e54 < y.re

                                                                            1. Initial program 42.9%

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

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

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

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

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

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

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

                                                                                \[\leadsto y.im \cdot \color{blue}{\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)} \]
                                                                              3. Step-by-step derivation
                                                                                1. Applied rewrites2.5%

                                                                                  \[\leadsto y.im \cdot \color{blue}{\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)} \]
                                                                                2. Step-by-step derivation
                                                                                  1. Applied rewrites28.1%

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

                                                                                  \[\leadsto \begin{array}{l} \mathbf{if}\;y.re \leq -1.75 \cdot 10^{-72}:\\ \;\;\;\;1 \cdot \sin \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\\ \mathbf{elif}\;y.re \leq 5.8 \cdot 10^{-186}:\\ \;\;\;\;\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right) \cdot y.im\\ \mathbf{elif}\;y.re \leq 1.3 \cdot 10^{+54}:\\ \;\;\;\;1 \cdot \sin \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\log \left({\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{2}\right) \cdot 0.5\right) \cdot y.im\\ \end{array} \]
                                                                                5. Add Preprocessing

                                                                                Alternative 16: 17.3% accurate, 3.1× speedup?

                                                                                \[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{0.5 \cdot \left(x.im \cdot x.im\right)}{x.re \cdot x.re}\\ \mathbf{if}\;x.re \leq -5 \cdot 10^{-309}:\\ \;\;\;\;\mathsf{fma}\left(-1, \log \left(\frac{-1}{x.re}\right), t\_0\right) \cdot y.im\\ \mathbf{elif}\;x.re \leq 6.5 \cdot 10^{-136}:\\ \;\;\;\;\left(\log x.re + t\_0\right) \cdot y.im\\ \mathbf{else}:\\ \;\;\;\;\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right) \cdot y.im\\ \end{array} \end{array} \]
                                                                                (FPCore (x.re x.im y.re y.im)
                                                                                 :precision binary64
                                                                                 (let* ((t_0 (/ (* 0.5 (* x.im x.im)) (* x.re x.re))))
                                                                                   (if (<= x.re -5e-309)
                                                                                     (* (fma -1.0 (log (/ -1.0 x.re)) t_0) y.im)
                                                                                     (if (<= x.re 6.5e-136)
                                                                                       (* (+ (log x.re) t_0) y.im)
                                                                                       (* (log (hypot x.im x.re)) y.im)))))
                                                                                double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
                                                                                	double t_0 = (0.5 * (x_46_im * x_46_im)) / (x_46_re * x_46_re);
                                                                                	double tmp;
                                                                                	if (x_46_re <= -5e-309) {
                                                                                		tmp = fma(-1.0, log((-1.0 / x_46_re)), t_0) * y_46_im;
                                                                                	} else if (x_46_re <= 6.5e-136) {
                                                                                		tmp = (log(x_46_re) + t_0) * y_46_im;
                                                                                	} else {
                                                                                		tmp = log(hypot(x_46_im, x_46_re)) * y_46_im;
                                                                                	}
                                                                                	return tmp;
                                                                                }
                                                                                
                                                                                function code(x_46_re, x_46_im, y_46_re, y_46_im)
                                                                                	t_0 = Float64(Float64(0.5 * Float64(x_46_im * x_46_im)) / Float64(x_46_re * x_46_re))
                                                                                	tmp = 0.0
                                                                                	if (x_46_re <= -5e-309)
                                                                                		tmp = Float64(fma(-1.0, log(Float64(-1.0 / x_46_re)), t_0) * y_46_im);
                                                                                	elseif (x_46_re <= 6.5e-136)
                                                                                		tmp = Float64(Float64(log(x_46_re) + t_0) * y_46_im);
                                                                                	else
                                                                                		tmp = Float64(log(hypot(x_46_im, x_46_re)) * y_46_im);
                                                                                	end
                                                                                	return tmp
                                                                                end
                                                                                
                                                                                code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[(0.5 * N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision] / N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x$46$re, -5e-309], N[(N[(-1.0 * N[Log[N[(-1.0 / x$46$re), $MachinePrecision]], $MachinePrecision] + t$95$0), $MachinePrecision] * y$46$im), $MachinePrecision], If[LessEqual[x$46$re, 6.5e-136], N[(N[(N[Log[x$46$re], $MachinePrecision] + t$95$0), $MachinePrecision] * y$46$im), $MachinePrecision], N[(N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im), $MachinePrecision]]]]
                                                                                
                                                                                \begin{array}{l}
                                                                                
                                                                                \\
                                                                                \begin{array}{l}
                                                                                t_0 := \frac{0.5 \cdot \left(x.im \cdot x.im\right)}{x.re \cdot x.re}\\
                                                                                \mathbf{if}\;x.re \leq -5 \cdot 10^{-309}:\\
                                                                                \;\;\;\;\mathsf{fma}\left(-1, \log \left(\frac{-1}{x.re}\right), t\_0\right) \cdot y.im\\
                                                                                
                                                                                \mathbf{elif}\;x.re \leq 6.5 \cdot 10^{-136}:\\
                                                                                \;\;\;\;\left(\log x.re + t\_0\right) \cdot y.im\\
                                                                                
                                                                                \mathbf{else}:\\
                                                                                \;\;\;\;\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right) \cdot y.im\\
                                                                                
                                                                                
                                                                                \end{array}
                                                                                \end{array}
                                                                                
                                                                                Derivation
                                                                                1. Split input into 3 regimes
                                                                                2. if x.re < -4.9999999999999995e-309

                                                                                  1. Initial program 41.0%

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

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

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

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

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

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

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

                                                                                      \[\leadsto y.im \cdot \color{blue}{\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)} \]
                                                                                    3. Step-by-step derivation
                                                                                      1. Applied rewrites12.9%

                                                                                        \[\leadsto y.im \cdot \color{blue}{\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)} \]
                                                                                      2. Taylor expanded in x.re around -inf

                                                                                        \[\leadsto y.im \cdot \left(-1 \cdot \log \left(\frac{-1}{x.re}\right) + \frac{1}{2} \cdot \color{blue}{\frac{{x.im}^{2}}{{x.re}^{2}}}\right) \]
                                                                                      3. Step-by-step derivation
                                                                                        1. Applied rewrites16.8%

                                                                                          \[\leadsto y.im \cdot \mathsf{fma}\left(-1, \log \left(\frac{-1}{x.re}\right), \frac{0.5 \cdot \left(x.im \cdot x.im\right)}{x.re \cdot x.re}\right) \]

                                                                                        if -4.9999999999999995e-309 < x.re < 6.50000000000000011e-136

                                                                                        1. Initial program 52.6%

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

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

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

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

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

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

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

                                                                                            \[\leadsto y.im \cdot \color{blue}{\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)} \]
                                                                                          3. Step-by-step derivation
                                                                                            1. Applied rewrites8.5%

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

                                                                                              \[\leadsto y.im \cdot \left(\log x.re + \frac{1}{2} \cdot \color{blue}{\frac{{x.im}^{2}}{{x.re}^{2}}}\right) \]
                                                                                            3. Step-by-step derivation
                                                                                              1. Applied rewrites34.9%

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

                                                                                              if 6.50000000000000011e-136 < x.re

                                                                                              1. Initial program 39.7%

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

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

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

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

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

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

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

                                                                                                  \[\leadsto y.im \cdot \color{blue}{\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)} \]
                                                                                                3. Step-by-step derivation
                                                                                                  1. Applied rewrites19.3%

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

                                                                                                  \[\leadsto \begin{array}{l} \mathbf{if}\;x.re \leq -5 \cdot 10^{-309}:\\ \;\;\;\;\mathsf{fma}\left(-1, \log \left(\frac{-1}{x.re}\right), \frac{0.5 \cdot \left(x.im \cdot x.im\right)}{x.re \cdot x.re}\right) \cdot y.im\\ \mathbf{elif}\;x.re \leq 6.5 \cdot 10^{-136}:\\ \;\;\;\;\left(\log x.re + \frac{0.5 \cdot \left(x.im \cdot x.im\right)}{x.re \cdot x.re}\right) \cdot y.im\\ \mathbf{else}:\\ \;\;\;\;\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right) \cdot y.im\\ \end{array} \]
                                                                                                6. Add Preprocessing

                                                                                                Alternative 17: 17.2% accurate, 4.4× speedup?

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

                                                                                                  1. Initial program 41.0%

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

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

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

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

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

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

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

                                                                                                      \[\leadsto y.im \cdot \color{blue}{\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)} \]
                                                                                                    3. Step-by-step derivation
                                                                                                      1. Applied rewrites12.9%

                                                                                                        \[\leadsto y.im \cdot \color{blue}{\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)} \]
                                                                                                      2. Taylor expanded in x.re around -inf

                                                                                                        \[\leadsto y.im \cdot \left(-1 \cdot \log \left(\frac{-1}{x.re}\right) + \frac{1}{2} \cdot \color{blue}{\frac{{x.im}^{2}}{{x.re}^{2}}}\right) \]
                                                                                                      3. Step-by-step derivation
                                                                                                        1. Applied rewrites16.8%

                                                                                                          \[\leadsto y.im \cdot \mathsf{fma}\left(-1, \log \left(\frac{-1}{x.re}\right), \frac{0.5 \cdot \left(x.im \cdot x.im\right)}{x.re \cdot x.re}\right) \]

                                                                                                        if -4.9999999999999995e-309 < x.re

                                                                                                        1. Initial program 43.4%

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

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

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

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

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

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

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

                                                                                                            \[\leadsto y.im \cdot \color{blue}{\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)} \]
                                                                                                          3. Step-by-step derivation
                                                                                                            1. Applied rewrites16.2%

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

                                                                                                              \[\leadsto y.im \cdot \left(\log x.re + \frac{1}{2} \cdot \color{blue}{\frac{{x.im}^{2}}{{x.re}^{2}}}\right) \]
                                                                                                            3. Step-by-step derivation
                                                                                                              1. Applied rewrites19.4%

                                                                                                                \[\leadsto y.im \cdot \left(\log x.re + \frac{0.5 \cdot \left(x.im \cdot x.im\right)}{\color{blue}{x.re \cdot x.re}}\right) \]
                                                                                                            4. Recombined 2 regimes into one program.
                                                                                                            5. Final simplification18.2%

                                                                                                              \[\leadsto \begin{array}{l} \mathbf{if}\;x.re \leq -5 \cdot 10^{-309}:\\ \;\;\;\;\mathsf{fma}\left(-1, \log \left(\frac{-1}{x.re}\right), \frac{0.5 \cdot \left(x.im \cdot x.im\right)}{x.re \cdot x.re}\right) \cdot y.im\\ \mathbf{else}:\\ \;\;\;\;\left(\log x.re + \frac{0.5 \cdot \left(x.im \cdot x.im\right)}{x.re \cdot x.re}\right) \cdot y.im\\ \end{array} \]
                                                                                                            6. Add Preprocessing

                                                                                                            Alternative 18: 14.1% accurate, 4.8× speedup?

                                                                                                            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x.im \leq 6.2 \cdot 10^{-233}:\\ \;\;\;\;\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\\ \mathbf{else}:\\ \;\;\;\;\left(\frac{0.5 \cdot \left(x.re \cdot x.re\right)}{x.im \cdot x.im} + \log x.im\right) \cdot y.im\\ \end{array} \end{array} \]
                                                                                                            (FPCore (x.re x.im y.re y.im)
                                                                                                             :precision binary64
                                                                                                             (if (<= x.im 6.2e-233)
                                                                                                               (* (atan2 x.im x.re) y.re)
                                                                                                               (* (+ (/ (* 0.5 (* x.re x.re)) (* x.im x.im)) (log x.im)) y.im)))
                                                                                                            double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
                                                                                                            	double tmp;
                                                                                                            	if (x_46_im <= 6.2e-233) {
                                                                                                            		tmp = atan2(x_46_im, x_46_re) * y_46_re;
                                                                                                            	} else {
                                                                                                            		tmp = (((0.5 * (x_46_re * x_46_re)) / (x_46_im * x_46_im)) + log(x_46_im)) * y_46_im;
                                                                                                            	}
                                                                                                            	return tmp;
                                                                                                            }
                                                                                                            
                                                                                                            real(8) function code(x_46re, x_46im, y_46re, y_46im)
                                                                                                                real(8), intent (in) :: x_46re
                                                                                                                real(8), intent (in) :: x_46im
                                                                                                                real(8), intent (in) :: y_46re
                                                                                                                real(8), intent (in) :: y_46im
                                                                                                                real(8) :: tmp
                                                                                                                if (x_46im <= 6.2d-233) then
                                                                                                                    tmp = atan2(x_46im, x_46re) * y_46re
                                                                                                                else
                                                                                                                    tmp = (((0.5d0 * (x_46re * x_46re)) / (x_46im * x_46im)) + log(x_46im)) * y_46im
                                                                                                                end if
                                                                                                                code = tmp
                                                                                                            end function
                                                                                                            
                                                                                                            public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
                                                                                                            	double tmp;
                                                                                                            	if (x_46_im <= 6.2e-233) {
                                                                                                            		tmp = Math.atan2(x_46_im, x_46_re) * y_46_re;
                                                                                                            	} else {
                                                                                                            		tmp = (((0.5 * (x_46_re * x_46_re)) / (x_46_im * x_46_im)) + Math.log(x_46_im)) * y_46_im;
                                                                                                            	}
                                                                                                            	return tmp;
                                                                                                            }
                                                                                                            
                                                                                                            def code(x_46_re, x_46_im, y_46_re, y_46_im):
                                                                                                            	tmp = 0
                                                                                                            	if x_46_im <= 6.2e-233:
                                                                                                            		tmp = math.atan2(x_46_im, x_46_re) * y_46_re
                                                                                                            	else:
                                                                                                            		tmp = (((0.5 * (x_46_re * x_46_re)) / (x_46_im * x_46_im)) + math.log(x_46_im)) * y_46_im
                                                                                                            	return tmp
                                                                                                            
                                                                                                            function code(x_46_re, x_46_im, y_46_re, y_46_im)
                                                                                                            	tmp = 0.0
                                                                                                            	if (x_46_im <= 6.2e-233)
                                                                                                            		tmp = Float64(atan(x_46_im, x_46_re) * y_46_re);
                                                                                                            	else
                                                                                                            		tmp = Float64(Float64(Float64(Float64(0.5 * Float64(x_46_re * x_46_re)) / Float64(x_46_im * x_46_im)) + log(x_46_im)) * y_46_im);
                                                                                                            	end
                                                                                                            	return tmp
                                                                                                            end
                                                                                                            
                                                                                                            function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im)
                                                                                                            	tmp = 0.0;
                                                                                                            	if (x_46_im <= 6.2e-233)
                                                                                                            		tmp = atan2(x_46_im, x_46_re) * y_46_re;
                                                                                                            	else
                                                                                                            		tmp = (((0.5 * (x_46_re * x_46_re)) / (x_46_im * x_46_im)) + log(x_46_im)) * y_46_im;
                                                                                                            	end
                                                                                                            	tmp_2 = tmp;
                                                                                                            end
                                                                                                            
                                                                                                            code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[x$46$im, 6.2e-233], N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision], N[(N[(N[(N[(0.5 * N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision] / N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision] + N[Log[x$46$im], $MachinePrecision]), $MachinePrecision] * y$46$im), $MachinePrecision]]
                                                                                                            
                                                                                                            \begin{array}{l}
                                                                                                            
                                                                                                            \\
                                                                                                            \begin{array}{l}
                                                                                                            \mathbf{if}\;x.im \leq 6.2 \cdot 10^{-233}:\\
                                                                                                            \;\;\;\;\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\\
                                                                                                            
                                                                                                            \mathbf{else}:\\
                                                                                                            \;\;\;\;\left(\frac{0.5 \cdot \left(x.re \cdot x.re\right)}{x.im \cdot x.im} + \log x.im\right) \cdot y.im\\
                                                                                                            
                                                                                                            
                                                                                                            \end{array}
                                                                                                            \end{array}
                                                                                                            
                                                                                                            Derivation
                                                                                                            1. Split input into 2 regimes
                                                                                                            2. if x.im < 6.2000000000000003e-233

                                                                                                              1. Initial program 41.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                                                  \[\leadsto y.re \cdot \color{blue}{\tan^{-1}_* \frac{x.im}{x.re}} \]
                                                                                                                3. Step-by-step derivation
                                                                                                                  1. Applied rewrites16.0%

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

                                                                                                                  if 6.2000000000000003e-233 < x.im

                                                                                                                  1. Initial program 43.0%

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

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

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

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

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

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

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

                                                                                                                      \[\leadsto y.im \cdot \color{blue}{\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)} \]
                                                                                                                    3. Step-by-step derivation
                                                                                                                      1. Applied rewrites13.1%

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

                                                                                                                        \[\leadsto y.im \cdot \left(\log x.im + \frac{1}{2} \cdot \color{blue}{\frac{{x.re}^{2}}{{x.im}^{2}}}\right) \]
                                                                                                                      3. Step-by-step derivation
                                                                                                                        1. Applied rewrites12.0%

                                                                                                                          \[\leadsto y.im \cdot \left(\log x.im + \frac{0.5 \cdot \left(x.re \cdot x.re\right)}{\color{blue}{x.im \cdot x.im}}\right) \]
                                                                                                                      4. Recombined 2 regimes into one program.
                                                                                                                      5. Final simplification14.2%

                                                                                                                        \[\leadsto \begin{array}{l} \mathbf{if}\;x.im \leq 6.2 \cdot 10^{-233}:\\ \;\;\;\;\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\\ \mathbf{else}:\\ \;\;\;\;\left(\frac{0.5 \cdot \left(x.re \cdot x.re\right)}{x.im \cdot x.im} + \log x.im\right) \cdot y.im\\ \end{array} \]
                                                                                                                      6. Add Preprocessing

                                                                                                                      Alternative 19: 9.1% accurate, 6.1× speedup?

                                                                                                                      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x.re \leq 8.8 \cdot 10^{-198}:\\ \;\;\;\;\log x.im \cdot y.im\\ \mathbf{else}:\\ \;\;\;\;\log x.re \cdot y.im\\ \end{array} \end{array} \]
                                                                                                                      (FPCore (x.re x.im y.re y.im)
                                                                                                                       :precision binary64
                                                                                                                       (if (<= x.re 8.8e-198) (* (log x.im) y.im) (* (log x.re) y.im)))
                                                                                                                      double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
                                                                                                                      	double tmp;
                                                                                                                      	if (x_46_re <= 8.8e-198) {
                                                                                                                      		tmp = log(x_46_im) * y_46_im;
                                                                                                                      	} else {
                                                                                                                      		tmp = log(x_46_re) * y_46_im;
                                                                                                                      	}
                                                                                                                      	return tmp;
                                                                                                                      }
                                                                                                                      
                                                                                                                      real(8) function code(x_46re, x_46im, y_46re, y_46im)
                                                                                                                          real(8), intent (in) :: x_46re
                                                                                                                          real(8), intent (in) :: x_46im
                                                                                                                          real(8), intent (in) :: y_46re
                                                                                                                          real(8), intent (in) :: y_46im
                                                                                                                          real(8) :: tmp
                                                                                                                          if (x_46re <= 8.8d-198) then
                                                                                                                              tmp = log(x_46im) * y_46im
                                                                                                                          else
                                                                                                                              tmp = log(x_46re) * y_46im
                                                                                                                          end if
                                                                                                                          code = tmp
                                                                                                                      end function
                                                                                                                      
                                                                                                                      public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
                                                                                                                      	double tmp;
                                                                                                                      	if (x_46_re <= 8.8e-198) {
                                                                                                                      		tmp = Math.log(x_46_im) * y_46_im;
                                                                                                                      	} else {
                                                                                                                      		tmp = Math.log(x_46_re) * y_46_im;
                                                                                                                      	}
                                                                                                                      	return tmp;
                                                                                                                      }
                                                                                                                      
                                                                                                                      def code(x_46_re, x_46_im, y_46_re, y_46_im):
                                                                                                                      	tmp = 0
                                                                                                                      	if x_46_re <= 8.8e-198:
                                                                                                                      		tmp = math.log(x_46_im) * y_46_im
                                                                                                                      	else:
                                                                                                                      		tmp = math.log(x_46_re) * y_46_im
                                                                                                                      	return tmp
                                                                                                                      
                                                                                                                      function code(x_46_re, x_46_im, y_46_re, y_46_im)
                                                                                                                      	tmp = 0.0
                                                                                                                      	if (x_46_re <= 8.8e-198)
                                                                                                                      		tmp = Float64(log(x_46_im) * y_46_im);
                                                                                                                      	else
                                                                                                                      		tmp = Float64(log(x_46_re) * y_46_im);
                                                                                                                      	end
                                                                                                                      	return tmp
                                                                                                                      end
                                                                                                                      
                                                                                                                      function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im)
                                                                                                                      	tmp = 0.0;
                                                                                                                      	if (x_46_re <= 8.8e-198)
                                                                                                                      		tmp = log(x_46_im) * y_46_im;
                                                                                                                      	else
                                                                                                                      		tmp = log(x_46_re) * y_46_im;
                                                                                                                      	end
                                                                                                                      	tmp_2 = tmp;
                                                                                                                      end
                                                                                                                      
                                                                                                                      code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[x$46$re, 8.8e-198], N[(N[Log[x$46$im], $MachinePrecision] * y$46$im), $MachinePrecision], N[(N[Log[x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]]
                                                                                                                      
                                                                                                                      \begin{array}{l}
                                                                                                                      
                                                                                                                      \\
                                                                                                                      \begin{array}{l}
                                                                                                                      \mathbf{if}\;x.re \leq 8.8 \cdot 10^{-198}:\\
                                                                                                                      \;\;\;\;\log x.im \cdot y.im\\
                                                                                                                      
                                                                                                                      \mathbf{else}:\\
                                                                                                                      \;\;\;\;\log x.re \cdot y.im\\
                                                                                                                      
                                                                                                                      
                                                                                                                      \end{array}
                                                                                                                      \end{array}
                                                                                                                      
                                                                                                                      Derivation
                                                                                                                      1. Split input into 2 regimes
                                                                                                                      2. if x.re < 8.8000000000000001e-198

                                                                                                                        1. Initial program 43.6%

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

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

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

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

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

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

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

                                                                                                                            \[\leadsto y.im \cdot \color{blue}{\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)} \]
                                                                                                                          3. Step-by-step derivation
                                                                                                                            1. Applied rewrites13.0%

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

                                                                                                                              \[\leadsto y.im \cdot \log x.im \]
                                                                                                                            3. Step-by-step derivation
                                                                                                                              1. Applied rewrites4.4%

                                                                                                                                \[\leadsto y.im \cdot \log x.im \]

                                                                                                                              if 8.8000000000000001e-198 < x.re

                                                                                                                              1. Initial program 40.5%

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

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

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

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

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

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

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

                                                                                                                                  \[\leadsto y.im \cdot \color{blue}{\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)} \]
                                                                                                                                3. Step-by-step derivation
                                                                                                                                  1. Applied rewrites16.7%

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

                                                                                                                                    \[\leadsto y.im \cdot \log x.re \]
                                                                                                                                  3. Step-by-step derivation
                                                                                                                                    1. Applied rewrites13.8%

                                                                                                                                      \[\leadsto y.im \cdot \log x.re \]
                                                                                                                                  4. Recombined 2 regimes into one program.
                                                                                                                                  5. Final simplification8.6%

                                                                                                                                    \[\leadsto \begin{array}{l} \mathbf{if}\;x.re \leq 8.8 \cdot 10^{-198}:\\ \;\;\;\;\log x.im \cdot y.im\\ \mathbf{else}:\\ \;\;\;\;\log x.re \cdot y.im\\ \end{array} \]
                                                                                                                                  6. Add Preprocessing

                                                                                                                                  Alternative 20: 13.6% accurate, 6.4× speedup?

                                                                                                                                  \[\begin{array}{l} \\ \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re \end{array} \]
                                                                                                                                  (FPCore (x.re x.im y.re y.im) :precision binary64 (* (atan2 x.im x.re) y.re))
                                                                                                                                  double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
                                                                                                                                  	return atan2(x_46_im, x_46_re) * y_46_re;
                                                                                                                                  }
                                                                                                                                  
                                                                                                                                  real(8) function code(x_46re, x_46im, y_46re, y_46im)
                                                                                                                                      real(8), intent (in) :: x_46re
                                                                                                                                      real(8), intent (in) :: x_46im
                                                                                                                                      real(8), intent (in) :: y_46re
                                                                                                                                      real(8), intent (in) :: y_46im
                                                                                                                                      code = atan2(x_46im, x_46re) * y_46re
                                                                                                                                  end function
                                                                                                                                  
                                                                                                                                  public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
                                                                                                                                  	return Math.atan2(x_46_im, x_46_re) * y_46_re;
                                                                                                                                  }
                                                                                                                                  
                                                                                                                                  def code(x_46_re, x_46_im, y_46_re, y_46_im):
                                                                                                                                  	return math.atan2(x_46_im, x_46_re) * y_46_re
                                                                                                                                  
                                                                                                                                  function code(x_46_re, x_46_im, y_46_re, y_46_im)
                                                                                                                                  	return Float64(atan(x_46_im, x_46_re) * y_46_re)
                                                                                                                                  end
                                                                                                                                  
                                                                                                                                  function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im)
                                                                                                                                  	tmp = atan2(x_46_im, x_46_re) * y_46_re;
                                                                                                                                  end
                                                                                                                                  
                                                                                                                                  code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]
                                                                                                                                  
                                                                                                                                  \begin{array}{l}
                                                                                                                                  
                                                                                                                                  \\
                                                                                                                                  \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re
                                                                                                                                  \end{array}
                                                                                                                                  
                                                                                                                                  Derivation
                                                                                                                                  1. Initial program 42.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                                                                      \[\leadsto y.re \cdot \color{blue}{\tan^{-1}_* \frac{x.im}{x.re}} \]
                                                                                                                                    3. Step-by-step derivation
                                                                                                                                      1. Applied rewrites12.4%

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

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

                                                                                                                                      Alternative 21: 4.8% accurate, 6.4× speedup?

                                                                                                                                      \[\begin{array}{l} \\ \log x.im \cdot y.im \end{array} \]
                                                                                                                                      (FPCore (x.re x.im y.re y.im) :precision binary64 (* (log x.im) y.im))
                                                                                                                                      double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
                                                                                                                                      	return log(x_46_im) * y_46_im;
                                                                                                                                      }
                                                                                                                                      
                                                                                                                                      real(8) function code(x_46re, x_46im, y_46re, y_46im)
                                                                                                                                          real(8), intent (in) :: x_46re
                                                                                                                                          real(8), intent (in) :: x_46im
                                                                                                                                          real(8), intent (in) :: y_46re
                                                                                                                                          real(8), intent (in) :: y_46im
                                                                                                                                          code = log(x_46im) * y_46im
                                                                                                                                      end function
                                                                                                                                      
                                                                                                                                      public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
                                                                                                                                      	return Math.log(x_46_im) * y_46_im;
                                                                                                                                      }
                                                                                                                                      
                                                                                                                                      def code(x_46_re, x_46_im, y_46_re, y_46_im):
                                                                                                                                      	return math.log(x_46_im) * y_46_im
                                                                                                                                      
                                                                                                                                      function code(x_46_re, x_46_im, y_46_re, y_46_im)
                                                                                                                                      	return Float64(log(x_46_im) * y_46_im)
                                                                                                                                      end
                                                                                                                                      
                                                                                                                                      function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im)
                                                                                                                                      	tmp = log(x_46_im) * y_46_im;
                                                                                                                                      end
                                                                                                                                      
                                                                                                                                      code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[(N[Log[x$46$im], $MachinePrecision] * y$46$im), $MachinePrecision]
                                                                                                                                      
                                                                                                                                      \begin{array}{l}
                                                                                                                                      
                                                                                                                                      \\
                                                                                                                                      \log x.im \cdot y.im
                                                                                                                                      \end{array}
                                                                                                                                      
                                                                                                                                      Derivation
                                                                                                                                      1. Initial program 42.2%

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

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

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

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

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

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

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

                                                                                                                                          \[\leadsto y.im \cdot \color{blue}{\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)} \]
                                                                                                                                        3. Step-by-step derivation
                                                                                                                                          1. Applied rewrites14.6%

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

                                                                                                                                            \[\leadsto y.im \cdot \log x.im \]
                                                                                                                                          3. Step-by-step derivation
                                                                                                                                            1. Applied rewrites3.7%

                                                                                                                                              \[\leadsto y.im \cdot \log x.im \]
                                                                                                                                            2. Final simplification3.7%

                                                                                                                                              \[\leadsto \log x.im \cdot y.im \]
                                                                                                                                            3. Add Preprocessing

                                                                                                                                            Reproduce

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