powComplex, imaginary part

Percentage Accurate: 41.3% → 78.4%
Time: 12.6s
Alternatives: 20
Speedup: 2.1×

Specification

?
\[\begin{array}{l} \\ \begin{array}{l} t_0 := \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)\\ e^{t\_0 \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(t\_0 \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \end{array} \end{array} \]
(FPCore (x.re x.im y.re y.im)
 :precision binary64
 (let* ((t_0 (log (sqrt (+ (* x.re x.re) (* x.im x.im))))))
   (*
    (exp (- (* t_0 y.re) (* (atan2 x.im x.re) y.im)))
    (sin (+ (* t_0 y.im) (* (atan2 x.im x.re) y.re))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
	double t_0 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
	return exp(((t_0 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin(((t_0 * y_46_im) + (atan2(x_46_im, x_46_re) * y_46_re)));
}
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 20 alternatives:

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

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

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

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

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

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


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

    1. Initial program 34.3%

      \[e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. Applied rewrites69.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 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 \color{blue}{\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
      3. 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 \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{\color{blue}{x.re}}\right) \]
        2. lift-*.f6483.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 \sin \left(y.re \cdot \color{blue}{\tan^{-1}_* \frac{x.im}{x.re}}\right) \]
      4. Applied rewrites83.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 \sin \color{blue}{\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
      5. Taylor expanded in y.re around 0

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

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

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

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

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

      if -9.0000000000000003e137 < y.im < 1.6e25

      1. Initial program 49.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 rewrites89.4%

          \[\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)} \]

        if 1.6e25 < y.im

        1. Initial program 37.6%

          \[e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \]
        2. Add Preprocessing
        3. Step-by-step derivation
          1. Applied rewrites61.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. Taylor expanded in y.re 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 \color{blue}{\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
          3. 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 \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{\color{blue}{x.re}}\right) \]
            2. lift-*.f6471.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 \sin \left(y.re \cdot \color{blue}{\tan^{-1}_* \frac{x.im}{x.re}}\right) \]
          4. Applied rewrites71.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 \sin \color{blue}{\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
        4. Recombined 3 regimes into one program.
        5. Final simplification84.9%

          \[\leadsto \begin{array}{l} \mathbf{if}\;y.im \leq -9 \cdot 10^{+137}:\\ \;\;\;\;e^{\left(-y.im\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\ \mathbf{elif}\;y.im \leq 1.6 \cdot 10^{+25}:\\ \;\;\;\;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)\\ \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 \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\ \end{array} \]
        6. Add Preprocessing

        Alternative 2: 77.1% accurate, 0.9× speedup?

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

          1. Initial program 43.5%

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

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

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

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

          if -9.4e7 < y.re < 1.7499999999999999e-10

          1. Initial program 47.9%

            \[e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \]
          2. Add Preprocessing
          3. Step-by-step derivation
            1. Applied rewrites83.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 \color{blue}{e^{-1 \cdot \left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}} \cdot \sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\right) \]
            3. Step-by-step derivation
              1. fp-cancel-sub-sign-invN/A

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

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

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

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

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

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

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

            if 1.7499999999999999e-10 < y.re

            1. Initial program 38.6%

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

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

            Alternative 3: 78.1% accurate, 1.1× speedup?

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

              1. Initial program 38.6%

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

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

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

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

                if -1700 < y.im < 1.02000000000000007e35

                1. Initial program 49.6%

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

                    \[\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.im around 0

                    \[\leadsto \color{blue}{{\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}} \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) \]
                  3. Step-by-step derivation
                    1. fp-cancel-sub-sign-invN/A

                      \[\leadsto {\left(\sqrt{\color{blue}{{x.im}^{2} + {x.re}^{2}}}\right)}^{y.re} \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. sqrt-pow2N/A

                      \[\leadsto {\left({x.im}^{2} + {x.re}^{2}\right)}^{\color{blue}{\left(\frac{y.re}{2}\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) \]
                    3. pow2N/A

                      \[\leadsto {\left(x.im \cdot x.im + {x.re}^{2}\right)}^{\left(\frac{y.re}{2}\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) \]
                    4. pow2N/A

                      \[\leadsto {\left(x.im \cdot x.im + x.re \cdot x.re\right)}^{\left(\frac{y.re}{2}\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) \]
                    5. sqrt-pow2N/A

                      \[\leadsto {\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)}^{\color{blue}{y.re}} \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) \]
                    6. lift-hypot.f64N/A

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

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

                    \[\leadsto \color{blue}{{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}} \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) \]
                4. Recombined 2 regimes into one program.
                5. Final simplification81.7%

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

                Alternative 4: 77.1% accurate, 1.1× speedup?

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

                  1. Initial program 43.5%

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

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

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

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

                  if -9.4e7 < y.re < 1.7499999999999999e-10

                  1. Initial program 47.9%

                    \[e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \]
                  2. Add Preprocessing
                  3. Step-by-step derivation
                    1. Applied rewrites83.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^{\color{blue}{-1 \cdot \left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}} \cdot \sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\right) \]
                    3. Step-by-step derivation
                      1. fp-cancel-sub-sign-invN/A

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

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

                        \[\leadsto e^{-1 \cdot \left(y.im \cdot \tan^{-1}_* \frac{x.im}{\color{blue}{x.re}}\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) \]
                      4. lift-*.f6482.5

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

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

                    if 1.7499999999999999e-10 < y.re

                    1. Initial program 38.6%

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

                        \[\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 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 \color{blue}{\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
                      3. 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 \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{\color{blue}{x.re}}\right) \]
                        2. lift-*.f6473.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 \sin \left(y.re \cdot \color{blue}{\tan^{-1}_* \frac{x.im}{x.re}}\right) \]
                      4. Applied rewrites73.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 \sin \color{blue}{\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
                    4. Recombined 3 regimes into one program.
                    5. Final simplification82.4%

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

                    Alternative 5: 72.1% accurate, 1.1× speedup?

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

                      1. Initial program 35.9%

                        \[e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \]
                      2. Add Preprocessing
                      3. Step-by-step derivation
                        1. Applied rewrites72.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 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 \color{blue}{\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
                        3. 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 \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{\color{blue}{x.re}}\right) \]
                          2. lift-*.f6475.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 \sin \left(y.re \cdot \color{blue}{\tan^{-1}_* \frac{x.im}{x.re}}\right) \]
                        4. Applied rewrites75.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 \sin \color{blue}{\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
                        5. Taylor expanded in y.re around 0

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

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

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

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

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

                        if -1.04000000000000003e55 < y.im < 1.02000000000000007e35

                        1. Initial program 49.9%

                          \[e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \]
                        2. Add Preprocessing
                        3. Step-by-step derivation
                          1. Applied rewrites90.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.im around 0

                            \[\leadsto \color{blue}{{\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}} \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) \]
                          3. Step-by-step derivation
                            1. fp-cancel-sub-sign-invN/A

                              \[\leadsto {\left(\sqrt{\color{blue}{{x.im}^{2} + {x.re}^{2}}}\right)}^{y.re} \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. sqrt-pow2N/A

                              \[\leadsto {\left({x.im}^{2} + {x.re}^{2}\right)}^{\color{blue}{\left(\frac{y.re}{2}\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) \]
                            3. pow2N/A

                              \[\leadsto {\left(x.im \cdot x.im + {x.re}^{2}\right)}^{\left(\frac{y.re}{2}\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) \]
                            4. pow2N/A

                              \[\leadsto {\left(x.im \cdot x.im + x.re \cdot x.re\right)}^{\left(\frac{y.re}{2}\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) \]
                            5. sqrt-pow2N/A

                              \[\leadsto {\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)}^{\color{blue}{y.re}} \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) \]
                            6. lift-hypot.f64N/A

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

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

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

                          if 1.02000000000000007e35 < y.im

                          1. Initial program 38.4%

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

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

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

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

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

                        Alternative 6: 61.5% accurate, 1.2× speedup?

                        \[\begin{array}{l} \\ \begin{array}{l} t_0 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\ t_1 := \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)\\ t_2 := e^{t\_1 \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot t\_0\\ t_3 := e^{\left(-y.im\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}}\\ t_4 := t\_3 \cdot t\_0\\ \mathbf{if}\;y.re \leq -4 \cdot 10^{-17}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;y.re \leq -4.7 \cdot 10^{-247}:\\ \;\;\;\;t\_4\\ \mathbf{elif}\;y.re \leq 1.42 \cdot 10^{-150}:\\ \;\;\;\;t\_3 \cdot \sin \left(t\_1 \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\\ \mathbf{elif}\;y.re \leq 0.55:\\ \;\;\;\;t\_4\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
                        (FPCore (x.re x.im y.re y.im)
                         :precision binary64
                         (let* ((t_0 (sin (* y.re (atan2 x.im x.re))))
                                (t_1 (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
                                (t_2 (* (exp (- (* t_1 y.re) (* (atan2 x.im x.re) y.im))) t_0))
                                (t_3 (exp (* (- y.im) (atan2 x.im x.re))))
                                (t_4 (* t_3 t_0)))
                           (if (<= y.re -4e-17)
                             t_2
                             (if (<= y.re -4.7e-247)
                               t_4
                               (if (<= y.re 1.42e-150)
                                 (* t_3 (sin (+ (* t_1 y.im) (* (atan2 x.im x.re) y.re))))
                                 (if (<= y.re 0.55) 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 = sin((y_46_re * atan2(x_46_im, x_46_re)));
                        	double t_1 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
                        	double t_2 = exp(((t_1 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * t_0;
                        	double t_3 = exp((-y_46_im * atan2(x_46_im, x_46_re)));
                        	double t_4 = t_3 * t_0;
                        	double tmp;
                        	if (y_46_re <= -4e-17) {
                        		tmp = t_2;
                        	} else if (y_46_re <= -4.7e-247) {
                        		tmp = t_4;
                        	} else if (y_46_re <= 1.42e-150) {
                        		tmp = t_3 * sin(((t_1 * y_46_im) + (atan2(x_46_im, x_46_re) * y_46_re)));
                        	} else if (y_46_re <= 0.55) {
                        		tmp = t_4;
                        	} else {
                        		tmp = t_2;
                        	}
                        	return tmp;
                        }
                        
                        module fmin_fmax_functions
                            implicit none
                            private
                            public fmax
                            public fmin
                        
                            interface fmax
                                module procedure fmax88
                                module procedure fmax44
                                module procedure fmax84
                                module procedure fmax48
                            end interface
                            interface fmin
                                module procedure fmin88
                                module procedure fmin44
                                module procedure fmin84
                                module procedure fmin48
                            end interface
                        contains
                            real(8) function fmax88(x, y) result (res)
                                real(8), intent (in) :: x
                                real(8), intent (in) :: y
                                res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                            end function
                            real(4) function fmax44(x, y) result (res)
                                real(4), intent (in) :: x
                                real(4), intent (in) :: y
                                res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                            end function
                            real(8) function fmax84(x, y) result(res)
                                real(8), intent (in) :: x
                                real(4), intent (in) :: y
                                res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                            end function
                            real(8) function fmax48(x, y) result(res)
                                real(4), intent (in) :: x
                                real(8), intent (in) :: y
                                res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                            end function
                            real(8) function fmin88(x, y) result (res)
                                real(8), intent (in) :: x
                                real(8), intent (in) :: y
                                res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                            end function
                            real(4) function fmin44(x, y) result (res)
                                real(4), intent (in) :: x
                                real(4), intent (in) :: y
                                res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                            end function
                            real(8) function fmin84(x, y) result(res)
                                real(8), intent (in) :: x
                                real(4), intent (in) :: y
                                res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                            end function
                            real(8) function fmin48(x, y) result(res)
                                real(4), intent (in) :: x
                                real(8), intent (in) :: y
                                res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                            end function
                        end module
                        
                        real(8) function code(x_46re, x_46im, y_46re, y_46im)
                        use fmin_fmax_functions
                            real(8), intent (in) :: x_46re
                            real(8), intent (in) :: x_46im
                            real(8), intent (in) :: y_46re
                            real(8), intent (in) :: y_46im
                            real(8) :: t_0
                            real(8) :: t_1
                            real(8) :: t_2
                            real(8) :: t_3
                            real(8) :: t_4
                            real(8) :: tmp
                            t_0 = sin((y_46re * atan2(x_46im, x_46re)))
                            t_1 = log(sqrt(((x_46re * x_46re) + (x_46im * x_46im))))
                            t_2 = exp(((t_1 * y_46re) - (atan2(x_46im, x_46re) * y_46im))) * t_0
                            t_3 = exp((-y_46im * atan2(x_46im, x_46re)))
                            t_4 = t_3 * t_0
                            if (y_46re <= (-4d-17)) then
                                tmp = t_2
                            else if (y_46re <= (-4.7d-247)) then
                                tmp = t_4
                            else if (y_46re <= 1.42d-150) then
                                tmp = t_3 * sin(((t_1 * y_46im) + (atan2(x_46im, x_46re) * y_46re)))
                            else if (y_46re <= 0.55d0) then
                                tmp = t_4
                            else
                                tmp = t_2
                            end if
                            code = tmp
                        end function
                        
                        public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
                        	double t_0 = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
                        	double t_1 = Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
                        	double t_2 = Math.exp(((t_1 * y_46_re) - (Math.atan2(x_46_im, x_46_re) * y_46_im))) * t_0;
                        	double t_3 = Math.exp((-y_46_im * Math.atan2(x_46_im, x_46_re)));
                        	double t_4 = t_3 * t_0;
                        	double tmp;
                        	if (y_46_re <= -4e-17) {
                        		tmp = t_2;
                        	} else if (y_46_re <= -4.7e-247) {
                        		tmp = t_4;
                        	} else if (y_46_re <= 1.42e-150) {
                        		tmp = t_3 * Math.sin(((t_1 * y_46_im) + (Math.atan2(x_46_im, x_46_re) * y_46_re)));
                        	} else if (y_46_re <= 0.55) {
                        		tmp = t_4;
                        	} else {
                        		tmp = t_2;
                        	}
                        	return tmp;
                        }
                        
                        def code(x_46_re, x_46_im, y_46_re, y_46_im):
                        	t_0 = math.sin((y_46_re * math.atan2(x_46_im, x_46_re)))
                        	t_1 = math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))
                        	t_2 = math.exp(((t_1 * y_46_re) - (math.atan2(x_46_im, x_46_re) * y_46_im))) * t_0
                        	t_3 = math.exp((-y_46_im * math.atan2(x_46_im, x_46_re)))
                        	t_4 = t_3 * t_0
                        	tmp = 0
                        	if y_46_re <= -4e-17:
                        		tmp = t_2
                        	elif y_46_re <= -4.7e-247:
                        		tmp = t_4
                        	elif y_46_re <= 1.42e-150:
                        		tmp = t_3 * math.sin(((t_1 * y_46_im) + (math.atan2(x_46_im, x_46_re) * y_46_re)))
                        	elif y_46_re <= 0.55:
                        		tmp = t_4
                        	else:
                        		tmp = t_2
                        	return tmp
                        
                        function code(x_46_re, x_46_im, y_46_re, y_46_im)
                        	t_0 = sin(Float64(y_46_re * atan(x_46_im, x_46_re)))
                        	t_1 = log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))
                        	t_2 = Float64(exp(Float64(Float64(t_1 * y_46_re) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * t_0)
                        	t_3 = exp(Float64(Float64(-y_46_im) * atan(x_46_im, x_46_re)))
                        	t_4 = Float64(t_3 * t_0)
                        	tmp = 0.0
                        	if (y_46_re <= -4e-17)
                        		tmp = t_2;
                        	elseif (y_46_re <= -4.7e-247)
                        		tmp = t_4;
                        	elseif (y_46_re <= 1.42e-150)
                        		tmp = Float64(t_3 * sin(Float64(Float64(t_1 * y_46_im) + Float64(atan(x_46_im, x_46_re) * y_46_re))));
                        	elseif (y_46_re <= 0.55)
                        		tmp = t_4;
                        	else
                        		tmp = t_2;
                        	end
                        	return tmp
                        end
                        
                        function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im)
                        	t_0 = sin((y_46_re * atan2(x_46_im, x_46_re)));
                        	t_1 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
                        	t_2 = exp(((t_1 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * t_0;
                        	t_3 = exp((-y_46_im * atan2(x_46_im, x_46_re)));
                        	t_4 = t_3 * t_0;
                        	tmp = 0.0;
                        	if (y_46_re <= -4e-17)
                        		tmp = t_2;
                        	elseif (y_46_re <= -4.7e-247)
                        		tmp = t_4;
                        	elseif (y_46_re <= 1.42e-150)
                        		tmp = t_3 * sin(((t_1 * y_46_im) + (atan2(x_46_im, x_46_re) * y_46_re)));
                        	elseif (y_46_re <= 0.55)
                        		tmp = t_4;
                        	else
                        		tmp = t_2;
                        	end
                        	tmp_2 = tmp;
                        end
                        
                        code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(N[Exp[N[(N[(t$95$1 * y$46$re), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$0), $MachinePrecision]}, Block[{t$95$3 = N[Exp[N[((-y$46$im) * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$4 = N[(t$95$3 * t$95$0), $MachinePrecision]}, If[LessEqual[y$46$re, -4e-17], t$95$2, If[LessEqual[y$46$re, -4.7e-247], t$95$4, If[LessEqual[y$46$re, 1.42e-150], N[(t$95$3 * N[Sin[N[(N[(t$95$1 * y$46$im), $MachinePrecision] + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 0.55], t$95$4, t$95$2]]]]]]]]]
                        
                        \begin{array}{l}
                        
                        \\
                        \begin{array}{l}
                        t_0 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
                        t_1 := \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)\\
                        t_2 := e^{t\_1 \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot t\_0\\
                        t_3 := e^{\left(-y.im\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}}\\
                        t_4 := t\_3 \cdot t\_0\\
                        \mathbf{if}\;y.re \leq -4 \cdot 10^{-17}:\\
                        \;\;\;\;t\_2\\
                        
                        \mathbf{elif}\;y.re \leq -4.7 \cdot 10^{-247}:\\
                        \;\;\;\;t\_4\\
                        
                        \mathbf{elif}\;y.re \leq 1.42 \cdot 10^{-150}:\\
                        \;\;\;\;t\_3 \cdot \sin \left(t\_1 \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\\
                        
                        \mathbf{elif}\;y.re \leq 0.55:\\
                        \;\;\;\;t\_4\\
                        
                        \mathbf{else}:\\
                        \;\;\;\;t\_2\\
                        
                        
                        \end{array}
                        \end{array}
                        
                        Derivation
                        1. Split input into 3 regimes
                        2. if y.re < -4.00000000000000029e-17 or 0.55000000000000004 < y.re

                          1. Initial program 42.9%

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

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

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

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

                          if -4.00000000000000029e-17 < y.re < -4.6999999999999998e-247 or 1.42000000000000006e-150 < y.re < 0.55000000000000004

                          1. Initial program 38.9%

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

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

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

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

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

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

                            if -4.6999999999999998e-247 < y.re < 1.42000000000000006e-150

                            1. Initial program 61.4%

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

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

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

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

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

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

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

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

                            \[\leadsto \begin{array}{l} \mathbf{if}\;y.re \leq -4 \cdot 10^{-17}:\\ \;\;\;\;e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\ \mathbf{elif}\;y.re \leq -4.7 \cdot 10^{-247}:\\ \;\;\;\;e^{\left(-y.im\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\ \mathbf{elif}\;y.re \leq 1.42 \cdot 10^{-150}:\\ \;\;\;\;e^{\left(-y.im\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \sin \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\\ \mathbf{elif}\;y.re \leq 0.55:\\ \;\;\;\;e^{\left(-y.im\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\ \mathbf{else}:\\ \;\;\;\;e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\ \end{array} \]
                          6. Add Preprocessing

                          Alternative 7: 60.7% accurate, 1.2× speedup?

                          \[\begin{array}{l} \\ \begin{array}{l} t_0 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\ \mathbf{if}\;y.re \leq -4 \cdot 10^{-17} \lor \neg \left(y.re \leq 0.55\right):\\ \;\;\;\;e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot t\_0\\ \mathbf{else}:\\ \;\;\;\;e^{\left(-y.im\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot t\_0\\ \end{array} \end{array} \]
                          (FPCore (x.re x.im y.re y.im)
                           :precision binary64
                           (let* ((t_0 (sin (* y.re (atan2 x.im x.re)))))
                             (if (or (<= y.re -4e-17) (not (<= y.re 0.55)))
                               (*
                                (exp
                                 (-
                                  (* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.re)
                                  (* (atan2 x.im x.re) y.im)))
                                t_0)
                               (* (exp (* (- y.im) (atan2 x.im x.re))) t_0))))
                          double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
                          	double t_0 = sin((y_46_re * atan2(x_46_im, x_46_re)));
                          	double tmp;
                          	if ((y_46_re <= -4e-17) || !(y_46_re <= 0.55)) {
                          		tmp = exp(((log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * t_0;
                          	} else {
                          		tmp = exp((-y_46_im * atan2(x_46_im, x_46_re))) * t_0;
                          	}
                          	return tmp;
                          }
                          
                          module fmin_fmax_functions
                              implicit none
                              private
                              public fmax
                              public fmin
                          
                              interface fmax
                                  module procedure fmax88
                                  module procedure fmax44
                                  module procedure fmax84
                                  module procedure fmax48
                              end interface
                              interface fmin
                                  module procedure fmin88
                                  module procedure fmin44
                                  module procedure fmin84
                                  module procedure fmin48
                              end interface
                          contains
                              real(8) function fmax88(x, y) result (res)
                                  real(8), intent (in) :: x
                                  real(8), intent (in) :: y
                                  res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                              end function
                              real(4) function fmax44(x, y) result (res)
                                  real(4), intent (in) :: x
                                  real(4), intent (in) :: y
                                  res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                              end function
                              real(8) function fmax84(x, y) result(res)
                                  real(8), intent (in) :: x
                                  real(4), intent (in) :: y
                                  res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                              end function
                              real(8) function fmax48(x, y) result(res)
                                  real(4), intent (in) :: x
                                  real(8), intent (in) :: y
                                  res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                              end function
                              real(8) function fmin88(x, y) result (res)
                                  real(8), intent (in) :: x
                                  real(8), intent (in) :: y
                                  res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                              end function
                              real(4) function fmin44(x, y) result (res)
                                  real(4), intent (in) :: x
                                  real(4), intent (in) :: y
                                  res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                              end function
                              real(8) function fmin84(x, y) result(res)
                                  real(8), intent (in) :: x
                                  real(4), intent (in) :: y
                                  res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                              end function
                              real(8) function fmin48(x, y) result(res)
                                  real(4), intent (in) :: x
                                  real(8), intent (in) :: y
                                  res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                              end function
                          end module
                          
                          real(8) function code(x_46re, x_46im, y_46re, y_46im)
                          use fmin_fmax_functions
                              real(8), intent (in) :: x_46re
                              real(8), intent (in) :: x_46im
                              real(8), intent (in) :: y_46re
                              real(8), intent (in) :: y_46im
                              real(8) :: t_0
                              real(8) :: tmp
                              t_0 = sin((y_46re * atan2(x_46im, x_46re)))
                              if ((y_46re <= (-4d-17)) .or. (.not. (y_46re <= 0.55d0))) then
                                  tmp = exp(((log(sqrt(((x_46re * x_46re) + (x_46im * x_46im)))) * y_46re) - (atan2(x_46im, x_46re) * y_46im))) * t_0
                              else
                                  tmp = exp((-y_46im * atan2(x_46im, x_46re))) * t_0
                              end if
                              code = tmp
                          end function
                          
                          public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
                          	double t_0 = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
                          	double tmp;
                          	if ((y_46_re <= -4e-17) || !(y_46_re <= 0.55)) {
                          		tmp = Math.exp(((Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - (Math.atan2(x_46_im, x_46_re) * y_46_im))) * t_0;
                          	} else {
                          		tmp = Math.exp((-y_46_im * Math.atan2(x_46_im, x_46_re))) * t_0;
                          	}
                          	return tmp;
                          }
                          
                          def code(x_46_re, x_46_im, y_46_re, y_46_im):
                          	t_0 = math.sin((y_46_re * math.atan2(x_46_im, x_46_re)))
                          	tmp = 0
                          	if (y_46_re <= -4e-17) or not (y_46_re <= 0.55):
                          		tmp = math.exp(((math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - (math.atan2(x_46_im, x_46_re) * y_46_im))) * t_0
                          	else:
                          		tmp = math.exp((-y_46_im * math.atan2(x_46_im, x_46_re))) * t_0
                          	return tmp
                          
                          function code(x_46_re, x_46_im, y_46_re, y_46_im)
                          	t_0 = sin(Float64(y_46_re * atan(x_46_im, x_46_re)))
                          	tmp = 0.0
                          	if ((y_46_re <= -4e-17) || !(y_46_re <= 0.55))
                          		tmp = Float64(exp(Float64(Float64(log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) * y_46_re) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * t_0);
                          	else
                          		tmp = Float64(exp(Float64(Float64(-y_46_im) * atan(x_46_im, x_46_re))) * t_0);
                          	end
                          	return tmp
                          end
                          
                          function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im)
                          	t_0 = sin((y_46_re * atan2(x_46_im, x_46_re)));
                          	tmp = 0.0;
                          	if ((y_46_re <= -4e-17) || ~((y_46_re <= 0.55)))
                          		tmp = exp(((log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * t_0;
                          	else
                          		tmp = exp((-y_46_im * atan2(x_46_im, x_46_re))) * t_0;
                          	end
                          	tmp_2 = tmp;
                          end
                          
                          code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[Or[LessEqual[y$46$re, -4e-17], N[Not[LessEqual[y$46$re, 0.55]], $MachinePrecision]], N[(N[Exp[N[(N[(N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * y$46$re), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$0), $MachinePrecision], N[(N[Exp[N[((-y$46$im) * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$0), $MachinePrecision]]]
                          
                          \begin{array}{l}
                          
                          \\
                          \begin{array}{l}
                          t_0 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
                          \mathbf{if}\;y.re \leq -4 \cdot 10^{-17} \lor \neg \left(y.re \leq 0.55\right):\\
                          \;\;\;\;e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot t\_0\\
                          
                          \mathbf{else}:\\
                          \;\;\;\;e^{\left(-y.im\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot t\_0\\
                          
                          
                          \end{array}
                          \end{array}
                          
                          Derivation
                          1. Split input into 2 regimes
                          2. if y.re < -4.00000000000000029e-17 or 0.55000000000000004 < y.re

                            1. Initial program 42.9%

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

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

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

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

                            if -4.00000000000000029e-17 < y.re < 0.55000000000000004

                            1. Initial program 46.4%

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

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

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

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

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

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

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

                            Alternative 8: 58.6% accurate, 1.6× speedup?

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

                              1. Initial program 45.4%

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

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

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

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

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

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

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

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

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

                                  \[\leadsto \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} \]
                              5. Applied rewrites88.0%

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

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

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

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

                                  \[\leadsto \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} \]
                                5. pow2N/A

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

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

                                  \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{y.re} \]
                                8. lift-*.f6488.0

                                  \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{y.re} \]
                              7. Applied rewrites88.0%

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

                              if -4.00000000000000029e-17 < y.re < 1.40000000000000008e-10

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

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

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

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

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

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

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

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

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

                                if 1.40000000000000008e-10 < y.re

                                1. Initial program 39.7%

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

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

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

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

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

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

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

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

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

                                    \[\leadsto \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} \]
                                5. Applied rewrites70.7%

                                  \[\leadsto \color{blue}{\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}} \]
                              4. Recombined 3 regimes into one program.
                              5. Final simplification65.7%

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

                              Alternative 9: 46.0% accurate, 1.6× speedup?

                              \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x.im \leq 720000:\\ \;\;\;\;\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{y.re}\\ \mathbf{else}:\\ \;\;\;\;{x.im}^{y.re} \cdot \sin \left(y.im \cdot \log x.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
                               (if (<= x.im 720000.0)
                                 (*
                                  (sin (* y.re (atan2 x.im x.re)))
                                  (pow (sqrt (fma x.im x.im (* x.re x.re))) y.re))
                                 (*
                                  (pow x.im y.re)
                                  (sin (+ (* y.im (log x.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 tmp;
                              	if (x_46_im <= 720000.0) {
                              		tmp = sin((y_46_re * atan2(x_46_im, x_46_re))) * pow(sqrt(fma(x_46_im, x_46_im, (x_46_re * x_46_re))), y_46_re);
                              	} else {
                              		tmp = pow(x_46_im, y_46_re) * sin(((y_46_im * log(x_46_im)) + (atan2(x_46_im, x_46_re) * y_46_re)));
                              	}
                              	return tmp;
                              }
                              
                              function code(x_46_re, x_46_im, y_46_re, y_46_im)
                              	tmp = 0.0
                              	if (x_46_im <= 720000.0)
                              		tmp = Float64(sin(Float64(y_46_re * atan(x_46_im, x_46_re))) * (sqrt(fma(x_46_im, x_46_im, Float64(x_46_re * x_46_re))) ^ y_46_re));
                              	else
                              		tmp = Float64((x_46_im ^ y_46_re) * sin(Float64(Float64(y_46_im * log(x_46_im)) + Float64(atan(x_46_im, x_46_re) * y_46_re))));
                              	end
                              	return tmp
                              end
                              
                              code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[x$46$im, 720000.0], N[(N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Power[N[Sqrt[N[(x$46$im * x$46$im + N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], N[(N[Power[x$46$im, y$46$re], $MachinePrecision] * N[Sin[N[(N[(y$46$im * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision] + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
                              
                              \begin{array}{l}
                              
                              \\
                              \begin{array}{l}
                              \mathbf{if}\;x.im \leq 720000:\\
                              \;\;\;\;\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{y.re}\\
                              
                              \mathbf{else}:\\
                              \;\;\;\;{x.im}^{y.re} \cdot \sin \left(y.im \cdot \log x.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\\
                              
                              
                              \end{array}
                              \end{array}
                              
                              Derivation
                              1. Split input into 2 regimes
                              2. if x.im < 7.2e5

                                1. Initial program 45.4%

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

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

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

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

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

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

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

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

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

                                    \[\leadsto \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} \]
                                5. Applied rewrites50.7%

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

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

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

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

                                    \[\leadsto \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} \]
                                  5. pow2N/A

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

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

                                    \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{y.re} \]
                                  8. lift-*.f6451.9

                                    \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{y.re} \]
                                7. Applied rewrites51.9%

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

                                if 7.2e5 < x.im

                                1. Initial program 42.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

                                Alternative 10: 45.6% accurate, 1.9× speedup?

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

                                  1. Initial program 39.6%

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

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

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

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

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

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

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

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

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

                                      \[\leadsto \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} \]
                                  5. Applied rewrites38.1%

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

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

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

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

                                      \[\leadsto \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} \]
                                    5. pow2N/A

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

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

                                      \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{y.re} \]
                                    8. lift-*.f6448.0

                                      \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{y.re} \]
                                  7. Applied rewrites48.0%

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

                                  if -5.5999999999999996e-50 < y.im < 2.45e54

                                  1. Initial program 49.0%

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

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

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

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

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

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

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

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

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

                                      \[\leadsto \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} \]
                                  5. Applied rewrites62.4%

                                    \[\leadsto \color{blue}{\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}} \]
                                  6. Taylor expanded in y.re around 0

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

                                      \[\leadsto \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} \]
                                    2. lift-*.f6464.8

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

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

                                  if 2.45e54 < y.im

                                  1. Initial program 40.8%

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

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

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

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

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

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

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

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

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

                                      \[\leadsto \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} \]
                                  5. Applied rewrites36.1%

                                    \[\leadsto \color{blue}{\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}} \]
                                  6. Taylor expanded in x.im around inf

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

                                      \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(x.im \cdot \left(1 + \frac{1}{2} \cdot \frac{{x.re}^{2}}{{x.im}^{2}}\right)\right)}^{y.re} \]
                                    2. fp-cancel-sign-sub-invN/A

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

                                      \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(x.im \cdot \left(1 - \left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \frac{{x.re}^{2}}{{x.im}^{2}}\right)\right)}^{y.re} \]
                                    4. metadata-evalN/A

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

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

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

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

                                      \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(x.im \cdot \left(1 - \frac{-1}{2} \cdot \frac{x.re \cdot x.re}{{x.im}^{2}}\right)\right)}^{y.re} \]
                                    9. pow2N/A

                                      \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(x.im \cdot \left(1 - \frac{-1}{2} \cdot \frac{x.re \cdot x.re}{x.im \cdot x.im}\right)\right)}^{y.re} \]
                                    10. lift-*.f6430.9

                                      \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(x.im \cdot \left(1 - -0.5 \cdot \frac{x.re \cdot x.re}{x.im \cdot x.im}\right)\right)}^{y.re} \]
                                  8. Applied rewrites30.9%

                                    \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(x.im \cdot \left(1 - -0.5 \cdot \frac{x.re \cdot x.re}{x.im \cdot x.im}\right)\right)}^{y.re} \]
                                  9. Taylor expanded in x.re around inf

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

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

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

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

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

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

                                      \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(x.im \cdot \left(\frac{1}{2} \cdot \left(\frac{x.re}{x.im} \cdot \frac{x.re}{x.im}\right)\right)\right)}^{y.re} \]
                                    7. lower-/.f6445.7

                                      \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(x.im \cdot \left(0.5 \cdot \left(\frac{x.re}{x.im} \cdot \frac{x.re}{x.im}\right)\right)\right)}^{y.re} \]
                                  11. Applied rewrites45.7%

                                    \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(x.im \cdot \left(0.5 \cdot \left(\frac{x.re}{x.im} \cdot \frac{x.re}{x.im}\right)\right)\right)}^{y.re} \]
                                3. Recombined 3 regimes into one program.
                                4. Add Preprocessing

                                Alternative 11: 44.6% accurate, 2.0× speedup?

                                \[\begin{array}{l} \\ \begin{array}{l} t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\ \mathbf{if}\;y.im \leq -8 \cdot 10^{+55} \lor \neg \left(y.im \leq 2.45 \cdot 10^{+54}\right):\\ \;\;\;\;\sin t\_0 \cdot {\left(0.5 \cdot \frac{x.re \cdot x.re}{x.im}\right)}^{y.re}\\ \mathbf{else}:\\ \;\;\;\;t\_0 \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\ \end{array} \end{array} \]
                                (FPCore (x.re x.im y.re y.im)
                                 :precision binary64
                                 (let* ((t_0 (* y.re (atan2 x.im x.re))))
                                   (if (or (<= y.im -8e+55) (not (<= y.im 2.45e+54)))
                                     (* (sin t_0) (pow (* 0.5 (/ (* x.re x.re) x.im)) y.re))
                                     (* t_0 (pow (hypot x.im x.re) y.re)))))
                                double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
                                	double t_0 = y_46_re * atan2(x_46_im, x_46_re);
                                	double tmp;
                                	if ((y_46_im <= -8e+55) || !(y_46_im <= 2.45e+54)) {
                                		tmp = sin(t_0) * pow((0.5 * ((x_46_re * x_46_re) / x_46_im)), y_46_re);
                                	} else {
                                		tmp = t_0 * pow(hypot(x_46_im, x_46_re), y_46_re);
                                	}
                                	return tmp;
                                }
                                
                                public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
                                	double t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
                                	double tmp;
                                	if ((y_46_im <= -8e+55) || !(y_46_im <= 2.45e+54)) {
                                		tmp = Math.sin(t_0) * Math.pow((0.5 * ((x_46_re * x_46_re) / x_46_im)), y_46_re);
                                	} else {
                                		tmp = t_0 * Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
                                	}
                                	return tmp;
                                }
                                
                                def code(x_46_re, x_46_im, y_46_re, y_46_im):
                                	t_0 = y_46_re * math.atan2(x_46_im, x_46_re)
                                	tmp = 0
                                	if (y_46_im <= -8e+55) or not (y_46_im <= 2.45e+54):
                                		tmp = math.sin(t_0) * math.pow((0.5 * ((x_46_re * x_46_re) / x_46_im)), y_46_re)
                                	else:
                                		tmp = t_0 * math.pow(math.hypot(x_46_im, x_46_re), y_46_re)
                                	return tmp
                                
                                function code(x_46_re, x_46_im, y_46_re, y_46_im)
                                	t_0 = Float64(y_46_re * atan(x_46_im, x_46_re))
                                	tmp = 0.0
                                	if ((y_46_im <= -8e+55) || !(y_46_im <= 2.45e+54))
                                		tmp = Float64(sin(t_0) * (Float64(0.5 * Float64(Float64(x_46_re * x_46_re) / x_46_im)) ^ y_46_re));
                                	else
                                		tmp = Float64(t_0 * (hypot(x_46_im, x_46_re) ^ y_46_re));
                                	end
                                	return tmp
                                end
                                
                                function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im)
                                	t_0 = y_46_re * atan2(x_46_im, x_46_re);
                                	tmp = 0.0;
                                	if ((y_46_im <= -8e+55) || ~((y_46_im <= 2.45e+54)))
                                		tmp = sin(t_0) * ((0.5 * ((x_46_re * x_46_re) / x_46_im)) ^ y_46_re);
                                	else
                                		tmp = t_0 * (hypot(x_46_im, x_46_re) ^ y_46_re);
                                	end
                                	tmp_2 = tmp;
                                end
                                
                                code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[y$46$im, -8e+55], N[Not[LessEqual[y$46$im, 2.45e+54]], $MachinePrecision]], N[(N[Sin[t$95$0], $MachinePrecision] * N[Power[N[(0.5 * N[(N[(x$46$re * x$46$re), $MachinePrecision] / x$46$im), $MachinePrecision]), $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]]]
                                
                                \begin{array}{l}
                                
                                \\
                                \begin{array}{l}
                                t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
                                \mathbf{if}\;y.im \leq -8 \cdot 10^{+55} \lor \neg \left(y.im \leq 2.45 \cdot 10^{+54}\right):\\
                                \;\;\;\;\sin t\_0 \cdot {\left(0.5 \cdot \frac{x.re \cdot x.re}{x.im}\right)}^{y.re}\\
                                
                                \mathbf{else}:\\
                                \;\;\;\;t\_0 \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
                                
                                
                                \end{array}
                                \end{array}
                                
                                Derivation
                                1. Split input into 2 regimes
                                2. if y.im < -8.00000000000000008e55 or 2.45e54 < y.im

                                  1. Initial program 38.2%

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

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

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

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

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

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

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

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

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

                                      \[\leadsto \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} \]
                                  5. Applied rewrites35.2%

                                    \[\leadsto \color{blue}{\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}} \]
                                  6. Taylor expanded in x.im around inf

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

                                      \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(x.im \cdot \left(1 + \frac{1}{2} \cdot \frac{{x.re}^{2}}{{x.im}^{2}}\right)\right)}^{y.re} \]
                                    2. fp-cancel-sign-sub-invN/A

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

                                      \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(x.im \cdot \left(1 - \left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \frac{{x.re}^{2}}{{x.im}^{2}}\right)\right)}^{y.re} \]
                                    4. metadata-evalN/A

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

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

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

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

                                      \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(x.im \cdot \left(1 - \frac{-1}{2} \cdot \frac{x.re \cdot x.re}{{x.im}^{2}}\right)\right)}^{y.re} \]
                                    9. pow2N/A

                                      \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(x.im \cdot \left(1 - \frac{-1}{2} \cdot \frac{x.re \cdot x.re}{x.im \cdot x.im}\right)\right)}^{y.re} \]
                                    10. lift-*.f6426.8

                                      \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(x.im \cdot \left(1 - -0.5 \cdot \frac{x.re \cdot x.re}{x.im \cdot x.im}\right)\right)}^{y.re} \]
                                  8. Applied rewrites26.8%

                                    \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(x.im \cdot \left(1 - -0.5 \cdot \frac{x.re \cdot x.re}{x.im \cdot x.im}\right)\right)}^{y.re} \]
                                  9. Taylor expanded in x.re around inf

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

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

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

                                      \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\frac{1}{2} \cdot \frac{x.re \cdot x.re}{x.im}\right)}^{y.re} \]
                                    4. lift-*.f6438.9

                                      \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(0.5 \cdot \frac{x.re \cdot x.re}{x.im}\right)}^{y.re} \]
                                  11. Applied rewrites38.9%

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

                                  if -8.00000000000000008e55 < y.im < 2.45e54

                                  1. Initial program 49.0%

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

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

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

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

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

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

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

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

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

                                      \[\leadsto \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} \]
                                  5. Applied rewrites60.2%

                                    \[\leadsto \color{blue}{\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}} \]
                                  6. Taylor expanded in y.re around 0

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

                                      \[\leadsto \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} \]
                                    2. lift-*.f6461.0

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

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

                                  \[\leadsto \begin{array}{l} \mathbf{if}\;y.im \leq -8 \cdot 10^{+55} \lor \neg \left(y.im \leq 2.45 \cdot 10^{+54}\right):\\ \;\;\;\;\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(0.5 \cdot \frac{x.re \cdot x.re}{x.im}\right)}^{y.re}\\ \mathbf{else}:\\ \;\;\;\;\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}\\ \end{array} \]
                                5. Add Preprocessing

                                Alternative 12: 45.8% accurate, 2.0× speedup?

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

                                  1. Initial program 39.6%

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

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

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

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

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

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

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

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

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

                                      \[\leadsto \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} \]
                                  5. Applied rewrites38.1%

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

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

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

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

                                      \[\leadsto \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} \]
                                    5. pow2N/A

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

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

                                      \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{y.re} \]
                                    8. lift-*.f6448.0

                                      \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{y.re} \]
                                  7. Applied rewrites48.0%

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

                                  if -5.5999999999999996e-50 < y.im < 2.45e54

                                  1. Initial program 49.0%

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

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

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

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

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

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

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

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

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

                                      \[\leadsto \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} \]
                                  5. Applied rewrites62.4%

                                    \[\leadsto \color{blue}{\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}} \]
                                  6. Taylor expanded in y.re around 0

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

                                      \[\leadsto \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} \]
                                    2. lift-*.f6464.8

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

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

                                  if 2.45e54 < y.im

                                  1. Initial program 40.8%

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

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

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

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

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

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

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

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

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

                                      \[\leadsto \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} \]
                                  5. Applied rewrites36.1%

                                    \[\leadsto \color{blue}{\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}} \]
                                  6. Taylor expanded in x.im around inf

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

                                      \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(x.im \cdot \left(1 + \frac{1}{2} \cdot \frac{{x.re}^{2}}{{x.im}^{2}}\right)\right)}^{y.re} \]
                                    2. fp-cancel-sign-sub-invN/A

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

                                      \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(x.im \cdot \left(1 - \left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \frac{{x.re}^{2}}{{x.im}^{2}}\right)\right)}^{y.re} \]
                                    4. metadata-evalN/A

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

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

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

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

                                      \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(x.im \cdot \left(1 - \frac{-1}{2} \cdot \frac{x.re \cdot x.re}{{x.im}^{2}}\right)\right)}^{y.re} \]
                                    9. pow2N/A

                                      \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(x.im \cdot \left(1 - \frac{-1}{2} \cdot \frac{x.re \cdot x.re}{x.im \cdot x.im}\right)\right)}^{y.re} \]
                                    10. lift-*.f6430.9

                                      \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(x.im \cdot \left(1 - -0.5 \cdot \frac{x.re \cdot x.re}{x.im \cdot x.im}\right)\right)}^{y.re} \]
                                  8. Applied rewrites30.9%

                                    \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(x.im \cdot \left(1 - -0.5 \cdot \frac{x.re \cdot x.re}{x.im \cdot x.im}\right)\right)}^{y.re} \]
                                  9. Taylor expanded in x.re around inf

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

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

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

                                      \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\frac{1}{2} \cdot \frac{x.re \cdot x.re}{x.im}\right)}^{y.re} \]
                                    4. lift-*.f6445.7

                                      \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(0.5 \cdot \frac{x.re \cdot x.re}{x.im}\right)}^{y.re} \]
                                  11. Applied rewrites45.7%

                                    \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(0.5 \cdot \frac{x.re \cdot x.re}{x.im}\right)}^{y.re} \]
                                3. Recombined 3 regimes into one program.
                                4. Add Preprocessing

                                Alternative 13: 44.0% accurate, 2.0× speedup?

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

                                  1. Initial program 36.6%

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

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

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

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

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

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

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

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

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

                                      \[\leadsto \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} \]
                                  5. Applied rewrites35.1%

                                    \[\leadsto \color{blue}{\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}} \]
                                  6. Taylor expanded in x.re around inf

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

                                      \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(x.re \cdot \left(1 + \frac{1}{2} \cdot \frac{{x.im}^{2}}{{x.re}^{2}}\right)\right)}^{y.re} \]
                                    2. fp-cancel-sign-sub-invN/A

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

                                      \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(x.re \cdot \left(1 - \left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \frac{{x.im}^{2}}{{x.re}^{2}}\right)\right)}^{y.re} \]
                                    4. metadata-evalN/A

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

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

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

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

                                      \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(x.re \cdot \left(1 - \frac{-1}{2} \cdot \frac{x.im \cdot x.im}{{x.re}^{2}}\right)\right)}^{y.re} \]
                                    9. pow2N/A

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

                                      \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(x.re \cdot \left(1 - -0.5 \cdot \frac{x.im \cdot x.im}{x.re \cdot x.re}\right)\right)}^{y.re} \]
                                  8. Applied rewrites37.1%

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

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

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

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

                                      \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\frac{1}{2} \cdot \frac{x.im \cdot x.im}{x.re}\right)}^{y.re} \]
                                    4. lift-*.f6448.7

                                      \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(0.5 \cdot \frac{x.im \cdot x.im}{x.re}\right)}^{y.re} \]
                                  11. Applied rewrites48.7%

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

                                  if -3.84999999999999993e59 < y.im < 2.45e54

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

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

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

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

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

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

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

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

                                      \[\leadsto \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} \]
                                  5. Applied rewrites59.9%

                                    \[\leadsto \color{blue}{\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}} \]
                                  6. Taylor expanded in y.re around 0

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

                                      \[\leadsto \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} \]
                                    2. lift-*.f6460.6

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

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

                                  if 2.45e54 < y.im

                                  1. Initial program 40.8%

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

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

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

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

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

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

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

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

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

                                      \[\leadsto \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} \]
                                  5. Applied rewrites36.1%

                                    \[\leadsto \color{blue}{\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}} \]
                                  6. Taylor expanded in x.im around inf

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

                                      \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(x.im \cdot \left(1 + \frac{1}{2} \cdot \frac{{x.re}^{2}}{{x.im}^{2}}\right)\right)}^{y.re} \]
                                    2. fp-cancel-sign-sub-invN/A

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

                                      \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(x.im \cdot \left(1 - \left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \frac{{x.re}^{2}}{{x.im}^{2}}\right)\right)}^{y.re} \]
                                    4. metadata-evalN/A

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

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

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

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

                                      \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(x.im \cdot \left(1 - \frac{-1}{2} \cdot \frac{x.re \cdot x.re}{{x.im}^{2}}\right)\right)}^{y.re} \]
                                    9. pow2N/A

                                      \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(x.im \cdot \left(1 - \frac{-1}{2} \cdot \frac{x.re \cdot x.re}{x.im \cdot x.im}\right)\right)}^{y.re} \]
                                    10. lift-*.f6430.9

                                      \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(x.im \cdot \left(1 - -0.5 \cdot \frac{x.re \cdot x.re}{x.im \cdot x.im}\right)\right)}^{y.re} \]
                                  8. Applied rewrites30.9%

                                    \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(x.im \cdot \left(1 - -0.5 \cdot \frac{x.re \cdot x.re}{x.im \cdot x.im}\right)\right)}^{y.re} \]
                                  9. Taylor expanded in x.re around inf

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

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

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

                                      \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\frac{1}{2} \cdot \frac{x.re \cdot x.re}{x.im}\right)}^{y.re} \]
                                    4. lift-*.f6445.7

                                      \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(0.5 \cdot \frac{x.re \cdot x.re}{x.im}\right)}^{y.re} \]
                                  11. Applied rewrites45.7%

                                    \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(0.5 \cdot \frac{x.re \cdot x.re}{x.im}\right)}^{y.re} \]
                                3. Recombined 3 regimes into one program.
                                4. Add Preprocessing

                                Alternative 14: 38.4% accurate, 2.1× speedup?

                                \[\begin{array}{l} \\ \begin{array}{l} t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\ t_1 := \sin t\_0\\ \mathbf{if}\;x.im \leq -580000:\\ \;\;\;\;t\_0 \cdot {\left(x.re \cdot \left(1 - -0.5 \cdot \frac{x.im \cdot x.im}{x.re \cdot x.re}\right)\right)}^{y.re}\\ \mathbf{elif}\;x.im \leq 720000:\\ \;\;\;\;t\_1 \cdot {x.re}^{y.re}\\ \mathbf{else}:\\ \;\;\;\;t\_1 \cdot {x.im}^{y.re}\\ \end{array} \end{array} \]
                                (FPCore (x.re x.im y.re y.im)
                                 :precision binary64
                                 (let* ((t_0 (* y.re (atan2 x.im x.re))) (t_1 (sin t_0)))
                                   (if (<= x.im -580000.0)
                                     (*
                                      t_0
                                      (pow (* x.re (- 1.0 (* -0.5 (/ (* x.im x.im) (* x.re x.re))))) y.re))
                                     (if (<= x.im 720000.0) (* t_1 (pow x.re y.re)) (* t_1 (pow x.im y.re))))))
                                double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
                                	double t_0 = y_46_re * atan2(x_46_im, x_46_re);
                                	double t_1 = sin(t_0);
                                	double tmp;
                                	if (x_46_im <= -580000.0) {
                                		tmp = t_0 * pow((x_46_re * (1.0 - (-0.5 * ((x_46_im * x_46_im) / (x_46_re * x_46_re))))), y_46_re);
                                	} else if (x_46_im <= 720000.0) {
                                		tmp = t_1 * pow(x_46_re, y_46_re);
                                	} else {
                                		tmp = t_1 * pow(x_46_im, y_46_re);
                                	}
                                	return tmp;
                                }
                                
                                module fmin_fmax_functions
                                    implicit none
                                    private
                                    public fmax
                                    public fmin
                                
                                    interface fmax
                                        module procedure fmax88
                                        module procedure fmax44
                                        module procedure fmax84
                                        module procedure fmax48
                                    end interface
                                    interface fmin
                                        module procedure fmin88
                                        module procedure fmin44
                                        module procedure fmin84
                                        module procedure fmin48
                                    end interface
                                contains
                                    real(8) function fmax88(x, y) result (res)
                                        real(8), intent (in) :: x
                                        real(8), intent (in) :: y
                                        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                    end function
                                    real(4) function fmax44(x, y) result (res)
                                        real(4), intent (in) :: x
                                        real(4), intent (in) :: y
                                        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                    end function
                                    real(8) function fmax84(x, y) result(res)
                                        real(8), intent (in) :: x
                                        real(4), intent (in) :: y
                                        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                    end function
                                    real(8) function fmax48(x, y) result(res)
                                        real(4), intent (in) :: x
                                        real(8), intent (in) :: y
                                        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                    end function
                                    real(8) function fmin88(x, y) result (res)
                                        real(8), intent (in) :: x
                                        real(8), intent (in) :: y
                                        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                    end function
                                    real(4) function fmin44(x, y) result (res)
                                        real(4), intent (in) :: x
                                        real(4), intent (in) :: y
                                        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                    end function
                                    real(8) function fmin84(x, y) result(res)
                                        real(8), intent (in) :: x
                                        real(4), intent (in) :: y
                                        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                    end function
                                    real(8) function fmin48(x, y) result(res)
                                        real(4), intent (in) :: x
                                        real(8), intent (in) :: y
                                        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                    end function
                                end module
                                
                                real(8) function code(x_46re, x_46im, y_46re, y_46im)
                                use fmin_fmax_functions
                                    real(8), intent (in) :: x_46re
                                    real(8), intent (in) :: x_46im
                                    real(8), intent (in) :: y_46re
                                    real(8), intent (in) :: y_46im
                                    real(8) :: t_0
                                    real(8) :: t_1
                                    real(8) :: tmp
                                    t_0 = y_46re * atan2(x_46im, x_46re)
                                    t_1 = sin(t_0)
                                    if (x_46im <= (-580000.0d0)) then
                                        tmp = t_0 * ((x_46re * (1.0d0 - ((-0.5d0) * ((x_46im * x_46im) / (x_46re * x_46re))))) ** y_46re)
                                    else if (x_46im <= 720000.0d0) then
                                        tmp = t_1 * (x_46re ** y_46re)
                                    else
                                        tmp = t_1 * (x_46im ** y_46re)
                                    end if
                                    code = tmp
                                end function
                                
                                public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
                                	double t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
                                	double t_1 = Math.sin(t_0);
                                	double tmp;
                                	if (x_46_im <= -580000.0) {
                                		tmp = t_0 * Math.pow((x_46_re * (1.0 - (-0.5 * ((x_46_im * x_46_im) / (x_46_re * x_46_re))))), y_46_re);
                                	} else if (x_46_im <= 720000.0) {
                                		tmp = t_1 * Math.pow(x_46_re, y_46_re);
                                	} else {
                                		tmp = t_1 * Math.pow(x_46_im, y_46_re);
                                	}
                                	return tmp;
                                }
                                
                                def code(x_46_re, x_46_im, y_46_re, y_46_im):
                                	t_0 = y_46_re * math.atan2(x_46_im, x_46_re)
                                	t_1 = math.sin(t_0)
                                	tmp = 0
                                	if x_46_im <= -580000.0:
                                		tmp = t_0 * math.pow((x_46_re * (1.0 - (-0.5 * ((x_46_im * x_46_im) / (x_46_re * x_46_re))))), y_46_re)
                                	elif x_46_im <= 720000.0:
                                		tmp = t_1 * math.pow(x_46_re, y_46_re)
                                	else:
                                		tmp = t_1 * math.pow(x_46_im, y_46_re)
                                	return tmp
                                
                                function code(x_46_re, x_46_im, y_46_re, y_46_im)
                                	t_0 = Float64(y_46_re * atan(x_46_im, x_46_re))
                                	t_1 = sin(t_0)
                                	tmp = 0.0
                                	if (x_46_im <= -580000.0)
                                		tmp = Float64(t_0 * (Float64(x_46_re * Float64(1.0 - Float64(-0.5 * Float64(Float64(x_46_im * x_46_im) / Float64(x_46_re * x_46_re))))) ^ y_46_re));
                                	elseif (x_46_im <= 720000.0)
                                		tmp = Float64(t_1 * (x_46_re ^ y_46_re));
                                	else
                                		tmp = Float64(t_1 * (x_46_im ^ y_46_re));
                                	end
                                	return tmp
                                end
                                
                                function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im)
                                	t_0 = y_46_re * atan2(x_46_im, x_46_re);
                                	t_1 = sin(t_0);
                                	tmp = 0.0;
                                	if (x_46_im <= -580000.0)
                                		tmp = t_0 * ((x_46_re * (1.0 - (-0.5 * ((x_46_im * x_46_im) / (x_46_re * x_46_re))))) ^ y_46_re);
                                	elseif (x_46_im <= 720000.0)
                                		tmp = t_1 * (x_46_re ^ y_46_re);
                                	else
                                		tmp = t_1 * (x_46_im ^ y_46_re);
                                	end
                                	tmp_2 = tmp;
                                end
                                
                                code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sin[t$95$0], $MachinePrecision]}, If[LessEqual[x$46$im, -580000.0], N[(t$95$0 * N[Power[N[(x$46$re * N[(1.0 - N[(-0.5 * N[(N[(x$46$im * x$46$im), $MachinePrecision] / N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$im, 720000.0], N[(t$95$1 * N[Power[x$46$re, y$46$re], $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision]]]]]
                                
                                \begin{array}{l}
                                
                                \\
                                \begin{array}{l}
                                t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
                                t_1 := \sin t\_0\\
                                \mathbf{if}\;x.im \leq -580000:\\
                                \;\;\;\;t\_0 \cdot {\left(x.re \cdot \left(1 - -0.5 \cdot \frac{x.im \cdot x.im}{x.re \cdot x.re}\right)\right)}^{y.re}\\
                                
                                \mathbf{elif}\;x.im \leq 720000:\\
                                \;\;\;\;t\_1 \cdot {x.re}^{y.re}\\
                                
                                \mathbf{else}:\\
                                \;\;\;\;t\_1 \cdot {x.im}^{y.re}\\
                                
                                
                                \end{array}
                                \end{array}
                                
                                Derivation
                                1. Split input into 3 regimes
                                2. if x.im < -5.8e5

                                  1. Initial program 35.7%

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

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

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

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

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

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

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

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

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

                                      \[\leadsto \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} \]
                                  5. Applied rewrites46.7%

                                    \[\leadsto \color{blue}{\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}} \]
                                  6. Taylor expanded in x.re around inf

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

                                      \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(x.re \cdot \left(1 + \frac{1}{2} \cdot \frac{{x.im}^{2}}{{x.re}^{2}}\right)\right)}^{y.re} \]
                                    2. fp-cancel-sign-sub-invN/A

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

                                      \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(x.re \cdot \left(1 - \left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \frac{{x.im}^{2}}{{x.re}^{2}}\right)\right)}^{y.re} \]
                                    4. metadata-evalN/A

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

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

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

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

                                      \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(x.re \cdot \left(1 - \frac{-1}{2} \cdot \frac{x.im \cdot x.im}{{x.re}^{2}}\right)\right)}^{y.re} \]
                                    9. pow2N/A

                                      \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(x.re \cdot \left(1 - \frac{-1}{2} \cdot \frac{x.im \cdot x.im}{x.re \cdot x.re}\right)\right)}^{y.re} \]
                                    10. lift-*.f6442.7

                                      \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(x.re \cdot \left(1 - -0.5 \cdot \frac{x.im \cdot x.im}{x.re \cdot x.re}\right)\right)}^{y.re} \]
                                  8. Applied rewrites42.7%

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

                                    \[\leadsto \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\color{blue}{\left(x.re \cdot \left(1 - \frac{-1}{2} \cdot \frac{x.im \cdot x.im}{x.re \cdot x.re}\right)\right)}}^{y.re} \]
                                  10. Step-by-step derivation
                                    1. lift-atan2.f64N/A

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

                                      \[\leadsto \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(x.re \cdot \color{blue}{\left(1 - -0.5 \cdot \frac{x.im \cdot x.im}{x.re \cdot x.re}\right)}\right)}^{y.re} \]
                                  11. Applied rewrites42.7%

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

                                  if -5.8e5 < x.im < 7.2e5

                                  1. Initial program 50.3%

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

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

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

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

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

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

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

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

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

                                      \[\leadsto \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} \]
                                  5. Applied rewrites52.8%

                                    \[\leadsto \color{blue}{\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}} \]
                                  6. Taylor expanded in x.re around inf

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

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

                                    if 7.2e5 < x.im

                                    1. Initial program 42.4%

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

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

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

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

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

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

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

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

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

                                        \[\leadsto \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} \]
                                    5. Applied rewrites49.5%

                                      \[\leadsto \color{blue}{\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}} \]
                                    6. Taylor expanded in x.re around 0

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

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

                                    Alternative 15: 39.6% accurate, 2.1× speedup?

                                    \[\begin{array}{l} \\ \begin{array}{l} t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\ t_1 := \sin t\_0\\ \mathbf{if}\;y.re \leq -0.00032:\\ \;\;\;\;t\_0 \cdot {\left(x.re \cdot \left(1 - -0.5 \cdot \frac{x.im \cdot x.im}{x.re \cdot x.re}\right)\right)}^{y.re}\\ \mathbf{elif}\;y.re \leq 0.55:\\ \;\;\;\;t\_1 \cdot 1\\ \mathbf{else}:\\ \;\;\;\;t\_1 \cdot {x.im}^{y.re}\\ \end{array} \end{array} \]
                                    (FPCore (x.re x.im y.re y.im)
                                     :precision binary64
                                     (let* ((t_0 (* y.re (atan2 x.im x.re))) (t_1 (sin t_0)))
                                       (if (<= y.re -0.00032)
                                         (*
                                          t_0
                                          (pow (* x.re (- 1.0 (* -0.5 (/ (* x.im x.im) (* x.re x.re))))) y.re))
                                         (if (<= y.re 0.55) (* t_1 1.0) (* t_1 (pow x.im y.re))))))
                                    double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
                                    	double t_0 = y_46_re * atan2(x_46_im, x_46_re);
                                    	double t_1 = sin(t_0);
                                    	double tmp;
                                    	if (y_46_re <= -0.00032) {
                                    		tmp = t_0 * pow((x_46_re * (1.0 - (-0.5 * ((x_46_im * x_46_im) / (x_46_re * x_46_re))))), y_46_re);
                                    	} else if (y_46_re <= 0.55) {
                                    		tmp = t_1 * 1.0;
                                    	} else {
                                    		tmp = t_1 * pow(x_46_im, y_46_re);
                                    	}
                                    	return tmp;
                                    }
                                    
                                    module fmin_fmax_functions
                                        implicit none
                                        private
                                        public fmax
                                        public fmin
                                    
                                        interface fmax
                                            module procedure fmax88
                                            module procedure fmax44
                                            module procedure fmax84
                                            module procedure fmax48
                                        end interface
                                        interface fmin
                                            module procedure fmin88
                                            module procedure fmin44
                                            module procedure fmin84
                                            module procedure fmin48
                                        end interface
                                    contains
                                        real(8) function fmax88(x, y) result (res)
                                            real(8), intent (in) :: x
                                            real(8), intent (in) :: y
                                            res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                        end function
                                        real(4) function fmax44(x, y) result (res)
                                            real(4), intent (in) :: x
                                            real(4), intent (in) :: y
                                            res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                        end function
                                        real(8) function fmax84(x, y) result(res)
                                            real(8), intent (in) :: x
                                            real(4), intent (in) :: y
                                            res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                        end function
                                        real(8) function fmax48(x, y) result(res)
                                            real(4), intent (in) :: x
                                            real(8), intent (in) :: y
                                            res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                        end function
                                        real(8) function fmin88(x, y) result (res)
                                            real(8), intent (in) :: x
                                            real(8), intent (in) :: y
                                            res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                        end function
                                        real(4) function fmin44(x, y) result (res)
                                            real(4), intent (in) :: x
                                            real(4), intent (in) :: y
                                            res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                        end function
                                        real(8) function fmin84(x, y) result(res)
                                            real(8), intent (in) :: x
                                            real(4), intent (in) :: y
                                            res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                        end function
                                        real(8) function fmin48(x, y) result(res)
                                            real(4), intent (in) :: x
                                            real(8), intent (in) :: y
                                            res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                        end function
                                    end module
                                    
                                    real(8) function code(x_46re, x_46im, y_46re, y_46im)
                                    use fmin_fmax_functions
                                        real(8), intent (in) :: x_46re
                                        real(8), intent (in) :: x_46im
                                        real(8), intent (in) :: y_46re
                                        real(8), intent (in) :: y_46im
                                        real(8) :: t_0
                                        real(8) :: t_1
                                        real(8) :: tmp
                                        t_0 = y_46re * atan2(x_46im, x_46re)
                                        t_1 = sin(t_0)
                                        if (y_46re <= (-0.00032d0)) then
                                            tmp = t_0 * ((x_46re * (1.0d0 - ((-0.5d0) * ((x_46im * x_46im) / (x_46re * x_46re))))) ** y_46re)
                                        else if (y_46re <= 0.55d0) then
                                            tmp = t_1 * 1.0d0
                                        else
                                            tmp = t_1 * (x_46im ** y_46re)
                                        end if
                                        code = tmp
                                    end function
                                    
                                    public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
                                    	double t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
                                    	double t_1 = Math.sin(t_0);
                                    	double tmp;
                                    	if (y_46_re <= -0.00032) {
                                    		tmp = t_0 * Math.pow((x_46_re * (1.0 - (-0.5 * ((x_46_im * x_46_im) / (x_46_re * x_46_re))))), y_46_re);
                                    	} else if (y_46_re <= 0.55) {
                                    		tmp = t_1 * 1.0;
                                    	} else {
                                    		tmp = t_1 * Math.pow(x_46_im, y_46_re);
                                    	}
                                    	return tmp;
                                    }
                                    
                                    def code(x_46_re, x_46_im, y_46_re, y_46_im):
                                    	t_0 = y_46_re * math.atan2(x_46_im, x_46_re)
                                    	t_1 = math.sin(t_0)
                                    	tmp = 0
                                    	if y_46_re <= -0.00032:
                                    		tmp = t_0 * math.pow((x_46_re * (1.0 - (-0.5 * ((x_46_im * x_46_im) / (x_46_re * x_46_re))))), y_46_re)
                                    	elif y_46_re <= 0.55:
                                    		tmp = t_1 * 1.0
                                    	else:
                                    		tmp = t_1 * math.pow(x_46_im, y_46_re)
                                    	return tmp
                                    
                                    function code(x_46_re, x_46_im, y_46_re, y_46_im)
                                    	t_0 = Float64(y_46_re * atan(x_46_im, x_46_re))
                                    	t_1 = sin(t_0)
                                    	tmp = 0.0
                                    	if (y_46_re <= -0.00032)
                                    		tmp = Float64(t_0 * (Float64(x_46_re * Float64(1.0 - Float64(-0.5 * Float64(Float64(x_46_im * x_46_im) / Float64(x_46_re * x_46_re))))) ^ y_46_re));
                                    	elseif (y_46_re <= 0.55)
                                    		tmp = Float64(t_1 * 1.0);
                                    	else
                                    		tmp = Float64(t_1 * (x_46_im ^ y_46_re));
                                    	end
                                    	return tmp
                                    end
                                    
                                    function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im)
                                    	t_0 = y_46_re * atan2(x_46_im, x_46_re);
                                    	t_1 = sin(t_0);
                                    	tmp = 0.0;
                                    	if (y_46_re <= -0.00032)
                                    		tmp = t_0 * ((x_46_re * (1.0 - (-0.5 * ((x_46_im * x_46_im) / (x_46_re * x_46_re))))) ^ y_46_re);
                                    	elseif (y_46_re <= 0.55)
                                    		tmp = t_1 * 1.0;
                                    	else
                                    		tmp = t_1 * (x_46_im ^ y_46_re);
                                    	end
                                    	tmp_2 = tmp;
                                    end
                                    
                                    code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sin[t$95$0], $MachinePrecision]}, If[LessEqual[y$46$re, -0.00032], N[(t$95$0 * N[Power[N[(x$46$re * N[(1.0 - N[(-0.5 * N[(N[(x$46$im * x$46$im), $MachinePrecision] / N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 0.55], N[(t$95$1 * 1.0), $MachinePrecision], N[(t$95$1 * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision]]]]]
                                    
                                    \begin{array}{l}
                                    
                                    \\
                                    \begin{array}{l}
                                    t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
                                    t_1 := \sin t\_0\\
                                    \mathbf{if}\;y.re \leq -0.00032:\\
                                    \;\;\;\;t\_0 \cdot {\left(x.re \cdot \left(1 - -0.5 \cdot \frac{x.im \cdot x.im}{x.re \cdot x.re}\right)\right)}^{y.re}\\
                                    
                                    \mathbf{elif}\;y.re \leq 0.55:\\
                                    \;\;\;\;t\_1 \cdot 1\\
                                    
                                    \mathbf{else}:\\
                                    \;\;\;\;t\_1 \cdot {x.im}^{y.re}\\
                                    
                                    
                                    \end{array}
                                    \end{array}
                                    
                                    Derivation
                                    1. Split input into 3 regimes
                                    2. if y.re < -3.20000000000000026e-4

                                      1. Initial program 44.5%

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

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

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

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

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

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

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

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

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

                                          \[\leadsto \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} \]
                                      5. Applied rewrites87.8%

                                        \[\leadsto \color{blue}{\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}} \]
                                      6. Taylor expanded in x.re around inf

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

                                          \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(x.re \cdot \left(1 + \frac{1}{2} \cdot \frac{{x.im}^{2}}{{x.re}^{2}}\right)\right)}^{y.re} \]
                                        2. fp-cancel-sign-sub-invN/A

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

                                          \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(x.re \cdot \left(1 - \left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \frac{{x.im}^{2}}{{x.re}^{2}}\right)\right)}^{y.re} \]
                                        4. metadata-evalN/A

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

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

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

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

                                          \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(x.re \cdot \left(1 - \frac{-1}{2} \cdot \frac{x.im \cdot x.im}{{x.re}^{2}}\right)\right)}^{y.re} \]
                                        9. pow2N/A

                                          \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(x.re \cdot \left(1 - \frac{-1}{2} \cdot \frac{x.im \cdot x.im}{x.re \cdot x.re}\right)\right)}^{y.re} \]
                                        10. lift-*.f6472.5

                                          \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(x.re \cdot \left(1 - -0.5 \cdot \frac{x.im \cdot x.im}{x.re \cdot x.re}\right)\right)}^{y.re} \]
                                      8. Applied rewrites72.5%

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

                                        \[\leadsto \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\color{blue}{\left(x.re \cdot \left(1 - \frac{-1}{2} \cdot \frac{x.im \cdot x.im}{x.re \cdot x.re}\right)\right)}}^{y.re} \]
                                      10. Step-by-step derivation
                                        1. lift-atan2.f64N/A

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

                                          \[\leadsto \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(x.re \cdot \color{blue}{\left(1 - -0.5 \cdot \frac{x.im \cdot x.im}{x.re \cdot x.re}\right)}\right)}^{y.re} \]
                                      11. Applied rewrites74.0%

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

                                      if -3.20000000000000026e-4 < y.re < 0.55000000000000004

                                      1. Initial program 46.8%

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

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

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

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

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

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

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

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

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

                                          \[\leadsto \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} \]
                                      5. Applied rewrites23.6%

                                        \[\leadsto \color{blue}{\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}} \]
                                      6. Taylor expanded in y.re around 0

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

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

                                        if 0.55000000000000004 < y.re

                                        1. Initial program 40.0%

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

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

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

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

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

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

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

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

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

                                            \[\leadsto \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} \]
                                        5. Applied rewrites72.8%

                                          \[\leadsto \color{blue}{\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}} \]
                                        6. Taylor expanded in x.re around 0

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

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

                                        Alternative 16: 43.8% accurate, 2.1× speedup?

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

                                          1. Initial program 40.1%

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

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

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

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

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

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

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

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

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

                                              \[\leadsto \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} \]
                                          5. Applied rewrites38.8%

                                            \[\leadsto \color{blue}{\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}} \]
                                          6. Taylor expanded in x.re around inf

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

                                              \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(x.re \cdot \left(1 + \frac{1}{2} \cdot \frac{{x.im}^{2}}{{x.re}^{2}}\right)\right)}^{y.re} \]
                                            2. fp-cancel-sign-sub-invN/A

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

                                              \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(x.re \cdot \left(1 - \left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \frac{{x.im}^{2}}{{x.re}^{2}}\right)\right)}^{y.re} \]
                                            4. metadata-evalN/A

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

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

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

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

                                              \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(x.re \cdot \left(1 - \frac{-1}{2} \cdot \frac{x.im \cdot x.im}{{x.re}^{2}}\right)\right)}^{y.re} \]
                                            9. pow2N/A

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

                                              \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(x.re \cdot \left(1 - -0.5 \cdot \frac{x.im \cdot x.im}{x.re \cdot x.re}\right)\right)}^{y.re} \]
                                          8. Applied rewrites42.2%

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

                                            \[\leadsto \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\color{blue}{\left(x.re \cdot \left(1 - \frac{-1}{2} \cdot \frac{x.im \cdot x.im}{x.re \cdot x.re}\right)\right)}}^{y.re} \]
                                          10. Step-by-step derivation
                                            1. lift-atan2.f64N/A

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

                                              \[\leadsto \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(x.re \cdot \color{blue}{\left(1 - -0.5 \cdot \frac{x.im \cdot x.im}{x.re \cdot x.re}\right)}\right)}^{y.re} \]
                                          11. Applied rewrites35.5%

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

                                          if -1.2e17 < y.im

                                          1. Initial program 46.2%

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

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

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

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

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

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

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

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

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

                                              \[\leadsto \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} \]
                                          5. Applied rewrites54.0%

                                            \[\leadsto \color{blue}{\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}} \]
                                          6. Taylor expanded in y.re around 0

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

                                              \[\leadsto \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} \]
                                            2. lift-*.f6454.1

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

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

                                        Alternative 17: 36.4% accurate, 2.6× speedup?

                                        \[\begin{array}{l} \\ \begin{array}{l} t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\ \mathbf{if}\;y.re \leq -3600000 \lor \neg \left(y.re \leq 1.18 \cdot 10^{+24}\right):\\ \;\;\;\;t\_0 \cdot {\left(x.im \cdot \left(1 - -0.5 \cdot \frac{x.re \cdot x.re}{x.im \cdot x.im}\right)\right)}^{y.re}\\ \mathbf{else}:\\ \;\;\;\;\sin t\_0 \cdot 1\\ \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 (or (<= y.re -3600000.0) (not (<= y.re 1.18e+24)))
                                             (*
                                              t_0
                                              (pow (* x.im (- 1.0 (* -0.5 (/ (* x.re x.re) (* x.im x.im))))) y.re))
                                             (* (sin t_0) 1.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 ((y_46_re <= -3600000.0) || !(y_46_re <= 1.18e+24)) {
                                        		tmp = t_0 * pow((x_46_im * (1.0 - (-0.5 * ((x_46_re * x_46_re) / (x_46_im * x_46_im))))), y_46_re);
                                        	} else {
                                        		tmp = sin(t_0) * 1.0;
                                        	}
                                        	return tmp;
                                        }
                                        
                                        module fmin_fmax_functions
                                            implicit none
                                            private
                                            public fmax
                                            public fmin
                                        
                                            interface fmax
                                                module procedure fmax88
                                                module procedure fmax44
                                                module procedure fmax84
                                                module procedure fmax48
                                            end interface
                                            interface fmin
                                                module procedure fmin88
                                                module procedure fmin44
                                                module procedure fmin84
                                                module procedure fmin48
                                            end interface
                                        contains
                                            real(8) function fmax88(x, y) result (res)
                                                real(8), intent (in) :: x
                                                real(8), intent (in) :: y
                                                res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                            end function
                                            real(4) function fmax44(x, y) result (res)
                                                real(4), intent (in) :: x
                                                real(4), intent (in) :: y
                                                res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                            end function
                                            real(8) function fmax84(x, y) result(res)
                                                real(8), intent (in) :: x
                                                real(4), intent (in) :: y
                                                res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                            end function
                                            real(8) function fmax48(x, y) result(res)
                                                real(4), intent (in) :: x
                                                real(8), intent (in) :: y
                                                res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                            end function
                                            real(8) function fmin88(x, y) result (res)
                                                real(8), intent (in) :: x
                                                real(8), intent (in) :: y
                                                res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                            end function
                                            real(4) function fmin44(x, y) result (res)
                                                real(4), intent (in) :: x
                                                real(4), intent (in) :: y
                                                res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                            end function
                                            real(8) function fmin84(x, y) result(res)
                                                real(8), intent (in) :: x
                                                real(4), intent (in) :: y
                                                res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                            end function
                                            real(8) function fmin48(x, y) result(res)
                                                real(4), intent (in) :: x
                                                real(8), intent (in) :: y
                                                res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                            end function
                                        end module
                                        
                                        real(8) function code(x_46re, x_46im, y_46re, y_46im)
                                        use fmin_fmax_functions
                                            real(8), intent (in) :: x_46re
                                            real(8), intent (in) :: x_46im
                                            real(8), intent (in) :: y_46re
                                            real(8), intent (in) :: y_46im
                                            real(8) :: t_0
                                            real(8) :: tmp
                                            t_0 = y_46re * atan2(x_46im, x_46re)
                                            if ((y_46re <= (-3600000.0d0)) .or. (.not. (y_46re <= 1.18d+24))) then
                                                tmp = t_0 * ((x_46im * (1.0d0 - ((-0.5d0) * ((x_46re * x_46re) / (x_46im * x_46im))))) ** y_46re)
                                            else
                                                tmp = sin(t_0) * 1.0d0
                                            end if
                                            code = tmp
                                        end function
                                        
                                        public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
                                        	double t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
                                        	double tmp;
                                        	if ((y_46_re <= -3600000.0) || !(y_46_re <= 1.18e+24)) {
                                        		tmp = t_0 * Math.pow((x_46_im * (1.0 - (-0.5 * ((x_46_re * x_46_re) / (x_46_im * x_46_im))))), y_46_re);
                                        	} else {
                                        		tmp = Math.sin(t_0) * 1.0;
                                        	}
                                        	return tmp;
                                        }
                                        
                                        def code(x_46_re, x_46_im, y_46_re, y_46_im):
                                        	t_0 = y_46_re * math.atan2(x_46_im, x_46_re)
                                        	tmp = 0
                                        	if (y_46_re <= -3600000.0) or not (y_46_re <= 1.18e+24):
                                        		tmp = t_0 * math.pow((x_46_im * (1.0 - (-0.5 * ((x_46_re * x_46_re) / (x_46_im * x_46_im))))), y_46_re)
                                        	else:
                                        		tmp = math.sin(t_0) * 1.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 ((y_46_re <= -3600000.0) || !(y_46_re <= 1.18e+24))
                                        		tmp = Float64(t_0 * (Float64(x_46_im * Float64(1.0 - Float64(-0.5 * Float64(Float64(x_46_re * x_46_re) / Float64(x_46_im * x_46_im))))) ^ y_46_re));
                                        	else
                                        		tmp = Float64(sin(t_0) * 1.0);
                                        	end
                                        	return tmp
                                        end
                                        
                                        function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im)
                                        	t_0 = y_46_re * atan2(x_46_im, x_46_re);
                                        	tmp = 0.0;
                                        	if ((y_46_re <= -3600000.0) || ~((y_46_re <= 1.18e+24)))
                                        		tmp = t_0 * ((x_46_im * (1.0 - (-0.5 * ((x_46_re * x_46_re) / (x_46_im * x_46_im))))) ^ y_46_re);
                                        	else
                                        		tmp = sin(t_0) * 1.0;
                                        	end
                                        	tmp_2 = tmp;
                                        end
                                        
                                        code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[y$46$re, -3600000.0], N[Not[LessEqual[y$46$re, 1.18e+24]], $MachinePrecision]], N[(t$95$0 * N[Power[N[(x$46$im * N[(1.0 - N[(-0.5 * N[(N[(x$46$re * x$46$re), $MachinePrecision] / N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], N[(N[Sin[t$95$0], $MachinePrecision] * 1.0), $MachinePrecision]]]
                                        
                                        \begin{array}{l}
                                        
                                        \\
                                        \begin{array}{l}
                                        t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
                                        \mathbf{if}\;y.re \leq -3600000 \lor \neg \left(y.re \leq 1.18 \cdot 10^{+24}\right):\\
                                        \;\;\;\;t\_0 \cdot {\left(x.im \cdot \left(1 - -0.5 \cdot \frac{x.re \cdot x.re}{x.im \cdot x.im}\right)\right)}^{y.re}\\
                                        
                                        \mathbf{else}:\\
                                        \;\;\;\;\sin t\_0 \cdot 1\\
                                        
                                        
                                        \end{array}
                                        \end{array}
                                        
                                        Derivation
                                        1. Split input into 2 regimes
                                        2. if y.re < -3.6e6 or 1.17999999999999997e24 < y.re

                                          1. Initial program 41.9%

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

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

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

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

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

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

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

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

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

                                              \[\leadsto \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} \]
                                          5. Applied rewrites81.3%

                                            \[\leadsto \color{blue}{\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}} \]
                                          6. Taylor expanded in x.im around inf

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

                                              \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(x.im \cdot \left(1 + \frac{1}{2} \cdot \frac{{x.re}^{2}}{{x.im}^{2}}\right)\right)}^{y.re} \]
                                            2. fp-cancel-sign-sub-invN/A

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

                                              \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(x.im \cdot \left(1 - \left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \frac{{x.re}^{2}}{{x.im}^{2}}\right)\right)}^{y.re} \]
                                            4. metadata-evalN/A

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

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

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

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

                                              \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(x.im \cdot \left(1 - \frac{-1}{2} \cdot \frac{x.re \cdot x.re}{{x.im}^{2}}\right)\right)}^{y.re} \]
                                            9. pow2N/A

                                              \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(x.im \cdot \left(1 - \frac{-1}{2} \cdot \frac{x.re \cdot x.re}{x.im \cdot x.im}\right)\right)}^{y.re} \]
                                            10. lift-*.f6463.4

                                              \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(x.im \cdot \left(1 - -0.5 \cdot \frac{x.re \cdot x.re}{x.im \cdot x.im}\right)\right)}^{y.re} \]
                                          8. Applied rewrites63.4%

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

                                            \[\leadsto \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\color{blue}{\left(x.im \cdot \left(1 - \frac{-1}{2} \cdot \frac{x.re \cdot x.re}{x.im \cdot x.im}\right)\right)}}^{y.re} \]
                                          10. Step-by-step derivation
                                            1. lift-atan2.f64N/A

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

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

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

                                          if -3.6e6 < y.re < 1.17999999999999997e24

                                          1. Initial program 47.2%

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

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

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

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

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

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

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

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

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

                                              \[\leadsto \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} \]
                                          5. Applied rewrites24.5%

                                            \[\leadsto \color{blue}{\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}} \]
                                          6. Taylor expanded in y.re around 0

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

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

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

                                          Alternative 18: 36.7% accurate, 2.6× speedup?

                                          \[\begin{array}{l} \\ \begin{array}{l} t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\ \mathbf{if}\;y.re \leq -0.00032:\\ \;\;\;\;t\_0 \cdot {\left(x.re \cdot \left(1 - -0.5 \cdot \frac{x.im \cdot x.im}{x.re \cdot x.re}\right)\right)}^{y.re}\\ \mathbf{elif}\;y.re \leq 1.18 \cdot 10^{+24}:\\ \;\;\;\;\sin t\_0 \cdot 1\\ \mathbf{else}:\\ \;\;\;\;t\_0 \cdot {\left(x.im \cdot \left(1 - -0.5 \cdot \frac{x.re \cdot x.re}{x.im \cdot x.im}\right)\right)}^{y.re}\\ \end{array} \end{array} \]
                                          (FPCore (x.re x.im y.re y.im)
                                           :precision binary64
                                           (let* ((t_0 (* y.re (atan2 x.im x.re))))
                                             (if (<= y.re -0.00032)
                                               (*
                                                t_0
                                                (pow (* x.re (- 1.0 (* -0.5 (/ (* x.im x.im) (* x.re x.re))))) y.re))
                                               (if (<= y.re 1.18e+24)
                                                 (* (sin t_0) 1.0)
                                                 (*
                                                  t_0
                                                  (pow
                                                   (* x.im (- 1.0 (* -0.5 (/ (* x.re x.re) (* x.im x.im)))))
                                                   y.re))))))
                                          double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
                                          	double t_0 = y_46_re * atan2(x_46_im, x_46_re);
                                          	double tmp;
                                          	if (y_46_re <= -0.00032) {
                                          		tmp = t_0 * pow((x_46_re * (1.0 - (-0.5 * ((x_46_im * x_46_im) / (x_46_re * x_46_re))))), y_46_re);
                                          	} else if (y_46_re <= 1.18e+24) {
                                          		tmp = sin(t_0) * 1.0;
                                          	} else {
                                          		tmp = t_0 * pow((x_46_im * (1.0 - (-0.5 * ((x_46_re * x_46_re) / (x_46_im * x_46_im))))), y_46_re);
                                          	}
                                          	return tmp;
                                          }
                                          
                                          module fmin_fmax_functions
                                              implicit none
                                              private
                                              public fmax
                                              public fmin
                                          
                                              interface fmax
                                                  module procedure fmax88
                                                  module procedure fmax44
                                                  module procedure fmax84
                                                  module procedure fmax48
                                              end interface
                                              interface fmin
                                                  module procedure fmin88
                                                  module procedure fmin44
                                                  module procedure fmin84
                                                  module procedure fmin48
                                              end interface
                                          contains
                                              real(8) function fmax88(x, y) result (res)
                                                  real(8), intent (in) :: x
                                                  real(8), intent (in) :: y
                                                  res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                              end function
                                              real(4) function fmax44(x, y) result (res)
                                                  real(4), intent (in) :: x
                                                  real(4), intent (in) :: y
                                                  res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                              end function
                                              real(8) function fmax84(x, y) result(res)
                                                  real(8), intent (in) :: x
                                                  real(4), intent (in) :: y
                                                  res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                              end function
                                              real(8) function fmax48(x, y) result(res)
                                                  real(4), intent (in) :: x
                                                  real(8), intent (in) :: y
                                                  res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                              end function
                                              real(8) function fmin88(x, y) result (res)
                                                  real(8), intent (in) :: x
                                                  real(8), intent (in) :: y
                                                  res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                              end function
                                              real(4) function fmin44(x, y) result (res)
                                                  real(4), intent (in) :: x
                                                  real(4), intent (in) :: y
                                                  res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                              end function
                                              real(8) function fmin84(x, y) result(res)
                                                  real(8), intent (in) :: x
                                                  real(4), intent (in) :: y
                                                  res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                              end function
                                              real(8) function fmin48(x, y) result(res)
                                                  real(4), intent (in) :: x
                                                  real(8), intent (in) :: y
                                                  res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                              end function
                                          end module
                                          
                                          real(8) function code(x_46re, x_46im, y_46re, y_46im)
                                          use fmin_fmax_functions
                                              real(8), intent (in) :: x_46re
                                              real(8), intent (in) :: x_46im
                                              real(8), intent (in) :: y_46re
                                              real(8), intent (in) :: y_46im
                                              real(8) :: t_0
                                              real(8) :: tmp
                                              t_0 = y_46re * atan2(x_46im, x_46re)
                                              if (y_46re <= (-0.00032d0)) then
                                                  tmp = t_0 * ((x_46re * (1.0d0 - ((-0.5d0) * ((x_46im * x_46im) / (x_46re * x_46re))))) ** y_46re)
                                              else if (y_46re <= 1.18d+24) then
                                                  tmp = sin(t_0) * 1.0d0
                                              else
                                                  tmp = t_0 * ((x_46im * (1.0d0 - ((-0.5d0) * ((x_46re * x_46re) / (x_46im * x_46im))))) ** y_46re)
                                              end if
                                              code = tmp
                                          end function
                                          
                                          public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
                                          	double t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
                                          	double tmp;
                                          	if (y_46_re <= -0.00032) {
                                          		tmp = t_0 * Math.pow((x_46_re * (1.0 - (-0.5 * ((x_46_im * x_46_im) / (x_46_re * x_46_re))))), y_46_re);
                                          	} else if (y_46_re <= 1.18e+24) {
                                          		tmp = Math.sin(t_0) * 1.0;
                                          	} else {
                                          		tmp = t_0 * Math.pow((x_46_im * (1.0 - (-0.5 * ((x_46_re * x_46_re) / (x_46_im * x_46_im))))), y_46_re);
                                          	}
                                          	return tmp;
                                          }
                                          
                                          def code(x_46_re, x_46_im, y_46_re, y_46_im):
                                          	t_0 = y_46_re * math.atan2(x_46_im, x_46_re)
                                          	tmp = 0
                                          	if y_46_re <= -0.00032:
                                          		tmp = t_0 * math.pow((x_46_re * (1.0 - (-0.5 * ((x_46_im * x_46_im) / (x_46_re * x_46_re))))), y_46_re)
                                          	elif y_46_re <= 1.18e+24:
                                          		tmp = math.sin(t_0) * 1.0
                                          	else:
                                          		tmp = t_0 * math.pow((x_46_im * (1.0 - (-0.5 * ((x_46_re * x_46_re) / (x_46_im * x_46_im))))), y_46_re)
                                          	return tmp
                                          
                                          function code(x_46_re, x_46_im, y_46_re, y_46_im)
                                          	t_0 = Float64(y_46_re * atan(x_46_im, x_46_re))
                                          	tmp = 0.0
                                          	if (y_46_re <= -0.00032)
                                          		tmp = Float64(t_0 * (Float64(x_46_re * Float64(1.0 - Float64(-0.5 * Float64(Float64(x_46_im * x_46_im) / Float64(x_46_re * x_46_re))))) ^ y_46_re));
                                          	elseif (y_46_re <= 1.18e+24)
                                          		tmp = Float64(sin(t_0) * 1.0);
                                          	else
                                          		tmp = Float64(t_0 * (Float64(x_46_im * Float64(1.0 - Float64(-0.5 * Float64(Float64(x_46_re * x_46_re) / Float64(x_46_im * x_46_im))))) ^ y_46_re));
                                          	end
                                          	return tmp
                                          end
                                          
                                          function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im)
                                          	t_0 = y_46_re * atan2(x_46_im, x_46_re);
                                          	tmp = 0.0;
                                          	if (y_46_re <= -0.00032)
                                          		tmp = t_0 * ((x_46_re * (1.0 - (-0.5 * ((x_46_im * x_46_im) / (x_46_re * x_46_re))))) ^ y_46_re);
                                          	elseif (y_46_re <= 1.18e+24)
                                          		tmp = sin(t_0) * 1.0;
                                          	else
                                          		tmp = t_0 * ((x_46_im * (1.0 - (-0.5 * ((x_46_re * x_46_re) / (x_46_im * x_46_im))))) ^ y_46_re);
                                          	end
                                          	tmp_2 = tmp;
                                          end
                                          
                                          code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -0.00032], N[(t$95$0 * N[Power[N[(x$46$re * N[(1.0 - N[(-0.5 * N[(N[(x$46$im * x$46$im), $MachinePrecision] / N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 1.18e+24], N[(N[Sin[t$95$0], $MachinePrecision] * 1.0), $MachinePrecision], N[(t$95$0 * N[Power[N[(x$46$im * N[(1.0 - N[(-0.5 * N[(N[(x$46$re * x$46$re), $MachinePrecision] / N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]]]]
                                          
                                          \begin{array}{l}
                                          
                                          \\
                                          \begin{array}{l}
                                          t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
                                          \mathbf{if}\;y.re \leq -0.00032:\\
                                          \;\;\;\;t\_0 \cdot {\left(x.re \cdot \left(1 - -0.5 \cdot \frac{x.im \cdot x.im}{x.re \cdot x.re}\right)\right)}^{y.re}\\
                                          
                                          \mathbf{elif}\;y.re \leq 1.18 \cdot 10^{+24}:\\
                                          \;\;\;\;\sin t\_0 \cdot 1\\
                                          
                                          \mathbf{else}:\\
                                          \;\;\;\;t\_0 \cdot {\left(x.im \cdot \left(1 - -0.5 \cdot \frac{x.re \cdot x.re}{x.im \cdot x.im}\right)\right)}^{y.re}\\
                                          
                                          
                                          \end{array}
                                          \end{array}
                                          
                                          Derivation
                                          1. Split input into 3 regimes
                                          2. if y.re < -3.20000000000000026e-4

                                            1. Initial program 44.5%

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

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

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

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

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

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

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

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

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

                                                \[\leadsto \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} \]
                                            5. Applied rewrites87.8%

                                              \[\leadsto \color{blue}{\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}} \]
                                            6. Taylor expanded in x.re around inf

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

                                                \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(x.re \cdot \left(1 + \frac{1}{2} \cdot \frac{{x.im}^{2}}{{x.re}^{2}}\right)\right)}^{y.re} \]
                                              2. fp-cancel-sign-sub-invN/A

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

                                                \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(x.re \cdot \left(1 - \left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \frac{{x.im}^{2}}{{x.re}^{2}}\right)\right)}^{y.re} \]
                                              4. metadata-evalN/A

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

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

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

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

                                                \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(x.re \cdot \left(1 - \frac{-1}{2} \cdot \frac{x.im \cdot x.im}{{x.re}^{2}}\right)\right)}^{y.re} \]
                                              9. pow2N/A

                                                \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(x.re \cdot \left(1 - \frac{-1}{2} \cdot \frac{x.im \cdot x.im}{x.re \cdot x.re}\right)\right)}^{y.re} \]
                                              10. lift-*.f6472.5

                                                \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(x.re \cdot \left(1 - -0.5 \cdot \frac{x.im \cdot x.im}{x.re \cdot x.re}\right)\right)}^{y.re} \]
                                            8. Applied rewrites72.5%

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

                                              \[\leadsto \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\color{blue}{\left(x.re \cdot \left(1 - \frac{-1}{2} \cdot \frac{x.im \cdot x.im}{x.re \cdot x.re}\right)\right)}}^{y.re} \]
                                            10. Step-by-step derivation
                                              1. lift-atan2.f64N/A

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

                                                \[\leadsto \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(x.re \cdot \color{blue}{\left(1 - -0.5 \cdot \frac{x.im \cdot x.im}{x.re \cdot x.re}\right)}\right)}^{y.re} \]
                                            11. Applied rewrites74.0%

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

                                            if -3.20000000000000026e-4 < y.re < 1.17999999999999997e24

                                            1. Initial program 46.5%

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

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

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

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

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

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

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

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

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

                                                \[\leadsto \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} \]
                                            5. Applied rewrites24.2%

                                              \[\leadsto \color{blue}{\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}} \]
                                            6. Taylor expanded in y.re around 0

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

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

                                              if 1.17999999999999997e24 < y.re

                                              1. Initial program 40.7%

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

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

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

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

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

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

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

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

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

                                                  \[\leadsto \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} \]
                                              5. Applied rewrites72.3%

                                                \[\leadsto \color{blue}{\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}} \]
                                              6. Taylor expanded in x.im around inf

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

                                                  \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(x.im \cdot \left(1 + \frac{1}{2} \cdot \frac{{x.re}^{2}}{{x.im}^{2}}\right)\right)}^{y.re} \]
                                                2. fp-cancel-sign-sub-invN/A

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

                                                  \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(x.im \cdot \left(1 - \left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \frac{{x.re}^{2}}{{x.im}^{2}}\right)\right)}^{y.re} \]
                                                4. metadata-evalN/A

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

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

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

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

                                                  \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(x.im \cdot \left(1 - \frac{-1}{2} \cdot \frac{x.re \cdot x.re}{{x.im}^{2}}\right)\right)}^{y.re} \]
                                                9. pow2N/A

                                                  \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(x.im \cdot \left(1 - \frac{-1}{2} \cdot \frac{x.re \cdot x.re}{x.im \cdot x.im}\right)\right)}^{y.re} \]
                                                10. lift-*.f6448.3

                                                  \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(x.im \cdot \left(1 - -0.5 \cdot \frac{x.re \cdot x.re}{x.im \cdot x.im}\right)\right)}^{y.re} \]
                                              8. Applied rewrites48.3%

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

                                                \[\leadsto \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\color{blue}{\left(x.im \cdot \left(1 - \frac{-1}{2} \cdot \frac{x.re \cdot x.re}{x.im \cdot x.im}\right)\right)}}^{y.re} \]
                                              10. Step-by-step derivation
                                                1. lift-atan2.f64N/A

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

                                                  \[\leadsto \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(x.im \cdot \color{blue}{\left(1 - -0.5 \cdot \frac{x.re \cdot x.re}{x.im \cdot x.im}\right)}\right)}^{y.re} \]
                                              11. Applied rewrites42.7%

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

                                            Alternative 19: 13.3% accurate, 3.2× speedup?

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

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

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

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

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

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

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

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

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

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

                                                \[\leadsto \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} \]
                                            5. Applied rewrites50.5%

                                              \[\leadsto \color{blue}{\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}} \]
                                            6. Taylor expanded in y.re around 0

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

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

                                              Alternative 20: 13.3% accurate, 6.4× speedup?

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

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

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

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

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

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

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

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

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

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

                                                  \[\leadsto \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} \]
                                              5. Applied rewrites50.5%

                                                \[\leadsto \color{blue}{\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}} \]
                                              6. Taylor expanded in y.re around 0

                                                \[\leadsto y.re \cdot \color{blue}{\tan^{-1}_* \frac{x.im}{x.re}} \]
                                              7. Step-by-step derivation
                                                1. lift-atan2.f64N/A

                                                  \[\leadsto y.re \cdot \tan^{-1}_* \frac{x.im}{x.re} \]
                                                2. lift-*.f6415.6

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

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

                                              Reproduce

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