powComplex, imaginary part

Percentage Accurate: 40.2% → 64.3%
Time: 6.2s
Alternatives: 19
Speedup: 2.5×

Specification

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

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

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

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

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: 40.2% 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: 64.3% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;x.im \leq 10500000000:\\
\;\;\;\;e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot t\_1\\

\mathbf{else}:\\
\;\;\;\;e^{y.re \cdot \log x.im - t\_0} \cdot \left(\sin t\_1 + y.im \cdot \left(\cos t\_1 \cdot \log x.im\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x.im < -1.04999999999999999e-84

    1. Initial program 34.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. 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)} \]
    3. Step-by-step derivation
      1. lower-*.f64N/A

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

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

    if -1.04999999999999999e-84 < x.im < 1.05e10

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \left(\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) + y.im \cdot \left(\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot \log \left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)\right)\right) \]
      15. lift-*.f6455.6

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.05e10 < x.im

    1. Initial program 29.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. Taylor expanded in x.re around 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto e^{y.re \cdot \log x.im - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \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 x.im\right)\right) \]
      8. lift-*.f64N/A

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

        \[\leadsto e^{y.re \cdot \log x.im - y.im \cdot \tan^{-1}_* \frac{x.im}{x.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 x.im\right)\right) \]
      10. lift-log.f6477.1

        \[\leadsto e^{y.re \cdot \log x.im - y.im \cdot \tan^{-1}_* \frac{x.im}{x.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 x.im\right)\right) \]
    7. Applied rewrites77.1%

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

Alternative 2: 63.7% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;x.im \leq 1.42 \cdot 10^{+66}:\\
\;\;\;\;e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot t\_1\\

\mathbf{else}:\\
\;\;\;\;e^{y.re \cdot \log x.im - t\_0} \cdot \sin \left(\mathsf{fma}\left(y.im, \log x.im, t\_1\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x.im < -1.04999999999999999e-84

    1. Initial program 34.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. 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)} \]
    3. Step-by-step derivation
      1. lower-*.f64N/A

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

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

    if -1.04999999999999999e-84 < x.im < 1.4200000000000001e66

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
      2. lift-*.f6452.8

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

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

    if 1.4200000000000001e66 < x.im

    1. Initial program 22.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. Taylor expanded in x.re around 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 59.7% accurate, 1.1× speedup?

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

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

\mathbf{elif}\;x.im \leq 6.3 \cdot 10^{-288}:\\
\;\;\;\;e^{y.re \cdot \log x.re - t\_0} \cdot \sin \left(\mathsf{fma}\left(y.im, \log x.re, t\_2\right)\right)\\

\mathbf{elif}\;x.im \leq 1.42 \cdot 10^{+66}:\\
\;\;\;\;t\_1 \cdot t\_2\\

\mathbf{else}:\\
\;\;\;\;e^{y.re \cdot \log x.im - t\_0} \cdot \sin \left(\mathsf{fma}\left(y.im, \log x.im, t\_2\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if x.im < -5.1999999999999995e-243

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \left(\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) + y.im \cdot \left(\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot \log \left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)\right)\right) \]
      15. lift-*.f6446.5

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.1999999999999995e-243 < x.im < 6.3000000000000002e-288

    1. Initial program 41.5%

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

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

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

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

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

        \[\leadsto 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) \]
      6. lower-*.f64N/A

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

        \[\leadsto 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) \]
      8. lower-sin.f64N/A

        \[\leadsto 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) \]
      9. lower-fma.f64N/A

        \[\leadsto 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) \]
      10. lower-log.f64N/A

        \[\leadsto 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) \]
      11. lower-*.f64N/A

        \[\leadsto 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) \]
      12. lift-atan2.f6437.4

        \[\leadsto 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) \]
    4. Applied rewrites37.4%

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

    if 6.3000000000000002e-288 < x.im < 1.4200000000000001e66

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \left(\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) + y.im \cdot \left(\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot \log \left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)\right)\right) \]
      15. lift-*.f6458.0

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
      2. lift-*.f6454.9

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

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

    if 1.4200000000000001e66 < x.im

    1. Initial program 22.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. Taylor expanded in x.re around 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 59.6% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
t_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}\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;x.im \leq -1.12 \cdot 10^{-70}:\\
\;\;\;\;t\_0 \cdot \mathsf{fma}\left(-1, y.im \cdot \log \left(\frac{-1}{x.im}\right), t\_1\right)\\

\mathbf{elif}\;x.im \leq 1.42 \cdot 10^{+66}:\\
\;\;\;\;t\_0 \cdot t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x.im < -1.12e-70

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \left(\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) + y.im \cdot \left(\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot \log \left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)\right)\right) \]
      15. lift-*.f6442.2

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.12e-70 < x.im < 1.4200000000000001e66

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \left(\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) + y.im \cdot \left(\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot \log \left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)\right)\right) \]
      15. lift-*.f6456.3

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
      2. lift-*.f6452.8

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

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

    if 1.4200000000000001e66 < x.im

    1. Initial program 22.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. Taylor expanded in x.re around 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 59.0% accurate, 1.2× speedup?

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

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

\mathbf{elif}\;y.re \leq -2.45 \cdot 10^{-113}:\\
\;\;\;\;e^{-y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot t\_1\\

\mathbf{elif}\;y.re \leq 1.35:\\
\;\;\;\;t\_2 \cdot \mathsf{fma}\left(y.im, \log t\_0, t\_1\right)\\

\mathbf{else}:\\
\;\;\;\;\sin t\_1 \cdot {t\_0}^{y.re}\\


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

    1. Initial program 41.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
      2. lift-*.f6479.8

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

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

    if -2.6499999999999999e-17 < y.re < -2.4500000000000001e-113

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \left(\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) + y.im \cdot \left(\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot \log \left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)\right)\right) \]
      15. lift-*.f6440.8

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
      2. lift-*.f6442.0

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

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

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

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

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

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

        \[\leadsto e^{-y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
    13. Applied rewrites62.2%

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

    if -2.4500000000000001e-113 < y.re < 1.3500000000000001

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \left(\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) + y.im \cdot \left(\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot \log \left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)\right)\right) \]
      15. lift-*.f6443.9

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

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

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

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

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

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

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

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

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

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

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

    if 1.3500000000000001 < y.re

    1. Initial program 37.4%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\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 4 regimes into one program.
  4. Add Preprocessing

Alternative 6: 58.8% accurate, 1.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\ \mathbf{if}\;y.re \leq -2.65 \cdot 10^{-17}:\\ \;\;\;\;e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot t\_0\\ \mathbf{elif}\;y.re \leq 5.1 \cdot 10^{-14}:\\ \;\;\;\;e^{-y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot t\_0\\ \mathbf{else}:\\ \;\;\;\;\sin 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 (* y.re (atan2 x.im x.re))))
   (if (<= y.re -2.65e-17)
     (*
      (exp
       (-
        (* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.re)
        (* (atan2 x.im x.re) y.im)))
      t_0)
     (if (<= y.re 5.1e-14)
       (* (exp (- (* y.im (atan2 x.im x.re)))) t_0)
       (* (sin 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 = y_46_re * atan2(x_46_im, x_46_re);
	double tmp;
	if (y_46_re <= -2.65e-17) {
		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 if (y_46_re <= 5.1e-14) {
		tmp = exp(-(y_46_im * atan2(x_46_im, x_46_re))) * t_0;
	} else {
		tmp = sin(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 = Float64(y_46_re * atan(x_46_im, x_46_re))
	tmp = 0.0
	if (y_46_re <= -2.65e-17)
		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);
	elseif (y_46_re <= 5.1e-14)
		tmp = Float64(exp(Float64(-Float64(y_46_im * atan(x_46_im, x_46_re)))) * t_0);
	else
		tmp = Float64(sin(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[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -2.65e-17], 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], If[LessEqual[y$46$re, 5.1e-14], N[(N[Exp[(-N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision])], $MachinePrecision] * t$95$0), $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]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.re \leq -2.65 \cdot 10^{-17}:\\
\;\;\;\;e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot t\_0\\

\mathbf{elif}\;y.re \leq 5.1 \cdot 10^{-14}:\\
\;\;\;\;e^{-y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot t\_0\\

\mathbf{else}:\\
\;\;\;\;\sin 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 3 regimes
  2. if y.re < -2.6499999999999999e-17

    1. Initial program 41.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
      2. lift-*.f6479.8

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

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

    if -2.6499999999999999e-17 < y.re < 5.0999999999999997e-14

    1. Initial program 41.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \left(\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) + y.im \cdot \left(\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot \log \left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)\right)\right) \]
      15. lift-*.f6443.4

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto e^{-y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
      4. lift-exp.f6451.5

        \[\leadsto e^{-y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
    13. Applied rewrites51.5%

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

    if 5.0999999999999997e-14 < y.re

    1. Initial program 37.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. 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}} \]
    3. Step-by-step derivation
      1. lower-*.f64N/A

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\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 3 regimes into one program.
  4. Add Preprocessing

Alternative 7: 58.7% accurate, 1.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\ \mathbf{if}\;y.re \leq -2.65 \cdot 10^{-17}:\\ \;\;\;\;e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot t\_0\\ \mathbf{elif}\;y.re \leq 1.4:\\ \;\;\;\;e^{-y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot t\_0\\ \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 (* y.re (atan2 x.im x.re))))
   (if (<= y.re -2.65e-17)
     (*
      (exp
       (-
        (* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.re)
        (* (atan2 x.im x.re) y.im)))
      t_0)
     (if (<= y.re 1.4)
       (* (exp (- (* y.im (atan2 x.im x.re)))) t_0)
       (* 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 = y_46_re * atan2(x_46_im, x_46_re);
	double tmp;
	if (y_46_re <= -2.65e-17) {
		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 if (y_46_re <= 1.4) {
		tmp = exp(-(y_46_im * atan2(x_46_im, x_46_re))) * t_0;
	} 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 = Float64(y_46_re * atan(x_46_im, x_46_re))
	tmp = 0.0
	if (y_46_re <= -2.65e-17)
		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);
	elseif (y_46_re <= 1.4)
		tmp = Float64(exp(Float64(-Float64(y_46_im * atan(x_46_im, x_46_re)))) * t_0);
	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[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -2.65e-17], 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], If[LessEqual[y$46$re, 1.4], 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[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 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.re \leq -2.65 \cdot 10^{-17}:\\
\;\;\;\;e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot t\_0\\

\mathbf{elif}\;y.re \leq 1.4:\\
\;\;\;\;e^{-y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot t\_0\\

\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 3 regimes
  2. if y.re < -2.6499999999999999e-17

    1. Initial program 41.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
      2. lift-*.f6479.8

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

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

    if -2.6499999999999999e-17 < y.re < 1.3999999999999999

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \left(\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) + y.im \cdot \left(\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot \log \left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)\right)\right) \]
      15. lift-*.f6443.4

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto e^{-y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
      4. lift-exp.f6451.5

        \[\leadsto e^{-y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
    13. Applied rewrites51.5%

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

    if 1.3999999999999999 < y.re

    1. Initial program 37.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 57.7% accurate, 2.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\ t_1 := t\_0 \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{y.re}\\ \mathbf{if}\;y.re \leq -1150000000000:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y.re \leq 1.4:\\ \;\;\;\;e^{-y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot t\_0\\ \mathbf{else}:\\ \;\;\;\;t\_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)))
        (t_1 (* t_0 (pow (sqrt (fma x.im x.im (* x.re x.re))) y.re))))
   (if (<= y.re -1150000000000.0)
     t_1
     (if (<= y.re 1.4) (* (exp (- (* y.im (atan2 x.im x.re)))) t_0) t_1))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
	double t_0 = y_46_re * atan2(x_46_im, x_46_re);
	double t_1 = t_0 * pow(sqrt(fma(x_46_im, x_46_im, (x_46_re * x_46_re))), y_46_re);
	double tmp;
	if (y_46_re <= -1150000000000.0) {
		tmp = t_1;
	} else if (y_46_re <= 1.4) {
		tmp = exp(-(y_46_im * atan2(x_46_im, x_46_re))) * t_0;
	} else {
		tmp = t_1;
	}
	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 = Float64(t_0 * (sqrt(fma(x_46_im, x_46_im, Float64(x_46_re * x_46_re))) ^ y_46_re))
	tmp = 0.0
	if (y_46_re <= -1150000000000.0)
		tmp = t_1;
	elseif (y_46_re <= 1.4)
		tmp = Float64(exp(Float64(-Float64(y_46_im * atan(x_46_im, x_46_re)))) * t_0);
	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[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(t$95$0 * N[Power[N[Sqrt[N[(x$46$im * x$46$im + N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -1150000000000.0], t$95$1, If[LessEqual[y$46$re, 1.4], N[(N[Exp[(-N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision])], $MachinePrecision] * t$95$0), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := t\_0 \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{y.re}\\
\mathbf{if}\;y.re \leq -1150000000000:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y.re \leq 1.4:\\
\;\;\;\;e^{-y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot t\_0\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y.re < -1.15e12 or 1.3999999999999999 < y.re

    1. Initial program 39.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.15e12 < y.re < 1.3999999999999999

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \left(\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) + y.im \cdot \left(\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot \log \left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)\right)\right) \]
      15. lift-*.f6443.5

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto e^{-y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
    13. Applied rewrites51.2%

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

Alternative 9: 52.1% accurate, 2.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\ t_1 := \sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\\ t_2 := t\_0 \cdot {t\_1}^{y.re}\\ \mathbf{if}\;y.re \leq -1.3 \cdot 10^{-30}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;y.re \leq -2.6 \cdot 10^{-112}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;y.re \leq 55000000:\\ \;\;\;\;e^{-y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \left(y.im \cdot \log t\_1\right)\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \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 (sqrt (fma x.im x.im (* x.re x.re))))
        (t_2 (* t_0 (pow t_1 y.re))))
   (if (<= y.re -1.3e-30)
     t_2
     (if (<= y.re -2.6e-112)
       t_0
       (if (<= y.re 55000000.0)
         (* (exp (- (* y.im (atan2 x.im x.re)))) (* y.im (log t_1)))
         t_2)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
	double t_0 = y_46_re * atan2(x_46_im, x_46_re);
	double t_1 = sqrt(fma(x_46_im, x_46_im, (x_46_re * x_46_re)));
	double t_2 = t_0 * pow(t_1, y_46_re);
	double tmp;
	if (y_46_re <= -1.3e-30) {
		tmp = t_2;
	} else if (y_46_re <= -2.6e-112) {
		tmp = t_0;
	} else if (y_46_re <= 55000000.0) {
		tmp = exp(-(y_46_im * atan2(x_46_im, x_46_re))) * (y_46_im * log(t_1));
	} else {
		tmp = t_2;
	}
	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 = sqrt(fma(x_46_im, x_46_im, Float64(x_46_re * x_46_re)))
	t_2 = Float64(t_0 * (t_1 ^ y_46_re))
	tmp = 0.0
	if (y_46_re <= -1.3e-30)
		tmp = t_2;
	elseif (y_46_re <= -2.6e-112)
		tmp = t_0;
	elseif (y_46_re <= 55000000.0)
		tmp = Float64(exp(Float64(-Float64(y_46_im * atan(x_46_im, x_46_re)))) * Float64(y_46_im * log(t_1)));
	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[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sqrt[N[(x$46$im * x$46$im + N[(x$46$re * x$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(t$95$0 * N[Power[t$95$1, y$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -1.3e-30], t$95$2, If[LessEqual[y$46$re, -2.6e-112], t$95$0, If[LessEqual[y$46$re, 55000000.0], N[(N[Exp[(-N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision])], $MachinePrecision] * N[(y$46$im * N[Log[t$95$1], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := \sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\\
t_2 := t\_0 \cdot {t\_1}^{y.re}\\
\mathbf{if}\;y.re \leq -1.3 \cdot 10^{-30}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;y.re \leq -2.6 \cdot 10^{-112}:\\
\;\;\;\;t\_0\\

\mathbf{elif}\;y.re \leq 55000000:\\
\;\;\;\;e^{-y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \left(y.im \cdot \log t\_1\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y.re < -1.29999999999999993e-30 or 5.5e7 < y.re

    1. Initial program 39.3%

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

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

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

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

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

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

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

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

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

        \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{y.re} \]
      10. lift-*.f6465.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} \]
    4. Applied rewrites65.7%

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

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

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

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

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

    if -1.29999999999999993e-30 < y.re < -2.59999999999999992e-112

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

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

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

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

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

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

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

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

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

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

        \[\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} \]
    4. Applied rewrites26.6%

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

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

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

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

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

    if -2.59999999999999992e-112 < y.re < 5.5e7

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \left(\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) + y.im \cdot \left(\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot \log \left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)\right)\right) \]
      15. lift-*.f6443.9

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 46.2% accurate, 2.3× speedup?

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

\\
\begin{array}{l}
t_0 := \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{if}\;y.re \leq -5 \cdot 10^{-144}:\\
\;\;\;\;t\_0\\

\mathbf{elif}\;y.re \leq 0.52:\\
\;\;\;\;e^{-y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \left(y.im \cdot \log x.im\right)\\

\mathbf{else}:\\
\;\;\;\;t\_0\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y.re < -4.9999999999999998e-144 or 0.52000000000000002 < y.re

    1. Initial program 39.9%

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

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

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

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

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

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

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

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

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

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

        \[\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} \]
    4. Applied rewrites59.6%

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

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

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

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

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

    if -4.9999999999999998e-144 < y.re < 0.52000000000000002

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto e^{-y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \left(y.im \cdot \log x.im\right) \]
    10. Applied rewrites25.3%

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

Alternative 11: 43.1% accurate, 2.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\ \mathbf{if}\;x.im \leq -2.2 \cdot 10^{+31}:\\ \;\;\;\;t\_0 \cdot {\left(\sqrt{x.im \cdot x.im}\right)}^{y.re}\\ \mathbf{elif}\;x.im \leq 8.2 \cdot 10^{-168}:\\ \;\;\;\;t\_0 \cdot {\left(\sqrt{x.re \cdot x.re}\right)}^{y.re}\\ \mathbf{else}:\\ \;\;\;\;e^{-y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \left(y.im \cdot \log x.im\right)\\ \end{array} \end{array} \]
(FPCore (x.re x.im y.re y.im)
 :precision binary64
 (let* ((t_0 (* y.re (atan2 x.im x.re))))
   (if (<= x.im -2.2e+31)
     (* t_0 (pow (sqrt (* x.im x.im)) y.re))
     (if (<= x.im 8.2e-168)
       (* t_0 (pow (sqrt (* x.re x.re)) y.re))
       (* (exp (- (* y.im (atan2 x.im x.re)))) (* y.im (log x.im)))))))
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 <= -2.2e+31) {
		tmp = t_0 * pow(sqrt((x_46_im * x_46_im)), y_46_re);
	} else if (x_46_im <= 8.2e-168) {
		tmp = t_0 * pow(sqrt((x_46_re * x_46_re)), y_46_re);
	} else {
		tmp = exp(-(y_46_im * atan2(x_46_im, x_46_re))) * (y_46_im * log(x_46_im));
	}
	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 (x_46im <= (-2.2d+31)) then
        tmp = t_0 * (sqrt((x_46im * x_46im)) ** y_46re)
    else if (x_46im <= 8.2d-168) then
        tmp = t_0 * (sqrt((x_46re * x_46re)) ** y_46re)
    else
        tmp = exp(-(y_46im * atan2(x_46im, x_46re))) * (y_46im * log(x_46im))
    end if
    code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
	double t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
	double tmp;
	if (x_46_im <= -2.2e+31) {
		tmp = t_0 * Math.pow(Math.sqrt((x_46_im * x_46_im)), y_46_re);
	} else if (x_46_im <= 8.2e-168) {
		tmp = t_0 * Math.pow(Math.sqrt((x_46_re * x_46_re)), y_46_re);
	} else {
		tmp = Math.exp(-(y_46_im * Math.atan2(x_46_im, x_46_re))) * (y_46_im * Math.log(x_46_im));
	}
	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 <= -2.2e+31:
		tmp = t_0 * math.pow(math.sqrt((x_46_im * x_46_im)), y_46_re)
	elif x_46_im <= 8.2e-168:
		tmp = t_0 * math.pow(math.sqrt((x_46_re * x_46_re)), y_46_re)
	else:
		tmp = math.exp(-(y_46_im * math.atan2(x_46_im, x_46_re))) * (y_46_im * math.log(x_46_im))
	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 <= -2.2e+31)
		tmp = Float64(t_0 * (sqrt(Float64(x_46_im * x_46_im)) ^ y_46_re));
	elseif (x_46_im <= 8.2e-168)
		tmp = Float64(t_0 * (sqrt(Float64(x_46_re * x_46_re)) ^ y_46_re));
	else
		tmp = Float64(exp(Float64(-Float64(y_46_im * atan(x_46_im, x_46_re)))) * 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)
	t_0 = y_46_re * atan2(x_46_im, x_46_re);
	tmp = 0.0;
	if (x_46_im <= -2.2e+31)
		tmp = t_0 * (sqrt((x_46_im * x_46_im)) ^ y_46_re);
	elseif (x_46_im <= 8.2e-168)
		tmp = t_0 * (sqrt((x_46_re * x_46_re)) ^ y_46_re);
	else
		tmp = exp(-(y_46_im * atan2(x_46_im, x_46_re))) * (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_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x$46$im, -2.2e+31], N[(t$95$0 * N[Power[N[Sqrt[N[(x$46$im * x$46$im), $MachinePrecision]], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$im, 8.2e-168], N[(t$95$0 * N[Power[N[Sqrt[N[(x$46$re * x$46$re), $MachinePrecision]], $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[(y$46$im * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;x.im \leq -2.2 \cdot 10^{+31}:\\
\;\;\;\;t\_0 \cdot {\left(\sqrt{x.im \cdot x.im}\right)}^{y.re}\\

\mathbf{elif}\;x.im \leq 8.2 \cdot 10^{-168}:\\
\;\;\;\;t\_0 \cdot {\left(\sqrt{x.re \cdot x.re}\right)}^{y.re}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x.im < -2.2000000000000001e31

    1. Initial program 25.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. 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}} \]
    3. Step-by-step derivation
      1. lower-*.f64N/A

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

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

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

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

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

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

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

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

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

        \[\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} \]
    4. Applied rewrites44.2%

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

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

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

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

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

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

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

        \[\leadsto \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{x.im \cdot x.im}\right)}^{y.re} \]
    10. Applied rewrites45.2%

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

    if -2.2000000000000001e31 < x.im < 8.1999999999999996e-168

    1. Initial program 47.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{x.re \cdot x.re}\right)}^{y.re} \]
    10. Applied rewrites39.9%

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

    if 8.1999999999999996e-168 < x.im

    1. Initial program 41.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. Taylor expanded in x.re around 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 12: 40.5% accurate, 2.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\ \mathbf{if}\;x.im \leq -4.9 \cdot 10^{-94}:\\ \;\;\;\;t\_0 \cdot {\left(\sqrt{x.im \cdot x.im}\right)}^{y.re}\\ \mathbf{elif}\;x.im \leq 4.6 \cdot 10^{-169}:\\ \;\;\;\;t\_0 \cdot {\left(-1 \cdot x.re\right)}^{y.re}\\ \mathbf{else}:\\ \;\;\;\;e^{-y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \left(y.im \cdot \log x.im\right)\\ \end{array} \end{array} \]
(FPCore (x.re x.im y.re y.im)
 :precision binary64
 (let* ((t_0 (* y.re (atan2 x.im x.re))))
   (if (<= x.im -4.9e-94)
     (* t_0 (pow (sqrt (* x.im x.im)) y.re))
     (if (<= x.im 4.6e-169)
       (* t_0 (pow (* -1.0 x.re) y.re))
       (* (exp (- (* y.im (atan2 x.im x.re)))) (* y.im (log x.im)))))))
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 <= -4.9e-94) {
		tmp = t_0 * pow(sqrt((x_46_im * x_46_im)), y_46_re);
	} else if (x_46_im <= 4.6e-169) {
		tmp = t_0 * pow((-1.0 * x_46_re), y_46_re);
	} else {
		tmp = exp(-(y_46_im * atan2(x_46_im, x_46_re))) * (y_46_im * log(x_46_im));
	}
	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 (x_46im <= (-4.9d-94)) then
        tmp = t_0 * (sqrt((x_46im * x_46im)) ** y_46re)
    else if (x_46im <= 4.6d-169) then
        tmp = t_0 * (((-1.0d0) * x_46re) ** y_46re)
    else
        tmp = exp(-(y_46im * atan2(x_46im, x_46re))) * (y_46im * log(x_46im))
    end if
    code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
	double t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
	double tmp;
	if (x_46_im <= -4.9e-94) {
		tmp = t_0 * Math.pow(Math.sqrt((x_46_im * x_46_im)), y_46_re);
	} else if (x_46_im <= 4.6e-169) {
		tmp = t_0 * Math.pow((-1.0 * x_46_re), y_46_re);
	} else {
		tmp = Math.exp(-(y_46_im * Math.atan2(x_46_im, x_46_re))) * (y_46_im * Math.log(x_46_im));
	}
	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 <= -4.9e-94:
		tmp = t_0 * math.pow(math.sqrt((x_46_im * x_46_im)), y_46_re)
	elif x_46_im <= 4.6e-169:
		tmp = t_0 * math.pow((-1.0 * x_46_re), y_46_re)
	else:
		tmp = math.exp(-(y_46_im * math.atan2(x_46_im, x_46_re))) * (y_46_im * math.log(x_46_im))
	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 <= -4.9e-94)
		tmp = Float64(t_0 * (sqrt(Float64(x_46_im * x_46_im)) ^ y_46_re));
	elseif (x_46_im <= 4.6e-169)
		tmp = Float64(t_0 * (Float64(-1.0 * x_46_re) ^ y_46_re));
	else
		tmp = Float64(exp(Float64(-Float64(y_46_im * atan(x_46_im, x_46_re)))) * 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)
	t_0 = y_46_re * atan2(x_46_im, x_46_re);
	tmp = 0.0;
	if (x_46_im <= -4.9e-94)
		tmp = t_0 * (sqrt((x_46_im * x_46_im)) ^ y_46_re);
	elseif (x_46_im <= 4.6e-169)
		tmp = t_0 * ((-1.0 * x_46_re) ^ y_46_re);
	else
		tmp = exp(-(y_46_im * atan2(x_46_im, x_46_re))) * (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_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x$46$im, -4.9e-94], N[(t$95$0 * N[Power[N[Sqrt[N[(x$46$im * x$46$im), $MachinePrecision]], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$im, 4.6e-169], N[(t$95$0 * N[Power[N[(-1.0 * x$46$re), $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[(y$46$im * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;x.im \leq -4.9 \cdot 10^{-94}:\\
\;\;\;\;t\_0 \cdot {\left(\sqrt{x.im \cdot x.im}\right)}^{y.re}\\

\mathbf{elif}\;x.im \leq 4.6 \cdot 10^{-169}:\\
\;\;\;\;t\_0 \cdot {\left(-1 \cdot x.re\right)}^{y.re}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x.im < -4.89999999999999987e-94

    1. Initial program 35.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. 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}} \]
    3. Step-by-step derivation
      1. lower-*.f64N/A

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

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

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

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

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

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

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

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

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

        \[\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} \]
    4. Applied rewrites44.2%

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

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

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

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

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

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

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

        \[\leadsto \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{x.im \cdot x.im}\right)}^{y.re} \]
    10. Applied rewrites41.3%

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

    if -4.89999999999999987e-94 < x.im < 4.6000000000000002e-169

    1. Initial program 44.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. 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}} \]
    3. Step-by-step derivation
      1. lower-*.f64N/A

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

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

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

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

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

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

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

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

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

        \[\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} \]
    4. Applied rewrites41.1%

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

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

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

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

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

      \[\leadsto \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(-1 \cdot x.re\right)}^{y.re} \]
    9. Step-by-step derivation
      1. lower-*.f6436.8

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

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

    if 4.6000000000000002e-169 < x.im

    1. Initial program 41.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. Taylor expanded in x.re around 0

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

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

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

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

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

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

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

        \[\leadsto e^{y.re \cdot \log x.im - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \sin \left(y.im \cdot \log x.im + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
      8. lower-sin.f64N/A

        \[\leadsto e^{y.re \cdot \log x.im - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \sin \left(y.im \cdot \log x.im + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
      9. lower-fma.f64N/A

        \[\leadsto e^{y.re \cdot \log x.im - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \sin \left(\mathsf{fma}\left(y.im, \log x.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
      10. lower-log.f64N/A

        \[\leadsto e^{y.re \cdot \log x.im - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \sin \left(\mathsf{fma}\left(y.im, \log x.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
      11. lower-*.f64N/A

        \[\leadsto e^{y.re \cdot \log x.im - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \sin \left(\mathsf{fma}\left(y.im, \log x.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
      12. lift-atan2.f6468.2

        \[\leadsto e^{y.re \cdot \log x.im - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \sin \left(\mathsf{fma}\left(y.im, \log x.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
    4. Applied rewrites68.2%

      \[\leadsto \color{blue}{e^{y.re \cdot \log x.im - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \sin \left(\mathsf{fma}\left(y.im, \log x.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)} \]
    5. 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)} \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto e^{\mathsf{neg}\left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \cdot \sin \left(y.im \cdot \log x.im\right) \]
      2. lower-exp.f64N/A

        \[\leadsto e^{\mathsf{neg}\left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \cdot \sin \left(y.im \cdot \log x.im\right) \]
      3. lower-neg.f64N/A

        \[\leadsto e^{-y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \sin \left(y.im \cdot \log x.im\right) \]
      4. lift-atan2.f64N/A

        \[\leadsto e^{-y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \sin \left(y.im \cdot \log x.im\right) \]
      5. lift-*.f64N/A

        \[\leadsto e^{-y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \sin \left(y.im \cdot \log x.im\right) \]
      6. lower-sin.f64N/A

        \[\leadsto e^{-y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \sin \left(y.im \cdot \log x.im\right) \]
      7. lower-*.f64N/A

        \[\leadsto e^{-y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \sin \left(y.im \cdot \log x.im\right) \]
      8. lift-log.f6438.8

        \[\leadsto e^{-y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \sin \left(y.im \cdot \log x.im\right) \]
    7. Applied rewrites38.8%

      \[\leadsto e^{-y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \color{blue}{\sin \left(y.im \cdot \log x.im\right)} \]
    8. Taylor expanded in y.im around 0

      \[\leadsto e^{-y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \left(y.im \cdot \log x.im\right) \]
    9. Step-by-step derivation
      1. lift-log.f64N/A

        \[\leadsto e^{-y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \left(y.im \cdot \log x.im\right) \]
      2. lift-*.f6438.5

        \[\leadsto e^{-y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \left(y.im \cdot \log x.im\right) \]
    10. Applied rewrites38.5%

      \[\leadsto e^{-y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \left(y.im \cdot \log x.im\right) \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 13: 39.4% accurate, 2.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {x.re}^{y.re}\\ \mathbf{if}\;y.re \leq -2.15 \cdot 10^{-51}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;y.re \leq 0.0285:\\ \;\;\;\;e^{-y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \left(y.im \cdot \log x.im\right)\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
(FPCore (x.re x.im y.re y.im)
 :precision binary64
 (let* ((t_0 (* (* y.re (atan2 x.im x.re)) (pow x.re y.re))))
   (if (<= y.re -2.15e-51)
     t_0
     (if (<= y.re 0.0285)
       (* (exp (- (* y.im (atan2 x.im x.re)))) (* y.im (log x.im)))
       t_0))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
	double t_0 = (y_46_re * atan2(x_46_im, x_46_re)) * pow(x_46_re, y_46_re);
	double tmp;
	if (y_46_re <= -2.15e-51) {
		tmp = t_0;
	} else if (y_46_re <= 0.0285) {
		tmp = exp(-(y_46_im * atan2(x_46_im, x_46_re))) * (y_46_im * log(x_46_im));
	} else {
		tmp = 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 = (y_46re * atan2(x_46im, x_46re)) * (x_46re ** y_46re)
    if (y_46re <= (-2.15d-51)) then
        tmp = t_0
    else if (y_46re <= 0.0285d0) then
        tmp = exp(-(y_46im * atan2(x_46im, x_46re))) * (y_46im * log(x_46im))
    else
        tmp = 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 = (y_46_re * Math.atan2(x_46_im, x_46_re)) * Math.pow(x_46_re, y_46_re);
	double tmp;
	if (y_46_re <= -2.15e-51) {
		tmp = t_0;
	} else if (y_46_re <= 0.0285) {
		tmp = Math.exp(-(y_46_im * Math.atan2(x_46_im, x_46_re))) * (y_46_im * Math.log(x_46_im));
	} else {
		tmp = t_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)) * math.pow(x_46_re, y_46_re)
	tmp = 0
	if y_46_re <= -2.15e-51:
		tmp = t_0
	elif y_46_re <= 0.0285:
		tmp = math.exp(-(y_46_im * math.atan2(x_46_im, x_46_re))) * (y_46_im * math.log(x_46_im))
	else:
		tmp = t_0
	return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im)
	t_0 = Float64(Float64(y_46_re * atan(x_46_im, x_46_re)) * (x_46_re ^ y_46_re))
	tmp = 0.0
	if (y_46_re <= -2.15e-51)
		tmp = t_0;
	elseif (y_46_re <= 0.0285)
		tmp = Float64(exp(Float64(-Float64(y_46_im * atan(x_46_im, x_46_re)))) * Float64(y_46_im * log(x_46_im)));
	else
		tmp = t_0;
	end
	return tmp
end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im)
	t_0 = (y_46_re * atan2(x_46_im, x_46_re)) * (x_46_re ^ y_46_re);
	tmp = 0.0;
	if (y_46_re <= -2.15e-51)
		tmp = t_0;
	elseif (y_46_re <= 0.0285)
		tmp = exp(-(y_46_im * atan2(x_46_im, x_46_re))) * (y_46_im * log(x_46_im));
	else
		tmp = t_0;
	end
	tmp_2 = tmp;
end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision] * N[Power[x$46$re, y$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -2.15e-51], t$95$0, If[LessEqual[y$46$re, 0.0285], N[(N[Exp[(-N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision])], $MachinePrecision] * N[(y$46$im * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {x.re}^{y.re}\\
\mathbf{if}\;y.re \leq -2.15 \cdot 10^{-51}:\\
\;\;\;\;t\_0\\

\mathbf{elif}\;y.re \leq 0.0285:\\
\;\;\;\;e^{-y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \left(y.im \cdot \log x.im\right)\\

\mathbf{else}:\\
\;\;\;\;t\_0\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y.re < -2.1499999999999999e-51 or 0.028500000000000001 < y.re

    1. Initial program 39.6%

      \[e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \]
    2. 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}} \]
    3. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot \color{blue}{{\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}} \]
      2. lower-sin.f64N/A

        \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\color{blue}{\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}}^{y.re} \]
      3. lower-*.f64N/A

        \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{\color{blue}{{x.im}^{2} + {x.re}^{2}}}\right)}^{y.re} \]
      4. lift-atan2.f64N/A

        \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{{x.im}^{2} + \color{blue}{{x.re}^{2}}}\right)}^{y.re} \]
      5. lower-pow.f64N/A

        \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{\color{blue}{y.re}} \]
      6. lower-sqrt.f64N/A

        \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re} \]
      7. pow2N/A

        \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right)}^{y.re} \]
      8. lower-fma.f64N/A

        \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, {x.re}^{2}\right)}\right)}^{y.re} \]
      9. pow2N/A

        \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{y.re} \]
      10. lift-*.f6464.6

        \[\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} \]
    4. Applied rewrites64.6%

      \[\leadsto \color{blue}{\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}} \]
    5. Taylor expanded in y.re around 0

      \[\leadsto \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\color{blue}{\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}}^{y.re} \]
    6. Step-by-step derivation
      1. lift-atan2.f64N/A

        \[\leadsto \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} \]
      2. lift-*.f6463.5

        \[\leadsto \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{y.re} \]
    7. Applied rewrites63.5%

      \[\leadsto \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\color{blue}{\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}}^{y.re} \]
    8. Taylor expanded in x.im around 0

      \[\leadsto \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {x.re}^{\color{blue}{y.re}} \]
    9. Step-by-step derivation
      1. lower-pow.f6448.5

        \[\leadsto \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {x.re}^{y.re} \]
    10. Applied rewrites48.5%

      \[\leadsto \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {x.re}^{\color{blue}{y.re}} \]

    if -2.1499999999999999e-51 < y.re < 0.028500000000000001

    1. Initial program 41.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. Taylor expanded in x.re around 0

      \[\leadsto \color{blue}{e^{y.re \cdot \log x.im - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \sin \left(y.im \cdot \log x.im + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
    3. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto e^{y.re \cdot \log x.im - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \color{blue}{\sin \left(y.im \cdot \log x.im + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
      2. lower-exp.f64N/A

        \[\leadsto e^{y.re \cdot \log x.im - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \sin \color{blue}{\left(y.im \cdot \log x.im + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
      3. lower--.f64N/A

        \[\leadsto e^{y.re \cdot \log x.im - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \sin \left(\color{blue}{y.im \cdot \log x.im} + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
      4. lower-*.f64N/A

        \[\leadsto e^{y.re \cdot \log x.im - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \sin \left(\color{blue}{y.im} \cdot \log x.im + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
      5. lower-log.f64N/A

        \[\leadsto e^{y.re \cdot \log x.im - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \sin \left(y.im \cdot \log x.im + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
      6. lower-*.f64N/A

        \[\leadsto e^{y.re \cdot \log x.im - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \sin \left(y.im \cdot \color{blue}{\log x.im} + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
      7. lift-atan2.f64N/A

        \[\leadsto e^{y.re \cdot \log x.im - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \sin \left(y.im \cdot \log x.im + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
      8. lower-sin.f64N/A

        \[\leadsto e^{y.re \cdot \log x.im - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \sin \left(y.im \cdot \log x.im + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
      9. lower-fma.f64N/A

        \[\leadsto e^{y.re \cdot \log x.im - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \sin \left(\mathsf{fma}\left(y.im, \log x.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
      10. lower-log.f64N/A

        \[\leadsto e^{y.re \cdot \log x.im - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \sin \left(\mathsf{fma}\left(y.im, \log x.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
      11. lower-*.f64N/A

        \[\leadsto e^{y.re \cdot \log x.im - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \sin \left(\mathsf{fma}\left(y.im, \log x.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
      12. lift-atan2.f6433.6

        \[\leadsto e^{y.re \cdot \log x.im - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \sin \left(\mathsf{fma}\left(y.im, \log x.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
    4. Applied rewrites33.6%

      \[\leadsto \color{blue}{e^{y.re \cdot \log x.im - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \sin \left(\mathsf{fma}\left(y.im, \log x.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)} \]
    5. 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)} \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto e^{\mathsf{neg}\left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \cdot \sin \left(y.im \cdot \log x.im\right) \]
      2. lower-exp.f64N/A

        \[\leadsto e^{\mathsf{neg}\left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \cdot \sin \left(y.im \cdot \log x.im\right) \]
      3. lower-neg.f64N/A

        \[\leadsto e^{-y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \sin \left(y.im \cdot \log x.im\right) \]
      4. lift-atan2.f64N/A

        \[\leadsto e^{-y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \sin \left(y.im \cdot \log x.im\right) \]
      5. lift-*.f64N/A

        \[\leadsto e^{-y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \sin \left(y.im \cdot \log x.im\right) \]
      6. lower-sin.f64N/A

        \[\leadsto e^{-y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \sin \left(y.im \cdot \log x.im\right) \]
      7. lower-*.f64N/A

        \[\leadsto e^{-y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \sin \left(y.im \cdot \log x.im\right) \]
      8. lift-log.f6425.2

        \[\leadsto e^{-y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \sin \left(y.im \cdot \log x.im\right) \]
    7. Applied rewrites25.2%

      \[\leadsto e^{-y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \color{blue}{\sin \left(y.im \cdot \log x.im\right)} \]
    8. Taylor expanded in y.im around 0

      \[\leadsto e^{-y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \left(y.im \cdot \log x.im\right) \]
    9. Step-by-step derivation
      1. lift-log.f64N/A

        \[\leadsto e^{-y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \left(y.im \cdot \log x.im\right) \]
      2. lift-*.f6424.9

        \[\leadsto e^{-y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \left(y.im \cdot \log x.im\right) \]
    10. Applied rewrites24.9%

      \[\leadsto e^{-y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \left(y.im \cdot \log x.im\right) \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 14: 38.9% accurate, 2.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\ \mathbf{if}\;x.re \leq -5.5 \cdot 10^{-49}:\\ \;\;\;\;t\_0 \cdot {\left(-1 \cdot x.re\right)}^{y.re}\\ \mathbf{elif}\;x.re \leq 1.6 \cdot 10^{-135}:\\ \;\;\;\;t\_0 \cdot {x.im}^{y.re}\\ \mathbf{else}:\\ \;\;\;\;{\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{y.re} \cdot \left(y.im \cdot \log x.re\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 -5.5e-49)
     (* t_0 (pow (* -1.0 x.re) y.re))
     (if (<= x.re 1.6e-135)
       (* t_0 (pow x.im y.re))
       (*
        (pow (sqrt (fma x.im x.im (* x.re x.re))) y.re)
        (* y.im (log 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 tmp;
	if (x_46_re <= -5.5e-49) {
		tmp = t_0 * pow((-1.0 * x_46_re), y_46_re);
	} else if (x_46_re <= 1.6e-135) {
		tmp = t_0 * pow(x_46_im, y_46_re);
	} else {
		tmp = pow(sqrt(fma(x_46_im, x_46_im, (x_46_re * x_46_re))), y_46_re) * (y_46_im * log(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))
	tmp = 0.0
	if (x_46_re <= -5.5e-49)
		tmp = Float64(t_0 * (Float64(-1.0 * x_46_re) ^ y_46_re));
	elseif (x_46_re <= 1.6e-135)
		tmp = Float64(t_0 * (x_46_im ^ y_46_re));
	else
		tmp = Float64((sqrt(fma(x_46_im, x_46_im, Float64(x_46_re * x_46_re))) ^ y_46_re) * Float64(y_46_im * log(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]}, If[LessEqual[x$46$re, -5.5e-49], N[(t$95$0 * N[Power[N[(-1.0 * x$46$re), $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, 1.6e-135], N[(t$95$0 * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision], N[(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] * N[(y$46$im * N[Log[x$46$re], $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 -5.5 \cdot 10^{-49}:\\
\;\;\;\;t\_0 \cdot {\left(-1 \cdot x.re\right)}^{y.re}\\

\mathbf{elif}\;x.re \leq 1.6 \cdot 10^{-135}:\\
\;\;\;\;t\_0 \cdot {x.im}^{y.re}\\

\mathbf{else}:\\
\;\;\;\;{\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{y.re} \cdot \left(y.im \cdot \log x.re\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x.re < -5.50000000000000031e-49

    1. Initial program 32.5%

      \[e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \]
    2. 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}} \]
    3. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot \color{blue}{{\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}} \]
      2. lower-sin.f64N/A

        \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\color{blue}{\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}}^{y.re} \]
      3. lower-*.f64N/A

        \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{\color{blue}{{x.im}^{2} + {x.re}^{2}}}\right)}^{y.re} \]
      4. lift-atan2.f64N/A

        \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{{x.im}^{2} + \color{blue}{{x.re}^{2}}}\right)}^{y.re} \]
      5. lower-pow.f64N/A

        \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{\color{blue}{y.re}} \]
      6. lower-sqrt.f64N/A

        \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re} \]
      7. pow2N/A

        \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right)}^{y.re} \]
      8. lower-fma.f64N/A

        \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, {x.re}^{2}\right)}\right)}^{y.re} \]
      9. pow2N/A

        \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{y.re} \]
      10. lift-*.f6443.6

        \[\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} \]
    4. Applied rewrites43.6%

      \[\leadsto \color{blue}{\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}} \]
    5. Taylor expanded in y.re around 0

      \[\leadsto \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\color{blue}{\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}}^{y.re} \]
    6. Step-by-step derivation
      1. lift-atan2.f64N/A

        \[\leadsto \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} \]
      2. lift-*.f6442.8

        \[\leadsto \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{y.re} \]
    7. Applied rewrites42.8%

      \[\leadsto \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\color{blue}{\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}}^{y.re} \]
    8. Taylor expanded in x.re around -inf

      \[\leadsto \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(-1 \cdot x.re\right)}^{y.re} \]
    9. Step-by-step derivation
      1. lower-*.f6442.3

        \[\leadsto \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(-1 \cdot x.re\right)}^{y.re} \]
    10. Applied rewrites42.3%

      \[\leadsto \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(-1 \cdot x.re\right)}^{y.re} \]

    if -5.50000000000000031e-49 < x.re < 1.6e-135

    1. Initial program 47.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. 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}} \]
    3. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot \color{blue}{{\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}} \]
      2. lower-sin.f64N/A

        \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\color{blue}{\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}}^{y.re} \]
      3. lower-*.f64N/A

        \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{\color{blue}{{x.im}^{2} + {x.re}^{2}}}\right)}^{y.re} \]
      4. lift-atan2.f64N/A

        \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{{x.im}^{2} + \color{blue}{{x.re}^{2}}}\right)}^{y.re} \]
      5. lower-pow.f64N/A

        \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{\color{blue}{y.re}} \]
      6. lower-sqrt.f64N/A

        \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re} \]
      7. pow2N/A

        \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right)}^{y.re} \]
      8. lower-fma.f64N/A

        \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, {x.re}^{2}\right)}\right)}^{y.re} \]
      9. pow2N/A

        \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{y.re} \]
      10. lift-*.f6446.1

        \[\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} \]
    4. Applied rewrites46.1%

      \[\leadsto \color{blue}{\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}} \]
    5. Taylor expanded in y.re around 0

      \[\leadsto \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\color{blue}{\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}}^{y.re} \]
    6. Step-by-step derivation
      1. lift-atan2.f64N/A

        \[\leadsto \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} \]
      2. lift-*.f6445.8

        \[\leadsto \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{y.re} \]
    7. Applied rewrites45.8%

      \[\leadsto \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\color{blue}{\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}}^{y.re} \]
    8. Taylor expanded in x.re around 0

      \[\leadsto \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {x.im}^{y.re} \]
    9. Step-by-step derivation
      1. Applied rewrites40.0%

        \[\leadsto \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {x.im}^{y.re} \]

      if 1.6e-135 < x.re

      1. Initial program 39.3%

        \[e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \]
      2. Taylor expanded in y.im around 0

        \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \color{blue}{\left(\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) + y.im \cdot \left(\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right)} \]
      3. Step-by-step derivation
        1. lower-+.f64N/A

          \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \left(\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) + \color{blue}{y.im \cdot \left(\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)}\right) \]
        2. lower-sin.f64N/A

          \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \left(\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) + \color{blue}{y.im} \cdot \left(\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right) \]
        3. lower-*.f64N/A

          \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \left(\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) + y.im \cdot \left(\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right) \]
        4. lift-atan2.f64N/A

          \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \left(\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) + y.im \cdot \left(\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right) \]
        5. lower-*.f64N/A

          \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \left(\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) + y.im \cdot \color{blue}{\left(\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)}\right) \]
        6. lower-*.f64N/A

          \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \left(\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) + y.im \cdot \left(\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot \color{blue}{\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}\right)\right) \]
        7. lower-cos.f64N/A

          \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \left(\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) + y.im \cdot \left(\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot \log \color{blue}{\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}\right)\right) \]
        8. lower-*.f64N/A

          \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \left(\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) + y.im \cdot \left(\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot \log \left(\sqrt{\color{blue}{{x.im}^{2} + {x.re}^{2}}}\right)\right)\right) \]
        9. lift-atan2.f64N/A

          \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \left(\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) + y.im \cdot \left(\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot \log \left(\sqrt{{x.im}^{2} + \color{blue}{{x.re}^{2}}}\right)\right)\right) \]
        10. lower-log.f64N/A

          \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \left(\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) + y.im \cdot \left(\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right) \]
        11. lower-sqrt.f64N/A

          \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \left(\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) + y.im \cdot \left(\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right) \]
        12. pow2N/A

          \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \left(\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) + y.im \cdot \left(\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot \log \left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right)\right)\right) \]
        13. lower-fma.f64N/A

          \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \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{\mathsf{fma}\left(x.im, x.im, {x.re}^{2}\right)}\right)\right)\right) \]
        14. pow2N/A

          \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \left(\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) + y.im \cdot \left(\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot \log \left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)\right)\right) \]
        15. lift-*.f6445.1

          \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \left(\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) + y.im \cdot \left(\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot \log \left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)\right)\right) \]
      4. Applied rewrites45.1%

        \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \color{blue}{\left(\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) + y.im \cdot \left(\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot \log \left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)\right)\right)} \]
      5. Taylor expanded in y.re around 0

        \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \left(y.im \cdot \color{blue}{\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}\right) \]
      6. Step-by-step derivation
        1. lower-*.f64N/A

          \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right) \]
        2. pow2N/A

          \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \left(y.im \cdot \log \left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right)\right) \]
        3. pow2N/A

          \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \left(y.im \cdot \log \left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)\right) \]
        4. lower-sqrt.f64N/A

          \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \left(y.im \cdot \log \left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)\right) \]
        5. lift-fma.f64N/A

          \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \left(y.im \cdot \log \left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)\right) \]
        6. lift-*.f64N/A

          \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \left(y.im \cdot \log \left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)\right) \]
        7. lift-log.f6442.1

          \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \left(y.im \cdot \log \left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)\right) \]
      7. Applied rewrites42.1%

        \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \left(y.im \cdot \color{blue}{\log \left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}\right) \]
      8. Taylor expanded in x.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 \left(y.im \cdot \log x.re\right) \]
      9. Step-by-step derivation
        1. Applied rewrites54.2%

          \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \left(y.im \cdot \log x.re\right) \]
        2. Taylor expanded in y.im around 0

          \[\leadsto \color{blue}{{\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}} \cdot \left(y.im \cdot \log x.re\right) \]
        3. Step-by-step derivation
          1. sqrt-pow2N/A

            \[\leadsto {\left({x.im}^{2} + {x.re}^{2}\right)}^{\color{blue}{\left(\frac{y.re}{2}\right)}} \cdot \left(y.im \cdot \log x.re\right) \]
          2. pow2N/A

            \[\leadsto {\left(x.im \cdot x.im + {x.re}^{2}\right)}^{\left(\frac{y.re}{2}\right)} \cdot \left(y.im \cdot \log x.re\right) \]
          3. pow2N/A

            \[\leadsto {\left(x.im \cdot x.im + x.re \cdot x.re\right)}^{\left(\frac{y.re}{2}\right)} \cdot \left(y.im \cdot \log x.re\right) \]
          4. sqrt-pow2N/A

            \[\leadsto {\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)}^{\color{blue}{y.re}} \cdot \left(y.im \cdot \log x.re\right) \]
          5. lift-fma.f64N/A

            \[\leadsto {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{y.re} \cdot \left(y.im \cdot \log x.re\right) \]
          6. lift-*.f64N/A

            \[\leadsto {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{y.re} \cdot \left(y.im \cdot \log x.re\right) \]
          7. lift-sqrt.f64N/A

            \[\leadsto {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{y.re} \cdot \left(y.im \cdot \log x.re\right) \]
          8. lift-pow.f6446.8

            \[\leadsto {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{\color{blue}{y.re}} \cdot \left(y.im \cdot \log x.re\right) \]
        4. Applied rewrites46.8%

          \[\leadsto \color{blue}{{\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{y.re}} \cdot \left(y.im \cdot \log x.re\right) \]
      10. Recombined 3 regimes into one program.
      11. Add Preprocessing

      Alternative 15: 37.9% accurate, 2.8× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\ \mathbf{if}\;x.re \leq -3.7 \cdot 10^{+109}:\\ \;\;\;\;t\_0 \cdot {x.re}^{y.re}\\ \mathbf{elif}\;x.re \leq 1.6 \cdot 10^{-135}:\\ \;\;\;\;t\_0 \cdot {x.im}^{y.re}\\ \mathbf{else}:\\ \;\;\;\;{\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{y.re} \cdot \left(y.im \cdot \log x.re\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 -3.7e+109)
           (* t_0 (pow x.re y.re))
           (if (<= x.re 1.6e-135)
             (* t_0 (pow x.im y.re))
             (*
              (pow (sqrt (fma x.im x.im (* x.re x.re))) y.re)
              (* y.im (log 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 tmp;
      	if (x_46_re <= -3.7e+109) {
      		tmp = t_0 * pow(x_46_re, y_46_re);
      	} else if (x_46_re <= 1.6e-135) {
      		tmp = t_0 * pow(x_46_im, y_46_re);
      	} else {
      		tmp = pow(sqrt(fma(x_46_im, x_46_im, (x_46_re * x_46_re))), y_46_re) * (y_46_im * log(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))
      	tmp = 0.0
      	if (x_46_re <= -3.7e+109)
      		tmp = Float64(t_0 * (x_46_re ^ y_46_re));
      	elseif (x_46_re <= 1.6e-135)
      		tmp = Float64(t_0 * (x_46_im ^ y_46_re));
      	else
      		tmp = Float64((sqrt(fma(x_46_im, x_46_im, Float64(x_46_re * x_46_re))) ^ y_46_re) * Float64(y_46_im * log(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]}, If[LessEqual[x$46$re, -3.7e+109], N[(t$95$0 * N[Power[x$46$re, y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, 1.6e-135], N[(t$95$0 * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision], N[(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] * N[(y$46$im * N[Log[x$46$re], $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 -3.7 \cdot 10^{+109}:\\
      \;\;\;\;t\_0 \cdot {x.re}^{y.re}\\
      
      \mathbf{elif}\;x.re \leq 1.6 \cdot 10^{-135}:\\
      \;\;\;\;t\_0 \cdot {x.im}^{y.re}\\
      
      \mathbf{else}:\\
      \;\;\;\;{\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{y.re} \cdot \left(y.im \cdot \log x.re\right)\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 3 regimes
      2. if x.re < -3.7000000000000002e109

        1. Initial program 13.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. 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}} \]
        3. Step-by-step derivation
          1. lower-*.f64N/A

            \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot \color{blue}{{\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}} \]
          2. lower-sin.f64N/A

            \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\color{blue}{\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}}^{y.re} \]
          3. lower-*.f64N/A

            \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{\color{blue}{{x.im}^{2} + {x.re}^{2}}}\right)}^{y.re} \]
          4. lift-atan2.f64N/A

            \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{{x.im}^{2} + \color{blue}{{x.re}^{2}}}\right)}^{y.re} \]
          5. lower-pow.f64N/A

            \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{\color{blue}{y.re}} \]
          6. lower-sqrt.f64N/A

            \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re} \]
          7. pow2N/A

            \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right)}^{y.re} \]
          8. lower-fma.f64N/A

            \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, {x.re}^{2}\right)}\right)}^{y.re} \]
          9. pow2N/A

            \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{y.re} \]
          10. lift-*.f6443.3

            \[\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} \]
        4. Applied rewrites43.3%

          \[\leadsto \color{blue}{\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}} \]
        5. Taylor expanded in y.re around 0

          \[\leadsto \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\color{blue}{\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}}^{y.re} \]
        6. Step-by-step derivation
          1. lift-atan2.f64N/A

            \[\leadsto \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} \]
          2. lift-*.f6442.3

            \[\leadsto \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{y.re} \]
        7. Applied rewrites42.3%

          \[\leadsto \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\color{blue}{\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}}^{y.re} \]
        8. Taylor expanded in x.im around 0

          \[\leadsto \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {x.re}^{\color{blue}{y.re}} \]
        9. Step-by-step derivation
          1. lower-pow.f6431.0

            \[\leadsto \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {x.re}^{y.re} \]
        10. Applied rewrites31.0%

          \[\leadsto \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {x.re}^{\color{blue}{y.re}} \]

        if -3.7000000000000002e109 < x.re < 1.6e-135

        1. Initial program 50.4%

          \[e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \]
        2. 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}} \]
        3. Step-by-step derivation
          1. lower-*.f64N/A

            \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot \color{blue}{{\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}} \]
          2. lower-sin.f64N/A

            \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\color{blue}{\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}}^{y.re} \]
          3. lower-*.f64N/A

            \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{\color{blue}{{x.im}^{2} + {x.re}^{2}}}\right)}^{y.re} \]
          4. lift-atan2.f64N/A

            \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{{x.im}^{2} + \color{blue}{{x.re}^{2}}}\right)}^{y.re} \]
          5. lower-pow.f64N/A

            \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{\color{blue}{y.re}} \]
          6. lower-sqrt.f64N/A

            \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re} \]
          7. pow2N/A

            \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right)}^{y.re} \]
          8. lower-fma.f64N/A

            \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, {x.re}^{2}\right)}\right)}^{y.re} \]
          9. pow2N/A

            \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{y.re} \]
          10. lift-*.f6445.5

            \[\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} \]
        4. Applied rewrites45.5%

          \[\leadsto \color{blue}{\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}} \]
        5. Taylor expanded in y.re around 0

          \[\leadsto \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\color{blue}{\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}}^{y.re} \]
        6. Step-by-step derivation
          1. lift-atan2.f64N/A

            \[\leadsto \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} \]
          2. lift-*.f6445.1

            \[\leadsto \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{y.re} \]
        7. Applied rewrites45.1%

          \[\leadsto \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\color{blue}{\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}}^{y.re} \]
        8. Taylor expanded in x.re around 0

          \[\leadsto \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {x.im}^{y.re} \]
        9. Step-by-step derivation
          1. Applied rewrites36.8%

            \[\leadsto \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {x.im}^{y.re} \]

          if 1.6e-135 < x.re

          1. Initial program 39.3%

            \[e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \]
          2. Taylor expanded in y.im around 0

            \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \color{blue}{\left(\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) + y.im \cdot \left(\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right)} \]
          3. Step-by-step derivation
            1. lower-+.f64N/A

              \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \left(\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) + \color{blue}{y.im \cdot \left(\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)}\right) \]
            2. lower-sin.f64N/A

              \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \left(\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) + \color{blue}{y.im} \cdot \left(\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right) \]
            3. lower-*.f64N/A

              \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \left(\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) + y.im \cdot \left(\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right) \]
            4. lift-atan2.f64N/A

              \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \left(\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) + y.im \cdot \left(\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right) \]
            5. lower-*.f64N/A

              \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \left(\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) + y.im \cdot \color{blue}{\left(\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)}\right) \]
            6. lower-*.f64N/A

              \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \left(\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) + y.im \cdot \left(\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot \color{blue}{\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}\right)\right) \]
            7. lower-cos.f64N/A

              \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \left(\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) + y.im \cdot \left(\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot \log \color{blue}{\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}\right)\right) \]
            8. lower-*.f64N/A

              \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \left(\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) + y.im \cdot \left(\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot \log \left(\sqrt{\color{blue}{{x.im}^{2} + {x.re}^{2}}}\right)\right)\right) \]
            9. lift-atan2.f64N/A

              \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \left(\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) + y.im \cdot \left(\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot \log \left(\sqrt{{x.im}^{2} + \color{blue}{{x.re}^{2}}}\right)\right)\right) \]
            10. lower-log.f64N/A

              \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \left(\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) + y.im \cdot \left(\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right) \]
            11. lower-sqrt.f64N/A

              \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \left(\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) + y.im \cdot \left(\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right) \]
            12. pow2N/A

              \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \left(\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) + y.im \cdot \left(\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot \log \left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right)\right)\right) \]
            13. lower-fma.f64N/A

              \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \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{\mathsf{fma}\left(x.im, x.im, {x.re}^{2}\right)}\right)\right)\right) \]
            14. pow2N/A

              \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \left(\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) + y.im \cdot \left(\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot \log \left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)\right)\right) \]
            15. lift-*.f6445.1

              \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \left(\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) + y.im \cdot \left(\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot \log \left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)\right)\right) \]
          4. Applied rewrites45.1%

            \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \color{blue}{\left(\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) + y.im \cdot \left(\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot \log \left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)\right)\right)} \]
          5. Taylor expanded in y.re around 0

            \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \left(y.im \cdot \color{blue}{\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}\right) \]
          6. Step-by-step derivation
            1. lower-*.f64N/A

              \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right) \]
            2. pow2N/A

              \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \left(y.im \cdot \log \left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right)\right) \]
            3. pow2N/A

              \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \left(y.im \cdot \log \left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)\right) \]
            4. lower-sqrt.f64N/A

              \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \left(y.im \cdot \log \left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)\right) \]
            5. lift-fma.f64N/A

              \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \left(y.im \cdot \log \left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)\right) \]
            6. lift-*.f64N/A

              \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \left(y.im \cdot \log \left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)\right) \]
            7. lift-log.f6442.1

              \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \left(y.im \cdot \log \left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)\right) \]
          7. Applied rewrites42.1%

            \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \left(y.im \cdot \color{blue}{\log \left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}\right) \]
          8. Taylor expanded in x.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 \left(y.im \cdot \log x.re\right) \]
          9. Step-by-step derivation
            1. Applied rewrites54.2%

              \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \left(y.im \cdot \log x.re\right) \]
            2. Taylor expanded in y.im around 0

              \[\leadsto \color{blue}{{\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}} \cdot \left(y.im \cdot \log x.re\right) \]
            3. Step-by-step derivation
              1. sqrt-pow2N/A

                \[\leadsto {\left({x.im}^{2} + {x.re}^{2}\right)}^{\color{blue}{\left(\frac{y.re}{2}\right)}} \cdot \left(y.im \cdot \log x.re\right) \]
              2. pow2N/A

                \[\leadsto {\left(x.im \cdot x.im + {x.re}^{2}\right)}^{\left(\frac{y.re}{2}\right)} \cdot \left(y.im \cdot \log x.re\right) \]
              3. pow2N/A

                \[\leadsto {\left(x.im \cdot x.im + x.re \cdot x.re\right)}^{\left(\frac{y.re}{2}\right)} \cdot \left(y.im \cdot \log x.re\right) \]
              4. sqrt-pow2N/A

                \[\leadsto {\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)}^{\color{blue}{y.re}} \cdot \left(y.im \cdot \log x.re\right) \]
              5. lift-fma.f64N/A

                \[\leadsto {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{y.re} \cdot \left(y.im \cdot \log x.re\right) \]
              6. lift-*.f64N/A

                \[\leadsto {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{y.re} \cdot \left(y.im \cdot \log x.re\right) \]
              7. lift-sqrt.f64N/A

                \[\leadsto {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{y.re} \cdot \left(y.im \cdot \log x.re\right) \]
              8. lift-pow.f6446.8

                \[\leadsto {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{\color{blue}{y.re}} \cdot \left(y.im \cdot \log x.re\right) \]
            4. Applied rewrites46.8%

              \[\leadsto \color{blue}{{\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{y.re}} \cdot \left(y.im \cdot \log x.re\right) \]
          10. Recombined 3 regimes into one program.
          11. Add Preprocessing

          Alternative 16: 36.3% accurate, 2.8× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\ t_1 := t\_0 \cdot {x.re}^{y.re}\\ \mathbf{if}\;y.re \leq -2.65 \cdot 10^{-17}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y.re \leq 1.6:\\ \;\;\;\;t\_0\\ \mathbf{else}:\\ \;\;\;\;t\_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))) (t_1 (* t_0 (pow x.re y.re))))
             (if (<= y.re -2.65e-17) t_1 (if (<= y.re 1.6) t_0 t_1))))
          double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
          	double t_0 = y_46_re * atan2(x_46_im, x_46_re);
          	double t_1 = t_0 * pow(x_46_re, y_46_re);
          	double tmp;
          	if (y_46_re <= -2.65e-17) {
          		tmp = t_1;
          	} else if (y_46_re <= 1.6) {
          		tmp = t_0;
          	} else {
          		tmp = t_1;
          	}
          	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 = t_0 * (x_46re ** y_46re)
              if (y_46re <= (-2.65d-17)) then
                  tmp = t_1
              else if (y_46re <= 1.6d0) then
                  tmp = t_0
              else
                  tmp = t_1
              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 = t_0 * Math.pow(x_46_re, y_46_re);
          	double tmp;
          	if (y_46_re <= -2.65e-17) {
          		tmp = t_1;
          	} else if (y_46_re <= 1.6) {
          		tmp = t_0;
          	} else {
          		tmp = t_1;
          	}
          	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 = t_0 * math.pow(x_46_re, y_46_re)
          	tmp = 0
          	if y_46_re <= -2.65e-17:
          		tmp = t_1
          	elif y_46_re <= 1.6:
          		tmp = t_0
          	else:
          		tmp = t_1
          	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 = Float64(t_0 * (x_46_re ^ y_46_re))
          	tmp = 0.0
          	if (y_46_re <= -2.65e-17)
          		tmp = t_1;
          	elseif (y_46_re <= 1.6)
          		tmp = t_0;
          	else
          		tmp = t_1;
          	end
          	return tmp
          end
          
          function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im)
          	t_0 = y_46_re * atan2(x_46_im, x_46_re);
          	t_1 = t_0 * (x_46_re ^ y_46_re);
          	tmp = 0.0;
          	if (y_46_re <= -2.65e-17)
          		tmp = t_1;
          	elseif (y_46_re <= 1.6)
          		tmp = t_0;
          	else
          		tmp = t_1;
          	end
          	tmp_2 = tmp;
          end
          
          code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(t$95$0 * N[Power[x$46$re, y$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -2.65e-17], t$95$1, If[LessEqual[y$46$re, 1.6], t$95$0, t$95$1]]]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
          t_1 := t\_0 \cdot {x.re}^{y.re}\\
          \mathbf{if}\;y.re \leq -2.65 \cdot 10^{-17}:\\
          \;\;\;\;t\_1\\
          
          \mathbf{elif}\;y.re \leq 1.6:\\
          \;\;\;\;t\_0\\
          
          \mathbf{else}:\\
          \;\;\;\;t\_1\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if y.re < -2.6499999999999999e-17 or 1.6000000000000001 < 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. 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}} \]
            3. Step-by-step derivation
              1. lower-*.f64N/A

                \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot \color{blue}{{\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}} \]
              2. lower-sin.f64N/A

                \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\color{blue}{\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}}^{y.re} \]
              3. lower-*.f64N/A

                \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{\color{blue}{{x.im}^{2} + {x.re}^{2}}}\right)}^{y.re} \]
              4. lift-atan2.f64N/A

                \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{{x.im}^{2} + \color{blue}{{x.re}^{2}}}\right)}^{y.re} \]
              5. lower-pow.f64N/A

                \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{\color{blue}{y.re}} \]
              6. lower-sqrt.f64N/A

                \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re} \]
              7. pow2N/A

                \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right)}^{y.re} \]
              8. lower-fma.f64N/A

                \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, {x.re}^{2}\right)}\right)}^{y.re} \]
              9. pow2N/A

                \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{y.re} \]
              10. lift-*.f6466.5

                \[\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} \]
            4. Applied rewrites66.5%

              \[\leadsto \color{blue}{\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}} \]
            5. Taylor expanded in y.re around 0

              \[\leadsto \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\color{blue}{\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}}^{y.re} \]
            6. Step-by-step derivation
              1. lift-atan2.f64N/A

                \[\leadsto \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} \]
              2. lift-*.f6465.4

                \[\leadsto \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{y.re} \]
            7. Applied rewrites65.4%

              \[\leadsto \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\color{blue}{\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}}^{y.re} \]
            8. Taylor expanded in x.im around 0

              \[\leadsto \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {x.re}^{\color{blue}{y.re}} \]
            9. Step-by-step derivation
              1. lower-pow.f6450.2

                \[\leadsto \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {x.re}^{y.re} \]
            10. Applied rewrites50.2%

              \[\leadsto \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {x.re}^{\color{blue}{y.re}} \]

            if -2.6499999999999999e-17 < y.re < 1.6000000000000001

            1. Initial program 40.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. 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}} \]
            3. Step-by-step derivation
              1. lower-*.f64N/A

                \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot \color{blue}{{\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}} \]
              2. lower-sin.f64N/A

                \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\color{blue}{\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}}^{y.re} \]
              3. lower-*.f64N/A

                \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{\color{blue}{{x.im}^{2} + {x.re}^{2}}}\right)}^{y.re} \]
              4. lift-atan2.f64N/A

                \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{{x.im}^{2} + \color{blue}{{x.re}^{2}}}\right)}^{y.re} \]
              5. lower-pow.f64N/A

                \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{\color{blue}{y.re}} \]
              6. lower-sqrt.f64N/A

                \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re} \]
              7. pow2N/A

                \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right)}^{y.re} \]
              8. lower-fma.f64N/A

                \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, {x.re}^{2}\right)}\right)}^{y.re} \]
              9. pow2N/A

                \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{y.re} \]
              10. lift-*.f6419.1

                \[\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} \]
            4. Applied rewrites19.1%

              \[\leadsto \color{blue}{\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}} \]
            5. Taylor expanded in y.re around 0

              \[\leadsto y.re \cdot \color{blue}{\tan^{-1}_* \frac{x.im}{x.re}} \]
            6. Step-by-step derivation
              1. lift-atan2.f64N/A

                \[\leadsto y.re \cdot \tan^{-1}_* \frac{x.im}{x.re} \]
              2. lift-*.f6421.3

                \[\leadsto y.re \cdot \tan^{-1}_* \frac{x.im}{\color{blue}{x.re}} \]
            7. Applied rewrites21.3%

              \[\leadsto y.re \cdot \color{blue}{\tan^{-1}_* \frac{x.im}{x.re}} \]
          3. Recombined 2 regimes into one program.
          4. Add Preprocessing

          Alternative 17: 28.1% accurate, 3.0× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x.re \leq 5.2 \cdot 10^{-284}:\\ \;\;\;\;y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\ \mathbf{else}:\\ \;\;\;\;{\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{y.re} \cdot \left(y.im \cdot \log x.re\right)\\ \end{array} \end{array} \]
          (FPCore (x.re x.im y.re y.im)
           :precision binary64
           (if (<= x.re 5.2e-284)
             (* y.re (atan2 x.im x.re))
             (* (pow (sqrt (fma x.im x.im (* x.re x.re))) y.re) (* y.im (log x.re)))))
          double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
          	double tmp;
          	if (x_46_re <= 5.2e-284) {
          		tmp = y_46_re * atan2(x_46_im, x_46_re);
          	} else {
          		tmp = pow(sqrt(fma(x_46_im, x_46_im, (x_46_re * x_46_re))), y_46_re) * (y_46_im * log(x_46_re));
          	}
          	return tmp;
          }
          
          function code(x_46_re, x_46_im, y_46_re, y_46_im)
          	tmp = 0.0
          	if (x_46_re <= 5.2e-284)
          		tmp = Float64(y_46_re * atan(x_46_im, x_46_re));
          	else
          		tmp = Float64((sqrt(fma(x_46_im, x_46_im, Float64(x_46_re * x_46_re))) ^ y_46_re) * Float64(y_46_im * log(x_46_re)));
          	end
          	return tmp
          end
          
          code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[x$46$re, 5.2e-284], N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision], N[(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] * N[(y$46$im * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          \mathbf{if}\;x.re \leq 5.2 \cdot 10^{-284}:\\
          \;\;\;\;y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
          
          \mathbf{else}:\\
          \;\;\;\;{\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{y.re} \cdot \left(y.im \cdot \log x.re\right)\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if x.re < 5.2e-284

            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. 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}} \]
            3. Step-by-step derivation
              1. lower-*.f64N/A

                \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot \color{blue}{{\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}} \]
              2. lower-sin.f64N/A

                \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\color{blue}{\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}}^{y.re} \]
              3. lower-*.f64N/A

                \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{\color{blue}{{x.im}^{2} + {x.re}^{2}}}\right)}^{y.re} \]
              4. lift-atan2.f64N/A

                \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{{x.im}^{2} + \color{blue}{{x.re}^{2}}}\right)}^{y.re} \]
              5. lower-pow.f64N/A

                \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{\color{blue}{y.re}} \]
              6. lower-sqrt.f64N/A

                \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re} \]
              7. pow2N/A

                \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right)}^{y.re} \]
              8. lower-fma.f64N/A

                \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, {x.re}^{2}\right)}\right)}^{y.re} \]
              9. pow2N/A

                \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{y.re} \]
              10. lift-*.f6444.6

                \[\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} \]
            4. Applied rewrites44.6%

              \[\leadsto \color{blue}{\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}} \]
            5. Taylor expanded in y.re around 0

              \[\leadsto y.re \cdot \color{blue}{\tan^{-1}_* \frac{x.im}{x.re}} \]
            6. Step-by-step derivation
              1. lift-atan2.f64N/A

                \[\leadsto y.re \cdot \tan^{-1}_* \frac{x.im}{x.re} \]
              2. lift-*.f6412.9

                \[\leadsto y.re \cdot \tan^{-1}_* \frac{x.im}{\color{blue}{x.re}} \]
            7. Applied rewrites12.9%

              \[\leadsto y.re \cdot \color{blue}{\tan^{-1}_* \frac{x.im}{x.re}} \]

            if 5.2e-284 < x.re

            1. Initial program 40.4%

              \[e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \]
            2. Taylor expanded in y.im around 0

              \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \color{blue}{\left(\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) + y.im \cdot \left(\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right)} \]
            3. Step-by-step derivation
              1. lower-+.f64N/A

                \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \left(\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) + \color{blue}{y.im \cdot \left(\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)}\right) \]
              2. lower-sin.f64N/A

                \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \left(\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) + \color{blue}{y.im} \cdot \left(\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right) \]
              3. lower-*.f64N/A

                \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \left(\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) + y.im \cdot \left(\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right) \]
              4. lift-atan2.f64N/A

                \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \left(\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) + y.im \cdot \left(\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right) \]
              5. lower-*.f64N/A

                \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \left(\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) + y.im \cdot \color{blue}{\left(\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)}\right) \]
              6. lower-*.f64N/A

                \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \left(\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) + y.im \cdot \left(\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot \color{blue}{\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}\right)\right) \]
              7. lower-cos.f64N/A

                \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \left(\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) + y.im \cdot \left(\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot \log \color{blue}{\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}\right)\right) \]
              8. lower-*.f64N/A

                \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \left(\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) + y.im \cdot \left(\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot \log \left(\sqrt{\color{blue}{{x.im}^{2} + {x.re}^{2}}}\right)\right)\right) \]
              9. lift-atan2.f64N/A

                \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \left(\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) + y.im \cdot \left(\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot \log \left(\sqrt{{x.im}^{2} + \color{blue}{{x.re}^{2}}}\right)\right)\right) \]
              10. lower-log.f64N/A

                \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \left(\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) + y.im \cdot \left(\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right) \]
              11. lower-sqrt.f64N/A

                \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \left(\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) + y.im \cdot \left(\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right) \]
              12. pow2N/A

                \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \left(\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) + y.im \cdot \left(\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot \log \left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right)\right)\right) \]
              13. lower-fma.f64N/A

                \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \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{\mathsf{fma}\left(x.im, x.im, {x.re}^{2}\right)}\right)\right)\right) \]
              14. pow2N/A

                \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \left(\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) + y.im \cdot \left(\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot \log \left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)\right)\right) \]
              15. lift-*.f6446.2

                \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \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{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)\right)\right) \]
            4. Applied rewrites46.2%

              \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \color{blue}{\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{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)\right)\right)} \]
            5. Taylor expanded in y.re around 0

              \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \left(y.im \cdot \color{blue}{\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}\right) \]
            6. Step-by-step derivation
              1. lower-*.f64N/A

                \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right) \]
              2. pow2N/A

                \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \left(y.im \cdot \log \left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right)\right) \]
              3. pow2N/A

                \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \left(y.im \cdot \log \left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)\right) \]
              4. lower-sqrt.f64N/A

                \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \left(y.im \cdot \log \left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)\right) \]
              5. lift-fma.f64N/A

                \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \left(y.im \cdot \log \left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)\right) \]
              6. lift-*.f64N/A

                \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \left(y.im \cdot \log \left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)\right) \]
              7. lift-log.f6443.1

                \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \left(y.im \cdot \log \left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)\right) \]
            7. Applied rewrites43.1%

              \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \left(y.im \cdot \color{blue}{\log \left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}\right) \]
            8. Taylor expanded in x.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 \left(y.im \cdot \log x.re\right) \]
            9. Step-by-step derivation
              1. Applied rewrites53.0%

                \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \left(y.im \cdot \log x.re\right) \]
              2. Taylor expanded in y.im around 0

                \[\leadsto \color{blue}{{\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}} \cdot \left(y.im \cdot \log x.re\right) \]
              3. Step-by-step derivation
                1. sqrt-pow2N/A

                  \[\leadsto {\left({x.im}^{2} + {x.re}^{2}\right)}^{\color{blue}{\left(\frac{y.re}{2}\right)}} \cdot \left(y.im \cdot \log x.re\right) \]
                2. pow2N/A

                  \[\leadsto {\left(x.im \cdot x.im + {x.re}^{2}\right)}^{\left(\frac{y.re}{2}\right)} \cdot \left(y.im \cdot \log x.re\right) \]
                3. pow2N/A

                  \[\leadsto {\left(x.im \cdot x.im + x.re \cdot x.re\right)}^{\left(\frac{y.re}{2}\right)} \cdot \left(y.im \cdot \log x.re\right) \]
                4. sqrt-pow2N/A

                  \[\leadsto {\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)}^{\color{blue}{y.re}} \cdot \left(y.im \cdot \log x.re\right) \]
                5. lift-fma.f64N/A

                  \[\leadsto {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{y.re} \cdot \left(y.im \cdot \log x.re\right) \]
                6. lift-*.f64N/A

                  \[\leadsto {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{y.re} \cdot \left(y.im \cdot \log x.re\right) \]
                7. lift-sqrt.f64N/A

                  \[\leadsto {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{y.re} \cdot \left(y.im \cdot \log x.re\right) \]
                8. lift-pow.f6444.8

                  \[\leadsto {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{\color{blue}{y.re}} \cdot \left(y.im \cdot \log x.re\right) \]
              4. Applied rewrites44.8%

                \[\leadsto \color{blue}{{\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{y.re}} \cdot \left(y.im \cdot \log x.re\right) \]
            10. Recombined 2 regimes into one program.
            11. Add Preprocessing

            Alternative 18: 13.2% accurate, 6.5× 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.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. 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}} \]
            3. Step-by-step derivation
              1. lower-*.f64N/A

                \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot \color{blue}{{\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}} \]
              2. lower-sin.f64N/A

                \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\color{blue}{\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}}^{y.re} \]
              3. lower-*.f64N/A

                \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{\color{blue}{{x.im}^{2} + {x.re}^{2}}}\right)}^{y.re} \]
              4. lift-atan2.f64N/A

                \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{{x.im}^{2} + \color{blue}{{x.re}^{2}}}\right)}^{y.re} \]
              5. lower-pow.f64N/A

                \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{\color{blue}{y.re}} \]
              6. lower-sqrt.f64N/A

                \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re} \]
              7. pow2N/A

                \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right)}^{y.re} \]
              8. lower-fma.f64N/A

                \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, {x.re}^{2}\right)}\right)}^{y.re} \]
              9. pow2N/A

                \[\leadsto \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{\mathsf{fma}\left(x.im, x.im, x.re \cdot x.re\right)}\right)}^{y.re} \]
              10. lift-*.f6443.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} \]
            4. Applied rewrites43.8%

              \[\leadsto \color{blue}{\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}} \]
            5. Taylor expanded in y.re around 0

              \[\leadsto y.re \cdot \color{blue}{\tan^{-1}_* \frac{x.im}{x.re}} \]
            6. Step-by-step derivation
              1. lift-atan2.f64N/A

                \[\leadsto y.re \cdot \tan^{-1}_* \frac{x.im}{x.re} \]
              2. lift-*.f6413.2

                \[\leadsto y.re \cdot \tan^{-1}_* \frac{x.im}{\color{blue}{x.re}} \]
            7. Applied rewrites13.2%

              \[\leadsto y.re \cdot \color{blue}{\tan^{-1}_* \frac{x.im}{x.re}} \]
            8. Add Preprocessing

            Alternative 19: 4.7% accurate, 13.0× speedup?

            \[\begin{array}{l} \\ y.im \cdot \log x.im \end{array} \]
            (FPCore (x.re x.im y.re y.im) :precision binary64 (* y.im (log x.im)))
            double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
            	return y_46_im * log(x_46_im);
            }
            
            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_46im * log(x_46im)
            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_im * Math.log(x_46_im);
            }
            
            def code(x_46_re, x_46_im, y_46_re, y_46_im):
            	return y_46_im * math.log(x_46_im)
            
            function code(x_46_re, x_46_im, y_46_re, y_46_im)
            	return Float64(y_46_im * log(x_46_im))
            end
            
            function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im)
            	tmp = y_46_im * log(x_46_im);
            end
            
            code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[(y$46$im * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision]
            
            \begin{array}{l}
            
            \\
            y.im \cdot \log x.im
            \end{array}
            
            Derivation
            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. Taylor expanded in x.re around 0

              \[\leadsto \color{blue}{e^{y.re \cdot \log x.im - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \sin \left(y.im \cdot \log x.im + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
            3. Step-by-step derivation
              1. lower-*.f64N/A

                \[\leadsto e^{y.re \cdot \log x.im - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \color{blue}{\sin \left(y.im \cdot \log x.im + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
              2. lower-exp.f64N/A

                \[\leadsto e^{y.re \cdot \log x.im - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \sin \color{blue}{\left(y.im \cdot \log x.im + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
              3. lower--.f64N/A

                \[\leadsto e^{y.re \cdot \log x.im - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \sin \left(\color{blue}{y.im \cdot \log x.im} + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
              4. lower-*.f64N/A

                \[\leadsto e^{y.re \cdot \log x.im - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \sin \left(\color{blue}{y.im} \cdot \log x.im + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
              5. lower-log.f64N/A

                \[\leadsto e^{y.re \cdot \log x.im - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \sin \left(y.im \cdot \log x.im + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
              6. lower-*.f64N/A

                \[\leadsto e^{y.re \cdot \log x.im - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \sin \left(y.im \cdot \color{blue}{\log x.im} + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
              7. lift-atan2.f64N/A

                \[\leadsto e^{y.re \cdot \log x.im - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \sin \left(y.im \cdot \log x.im + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
              8. lower-sin.f64N/A

                \[\leadsto e^{y.re \cdot \log x.im - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \sin \left(y.im \cdot \log x.im + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \]
              9. lower-fma.f64N/A

                \[\leadsto e^{y.re \cdot \log x.im - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \sin \left(\mathsf{fma}\left(y.im, \log x.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
              10. lower-log.f64N/A

                \[\leadsto e^{y.re \cdot \log x.im - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \sin \left(\mathsf{fma}\left(y.im, \log x.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
              11. lower-*.f64N/A

                \[\leadsto e^{y.re \cdot \log x.im - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \sin \left(\mathsf{fma}\left(y.im, \log x.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
              12. lift-atan2.f6431.8

                \[\leadsto e^{y.re \cdot \log x.im - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \sin \left(\mathsf{fma}\left(y.im, \log x.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
            4. Applied rewrites31.8%

              \[\leadsto \color{blue}{e^{y.re \cdot \log x.im - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \sin \left(\mathsf{fma}\left(y.im, \log x.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)} \]
            5. 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)} \]
            6. Step-by-step derivation
              1. lower-*.f64N/A

                \[\leadsto e^{\mathsf{neg}\left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \cdot \sin \left(y.im \cdot \log x.im\right) \]
              2. lower-exp.f64N/A

                \[\leadsto e^{\mathsf{neg}\left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \cdot \sin \left(y.im \cdot \log x.im\right) \]
              3. lower-neg.f64N/A

                \[\leadsto e^{-y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \sin \left(y.im \cdot \log x.im\right) \]
              4. lift-atan2.f64N/A

                \[\leadsto e^{-y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \sin \left(y.im \cdot \log x.im\right) \]
              5. lift-*.f64N/A

                \[\leadsto e^{-y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \sin \left(y.im \cdot \log x.im\right) \]
              6. lower-sin.f64N/A

                \[\leadsto e^{-y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \sin \left(y.im \cdot \log x.im\right) \]
              7. lower-*.f64N/A

                \[\leadsto e^{-y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \sin \left(y.im \cdot \log x.im\right) \]
              8. lift-log.f6418.3

                \[\leadsto e^{-y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \sin \left(y.im \cdot \log x.im\right) \]
            7. Applied rewrites18.3%

              \[\leadsto e^{-y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \color{blue}{\sin \left(y.im \cdot \log x.im\right)} \]
            8. Taylor expanded in y.im around 0

              \[\leadsto y.im \cdot \log x.im \]
            9. Step-by-step derivation
              1. lift-log.f64N/A

                \[\leadsto y.im \cdot \log x.im \]
              2. lift-*.f644.7

                \[\leadsto y.im \cdot \log x.im \]
            10. Applied rewrites4.7%

              \[\leadsto y.im \cdot \log x.im \]
            11. Add Preprocessing

            Reproduce

            ?
            herbie shell --seed 2025112 
            (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)))))