powComplex, imaginary part

Percentage Accurate: 40.7% → 74.2%
Time: 17.6s
Alternatives: 20
Speedup: 2.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 20 alternatives:

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

Initial Program: 40.7% 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: 74.2% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
t_0 := y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
t_2 := t\_1 \cdot y.im\\
t_3 := e^{\log \left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right) \cdot y.re - t\_0}\\
t_4 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\\
\mathbf{if}\;y.re \leq -1.45 \cdot 10^{+43}:\\
\;\;\;\;\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\_3\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y.re < -1.4500000000000001e43

    1. Initial program 42.6%

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

      \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + 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.f6492.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.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 rewrites92.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.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 -1.4500000000000001e43 < y.re < 1.25e6

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.25e6 < y.re < 7.79999999999999962e174

    1. Initial program 34.6%

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

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

    if 7.79999999999999962e174 < y.re

    1. Initial program 38.7%

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

      \[\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. Taylor expanded in y.re around inf

      \[\leadsto \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 \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)}}} \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

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

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

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

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

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

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

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

        \[\leadsto \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(y.re \cdot \left(\frac{y.im \cdot \log \color{blue}{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}}{y.re} + \tan^{-1}_* \frac{x.im}{x.re}\right)\right)}} \]
      9. lower-atan2.f6445.2

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

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

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

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

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

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

      \[\leadsto \frac{1}{\frac{\color{blue}{1 + 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(y.re \cdot \left(\frac{y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)}{y.re} + \tan^{-1}_* \frac{x.im}{x.re}\right)\right)}} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification81.4%

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

Alternative 2: 77.5% accurate, 0.7× 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)\\ t_3 := t\_2 \cdot y.im\\ \mathbf{if}\;y.re \leq -5 \cdot 10^{-10}:\\ \;\;\;\;\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 4.1:\\ \;\;\;\;\frac{-1}{\frac{\frac{\frac{{\left(e^{y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}}{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}}{\sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\right)}}{-1}}\\ \mathbf{elif}\;y.re \leq 7.8 \cdot 10^{+174}:\\ \;\;\;\;\sin t\_3 \cdot t\_1\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\frac{t\_0 + 1}{\sin \left(\left(\frac{t\_3}{y.re} + \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot y.re\right) \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}}}\\ \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)))
        (t_3 (* t_2 y.im)))
   (if (<= y.re -5e-10)
     (* (sin (* (fma y.im (/ t_2 y.re) (atan2 x.im x.re)) y.re)) t_1)
     (if (<= y.re 4.1)
       (/
        -1.0
        (/
         (/
          (/ (pow (exp y.im) (atan2 x.im x.re)) (pow (hypot x.re x.im) y.re))
          (sin (fma (log (hypot x.re x.im)) y.im (* (atan2 x.im x.re) y.re))))
         -1.0))
       (if (<= y.re 7.8e+174)
         (* (sin t_3) t_1)
         (/
          1.0
          (/
           (+ t_0 1.0)
           (*
            (sin (* (+ (/ t_3 y.re) (atan2 x.im x.re)) y.re))
            (pow (hypot 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 = 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 t_3 = t_2 * y_46_im;
	double tmp;
	if (y_46_re <= -5e-10) {
		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 <= 4.1) {
		tmp = -1.0 / (((pow(exp(y_46_im), atan2(x_46_im, x_46_re)) / pow(hypot(x_46_re, x_46_im), y_46_re)) / sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, (atan2(x_46_im, x_46_re) * y_46_re)))) / -1.0);
	} else if (y_46_re <= 7.8e+174) {
		tmp = sin(t_3) * t_1;
	} else {
		tmp = 1.0 / ((t_0 + 1.0) / (sin((((t_3 / y_46_re) + atan2(x_46_im, x_46_re)) * y_46_re)) * pow(hypot(x_46_im, x_46_re), y_46_re)));
	}
	return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im)
	t_0 = Float64(y_46_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))
	t_3 = Float64(t_2 * y_46_im)
	tmp = 0.0
	if (y_46_re <= -5e-10)
		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 <= 4.1)
		tmp = Float64(-1.0 / Float64(Float64(Float64((exp(y_46_im) ^ atan(x_46_im, x_46_re)) / (hypot(x_46_re, x_46_im) ^ y_46_re)) / sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, Float64(atan(x_46_im, x_46_re) * y_46_re)))) / -1.0));
	elseif (y_46_re <= 7.8e+174)
		tmp = Float64(sin(t_3) * t_1);
	else
		tmp = Float64(1.0 / Float64(Float64(t_0 + 1.0) / Float64(sin(Float64(Float64(Float64(t_3 / y_46_re) + atan(x_46_im, x_46_re)) * y_46_re)) * (hypot(x_46_im, x_46_re) ^ y_46_re))));
	end
	return tmp
end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$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]}, Block[{t$95$3 = N[(t$95$2 * y$46$im), $MachinePrecision]}, If[LessEqual[y$46$re, -5e-10], 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, 4.1], N[(-1.0 / N[(N[(N[(N[Power[N[Exp[y$46$im], $MachinePrecision], N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision] / N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision] / N[Sin[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / -1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 7.8e+174], N[(N[Sin[t$95$3], $MachinePrecision] * t$95$1), $MachinePrecision], N[(1.0 / N[(N[(t$95$0 + 1.0), $MachinePrecision] / N[(N[Sin[N[(N[(N[(t$95$3 / y$46$re), $MachinePrecision] + N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision] * y$46$re), $MachinePrecision]], $MachinePrecision] * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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)\\
t_3 := t\_2 \cdot y.im\\
\mathbf{if}\;y.re \leq -5 \cdot 10^{-10}:\\
\;\;\;\;\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 4.1:\\
\;\;\;\;\frac{-1}{\frac{\frac{\frac{{\left(e^{y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}}{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}}{\sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\right)}}{-1}}\\

\mathbf{elif}\;y.re \leq 7.8 \cdot 10^{+174}:\\
\;\;\;\;\sin t\_3 \cdot t\_1\\

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


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

    1. Initial program 43.5%

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

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

    1. Initial program 39.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. 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 rewrites79.0%

      \[\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. /-rgt-identityN/A

        \[\leadsto \frac{1}{\color{blue}{\frac{\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)}}{1}}} \]
      2. frac-2negN/A

        \[\leadsto \frac{1}{\color{blue}{\frac{\mathsf{neg}\left(\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)}\right)}{\mathsf{neg}\left(1\right)}}} \]
      3. neg-sub0N/A

        \[\leadsto \frac{1}{\frac{\color{blue}{0 - \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)}}}{\mathsf{neg}\left(1\right)}} \]
      4. metadata-evalN/A

        \[\leadsto \frac{1}{\frac{0 - \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)}}{\color{blue}{-1}}} \]
      5. div-subN/A

        \[\leadsto \frac{1}{\color{blue}{\frac{0}{-1} - \frac{\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)}}{-1}}} \]
      6. metadata-evalN/A

        \[\leadsto \frac{1}{\color{blue}{0} - \frac{\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)}}{-1}} \]
      7. lower--.f64N/A

        \[\leadsto \frac{1}{\color{blue}{0 - \frac{\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)}}{-1}}} \]
      8. lower-/.f6485.4

        \[\leadsto \frac{1}{0 - \color{blue}{\frac{\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)}}{-1}}} \]
    6. Applied rewrites85.4%

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

    if 4.0999999999999996 < y.re < 7.79999999999999962e174

    1. Initial program 33.3%

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

      \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + 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.f6463.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(\log \color{blue}{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)} \cdot y.im\right) \]
    5. Applied rewrites63.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(\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right) \cdot y.im\right)} \]

    if 7.79999999999999962e174 < y.re

    1. Initial program 38.7%

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

      \[\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. Taylor expanded in y.re around inf

      \[\leadsto \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 \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)}}} \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

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

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

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

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

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

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

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

        \[\leadsto \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(y.re \cdot \left(\frac{y.im \cdot \log \color{blue}{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}}{y.re} + \tan^{-1}_* \frac{x.im}{x.re}\right)\right)}} \]
      9. lower-atan2.f6445.2

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

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

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

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

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

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

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

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

Alternative 3: 72.1% accurate, 0.9× speedup?

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

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

\mathbf{elif}\;y.im \leq 5.2 \cdot 10^{+98}:\\
\;\;\;\;\frac{1}{\frac{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re} + 1}{\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}:\\
\;\;\;\;t\_0\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y.im < -0.19 or 5.1999999999999999e98 < y.im

    1. Initial program 26.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -0.19 < y.im < 5.1999999999999999e98

    1. Initial program 47.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. 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 rewrites84.6%

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

      \[\leadsto \frac{1}{\frac{\color{blue}{1 + 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)}} \]
    6. Step-by-step derivation
      1. lower-+.f64N/A

        \[\leadsto \frac{1}{\frac{\color{blue}{1 + 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)}} \]
      2. lower-*.f64N/A

        \[\leadsto \frac{1}{\frac{1 + \color{blue}{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)}} \]
      3. lower-atan2.f6486.6

        \[\leadsto \frac{1}{\frac{1 + y.im \cdot \color{blue}{\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)}} \]
    7. Applied rewrites86.6%

      \[\leadsto \frac{1}{\frac{\color{blue}{1 + 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)}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification76.3%

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

Alternative 4: 63.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.45 \cdot 10^{+43}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;y.re \leq 6.2 \cdot 10^{-129}:\\ \;\;\;\;\frac{1}{\frac{\frac{1}{{\left(e^{y.im}\right)}^{\left(-\tan^{-1}_* \frac{x.im}{x.re}\right)}}}{\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))
          (exp
           (-
            (* (log (sqrt (+ (* x.im x.im) (* x.re x.re)))) y.re)
            (* y.im (atan2 x.im x.re)))))))
   (if (<= y.re -1.45e+43)
     t_0
     (if (<= y.re 6.2e-129)
       (/
        1.0
        (/
         (/ 1.0 (pow (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)) * 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.45e+43) {
		tmp = t_0;
	} else if (y_46_re <= 6.2e-129) {
		tmp = 1.0 / ((1.0 / pow(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.exp(((Math.log(Math.sqrt(((x_46_im * x_46_im) + (x_46_re * x_46_re)))) * y_46_re) - (y_46_im * Math.atan2(x_46_im, x_46_re))));
	double tmp;
	if (y_46_re <= -1.45e+43) {
		tmp = t_0;
	} else if (y_46_re <= 6.2e-129) {
		tmp = 1.0 / ((1.0 / Math.pow(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.exp(((math.log(math.sqrt(((x_46_im * x_46_im) + (x_46_re * x_46_re)))) * y_46_re) - (y_46_im * math.atan2(x_46_im, x_46_re))))
	tmp = 0
	if y_46_re <= -1.45e+43:
		tmp = t_0
	elif y_46_re <= 6.2e-129:
		tmp = 1.0 / ((1.0 / math.pow(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)) * 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.45e+43)
		tmp = t_0;
	elseif (y_46_re <= 6.2e-129)
		tmp = Float64(1.0 / Float64(Float64(1.0 / (exp(y_46_im) ^ Float64(-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)) * 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))));
	tmp = 0.0;
	if (y_46_re <= -1.45e+43)
		tmp = t_0;
	elseif (y_46_re <= 6.2e-129)
		tmp = 1.0 / ((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[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.45e+43], t$95$0, If[LessEqual[y$46$re, 6.2e-129], N[(1.0 / N[(N[(1.0 / N[Power[N[Exp[y$46$im], $MachinePrecision], (-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 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.45 \cdot 10^{+43}:\\
\;\;\;\;t\_0\\

\mathbf{elif}\;y.re \leq 6.2 \cdot 10^{-129}:\\
\;\;\;\;\frac{1}{\frac{\frac{1}{{\left(e^{y.im}\right)}^{\left(-\tan^{-1}_* \frac{x.im}{x.re}\right)}}}{\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 < -1.4500000000000001e43 or 6.2000000000000001e-129 < y.re

    1. Initial program 38.9%

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

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

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

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

    if -1.4500000000000001e43 < y.re < 6.2000000000000001e-129

    1. Initial program 39.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. 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 rewrites79.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 5: 64.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.45 \cdot 10^{+43}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;y.re \leq 1.05 \cdot 10^{-34}:\\ \;\;\;\;\frac{-1}{\frac{\frac{{\left(e^{y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}}{\sin \left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im\right)}}{-1}}\\ \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.45e+43)
         t_0
         (if (<= y.re 1.05e-34)
           (/
            -1.0
            (/
             (/
              (pow (exp y.im) (atan2 x.im x.re))
              (sin (* (log (hypot x.re x.im)) y.im)))
             -1.0))
           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.45e+43) {
    		tmp = t_0;
    	} else if (y_46_re <= 1.05e-34) {
    		tmp = -1.0 / ((pow(exp(y_46_im), atan2(x_46_im, x_46_re)) / sin((log(hypot(x_46_re, x_46_im)) * y_46_im))) / -1.0);
    	} 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.exp(((Math.log(Math.sqrt(((x_46_im * x_46_im) + (x_46_re * x_46_re)))) * y_46_re) - (y_46_im * Math.atan2(x_46_im, x_46_re))));
    	double tmp;
    	if (y_46_re <= -1.45e+43) {
    		tmp = t_0;
    	} else if (y_46_re <= 1.05e-34) {
    		tmp = -1.0 / ((Math.pow(Math.exp(y_46_im), Math.atan2(x_46_im, x_46_re)) / Math.sin((Math.log(Math.hypot(x_46_re, x_46_im)) * y_46_im))) / -1.0);
    	} 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.exp(((math.log(math.sqrt(((x_46_im * x_46_im) + (x_46_re * x_46_re)))) * y_46_re) - (y_46_im * math.atan2(x_46_im, x_46_re))))
    	tmp = 0
    	if y_46_re <= -1.45e+43:
    		tmp = t_0
    	elif y_46_re <= 1.05e-34:
    		tmp = -1.0 / ((math.pow(math.exp(y_46_im), math.atan2(x_46_im, x_46_re)) / math.sin((math.log(math.hypot(x_46_re, x_46_im)) * y_46_im))) / -1.0)
    	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.45e+43)
    		tmp = t_0;
    	elseif (y_46_re <= 1.05e-34)
    		tmp = Float64(-1.0 / Float64(Float64((exp(y_46_im) ^ atan(x_46_im, x_46_re)) / sin(Float64(log(hypot(x_46_re, x_46_im)) * y_46_im))) / -1.0));
    	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)) * 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))));
    	tmp = 0.0;
    	if (y_46_re <= -1.45e+43)
    		tmp = t_0;
    	elseif (y_46_re <= 1.05e-34)
    		tmp = -1.0 / (((exp(y_46_im) ^ atan2(x_46_im, x_46_re)) / sin((log(hypot(x_46_re, x_46_im)) * y_46_im))) / -1.0);
    	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[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.45e+43], t$95$0, If[LessEqual[y$46$re, 1.05e-34], N[(-1.0 / N[(N[(N[Power[N[Exp[y$46$im], $MachinePrecision], N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision] / N[Sin[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / -1.0), $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.45 \cdot 10^{+43}:\\
    \;\;\;\;t\_0\\
    
    \mathbf{elif}\;y.re \leq 1.05 \cdot 10^{-34}:\\
    \;\;\;\;\frac{-1}{\frac{\frac{{\left(e^{y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}}{\sin \left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im\right)}}{-1}}\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_0\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if y.re < -1.4500000000000001e43 or 1.05e-34 < y.re

      1. Initial program 38.9%

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

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

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

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

      if -1.4500000000000001e43 < y.re < 1.05e-34

      1. Initial program 39.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;y.re \leq -1.45 \cdot 10^{+43}:\\ \;\;\;\;\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 1.05 \cdot 10^{-34}:\\ \;\;\;\;\frac{-1}{\frac{\frac{{\left(e^{y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}}{\sin \left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im\right)}}{-1}}\\ \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: 63.6% 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 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.45 \cdot 10^{+43}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;y.re \leq 6.2 \cdot 10^{-129}:\\ \;\;\;\;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))
              (exp
               (-
                (* (log (sqrt (+ (* x.im x.im) (* x.re x.re)))) y.re)
                (* y.im (atan2 x.im x.re)))))))
       (if (<= y.re -1.45e+43)
         t_0
         (if (<= y.re 6.2e-129)
           (*
            (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)) * 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.45e+43) {
    		tmp = t_0;
    	} else if (y_46_re <= 6.2e-129) {
    		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.exp(((Math.log(Math.sqrt(((x_46_im * x_46_im) + (x_46_re * x_46_re)))) * y_46_re) - (y_46_im * Math.atan2(x_46_im, x_46_re))));
    	double tmp;
    	if (y_46_re <= -1.45e+43) {
    		tmp = t_0;
    	} else if (y_46_re <= 6.2e-129) {
    		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.exp(((math.log(math.sqrt(((x_46_im * x_46_im) + (x_46_re * x_46_re)))) * y_46_re) - (y_46_im * math.atan2(x_46_im, x_46_re))))
    	tmp = 0
    	if y_46_re <= -1.45e+43:
    		tmp = t_0
    	elif y_46_re <= 6.2e-129:
    		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)) * 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.45e+43)
    		tmp = t_0;
    	elseif (y_46_re <= 6.2e-129)
    		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)) * 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))));
    	tmp = 0.0;
    	if (y_46_re <= -1.45e+43)
    		tmp = t_0;
    	elseif (y_46_re <= 6.2e-129)
    		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[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.45e+43], t$95$0, If[LessEqual[y$46$re, 6.2e-129], 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 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.45 \cdot 10^{+43}:\\
    \;\;\;\;t\_0\\
    
    \mathbf{elif}\;y.re \leq 6.2 \cdot 10^{-129}:\\
    \;\;\;\;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 < -1.4500000000000001e43 or 6.2000000000000001e-129 < y.re

      1. Initial program 38.9%

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

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

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

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

      if -1.4500000000000001e43 < y.re < 6.2000000000000001e-129

      1. Initial program 39.3%

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

        \[\leadsto \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.f6471.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 rewrites71.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 simplification70.0%

      \[\leadsto \begin{array}{l} \mathbf{if}\;y.re \leq -1.45 \cdot 10^{+43}:\\ \;\;\;\;\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 6.2 \cdot 10^{-129}:\\ \;\;\;\;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 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: 62.1% accurate, 1.3× speedup?

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

      1. Initial program 42.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.f6487.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 rewrites87.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 rewrites87.2%

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

        if -1.4500000000000001e43 < y.re < 1.05e-34

        1. Initial program 39.2%

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

        if 1.05e-34 < y.re

        1. Initial program 36.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.f6458.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 rewrites58.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)} \]
      8. Recombined 3 regimes into one program.
      9. Final simplification68.2%

        \[\leadsto \begin{array}{l} \mathbf{if}\;y.re \leq -1.45 \cdot 10^{+43}:\\ \;\;\;\;{\left(\frac{x.im \cdot x.im}{x.re} \cdot 0.5 + x.re\right)}^{y.re} \cdot \sin \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\\ \mathbf{elif}\;y.re \leq 1.05 \cdot 10^{-34}:\\ \;\;\;\;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} \]
      10. Add Preprocessing

      Alternative 8: 51.6% 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 -7.2 \cdot 10^{-156}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;y.re \leq 3.4 \cdot 10^{-169}:\\ \;\;\;\;\frac{1}{\frac{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re} + 1}{\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 -7.2e-156)
           t_0
           (if (<= y.re 3.4e-169)
             (/
              1.0
              (/
               (+ (* y.im (atan2 x.im x.re)) 1.0)
               (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 <= -7.2e-156) {
      		tmp = t_0;
      	} else if (y_46_re <= 3.4e-169) {
      		tmp = 1.0 / (((y_46_im * atan2(x_46_im, x_46_re)) + 1.0) / 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 <= -7.2e-156) {
      		tmp = t_0;
      	} else if (y_46_re <= 3.4e-169) {
      		tmp = 1.0 / (((y_46_im * Math.atan2(x_46_im, x_46_re)) + 1.0) / 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 <= -7.2e-156:
      		tmp = t_0
      	elif y_46_re <= 3.4e-169:
      		tmp = 1.0 / (((y_46_im * math.atan2(x_46_im, x_46_re)) + 1.0) / 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 <= -7.2e-156)
      		tmp = t_0;
      	elseif (y_46_re <= 3.4e-169)
      		tmp = Float64(1.0 / Float64(Float64(Float64(y_46_im * atan(x_46_im, x_46_re)) + 1.0) / 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 <= -7.2e-156)
      		tmp = t_0;
      	elseif (y_46_re <= 3.4e-169)
      		tmp = 1.0 / (((y_46_im * atan2(x_46_im, x_46_re)) + 1.0) / 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, -7.2e-156], t$95$0, If[LessEqual[y$46$re, 3.4e-169], N[(1.0 / N[(N[(N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision] + 1.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$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 -7.2 \cdot 10^{-156}:\\
      \;\;\;\;t\_0\\
      
      \mathbf{elif}\;y.re \leq 3.4 \cdot 10^{-169}:\\
      \;\;\;\;\frac{1}{\frac{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re} + 1}{\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 < -7.19999999999999998e-156 or 3.4e-169 < y.re

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

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

          \[\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 -7.19999999999999998e-156 < y.re < 3.4e-169

        1. Initial program 34.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 rewrites79.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \begin{array}{l} \mathbf{if}\;y.re \leq -7.2 \cdot 10^{-156}:\\ \;\;\;\;\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 3.4 \cdot 10^{-169}:\\ \;\;\;\;\frac{1}{\frac{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re} + 1}{\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} \]
        12. Add Preprocessing

        Alternative 9: 51.6% 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 -4.6 \cdot 10^{-156}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;y.re \leq 2.4 \cdot 10^{-120}:\\ \;\;\;\;\frac{1}{\frac{1}{\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 -4.6e-156)
             t_0
             (if (<= y.re 2.4e-120)
               (/ 1.0 (/ 1.0 (* (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 <= -4.6e-156) {
        		tmp = t_0;
        	} else if (y_46_re <= 2.4e-120) {
        		tmp = 1.0 / (1.0 / (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 <= -4.6e-156) {
        		tmp = t_0;
        	} else if (y_46_re <= 2.4e-120) {
        		tmp = 1.0 / (1.0 / (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 <= -4.6e-156:
        		tmp = t_0
        	elif y_46_re <= 2.4e-120:
        		tmp = 1.0 / (1.0 / (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 <= -4.6e-156)
        		tmp = t_0;
        	elseif (y_46_re <= 2.4e-120)
        		tmp = Float64(1.0 / Float64(1.0 / 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 <= -4.6e-156)
        		tmp = t_0;
        	elseif (y_46_re <= 2.4e-120)
        		tmp = 1.0 / (1.0 / (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, -4.6e-156], t$95$0, If[LessEqual[y$46$re, 2.4e-120], N[(1.0 / N[(1.0 / 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 -4.6 \cdot 10^{-156}:\\
        \;\;\;\;t\_0\\
        
        \mathbf{elif}\;y.re \leq 2.4 \cdot 10^{-120}:\\
        \;\;\;\;\frac{1}{\frac{1}{\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 < -4.5999999999999999e-156 or 2.3999999999999999e-120 < y.re

          1. Initial program 39.9%

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

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

            \[\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 -4.5999999999999999e-156 < y.re < 2.3999999999999999e-120

          1. Initial program 36.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. 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 rewrites79.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \frac{1}{\frac{1}{\color{blue}{y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)}}} \]
          10. Recombined 2 regimes into one program.
          11. Final simplification57.5%

            \[\leadsto \begin{array}{l} \mathbf{if}\;y.re \leq -4.6 \cdot 10^{-156}:\\ \;\;\;\;\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 2.4 \cdot 10^{-120}:\\ \;\;\;\;\frac{1}{\frac{1}{\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} \]
          12. Add Preprocessing

          Alternative 10: 45.1% accurate, 1.9× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} t_0 := {\left(\frac{x.im \cdot x.im}{x.re} \cdot 0.5 + x.re\right)}^{y.re} \cdot \sin \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\\ \mathbf{if}\;y.re \leq -6500:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;y.re \leq 9 \cdot 10^{-120}:\\ \;\;\;\;\frac{1}{\frac{1}{\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
                   (*
                    (pow (+ (* (/ (* x.im x.im) x.re) 0.5) x.re) y.re)
                    (sin (* (atan2 x.im x.re) y.re)))))
             (if (<= y.re -6500.0)
               t_0
               (if (<= y.re 9e-120)
                 (/ 1.0 (/ 1.0 (* (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 = pow(((((x_46_im * x_46_im) / x_46_re) * 0.5) + x_46_re), y_46_re) * sin((atan2(x_46_im, x_46_re) * y_46_re));
          	double tmp;
          	if (y_46_re <= -6500.0) {
          		tmp = t_0;
          	} else if (y_46_re <= 9e-120) {
          		tmp = 1.0 / (1.0 / (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.pow(((((x_46_im * x_46_im) / x_46_re) * 0.5) + x_46_re), y_46_re) * Math.sin((Math.atan2(x_46_im, x_46_re) * y_46_re));
          	double tmp;
          	if (y_46_re <= -6500.0) {
          		tmp = t_0;
          	} else if (y_46_re <= 9e-120) {
          		tmp = 1.0 / (1.0 / (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.pow(((((x_46_im * x_46_im) / x_46_re) * 0.5) + x_46_re), y_46_re) * math.sin((math.atan2(x_46_im, x_46_re) * y_46_re))
          	tmp = 0
          	if y_46_re <= -6500.0:
          		tmp = t_0
          	elif y_46_re <= 9e-120:
          		tmp = 1.0 / (1.0 / (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((Float64(Float64(Float64(Float64(x_46_im * x_46_im) / x_46_re) * 0.5) + x_46_re) ^ y_46_re) * sin(Float64(atan(x_46_im, x_46_re) * y_46_re)))
          	tmp = 0.0
          	if (y_46_re <= -6500.0)
          		tmp = t_0;
          	elseif (y_46_re <= 9e-120)
          		tmp = Float64(1.0 / Float64(1.0 / 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 = (((((x_46_im * x_46_im) / x_46_re) * 0.5) + x_46_re) ^ y_46_re) * sin((atan2(x_46_im, x_46_re) * y_46_re));
          	tmp = 0.0;
          	if (y_46_re <= -6500.0)
          		tmp = t_0;
          	elseif (y_46_re <= 9e-120)
          		tmp = 1.0 / (1.0 / (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[Power[N[(N[(N[(N[(x$46$im * x$46$im), $MachinePrecision] / x$46$re), $MachinePrecision] * 0.5), $MachinePrecision] + x$46$re), $MachinePrecision], y$46$re], $MachinePrecision] * N[Sin[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -6500.0], t$95$0, If[LessEqual[y$46$re, 9e-120], N[(1.0 / N[(1.0 / 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 := {\left(\frac{x.im \cdot x.im}{x.re} \cdot 0.5 + x.re\right)}^{y.re} \cdot \sin \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\\
          \mathbf{if}\;y.re \leq -6500:\\
          \;\;\;\;t\_0\\
          
          \mathbf{elif}\;y.re \leq 9 \cdot 10^{-120}:\\
          \;\;\;\;\frac{1}{\frac{1}{\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 < -6500 or 9e-120 < y.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}{\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.8

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

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

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

              if -6500 < y.re < 9e-120

              1. Initial program 37.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. 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 rewrites80.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \frac{1}{\frac{1}{\color{blue}{y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)}}} \]
              10. Recombined 2 regimes into one program.
              11. Final simplification54.9%

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

              Alternative 11: 45.1% accurate, 2.0× speedup?

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

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

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

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

                  if -6.0000000000000005e-154 < y.re < 1.05e-119

                  1. Initial program 36.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    if 1.05e-119 < y.re

                    1. Initial program 36.8%

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

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

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

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

                      \[\leadsto \begin{array}{l} \mathbf{if}\;y.re \leq -6 \cdot 10^{-154}:\\ \;\;\;\;{\left(\frac{x.re \cdot x.re}{x.im} \cdot 0.5 + x.im\right)}^{y.re} \cdot \sin \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\\ \mathbf{elif}\;y.re \leq 1.05 \cdot 10^{-119}:\\ \;\;\;\;\frac{1}{\frac{1}{\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right) \cdot y.im}}\\ \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: 40.4% accurate, 2.1× speedup?

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

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

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

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

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

                        if -3.4999999999999999e271 < y.re < -3.80000000000000028e-8

                        1. Initial program 44.2%

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

                          \[\leadsto \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.f6484.8

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

                          \[\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 -inf

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

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

                          if -3.80000000000000028e-8 < y.re < 1.05e-119

                          1. Initial program 38.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                              \[\leadsto \frac{1}{\frac{1}{\color{blue}{y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)}}} \]
                          10. Recombined 3 regimes into one program.
                          11. Final simplification49.9%

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

                          Alternative 13: 40.3% accurate, 2.1× speedup?

                          \[\begin{array}{l} \\ \begin{array}{l} t_0 := \sin \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\\ t_1 := {x.im}^{y.re} \cdot t\_0\\ \mathbf{if}\;y.re \leq -3.5 \cdot 10^{+271}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y.re \leq -18000000000:\\ \;\;\;\;{x.re}^{y.re} \cdot t\_0\\ \mathbf{elif}\;y.re \leq 1.05 \cdot 10^{-119}:\\ \;\;\;\;\frac{1}{\frac{1}{\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right) \cdot y.im}}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                          (FPCore (x.re x.im y.re y.im)
                           :precision binary64
                           (let* ((t_0 (sin (* (atan2 x.im x.re) y.re))) (t_1 (* (pow x.im y.re) t_0)))
                             (if (<= y.re -3.5e+271)
                               t_1
                               (if (<= y.re -18000000000.0)
                                 (* (pow x.re y.re) t_0)
                                 (if (<= y.re 1.05e-119)
                                   (/ 1.0 (/ 1.0 (* (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 = sin((atan2(x_46_im, x_46_re) * y_46_re));
                          	double t_1 = pow(x_46_im, y_46_re) * t_0;
                          	double tmp;
                          	if (y_46_re <= -3.5e+271) {
                          		tmp = t_1;
                          	} else if (y_46_re <= -18000000000.0) {
                          		tmp = pow(x_46_re, y_46_re) * t_0;
                          	} else if (y_46_re <= 1.05e-119) {
                          		tmp = 1.0 / (1.0 / (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 = Math.sin((Math.atan2(x_46_im, x_46_re) * y_46_re));
                          	double t_1 = Math.pow(x_46_im, y_46_re) * t_0;
                          	double tmp;
                          	if (y_46_re <= -3.5e+271) {
                          		tmp = t_1;
                          	} else if (y_46_re <= -18000000000.0) {
                          		tmp = Math.pow(x_46_re, y_46_re) * t_0;
                          	} else if (y_46_re <= 1.05e-119) {
                          		tmp = 1.0 / (1.0 / (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 = math.sin((math.atan2(x_46_im, x_46_re) * y_46_re))
                          	t_1 = math.pow(x_46_im, y_46_re) * t_0
                          	tmp = 0
                          	if y_46_re <= -3.5e+271:
                          		tmp = t_1
                          	elif y_46_re <= -18000000000.0:
                          		tmp = math.pow(x_46_re, y_46_re) * t_0
                          	elif y_46_re <= 1.05e-119:
                          		tmp = 1.0 / (1.0 / (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 = sin(Float64(atan(x_46_im, x_46_re) * y_46_re))
                          	t_1 = Float64((x_46_im ^ y_46_re) * t_0)
                          	tmp = 0.0
                          	if (y_46_re <= -3.5e+271)
                          		tmp = t_1;
                          	elseif (y_46_re <= -18000000000.0)
                          		tmp = Float64((x_46_re ^ y_46_re) * t_0);
                          	elseif (y_46_re <= 1.05e-119)
                          		tmp = Float64(1.0 / Float64(1.0 / 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 = sin((atan2(x_46_im, x_46_re) * y_46_re));
                          	t_1 = (x_46_im ^ y_46_re) * t_0;
                          	tmp = 0.0;
                          	if (y_46_re <= -3.5e+271)
                          		tmp = t_1;
                          	elseif (y_46_re <= -18000000000.0)
                          		tmp = (x_46_re ^ y_46_re) * t_0;
                          	elseif (y_46_re <= 1.05e-119)
                          		tmp = 1.0 / (1.0 / (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[Sin[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(N[Power[x$46$im, y$46$re], $MachinePrecision] * t$95$0), $MachinePrecision]}, If[LessEqual[y$46$re, -3.5e+271], t$95$1, If[LessEqual[y$46$re, -18000000000.0], N[(N[Power[x$46$re, y$46$re], $MachinePrecision] * t$95$0), $MachinePrecision], If[LessEqual[y$46$re, 1.05e-119], N[(1.0 / N[(1.0 / N[(N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
                          
                          \begin{array}{l}
                          
                          \\
                          \begin{array}{l}
                          t_0 := \sin \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\\
                          t_1 := {x.im}^{y.re} \cdot t\_0\\
                          \mathbf{if}\;y.re \leq -3.5 \cdot 10^{+271}:\\
                          \;\;\;\;t\_1\\
                          
                          \mathbf{elif}\;y.re \leq -18000000000:\\
                          \;\;\;\;{x.re}^{y.re} \cdot t\_0\\
                          
                          \mathbf{elif}\;y.re \leq 1.05 \cdot 10^{-119}:\\
                          \;\;\;\;\frac{1}{\frac{1}{\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right) \cdot y.im}}\\
                          
                          \mathbf{else}:\\
                          \;\;\;\;t\_1\\
                          
                          
                          \end{array}
                          \end{array}
                          
                          Derivation
                          1. Split input into 3 regimes
                          2. if y.re < -3.4999999999999999e271 or 1.05e-119 < y.re

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

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

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

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

                              if -3.4999999999999999e271 < y.re < -1.8e10

                              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.f6484.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 rewrites84.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 {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 rewrites70.4%

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

                                if -1.8e10 < y.re < 1.05e-119

                                1. Initial program 38.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 rewrites80.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                  \[\leadsto \begin{array}{l} \mathbf{if}\;y.re \leq -3.5 \cdot 10^{+271}:\\ \;\;\;\;{x.im}^{y.re} \cdot \sin \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\\ \mathbf{elif}\;y.re \leq -18000000000:\\ \;\;\;\;{x.re}^{y.re} \cdot \sin \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\\ \mathbf{elif}\;y.re \leq 1.05 \cdot 10^{-119}:\\ \;\;\;\;\frac{1}{\frac{1}{\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right) \cdot y.im}}\\ \mathbf{else}:\\ \;\;\;\;{x.im}^{y.re} \cdot \sin \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\\ \end{array} \]
                                12. Add Preprocessing

                                Alternative 14: 39.9% accurate, 2.1× speedup?

                                \[\begin{array}{l} \\ \begin{array}{l} t_0 := {x.im}^{y.re} \cdot \sin \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\\ \mathbf{if}\;y.re \leq -6 \cdot 10^{-154}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;y.re \leq 1.05 \cdot 10^{-119}:\\ \;\;\;\;\frac{1}{\frac{1}{\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 (* (pow x.im y.re) (sin (* (atan2 x.im x.re) y.re)))))
                                   (if (<= y.re -6e-154)
                                     t_0
                                     (if (<= y.re 1.05e-119)
                                       (/ 1.0 (/ 1.0 (* (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 = pow(x_46_im, y_46_re) * sin((atan2(x_46_im, x_46_re) * y_46_re));
                                	double tmp;
                                	if (y_46_re <= -6e-154) {
                                		tmp = t_0;
                                	} else if (y_46_re <= 1.05e-119) {
                                		tmp = 1.0 / (1.0 / (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.pow(x_46_im, y_46_re) * Math.sin((Math.atan2(x_46_im, x_46_re) * y_46_re));
                                	double tmp;
                                	if (y_46_re <= -6e-154) {
                                		tmp = t_0;
                                	} else if (y_46_re <= 1.05e-119) {
                                		tmp = 1.0 / (1.0 / (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.pow(x_46_im, y_46_re) * math.sin((math.atan2(x_46_im, x_46_re) * y_46_re))
                                	tmp = 0
                                	if y_46_re <= -6e-154:
                                		tmp = t_0
                                	elif y_46_re <= 1.05e-119:
                                		tmp = 1.0 / (1.0 / (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((x_46_im ^ y_46_re) * sin(Float64(atan(x_46_im, x_46_re) * y_46_re)))
                                	tmp = 0.0
                                	if (y_46_re <= -6e-154)
                                		tmp = t_0;
                                	elseif (y_46_re <= 1.05e-119)
                                		tmp = Float64(1.0 / Float64(1.0 / 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 = (x_46_im ^ y_46_re) * sin((atan2(x_46_im, x_46_re) * y_46_re));
                                	tmp = 0.0;
                                	if (y_46_re <= -6e-154)
                                		tmp = t_0;
                                	elseif (y_46_re <= 1.05e-119)
                                		tmp = 1.0 / (1.0 / (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[Power[x$46$im, y$46$re], $MachinePrecision] * N[Sin[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -6e-154], t$95$0, If[LessEqual[y$46$re, 1.05e-119], N[(1.0 / N[(1.0 / 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 := {x.im}^{y.re} \cdot \sin \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\\
                                \mathbf{if}\;y.re \leq -6 \cdot 10^{-154}:\\
                                \;\;\;\;t\_0\\
                                
                                \mathbf{elif}\;y.re \leq 1.05 \cdot 10^{-119}:\\
                                \;\;\;\;\frac{1}{\frac{1}{\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 < -6.0000000000000005e-154 or 1.05e-119 < y.re

                                  1. Initial program 40.1%

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

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

                                    if -6.0000000000000005e-154 < y.re < 1.05e-119

                                    1. Initial program 36.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                        \[\leadsto \frac{1}{\frac{1}{\color{blue}{y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)}}} \]
                                    10. Recombined 2 regimes into one program.
                                    11. Final simplification45.8%

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

                                    Alternative 15: 22.3% accurate, 2.8× 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 -4.6 \cdot 10^{-156}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;y.re \leq 2.4 \cdot 10^{-120}:\\ \;\;\;\;\frac{1}{\frac{1}{\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right) \cdot y.im}}\\ \mathbf{elif}\;y.re \leq 52000000000:\\ \;\;\;\;t\_0\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\frac{1}{\mathsf{fma}\left(0.5, \frac{y.im \cdot \left(x.re \cdot x.re\right)}{x.im \cdot x.im}, \log x.im \cdot y.im\right)}}\\ \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 -4.6e-156)
                                         t_0
                                         (if (<= y.re 2.4e-120)
                                           (/ 1.0 (/ 1.0 (* (log (hypot x.im x.re)) y.im)))
                                           (if (<= y.re 52000000000.0)
                                             t_0
                                             (/
                                              1.0
                                              (/
                                               1.0
                                               (fma
                                                0.5
                                                (/ (* y.im (* 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 t_0 = 1.0 * sin((atan2(x_46_im, x_46_re) * y_46_re));
                                    	double tmp;
                                    	if (y_46_re <= -4.6e-156) {
                                    		tmp = t_0;
                                    	} else if (y_46_re <= 2.4e-120) {
                                    		tmp = 1.0 / (1.0 / (log(hypot(x_46_im, x_46_re)) * y_46_im));
                                    	} else if (y_46_re <= 52000000000.0) {
                                    		tmp = t_0;
                                    	} else {
                                    		tmp = 1.0 / (1.0 / fma(0.5, ((y_46_im * (x_46_re * x_46_re)) / (x_46_im * x_46_im)), (log(x_46_im) * 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 <= -4.6e-156)
                                    		tmp = t_0;
                                    	elseif (y_46_re <= 2.4e-120)
                                    		tmp = Float64(1.0 / Float64(1.0 / Float64(log(hypot(x_46_im, x_46_re)) * y_46_im)));
                                    	elseif (y_46_re <= 52000000000.0)
                                    		tmp = t_0;
                                    	else
                                    		tmp = Float64(1.0 / Float64(1.0 / fma(0.5, Float64(Float64(y_46_im * Float64(x_46_re * x_46_re)) / Float64(x_46_im * x_46_im)), Float64(log(x_46_im) * 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[(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, -4.6e-156], t$95$0, If[LessEqual[y$46$re, 2.4e-120], N[(1.0 / N[(1.0 / N[(N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 52000000000.0], t$95$0, N[(1.0 / N[(1.0 / N[(0.5 * N[(N[(y$46$im * N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision] / N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision] + N[(N[Log[x$46$im], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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 -4.6 \cdot 10^{-156}:\\
                                    \;\;\;\;t\_0\\
                                    
                                    \mathbf{elif}\;y.re \leq 2.4 \cdot 10^{-120}:\\
                                    \;\;\;\;\frac{1}{\frac{1}{\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right) \cdot y.im}}\\
                                    
                                    \mathbf{elif}\;y.re \leq 52000000000:\\
                                    \;\;\;\;t\_0\\
                                    
                                    \mathbf{else}:\\
                                    \;\;\;\;\frac{1}{\frac{1}{\mathsf{fma}\left(0.5, \frac{y.im \cdot \left(x.re \cdot x.re\right)}{x.im \cdot x.im}, \log x.im \cdot y.im\right)}}\\
                                    
                                    
                                    \end{array}
                                    \end{array}
                                    
                                    Derivation
                                    1. Split input into 3 regimes
                                    2. if y.re < -4.5999999999999999e-156 or 2.3999999999999999e-120 < y.re < 5.2e10

                                      1. Initial program 42.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.f6463.8

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

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

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

                                        if -4.5999999999999999e-156 < y.re < 2.3999999999999999e-120

                                        1. Initial program 36.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. 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 rewrites79.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                          if 5.2e10 < y.re

                                          1. Initial program 36.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. 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 rewrites46.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. Taylor expanded in y.re around 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                            Alternative 16: 16.5% accurate, 3.8× speedup?

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

                                              1. Initial program 39.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. 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 rewrites62.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                  if -9.9999999999999991e-309 < x.re

                                                  1. Initial program 38.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 rewrites74.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                        \[\leadsto \frac{1}{\frac{1}{\mathsf{fma}\left(0.5, \frac{\left(x.im \cdot x.im\right) \cdot y.im}{\color{blue}{x.re \cdot x.re}}, y.im \cdot \log x.re\right)}} \]
                                                    4. Recombined 2 regimes into one program.
                                                    5. Final simplification19.6%

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

                                                    Alternative 17: 15.6% accurate, 4.1× speedup?

                                                    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x.re \leq 8.6 \cdot 10^{-263}:\\ \;\;\;\;\frac{1}{\frac{1}{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re}}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\frac{1}{\mathsf{fma}\left(0.5, \frac{y.im \cdot \left(x.im \cdot x.im\right)}{x.re \cdot x.re}, \log x.re \cdot y.im\right)}}\\ \end{array} \end{array} \]
                                                    (FPCore (x.re x.im y.re y.im)
                                                     :precision binary64
                                                     (if (<= x.re 8.6e-263)
                                                       (/ 1.0 (/ 1.0 (* (atan2 x.im x.re) y.re)))
                                                       (/
                                                        1.0
                                                        (/
                                                         1.0
                                                         (fma 0.5 (/ (* y.im (* x.im x.im)) (* x.re x.re)) (* (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.6e-263) {
                                                    		tmp = 1.0 / (1.0 / (atan2(x_46_im, x_46_re) * y_46_re));
                                                    	} else {
                                                    		tmp = 1.0 / (1.0 / fma(0.5, ((y_46_im * (x_46_im * x_46_im)) / (x_46_re * x_46_re)), (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.6e-263)
                                                    		tmp = Float64(1.0 / Float64(1.0 / Float64(atan(x_46_im, x_46_re) * y_46_re)));
                                                    	else
                                                    		tmp = Float64(1.0 / Float64(1.0 / fma(0.5, Float64(Float64(y_46_im * Float64(x_46_im * x_46_im)) / Float64(x_46_re * x_46_re)), Float64(log(x_46_re) * y_46_im))));
                                                    	end
                                                    	return tmp
                                                    end
                                                    
                                                    code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[x$46$re, 8.6e-263], N[(1.0 / N[(1.0 / N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(1.0 / N[(0.5 * N[(N[(y$46$im * N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision] / N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision] + N[(N[Log[x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
                                                    
                                                    \begin{array}{l}
                                                    
                                                    \\
                                                    \begin{array}{l}
                                                    \mathbf{if}\;x.re \leq 8.6 \cdot 10^{-263}:\\
                                                    \;\;\;\;\frac{1}{\frac{1}{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re}}\\
                                                    
                                                    \mathbf{else}:\\
                                                    \;\;\;\;\frac{1}{\frac{1}{\mathsf{fma}\left(0.5, \frac{y.im \cdot \left(x.im \cdot x.im\right)}{x.re \cdot x.re}, \log x.re \cdot y.im\right)}}\\
                                                    
                                                    
                                                    \end{array}
                                                    \end{array}
                                                    
                                                    Derivation
                                                    1. Split input into 2 regimes
                                                    2. if x.re < 8.5999999999999994e-263

                                                      1. Initial program 37.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 rewrites63.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. Taylor expanded in y.im around 0

                                                        \[\leadsto \frac{1}{\color{blue}{\frac{1}{\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}}}} \]
                                                      6. Step-by-step derivation
                                                        1. lower-/.f64N/A

                                                          \[\leadsto \frac{1}{\color{blue}{\frac{1}{\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-*.f64N/A

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

                                                          \[\leadsto \frac{1}{\frac{1}{\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. lower-*.f64N/A

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

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

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

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

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

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

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

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

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

                                                        if 8.5999999999999994e-263 < x.re

                                                        1. Initial program 40.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                          Alternative 18: 14.7% accurate, 5.0× speedup?

                                                          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x.re \leq 6.8 \cdot 10^{-103}:\\ \;\;\;\;\frac{1}{\frac{1}{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re}}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\frac{1}{\log x.re \cdot y.im}}\\ \end{array} \end{array} \]
                                                          (FPCore (x.re x.im y.re y.im)
                                                           :precision binary64
                                                           (if (<= x.re 6.8e-103)
                                                             (/ 1.0 (/ 1.0 (* (atan2 x.im x.re) y.re)))
                                                             (/ 1.0 (/ 1.0 (* (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 <= 6.8e-103) {
                                                          		tmp = 1.0 / (1.0 / (atan2(x_46_im, x_46_re) * y_46_re));
                                                          	} else {
                                                          		tmp = 1.0 / (1.0 / (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 <= 6.8d-103) then
                                                                  tmp = 1.0d0 / (1.0d0 / (atan2(x_46im, x_46re) * y_46re))
                                                              else
                                                                  tmp = 1.0d0 / (1.0d0 / (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 <= 6.8e-103) {
                                                          		tmp = 1.0 / (1.0 / (Math.atan2(x_46_im, x_46_re) * y_46_re));
                                                          	} else {
                                                          		tmp = 1.0 / (1.0 / (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 <= 6.8e-103:
                                                          		tmp = 1.0 / (1.0 / (math.atan2(x_46_im, x_46_re) * y_46_re))
                                                          	else:
                                                          		tmp = 1.0 / (1.0 / (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 <= 6.8e-103)
                                                          		tmp = Float64(1.0 / Float64(1.0 / Float64(atan(x_46_im, x_46_re) * y_46_re)));
                                                          	else
                                                          		tmp = Float64(1.0 / Float64(1.0 / 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 <= 6.8e-103)
                                                          		tmp = 1.0 / (1.0 / (atan2(x_46_im, x_46_re) * y_46_re));
                                                          	else
                                                          		tmp = 1.0 / (1.0 / (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, 6.8e-103], N[(1.0 / N[(1.0 / N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(1.0 / N[(N[Log[x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
                                                          
                                                          \begin{array}{l}
                                                          
                                                          \\
                                                          \begin{array}{l}
                                                          \mathbf{if}\;x.re \leq 6.8 \cdot 10^{-103}:\\
                                                          \;\;\;\;\frac{1}{\frac{1}{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re}}\\
                                                          
                                                          \mathbf{else}:\\
                                                          \;\;\;\;\frac{1}{\frac{1}{\log x.re \cdot y.im}}\\
                                                          
                                                          
                                                          \end{array}
                                                          \end{array}
                                                          
                                                          Derivation
                                                          1. Split input into 2 regimes
                                                          2. if x.re < 6.80000000000000006e-103

                                                            1. Initial program 38.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 rewrites65.0%

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

                                                              \[\leadsto \frac{1}{\color{blue}{\frac{1}{\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}}}} \]
                                                            6. Step-by-step derivation
                                                              1. lower-/.f64N/A

                                                                \[\leadsto \frac{1}{\color{blue}{\frac{1}{\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-*.f64N/A

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

                                                                \[\leadsto \frac{1}{\frac{1}{\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. lower-*.f64N/A

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

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

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

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

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

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

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

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

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

                                                              if 6.80000000000000006e-103 < x.re

                                                              1. Initial program 40.2%

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

                                                                  \[\leadsto \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.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. Taylor expanded in y.re around 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                    \[\leadsto \frac{1}{\frac{1}{-y.im \cdot \left(-\log x.re\right)}} \]
                                                                4. Recombined 2 regimes into one program.
                                                                5. Final simplification13.0%

                                                                  \[\leadsto \begin{array}{l} \mathbf{if}\;x.re \leq 6.8 \cdot 10^{-103}:\\ \;\;\;\;\frac{1}{\frac{1}{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re}}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\frac{1}{\log x.re \cdot y.im}}\\ \end{array} \]
                                                                6. Add Preprocessing

                                                                Alternative 19: 13.9% accurate, 5.3× speedup?

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

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

                                                                  \[\leadsto \frac{1}{\color{blue}{\frac{1}{\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}}}} \]
                                                                6. Step-by-step derivation
                                                                  1. lower-/.f64N/A

                                                                    \[\leadsto \frac{1}{\color{blue}{\frac{1}{\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-*.f64N/A

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

                                                                    \[\leadsto \frac{1}{\frac{1}{\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. lower-*.f64N/A

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

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

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

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

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

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

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

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

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

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

                                                                  Alternative 20: 4.7% accurate, 5.3× speedup?

                                                                  \[\begin{array}{l} \\ \frac{1}{\frac{1}{\log x.im \cdot y.im}} \end{array} \]
                                                                  (FPCore (x.re x.im y.re y.im)
                                                                   :precision binary64
                                                                   (/ 1.0 (/ 1.0 (* (log x.im) y.im))))
                                                                  double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
                                                                  	return 1.0 / (1.0 / (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 = 1.0d0 / (1.0d0 / (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 1.0 / (1.0 / (Math.log(x_46_im) * y_46_im));
                                                                  }
                                                                  
                                                                  def code(x_46_re, x_46_im, y_46_re, y_46_im):
                                                                  	return 1.0 / (1.0 / (math.log(x_46_im) * y_46_im))
                                                                  
                                                                  function code(x_46_re, x_46_im, y_46_re, y_46_im)
                                                                  	return Float64(1.0 / Float64(1.0 / 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 = 1.0 / (1.0 / (log(x_46_im) * y_46_im));
                                                                  end
                                                                  
                                                                  code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[(1.0 / N[(1.0 / N[(N[Log[x$46$im], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
                                                                  
                                                                  \begin{array}{l}
                                                                  
                                                                  \\
                                                                  \frac{1}{\frac{1}{\log x.im \cdot y.im}}
                                                                  \end{array}
                                                                  
                                                                  Derivation
                                                                  1. Initial program 39.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 rewrites68.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                        \[\leadsto \frac{1}{\frac{1}{y.im \cdot \log x.im}} \]
                                                                      2. Final simplification4.5%

                                                                        \[\leadsto \frac{1}{\frac{1}{\log x.im \cdot y.im}} \]
                                                                      3. Add Preprocessing

                                                                      Reproduce

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