powComplex, imaginary part

Percentage Accurate: 41.1% → 76.3%
Time: 16.8s
Alternatives: 17
Speedup: 1.5×

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)));
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(x_46re, x_46im, y_46re, y_46im)
use fmin_fmax_functions
    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 17 alternatives:

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

Initial Program: 41.1% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)\\ e^{t\_0 \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(t\_0 \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \end{array} \end{array} \]
(FPCore (x.re x.im y.re y.im)
 :precision binary64
 (let* ((t_0 (log (sqrt (+ (* x.re x.re) (* x.im x.im))))))
   (*
    (exp (- (* t_0 y.re) (* (atan2 x.im x.re) y.im)))
    (sin (+ (* t_0 y.im) (* (atan2 x.im x.re) y.re))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
	double t_0 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
	return exp(((t_0 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin(((t_0 * y_46_im) + (atan2(x_46_im, x_46_re) * y_46_re)));
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(x_46re, x_46im, y_46re, y_46im)
use fmin_fmax_functions
    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: 76.3% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;y.re \leq 1.85 \cdot 10^{-14}:\\
\;\;\;\;e^{\left(-y.im\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot t\_3\\

\mathbf{else}:\\
\;\;\;\;t\_1 \cdot \mathsf{fma}\left(t\_0, \cos t\_4, \sin t\_4\right)\\


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

    1. Initial program 47.5%

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

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

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

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

      1. Initial program 43.9%

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

          \[\leadsto e^{\log \color{blue}{\left(-1 \cdot x.im\right)} \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \mathsf{fma}\left(1 \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. Step-by-step derivation
          1. mul-1-negN/A

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

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

          \[\leadsto e^{\log \color{blue}{\left(-x.im\right)} \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \mathsf{fma}\left(1 \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. 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(1 \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. Step-by-step derivation
          1. mul-1-negN/A

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

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

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

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

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

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

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

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

      Alternative 2: 48.2% accurate, 0.4× speedup?

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

        1. Initial program 42.4%

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

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

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

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

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

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

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

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

        if -0.0 < (*.f64 (exp.f64 (-.f64 (*.f64 (log.f64 (sqrt.f64 (+.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)))) y.re) (*.f64 (atan2.f64 x.im x.re) y.im))) (sin.f64 (+.f64 (*.f64 (log.f64 (sqrt.f64 (+.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)))) y.im) (*.f64 (atan2.f64 x.im x.re) y.re)))) < 1

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

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

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

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

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

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

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

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

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

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

          \[\leadsto 1 \cdot \sin \left(\log \left(\sqrt{\mathsf{fma}\left(x.re, x.re, x.im \cdot x.im\right)}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \]
        9. Step-by-step derivation
          1. Applied rewrites96.3%

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

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

        Alternative 3: 76.6% accurate, 0.7× speedup?

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

          1. Initial program 47.5%

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

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

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

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

            1. Initial program 43.9%

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

                \[\leadsto e^{\log \color{blue}{\left(-1 \cdot x.im\right)} \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \mathsf{fma}\left(1 \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. Step-by-step derivation
                1. mul-1-negN/A

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

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

                \[\leadsto e^{\log \color{blue}{\left(-x.im\right)} \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \mathsf{fma}\left(1 \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. 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(1 \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. Step-by-step derivation
                1. mul-1-negN/A

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

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

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

              1. Initial program 47.2%

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

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

                \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \color{blue}{\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. Recombined 3 regimes into one program.
            9. Add Preprocessing

            Alternative 4: 76.5% accurate, 0.9× speedup?

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

              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. 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 rewrites78.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^{\log \left(\sqrt{x.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(1 \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. Applied rewrites78.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 \mathsf{fma}\left(1 \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.25e-14 < y.re < 1.85000000000000001e-14

                1. Initial program 43.9%

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

                    \[\leadsto e^{\log \color{blue}{\left(-1 \cdot x.im\right)} \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \mathsf{fma}\left(1 \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. Step-by-step derivation
                    1. mul-1-negN/A

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

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

                    \[\leadsto e^{\log \color{blue}{\left(-x.im\right)} \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \mathsf{fma}\left(1 \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. 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(1 \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. Step-by-step derivation
                    1. mul-1-negN/A

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

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

                    \[\leadsto e^{\color{blue}{\left(-y.im\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}}} \cdot \mathsf{fma}\left(1 \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. Recombined 2 regimes into one program.
                9. Final simplification79.8%

                  \[\leadsto \begin{array}{l} \mathbf{if}\;y.re \leq -1.25 \cdot 10^{-14} \lor \neg \left(y.re \leq 1.85 \cdot 10^{-14}\right):\\ \;\;\;\;e^{\log \left(\sqrt{x.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(1 \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)\\ \mathbf{else}:\\ \;\;\;\;e^{\left(-y.im\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \mathsf{fma}\left(1 \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)\\ \end{array} \]
                10. Add Preprocessing

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

                  1. Initial program 50.4%

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

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

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

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

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

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

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

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

                  if -4.9999999999999997e59 < y.im < 0.065000000000000002

                  1. Initial program 46.4%

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

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

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

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

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

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

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

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

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

                      \[\leadsto {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \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) \]
                  8. Applied rewrites86.1%

                    \[\leadsto {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \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)} \]
                  9. Step-by-step derivation
                    1. lift-*.f64N/A

                      \[\leadsto \color{blue}{{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \cdot \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)} \]
                    2. *-commutativeN/A

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

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

                    \[\leadsto \color{blue}{\sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right), \frac{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}} \]

                  if 0.065000000000000002 < y.im < 5.29999999999999988e178

                  1. Initial program 48.6%

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

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

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

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

                  if 5.29999999999999988e178 < 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. 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 rewrites69.4%

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

                      \[\leadsto e^{\log \color{blue}{\left(-1 \cdot x.im\right)} \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \mathsf{fma}\left(1 \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. Step-by-step derivation
                      1. mul-1-negN/A

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

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

                      \[\leadsto e^{\log \color{blue}{\left(-x.im\right)} \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \mathsf{fma}\left(1 \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. 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(1 \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. Step-by-step derivation
                      1. mul-1-negN/A

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

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

                      \[\leadsto e^{\color{blue}{\left(-y.im\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}}} \cdot \mathsf{fma}\left(1 \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. Recombined 4 regimes into one program.
                  9. Add Preprocessing

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

                    1. Initial program 50.4%

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

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

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

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

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

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

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

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

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

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

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

                    if -4.9999999999999997e59 < y.im < 0.065000000000000002

                    1. Initial program 46.4%

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

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

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

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

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

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

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

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

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

                        \[\leadsto {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \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) \]
                    8. Applied rewrites86.1%

                      \[\leadsto {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \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)} \]
                    9. Step-by-step derivation
                      1. lift-*.f64N/A

                        \[\leadsto \color{blue}{{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \cdot \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)} \]
                      2. *-commutativeN/A

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

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

                      \[\leadsto \color{blue}{\sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right), \frac{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}} \]

                    if 0.065000000000000002 < y.im < 5.29999999999999988e178

                    1. Initial program 48.6%

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

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

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

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

                    if 5.29999999999999988e178 < 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. 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 rewrites69.4%

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

                        \[\leadsto e^{\log \color{blue}{\left(-1 \cdot x.im\right)} \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \mathsf{fma}\left(1 \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. Step-by-step derivation
                        1. mul-1-negN/A

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

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

                        \[\leadsto e^{\log \color{blue}{\left(-x.im\right)} \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \mathsf{fma}\left(1 \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. 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(1 \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. Step-by-step derivation
                        1. mul-1-negN/A

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

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

                        \[\leadsto e^{\color{blue}{\left(-y.im\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}}} \cdot \mathsf{fma}\left(1 \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. Recombined 4 regimes into one program.
                    9. Add Preprocessing

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

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

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

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

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

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

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

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

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

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

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

                      if -3.2000000000000002e51 < y.im < 0.065000000000000002

                      1. Initial program 46.4%

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

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

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

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

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

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

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

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

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

                          \[\leadsto {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \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) \]
                      8. Applied rewrites87.3%

                        \[\leadsto {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \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 0.065000000000000002 < y.im < 5.29999999999999988e178

                      1. Initial program 48.6%

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

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

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

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

                      if 5.29999999999999988e178 < 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. 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 rewrites69.4%

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

                          \[\leadsto e^{\log \color{blue}{\left(-1 \cdot x.im\right)} \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \mathsf{fma}\left(1 \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. Step-by-step derivation
                          1. mul-1-negN/A

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

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

                          \[\leadsto e^{\log \color{blue}{\left(-x.im\right)} \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \mathsf{fma}\left(1 \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. 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(1 \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. Step-by-step derivation
                          1. mul-1-negN/A

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

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

                          \[\leadsto e^{\color{blue}{\left(-y.im\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}}} \cdot \mathsf{fma}\left(1 \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. Recombined 4 regimes into one program.
                      9. Add Preprocessing

                      Alternative 8: 72.4% accurate, 1.1× speedup?

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

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

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

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

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

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

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

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

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

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

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

                        if -3.2000000000000002e51 < y.im < 0.065000000000000002

                        1. Initial program 46.4%

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

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

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

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

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

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

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

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

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

                            \[\leadsto {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \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) \]
                        8. Applied rewrites87.3%

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

                        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 e^{\log \left(\sqrt{x.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.f6459.0

                            \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(\color{blue}{\tan^{-1}_* \frac{x.im}{x.re}} \cdot y.re\right) \]
                        5. Applied rewrites59.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(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)} \]
                      3. Recombined 3 regimes into one program.
                      4. Add Preprocessing

                      Alternative 9: 67.1% accurate, 1.1× speedup?

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

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

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

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

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

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

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

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

                        if -4.79999999999999957e-7 < y.re < 4.3e-19

                        1. Initial program 43.9%

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

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

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

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

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

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

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

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

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

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

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

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

                      Alternative 10: 65.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)\\ t_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 t\_0\\ t_2 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\ t_3 := t\_2 \cdot \sin \left(\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right) \cdot y.im\right)\\ \mathbf{if}\;y.im \leq -3.9 \cdot 10^{+28}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y.im \leq -5.4 \cdot 10^{-234}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;y.im \leq 3 \cdot 10^{-214}:\\ \;\;\;\;t\_2 \cdot t\_0\\ \mathbf{elif}\;y.im \leq 0.065:\\ \;\;\;\;t\_3\\ \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
                               (*
                                (exp
                                 (-
                                  (* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.re)
                                  (* (atan2 x.im x.re) y.im)))
                                t_0))
                              (t_2 (pow (hypot x.im x.re) y.re))
                              (t_3 (* t_2 (sin (* (log (hypot x.im x.re)) y.im)))))
                         (if (<= y.im -3.9e+28)
                           t_1
                           (if (<= y.im -5.4e-234)
                             t_3
                             (if (<= y.im 3e-214) (* t_2 t_0) (if (<= y.im 0.065) t_3 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 = exp(((log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * t_0;
                      	double t_2 = pow(hypot(x_46_im, x_46_re), y_46_re);
                      	double t_3 = t_2 * sin((log(hypot(x_46_im, x_46_re)) * y_46_im));
                      	double tmp;
                      	if (y_46_im <= -3.9e+28) {
                      		tmp = t_1;
                      	} else if (y_46_im <= -5.4e-234) {
                      		tmp = t_3;
                      	} else if (y_46_im <= 3e-214) {
                      		tmp = t_2 * t_0;
                      	} else if (y_46_im <= 0.065) {
                      		tmp = t_3;
                      	} 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.exp(((Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - (Math.atan2(x_46_im, x_46_re) * y_46_im))) * t_0;
                      	double t_2 = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
                      	double t_3 = t_2 * Math.sin((Math.log(Math.hypot(x_46_im, x_46_re)) * y_46_im));
                      	double tmp;
                      	if (y_46_im <= -3.9e+28) {
                      		tmp = t_1;
                      	} else if (y_46_im <= -5.4e-234) {
                      		tmp = t_3;
                      	} else if (y_46_im <= 3e-214) {
                      		tmp = t_2 * t_0;
                      	} else if (y_46_im <= 0.065) {
                      		tmp = t_3;
                      	} 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.exp(((math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - (math.atan2(x_46_im, x_46_re) * y_46_im))) * t_0
                      	t_2 = math.pow(math.hypot(x_46_im, x_46_re), y_46_re)
                      	t_3 = t_2 * math.sin((math.log(math.hypot(x_46_im, x_46_re)) * y_46_im))
                      	tmp = 0
                      	if y_46_im <= -3.9e+28:
                      		tmp = t_1
                      	elif y_46_im <= -5.4e-234:
                      		tmp = t_3
                      	elif y_46_im <= 3e-214:
                      		tmp = t_2 * t_0
                      	elif y_46_im <= 0.065:
                      		tmp = t_3
                      	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(exp(Float64(Float64(log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) * y_46_re) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * t_0)
                      	t_2 = hypot(x_46_im, x_46_re) ^ y_46_re
                      	t_3 = Float64(t_2 * sin(Float64(log(hypot(x_46_im, x_46_re)) * y_46_im)))
                      	tmp = 0.0
                      	if (y_46_im <= -3.9e+28)
                      		tmp = t_1;
                      	elseif (y_46_im <= -5.4e-234)
                      		tmp = t_3;
                      	elseif (y_46_im <= 3e-214)
                      		tmp = Float64(t_2 * t_0);
                      	elseif (y_46_im <= 0.065)
                      		tmp = t_3;
                      	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 = exp(((log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * t_0;
                      	t_2 = hypot(x_46_im, x_46_re) ^ y_46_re;
                      	t_3 = t_2 * sin((log(hypot(x_46_im, x_46_re)) * y_46_im));
                      	tmp = 0.0;
                      	if (y_46_im <= -3.9e+28)
                      		tmp = t_1;
                      	elseif (y_46_im <= -5.4e-234)
                      		tmp = t_3;
                      	elseif (y_46_im <= 3e-214)
                      		tmp = t_2 * t_0;
                      	elseif (y_46_im <= 0.065)
                      		tmp = t_3;
                      	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[Exp[N[(N[(N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * y$46$re), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$0), $MachinePrecision]}, Block[{t$95$2 = N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 * N[Sin[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$im, -3.9e+28], t$95$1, If[LessEqual[y$46$im, -5.4e-234], t$95$3, If[LessEqual[y$46$im, 3e-214], N[(t$95$2 * t$95$0), $MachinePrecision], If[LessEqual[y$46$im, 0.065], t$95$3, 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 := e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot t\_0\\
                      t_2 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
                      t_3 := t\_2 \cdot \sin \left(\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right) \cdot y.im\right)\\
                      \mathbf{if}\;y.im \leq -3.9 \cdot 10^{+28}:\\
                      \;\;\;\;t\_1\\
                      
                      \mathbf{elif}\;y.im \leq -5.4 \cdot 10^{-234}:\\
                      \;\;\;\;t\_3\\
                      
                      \mathbf{elif}\;y.im \leq 3 \cdot 10^{-214}:\\
                      \;\;\;\;t\_2 \cdot t\_0\\
                      
                      \mathbf{elif}\;y.im \leq 0.065:\\
                      \;\;\;\;t\_3\\
                      
                      \mathbf{else}:\\
                      \;\;\;\;t\_1\\
                      
                      
                      \end{array}
                      \end{array}
                      
                      Derivation
                      1. Split input into 3 regimes
                      2. if y.im < -3.8999999999999999e28 or 0.065000000000000002 < y.im

                        1. Initial program 45.4%

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

                          \[\leadsto e^{\log \left(\sqrt{x.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.f6459.0

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

                        if -3.8999999999999999e28 < y.im < -5.4000000000000003e-234 or 2.99999999999999994e-214 < y.im < 0.065000000000000002

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

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

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

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

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

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

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

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

                            \[\leadsto {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \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 {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \cdot \sin \left(\color{blue}{\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)} \cdot y.im\right) \]
                          4. unpow2N/A

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

                            \[\leadsto {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \cdot \sin \left(\log \color{blue}{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)} \cdot y.im\right) \]
                        8. Applied rewrites73.3%

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

                        if -5.4000000000000003e-234 < y.im < 2.99999999999999994e-214

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

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

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

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

                          \[\leadsto \color{blue}{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}} \]
                        7. 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.f6485.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) \]
                        8. Applied rewrites85.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)} \]
                      3. Recombined 3 regimes into one program.
                      4. Add Preprocessing

                      Alternative 11: 60.0% accurate, 1.3× speedup?

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

                        1. Initial program 48.3%

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

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

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

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

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

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

                          \[\leadsto \color{blue}{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}} \]
                        7. 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.f6483.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) \]
                        8. Applied rewrites83.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)} \]
                        9. Step-by-step derivation
                          1. Applied rewrites84.7%

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

                          if -1.36e-11 < y.re < 2.49999999999999995e-13

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                            if 2.49999999999999995e-13 < y.re

                            1. Initial program 46.5%

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

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

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

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

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

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

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

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

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

                                \[\leadsto {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \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 {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \cdot \sin \left(\color{blue}{\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)} \cdot y.im\right) \]
                              4. unpow2N/A

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

                                \[\leadsto {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \cdot \sin \left(\log \color{blue}{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)} \cdot y.im\right) \]
                            8. Applied rewrites56.5%

                              \[\leadsto {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \cdot \sin \color{blue}{\left(\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right) \cdot y.im\right)} \]
                          11. Recombined 3 regimes into one program.
                          12. Add Preprocessing

                          Alternative 12: 60.1% accurate, 1.3× speedup?

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

                            1. Initial program 48.3%

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

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

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

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

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

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

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

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

                            if -3.79999999999999996e-12 < y.re < 2.49999999999999995e-13

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                              if 2.49999999999999995e-13 < y.re

                              1. Initial program 46.5%

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

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

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

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

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

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

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

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

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

                                  \[\leadsto {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \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 {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \cdot \sin \left(\color{blue}{\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)} \cdot y.im\right) \]
                                4. unpow2N/A

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

                                  \[\leadsto {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \cdot \sin \left(\log \color{blue}{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)} \cdot y.im\right) \]
                              8. Applied rewrites56.5%

                                \[\leadsto {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \cdot \sin \color{blue}{\left(\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right) \cdot y.im\right)} \]
                            11. Recombined 3 regimes into one program.
                            12. Add Preprocessing

                            Alternative 13: 58.5% accurate, 1.5× speedup?

                            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y.re \leq -3.8 \cdot 10^{-12} \lor \neg \left(y.re \leq 3.3 \cdot 10^{-12}\right):\\ \;\;\;\;{\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)\\ \mathbf{else}:\\ \;\;\;\;1 \cdot \sin \left(\mathsf{fma}\left(y.re, \frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.im}, \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \cdot y.im\right)\\ \end{array} \end{array} \]
                            (FPCore (x.re x.im y.re y.im)
                             :precision binary64
                             (if (or (<= y.re -3.8e-12) (not (<= y.re 3.3e-12)))
                               (* (pow (hypot x.im x.re) y.re) (sin (* (atan2 x.im x.re) y.re)))
                               (*
                                1.0
                                (sin
                                 (* (fma y.re (/ (atan2 x.im x.re) y.im) (log (hypot x.im x.re))) y.im)))))
                            double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
                            	double tmp;
                            	if ((y_46_re <= -3.8e-12) || !(y_46_re <= 3.3e-12)) {
                            		tmp = pow(hypot(x_46_im, x_46_re), y_46_re) * sin((atan2(x_46_im, x_46_re) * y_46_re));
                            	} else {
                            		tmp = 1.0 * sin((fma(y_46_re, (atan2(x_46_im, x_46_re) / y_46_im), log(hypot(x_46_im, x_46_re))) * y_46_im));
                            	}
                            	return tmp;
                            }
                            
                            function code(x_46_re, x_46_im, y_46_re, y_46_im)
                            	tmp = 0.0
                            	if ((y_46_re <= -3.8e-12) || !(y_46_re <= 3.3e-12))
                            		tmp = Float64((hypot(x_46_im, x_46_re) ^ y_46_re) * sin(Float64(atan(x_46_im, x_46_re) * y_46_re)));
                            	else
                            		tmp = Float64(1.0 * sin(Float64(fma(y_46_re, Float64(atan(x_46_im, x_46_re) / y_46_im), log(hypot(x_46_im, x_46_re))) * y_46_im)));
                            	end
                            	return tmp
                            end
                            
                            code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[Or[LessEqual[y$46$re, -3.8e-12], N[Not[LessEqual[y$46$re, 3.3e-12]], $MachinePrecision]], N[(N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * N[Sin[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(1.0 * N[Sin[N[(N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] / y$46$im), $MachinePrecision] + N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * y$46$im), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
                            
                            \begin{array}{l}
                            
                            \\
                            \begin{array}{l}
                            \mathbf{if}\;y.re \leq -3.8 \cdot 10^{-12} \lor \neg \left(y.re \leq 3.3 \cdot 10^{-12}\right):\\
                            \;\;\;\;{\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)\\
                            
                            \mathbf{else}:\\
                            \;\;\;\;1 \cdot \sin \left(\mathsf{fma}\left(y.re, \frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.im}, \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \cdot y.im\right)\\
                            
                            
                            \end{array}
                            \end{array}
                            
                            Derivation
                            1. Split input into 2 regimes
                            2. if y.re < -3.79999999999999996e-12 or 3.3000000000000001e-12 < y.re

                              1. Initial program 46.9%

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

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

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

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

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

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

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

                              if -3.79999999999999996e-12 < y.re < 3.3000000000000001e-12

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                              Alternative 14: 57.8% accurate, 1.5× speedup?

                              \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y.re \leq -3.8 \cdot 10^{-12} \lor \neg \left(y.re \leq 3.3 \cdot 10^{-12}\right):\\ \;\;\;\;{\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)\\ \mathbf{else}:\\ \;\;\;\;1 \cdot \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)\\ \end{array} \end{array} \]
                              (FPCore (x.re x.im y.re y.im)
                               :precision binary64
                               (if (or (<= y.re -3.8e-12) (not (<= y.re 3.3e-12)))
                                 (* (pow (hypot x.im x.re) y.re) (sin (* (atan2 x.im x.re) y.re)))
                                 (*
                                  1.0
                                  (sin
                                   (* (fma y.im (/ (log (hypot x.im x.re)) y.re) (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 tmp;
                              	if ((y_46_re <= -3.8e-12) || !(y_46_re <= 3.3e-12)) {
                              		tmp = pow(hypot(x_46_im, x_46_re), y_46_re) * sin((atan2(x_46_im, x_46_re) * y_46_re));
                              	} else {
                              		tmp = 1.0 * sin((fma(y_46_im, (log(hypot(x_46_im, x_46_re)) / y_46_re), atan2(x_46_im, x_46_re)) * y_46_re));
                              	}
                              	return tmp;
                              }
                              
                              function code(x_46_re, x_46_im, y_46_re, y_46_im)
                              	tmp = 0.0
                              	if ((y_46_re <= -3.8e-12) || !(y_46_re <= 3.3e-12))
                              		tmp = Float64((hypot(x_46_im, x_46_re) ^ y_46_re) * sin(Float64(atan(x_46_im, x_46_re) * y_46_re)));
                              	else
                              		tmp = Float64(1.0 * sin(Float64(fma(y_46_im, Float64(log(hypot(x_46_im, x_46_re)) / y_46_re), atan(x_46_im, x_46_re)) * y_46_re)));
                              	end
                              	return tmp
                              end
                              
                              code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[Or[LessEqual[y$46$re, -3.8e-12], N[Not[LessEqual[y$46$re, 3.3e-12]], $MachinePrecision]], N[(N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * N[Sin[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(1.0 * N[Sin[N[(N[(y$46$im * N[(N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision] / y$46$re), $MachinePrecision] + N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision] * y$46$re), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
                              
                              \begin{array}{l}
                              
                              \\
                              \begin{array}{l}
                              \mathbf{if}\;y.re \leq -3.8 \cdot 10^{-12} \lor \neg \left(y.re \leq 3.3 \cdot 10^{-12}\right):\\
                              \;\;\;\;{\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)\\
                              
                              \mathbf{else}:\\
                              \;\;\;\;1 \cdot \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)\\
                              
                              
                              \end{array}
                              \end{array}
                              
                              Derivation
                              1. Split input into 2 regimes
                              2. if y.re < -3.79999999999999996e-12 or 3.3000000000000001e-12 < y.re

                                1. Initial program 46.9%

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

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

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

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

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

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

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

                                if -3.79999999999999996e-12 < y.re < 3.3000000000000001e-12

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

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

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

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

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

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

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

                                    \[\leadsto {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \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 {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \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 {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \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 {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \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 {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \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 {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \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 {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \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 {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \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 {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \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.f6447.8

                                    \[\leadsto {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \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) \]
                                8. Applied rewrites47.8%

                                  \[\leadsto {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \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)} \]
                                9. Taylor expanded in y.re around 0

                                  \[\leadsto 1 \cdot \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) \]
                                10. Step-by-step derivation
                                  1. Applied rewrites47.4%

                                    \[\leadsto 1 \cdot \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) \]
                                11. Recombined 2 regimes into one program.
                                12. Final simplification55.8%

                                  \[\leadsto \begin{array}{l} \mathbf{if}\;y.re \leq -3.8 \cdot 10^{-12} \lor \neg \left(y.re \leq 3.3 \cdot 10^{-12}\right):\\ \;\;\;\;{\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)\\ \mathbf{else}:\\ \;\;\;\;1 \cdot \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)\\ \end{array} \]
                                13. Add Preprocessing

                                Alternative 15: 36.2% 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)\\ \mathbf{if}\;y.re \leq -0.125 \lor \neg \left(y.re \leq 9 \cdot 10^{-7}\right):\\ \;\;\;\;{x.im}^{y.re} \cdot t\_0\\ \mathbf{else}:\\ \;\;\;\;1 \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 (or (<= y.re -0.125) (not (<= y.re 9e-7)))
                                     (* (pow x.im y.re) t_0)
                                     (* 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));
                                	double tmp;
                                	if ((y_46_re <= -0.125) || !(y_46_re <= 9e-7)) {
                                		tmp = pow(x_46_im, y_46_re) * t_0;
                                	} else {
                                		tmp = 1.0 * t_0;
                                	}
                                	return tmp;
                                }
                                
                                module fmin_fmax_functions
                                    implicit none
                                    private
                                    public fmax
                                    public fmin
                                
                                    interface fmax
                                        module procedure fmax88
                                        module procedure fmax44
                                        module procedure fmax84
                                        module procedure fmax48
                                    end interface
                                    interface fmin
                                        module procedure fmin88
                                        module procedure fmin44
                                        module procedure fmin84
                                        module procedure fmin48
                                    end interface
                                contains
                                    real(8) function fmax88(x, y) result (res)
                                        real(8), intent (in) :: x
                                        real(8), intent (in) :: y
                                        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                    end function
                                    real(4) function fmax44(x, y) result (res)
                                        real(4), intent (in) :: x
                                        real(4), intent (in) :: y
                                        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                    end function
                                    real(8) function fmax84(x, y) result(res)
                                        real(8), intent (in) :: x
                                        real(4), intent (in) :: y
                                        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                    end function
                                    real(8) function fmax48(x, y) result(res)
                                        real(4), intent (in) :: x
                                        real(8), intent (in) :: y
                                        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                    end function
                                    real(8) function fmin88(x, y) result (res)
                                        real(8), intent (in) :: x
                                        real(8), intent (in) :: y
                                        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                    end function
                                    real(4) function fmin44(x, y) result (res)
                                        real(4), intent (in) :: x
                                        real(4), intent (in) :: y
                                        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                    end function
                                    real(8) function fmin84(x, y) result(res)
                                        real(8), intent (in) :: x
                                        real(4), intent (in) :: y
                                        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                    end function
                                    real(8) function fmin48(x, y) result(res)
                                        real(4), intent (in) :: x
                                        real(8), intent (in) :: y
                                        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                    end function
                                end module
                                
                                real(8) function code(x_46re, x_46im, y_46re, y_46im)
                                use fmin_fmax_functions
                                    real(8), intent (in) :: x_46re
                                    real(8), intent (in) :: x_46im
                                    real(8), intent (in) :: y_46re
                                    real(8), intent (in) :: y_46im
                                    real(8) :: t_0
                                    real(8) :: tmp
                                    t_0 = sin((atan2(x_46im, x_46re) * y_46re))
                                    if ((y_46re <= (-0.125d0)) .or. (.not. (y_46re <= 9d-7))) then
                                        tmp = (x_46im ** y_46re) * t_0
                                    else
                                        tmp = 1.0d0 * t_0
                                    end if
                                    code = tmp
                                end function
                                
                                public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
                                	double t_0 = Math.sin((Math.atan2(x_46_im, x_46_re) * y_46_re));
                                	double tmp;
                                	if ((y_46_re <= -0.125) || !(y_46_re <= 9e-7)) {
                                		tmp = Math.pow(x_46_im, y_46_re) * t_0;
                                	} else {
                                		tmp = 1.0 * 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 <= -0.125) or not (y_46_re <= 9e-7):
                                		tmp = math.pow(x_46_im, y_46_re) * t_0
                                	else:
                                		tmp = 1.0 * 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 <= -0.125) || !(y_46_re <= 9e-7))
                                		tmp = Float64((x_46_im ^ y_46_re) * t_0);
                                	else
                                		tmp = Float64(1.0 * 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 <= -0.125) || ~((y_46_re <= 9e-7)))
                                		tmp = (x_46_im ^ y_46_re) * t_0;
                                	else
                                		tmp = 1.0 * 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[Or[LessEqual[y$46$re, -0.125], N[Not[LessEqual[y$46$re, 9e-7]], $MachinePrecision]], N[(N[Power[x$46$im, y$46$re], $MachinePrecision] * t$95$0), $MachinePrecision], N[(1.0 * 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 -0.125 \lor \neg \left(y.re \leq 9 \cdot 10^{-7}\right):\\
                                \;\;\;\;{x.im}^{y.re} \cdot t\_0\\
                                
                                \mathbf{else}:\\
                                \;\;\;\;1 \cdot t\_0\\
                                
                                
                                \end{array}
                                \end{array}
                                
                                Derivation
                                1. Split input into 2 regimes
                                2. if y.re < -0.125 or 8.99999999999999959e-7 < y.re

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

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

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

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

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

                                    \[\leadsto \color{blue}{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}} \]
                                  7. 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.f6465.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) \]
                                  8. Applied rewrites65.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)} \]
                                  9. 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)} \]
                                  10. Step-by-step derivation
                                    1. Applied rewrites49.3%

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

                                    if -0.125 < y.re < 8.99999999999999959e-7

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

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

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

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

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

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

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

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

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

                                      \[\leadsto \begin{array}{l} \mathbf{if}\;y.re \leq -0.125 \lor \neg \left(y.re \leq 9 \cdot 10^{-7}\right):\\ \;\;\;\;{x.im}^{y.re} \cdot \sin \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\\ \mathbf{else}:\\ \;\;\;\;1 \cdot \sin \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\\ \end{array} \]
                                    13. Add Preprocessing

                                    Alternative 16: 35.8% accurate, 2.1× speedup?

                                    \[\begin{array}{l} \\ \begin{array}{l} t_0 := \sin \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\\ \mathbf{if}\;x.im \leq 5 \cdot 10^{-12}:\\ \;\;\;\;{x.re}^{y.re} \cdot t\_0\\ \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 (<= x.im 5e-12) (* (pow x.re y.re) t_0) (* (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 (x_46_im <= 5e-12) {
                                    		tmp = pow(x_46_re, y_46_re) * t_0;
                                    	} else {
                                    		tmp = pow(x_46_im, y_46_re) * t_0;
                                    	}
                                    	return tmp;
                                    }
                                    
                                    module fmin_fmax_functions
                                        implicit none
                                        private
                                        public fmax
                                        public fmin
                                    
                                        interface fmax
                                            module procedure fmax88
                                            module procedure fmax44
                                            module procedure fmax84
                                            module procedure fmax48
                                        end interface
                                        interface fmin
                                            module procedure fmin88
                                            module procedure fmin44
                                            module procedure fmin84
                                            module procedure fmin48
                                        end interface
                                    contains
                                        real(8) function fmax88(x, y) result (res)
                                            real(8), intent (in) :: x
                                            real(8), intent (in) :: y
                                            res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                        end function
                                        real(4) function fmax44(x, y) result (res)
                                            real(4), intent (in) :: x
                                            real(4), intent (in) :: y
                                            res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                        end function
                                        real(8) function fmax84(x, y) result(res)
                                            real(8), intent (in) :: x
                                            real(4), intent (in) :: y
                                            res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                        end function
                                        real(8) function fmax48(x, y) result(res)
                                            real(4), intent (in) :: x
                                            real(8), intent (in) :: y
                                            res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                        end function
                                        real(8) function fmin88(x, y) result (res)
                                            real(8), intent (in) :: x
                                            real(8), intent (in) :: y
                                            res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                        end function
                                        real(4) function fmin44(x, y) result (res)
                                            real(4), intent (in) :: x
                                            real(4), intent (in) :: y
                                            res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                        end function
                                        real(8) function fmin84(x, y) result(res)
                                            real(8), intent (in) :: x
                                            real(4), intent (in) :: y
                                            res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                        end function
                                        real(8) function fmin48(x, y) result(res)
                                            real(4), intent (in) :: x
                                            real(8), intent (in) :: y
                                            res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                        end function
                                    end module
                                    
                                    real(8) function code(x_46re, x_46im, y_46re, y_46im)
                                    use fmin_fmax_functions
                                        real(8), intent (in) :: x_46re
                                        real(8), intent (in) :: x_46im
                                        real(8), intent (in) :: y_46re
                                        real(8), intent (in) :: y_46im
                                        real(8) :: t_0
                                        real(8) :: tmp
                                        t_0 = sin((atan2(x_46im, x_46re) * y_46re))
                                        if (x_46im <= 5d-12) then
                                            tmp = (x_46re ** y_46re) * t_0
                                        else
                                            tmp = (x_46im ** y_46re) * t_0
                                        end if
                                        code = tmp
                                    end function
                                    
                                    public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
                                    	double t_0 = Math.sin((Math.atan2(x_46_im, x_46_re) * y_46_re));
                                    	double tmp;
                                    	if (x_46_im <= 5e-12) {
                                    		tmp = Math.pow(x_46_re, y_46_re) * t_0;
                                    	} 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 x_46_im <= 5e-12:
                                    		tmp = math.pow(x_46_re, y_46_re) * t_0
                                    	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 (x_46_im <= 5e-12)
                                    		tmp = Float64((x_46_re ^ y_46_re) * t_0);
                                    	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 (x_46_im <= 5e-12)
                                    		tmp = (x_46_re ^ y_46_re) * t_0;
                                    	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[x$46$im, 5e-12], N[(N[Power[x$46$re, y$46$re], $MachinePrecision] * t$95$0), $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}\;x.im \leq 5 \cdot 10^{-12}:\\
                                    \;\;\;\;{x.re}^{y.re} \cdot t\_0\\
                                    
                                    \mathbf{else}:\\
                                    \;\;\;\;{x.im}^{y.re} \cdot t\_0\\
                                    
                                    
                                    \end{array}
                                    \end{array}
                                    
                                    Derivation
                                    1. Split input into 2 regimes
                                    2. if x.im < 4.9999999999999997e-12

                                      1. Initial program 49.5%

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

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

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

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

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

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

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

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

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

                                        if 4.9999999999999997e-12 < x.im

                                        1. Initial program 35.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                        Alternative 17: 13.5% accurate, 3.2× speedup?

                                        \[\begin{array}{l} \\ 1 \cdot \sin \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \end{array} \]
                                        (FPCore (x.re x.im y.re y.im)
                                         :precision binary64
                                         (* 1.0 (sin (* (atan2 x.im x.re) y.re))))
                                        double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
                                        	return 1.0 * sin((atan2(x_46_im, x_46_re) * y_46_re));
                                        }
                                        
                                        module fmin_fmax_functions
                                            implicit none
                                            private
                                            public fmax
                                            public fmin
                                        
                                            interface fmax
                                                module procedure fmax88
                                                module procedure fmax44
                                                module procedure fmax84
                                                module procedure fmax48
                                            end interface
                                            interface fmin
                                                module procedure fmin88
                                                module procedure fmin44
                                                module procedure fmin84
                                                module procedure fmin48
                                            end interface
                                        contains
                                            real(8) function fmax88(x, y) result (res)
                                                real(8), intent (in) :: x
                                                real(8), intent (in) :: y
                                                res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                            end function
                                            real(4) function fmax44(x, y) result (res)
                                                real(4), intent (in) :: x
                                                real(4), intent (in) :: y
                                                res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                            end function
                                            real(8) function fmax84(x, y) result(res)
                                                real(8), intent (in) :: x
                                                real(4), intent (in) :: y
                                                res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                            end function
                                            real(8) function fmax48(x, y) result(res)
                                                real(4), intent (in) :: x
                                                real(8), intent (in) :: y
                                                res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                            end function
                                            real(8) function fmin88(x, y) result (res)
                                                real(8), intent (in) :: x
                                                real(8), intent (in) :: y
                                                res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                            end function
                                            real(4) function fmin44(x, y) result (res)
                                                real(4), intent (in) :: x
                                                real(4), intent (in) :: y
                                                res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                            end function
                                            real(8) function fmin84(x, y) result(res)
                                                real(8), intent (in) :: x
                                                real(4), intent (in) :: y
                                                res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                            end function
                                            real(8) function fmin48(x, y) result(res)
                                                real(4), intent (in) :: x
                                                real(8), intent (in) :: y
                                                res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                            end function
                                        end module
                                        
                                        real(8) function code(x_46re, x_46im, y_46re, y_46im)
                                        use fmin_fmax_functions
                                            real(8), intent (in) :: x_46re
                                            real(8), intent (in) :: x_46im
                                            real(8), intent (in) :: y_46re
                                            real(8), intent (in) :: y_46im
                                            code = 1.0d0 * sin((atan2(x_46im, x_46re) * y_46re))
                                        end function
                                        
                                        public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
                                        	return 1.0 * Math.sin((Math.atan2(x_46_im, x_46_re) * y_46_re));
                                        }
                                        
                                        def code(x_46_re, x_46_im, y_46_re, y_46_im):
                                        	return 1.0 * math.sin((math.atan2(x_46_im, x_46_re) * y_46_re))
                                        
                                        function code(x_46_re, x_46_im, y_46_re, y_46_im)
                                        	return Float64(1.0 * sin(Float64(atan(x_46_im, x_46_re) * y_46_re)))
                                        end
                                        
                                        function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im)
                                        	tmp = 1.0 * sin((atan2(x_46_im, x_46_re) * y_46_re));
                                        end
                                        
                                        code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[(1.0 * N[Sin[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
                                        
                                        \begin{array}{l}
                                        
                                        \\
                                        1 \cdot \sin \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)
                                        \end{array}
                                        
                                        Derivation
                                        1. Initial program 45.6%

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

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

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

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

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

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

                                          \[\leadsto \color{blue}{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}} \]
                                        7. 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.f6444.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) \]
                                        8. Applied rewrites44.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)} \]
                                        9. 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)} \]
                                        10. Step-by-step derivation
                                          1. Applied rewrites15.0%

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

                                          Reproduce

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