powComplex, imaginary part

Percentage Accurate: 40.8% → 80.3%
Time: 2.2min
Alternatives: 12
Speedup: N/A×

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 12 alternatives:

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

Initial Program: 40.8% 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: 80.3% accurate, N/A× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\ e^{\mathsf{fma}\left(t\_0, y.re, \left(-\tan^{-1}_* \frac{x.im}{x.re}\right) \cdot y.im\right)} \cdot \sin \left(\mathsf{fma}\left(t\_0, y.im, \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\right) \end{array} \end{array} \]
(FPCore (x.re x.im y.re y.im)
 :precision binary64
 (let* ((t_0 (log (hypot x.re x.im))))
   (*
    (exp (fma t_0 y.re (* (- (atan2 x.im x.re)) y.im)))
    (sin (fma 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(hypot(x_46_re, x_46_im));
	return exp(fma(t_0, y_46_re, (-atan2(x_46_im, x_46_re) * y_46_im))) * sin(fma(t_0, y_46_im, (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(hypot(x_46_re, x_46_im))
	return Float64(exp(fma(t_0, y_46_re, Float64(Float64(-atan(x_46_im, x_46_re)) * y_46_im))) * sin(fma(t_0, y_46_im, Float64(atan(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[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, N[(N[Exp[N[(t$95$0 * y$46$re + N[((-N[ArcTan[x$46$im / x$46$re], $MachinePrecision]) * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(t$95$0 * y$46$im + 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(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
e^{\mathsf{fma}\left(t\_0, y.re, \left(-\tan^{-1}_* \frac{x.im}{x.re}\right) \cdot y.im\right)} \cdot \sin \left(\mathsf{fma}\left(t\_0, y.im, \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\right)
\end{array}
\end{array}
Derivation
  1. Initial program 38.0%

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

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

    Alternative 2: 78.0% accurate, N/A× speedup?

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

      1. Initial program 26.3%

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

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

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

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

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

        if -5.5999999999999996e37 < x.im

        1. Initial program 41.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        Alternative 3: 77.8% accurate, N/A× speedup?

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

          1. Initial program 39.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            if 3.2e116 < y.im

            1. Initial program 32.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            Alternative 4: 71.2% accurate, N/A× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} t_0 := \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\ t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\ t_2 := \cos t\_1\\ t_3 := {t\_0}^{2}\\ t_4 := \sin t\_1\\ t_5 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\ t_6 := \tan^{-1}_* \frac{x.im}{x.re} \cdot t\_5\\ t_7 := {\tan^{-1}_* \frac{x.im}{x.re}}^{2} \cdot t\_5\\ t_8 := t\_4 \cdot t\_6\\ t_9 := t\_4 \cdot t\_5\\ \mathbf{if}\;y.im \leq -0.0035 \lor \neg \left(y.im \leq 9 \cdot 10^{-24}\right):\\ \;\;\;\;e^{\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.re, \left(-\tan^{-1}_* \frac{x.im}{x.re}\right) \cdot y.im\right)} \cdot t\_1\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(y.im, \mathsf{fma}\left(-1, t\_8, \mathsf{fma}\left(y.im, \mathsf{fma}\left(-1, t\_2 \cdot \left(t\_0 \cdot t\_6\right), \mathsf{fma}\left(-0.5, t\_3 \cdot t\_9, \mathsf{fma}\left(0.5, t\_4 \cdot t\_7, y.im \cdot \mathsf{fma}\left(-0.16666666666666666, t\_2 \cdot \left({t\_0}^{3} \cdot t\_5\right), \mathsf{fma}\left(-0.16666666666666666, t\_4 \cdot \left({\tan^{-1}_* \frac{x.im}{x.re}}^{3} \cdot t\_5\right), \mathsf{fma}\left(0.5, t\_2 \cdot \left(t\_0 \cdot t\_7\right), 0.5 \cdot \left(t\_3 \cdot t\_8\right)\right)\right)\right)\right)\right)\right), t\_2 \cdot \left(t\_0 \cdot t\_5\right)\right)\right), t\_9\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)))
                    (t_1 (* y.re (atan2 x.im x.re)))
                    (t_2 (cos t_1))
                    (t_3 (pow t_0 2.0))
                    (t_4 (sin t_1))
                    (t_5 (pow (hypot x.im x.re) y.re))
                    (t_6 (* (atan2 x.im x.re) t_5))
                    (t_7 (* (pow (atan2 x.im x.re) 2.0) t_5))
                    (t_8 (* t_4 t_6))
                    (t_9 (* t_4 t_5)))
               (if (or (<= y.im -0.0035) (not (<= y.im 9e-24)))
                 (*
                  (exp (fma (log (hypot x.re x.im)) y.re (* (- (atan2 x.im x.re)) y.im)))
                  t_1)
                 (fma
                  y.im
                  (fma
                   -1.0
                   t_8
                   (fma
                    y.im
                    (fma
                     -1.0
                     (* t_2 (* t_0 t_6))
                     (fma
                      -0.5
                      (* t_3 t_9)
                      (fma
                       0.5
                       (* t_4 t_7)
                       (*
                        y.im
                        (fma
                         -0.16666666666666666
                         (* t_2 (* (pow t_0 3.0) t_5))
                         (fma
                          -0.16666666666666666
                          (* t_4 (* (pow (atan2 x.im x.re) 3.0) t_5))
                          (fma 0.5 (* t_2 (* t_0 t_7)) (* 0.5 (* t_3 t_8)))))))))
                    (* t_2 (* t_0 t_5))))
                  t_9))))
            double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
            	double t_0 = log(hypot(x_46_im, x_46_re));
            	double t_1 = y_46_re * atan2(x_46_im, x_46_re);
            	double t_2 = cos(t_1);
            	double t_3 = pow(t_0, 2.0);
            	double t_4 = sin(t_1);
            	double t_5 = pow(hypot(x_46_im, x_46_re), y_46_re);
            	double t_6 = atan2(x_46_im, x_46_re) * t_5;
            	double t_7 = pow(atan2(x_46_im, x_46_re), 2.0) * t_5;
            	double t_8 = t_4 * t_6;
            	double t_9 = t_4 * t_5;
            	double tmp;
            	if ((y_46_im <= -0.0035) || !(y_46_im <= 9e-24)) {
            		tmp = exp(fma(log(hypot(x_46_re, x_46_im)), y_46_re, (-atan2(x_46_im, x_46_re) * y_46_im))) * t_1;
            	} else {
            		tmp = fma(y_46_im, fma(-1.0, t_8, fma(y_46_im, fma(-1.0, (t_2 * (t_0 * t_6)), fma(-0.5, (t_3 * t_9), fma(0.5, (t_4 * t_7), (y_46_im * fma(-0.16666666666666666, (t_2 * (pow(t_0, 3.0) * t_5)), fma(-0.16666666666666666, (t_4 * (pow(atan2(x_46_im, x_46_re), 3.0) * t_5)), fma(0.5, (t_2 * (t_0 * t_7)), (0.5 * (t_3 * t_8))))))))), (t_2 * (t_0 * t_5)))), t_9);
            	}
            	return tmp;
            }
            
            function code(x_46_re, x_46_im, y_46_re, y_46_im)
            	t_0 = log(hypot(x_46_im, x_46_re))
            	t_1 = Float64(y_46_re * atan(x_46_im, x_46_re))
            	t_2 = cos(t_1)
            	t_3 = t_0 ^ 2.0
            	t_4 = sin(t_1)
            	t_5 = hypot(x_46_im, x_46_re) ^ y_46_re
            	t_6 = Float64(atan(x_46_im, x_46_re) * t_5)
            	t_7 = Float64((atan(x_46_im, x_46_re) ^ 2.0) * t_5)
            	t_8 = Float64(t_4 * t_6)
            	t_9 = Float64(t_4 * t_5)
            	tmp = 0.0
            	if ((y_46_im <= -0.0035) || !(y_46_im <= 9e-24))
            		tmp = Float64(exp(fma(log(hypot(x_46_re, x_46_im)), y_46_re, Float64(Float64(-atan(x_46_im, x_46_re)) * y_46_im))) * t_1);
            	else
            		tmp = fma(y_46_im, fma(-1.0, t_8, fma(y_46_im, fma(-1.0, Float64(t_2 * Float64(t_0 * t_6)), fma(-0.5, Float64(t_3 * t_9), fma(0.5, Float64(t_4 * t_7), Float64(y_46_im * fma(-0.16666666666666666, Float64(t_2 * Float64((t_0 ^ 3.0) * t_5)), fma(-0.16666666666666666, Float64(t_4 * Float64((atan(x_46_im, x_46_re) ^ 3.0) * t_5)), fma(0.5, Float64(t_2 * Float64(t_0 * t_7)), Float64(0.5 * Float64(t_3 * t_8))))))))), Float64(t_2 * Float64(t_0 * t_5)))), t_9);
            	end
            	return tmp
            end
            
            code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Cos[t$95$1], $MachinePrecision]}, Block[{t$95$3 = N[Power[t$95$0, 2.0], $MachinePrecision]}, Block[{t$95$4 = N[Sin[t$95$1], $MachinePrecision]}, Block[{t$95$5 = N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, Block[{t$95$6 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * t$95$5), $MachinePrecision]}, Block[{t$95$7 = N[(N[Power[N[ArcTan[x$46$im / x$46$re], $MachinePrecision], 2.0], $MachinePrecision] * t$95$5), $MachinePrecision]}, Block[{t$95$8 = N[(t$95$4 * t$95$6), $MachinePrecision]}, Block[{t$95$9 = N[(t$95$4 * t$95$5), $MachinePrecision]}, If[Or[LessEqual[y$46$im, -0.0035], N[Not[LessEqual[y$46$im, 9e-24]], $MachinePrecision]], N[(N[Exp[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$re + N[((-N[ArcTan[x$46$im / x$46$re], $MachinePrecision]) * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$1), $MachinePrecision], N[(y$46$im * N[(-1.0 * t$95$8 + N[(y$46$im * N[(-1.0 * N[(t$95$2 * N[(t$95$0 * t$95$6), $MachinePrecision]), $MachinePrecision] + N[(-0.5 * N[(t$95$3 * t$95$9), $MachinePrecision] + N[(0.5 * N[(t$95$4 * t$95$7), $MachinePrecision] + N[(y$46$im * N[(-0.16666666666666666 * N[(t$95$2 * N[(N[Power[t$95$0, 3.0], $MachinePrecision] * t$95$5), $MachinePrecision]), $MachinePrecision] + N[(-0.16666666666666666 * N[(t$95$4 * N[(N[Power[N[ArcTan[x$46$im / x$46$re], $MachinePrecision], 3.0], $MachinePrecision] * t$95$5), $MachinePrecision]), $MachinePrecision] + N[(0.5 * N[(t$95$2 * N[(t$95$0 * t$95$7), $MachinePrecision]), $MachinePrecision] + N[(0.5 * N[(t$95$3 * t$95$8), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$2 * N[(t$95$0 * t$95$5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$9), $MachinePrecision]]]]]]]]]]]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            t_0 := \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
            t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
            t_2 := \cos t\_1\\
            t_3 := {t\_0}^{2}\\
            t_4 := \sin t\_1\\
            t_5 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
            t_6 := \tan^{-1}_* \frac{x.im}{x.re} \cdot t\_5\\
            t_7 := {\tan^{-1}_* \frac{x.im}{x.re}}^{2} \cdot t\_5\\
            t_8 := t\_4 \cdot t\_6\\
            t_9 := t\_4 \cdot t\_5\\
            \mathbf{if}\;y.im \leq -0.0035 \lor \neg \left(y.im \leq 9 \cdot 10^{-24}\right):\\
            \;\;\;\;e^{\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.re, \left(-\tan^{-1}_* \frac{x.im}{x.re}\right) \cdot y.im\right)} \cdot t\_1\\
            
            \mathbf{else}:\\
            \;\;\;\;\mathsf{fma}\left(y.im, \mathsf{fma}\left(-1, t\_8, \mathsf{fma}\left(y.im, \mathsf{fma}\left(-1, t\_2 \cdot \left(t\_0 \cdot t\_6\right), \mathsf{fma}\left(-0.5, t\_3 \cdot t\_9, \mathsf{fma}\left(0.5, t\_4 \cdot t\_7, y.im \cdot \mathsf{fma}\left(-0.16666666666666666, t\_2 \cdot \left({t\_0}^{3} \cdot t\_5\right), \mathsf{fma}\left(-0.16666666666666666, t\_4 \cdot \left({\tan^{-1}_* \frac{x.im}{x.re}}^{3} \cdot t\_5\right), \mathsf{fma}\left(0.5, t\_2 \cdot \left(t\_0 \cdot t\_7\right), 0.5 \cdot \left(t\_3 \cdot t\_8\right)\right)\right)\right)\right)\right)\right), t\_2 \cdot \left(t\_0 \cdot t\_5\right)\right)\right), t\_9\right)\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 2 regimes
            2. if y.im < -0.00350000000000000007 or 8.9999999999999995e-24 < y.im

              1. Initial program 32.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. Step-by-step derivation
                1. Applied rewrites74.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                if -0.00350000000000000007 < y.im < 8.9999999999999995e-24

                1. Initial program 44.1%

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

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

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

                \[\leadsto \begin{array}{l} \mathbf{if}\;y.im \leq -0.0035 \lor \neg \left(y.im \leq 9 \cdot 10^{-24}\right):\\ \;\;\;\;e^{\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.re, \left(-\tan^{-1}_* \frac{x.im}{x.re}\right) \cdot y.im\right)} \cdot \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(y.im, \mathsf{fma}\left(-1, \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\right), \mathsf{fma}\left(y.im, \mathsf{fma}\left(-1, \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot \left(\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right) \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\right)\right), \mathsf{fma}\left(-0.5, {\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{2} \cdot \left(\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\right), \mathsf{fma}\left(0.5, \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot \left({\tan^{-1}_* \frac{x.im}{x.re}}^{2} \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\right), y.im \cdot \mathsf{fma}\left(-0.16666666666666666, \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot \left({\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{3} \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\right), \mathsf{fma}\left(-0.16666666666666666, \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot \left({\tan^{-1}_* \frac{x.im}{x.re}}^{3} \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\right), \mathsf{fma}\left(0.5, \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot \left(\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right) \cdot \left({\tan^{-1}_* \frac{x.im}{x.re}}^{2} \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\right)\right), 0.5 \cdot \left({\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{2} \cdot \left(\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\right)\right)\right)\right)\right)\right)\right)\right)\right), \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot \left(\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right) \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\right)\right)\right), \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\right)\\ \end{array} \]
              6. Add Preprocessing

              Alternative 5: 66.6% accurate, N/A× speedup?

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

                1. Initial program 26.3%

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

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

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

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

                if -9.99999999999999977e37 < x.im < 8.80000000000000003e-39

                1. Initial program 48.7%

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

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

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

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

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

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

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

                if 8.80000000000000003e-39 < x.im

                1. Initial program 30.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              Alternative 6: 66.3% accurate, N/A× speedup?

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

                1. Initial program 41.8%

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

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

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

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

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

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

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

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

                if 8.80000000000000003e-39 < x.im

                1. Initial program 30.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              Alternative 7: 58.3% accurate, N/A× speedup?

              \[\begin{array}{l} \\ \begin{array}{l} t_0 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\ t_1 := \tan^{-1}_* \frac{x.im}{x.re} \cdot t\_0\\ t_2 := {\tan^{-1}_* \frac{x.im}{x.re}}^{2} \cdot t\_0\\ t_3 := \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\ t_4 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\ t_5 := \cos t\_4\\ t_6 := \sin t\_4\\ t_7 := t\_6 \cdot t\_0\\ t_8 := t\_6 \cdot t\_1\\ t_9 := {t\_3}^{2}\\ \mathbf{if}\;x.im \leq 230000000:\\ \;\;\;\;\mathsf{fma}\left(y.im, \mathsf{fma}\left(-1, t\_8, \mathsf{fma}\left(y.im, \mathsf{fma}\left(-1, t\_5 \cdot \left(t\_3 \cdot t\_1\right), \mathsf{fma}\left(-0.5, t\_9 \cdot t\_7, \mathsf{fma}\left(0.5, t\_6 \cdot t\_2, y.im \cdot \mathsf{fma}\left(-0.16666666666666666, t\_5 \cdot \left({t\_3}^{3} \cdot t\_0\right), \mathsf{fma}\left(-0.16666666666666666, t\_6 \cdot \left({\tan^{-1}_* \frac{x.im}{x.re}}^{3} \cdot t\_0\right), \mathsf{fma}\left(0.5, t\_5 \cdot \left(t\_3 \cdot t\_2\right), 0.5 \cdot \left(t\_9 \cdot t\_8\right)\right)\right)\right)\right)\right)\right), t\_5 \cdot \left(t\_3 \cdot t\_0\right)\right)\right), t\_7\right)\\ \mathbf{else}:\\ \;\;\;\;e^{y.re \cdot \log x.im - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \sin \left(\mathsf{fma}\left(y.im, \log x.im, t\_4\right)\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 (* (atan2 x.im x.re) t_0))
                      (t_2 (* (pow (atan2 x.im x.re) 2.0) t_0))
                      (t_3 (log (hypot x.im x.re)))
                      (t_4 (* y.re (atan2 x.im x.re)))
                      (t_5 (cos t_4))
                      (t_6 (sin t_4))
                      (t_7 (* t_6 t_0))
                      (t_8 (* t_6 t_1))
                      (t_9 (pow t_3 2.0)))
                 (if (<= x.im 230000000.0)
                   (fma
                    y.im
                    (fma
                     -1.0
                     t_8
                     (fma
                      y.im
                      (fma
                       -1.0
                       (* t_5 (* t_3 t_1))
                       (fma
                        -0.5
                        (* t_9 t_7)
                        (fma
                         0.5
                         (* t_6 t_2)
                         (*
                          y.im
                          (fma
                           -0.16666666666666666
                           (* t_5 (* (pow t_3 3.0) t_0))
                           (fma
                            -0.16666666666666666
                            (* t_6 (* (pow (atan2 x.im x.re) 3.0) t_0))
                            (fma 0.5 (* t_5 (* t_3 t_2)) (* 0.5 (* t_9 t_8)))))))))
                      (* t_5 (* t_3 t_0))))
                    t_7)
                   (*
                    (exp (- (* y.re (log x.im)) (* y.im (atan2 x.im x.re))))
                    (sin (fma y.im (log x.im) t_4))))))
              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 = atan2(x_46_im, x_46_re) * t_0;
              	double t_2 = pow(atan2(x_46_im, x_46_re), 2.0) * t_0;
              	double t_3 = log(hypot(x_46_im, x_46_re));
              	double t_4 = y_46_re * atan2(x_46_im, x_46_re);
              	double t_5 = cos(t_4);
              	double t_6 = sin(t_4);
              	double t_7 = t_6 * t_0;
              	double t_8 = t_6 * t_1;
              	double t_9 = pow(t_3, 2.0);
              	double tmp;
              	if (x_46_im <= 230000000.0) {
              		tmp = fma(y_46_im, fma(-1.0, t_8, fma(y_46_im, fma(-1.0, (t_5 * (t_3 * t_1)), fma(-0.5, (t_9 * t_7), fma(0.5, (t_6 * t_2), (y_46_im * fma(-0.16666666666666666, (t_5 * (pow(t_3, 3.0) * t_0)), fma(-0.16666666666666666, (t_6 * (pow(atan2(x_46_im, x_46_re), 3.0) * t_0)), fma(0.5, (t_5 * (t_3 * t_2)), (0.5 * (t_9 * t_8))))))))), (t_5 * (t_3 * t_0)))), t_7);
              	} else {
              		tmp = exp(((y_46_re * log(x_46_im)) - (y_46_im * atan2(x_46_im, x_46_re)))) * sin(fma(y_46_im, log(x_46_im), t_4));
              	}
              	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 = Float64(atan(x_46_im, x_46_re) * t_0)
              	t_2 = Float64((atan(x_46_im, x_46_re) ^ 2.0) * t_0)
              	t_3 = log(hypot(x_46_im, x_46_re))
              	t_4 = Float64(y_46_re * atan(x_46_im, x_46_re))
              	t_5 = cos(t_4)
              	t_6 = sin(t_4)
              	t_7 = Float64(t_6 * t_0)
              	t_8 = Float64(t_6 * t_1)
              	t_9 = t_3 ^ 2.0
              	tmp = 0.0
              	if (x_46_im <= 230000000.0)
              		tmp = fma(y_46_im, fma(-1.0, t_8, fma(y_46_im, fma(-1.0, Float64(t_5 * Float64(t_3 * t_1)), fma(-0.5, Float64(t_9 * t_7), fma(0.5, Float64(t_6 * t_2), Float64(y_46_im * fma(-0.16666666666666666, Float64(t_5 * Float64((t_3 ^ 3.0) * t_0)), fma(-0.16666666666666666, Float64(t_6 * Float64((atan(x_46_im, x_46_re) ^ 3.0) * t_0)), fma(0.5, Float64(t_5 * Float64(t_3 * t_2)), Float64(0.5 * Float64(t_9 * t_8))))))))), Float64(t_5 * Float64(t_3 * t_0)))), t_7);
              	else
              		tmp = Float64(exp(Float64(Float64(y_46_re * log(x_46_im)) - Float64(y_46_im * atan(x_46_im, x_46_re)))) * sin(fma(y_46_im, log(x_46_im), t_4)));
              	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[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * t$95$0), $MachinePrecision]}, Block[{t$95$2 = N[(N[Power[N[ArcTan[x$46$im / x$46$re], $MachinePrecision], 2.0], $MachinePrecision] * t$95$0), $MachinePrecision]}, Block[{t$95$3 = N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$4 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[Cos[t$95$4], $MachinePrecision]}, Block[{t$95$6 = N[Sin[t$95$4], $MachinePrecision]}, Block[{t$95$7 = N[(t$95$6 * t$95$0), $MachinePrecision]}, Block[{t$95$8 = N[(t$95$6 * t$95$1), $MachinePrecision]}, Block[{t$95$9 = N[Power[t$95$3, 2.0], $MachinePrecision]}, If[LessEqual[x$46$im, 230000000.0], N[(y$46$im * N[(-1.0 * t$95$8 + N[(y$46$im * N[(-1.0 * N[(t$95$5 * N[(t$95$3 * t$95$1), $MachinePrecision]), $MachinePrecision] + N[(-0.5 * N[(t$95$9 * t$95$7), $MachinePrecision] + N[(0.5 * N[(t$95$6 * t$95$2), $MachinePrecision] + N[(y$46$im * N[(-0.16666666666666666 * N[(t$95$5 * N[(N[Power[t$95$3, 3.0], $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision] + N[(-0.16666666666666666 * N[(t$95$6 * N[(N[Power[N[ArcTan[x$46$im / x$46$re], $MachinePrecision], 3.0], $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision] + N[(0.5 * N[(t$95$5 * N[(t$95$3 * t$95$2), $MachinePrecision]), $MachinePrecision] + N[(0.5 * N[(t$95$9 * t$95$8), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$5 * N[(t$95$3 * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$7), $MachinePrecision], N[(N[Exp[N[(N[(y$46$re * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision] - N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(y$46$im * N[Log[x$46$im], $MachinePrecision] + t$95$4), $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 := \tan^{-1}_* \frac{x.im}{x.re} \cdot t\_0\\
              t_2 := {\tan^{-1}_* \frac{x.im}{x.re}}^{2} \cdot t\_0\\
              t_3 := \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
              t_4 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
              t_5 := \cos t\_4\\
              t_6 := \sin t\_4\\
              t_7 := t\_6 \cdot t\_0\\
              t_8 := t\_6 \cdot t\_1\\
              t_9 := {t\_3}^{2}\\
              \mathbf{if}\;x.im \leq 230000000:\\
              \;\;\;\;\mathsf{fma}\left(y.im, \mathsf{fma}\left(-1, t\_8, \mathsf{fma}\left(y.im, \mathsf{fma}\left(-1, t\_5 \cdot \left(t\_3 \cdot t\_1\right), \mathsf{fma}\left(-0.5, t\_9 \cdot t\_7, \mathsf{fma}\left(0.5, t\_6 \cdot t\_2, y.im \cdot \mathsf{fma}\left(-0.16666666666666666, t\_5 \cdot \left({t\_3}^{3} \cdot t\_0\right), \mathsf{fma}\left(-0.16666666666666666, t\_6 \cdot \left({\tan^{-1}_* \frac{x.im}{x.re}}^{3} \cdot t\_0\right), \mathsf{fma}\left(0.5, t\_5 \cdot \left(t\_3 \cdot t\_2\right), 0.5 \cdot \left(t\_9 \cdot t\_8\right)\right)\right)\right)\right)\right)\right), t\_5 \cdot \left(t\_3 \cdot t\_0\right)\right)\right), t\_7\right)\\
              
              \mathbf{else}:\\
              \;\;\;\;e^{y.re \cdot \log x.im - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \sin \left(\mathsf{fma}\left(y.im, \log x.im, t\_4\right)\right)\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 2 regimes
              2. if x.im < 2.3e8

                1. Initial program 41.3%

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

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

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

                if 2.3e8 < x.im

                1. Initial program 30.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              Alternative 8: 57.6% accurate, N/A× speedup?

              \[\begin{array}{l} \\ \begin{array}{l} t_0 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\ t_1 := \tan^{-1}_* \frac{x.im}{x.re} \cdot t\_0\\ t_2 := \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\ t_3 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\ t_4 := \cos t\_3\\ t_5 := \sin t\_3\\ t_6 := t\_5 \cdot t\_0\\ \mathbf{if}\;x.im \leq 230000000:\\ \;\;\;\;\mathsf{fma}\left(y.im, \mathsf{fma}\left(-1, t\_5 \cdot t\_1, \mathsf{fma}\left(y.im, \mathsf{fma}\left(-1, t\_4 \cdot \left(t\_2 \cdot t\_1\right), \mathsf{fma}\left(-0.5, {t\_2}^{2} \cdot t\_6, 0.5 \cdot \left(t\_5 \cdot \left({\tan^{-1}_* \frac{x.im}{x.re}}^{2} \cdot t\_0\right)\right)\right)\right), t\_4 \cdot \left(t\_2 \cdot t\_0\right)\right)\right), t\_6\right)\\ \mathbf{else}:\\ \;\;\;\;e^{y.re \cdot \log x.im - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \sin \left(\mathsf{fma}\left(y.im, \log x.im, t\_3\right)\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 (* (atan2 x.im x.re) t_0))
                      (t_2 (log (hypot x.im x.re)))
                      (t_3 (* y.re (atan2 x.im x.re)))
                      (t_4 (cos t_3))
                      (t_5 (sin t_3))
                      (t_6 (* t_5 t_0)))
                 (if (<= x.im 230000000.0)
                   (fma
                    y.im
                    (fma
                     -1.0
                     (* t_5 t_1)
                     (fma
                      y.im
                      (fma
                       -1.0
                       (* t_4 (* t_2 t_1))
                       (fma
                        -0.5
                        (* (pow t_2 2.0) t_6)
                        (* 0.5 (* t_5 (* (pow (atan2 x.im x.re) 2.0) t_0)))))
                      (* t_4 (* t_2 t_0))))
                    t_6)
                   (*
                    (exp (- (* y.re (log x.im)) (* y.im (atan2 x.im x.re))))
                    (sin (fma y.im (log x.im) t_3))))))
              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 = atan2(x_46_im, x_46_re) * t_0;
              	double t_2 = log(hypot(x_46_im, x_46_re));
              	double t_3 = y_46_re * atan2(x_46_im, x_46_re);
              	double t_4 = cos(t_3);
              	double t_5 = sin(t_3);
              	double t_6 = t_5 * t_0;
              	double tmp;
              	if (x_46_im <= 230000000.0) {
              		tmp = fma(y_46_im, fma(-1.0, (t_5 * t_1), fma(y_46_im, fma(-1.0, (t_4 * (t_2 * t_1)), fma(-0.5, (pow(t_2, 2.0) * t_6), (0.5 * (t_5 * (pow(atan2(x_46_im, x_46_re), 2.0) * t_0))))), (t_4 * (t_2 * t_0)))), t_6);
              	} else {
              		tmp = exp(((y_46_re * log(x_46_im)) - (y_46_im * atan2(x_46_im, x_46_re)))) * sin(fma(y_46_im, log(x_46_im), t_3));
              	}
              	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 = Float64(atan(x_46_im, x_46_re) * t_0)
              	t_2 = log(hypot(x_46_im, x_46_re))
              	t_3 = Float64(y_46_re * atan(x_46_im, x_46_re))
              	t_4 = cos(t_3)
              	t_5 = sin(t_3)
              	t_6 = Float64(t_5 * t_0)
              	tmp = 0.0
              	if (x_46_im <= 230000000.0)
              		tmp = fma(y_46_im, fma(-1.0, Float64(t_5 * t_1), fma(y_46_im, fma(-1.0, Float64(t_4 * Float64(t_2 * t_1)), fma(-0.5, Float64((t_2 ^ 2.0) * t_6), Float64(0.5 * Float64(t_5 * Float64((atan(x_46_im, x_46_re) ^ 2.0) * t_0))))), Float64(t_4 * Float64(t_2 * t_0)))), t_6);
              	else
              		tmp = Float64(exp(Float64(Float64(y_46_re * log(x_46_im)) - Float64(y_46_im * atan(x_46_im, x_46_re)))) * sin(fma(y_46_im, log(x_46_im), t_3)));
              	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[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * t$95$0), $MachinePrecision]}, Block[{t$95$2 = N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[Cos[t$95$3], $MachinePrecision]}, Block[{t$95$5 = N[Sin[t$95$3], $MachinePrecision]}, Block[{t$95$6 = N[(t$95$5 * t$95$0), $MachinePrecision]}, If[LessEqual[x$46$im, 230000000.0], N[(y$46$im * N[(-1.0 * N[(t$95$5 * t$95$1), $MachinePrecision] + N[(y$46$im * N[(-1.0 * N[(t$95$4 * N[(t$95$2 * t$95$1), $MachinePrecision]), $MachinePrecision] + N[(-0.5 * N[(N[Power[t$95$2, 2.0], $MachinePrecision] * t$95$6), $MachinePrecision] + N[(0.5 * N[(t$95$5 * N[(N[Power[N[ArcTan[x$46$im / x$46$re], $MachinePrecision], 2.0], $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$4 * N[(t$95$2 * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$6), $MachinePrecision], N[(N[Exp[N[(N[(y$46$re * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision] - N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(y$46$im * N[Log[x$46$im], $MachinePrecision] + t$95$3), $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 := \tan^{-1}_* \frac{x.im}{x.re} \cdot t\_0\\
              t_2 := \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
              t_3 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
              t_4 := \cos t\_3\\
              t_5 := \sin t\_3\\
              t_6 := t\_5 \cdot t\_0\\
              \mathbf{if}\;x.im \leq 230000000:\\
              \;\;\;\;\mathsf{fma}\left(y.im, \mathsf{fma}\left(-1, t\_5 \cdot t\_1, \mathsf{fma}\left(y.im, \mathsf{fma}\left(-1, t\_4 \cdot \left(t\_2 \cdot t\_1\right), \mathsf{fma}\left(-0.5, {t\_2}^{2} \cdot t\_6, 0.5 \cdot \left(t\_5 \cdot \left({\tan^{-1}_* \frac{x.im}{x.re}}^{2} \cdot t\_0\right)\right)\right)\right), t\_4 \cdot \left(t\_2 \cdot t\_0\right)\right)\right), t\_6\right)\\
              
              \mathbf{else}:\\
              \;\;\;\;e^{y.re \cdot \log x.im - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \sin \left(\mathsf{fma}\left(y.im, \log x.im, t\_3\right)\right)\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 2 regimes
              2. if x.im < 2.3e8

                1. Initial program 41.3%

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

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

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

                if 2.3e8 < x.im

                1. Initial program 30.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              Alternative 9: 38.1% accurate, N/A× speedup?

              \[\begin{array}{l} \\ \begin{array}{l} t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\ t_1 := \cos t\_0\\ t_2 := \sin t\_0\\ t_3 := \sqrt{{x.im}^{2} + {x.re}^{2}}\\ t_4 := {t\_3}^{y.re}\\ t_5 := t\_2 \cdot t\_4\\ t_6 := \tan^{-1}_* \frac{x.im}{x.re} \cdot t\_4\\ t_7 := t\_2 \cdot t\_6\\ t_8 := \log t\_3\\ t_9 := {\tan^{-1}_* \frac{x.im}{x.re}}^{2} \cdot t\_4\\ t_10 := {t\_8}^{2}\\ \mathbf{if}\;x.im \leq -1.18 \cdot 10^{-306}:\\ \;\;\;\;{y.im}^{3} \cdot \mathsf{fma}\left(-1, \frac{t\_1 \cdot \left(t\_8 \cdot t\_6\right)}{y.im}, \mathsf{fma}\left(-1, \frac{t\_7}{{y.im}^{2}}, \mathsf{fma}\left(-0.5, \frac{t\_10 \cdot t\_5}{y.im}, \mathsf{fma}\left(-0.16666666666666666, t\_1 \cdot \left({t\_8}^{3} \cdot t\_4\right), \mathsf{fma}\left(-0.16666666666666666, t\_2 \cdot \left({\tan^{-1}_* \frac{x.im}{x.re}}^{3} \cdot t\_4\right), \mathsf{fma}\left(0.5, t\_1 \cdot \left(t\_8 \cdot t\_9\right), \mathsf{fma}\left(0.5, t\_10 \cdot t\_7, \mathsf{fma}\left(0.5, \frac{t\_2 \cdot t\_9}{y.im}, \frac{t\_1 \cdot \left(t\_8 \cdot t\_4\right)}{{y.im}^{2}} + \frac{t\_5}{{y.im}^{3}}\right)\right)\right)\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;e^{y.re \cdot \log x.im - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \sin \left(\mathsf{fma}\left(y.im, \log x.im, t\_0\right)\right)\\ \end{array} \end{array} \]
              (FPCore (x.re x.im y.re y.im)
               :precision binary64
               (let* ((t_0 (* y.re (atan2 x.im x.re)))
                      (t_1 (cos t_0))
                      (t_2 (sin t_0))
                      (t_3 (sqrt (+ (pow x.im 2.0) (pow x.re 2.0))))
                      (t_4 (pow t_3 y.re))
                      (t_5 (* t_2 t_4))
                      (t_6 (* (atan2 x.im x.re) t_4))
                      (t_7 (* t_2 t_6))
                      (t_8 (log t_3))
                      (t_9 (* (pow (atan2 x.im x.re) 2.0) t_4))
                      (t_10 (pow t_8 2.0)))
                 (if (<= x.im -1.18e-306)
                   (*
                    (pow y.im 3.0)
                    (fma
                     -1.0
                     (/ (* t_1 (* t_8 t_6)) y.im)
                     (fma
                      -1.0
                      (/ t_7 (pow y.im 2.0))
                      (fma
                       -0.5
                       (/ (* t_10 t_5) y.im)
                       (fma
                        -0.16666666666666666
                        (* t_1 (* (pow t_8 3.0) t_4))
                        (fma
                         -0.16666666666666666
                         (* t_2 (* (pow (atan2 x.im x.re) 3.0) t_4))
                         (fma
                          0.5
                          (* t_1 (* t_8 t_9))
                          (fma
                           0.5
                           (* t_10 t_7)
                           (fma
                            0.5
                            (/ (* t_2 t_9) y.im)
                            (+
                             (/ (* t_1 (* t_8 t_4)) (pow y.im 2.0))
                             (/ t_5 (pow y.im 3.0))))))))))))
                   (*
                    (exp (- (* y.re (log x.im)) (* y.im (atan2 x.im x.re))))
                    (sin (fma y.im (log x.im) t_0))))))
              double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
              	double t_0 = y_46_re * atan2(x_46_im, x_46_re);
              	double t_1 = cos(t_0);
              	double t_2 = sin(t_0);
              	double t_3 = sqrt((pow(x_46_im, 2.0) + pow(x_46_re, 2.0)));
              	double t_4 = pow(t_3, y_46_re);
              	double t_5 = t_2 * t_4;
              	double t_6 = atan2(x_46_im, x_46_re) * t_4;
              	double t_7 = t_2 * t_6;
              	double t_8 = log(t_3);
              	double t_9 = pow(atan2(x_46_im, x_46_re), 2.0) * t_4;
              	double t_10 = pow(t_8, 2.0);
              	double tmp;
              	if (x_46_im <= -1.18e-306) {
              		tmp = pow(y_46_im, 3.0) * fma(-1.0, ((t_1 * (t_8 * t_6)) / y_46_im), fma(-1.0, (t_7 / pow(y_46_im, 2.0)), fma(-0.5, ((t_10 * t_5) / y_46_im), fma(-0.16666666666666666, (t_1 * (pow(t_8, 3.0) * t_4)), fma(-0.16666666666666666, (t_2 * (pow(atan2(x_46_im, x_46_re), 3.0) * t_4)), fma(0.5, (t_1 * (t_8 * t_9)), fma(0.5, (t_10 * t_7), fma(0.5, ((t_2 * t_9) / y_46_im), (((t_1 * (t_8 * t_4)) / pow(y_46_im, 2.0)) + (t_5 / pow(y_46_im, 3.0)))))))))));
              	} else {
              		tmp = exp(((y_46_re * log(x_46_im)) - (y_46_im * atan2(x_46_im, x_46_re)))) * sin(fma(y_46_im, log(x_46_im), t_0));
              	}
              	return tmp;
              }
              
              function code(x_46_re, x_46_im, y_46_re, y_46_im)
              	t_0 = Float64(y_46_re * atan(x_46_im, x_46_re))
              	t_1 = cos(t_0)
              	t_2 = sin(t_0)
              	t_3 = sqrt(Float64((x_46_im ^ 2.0) + (x_46_re ^ 2.0)))
              	t_4 = t_3 ^ y_46_re
              	t_5 = Float64(t_2 * t_4)
              	t_6 = Float64(atan(x_46_im, x_46_re) * t_4)
              	t_7 = Float64(t_2 * t_6)
              	t_8 = log(t_3)
              	t_9 = Float64((atan(x_46_im, x_46_re) ^ 2.0) * t_4)
              	t_10 = t_8 ^ 2.0
              	tmp = 0.0
              	if (x_46_im <= -1.18e-306)
              		tmp = Float64((y_46_im ^ 3.0) * fma(-1.0, Float64(Float64(t_1 * Float64(t_8 * t_6)) / y_46_im), fma(-1.0, Float64(t_7 / (y_46_im ^ 2.0)), fma(-0.5, Float64(Float64(t_10 * t_5) / y_46_im), fma(-0.16666666666666666, Float64(t_1 * Float64((t_8 ^ 3.0) * t_4)), fma(-0.16666666666666666, Float64(t_2 * Float64((atan(x_46_im, x_46_re) ^ 3.0) * t_4)), fma(0.5, Float64(t_1 * Float64(t_8 * t_9)), fma(0.5, Float64(t_10 * t_7), fma(0.5, Float64(Float64(t_2 * t_9) / y_46_im), Float64(Float64(Float64(t_1 * Float64(t_8 * t_4)) / (y_46_im ^ 2.0)) + Float64(t_5 / (y_46_im ^ 3.0))))))))))));
              	else
              		tmp = Float64(exp(Float64(Float64(y_46_re * log(x_46_im)) - Float64(y_46_im * atan(x_46_im, x_46_re)))) * sin(fma(y_46_im, log(x_46_im), t_0)));
              	end
              	return tmp
              end
              
              code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Cos[t$95$0], $MachinePrecision]}, Block[{t$95$2 = N[Sin[t$95$0], $MachinePrecision]}, Block[{t$95$3 = N[Sqrt[N[(N[Power[x$46$im, 2.0], $MachinePrecision] + N[Power[x$46$re, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$4 = N[Power[t$95$3, y$46$re], $MachinePrecision]}, Block[{t$95$5 = N[(t$95$2 * t$95$4), $MachinePrecision]}, Block[{t$95$6 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * t$95$4), $MachinePrecision]}, Block[{t$95$7 = N[(t$95$2 * t$95$6), $MachinePrecision]}, Block[{t$95$8 = N[Log[t$95$3], $MachinePrecision]}, Block[{t$95$9 = N[(N[Power[N[ArcTan[x$46$im / x$46$re], $MachinePrecision], 2.0], $MachinePrecision] * t$95$4), $MachinePrecision]}, Block[{t$95$10 = N[Power[t$95$8, 2.0], $MachinePrecision]}, If[LessEqual[x$46$im, -1.18e-306], N[(N[Power[y$46$im, 3.0], $MachinePrecision] * N[(-1.0 * N[(N[(t$95$1 * N[(t$95$8 * t$95$6), $MachinePrecision]), $MachinePrecision] / y$46$im), $MachinePrecision] + N[(-1.0 * N[(t$95$7 / N[Power[y$46$im, 2.0], $MachinePrecision]), $MachinePrecision] + N[(-0.5 * N[(N[(t$95$10 * t$95$5), $MachinePrecision] / y$46$im), $MachinePrecision] + N[(-0.16666666666666666 * N[(t$95$1 * N[(N[Power[t$95$8, 3.0], $MachinePrecision] * t$95$4), $MachinePrecision]), $MachinePrecision] + N[(-0.16666666666666666 * N[(t$95$2 * N[(N[Power[N[ArcTan[x$46$im / x$46$re], $MachinePrecision], 3.0], $MachinePrecision] * t$95$4), $MachinePrecision]), $MachinePrecision] + N[(0.5 * N[(t$95$1 * N[(t$95$8 * t$95$9), $MachinePrecision]), $MachinePrecision] + N[(0.5 * N[(t$95$10 * t$95$7), $MachinePrecision] + N[(0.5 * N[(N[(t$95$2 * t$95$9), $MachinePrecision] / y$46$im), $MachinePrecision] + N[(N[(N[(t$95$1 * N[(t$95$8 * t$95$4), $MachinePrecision]), $MachinePrecision] / N[Power[y$46$im, 2.0], $MachinePrecision]), $MachinePrecision] + N[(t$95$5 / N[Power[y$46$im, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Exp[N[(N[(y$46$re * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision] - N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(y$46$im * N[Log[x$46$im], $MachinePrecision] + t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]]
              
              \begin{array}{l}
              
              \\
              \begin{array}{l}
              t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
              t_1 := \cos t\_0\\
              t_2 := \sin t\_0\\
              t_3 := \sqrt{{x.im}^{2} + {x.re}^{2}}\\
              t_4 := {t\_3}^{y.re}\\
              t_5 := t\_2 \cdot t\_4\\
              t_6 := \tan^{-1}_* \frac{x.im}{x.re} \cdot t\_4\\
              t_7 := t\_2 \cdot t\_6\\
              t_8 := \log t\_3\\
              t_9 := {\tan^{-1}_* \frac{x.im}{x.re}}^{2} \cdot t\_4\\
              t_10 := {t\_8}^{2}\\
              \mathbf{if}\;x.im \leq -1.18 \cdot 10^{-306}:\\
              \;\;\;\;{y.im}^{3} \cdot \mathsf{fma}\left(-1, \frac{t\_1 \cdot \left(t\_8 \cdot t\_6\right)}{y.im}, \mathsf{fma}\left(-1, \frac{t\_7}{{y.im}^{2}}, \mathsf{fma}\left(-0.5, \frac{t\_10 \cdot t\_5}{y.im}, \mathsf{fma}\left(-0.16666666666666666, t\_1 \cdot \left({t\_8}^{3} \cdot t\_4\right), \mathsf{fma}\left(-0.16666666666666666, t\_2 \cdot \left({\tan^{-1}_* \frac{x.im}{x.re}}^{3} \cdot t\_4\right), \mathsf{fma}\left(0.5, t\_1 \cdot \left(t\_8 \cdot t\_9\right), \mathsf{fma}\left(0.5, t\_10 \cdot t\_7, \mathsf{fma}\left(0.5, \frac{t\_2 \cdot t\_9}{y.im}, \frac{t\_1 \cdot \left(t\_8 \cdot t\_4\right)}{{y.im}^{2}} + \frac{t\_5}{{y.im}^{3}}\right)\right)\right)\right)\right)\right)\right)\right)\\
              
              \mathbf{else}:\\
              \;\;\;\;e^{y.re \cdot \log x.im - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \sin \left(\mathsf{fma}\left(y.im, \log x.im, t\_0\right)\right)\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 2 regimes
              2. if x.im < -1.17999999999999999e-306

                1. Initial program 41.5%

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

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

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

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

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

                if -1.17999999999999999e-306 < x.im

                1. Initial program 35.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              Alternative 10: 26.5% accurate, N/A× speedup?

              \[\begin{array}{l} \\ \begin{array}{l} t_0 := y.im \cdot \log x.im\\ t_1 := \sin t\_0\\ t_2 := {\log x.im}^{2}\\ t_3 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\ t_4 := \cos t\_3\\ t_5 := \sin t\_3\\ t_6 := {\tan^{-1}_* \frac{x.im}{x.re}}^{3}\\ t_7 := e^{\left(-y.im\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}}\\ t_8 := \sqrt{{x.im}^{2} + {x.re}^{2}}\\ t_9 := {t\_8}^{y.re}\\ t_10 := t\_5 \cdot t\_9\\ t_11 := \tan^{-1}_* \frac{x.im}{x.re} \cdot t\_9\\ t_12 := t\_5 \cdot t\_11\\ t_13 := \log t\_8\\ t_14 := {t\_13}^{2}\\ t_15 := {\tan^{-1}_* \frac{x.im}{x.re}}^{2}\\ t_16 := t\_1 \cdot t\_15\\ t_17 := t\_15 \cdot t\_9\\ t_18 := \cos t\_0\\ \mathbf{if}\;x.im \leq -1.18 \cdot 10^{-306}:\\ \;\;\;\;{y.im}^{3} \cdot \mathsf{fma}\left(-1, \frac{t\_4 \cdot \left(t\_13 \cdot t\_11\right)}{y.im}, \mathsf{fma}\left(-1, \frac{t\_12}{{y.im}^{2}}, \mathsf{fma}\left(-0.5, \frac{t\_14 \cdot t\_10}{y.im}, \mathsf{fma}\left(-0.16666666666666666, t\_4 \cdot \left({t\_13}^{3} \cdot t\_9\right), \mathsf{fma}\left(-0.16666666666666666, t\_5 \cdot \left(t\_6 \cdot t\_9\right), \mathsf{fma}\left(0.5, t\_4 \cdot \left(t\_13 \cdot t\_17\right), \mathsf{fma}\left(0.5, t\_14 \cdot t\_12, \mathsf{fma}\left(0.5, \frac{t\_5 \cdot t\_17}{y.im}, \frac{t\_4 \cdot \left(t\_13 \cdot t\_9\right)}{{y.im}^{2}} + \frac{t\_10}{{y.im}^{3}}\right)\right)\right)\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(y.re, \mathsf{fma}\left(y.re, \mathsf{fma}\left(-0.5, t\_7 \cdot t\_16, \mathsf{fma}\left(0.5, t\_7 \cdot \left(t\_2 \cdot t\_1\right), \mathsf{fma}\left(y.re, \mathsf{fma}\left(-0.5, t\_7 \cdot \left(\log x.im \cdot t\_16\right), \mathsf{fma}\left(-0.16666666666666666, t\_18 \cdot \left(t\_7 \cdot t\_6\right), \mathsf{fma}\left(0.16666666666666666, t\_7 \cdot \left({\log x.im}^{3} \cdot t\_1\right), 0.5 \cdot \left(t\_18 \cdot \left(t\_7 \cdot \left(t\_2 \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right)\right)\right), t\_18 \cdot \left(t\_7 \cdot \left(\log x.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right)\right), \mathsf{fma}\left(t\_18, t\_7 \cdot \tan^{-1}_* \frac{x.im}{x.re}, t\_7 \cdot \left(\log x.im \cdot t\_1\right)\right)\right), t\_7 \cdot t\_1\right)\\ \end{array} \end{array} \]
              (FPCore (x.re x.im y.re y.im)
               :precision binary64
               (let* ((t_0 (* y.im (log x.im)))
                      (t_1 (sin t_0))
                      (t_2 (pow (log x.im) 2.0))
                      (t_3 (* y.re (atan2 x.im x.re)))
                      (t_4 (cos t_3))
                      (t_5 (sin t_3))
                      (t_6 (pow (atan2 x.im x.re) 3.0))
                      (t_7 (exp (* (- y.im) (atan2 x.im x.re))))
                      (t_8 (sqrt (+ (pow x.im 2.0) (pow x.re 2.0))))
                      (t_9 (pow t_8 y.re))
                      (t_10 (* t_5 t_9))
                      (t_11 (* (atan2 x.im x.re) t_9))
                      (t_12 (* t_5 t_11))
                      (t_13 (log t_8))
                      (t_14 (pow t_13 2.0))
                      (t_15 (pow (atan2 x.im x.re) 2.0))
                      (t_16 (* t_1 t_15))
                      (t_17 (* t_15 t_9))
                      (t_18 (cos t_0)))
                 (if (<= x.im -1.18e-306)
                   (*
                    (pow y.im 3.0)
                    (fma
                     -1.0
                     (/ (* t_4 (* t_13 t_11)) y.im)
                     (fma
                      -1.0
                      (/ t_12 (pow y.im 2.0))
                      (fma
                       -0.5
                       (/ (* t_14 t_10) y.im)
                       (fma
                        -0.16666666666666666
                        (* t_4 (* (pow t_13 3.0) t_9))
                        (fma
                         -0.16666666666666666
                         (* t_5 (* t_6 t_9))
                         (fma
                          0.5
                          (* t_4 (* t_13 t_17))
                          (fma
                           0.5
                           (* t_14 t_12)
                           (fma
                            0.5
                            (/ (* t_5 t_17) y.im)
                            (+
                             (/ (* t_4 (* t_13 t_9)) (pow y.im 2.0))
                             (/ t_10 (pow y.im 3.0))))))))))))
                   (fma
                    y.re
                    (fma
                     y.re
                     (fma
                      -0.5
                      (* t_7 t_16)
                      (fma
                       0.5
                       (* t_7 (* t_2 t_1))
                       (fma
                        y.re
                        (fma
                         -0.5
                         (* t_7 (* (log x.im) t_16))
                         (fma
                          -0.16666666666666666
                          (* t_18 (* t_7 t_6))
                          (fma
                           0.16666666666666666
                           (* t_7 (* (pow (log x.im) 3.0) t_1))
                           (* 0.5 (* t_18 (* t_7 (* t_2 (atan2 x.im x.re))))))))
                        (* t_18 (* t_7 (* (log x.im) (atan2 x.im x.re)))))))
                     (fma t_18 (* t_7 (atan2 x.im x.re)) (* t_7 (* (log x.im) t_1))))
                    (* t_7 t_1)))))
              double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
              	double t_0 = y_46_im * log(x_46_im);
              	double t_1 = sin(t_0);
              	double t_2 = pow(log(x_46_im), 2.0);
              	double t_3 = y_46_re * atan2(x_46_im, x_46_re);
              	double t_4 = cos(t_3);
              	double t_5 = sin(t_3);
              	double t_6 = pow(atan2(x_46_im, x_46_re), 3.0);
              	double t_7 = exp((-y_46_im * atan2(x_46_im, x_46_re)));
              	double t_8 = sqrt((pow(x_46_im, 2.0) + pow(x_46_re, 2.0)));
              	double t_9 = pow(t_8, y_46_re);
              	double t_10 = t_5 * t_9;
              	double t_11 = atan2(x_46_im, x_46_re) * t_9;
              	double t_12 = t_5 * t_11;
              	double t_13 = log(t_8);
              	double t_14 = pow(t_13, 2.0);
              	double t_15 = pow(atan2(x_46_im, x_46_re), 2.0);
              	double t_16 = t_1 * t_15;
              	double t_17 = t_15 * t_9;
              	double t_18 = cos(t_0);
              	double tmp;
              	if (x_46_im <= -1.18e-306) {
              		tmp = pow(y_46_im, 3.0) * fma(-1.0, ((t_4 * (t_13 * t_11)) / y_46_im), fma(-1.0, (t_12 / pow(y_46_im, 2.0)), fma(-0.5, ((t_14 * t_10) / y_46_im), fma(-0.16666666666666666, (t_4 * (pow(t_13, 3.0) * t_9)), fma(-0.16666666666666666, (t_5 * (t_6 * t_9)), fma(0.5, (t_4 * (t_13 * t_17)), fma(0.5, (t_14 * t_12), fma(0.5, ((t_5 * t_17) / y_46_im), (((t_4 * (t_13 * t_9)) / pow(y_46_im, 2.0)) + (t_10 / pow(y_46_im, 3.0)))))))))));
              	} else {
              		tmp = fma(y_46_re, fma(y_46_re, fma(-0.5, (t_7 * t_16), fma(0.5, (t_7 * (t_2 * t_1)), fma(y_46_re, fma(-0.5, (t_7 * (log(x_46_im) * t_16)), fma(-0.16666666666666666, (t_18 * (t_7 * t_6)), fma(0.16666666666666666, (t_7 * (pow(log(x_46_im), 3.0) * t_1)), (0.5 * (t_18 * (t_7 * (t_2 * atan2(x_46_im, x_46_re)))))))), (t_18 * (t_7 * (log(x_46_im) * atan2(x_46_im, x_46_re))))))), fma(t_18, (t_7 * atan2(x_46_im, x_46_re)), (t_7 * (log(x_46_im) * t_1)))), (t_7 * t_1));
              	}
              	return tmp;
              }
              
              function code(x_46_re, x_46_im, y_46_re, y_46_im)
              	t_0 = Float64(y_46_im * log(x_46_im))
              	t_1 = sin(t_0)
              	t_2 = log(x_46_im) ^ 2.0
              	t_3 = Float64(y_46_re * atan(x_46_im, x_46_re))
              	t_4 = cos(t_3)
              	t_5 = sin(t_3)
              	t_6 = atan(x_46_im, x_46_re) ^ 3.0
              	t_7 = exp(Float64(Float64(-y_46_im) * atan(x_46_im, x_46_re)))
              	t_8 = sqrt(Float64((x_46_im ^ 2.0) + (x_46_re ^ 2.0)))
              	t_9 = t_8 ^ y_46_re
              	t_10 = Float64(t_5 * t_9)
              	t_11 = Float64(atan(x_46_im, x_46_re) * t_9)
              	t_12 = Float64(t_5 * t_11)
              	t_13 = log(t_8)
              	t_14 = t_13 ^ 2.0
              	t_15 = atan(x_46_im, x_46_re) ^ 2.0
              	t_16 = Float64(t_1 * t_15)
              	t_17 = Float64(t_15 * t_9)
              	t_18 = cos(t_0)
              	tmp = 0.0
              	if (x_46_im <= -1.18e-306)
              		tmp = Float64((y_46_im ^ 3.0) * fma(-1.0, Float64(Float64(t_4 * Float64(t_13 * t_11)) / y_46_im), fma(-1.0, Float64(t_12 / (y_46_im ^ 2.0)), fma(-0.5, Float64(Float64(t_14 * t_10) / y_46_im), fma(-0.16666666666666666, Float64(t_4 * Float64((t_13 ^ 3.0) * t_9)), fma(-0.16666666666666666, Float64(t_5 * Float64(t_6 * t_9)), fma(0.5, Float64(t_4 * Float64(t_13 * t_17)), fma(0.5, Float64(t_14 * t_12), fma(0.5, Float64(Float64(t_5 * t_17) / y_46_im), Float64(Float64(Float64(t_4 * Float64(t_13 * t_9)) / (y_46_im ^ 2.0)) + Float64(t_10 / (y_46_im ^ 3.0))))))))))));
              	else
              		tmp = fma(y_46_re, fma(y_46_re, fma(-0.5, Float64(t_7 * t_16), fma(0.5, Float64(t_7 * Float64(t_2 * t_1)), fma(y_46_re, fma(-0.5, Float64(t_7 * Float64(log(x_46_im) * t_16)), fma(-0.16666666666666666, Float64(t_18 * Float64(t_7 * t_6)), fma(0.16666666666666666, Float64(t_7 * Float64((log(x_46_im) ^ 3.0) * t_1)), Float64(0.5 * Float64(t_18 * Float64(t_7 * Float64(t_2 * atan(x_46_im, x_46_re)))))))), Float64(t_18 * Float64(t_7 * Float64(log(x_46_im) * atan(x_46_im, x_46_re))))))), fma(t_18, Float64(t_7 * atan(x_46_im, x_46_re)), Float64(t_7 * Float64(log(x_46_im) * t_1)))), Float64(t_7 * t_1));
              	end
              	return tmp
              end
              
              code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$im * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sin[t$95$0], $MachinePrecision]}, Block[{t$95$2 = N[Power[N[Log[x$46$im], $MachinePrecision], 2.0], $MachinePrecision]}, Block[{t$95$3 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[Cos[t$95$3], $MachinePrecision]}, Block[{t$95$5 = N[Sin[t$95$3], $MachinePrecision]}, Block[{t$95$6 = N[Power[N[ArcTan[x$46$im / x$46$re], $MachinePrecision], 3.0], $MachinePrecision]}, Block[{t$95$7 = N[Exp[N[((-y$46$im) * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$8 = N[Sqrt[N[(N[Power[x$46$im, 2.0], $MachinePrecision] + N[Power[x$46$re, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$9 = N[Power[t$95$8, y$46$re], $MachinePrecision]}, Block[{t$95$10 = N[(t$95$5 * t$95$9), $MachinePrecision]}, Block[{t$95$11 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * t$95$9), $MachinePrecision]}, Block[{t$95$12 = N[(t$95$5 * t$95$11), $MachinePrecision]}, Block[{t$95$13 = N[Log[t$95$8], $MachinePrecision]}, Block[{t$95$14 = N[Power[t$95$13, 2.0], $MachinePrecision]}, Block[{t$95$15 = N[Power[N[ArcTan[x$46$im / x$46$re], $MachinePrecision], 2.0], $MachinePrecision]}, Block[{t$95$16 = N[(t$95$1 * t$95$15), $MachinePrecision]}, Block[{t$95$17 = N[(t$95$15 * t$95$9), $MachinePrecision]}, Block[{t$95$18 = N[Cos[t$95$0], $MachinePrecision]}, If[LessEqual[x$46$im, -1.18e-306], N[(N[Power[y$46$im, 3.0], $MachinePrecision] * N[(-1.0 * N[(N[(t$95$4 * N[(t$95$13 * t$95$11), $MachinePrecision]), $MachinePrecision] / y$46$im), $MachinePrecision] + N[(-1.0 * N[(t$95$12 / N[Power[y$46$im, 2.0], $MachinePrecision]), $MachinePrecision] + N[(-0.5 * N[(N[(t$95$14 * t$95$10), $MachinePrecision] / y$46$im), $MachinePrecision] + N[(-0.16666666666666666 * N[(t$95$4 * N[(N[Power[t$95$13, 3.0], $MachinePrecision] * t$95$9), $MachinePrecision]), $MachinePrecision] + N[(-0.16666666666666666 * N[(t$95$5 * N[(t$95$6 * t$95$9), $MachinePrecision]), $MachinePrecision] + N[(0.5 * N[(t$95$4 * N[(t$95$13 * t$95$17), $MachinePrecision]), $MachinePrecision] + N[(0.5 * N[(t$95$14 * t$95$12), $MachinePrecision] + N[(0.5 * N[(N[(t$95$5 * t$95$17), $MachinePrecision] / y$46$im), $MachinePrecision] + N[(N[(N[(t$95$4 * N[(t$95$13 * t$95$9), $MachinePrecision]), $MachinePrecision] / N[Power[y$46$im, 2.0], $MachinePrecision]), $MachinePrecision] + N[(t$95$10 / N[Power[y$46$im, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y$46$re * N[(y$46$re * N[(-0.5 * N[(t$95$7 * t$95$16), $MachinePrecision] + N[(0.5 * N[(t$95$7 * N[(t$95$2 * t$95$1), $MachinePrecision]), $MachinePrecision] + N[(y$46$re * N[(-0.5 * N[(t$95$7 * N[(N[Log[x$46$im], $MachinePrecision] * t$95$16), $MachinePrecision]), $MachinePrecision] + N[(-0.16666666666666666 * N[(t$95$18 * N[(t$95$7 * t$95$6), $MachinePrecision]), $MachinePrecision] + N[(0.16666666666666666 * N[(t$95$7 * N[(N[Power[N[Log[x$46$im], $MachinePrecision], 3.0], $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision] + N[(0.5 * N[(t$95$18 * N[(t$95$7 * N[(t$95$2 * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$18 * N[(t$95$7 * N[(N[Log[x$46$im], $MachinePrecision] * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$18 * N[(t$95$7 * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision] + N[(t$95$7 * N[(N[Log[x$46$im], $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$7 * t$95$1), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]]]]]]]]]]
              
              \begin{array}{l}
              
              \\
              \begin{array}{l}
              t_0 := y.im \cdot \log x.im\\
              t_1 := \sin t\_0\\
              t_2 := {\log x.im}^{2}\\
              t_3 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
              t_4 := \cos t\_3\\
              t_5 := \sin t\_3\\
              t_6 := {\tan^{-1}_* \frac{x.im}{x.re}}^{3}\\
              t_7 := e^{\left(-y.im\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}}\\
              t_8 := \sqrt{{x.im}^{2} + {x.re}^{2}}\\
              t_9 := {t\_8}^{y.re}\\
              t_10 := t\_5 \cdot t\_9\\
              t_11 := \tan^{-1}_* \frac{x.im}{x.re} \cdot t\_9\\
              t_12 := t\_5 \cdot t\_11\\
              t_13 := \log t\_8\\
              t_14 := {t\_13}^{2}\\
              t_15 := {\tan^{-1}_* \frac{x.im}{x.re}}^{2}\\
              t_16 := t\_1 \cdot t\_15\\
              t_17 := t\_15 \cdot t\_9\\
              t_18 := \cos t\_0\\
              \mathbf{if}\;x.im \leq -1.18 \cdot 10^{-306}:\\
              \;\;\;\;{y.im}^{3} \cdot \mathsf{fma}\left(-1, \frac{t\_4 \cdot \left(t\_13 \cdot t\_11\right)}{y.im}, \mathsf{fma}\left(-1, \frac{t\_12}{{y.im}^{2}}, \mathsf{fma}\left(-0.5, \frac{t\_14 \cdot t\_10}{y.im}, \mathsf{fma}\left(-0.16666666666666666, t\_4 \cdot \left({t\_13}^{3} \cdot t\_9\right), \mathsf{fma}\left(-0.16666666666666666, t\_5 \cdot \left(t\_6 \cdot t\_9\right), \mathsf{fma}\left(0.5, t\_4 \cdot \left(t\_13 \cdot t\_17\right), \mathsf{fma}\left(0.5, t\_14 \cdot t\_12, \mathsf{fma}\left(0.5, \frac{t\_5 \cdot t\_17}{y.im}, \frac{t\_4 \cdot \left(t\_13 \cdot t\_9\right)}{{y.im}^{2}} + \frac{t\_10}{{y.im}^{3}}\right)\right)\right)\right)\right)\right)\right)\right)\\
              
              \mathbf{else}:\\
              \;\;\;\;\mathsf{fma}\left(y.re, \mathsf{fma}\left(y.re, \mathsf{fma}\left(-0.5, t\_7 \cdot t\_16, \mathsf{fma}\left(0.5, t\_7 \cdot \left(t\_2 \cdot t\_1\right), \mathsf{fma}\left(y.re, \mathsf{fma}\left(-0.5, t\_7 \cdot \left(\log x.im \cdot t\_16\right), \mathsf{fma}\left(-0.16666666666666666, t\_18 \cdot \left(t\_7 \cdot t\_6\right), \mathsf{fma}\left(0.16666666666666666, t\_7 \cdot \left({\log x.im}^{3} \cdot t\_1\right), 0.5 \cdot \left(t\_18 \cdot \left(t\_7 \cdot \left(t\_2 \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right)\right)\right), t\_18 \cdot \left(t\_7 \cdot \left(\log x.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right)\right), \mathsf{fma}\left(t\_18, t\_7 \cdot \tan^{-1}_* \frac{x.im}{x.re}, t\_7 \cdot \left(\log x.im \cdot t\_1\right)\right)\right), t\_7 \cdot t\_1\right)\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 2 regimes
              2. if x.im < -1.17999999999999999e-306

                1. Initial program 41.5%

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

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

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

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

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

                if -1.17999999999999999e-306 < x.im

                1. Initial program 35.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \begin{array}{l} \mathbf{if}\;x.im \leq -1.18 \cdot 10^{-306}:\\ \;\;\;\;{y.im}^{3} \cdot \mathsf{fma}\left(-1, \frac{\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot \left(\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right) \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}\right)\right)}{y.im}, \mathsf{fma}\left(-1, \frac{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}\right)}{{y.im}^{2}}, \mathsf{fma}\left(-0.5, \frac{{\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{2} \cdot \left(\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}\right)}{y.im}, \mathsf{fma}\left(-0.16666666666666666, \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot \left({\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{3} \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}\right), \mathsf{fma}\left(-0.16666666666666666, \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot \left({\tan^{-1}_* \frac{x.im}{x.re}}^{3} \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}\right), \mathsf{fma}\left(0.5, \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot \left(\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right) \cdot \left({\tan^{-1}_* \frac{x.im}{x.re}}^{2} \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}\right)\right), \mathsf{fma}\left(0.5, {\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{2} \cdot \left(\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}\right)\right), \mathsf{fma}\left(0.5, \frac{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot \left({\tan^{-1}_* \frac{x.im}{x.re}}^{2} \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}\right)}{y.im}, \frac{\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot \left(\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}\right)}{{y.im}^{2}} + \frac{\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}}{{y.im}^{3}}\right)\right)\right)\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(y.re, \mathsf{fma}\left(y.re, \mathsf{fma}\left(-0.5, e^{\left(-y.im\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \left(\sin \left(y.im \cdot \log x.im\right) \cdot {\tan^{-1}_* \frac{x.im}{x.re}}^{2}\right), \mathsf{fma}\left(0.5, e^{\left(-y.im\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \left({\log x.im}^{2} \cdot \sin \left(y.im \cdot \log x.im\right)\right), \mathsf{fma}\left(y.re, \mathsf{fma}\left(-0.5, e^{\left(-y.im\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \left(\log x.im \cdot \left(\sin \left(y.im \cdot \log x.im\right) \cdot {\tan^{-1}_* \frac{x.im}{x.re}}^{2}\right)\right), \mathsf{fma}\left(-0.16666666666666666, \cos \left(y.im \cdot \log x.im\right) \cdot \left(e^{\left(-y.im\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot {\tan^{-1}_* \frac{x.im}{x.re}}^{3}\right), \mathsf{fma}\left(0.16666666666666666, e^{\left(-y.im\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \left({\log x.im}^{3} \cdot \sin \left(y.im \cdot \log x.im\right)\right), 0.5 \cdot \left(\cos \left(y.im \cdot \log x.im\right) \cdot \left(e^{\left(-y.im\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \left({\log x.im}^{2} \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right)\right)\right), \cos \left(y.im \cdot \log x.im\right) \cdot \left(e^{\left(-y.im\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \left(\log x.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right)\right), \mathsf{fma}\left(\cos \left(y.im \cdot \log x.im\right), e^{\left(-y.im\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \tan^{-1}_* \frac{x.im}{x.re}, e^{\left(-y.im\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \left(\log x.im \cdot \sin \left(y.im \cdot \log x.im\right)\right)\right)\right), e^{\left(-y.im\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \sin \left(y.im \cdot \log x.im\right)\right)\\ \end{array} \]
              5. Add Preprocessing

              Alternative 11: 20.6% accurate, N/A× speedup?

              \[\begin{array}{l} \\ \begin{array}{l} t_0 := e^{\left(-y.im\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}}\\ t_1 := {\log x.im}^{2}\\ t_2 := y.im \cdot \log x.im\\ t_3 := \sin t\_2\\ t_4 := t\_3 \cdot {\tan^{-1}_* \frac{x.im}{x.re}}^{2}\\ t_5 := \cos t\_2\\ \mathsf{fma}\left(y.re, \mathsf{fma}\left(y.re, \mathsf{fma}\left(-0.5, t\_0 \cdot t\_4, \mathsf{fma}\left(0.5, t\_0 \cdot \left(t\_1 \cdot t\_3\right), \mathsf{fma}\left(y.re, \mathsf{fma}\left(-0.5, t\_0 \cdot \left(\log x.im \cdot t\_4\right), \mathsf{fma}\left(-0.16666666666666666, t\_5 \cdot \left(t\_0 \cdot {\tan^{-1}_* \frac{x.im}{x.re}}^{3}\right), \mathsf{fma}\left(0.16666666666666666, t\_0 \cdot \left({\log x.im}^{3} \cdot t\_3\right), 0.5 \cdot \left(t\_5 \cdot \left(t\_0 \cdot \left(t\_1 \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right)\right)\right), t\_5 \cdot \left(t\_0 \cdot \left(\log x.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right)\right), \mathsf{fma}\left(t\_5, t\_0 \cdot \tan^{-1}_* \frac{x.im}{x.re}, t\_0 \cdot \left(\log x.im \cdot t\_3\right)\right)\right), t\_0 \cdot t\_3\right) \end{array} \end{array} \]
              (FPCore (x.re x.im y.re y.im)
               :precision binary64
               (let* ((t_0 (exp (* (- y.im) (atan2 x.im x.re))))
                      (t_1 (pow (log x.im) 2.0))
                      (t_2 (* y.im (log x.im)))
                      (t_3 (sin t_2))
                      (t_4 (* t_3 (pow (atan2 x.im x.re) 2.0)))
                      (t_5 (cos t_2)))
                 (fma
                  y.re
                  (fma
                   y.re
                   (fma
                    -0.5
                    (* t_0 t_4)
                    (fma
                     0.5
                     (* t_0 (* t_1 t_3))
                     (fma
                      y.re
                      (fma
                       -0.5
                       (* t_0 (* (log x.im) t_4))
                       (fma
                        -0.16666666666666666
                        (* t_5 (* t_0 (pow (atan2 x.im x.re) 3.0)))
                        (fma
                         0.16666666666666666
                         (* t_0 (* (pow (log x.im) 3.0) t_3))
                         (* 0.5 (* t_5 (* t_0 (* t_1 (atan2 x.im x.re))))))))
                      (* t_5 (* t_0 (* (log x.im) (atan2 x.im x.re)))))))
                   (fma t_5 (* t_0 (atan2 x.im x.re)) (* t_0 (* (log x.im) t_3))))
                  (* t_0 t_3))))
              double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
              	double t_0 = exp((-y_46_im * atan2(x_46_im, x_46_re)));
              	double t_1 = pow(log(x_46_im), 2.0);
              	double t_2 = y_46_im * log(x_46_im);
              	double t_3 = sin(t_2);
              	double t_4 = t_3 * pow(atan2(x_46_im, x_46_re), 2.0);
              	double t_5 = cos(t_2);
              	return fma(y_46_re, fma(y_46_re, fma(-0.5, (t_0 * t_4), fma(0.5, (t_0 * (t_1 * t_3)), fma(y_46_re, fma(-0.5, (t_0 * (log(x_46_im) * t_4)), fma(-0.16666666666666666, (t_5 * (t_0 * pow(atan2(x_46_im, x_46_re), 3.0))), fma(0.16666666666666666, (t_0 * (pow(log(x_46_im), 3.0) * t_3)), (0.5 * (t_5 * (t_0 * (t_1 * atan2(x_46_im, x_46_re)))))))), (t_5 * (t_0 * (log(x_46_im) * atan2(x_46_im, x_46_re))))))), fma(t_5, (t_0 * atan2(x_46_im, x_46_re)), (t_0 * (log(x_46_im) * t_3)))), (t_0 * t_3));
              }
              
              function code(x_46_re, x_46_im, y_46_re, y_46_im)
              	t_0 = exp(Float64(Float64(-y_46_im) * atan(x_46_im, x_46_re)))
              	t_1 = log(x_46_im) ^ 2.0
              	t_2 = Float64(y_46_im * log(x_46_im))
              	t_3 = sin(t_2)
              	t_4 = Float64(t_3 * (atan(x_46_im, x_46_re) ^ 2.0))
              	t_5 = cos(t_2)
              	return fma(y_46_re, fma(y_46_re, fma(-0.5, Float64(t_0 * t_4), fma(0.5, Float64(t_0 * Float64(t_1 * t_3)), fma(y_46_re, fma(-0.5, Float64(t_0 * Float64(log(x_46_im) * t_4)), fma(-0.16666666666666666, Float64(t_5 * Float64(t_0 * (atan(x_46_im, x_46_re) ^ 3.0))), fma(0.16666666666666666, Float64(t_0 * Float64((log(x_46_im) ^ 3.0) * t_3)), Float64(0.5 * Float64(t_5 * Float64(t_0 * Float64(t_1 * atan(x_46_im, x_46_re)))))))), Float64(t_5 * Float64(t_0 * Float64(log(x_46_im) * atan(x_46_im, x_46_re))))))), fma(t_5, Float64(t_0 * atan(x_46_im, x_46_re)), Float64(t_0 * Float64(log(x_46_im) * t_3)))), Float64(t_0 * t_3))
              end
              
              code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Exp[N[((-y$46$im) * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[Power[N[Log[x$46$im], $MachinePrecision], 2.0], $MachinePrecision]}, Block[{t$95$2 = N[(y$46$im * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[Sin[t$95$2], $MachinePrecision]}, Block[{t$95$4 = N[(t$95$3 * N[Power[N[ArcTan[x$46$im / x$46$re], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[Cos[t$95$2], $MachinePrecision]}, N[(y$46$re * N[(y$46$re * N[(-0.5 * N[(t$95$0 * t$95$4), $MachinePrecision] + N[(0.5 * N[(t$95$0 * N[(t$95$1 * t$95$3), $MachinePrecision]), $MachinePrecision] + N[(y$46$re * N[(-0.5 * N[(t$95$0 * N[(N[Log[x$46$im], $MachinePrecision] * t$95$4), $MachinePrecision]), $MachinePrecision] + N[(-0.16666666666666666 * N[(t$95$5 * N[(t$95$0 * N[Power[N[ArcTan[x$46$im / x$46$re], $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(0.16666666666666666 * N[(t$95$0 * N[(N[Power[N[Log[x$46$im], $MachinePrecision], 3.0], $MachinePrecision] * t$95$3), $MachinePrecision]), $MachinePrecision] + N[(0.5 * N[(t$95$5 * N[(t$95$0 * N[(t$95$1 * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$5 * N[(t$95$0 * N[(N[Log[x$46$im], $MachinePrecision] * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$5 * N[(t$95$0 * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision] + N[(t$95$0 * N[(N[Log[x$46$im], $MachinePrecision] * t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$0 * t$95$3), $MachinePrecision]), $MachinePrecision]]]]]]]
              
              \begin{array}{l}
              
              \\
              \begin{array}{l}
              t_0 := e^{\left(-y.im\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}}\\
              t_1 := {\log x.im}^{2}\\
              t_2 := y.im \cdot \log x.im\\
              t_3 := \sin t\_2\\
              t_4 := t\_3 \cdot {\tan^{-1}_* \frac{x.im}{x.re}}^{2}\\
              t_5 := \cos t\_2\\
              \mathsf{fma}\left(y.re, \mathsf{fma}\left(y.re, \mathsf{fma}\left(-0.5, t\_0 \cdot t\_4, \mathsf{fma}\left(0.5, t\_0 \cdot \left(t\_1 \cdot t\_3\right), \mathsf{fma}\left(y.re, \mathsf{fma}\left(-0.5, t\_0 \cdot \left(\log x.im \cdot t\_4\right), \mathsf{fma}\left(-0.16666666666666666, t\_5 \cdot \left(t\_0 \cdot {\tan^{-1}_* \frac{x.im}{x.re}}^{3}\right), \mathsf{fma}\left(0.16666666666666666, t\_0 \cdot \left({\log x.im}^{3} \cdot t\_3\right), 0.5 \cdot \left(t\_5 \cdot \left(t\_0 \cdot \left(t\_1 \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right)\right)\right), t\_5 \cdot \left(t\_0 \cdot \left(\log x.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right)\right), \mathsf{fma}\left(t\_5, t\_0 \cdot \tan^{-1}_* \frac{x.im}{x.re}, t\_0 \cdot \left(\log x.im \cdot t\_3\right)\right)\right), t\_0 \cdot t\_3\right)
              \end{array}
              \end{array}
              
              Derivation
              1. Initial program 38.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \mathsf{fma}\left(y.re, \mathsf{fma}\left(y.re, \mathsf{fma}\left(-0.5, e^{\left(-y.im\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \left(\sin \left(y.im \cdot \log x.im\right) \cdot {\tan^{-1}_* \frac{x.im}{x.re}}^{2}\right), \mathsf{fma}\left(0.5, e^{\left(-y.im\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \left({\log x.im}^{2} \cdot \sin \left(y.im \cdot \log x.im\right)\right), \mathsf{fma}\left(y.re, \mathsf{fma}\left(-0.5, e^{\left(-y.im\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \left(\log x.im \cdot \left(\sin \left(y.im \cdot \log x.im\right) \cdot {\tan^{-1}_* \frac{x.im}{x.re}}^{2}\right)\right), \mathsf{fma}\left(-0.16666666666666666, \cos \left(y.im \cdot \log x.im\right) \cdot \left(e^{\left(-y.im\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot {\tan^{-1}_* \frac{x.im}{x.re}}^{3}\right), \mathsf{fma}\left(0.16666666666666666, e^{\left(-y.im\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \left({\log x.im}^{3} \cdot \sin \left(y.im \cdot \log x.im\right)\right), 0.5 \cdot \left(\cos \left(y.im \cdot \log x.im\right) \cdot \left(e^{\left(-y.im\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \left({\log x.im}^{2} \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right)\right)\right), \cos \left(y.im \cdot \log x.im\right) \cdot \left(e^{\left(-y.im\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \left(\log x.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right)\right), \mathsf{fma}\left(\cos \left(y.im \cdot \log x.im\right), e^{\left(-y.im\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \tan^{-1}_* \frac{x.im}{x.re}, e^{\left(-y.im\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \left(\log x.im \cdot \sin \left(y.im \cdot \log x.im\right)\right)\right)\right), e^{\left(-y.im\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \sin \left(y.im \cdot \log x.im\right)\right) \]
              9. Add Preprocessing

              Alternative 12: 15.0% accurate, N/A× speedup?

              \[\begin{array}{l} \\ \begin{array}{l} t_0 := y.im \cdot \log x.im\\ t_1 := \cos t\_0\\ t_2 := \sin t\_0\\ t_3 := t\_2 \cdot {\tan^{-1}_* \frac{x.im}{x.re}}^{2}\\ t_4 := e^{\left(-y.im\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}}\\ t_5 := {\log x.im}^{2}\\ \mathsf{fma}\left(y.re, {y.re}^{2} \cdot \mathsf{fma}\left(-1, \frac{\mathsf{fma}\left(-1, \mathsf{fma}\left(-0.5, t\_4 \cdot t\_3, \mathsf{fma}\left(0.5, t\_4 \cdot \left(t\_5 \cdot t\_2\right), t\_1 \cdot \left(t\_4 \cdot \left(\log x.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right), \frac{\mathsf{fma}\left(t\_1, t\_4 \cdot \tan^{-1}_* \frac{x.im}{x.re}, t\_4 \cdot \left(\log x.im \cdot t\_2\right)\right)}{-y.re}\right)}{y.re}, \mathsf{fma}\left(-0.5, t\_4 \cdot \left(\log x.im \cdot t\_3\right), \mathsf{fma}\left(-0.16666666666666666, t\_1 \cdot \left(t\_4 \cdot {\tan^{-1}_* \frac{x.im}{x.re}}^{3}\right), \mathsf{fma}\left(0.16666666666666666, t\_4 \cdot \left({\log x.im}^{3} \cdot t\_2\right), 0.5 \cdot \left(t\_1 \cdot \left(t\_4 \cdot \left(t\_5 \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right)\right)\right)\right), t\_4 \cdot t\_2\right) \end{array} \end{array} \]
              (FPCore (x.re x.im y.re y.im)
               :precision binary64
               (let* ((t_0 (* y.im (log x.im)))
                      (t_1 (cos t_0))
                      (t_2 (sin t_0))
                      (t_3 (* t_2 (pow (atan2 x.im x.re) 2.0)))
                      (t_4 (exp (* (- y.im) (atan2 x.im x.re))))
                      (t_5 (pow (log x.im) 2.0)))
                 (fma
                  y.re
                  (*
                   (pow y.re 2.0)
                   (fma
                    -1.0
                    (/
                     (fma
                      -1.0
                      (fma
                       -0.5
                       (* t_4 t_3)
                       (fma
                        0.5
                        (* t_4 (* t_5 t_2))
                        (* t_1 (* t_4 (* (log x.im) (atan2 x.im x.re))))))
                      (/
                       (fma t_1 (* t_4 (atan2 x.im x.re)) (* t_4 (* (log x.im) t_2)))
                       (- y.re)))
                     y.re)
                    (fma
                     -0.5
                     (* t_4 (* (log x.im) t_3))
                     (fma
                      -0.16666666666666666
                      (* t_1 (* t_4 (pow (atan2 x.im x.re) 3.0)))
                      (fma
                       0.16666666666666666
                       (* t_4 (* (pow (log x.im) 3.0) t_2))
                       (* 0.5 (* t_1 (* t_4 (* t_5 (atan2 x.im x.re))))))))))
                  (* t_4 t_2))))
              double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
              	double t_0 = y_46_im * log(x_46_im);
              	double t_1 = cos(t_0);
              	double t_2 = sin(t_0);
              	double t_3 = t_2 * pow(atan2(x_46_im, x_46_re), 2.0);
              	double t_4 = exp((-y_46_im * atan2(x_46_im, x_46_re)));
              	double t_5 = pow(log(x_46_im), 2.0);
              	return fma(y_46_re, (pow(y_46_re, 2.0) * fma(-1.0, (fma(-1.0, fma(-0.5, (t_4 * t_3), fma(0.5, (t_4 * (t_5 * t_2)), (t_1 * (t_4 * (log(x_46_im) * atan2(x_46_im, x_46_re)))))), (fma(t_1, (t_4 * atan2(x_46_im, x_46_re)), (t_4 * (log(x_46_im) * t_2))) / -y_46_re)) / y_46_re), fma(-0.5, (t_4 * (log(x_46_im) * t_3)), fma(-0.16666666666666666, (t_1 * (t_4 * pow(atan2(x_46_im, x_46_re), 3.0))), fma(0.16666666666666666, (t_4 * (pow(log(x_46_im), 3.0) * t_2)), (0.5 * (t_1 * (t_4 * (t_5 * atan2(x_46_im, x_46_re)))))))))), (t_4 * t_2));
              }
              
              function code(x_46_re, x_46_im, y_46_re, y_46_im)
              	t_0 = Float64(y_46_im * log(x_46_im))
              	t_1 = cos(t_0)
              	t_2 = sin(t_0)
              	t_3 = Float64(t_2 * (atan(x_46_im, x_46_re) ^ 2.0))
              	t_4 = exp(Float64(Float64(-y_46_im) * atan(x_46_im, x_46_re)))
              	t_5 = log(x_46_im) ^ 2.0
              	return fma(y_46_re, Float64((y_46_re ^ 2.0) * fma(-1.0, Float64(fma(-1.0, fma(-0.5, Float64(t_4 * t_3), fma(0.5, Float64(t_4 * Float64(t_5 * t_2)), Float64(t_1 * Float64(t_4 * Float64(log(x_46_im) * atan(x_46_im, x_46_re)))))), Float64(fma(t_1, Float64(t_4 * atan(x_46_im, x_46_re)), Float64(t_4 * Float64(log(x_46_im) * t_2))) / Float64(-y_46_re))) / y_46_re), fma(-0.5, Float64(t_4 * Float64(log(x_46_im) * t_3)), fma(-0.16666666666666666, Float64(t_1 * Float64(t_4 * (atan(x_46_im, x_46_re) ^ 3.0))), fma(0.16666666666666666, Float64(t_4 * Float64((log(x_46_im) ^ 3.0) * t_2)), Float64(0.5 * Float64(t_1 * Float64(t_4 * Float64(t_5 * atan(x_46_im, x_46_re)))))))))), Float64(t_4 * t_2))
              end
              
              code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$im * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Cos[t$95$0], $MachinePrecision]}, Block[{t$95$2 = N[Sin[t$95$0], $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 * N[Power[N[ArcTan[x$46$im / x$46$re], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[Exp[N[((-y$46$im) * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$5 = N[Power[N[Log[x$46$im], $MachinePrecision], 2.0], $MachinePrecision]}, N[(y$46$re * N[(N[Power[y$46$re, 2.0], $MachinePrecision] * N[(-1.0 * N[(N[(-1.0 * N[(-0.5 * N[(t$95$4 * t$95$3), $MachinePrecision] + N[(0.5 * N[(t$95$4 * N[(t$95$5 * t$95$2), $MachinePrecision]), $MachinePrecision] + N[(t$95$1 * N[(t$95$4 * N[(N[Log[x$46$im], $MachinePrecision] * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$1 * N[(t$95$4 * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision] + N[(t$95$4 * N[(N[Log[x$46$im], $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / (-y$46$re)), $MachinePrecision]), $MachinePrecision] / y$46$re), $MachinePrecision] + N[(-0.5 * N[(t$95$4 * N[(N[Log[x$46$im], $MachinePrecision] * t$95$3), $MachinePrecision]), $MachinePrecision] + N[(-0.16666666666666666 * N[(t$95$1 * N[(t$95$4 * N[Power[N[ArcTan[x$46$im / x$46$re], $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(0.16666666666666666 * N[(t$95$4 * N[(N[Power[N[Log[x$46$im], $MachinePrecision], 3.0], $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision] + N[(0.5 * N[(t$95$1 * N[(t$95$4 * N[(t$95$5 * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$4 * t$95$2), $MachinePrecision]), $MachinePrecision]]]]]]]
              
              \begin{array}{l}
              
              \\
              \begin{array}{l}
              t_0 := y.im \cdot \log x.im\\
              t_1 := \cos t\_0\\
              t_2 := \sin t\_0\\
              t_3 := t\_2 \cdot {\tan^{-1}_* \frac{x.im}{x.re}}^{2}\\
              t_4 := e^{\left(-y.im\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}}\\
              t_5 := {\log x.im}^{2}\\
              \mathsf{fma}\left(y.re, {y.re}^{2} \cdot \mathsf{fma}\left(-1, \frac{\mathsf{fma}\left(-1, \mathsf{fma}\left(-0.5, t\_4 \cdot t\_3, \mathsf{fma}\left(0.5, t\_4 \cdot \left(t\_5 \cdot t\_2\right), t\_1 \cdot \left(t\_4 \cdot \left(\log x.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right), \frac{\mathsf{fma}\left(t\_1, t\_4 \cdot \tan^{-1}_* \frac{x.im}{x.re}, t\_4 \cdot \left(\log x.im \cdot t\_2\right)\right)}{-y.re}\right)}{y.re}, \mathsf{fma}\left(-0.5, t\_4 \cdot \left(\log x.im \cdot t\_3\right), \mathsf{fma}\left(-0.16666666666666666, t\_1 \cdot \left(t\_4 \cdot {\tan^{-1}_* \frac{x.im}{x.re}}^{3}\right), \mathsf{fma}\left(0.16666666666666666, t\_4 \cdot \left({\log x.im}^{3} \cdot t\_2\right), 0.5 \cdot \left(t\_1 \cdot \left(t\_4 \cdot \left(t\_5 \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right)\right)\right)\right), t\_4 \cdot t\_2\right)
              \end{array}
              \end{array}
              
              Derivation
              1. Initial program 38.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \mathsf{fma}\left(y.re, {y.re}^{2} \cdot \mathsf{fma}\left(-1, \frac{\mathsf{fma}\left(-1, \mathsf{fma}\left(-0.5, e^{\left(-y.im\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \left(\sin \left(y.im \cdot \log x.im\right) \cdot {\tan^{-1}_* \frac{x.im}{x.re}}^{2}\right), \mathsf{fma}\left(0.5, e^{\left(-y.im\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \left({\log x.im}^{2} \cdot \sin \left(y.im \cdot \log x.im\right)\right), \cos \left(y.im \cdot \log x.im\right) \cdot \left(e^{\left(-y.im\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \left(\log x.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right), \frac{\mathsf{fma}\left(\cos \left(y.im \cdot \log x.im\right), e^{\left(-y.im\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \tan^{-1}_* \frac{x.im}{x.re}, e^{\left(-y.im\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \left(\log x.im \cdot \sin \left(y.im \cdot \log x.im\right)\right)\right)}{-y.re}\right)}{y.re}, \mathsf{fma}\left(-0.5, e^{\left(-y.im\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \left(\log x.im \cdot \left(\sin \left(y.im \cdot \log x.im\right) \cdot {\tan^{-1}_* \frac{x.im}{x.re}}^{2}\right)\right), \mathsf{fma}\left(-0.16666666666666666, \cos \left(y.im \cdot \log x.im\right) \cdot \left(e^{\left(-y.im\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot {\tan^{-1}_* \frac{x.im}{x.re}}^{3}\right), \mathsf{fma}\left(0.16666666666666666, e^{\left(-y.im\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \left({\log x.im}^{3} \cdot \sin \left(y.im \cdot \log x.im\right)\right), 0.5 \cdot \left(\cos \left(y.im \cdot \log x.im\right) \cdot \left(e^{\left(-y.im\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \left({\log x.im}^{2} \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right)\right)\right)\right), e^{\left(-y.im\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \sin \left(y.im \cdot \log x.im\right)\right) \]
              11. Add Preprocessing

              Reproduce

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