powComplex, imaginary part

Percentage Accurate: 41.0% → 78.7%
Time: 9.9s
Alternatives: 19
Speedup: 2.2×

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

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

\mathbf{else}:\\
\;\;\;\;e^{\left(-y.im\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot t\_0\\


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

    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 rewrites58.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)} \]
      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. Applied rewrites75.1%

          \[\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 -6.29999999999999972e140 < y.im < 2.9499999999999999e172

        1. Initial program 42.2%

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

            \[\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 2.9499999999999999e172 < y.im

          1. Initial program 26.0%

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

                \[\leadsto \begin{array}{l} \mathbf{if}\;y.im \leq -6.3 \cdot 10^{+140}:\\ \;\;\;\;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{elif}\;y.im \leq 2.95 \cdot 10^{+172}:\\ \;\;\;\;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^{\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 2: 75.5% accurate, 0.8× 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 -9.5 \cdot 10^{+32} \lor \neg \left(y.im \leq 5.2 \cdot 10^{-43}\right):\\ \;\;\;\;e^{\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.re, \left(-\tan^{-1}_* \frac{x.im}{x.re}\right) \cdot y.im\right)} \cdot t\_1\\ \mathbf{else}:\\ \;\;\;\;{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \cdot \left(t\_1 + y.im \cdot \left(\cos t\_0 \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\right)\\ \end{array} \end{array} \]
              (FPCore (x.re x.im y.re y.im)
               :precision binary64
               (let* ((t_0 (* y.re (atan2 x.im x.re))) (t_1 (sin t_0)))
                 (if (or (<= y.im -9.5e+32) (not (<= y.im 5.2e-43)))
                   (*
                    (exp (fma (log (hypot x.re x.im)) y.re (* (- (atan2 x.im x.re)) y.im)))
                    t_1)
                   (*
                    (pow (hypot x.im x.re) y.re)
                    (+ t_1 (* y.im (* (cos t_0) (log (hypot x.im x.re)))))))))
              double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
              	double t_0 = y_46_re * atan2(x_46_im, x_46_re);
              	double t_1 = sin(t_0);
              	double tmp;
              	if ((y_46_im <= -9.5e+32) || !(y_46_im <= 5.2e-43)) {
              		tmp = exp(fma(log(hypot(x_46_re, x_46_im)), y_46_re, (-atan2(x_46_im, x_46_re) * y_46_im))) * t_1;
              	} else {
              		tmp = pow(hypot(x_46_im, x_46_re), y_46_re) * (t_1 + (y_46_im * (cos(t_0) * log(hypot(x_46_im, x_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 <= -9.5e+32) || !(y_46_im <= 5.2e-43))
              		tmp = Float64(exp(fma(log(hypot(x_46_re, x_46_im)), y_46_re, Float64(Float64(-atan(x_46_im, x_46_re)) * y_46_im))) * t_1);
              	else
              		tmp = Float64((hypot(x_46_im, x_46_re) ^ y_46_re) * Float64(t_1 + Float64(y_46_im * Float64(cos(t_0) * log(hypot(x_46_im, x_46_re))))));
              	end
              	return tmp
              end
              
              code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sin[t$95$0], $MachinePrecision]}, If[Or[LessEqual[y$46$im, -9.5e+32], N[Not[LessEqual[y$46$im, 5.2e-43]], $MachinePrecision]], N[(N[Exp[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$re + N[((-N[ArcTan[x$46$im / x$46$re], $MachinePrecision]) * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$1), $MachinePrecision], N[(N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * N[(t$95$1 + N[(y$46$im * N[(N[Cos[t$95$0], $MachinePrecision] * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
              
              \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 -9.5 \cdot 10^{+32} \lor \neg \left(y.im \leq 5.2 \cdot 10^{-43}\right):\\
              \;\;\;\;e^{\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.re, \left(-\tan^{-1}_* \frac{x.im}{x.re}\right) \cdot y.im\right)} \cdot t\_1\\
              
              \mathbf{else}:\\
              \;\;\;\;{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \cdot \left(t\_1 + y.im \cdot \left(\cos t\_0 \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\right)\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 2 regimes
              2. if y.im < -9.50000000000000006e32 or 5.2e-43 < y.im

                1. Initial program 34.2%

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

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

                    if -9.50000000000000006e32 < y.im < 5.2e-43

                    1. Initial program 46.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}{{\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. Applied rewrites45.3%

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

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

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

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

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

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

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

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

                          \[\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 + \color{blue}{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re}\right) \]
                        9. lift-atan2.f64N/A

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

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

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

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

                        \[\leadsto \begin{array}{l} \mathbf{if}\;y.im \leq -9.5 \cdot 10^{+32} \lor \neg \left(y.im \leq 5.2 \cdot 10^{-43}\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 \left(\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) + y.im \cdot \left(\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\right)\\ \end{array} \]
                      8. Add Preprocessing

                      Alternative 3: 75.9% 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 -2 \cdot 10^{+23} \lor \neg \left(y.im \leq 5.2 \cdot 10^{-43}\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 -2e+23) (not (<= y.im 5.2e-43)))
                           (*
                            (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 <= -2e+23) || !(y_46_im <= 5.2e-43)) {
                      		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 <= -2e+23) || !(y_46_im <= 5.2e-43))
                      		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, -2e+23], N[Not[LessEqual[y$46$im, 5.2e-43]], $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 -2 \cdot 10^{+23} \lor \neg \left(y.im \leq 5.2 \cdot 10^{-43}\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 < -1.9999999999999998e23 or 5.2e-43 < y.im

                        1. Initial program 33.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 rewrites69.1%

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

                            if -1.9999999999999998e23 < y.im < 5.2e-43

                            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 rewrites91.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.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. Applied rewrites89.7%

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

                                \[\leadsto \begin{array}{l} \mathbf{if}\;y.im \leq -2 \cdot 10^{+23} \lor \neg \left(y.im \leq 5.2 \cdot 10^{-43}\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: 72.1% accurate, 1.1× speedup?

                              \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y.im \leq -9 \cdot 10^{+26} \lor \neg \left(y.im \leq 2400\right):\\ \;\;\;\;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}:\\ \;\;\;\;{\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} \end{array} \]
                              (FPCore (x.re x.im y.re y.im)
                               :precision binary64
                               (if (or (<= y.im -9e+26) (not (<= y.im 2400.0)))
                                 (* (exp (* (- y.im) (atan2 x.im x.re))) (sin (* y.re (atan2 x.im x.re))))
                                 (*
                                  (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))))))
                              double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
                              	double tmp;
                              	if ((y_46_im <= -9e+26) || !(y_46_im <= 2400.0)) {
                              		tmp = exp((-y_46_im * atan2(x_46_im, x_46_re))) * 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(log(hypot(x_46_re, x_46_im)), 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)
                              	tmp = 0.0
                              	if ((y_46_im <= -9e+26) || !(y_46_im <= 2400.0))
                              		tmp = Float64(exp(Float64(Float64(-y_46_im) * atan(x_46_im, x_46_re))) * 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(log(hypot(x_46_re, x_46_im)), 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_] := If[Or[LessEqual[y$46$im, -9e+26], N[Not[LessEqual[y$46$im, 2400.0]], $MachinePrecision]], N[(N[Exp[N[((-y$46$im) * N[ArcTan[x$46$im / x$46$re], $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[(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]]
                              
                              \begin{array}{l}
                              
                              \\
                              \begin{array}{l}
                              \mathbf{if}\;y.im \leq -9 \cdot 10^{+26} \lor \neg \left(y.im \leq 2400\right):\\
                              \;\;\;\;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}:\\
                              \;\;\;\;{\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}
                              \end{array}
                              
                              Derivation
                              1. Split input into 2 regimes
                              2. if y.im < -8.99999999999999957e26 or 2400 < y.im

                                1. Initial program 34.2%

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

                                      \[\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)} \]
                                    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(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
                                    3. Step-by-step derivation
                                      1. Applied rewrites70.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 -8.99999999999999957e26 < y.im < 2400

                                      1. Initial program 46.0%

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

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

                                          \[\leadsto \begin{array}{l} \mathbf{if}\;y.im \leq -9 \cdot 10^{+26} \lor \neg \left(y.im \leq 2400\right):\\ \;\;\;\;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}:\\ \;\;\;\;{\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 5: 60.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)\\ \mathbf{if}\;y.re \leq -34000000000000 \lor \neg \left(y.re \leq 0.0068\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 -34000000000000.0) (not (<= y.re 0.0068)))
                                             (*
                                              (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 <= -34000000000000.0) || !(y_46_re <= 0.0068)) {
                                        		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 <= (-34000000000000.0d0)) .or. (.not. (y_46re <= 0.0068d0))) 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 <= -34000000000000.0) || !(y_46_re <= 0.0068)) {
                                        		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 <= -34000000000000.0) or not (y_46_re <= 0.0068):
                                        		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 <= -34000000000000.0) || !(y_46_re <= 0.0068))
                                        		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 <= -34000000000000.0) || ~((y_46_re <= 0.0068)))
                                        		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, -34000000000000.0], N[Not[LessEqual[y$46$re, 0.0068]], $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 -34000000000000 \lor \neg \left(y.re \leq 0.0068\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 < -3.4e13 or 0.00679999999999999962 < y.re

                                          1. Initial program 40.2%

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

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

                                            if -3.4e13 < y.re < 0.00679999999999999962

                                            1. Initial program 39.9%

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

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

                                                  \[\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)} \]
                                                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(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
                                                3. Step-by-step derivation
                                                  1. Applied rewrites57.8%

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

                                                  \[\leadsto \begin{array}{l} \mathbf{if}\;y.re \leq -34000000000000 \lor \neg \left(y.re \leq 0.0068\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 6: 57.1% accurate, 1.2× speedup?

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

                                                  1. Initial program 34.2%

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

                                                        \[\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)} \]
                                                      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(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
                                                      3. Step-by-step derivation
                                                        1. Applied rewrites70.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.9999999999999998e23 < y.im < -3.6000000000000004e-133

                                                        1. Initial program 52.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}{{\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. Applied rewrites49.4%

                                                            \[\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) \]
                                                          2. Step-by-step derivation
                                                            1. lift-+.f64N/A

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

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

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

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

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

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

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

                                                              \[\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 + \color{blue}{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re}\right) \]
                                                            9. lift-atan2.f64N/A

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

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

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

                                                            \[\leadsto {x.im}^{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) \]
                                                          5. Step-by-step derivation
                                                            1. Applied rewrites64.7%

                                                              \[\leadsto {x.im}^{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 -3.6000000000000004e-133 < y.im < 2e-255

                                                            1. Initial program 36.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. Applied rewrites72.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}} \]

                                                              if 2e-255 < y.im < 300

                                                              1. Initial program 53.1%

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

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

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

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

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

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

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

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

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

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

                                                                    \[\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 + \color{blue}{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re}\right) \]
                                                                  9. lift-atan2.f64N/A

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

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

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

                                                                  \[\leadsto {\left(-1 \cdot x.re\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) \]
                                                                5. Step-by-step derivation
                                                                  1. Applied rewrites74.8%

                                                                    \[\leadsto {\left(-1 \cdot x.re\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) \]
                                                                6. Recombined 4 regimes into one program.
                                                                7. Final simplification70.4%

                                                                  \[\leadsto \begin{array}{l} \mathbf{if}\;y.im \leq -2 \cdot 10^{+23}:\\ \;\;\;\;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 -3.6 \cdot 10^{-133}:\\ \;\;\;\;{x.im}^{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{elif}\;y.im \leq 2 \cdot 10^{-255}:\\ \;\;\;\;\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}\\ \mathbf{elif}\;y.im \leq 300:\\ \;\;\;\;{\left(-x.re\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^{\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} \]
                                                                8. Add Preprocessing

                                                                Alternative 7: 57.7% accurate, 1.3× speedup?

                                                                \[\begin{array}{l} \\ \begin{array}{l} t_0 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\ t_1 := e^{\left(-y.im\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot t\_0\\ \mathbf{if}\;y.im \leq -2 \cdot 10^{+23}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y.im \leq -3.6 \cdot 10^{-133}:\\ \;\;\;\;{x.im}^{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{elif}\;y.im \leq 380:\\ \;\;\;\;t\_0 \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \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 (* (exp (* (- y.im) (atan2 x.im x.re))) t_0)))
                                                                   (if (<= y.im -2e+23)
                                                                     t_1
                                                                     (if (<= y.im -3.6e-133)
                                                                       (*
                                                                        (pow x.im y.re)
                                                                        (sin (fma (log (hypot x.re x.im)) y.im (* (atan2 x.im x.re) y.re))))
                                                                       (if (<= y.im 380.0) (* t_0 (pow (hypot x.im x.re) y.re)) t_1)))))
                                                                double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
                                                                	double t_0 = sin((y_46_re * atan2(x_46_im, x_46_re)));
                                                                	double t_1 = exp((-y_46_im * atan2(x_46_im, x_46_re))) * t_0;
                                                                	double tmp;
                                                                	if (y_46_im <= -2e+23) {
                                                                		tmp = t_1;
                                                                	} else if (y_46_im <= -3.6e-133) {
                                                                		tmp = pow(x_46_im, y_46_re) * sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, (atan2(x_46_im, x_46_re) * y_46_re)));
                                                                	} else if (y_46_im <= 380.0) {
                                                                		tmp = t_0 * pow(hypot(x_46_im, x_46_re), y_46_re);
                                                                	} else {
                                                                		tmp = t_1;
                                                                	}
                                                                	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 = Float64(exp(Float64(Float64(-y_46_im) * atan(x_46_im, x_46_re))) * t_0)
                                                                	tmp = 0.0
                                                                	if (y_46_im <= -2e+23)
                                                                		tmp = t_1;
                                                                	elseif (y_46_im <= -3.6e-133)
                                                                		tmp = Float64((x_46_im ^ y_46_re) * sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, Float64(atan(x_46_im, x_46_re) * y_46_re))));
                                                                	elseif (y_46_im <= 380.0)
                                                                		tmp = Float64(t_0 * (hypot(x_46_im, x_46_re) ^ y_46_re));
                                                                	else
                                                                		tmp = t_1;
                                                                	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]}, Block[{t$95$1 = 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, -2e+23], t$95$1, If[LessEqual[y$46$im, -3.6e-133], N[(N[Power[x$46$im, 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], If[LessEqual[y$46$im, 380.0], N[(t$95$0 * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
                                                                
                                                                \begin{array}{l}
                                                                
                                                                \\
                                                                \begin{array}{l}
                                                                t_0 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
                                                                t_1 := e^{\left(-y.im\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot t\_0\\
                                                                \mathbf{if}\;y.im \leq -2 \cdot 10^{+23}:\\
                                                                \;\;\;\;t\_1\\
                                                                
                                                                \mathbf{elif}\;y.im \leq -3.6 \cdot 10^{-133}:\\
                                                                \;\;\;\;{x.im}^{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{elif}\;y.im \leq 380:\\
                                                                \;\;\;\;t\_0 \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
                                                                
                                                                \mathbf{else}:\\
                                                                \;\;\;\;t\_1\\
                                                                
                                                                
                                                                \end{array}
                                                                \end{array}
                                                                
                                                                Derivation
                                                                1. Split input into 3 regimes
                                                                2. if y.im < -1.9999999999999998e23 or 380 < y.im

                                                                  1. Initial program 34.2%

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

                                                                        \[\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)} \]
                                                                      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(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
                                                                      3. Step-by-step derivation
                                                                        1. Applied rewrites70.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.9999999999999998e23 < y.im < -3.6000000000000004e-133

                                                                        1. Initial program 52.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}{{\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. Applied rewrites49.4%

                                                                            \[\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) \]
                                                                          2. Step-by-step derivation
                                                                            1. lift-+.f64N/A

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

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

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

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

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

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

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

                                                                              \[\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 + \color{blue}{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re}\right) \]
                                                                            9. lift-atan2.f64N/A

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

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

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

                                                                            \[\leadsto {x.im}^{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) \]
                                                                          5. Step-by-step derivation
                                                                            1. Applied rewrites64.7%

                                                                              \[\leadsto {x.im}^{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 -3.6000000000000004e-133 < y.im < 380

                                                                            1. Initial program 43.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. Applied rewrites68.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}} \]
                                                                            5. Recombined 3 regimes into one program.
                                                                            6. Final simplification68.8%

                                                                              \[\leadsto \begin{array}{l} \mathbf{if}\;y.im \leq -2 \cdot 10^{+23}:\\ \;\;\;\;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 -3.6 \cdot 10^{-133}:\\ \;\;\;\;{x.im}^{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{elif}\;y.im \leq 380:\\ \;\;\;\;\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}\\ \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} \]
                                                                            7. Add Preprocessing

                                                                            Alternative 8: 57.1% 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.im \leq -8.8 \cdot 10^{+26} \lor \neg \left(y.im \leq 380\right):\\ \;\;\;\;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 (or (<= y.im -8.8e+26) (not (<= y.im 380.0)))
                                                                                 (* (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_im <= -8.8e+26) || !(y_46_im <= 380.0)) {
                                                                            		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;
                                                                            }
                                                                            
                                                                            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_im <= -8.8e+26) || !(y_46_im <= 380.0)) {
                                                                            		tmp = Math.exp((-y_46_im * Math.atan2(x_46_im, x_46_re))) * t_0;
                                                                            	} else {
                                                                            		tmp = t_0 * Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
                                                                            	}
                                                                            	return tmp;
                                                                            }
                                                                            
                                                                            def code(x_46_re, x_46_im, y_46_re, y_46_im):
                                                                            	t_0 = math.sin((y_46_re * math.atan2(x_46_im, x_46_re)))
                                                                            	tmp = 0
                                                                            	if (y_46_im <= -8.8e+26) or not (y_46_im <= 380.0):
                                                                            		tmp = math.exp((-y_46_im * math.atan2(x_46_im, x_46_re))) * t_0
                                                                            	else:
                                                                            		tmp = t_0 * math.pow(math.hypot(x_46_im, x_46_re), y_46_re)
                                                                            	return tmp
                                                                            
                                                                            function code(x_46_re, x_46_im, y_46_re, y_46_im)
                                                                            	t_0 = sin(Float64(y_46_re * atan(x_46_im, x_46_re)))
                                                                            	tmp = 0.0
                                                                            	if ((y_46_im <= -8.8e+26) || !(y_46_im <= 380.0))
                                                                            		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
                                                                            
                                                                            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_im <= -8.8e+26) || ~((y_46_im <= 380.0)))
                                                                            		tmp = exp((-y_46_im * atan2(x_46_im, x_46_re))) * t_0;
                                                                            	else
                                                                            		tmp = t_0 * (hypot(x_46_im, x_46_re) ^ y_46_re);
                                                                            	end
                                                                            	tmp_2 = tmp;
                                                                            end
                                                                            
                                                                            code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[Or[LessEqual[y$46$im, -8.8e+26], N[Not[LessEqual[y$46$im, 380.0]], $MachinePrecision]], 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.im \leq -8.8 \cdot 10^{+26} \lor \neg \left(y.im \leq 380\right):\\
                                                                            \;\;\;\;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 2 regimes
                                                                            2. if y.im < -8.80000000000000028e26 or 380 < y.im

                                                                              1. Initial program 34.2%

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

                                                                                    \[\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)} \]
                                                                                  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(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
                                                                                  3. Step-by-step derivation
                                                                                    1. Applied rewrites70.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 -8.80000000000000028e26 < y.im < 380

                                                                                    1. Initial program 46.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. Applied rewrites61.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}} \]
                                                                                    5. Recombined 2 regimes into one program.
                                                                                    6. Final simplification66.2%

                                                                                      \[\leadsto \begin{array}{l} \mathbf{if}\;y.im \leq -8.8 \cdot 10^{+26} \lor \neg \left(y.im \leq 380\right):\\ \;\;\;\;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} \]
                                                                                    7. Add Preprocessing

                                                                                    Alternative 9: 47.9% accurate, 1.6× speedup?

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

                                                                                      1. Initial program 39.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. Applied rewrites67.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}} \]

                                                                                        if -1.06e-108 < y.re < 3.6000000000000001e-39

                                                                                        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 x.im around inf

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

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

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

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

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

                                                                                          Alternative 10: 50.1% accurate, 1.6× speedup?

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

                                                                                            1. Initial program 43.4%

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

                                                                                              \[\leadsto \color{blue}{\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. Applied rewrites49.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}} \]

                                                                                              if 4.60000000000000004e-51 < x.re

                                                                                              1. Initial program 31.0%

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

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

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

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

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

                                                                                                Alternative 11: 46.0% 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.im \leq 4 \cdot 10^{+145}:\\ \;\;\;\;t\_0 \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\ \mathbf{else}:\\ \;\;\;\;t\_0 \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot 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.im 4e+145)
                                                                                                     (* t_0 (pow (hypot x.im x.re) y.re))
                                                                                                     (* t_0 (pow (sqrt (fma x.im x.im (* x.re 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_im <= 4e+145) {
                                                                                                		tmp = t_0 * pow(hypot(x_46_im, x_46_re), y_46_re);
                                                                                                	} else {
                                                                                                		tmp = t_0 * pow(sqrt(fma(x_46_im, x_46_im, (x_46_re * 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_im <= 4e+145)
                                                                                                		tmp = Float64(t_0 * (hypot(x_46_im, x_46_re) ^ y_46_re));
                                                                                                	else
                                                                                                		tmp = Float64(t_0 * (sqrt(fma(x_46_im, x_46_im, Float64(x_46_re * 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$im, 4e+145], 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$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]]]
                                                                                                
                                                                                                \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 4 \cdot 10^{+145}:\\
                                                                                                \;\;\;\;t\_0 \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
                                                                                                
                                                                                                \mathbf{else}:\\
                                                                                                \;\;\;\;t\_0 \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{y.re}\\
                                                                                                
                                                                                                
                                                                                                \end{array}
                                                                                                \end{array}
                                                                                                
                                                                                                Derivation
                                                                                                1. Split input into 2 regimes
                                                                                                2. if y.im < 4e145

                                                                                                  1. Initial program 42.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. Applied rewrites51.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}} \]

                                                                                                    if 4e145 < y.im

                                                                                                    1. Initial program 27.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. Applied rewrites35.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}} \]
                                                                                                      2. Step-by-step derivation
                                                                                                        1. Applied rewrites48.7%

                                                                                                          \[\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} \]
                                                                                                      3. Recombined 2 regimes into one program.
                                                                                                      4. Add Preprocessing

                                                                                                      Alternative 12: 47.2% 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 -2.3 \cdot 10^{-123} \lor \neg \left(y.im \leq 10^{+18}\right):\\ \;\;\;\;\sin t\_0 \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, 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 (or (<= y.im -2.3e-123) (not (<= y.im 1e+18)))
                                                                                                           (* (sin t_0) (pow (sqrt (fma 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 <= -2.3e-123) || !(y_46_im <= 1e+18)) {
                                                                                                      		tmp = sin(t_0) * pow(sqrt(fma(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;
                                                                                                      }
                                                                                                      
                                                                                                      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 <= -2.3e-123) || !(y_46_im <= 1e+18))
                                                                                                      		tmp = Float64(sin(t_0) * (sqrt(fma(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
                                                                                                      
                                                                                                      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, -2.3e-123], N[Not[LessEqual[y$46$im, 1e+18]], $MachinePrecision]], N[(N[Sin[t$95$0], $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[(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 -2.3 \cdot 10^{-123} \lor \neg \left(y.im \leq 10^{+18}\right):\\
                                                                                                      \;\;\;\;\sin t\_0 \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, 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 < -2.29999999999999987e-123 or 1e18 < y.im

                                                                                                        1. Initial program 39.0%

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

                                                                                                              \[\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 -2.29999999999999987e-123 < y.im < 1e18

                                                                                                            1. Initial program 41.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. Applied rewrites65.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}} \]
                                                                                                              2. 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} \]
                                                                                                              3. Step-by-step derivation
                                                                                                                1. 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} \]
                                                                                                              4. Recombined 2 regimes into one program.
                                                                                                              5. Final simplification51.7%

                                                                                                                \[\leadsto \begin{array}{l} \mathbf{if}\;y.im \leq -2.3 \cdot 10^{-123} \lor \neg \left(y.im \leq 10^{+18}\right):\\ \;\;\;\;\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}:\\ \;\;\;\;\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 13: 39.2% 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 -34000000000000:\\ \;\;\;\;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 520000000:\\ \;\;\;\;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 -34000000000000.0)
                                                                                                                   (*
                                                                                                                    t_0
                                                                                                                    (pow (* x.re (+ 1.0 (* 0.5 (/ (* x.im x.im) (* x.re x.re))))) y.re))
                                                                                                                   (if (<= y.re 520000000.0) (* 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 <= -34000000000000.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 (y_46_re <= 520000000.0) {
                                                                                                              		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 <= (-34000000000000.0d0)) then
                                                                                                                      tmp = t_0 * ((x_46re * (1.0d0 + (0.5d0 * ((x_46im * x_46im) / (x_46re * x_46re))))) ** y_46re)
                                                                                                                  else if (y_46re <= 520000000.0d0) 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 <= -34000000000000.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 (y_46_re <= 520000000.0) {
                                                                                                              		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 <= -34000000000000.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 y_46_re <= 520000000.0:
                                                                                                              		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 <= -34000000000000.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 (y_46_re <= 520000000.0)
                                                                                                              		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 <= -34000000000000.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 (y_46_re <= 520000000.0)
                                                                                                              		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, -34000000000000.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[y$46$re, 520000000.0], 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 -34000000000000:\\
                                                                                                              \;\;\;\;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 520000000:\\
                                                                                                              \;\;\;\;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.4e13

                                                                                                                1. Initial program 43.6%

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

                                                                                                                  \[\leadsto \color{blue}{\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. Applied rewrites89.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}} \]
                                                                                                                  2. 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} \]
                                                                                                                  3. Step-by-step derivation
                                                                                                                    1. Applied rewrites82.0%

                                                                                                                      \[\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} \]
                                                                                                                    2. 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} \]
                                                                                                                    3. Step-by-step derivation
                                                                                                                      1. Applied rewrites82.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.4e13 < y.re < 5.2e8

                                                                                                                      1. Initial program 40.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. Applied rewrites27.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}} \]
                                                                                                                        2. Taylor expanded in y.re around 0

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

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

                                                                                                                          if 5.2e8 < y.re

                                                                                                                          1. Initial program 36.1%

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

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

                                                                                                                            Alternative 14: 43.5% accurate, 2.1× speedup?

                                                                                                                            \[\begin{array}{l} \\ \begin{array}{l} t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\ \mathbf{if}\;x.im \leq -5 \cdot 10^{-53}:\\ \;\;\;\;\sin t\_0 \cdot {\left(-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 (<= x.im -5e-53)
                                                                                                                                 (* (sin t_0) (pow (- 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 (x_46_im <= -5e-53) {
                                                                                                                            		tmp = sin(t_0) * pow(-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 (x_46_im <= -5e-53) {
                                                                                                                            		tmp = Math.sin(t_0) * Math.pow(-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 x_46_im <= -5e-53:
                                                                                                                            		tmp = math.sin(t_0) * math.pow(-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 (x_46_im <= -5e-53)
                                                                                                                            		tmp = Float64(sin(t_0) * (Float64(-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 (x_46_im <= -5e-53)
                                                                                                                            		tmp = sin(t_0) * (-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[LessEqual[x$46$im, -5e-53], N[(N[Sin[t$95$0], $MachinePrecision] * N[Power[(-x$46$im), 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}\;x.im \leq -5 \cdot 10^{-53}:\\
                                                                                                                            \;\;\;\;\sin t\_0 \cdot {\left(-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 x.im < -5e-53

                                                                                                                              1. Initial program 32.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. Applied rewrites52.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}} \]
                                                                                                                                2. Taylor expanded in x.im around -inf

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

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

                                                                                                                                  if -5e-53 < x.im

                                                                                                                                  1. Initial program 43.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. Applied rewrites47.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}} \]
                                                                                                                                    2. 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} \]
                                                                                                                                    3. Step-by-step derivation
                                                                                                                                      1. Applied rewrites46.9%

                                                                                                                                        \[\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} \]
                                                                                                                                    4. Recombined 2 regimes into one program.
                                                                                                                                    5. Final simplification48.9%

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

                                                                                                                                    Alternative 15: 44.0% accurate, 2.2× speedup?

                                                                                                                                    \[\begin{array}{l} \\ \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} \]
                                                                                                                                    (FPCore (x.re x.im y.re y.im)
                                                                                                                                     :precision binary64
                                                                                                                                     (* (* y.re (atan2 x.im x.re)) (pow (hypot x.im x.re) y.re)))
                                                                                                                                    double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
                                                                                                                                    	return (y_46_re * atan2(x_46_im, x_46_re)) * pow(hypot(x_46_im, x_46_re), y_46_re);
                                                                                                                                    }
                                                                                                                                    
                                                                                                                                    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)) * Math.pow(Math.hypot(x_46_im, x_46_re), y_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)) * math.pow(math.hypot(x_46_im, x_46_re), y_46_re)
                                                                                                                                    
                                                                                                                                    function code(x_46_re, x_46_im, y_46_re, y_46_im)
                                                                                                                                    	return Float64(Float64(y_46_re * atan(x_46_im, x_46_re)) * (hypot(x_46_im, x_46_re) ^ y_46_re))
                                                                                                                                    end
                                                                                                                                    
                                                                                                                                    function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im)
                                                                                                                                    	tmp = (y_46_re * atan2(x_46_im, x_46_re)) * (hypot(x_46_im, x_46_re) ^ y_46_re);
                                                                                                                                    end
                                                                                                                                    
                                                                                                                                    code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[(N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision] * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]
                                                                                                                                    
                                                                                                                                    \begin{array}{l}
                                                                                                                                    
                                                                                                                                    \\
                                                                                                                                    \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}
                                                                                                                                    
                                                                                                                                    Derivation
                                                                                                                                    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. Applied rewrites49.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}} \]
                                                                                                                                      2. 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} \]
                                                                                                                                      3. Step-by-step derivation
                                                                                                                                        1. Applied rewrites46.2%

                                                                                                                                          \[\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} \]
                                                                                                                                        2. Add Preprocessing

                                                                                                                                        Alternative 16: 36.9% 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 -34000000000000 \lor \neg \left(y.re \leq 3.4 \cdot 10^{-5}\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 -34000000000000.0) (not (<= y.re 3.4e-5)))
                                                                                                                                             (*
                                                                                                                                              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 <= -34000000000000.0) || !(y_46_re <= 3.4e-5)) {
                                                                                                                                        		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 <= (-34000000000000.0d0)) .or. (.not. (y_46re <= 3.4d-5))) 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 <= -34000000000000.0) || !(y_46_re <= 3.4e-5)) {
                                                                                                                                        		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 <= -34000000000000.0) or not (y_46_re <= 3.4e-5):
                                                                                                                                        		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 <= -34000000000000.0) || !(y_46_re <= 3.4e-5))
                                                                                                                                        		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 <= -34000000000000.0) || ~((y_46_re <= 3.4e-5)))
                                                                                                                                        		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, -34000000000000.0], N[Not[LessEqual[y$46$re, 3.4e-5]], $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 -34000000000000 \lor \neg \left(y.re \leq 3.4 \cdot 10^{-5}\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.4e13 or 3.4e-5 < y.re

                                                                                                                                          1. Initial program 40.2%

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

                                                                                                                                                \[\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} \]
                                                                                                                                              2. 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} \]
                                                                                                                                              3. Step-by-step derivation
                                                                                                                                                1. Applied rewrites62.5%

                                                                                                                                                  \[\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.4e13 < y.re < 3.4e-5

                                                                                                                                                1. Initial program 39.9%

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

                                                                                                                                                  \[\leadsto \color{blue}{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}} \]
                                                                                                                                                4. Step-by-step derivation
                                                                                                                                                  1. Applied rewrites26.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}} \]
                                                                                                                                                  2. Taylor expanded in y.re around 0

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

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

                                                                                                                                                    \[\leadsto \begin{array}{l} \mathbf{if}\;y.re \leq -34000000000000 \lor \neg \left(y.re \leq 3.4 \cdot 10^{-5}\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} \]
                                                                                                                                                  6. Add Preprocessing

                                                                                                                                                  Alternative 17: 37.3% 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 -34000000000000:\\ \;\;\;\;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 3.4 \cdot 10^{-5}:\\ \;\;\;\;\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 -34000000000000.0)
                                                                                                                                                       (*
                                                                                                                                                        t_0
                                                                                                                                                        (pow (* x.re (+ 1.0 (* 0.5 (/ (* x.im x.im) (* x.re x.re))))) y.re))
                                                                                                                                                       (if (<= y.re 3.4e-5)
                                                                                                                                                         (* (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 <= -34000000000000.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 (y_46_re <= 3.4e-5) {
                                                                                                                                                  		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 <= (-34000000000000.0d0)) then
                                                                                                                                                          tmp = t_0 * ((x_46re * (1.0d0 + (0.5d0 * ((x_46im * x_46im) / (x_46re * x_46re))))) ** y_46re)
                                                                                                                                                      else if (y_46re <= 3.4d-5) 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 <= -34000000000000.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 (y_46_re <= 3.4e-5) {
                                                                                                                                                  		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 <= -34000000000000.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 y_46_re <= 3.4e-5:
                                                                                                                                                  		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 <= -34000000000000.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 (y_46_re <= 3.4e-5)
                                                                                                                                                  		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 <= -34000000000000.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 (y_46_re <= 3.4e-5)
                                                                                                                                                  		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, -34000000000000.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[y$46$re, 3.4e-5], 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 -34000000000000:\\
                                                                                                                                                  \;\;\;\;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 3.4 \cdot 10^{-5}:\\
                                                                                                                                                  \;\;\;\;\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.4e13

                                                                                                                                                    1. Initial program 43.6%

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

                                                                                                                                                      \[\leadsto \color{blue}{\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. Applied rewrites89.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}} \]
                                                                                                                                                      2. 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} \]
                                                                                                                                                      3. Step-by-step derivation
                                                                                                                                                        1. Applied rewrites82.0%

                                                                                                                                                          \[\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} \]
                                                                                                                                                        2. 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} \]
                                                                                                                                                        3. Step-by-step derivation
                                                                                                                                                          1. Applied rewrites82.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.4e13 < y.re < 3.4e-5

                                                                                                                                                          1. Initial program 39.9%

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

                                                                                                                                                            \[\leadsto \color{blue}{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}} \]
                                                                                                                                                          4. Step-by-step derivation
                                                                                                                                                            1. Applied rewrites26.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}} \]
                                                                                                                                                            2. Taylor expanded in y.re around 0

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

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

                                                                                                                                                              if 3.4e-5 < y.re

                                                                                                                                                              1. Initial program 37.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. Applied rewrites63.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}} \]
                                                                                                                                                                2. 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} \]
                                                                                                                                                                3. Step-by-step derivation
                                                                                                                                                                  1. Applied rewrites53.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} \]
                                                                                                                                                                  2. 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} \]
                                                                                                                                                                  3. Step-by-step derivation
                                                                                                                                                                    1. Applied rewrites45.3%

                                                                                                                                                                      \[\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} \]
                                                                                                                                                                  4. Recombined 3 regimes into one program.
                                                                                                                                                                  5. Add Preprocessing

                                                                                                                                                                  Alternative 18: 13.4% 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 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. Applied rewrites49.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}} \]
                                                                                                                                                                    2. Taylor expanded in y.re around 0

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

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

                                                                                                                                                                      Alternative 19: 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 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. Applied rewrites49.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}} \]
                                                                                                                                                                        2. Taylor expanded in y.re around 0

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

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

                                                                                                                                                                          Reproduce

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