powComplex, imaginary part

Percentage Accurate: 41.0% → 74.9%
Time: 22.5s
Alternatives: 20
Speedup: 2.6×

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 20 alternatives:

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

Initial Program: 41.0% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)\\ e^{t\_0 \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(t\_0 \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \end{array} \end{array} \]
(FPCore (x.re x.im y.re y.im)
 :precision binary64
 (let* ((t_0 (log (sqrt (+ (* x.re x.re) (* x.im x.im))))))
   (*
    (exp (- (* t_0 y.re) (* (atan2 x.im x.re) y.im)))
    (sin (+ (* t_0 y.im) (* (atan2 x.im x.re) y.re))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
	double t_0 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
	return exp(((t_0 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin(((t_0 * y_46_im) + (atan2(x_46_im, x_46_re) * y_46_re)));
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
    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: 74.9% accurate, 0.4× speedup?

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

\\
\begin{array}{l}
t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_1 := \frac{e^{t\_0}}{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}\\
t_2 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_3 := \sin t\_2\\
t_4 := e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - t\_0}\\
t_5 := \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
t_6 := t\_3 + y.im \cdot \left(t\_5 \cdot \cos t\_2\right)\\
t_7 := y.im \cdot t\_5\\
t_8 := \cos t\_7\\
t_9 := \sin t\_7\\
\mathbf{if}\;y.re \leq -5 \cdot 10^{+42}:\\
\;\;\;\;t\_4 \cdot t\_3\\

\mathbf{elif}\;y.re \leq 10^{+21}:\\
\;\;\;\;\frac{t\_6}{t\_1}\\

\mathbf{elif}\;y.re \leq 1.15 \cdot 10^{+188}:\\
\;\;\;\;\frac{t\_9 + y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot t\_8 + y.re \cdot \left(-0.5 \cdot \left(t\_9 \cdot {\tan^{-1}_* \frac{x.im}{x.re}}^{2}\right) + \left(y.re \cdot -0.16666666666666666\right) \cdot \left(t\_8 \cdot {\tan^{-1}_* \frac{x.im}{x.re}}^{3}\right)\right)\right)}{t\_1}\\

\mathbf{else}:\\
\;\;\;\;t\_4 \cdot t\_6\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y.re < -5.00000000000000007e42

    1. Initial program 49.1%

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
      3. atan2-lowering-atan2.f6485.5%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
    5. Simplified85.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}{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]

    if -5.00000000000000007e42 < y.re < 1e21

    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. Step-by-step derivation
      1. exp-diffN/A

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

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

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

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

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

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

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

      \[\leadsto \mathsf{/.f64}\left(\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)}, \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
    6. Step-by-step derivation
      1. +-lowering-+.f64N/A

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{*.f64}\left(y.im, \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)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      6. *-commutativeN/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right), \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      8. log-lowering-log.f64N/A

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)\right), \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      11. hypot-defineN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{log.f64}\left(\left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right), \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      12. hypot-lowering-hypot.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right), \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      13. cos-lowering-cos.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right), \mathsf{cos.f64}\left(\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      14. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      15. atan2-lowering-atan2.f6483.6%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
    7. Simplified83.6%

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

    if 1e21 < y.re < 1.15000000000000006e188

    1. Initial program 46.2%

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\sin \left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right), \left(y.re \cdot \left(y.re \cdot \left(\frac{-1}{2} \cdot \left(\sin \left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right) \cdot {\tan^{-1}_* \frac{x.im}{x.re}}^{2}\right) + \frac{-1}{6} \cdot \left(y.re \cdot \left(\cos \left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right) \cdot {\tan^{-1}_* \frac{x.im}{x.re}}^{3}\right)\right)\right) + \cos \left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right), \mathsf{/.f64}\left(\color{blue}{\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)}, \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
    7. Simplified84.6%

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

    if 1.15000000000000006e188 < y.re

    1. Initial program 31.8%

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

      \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \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)}\right) \]
    4. Step-by-step derivation
      1. +-lowering-+.f64N/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{+.f64}\left(\mathsf{sin.f64}\left(\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right), \left(\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)\right)\right) \]
      3. *-lowering-*.f64N/A

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{*.f64}\left(y.im, \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)\right)\right) \]
      6. *-commutativeN/A

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)\right), \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right)\right) \]
      11. hypot-defineN/A

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right), \mathsf{cos.f64}\left(\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right)\right)\right) \]
      14. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right)\right)\right) \]
      15. atan2-lowering-atan2.f6481.8%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right)\right)\right)\right) \]
    5. Simplified81.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(\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right) \cdot \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification84.0%

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

Alternative 2: 76.6% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\ t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\ t_2 := \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)\\ t_3 := e^{y.re \cdot t\_2 - t\_0} \cdot \sin \left(t\_1 + t\_2 \cdot y.im\right)\\ \mathbf{if}\;t\_3 \leq \infty:\\ \;\;\;\;t\_3\\ \mathbf{else}:\\ \;\;\;\;\frac{\sin t\_1 + y.im \cdot \left(\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right) \cdot \cos t\_1\right)}{\frac{e^{t\_0}}{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}}\\ \end{array} \end{array} \]
(FPCore (x.re x.im y.re y.im)
 :precision binary64
 (let* ((t_0 (* (atan2 x.im x.re) y.im))
        (t_1 (* y.re (atan2 x.im x.re)))
        (t_2 (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
        (t_3 (* (exp (- (* y.re t_2) t_0)) (sin (+ t_1 (* t_2 y.im))))))
   (if (<= t_3 INFINITY)
     t_3
     (/
      (+ (sin t_1) (* y.im (* (log (hypot x.im x.re)) (cos t_1))))
      (/ (exp t_0) (pow (hypot x.re x.im) y.re))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
	double t_0 = atan2(x_46_im, x_46_re) * y_46_im;
	double t_1 = y_46_re * atan2(x_46_im, x_46_re);
	double t_2 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
	double t_3 = exp(((y_46_re * t_2) - t_0)) * sin((t_1 + (t_2 * y_46_im)));
	double tmp;
	if (t_3 <= ((double) INFINITY)) {
		tmp = t_3;
	} else {
		tmp = (sin(t_1) + (y_46_im * (log(hypot(x_46_im, x_46_re)) * cos(t_1)))) / (exp(t_0) / pow(hypot(x_46_re, x_46_im), y_46_re));
	}
	return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
	double t_0 = Math.atan2(x_46_im, x_46_re) * y_46_im;
	double t_1 = y_46_re * Math.atan2(x_46_im, x_46_re);
	double t_2 = Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
	double t_3 = Math.exp(((y_46_re * t_2) - t_0)) * Math.sin((t_1 + (t_2 * y_46_im)));
	double tmp;
	if (t_3 <= Double.POSITIVE_INFINITY) {
		tmp = t_3;
	} else {
		tmp = (Math.sin(t_1) + (y_46_im * (Math.log(Math.hypot(x_46_im, x_46_re)) * Math.cos(t_1)))) / (Math.exp(t_0) / Math.pow(Math.hypot(x_46_re, x_46_im), y_46_re));
	}
	return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im):
	t_0 = math.atan2(x_46_im, x_46_re) * y_46_im
	t_1 = y_46_re * math.atan2(x_46_im, x_46_re)
	t_2 = math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))
	t_3 = math.exp(((y_46_re * t_2) - t_0)) * math.sin((t_1 + (t_2 * y_46_im)))
	tmp = 0
	if t_3 <= math.inf:
		tmp = t_3
	else:
		tmp = (math.sin(t_1) + (y_46_im * (math.log(math.hypot(x_46_im, x_46_re)) * math.cos(t_1)))) / (math.exp(t_0) / math.pow(math.hypot(x_46_re, x_46_im), y_46_re))
	return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im)
	t_0 = Float64(atan(x_46_im, x_46_re) * y_46_im)
	t_1 = Float64(y_46_re * atan(x_46_im, x_46_re))
	t_2 = log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))
	t_3 = Float64(exp(Float64(Float64(y_46_re * t_2) - t_0)) * sin(Float64(t_1 + Float64(t_2 * y_46_im))))
	tmp = 0.0
	if (t_3 <= Inf)
		tmp = t_3;
	else
		tmp = Float64(Float64(sin(t_1) + Float64(y_46_im * Float64(log(hypot(x_46_im, x_46_re)) * cos(t_1)))) / Float64(exp(t_0) / (hypot(x_46_re, x_46_im) ^ y_46_re)));
	end
	return tmp
end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im)
	t_0 = atan2(x_46_im, x_46_re) * y_46_im;
	t_1 = y_46_re * atan2(x_46_im, x_46_re);
	t_2 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
	t_3 = exp(((y_46_re * t_2) - t_0)) * sin((t_1 + (t_2 * y_46_im)));
	tmp = 0.0;
	if (t_3 <= Inf)
		tmp = t_3;
	else
		tmp = (sin(t_1) + (y_46_im * (log(hypot(x_46_im, x_46_re)) * cos(t_1)))) / (exp(t_0) / (hypot(x_46_re, x_46_im) ^ y_46_re));
	end
	tmp_2 = tmp;
end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $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[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[(N[Exp[N[(N[(y$46$re * t$95$2), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(t$95$1 + N[(t$95$2 * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, Infinity], t$95$3, N[(N[(N[Sin[t$95$1], $MachinePrecision] + N[(y$46$im * N[(N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision] * N[Cos[t$95$1], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[Exp[t$95$0], $MachinePrecision] / N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_2 := \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)\\
t_3 := e^{y.re \cdot t\_2 - t\_0} \cdot \sin \left(t\_1 + t\_2 \cdot y.im\right)\\
\mathbf{if}\;t\_3 \leq \infty:\\
\;\;\;\;t\_3\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 (exp.f64 (-.f64 (*.f64 (log.f64 (sqrt.f64 (+.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)))) y.re) (*.f64 (atan2.f64 x.im x.re) y.im))) (sin.f64 (+.f64 (*.f64 (log.f64 (sqrt.f64 (+.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)))) y.im) (*.f64 (atan2.f64 x.im x.re) y.re)))) < +inf.0

    1. Initial program 82.8%

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

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

    1. Initial program 0.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. Step-by-step derivation
      1. exp-diffN/A

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

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

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

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

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

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

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

      \[\leadsto \mathsf{/.f64}\left(\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)}, \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
    6. Step-by-step derivation
      1. +-lowering-+.f64N/A

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{*.f64}\left(y.im, \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)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      6. *-commutativeN/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right), \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      8. log-lowering-log.f64N/A

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)\right), \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      11. hypot-defineN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{log.f64}\left(\left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right), \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      12. hypot-lowering-hypot.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right), \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      13. cos-lowering-cos.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right), \mathsf{cos.f64}\left(\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      14. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      15. atan2-lowering-atan2.f6477.1%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
    7. Simplified77.1%

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

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

Alternative 3: 74.5% accurate, 0.8× speedup?

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

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

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

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


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

    1. Initial program 42.3%

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

      \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \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)}\right) \]
    4. Step-by-step derivation
      1. +-lowering-+.f64N/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{+.f64}\left(\mathsf{sin.f64}\left(\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right), \left(\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)\right)\right) \]
      3. *-lowering-*.f64N/A

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{*.f64}\left(y.im, \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)\right)\right) \]
      6. *-commutativeN/A

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)\right), \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right)\right) \]
      11. hypot-defineN/A

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right), \mathsf{cos.f64}\left(\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right)\right)\right) \]
      14. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right)\right)\right) \]
      15. atan2-lowering-atan2.f6468.7%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right)\right)\right)\right) \]
    5. Simplified68.7%

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

    if -6.0000000000000003e47 < y.im < 5.5000000000000002e56

    1. Initial program 42.4%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{+.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), \left(\frac{y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}{y.re}\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{+.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), \mathsf{/.f64}\left(\left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right), y.re\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{+.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(y.im, \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right), y.re\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      7. log-lowering-log.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{+.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right), y.re\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      8. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{+.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right)\right)\right), y.re\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      9. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{+.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)\right)\right), y.re\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      10. hypot-defineN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{+.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\right), y.re\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      11. hypot-lowering-hypot.f6491.4%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{+.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right), y.re\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
    7. Simplified91.4%

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

    if 5.5000000000000002e56 < y.im

    1. Initial program 37.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. Step-by-step derivation
      1. exp-diffN/A

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)}\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      3. atan2-lowering-atan2.f6462.5%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), \color{blue}{y.im}\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
    7. Simplified62.5%

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right), \mathsf{exp.f64}\left(\left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right), \mathsf{exp.f64}\left(\mathsf{*.f64}\left(y.im, \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
      6. atan2-lowering-atan2.f6470.2%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right), \mathsf{exp.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
    10. Simplified70.2%

      \[\leadsto \color{blue}{\frac{y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}}{e^{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification81.7%

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

Alternative 4: 73.3% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;y.im \leq -3.95 \cdot 10^{+55}:\\
\;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - t\_0} \cdot \sin t\_2\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y.im < -7.7999999999999997e223

    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. Step-by-step derivation
      1. exp-diffN/A

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

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

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

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

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

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

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

      \[\leadsto \mathsf{/.f64}\left(\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)}, \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
    6. Step-by-step derivation
      1. +-lowering-+.f64N/A

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{*.f64}\left(y.im, \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)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      6. *-commutativeN/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right), \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      8. log-lowering-log.f64N/A

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)\right), \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      11. hypot-defineN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{log.f64}\left(\left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right), \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      12. hypot-lowering-hypot.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right), \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      13. cos-lowering-cos.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right), \mathsf{cos.f64}\left(\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      14. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      15. atan2-lowering-atan2.f6447.1%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
    7. Simplified47.1%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \mathsf{*.f64}\left(x.re, x.re\right)\right)\right)\right)\right), \mathsf{exp.f64}\left(\left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \mathsf{*.f64}\left(x.re, x.re\right)\right)\right)\right)\right), \mathsf{exp.f64}\left(\mathsf{*.f64}\left(y.im, \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
      12. atan2-lowering-atan2.f6435.5%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \mathsf{*.f64}\left(x.re, x.re\right)\right)\right)\right)\right), \mathsf{exp.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
    10. Simplified35.5%

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

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

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

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

        \[\leadsto \mathsf{neg.f64}\left(\left(\frac{y.im \cdot \log \left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)}{\mathsf{neg}\left(e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\right)}\right)\right) \]
    12. Applied egg-rr64.9%

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

      \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\color{blue}{\log \left({x.re}^{2}\right)}, \mathsf{/.f64}\left(2, y.im\right)\right), \mathsf{\_.f64}\left(0, \mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right)\right)\right) \]
    14. Step-by-step derivation
      1. log-lowering-log.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{log.f64}\left(\left({x.re}^{2}\right)\right), \mathsf{/.f64}\left(2, y.im\right)\right), \mathsf{\_.f64}\left(0, \mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right)\right)\right) \]
      2. unpow2N/A

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{log.f64}\left(\left(x.re \cdot x.re\right)\right), \mathsf{/.f64}\left(2, y.im\right)\right), \mathsf{\_.f64}\left(0, \mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right)\right)\right) \]
      3. *-lowering-*.f6476.7%

        \[\leadsto \mathsf{neg.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{log.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right)\right), \mathsf{/.f64}\left(2, y.im\right)\right), \mathsf{\_.f64}\left(0, \mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right)\right)\right) \]
    15. Simplified76.7%

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

    if -7.7999999999999997e223 < y.im < -3.9500000000000002e55

    1. Initial program 44.8%

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
      3. atan2-lowering-atan2.f6463.7%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
    5. Simplified63.7%

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

    if -3.9500000000000002e55 < y.im < 6.80000000000000002e56

    1. Initial program 42.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. Step-by-step derivation
      1. exp-diffN/A

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{+.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), \left(\frac{y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}{y.re}\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{+.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), \mathsf{/.f64}\left(\left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right), y.re\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{+.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(y.im, \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right), y.re\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      7. log-lowering-log.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{+.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right), y.re\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      8. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{+.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right)\right)\right), y.re\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      9. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{+.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)\right)\right), y.re\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      10. hypot-defineN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{+.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\right), y.re\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      11. hypot-lowering-hypot.f6490.8%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{+.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right)\right), y.re\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
    7. Simplified90.8%

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

    if 6.80000000000000002e56 < y.im

    1. Initial program 37.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. Step-by-step derivation
      1. exp-diffN/A

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)}\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      3. atan2-lowering-atan2.f6462.5%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), \color{blue}{y.im}\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
    7. Simplified62.5%

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right), \mathsf{exp.f64}\left(\left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right), \mathsf{exp.f64}\left(\mathsf{*.f64}\left(y.im, \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
      6. atan2-lowering-atan2.f6470.2%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right), \mathsf{exp.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
    10. Simplified70.2%

      \[\leadsto \color{blue}{\frac{y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}}{e^{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}}} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification77.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y.im \leq -7.8 \cdot 10^{+223}:\\ \;\;\;\;\frac{\frac{\log \left(x.re \cdot x.re\right)}{\frac{2}{y.im}}}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\\ \mathbf{elif}\;y.im \leq -3.95 \cdot 10^{+55}:\\ \;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\ \mathbf{elif}\;y.im \leq 6.8 \cdot 10^{+56}:\\ \;\;\;\;\frac{\sin \left(y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} + \frac{y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)}{y.re}\right)\right)}{\frac{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}}\\ \mathbf{else}:\\ \;\;\;\;\frac{y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 76.7% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_2 := \sin t\_1\\
t_3 := x.re \cdot x.re + x.im \cdot x.im\\
\mathbf{if}\;y.re \leq -2 \cdot 10^{+54}:\\
\;\;\;\;e^{y.re \cdot \log \left(\sqrt{t\_3}\right) - t\_0} \cdot t\_2\\

\mathbf{elif}\;y.re \leq 5.4 \cdot 10^{+184}:\\
\;\;\;\;\frac{\sin \left(t\_1 + y.im \cdot \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\right)}{\frac{e^{t\_0}}{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}}\\

\mathbf{else}:\\
\;\;\;\;t\_2 \cdot {t\_3}^{\left(\frac{y.re}{2}\right)}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y.re < -2.0000000000000002e54

    1. Initial program 49.1%

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
      3. atan2-lowering-atan2.f6485.5%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
    5. Simplified85.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}{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]

    if -2.0000000000000002e54 < y.re < 5.3999999999999998e184

    1. Initial program 40.1%

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

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

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

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

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

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

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

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

    if 5.3999999999999998e184 < y.re

    1. Initial program 33.3%

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \left({\left(\sqrt{{x.im}^{2} + \color{blue}{{x.re}^{2}}}\right)}^{y.re}\right)\right) \]
      5. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right), \color{blue}{y.re}\right)\right) \]
      6. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right), y.re\right)\right) \]
      7. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right), y.re\right)\right) \]
      8. hypot-defineN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(\left(\mathsf{hypot}\left(x.im, x.re\right)\right), y.re\right)\right) \]
      9. hypot-lowering-hypot.f6475.0%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right)\right) \]
    5. Simplified75.0%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \left(x.re \cdot x.re\right)\right), \left(\frac{y.re}{2}\right)\right), \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \mathsf{*.f64}\left(x.re, x.re\right)\right), \left(\frac{y.re}{2}\right)\right), \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
      12. /-lowering-/.f64N/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \mathsf{*.f64}\left(x.re, x.re\right)\right), \mathsf{/.f64}\left(y.re, 2\right)\right), \mathsf{sin.f64}\left(\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
      14. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \mathsf{*.f64}\left(x.re, x.re\right)\right), \mathsf{/.f64}\left(y.re, 2\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
      15. atan2-lowering-atan2.f6475.0%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \mathsf{*.f64}\left(x.re, x.re\right)\right), \mathsf{/.f64}\left(y.re, 2\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
    7. Applied egg-rr75.0%

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

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

Alternative 6: 77.3% accurate, 1.3× speedup?

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

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

\mathbf{elif}\;y.re \leq 1.55 \cdot 10^{-5}:\\
\;\;\;\;\frac{\sin \left(y.im \cdot \left(\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right) + y.re \cdot \frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.im}\right)\right)}{e^{t\_0}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y.re < -4.60000000000000027e-11 or 1.55000000000000007e-5 < y.re

    1. Initial program 42.8%

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
      3. atan2-lowering-atan2.f6473.8%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.re, x.re\right), \mathsf{*.f64}\left(x.im, x.im\right)\right)\right)\right), y.re\right), \mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
    5. Simplified73.8%

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

    if -4.60000000000000027e-11 < y.re < 1.55000000000000007e-5

    1. Initial program 40.1%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{+.f64}\left(\mathsf{log.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right), \left(\frac{y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}}{y.im}\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      4. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{+.f64}\left(\mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right)\right), \left(\frac{y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}}{y.im}\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      5. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{+.f64}\left(\mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)\right), \left(\frac{y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}}{y.im}\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      6. hypot-defineN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{+.f64}\left(\mathsf{log.f64}\left(\left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right), \left(\frac{y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}}{y.im}\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      7. hypot-lowering-hypot.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right), \left(\frac{y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}}{y.im}\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      8. associate-/l*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right), \left(y.re \cdot \frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.im}\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right), \mathsf{*.f64}\left(y.re, \left(\frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.im}\right)\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      10. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right), \mathsf{*.f64}\left(y.re, \mathsf{/.f64}\left(\tan^{-1}_* \frac{x.im}{x.re}, y.im\right)\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      11. atan2-lowering-atan2.f6482.6%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right), \mathsf{*.f64}\left(y.re, \mathsf{/.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
    7. Simplified82.6%

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right), \mathsf{*.f64}\left(y.re, \mathsf{/.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right)\right)\right), \mathsf{exp.f64}\left(\mathsf{*.f64}\left(y.im, \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
      3. atan2-lowering-atan2.f6481.4%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right), \mathsf{*.f64}\left(y.re, \mathsf{/.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right)\right)\right), \mathsf{exp.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
    10. Simplified81.4%

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

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

Alternative 7: 64.9% accurate, 1.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\ t_1 := t\_0 \cdot {\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\left(\frac{y.re}{2}\right)}\\ t_2 := e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\ \mathbf{if}\;y.re \leq -8.6:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y.re \leq 1.6 \cdot 10^{-143}:\\ \;\;\;\;\frac{y.im \cdot \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)}{t\_2}\\ \mathbf{elif}\;y.re \leq 8 \cdot 10^{+20}:\\ \;\;\;\;\frac{t\_0}{\frac{t\_2}{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}}\\ \mathbf{elif}\;y.re \leq 1.15 \cdot 10^{+188}:\\ \;\;\;\;\left(y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} + -0.16666666666666666 \cdot \left({\tan^{-1}_* \frac{x.im}{x.re}}^{3} \cdot \left(y.re \cdot y.re\right)\right)\right)\right) \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x.re x.im y.re y.im)
 :precision binary64
 (let* ((t_0 (sin (* y.re (atan2 x.im x.re))))
        (t_1 (* t_0 (pow (+ (* x.re x.re) (* x.im x.im)) (/ y.re 2.0))))
        (t_2 (exp (* (atan2 x.im x.re) y.im))))
   (if (<= y.re -8.6)
     t_1
     (if (<= y.re 1.6e-143)
       (/ (* y.im (log (hypot x.re x.im))) t_2)
       (if (<= y.re 8e+20)
         (/ t_0 (/ t_2 (pow (hypot x.re x.im) y.re)))
         (if (<= y.re 1.15e+188)
           (*
            (*
             y.re
             (+
              (atan2 x.im x.re)
              (*
               -0.16666666666666666
               (* (pow (atan2 x.im x.re) 3.0) (* y.re y.re)))))
            (pow (hypot x.im x.re) y.re))
           t_1))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
	double t_0 = sin((y_46_re * atan2(x_46_im, x_46_re)));
	double t_1 = t_0 * pow(((x_46_re * x_46_re) + (x_46_im * x_46_im)), (y_46_re / 2.0));
	double t_2 = exp((atan2(x_46_im, x_46_re) * y_46_im));
	double tmp;
	if (y_46_re <= -8.6) {
		tmp = t_1;
	} else if (y_46_re <= 1.6e-143) {
		tmp = (y_46_im * log(hypot(x_46_re, x_46_im))) / t_2;
	} else if (y_46_re <= 8e+20) {
		tmp = t_0 / (t_2 / pow(hypot(x_46_re, x_46_im), y_46_re));
	} else if (y_46_re <= 1.15e+188) {
		tmp = (y_46_re * (atan2(x_46_im, x_46_re) + (-0.16666666666666666 * (pow(atan2(x_46_im, x_46_re), 3.0) * (y_46_re * y_46_re))))) * pow(hypot(x_46_im, x_46_re), y_46_re);
	} else {
		tmp = t_1;
	}
	return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
	double t_0 = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
	double t_1 = t_0 * Math.pow(((x_46_re * x_46_re) + (x_46_im * x_46_im)), (y_46_re / 2.0));
	double t_2 = Math.exp((Math.atan2(x_46_im, x_46_re) * y_46_im));
	double tmp;
	if (y_46_re <= -8.6) {
		tmp = t_1;
	} else if (y_46_re <= 1.6e-143) {
		tmp = (y_46_im * Math.log(Math.hypot(x_46_re, x_46_im))) / t_2;
	} else if (y_46_re <= 8e+20) {
		tmp = t_0 / (t_2 / Math.pow(Math.hypot(x_46_re, x_46_im), y_46_re));
	} else if (y_46_re <= 1.15e+188) {
		tmp = (y_46_re * (Math.atan2(x_46_im, x_46_re) + (-0.16666666666666666 * (Math.pow(Math.atan2(x_46_im, x_46_re), 3.0) * (y_46_re * y_46_re))))) * Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im):
	t_0 = math.sin((y_46_re * math.atan2(x_46_im, x_46_re)))
	t_1 = t_0 * math.pow(((x_46_re * x_46_re) + (x_46_im * x_46_im)), (y_46_re / 2.0))
	t_2 = math.exp((math.atan2(x_46_im, x_46_re) * y_46_im))
	tmp = 0
	if y_46_re <= -8.6:
		tmp = t_1
	elif y_46_re <= 1.6e-143:
		tmp = (y_46_im * math.log(math.hypot(x_46_re, x_46_im))) / t_2
	elif y_46_re <= 8e+20:
		tmp = t_0 / (t_2 / math.pow(math.hypot(x_46_re, x_46_im), y_46_re))
	elif y_46_re <= 1.15e+188:
		tmp = (y_46_re * (math.atan2(x_46_im, x_46_re) + (-0.16666666666666666 * (math.pow(math.atan2(x_46_im, x_46_re), 3.0) * (y_46_re * y_46_re))))) * math.pow(math.hypot(x_46_im, x_46_re), y_46_re)
	else:
		tmp = t_1
	return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im)
	t_0 = sin(Float64(y_46_re * atan(x_46_im, x_46_re)))
	t_1 = Float64(t_0 * (Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)) ^ Float64(y_46_re / 2.0)))
	t_2 = exp(Float64(atan(x_46_im, x_46_re) * y_46_im))
	tmp = 0.0
	if (y_46_re <= -8.6)
		tmp = t_1;
	elseif (y_46_re <= 1.6e-143)
		tmp = Float64(Float64(y_46_im * log(hypot(x_46_re, x_46_im))) / t_2);
	elseif (y_46_re <= 8e+20)
		tmp = Float64(t_0 / Float64(t_2 / (hypot(x_46_re, x_46_im) ^ y_46_re)));
	elseif (y_46_re <= 1.15e+188)
		tmp = Float64(Float64(y_46_re * Float64(atan(x_46_im, x_46_re) + Float64(-0.16666666666666666 * Float64((atan(x_46_im, x_46_re) ^ 3.0) * Float64(y_46_re * y_46_re))))) * (hypot(x_46_im, x_46_re) ^ y_46_re));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im)
	t_0 = sin((y_46_re * atan2(x_46_im, x_46_re)));
	t_1 = t_0 * (((x_46_re * x_46_re) + (x_46_im * x_46_im)) ^ (y_46_re / 2.0));
	t_2 = exp((atan2(x_46_im, x_46_re) * y_46_im));
	tmp = 0.0;
	if (y_46_re <= -8.6)
		tmp = t_1;
	elseif (y_46_re <= 1.6e-143)
		tmp = (y_46_im * log(hypot(x_46_re, x_46_im))) / t_2;
	elseif (y_46_re <= 8e+20)
		tmp = t_0 / (t_2 / (hypot(x_46_re, x_46_im) ^ y_46_re));
	elseif (y_46_re <= 1.15e+188)
		tmp = (y_46_re * (atan2(x_46_im, x_46_re) + (-0.16666666666666666 * ((atan2(x_46_im, x_46_re) ^ 3.0) * (y_46_re * y_46_re))))) * (hypot(x_46_im, x_46_re) ^ y_46_re);
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(t$95$0 * N[Power[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision], N[(y$46$re / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -8.6], t$95$1, If[LessEqual[y$46$re, 1.6e-143], N[(N[(y$46$im * N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision], If[LessEqual[y$46$re, 8e+20], N[(t$95$0 / N[(t$95$2 / N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 1.15e+188], N[(N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] + N[(-0.16666666666666666 * N[(N[Power[N[ArcTan[x$46$im / x$46$re], $MachinePrecision], 3.0], $MachinePrecision] * N[(y$46$re * y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
t_1 := t\_0 \cdot {\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\left(\frac{y.re}{2}\right)}\\
t_2 := e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\
\mathbf{if}\;y.re \leq -8.6:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y.re \leq 1.6 \cdot 10^{-143}:\\
\;\;\;\;\frac{y.im \cdot \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)}{t\_2}\\

\mathbf{elif}\;y.re \leq 8 \cdot 10^{+20}:\\
\;\;\;\;\frac{t\_0}{\frac{t\_2}{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}}\\

\mathbf{elif}\;y.re \leq 1.15 \cdot 10^{+188}:\\
\;\;\;\;\left(y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} + -0.16666666666666666 \cdot \left({\tan^{-1}_* \frac{x.im}{x.re}}^{3} \cdot \left(y.re \cdot y.re\right)\right)\right)\right) \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y.re < -8.59999999999999964 or 1.15000000000000006e188 < y.re

    1. Initial program 44.2%

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \left({\left(\sqrt{{x.im}^{2} + \color{blue}{{x.re}^{2}}}\right)}^{y.re}\right)\right) \]
      5. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right), \color{blue}{y.re}\right)\right) \]
      6. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right), y.re\right)\right) \]
      7. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right), y.re\right)\right) \]
      8. hypot-defineN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(\left(\mathsf{hypot}\left(x.im, x.re\right)\right), y.re\right)\right) \]
      9. hypot-lowering-hypot.f6480.4%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right)\right) \]
    5. Simplified80.4%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \left(x.re \cdot x.re\right)\right), \left(\frac{y.re}{2}\right)\right), \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \mathsf{*.f64}\left(x.re, x.re\right)\right), \left(\frac{y.re}{2}\right)\right), \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
      12. /-lowering-/.f64N/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \mathsf{*.f64}\left(x.re, x.re\right)\right), \mathsf{/.f64}\left(y.re, 2\right)\right), \mathsf{sin.f64}\left(\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
      14. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \mathsf{*.f64}\left(x.re, x.re\right)\right), \mathsf{/.f64}\left(y.re, 2\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
      15. atan2-lowering-atan2.f6480.4%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \mathsf{*.f64}\left(x.re, x.re\right)\right), \mathsf{/.f64}\left(y.re, 2\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
    7. Applied egg-rr80.4%

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

    if -8.59999999999999964 < y.re < 1.5999999999999999e-143

    1. Initial program 36.9%

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

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

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

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

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

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

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

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

      \[\leadsto \mathsf{/.f64}\left(\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)}, \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
    6. Step-by-step derivation
      1. +-lowering-+.f64N/A

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{*.f64}\left(y.im, \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)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      6. *-commutativeN/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right), \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      8. log-lowering-log.f64N/A

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)\right), \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      11. hypot-defineN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{log.f64}\left(\left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right), \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      12. hypot-lowering-hypot.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right), \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      13. cos-lowering-cos.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right), \mathsf{cos.f64}\left(\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      14. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      15. atan2-lowering-atan2.f6481.2%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
    7. Simplified81.2%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \mathsf{*.f64}\left(x.re, x.re\right)\right)\right)\right)\right), \mathsf{exp.f64}\left(\left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \mathsf{*.f64}\left(x.re, x.re\right)\right)\right)\right)\right), \mathsf{exp.f64}\left(\mathsf{*.f64}\left(y.im, \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
      12. atan2-lowering-atan2.f6436.8%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \mathsf{*.f64}\left(x.re, x.re\right)\right)\right)\right)\right), \mathsf{exp.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
    10. Simplified36.8%

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)\right)\right), \mathsf{exp.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
      2. hypot-defineN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\mathsf{hypot}\left(x.re, x.im\right)\right)\right)\right), \mathsf{exp.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{atan2.f64}\left(\color{blue}{x.im}, x.re\right)\right)\right)\right) \]
      3. hypot-lowering-hypot.f6471.4%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right)\right)\right), \mathsf{exp.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{atan2.f64}\left(\color{blue}{x.im}, x.re\right)\right)\right)\right) \]
    12. Applied egg-rr71.4%

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

    if 1.5999999999999999e-143 < y.re < 8e20

    1. Initial program 44.5%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)}\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      3. atan2-lowering-atan2.f6471.8%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), \color{blue}{y.im}\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
    7. Simplified71.8%

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

    if 8e20 < y.re < 1.15000000000000006e188

    1. Initial program 46.2%

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \left({\left(\sqrt{{x.im}^{2} + \color{blue}{{x.re}^{2}}}\right)}^{y.re}\right)\right) \]
      5. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right), \color{blue}{y.re}\right)\right) \]
      6. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right), y.re\right)\right) \]
      7. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right), y.re\right)\right) \]
      8. hypot-defineN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(\left(\mathsf{hypot}\left(x.im, x.re\right)\right), y.re\right)\right) \]
      9. hypot-lowering-hypot.f6442.4%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right)\right) \]
    5. Simplified42.4%

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(y.re, \left(\frac{-1}{6} \cdot \left({y.re}^{2} \cdot {\tan^{-1}_* \frac{x.im}{x.re}}^{3}\right) + \tan^{-1}_* \frac{x.im}{x.re}\right)\right), \mathsf{pow.f64}\left(\color{blue}{\mathsf{hypot.f64}\left(x.im, x.re\right)}, y.re\right)\right) \]
      2. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{+.f64}\left(\left(\frac{-1}{6} \cdot \left({y.re}^{2} \cdot {\tan^{-1}_* \frac{x.im}{x.re}}^{3}\right)\right), \tan^{-1}_* \frac{x.im}{x.re}\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, \color{blue}{x.re}\right), y.re\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{-1}{6}, \left({y.re}^{2} \cdot {\tan^{-1}_* \frac{x.im}{x.re}}^{3}\right)\right), \tan^{-1}_* \frac{x.im}{x.re}\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{-1}{6}, \mathsf{*.f64}\left(\left({y.re}^{2}\right), \left({\tan^{-1}_* \frac{x.im}{x.re}}^{3}\right)\right)\right), \tan^{-1}_* \frac{x.im}{x.re}\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right)\right) \]
      5. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{-1}{6}, \mathsf{*.f64}\left(\left(y.re \cdot y.re\right), \left({\tan^{-1}_* \frac{x.im}{x.re}}^{3}\right)\right)\right), \tan^{-1}_* \frac{x.im}{x.re}\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{-1}{6}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y.re, y.re\right), \left({\tan^{-1}_* \frac{x.im}{x.re}}^{3}\right)\right)\right), \tan^{-1}_* \frac{x.im}{x.re}\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right)\right) \]
      7. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{-1}{6}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y.re, y.re\right), \mathsf{pow.f64}\left(\tan^{-1}_* \frac{x.im}{x.re}, 3\right)\right)\right), \tan^{-1}_* \frac{x.im}{x.re}\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right)\right) \]
      8. atan2-lowering-atan2.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{-1}{6}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y.re, y.re\right), \mathsf{pow.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), 3\right)\right)\right), \tan^{-1}_* \frac{x.im}{x.re}\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right)\right) \]
      9. atan2-lowering-atan2.f6465.4%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{-1}{6}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(y.re, y.re\right), \mathsf{pow.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), 3\right)\right)\right), \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right)\right) \]
    8. Simplified65.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y.re \leq -8.6:\\ \;\;\;\;\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\left(\frac{y.re}{2}\right)}\\ \mathbf{elif}\;y.re \leq 1.6 \cdot 10^{-143}:\\ \;\;\;\;\frac{y.im \cdot \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\\ \mathbf{elif}\;y.re \leq 8 \cdot 10^{+20}:\\ \;\;\;\;\frac{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}{\frac{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}}\\ \mathbf{elif}\;y.re \leq 1.15 \cdot 10^{+188}:\\ \;\;\;\;\left(y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} + -0.16666666666666666 \cdot \left({\tan^{-1}_* \frac{x.im}{x.re}}^{3} \cdot \left(y.re \cdot y.re\right)\right)\right)\right) \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\ \mathbf{else}:\\ \;\;\;\;\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\left(\frac{y.re}{2}\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 72.7% accurate, 1.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\ t_1 := x.re \cdot x.re + x.im \cdot x.im\\ t_2 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {t\_1}^{\left(\frac{y.re}{2}\right)}\\ \mathbf{if}\;y.re \leq -0.0055:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;y.re \leq 40:\\ \;\;\;\;\frac{\sin \left(y.im \cdot \left(\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right) + y.re \cdot \frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.im}\right)\right)}{t\_0}\\ \mathbf{elif}\;y.re \leq 4.9 \cdot 10^{+176}:\\ \;\;\;\;\frac{\frac{\log t\_1}{\frac{2}{y.im}}}{t\_0}\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x.re x.im y.re y.im)
 :precision binary64
 (let* ((t_0 (exp (* (atan2 x.im x.re) y.im)))
        (t_1 (+ (* x.re x.re) (* x.im x.im)))
        (t_2 (* (sin (* y.re (atan2 x.im x.re))) (pow t_1 (/ y.re 2.0)))))
   (if (<= y.re -0.0055)
     t_2
     (if (<= y.re 40.0)
       (/
        (sin
         (*
          y.im
          (+ (log (hypot x.im x.re)) (* y.re (/ (atan2 x.im x.re) y.im)))))
        t_0)
       (if (<= y.re 4.9e+176) (/ (/ (log t_1) (/ 2.0 y.im)) t_0) t_2)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
	double t_0 = exp((atan2(x_46_im, x_46_re) * y_46_im));
	double t_1 = (x_46_re * x_46_re) + (x_46_im * x_46_im);
	double t_2 = sin((y_46_re * atan2(x_46_im, x_46_re))) * pow(t_1, (y_46_re / 2.0));
	double tmp;
	if (y_46_re <= -0.0055) {
		tmp = t_2;
	} else if (y_46_re <= 40.0) {
		tmp = sin((y_46_im * (log(hypot(x_46_im, x_46_re)) + (y_46_re * (atan2(x_46_im, x_46_re) / y_46_im))))) / t_0;
	} else if (y_46_re <= 4.9e+176) {
		tmp = (log(t_1) / (2.0 / y_46_im)) / t_0;
	} else {
		tmp = t_2;
	}
	return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
	double t_0 = Math.exp((Math.atan2(x_46_im, x_46_re) * y_46_im));
	double t_1 = (x_46_re * x_46_re) + (x_46_im * x_46_im);
	double t_2 = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re))) * Math.pow(t_1, (y_46_re / 2.0));
	double tmp;
	if (y_46_re <= -0.0055) {
		tmp = t_2;
	} else if (y_46_re <= 40.0) {
		tmp = Math.sin((y_46_im * (Math.log(Math.hypot(x_46_im, x_46_re)) + (y_46_re * (Math.atan2(x_46_im, x_46_re) / y_46_im))))) / t_0;
	} else if (y_46_re <= 4.9e+176) {
		tmp = (Math.log(t_1) / (2.0 / y_46_im)) / t_0;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im):
	t_0 = math.exp((math.atan2(x_46_im, x_46_re) * y_46_im))
	t_1 = (x_46_re * x_46_re) + (x_46_im * x_46_im)
	t_2 = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) * math.pow(t_1, (y_46_re / 2.0))
	tmp = 0
	if y_46_re <= -0.0055:
		tmp = t_2
	elif y_46_re <= 40.0:
		tmp = math.sin((y_46_im * (math.log(math.hypot(x_46_im, x_46_re)) + (y_46_re * (math.atan2(x_46_im, x_46_re) / y_46_im))))) / t_0
	elif y_46_re <= 4.9e+176:
		tmp = (math.log(t_1) / (2.0 / y_46_im)) / t_0
	else:
		tmp = t_2
	return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im)
	t_0 = exp(Float64(atan(x_46_im, x_46_re) * y_46_im))
	t_1 = Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))
	t_2 = Float64(sin(Float64(y_46_re * atan(x_46_im, x_46_re))) * (t_1 ^ Float64(y_46_re / 2.0)))
	tmp = 0.0
	if (y_46_re <= -0.0055)
		tmp = t_2;
	elseif (y_46_re <= 40.0)
		tmp = Float64(sin(Float64(y_46_im * Float64(log(hypot(x_46_im, x_46_re)) + Float64(y_46_re * Float64(atan(x_46_im, x_46_re) / y_46_im))))) / t_0);
	elseif (y_46_re <= 4.9e+176)
		tmp = Float64(Float64(log(t_1) / Float64(2.0 / y_46_im)) / t_0);
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im)
	t_0 = exp((atan2(x_46_im, x_46_re) * y_46_im));
	t_1 = (x_46_re * x_46_re) + (x_46_im * x_46_im);
	t_2 = sin((y_46_re * atan2(x_46_im, x_46_re))) * (t_1 ^ (y_46_re / 2.0));
	tmp = 0.0;
	if (y_46_re <= -0.0055)
		tmp = t_2;
	elseif (y_46_re <= 40.0)
		tmp = sin((y_46_im * (log(hypot(x_46_im, x_46_re)) + (y_46_re * (atan2(x_46_im, x_46_re) / y_46_im))))) / t_0;
	elseif (y_46_re <= 4.9e+176)
		tmp = (log(t_1) / (2.0 / y_46_im)) / t_0;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Power[t$95$1, N[(y$46$re / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -0.0055], t$95$2, If[LessEqual[y$46$re, 40.0], N[(N[Sin[N[(y$46$im * N[(N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision] + N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] / y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t$95$0), $MachinePrecision], If[LessEqual[y$46$re, 4.9e+176], N[(N[(N[Log[t$95$1], $MachinePrecision] / N[(2.0 / y$46$im), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision], t$95$2]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\
t_1 := x.re \cdot x.re + x.im \cdot x.im\\
t_2 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {t\_1}^{\left(\frac{y.re}{2}\right)}\\
\mathbf{if}\;y.re \leq -0.0055:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;y.re \leq 40:\\
\;\;\;\;\frac{\sin \left(y.im \cdot \left(\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right) + y.re \cdot \frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.im}\right)\right)}{t\_0}\\

\mathbf{elif}\;y.re \leq 4.9 \cdot 10^{+176}:\\
\;\;\;\;\frac{\frac{\log t\_1}{\frac{2}{y.im}}}{t\_0}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y.re < -0.0054999999999999997 or 4.9e176 < y.re

    1. Initial program 45.6%

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \left({\left(\sqrt{{x.im}^{2} + \color{blue}{{x.re}^{2}}}\right)}^{y.re}\right)\right) \]
      5. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right), \color{blue}{y.re}\right)\right) \]
      6. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right), y.re\right)\right) \]
      7. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right), y.re\right)\right) \]
      8. hypot-defineN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(\left(\mathsf{hypot}\left(x.im, x.re\right)\right), y.re\right)\right) \]
      9. hypot-lowering-hypot.f6479.0%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right)\right) \]
    5. Simplified79.0%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \left(x.re \cdot x.re\right)\right), \left(\frac{y.re}{2}\right)\right), \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \mathsf{*.f64}\left(x.re, x.re\right)\right), \left(\frac{y.re}{2}\right)\right), \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
      12. /-lowering-/.f64N/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \mathsf{*.f64}\left(x.re, x.re\right)\right), \mathsf{/.f64}\left(y.re, 2\right)\right), \mathsf{sin.f64}\left(\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
      14. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \mathsf{*.f64}\left(x.re, x.re\right)\right), \mathsf{/.f64}\left(y.re, 2\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
      15. atan2-lowering-atan2.f6479.0%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \mathsf{*.f64}\left(x.re, x.re\right)\right), \mathsf{/.f64}\left(y.re, 2\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
    7. Applied egg-rr79.0%

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

    if -0.0054999999999999997 < y.re < 40

    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. Step-by-step derivation
      1. exp-diffN/A

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{+.f64}\left(\mathsf{log.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right), \left(\frac{y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}}{y.im}\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      4. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{+.f64}\left(\mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right)\right), \left(\frac{y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}}{y.im}\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      5. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{+.f64}\left(\mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)\right), \left(\frac{y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}}{y.im}\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      6. hypot-defineN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{+.f64}\left(\mathsf{log.f64}\left(\left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right), \left(\frac{y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}}{y.im}\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      7. hypot-lowering-hypot.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right), \left(\frac{y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}}{y.im}\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      8. associate-/l*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right), \left(y.re \cdot \frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.im}\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right), \mathsf{*.f64}\left(y.re, \left(\frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.im}\right)\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      10. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right), \mathsf{*.f64}\left(y.re, \mathsf{/.f64}\left(\tan^{-1}_* \frac{x.im}{x.re}, y.im\right)\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      11. atan2-lowering-atan2.f6481.7%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right), \mathsf{*.f64}\left(y.re, \mathsf{/.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
    7. Simplified81.7%

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right), \mathsf{*.f64}\left(y.re, \mathsf{/.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right)\right)\right), \mathsf{exp.f64}\left(\mathsf{*.f64}\left(y.im, \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
      3. atan2-lowering-atan2.f6479.9%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{+.f64}\left(\mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right), \mathsf{*.f64}\left(y.re, \mathsf{/.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)\right)\right)\right), \mathsf{exp.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
    10. Simplified79.9%

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

    if 40 < y.re < 4.9e176

    1. Initial program 32.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. Step-by-step derivation
      1. exp-diffN/A

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

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

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

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

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

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

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

      \[\leadsto \mathsf{/.f64}\left(\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)}, \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
    6. Step-by-step derivation
      1. +-lowering-+.f64N/A

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{*.f64}\left(y.im, \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)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      6. *-commutativeN/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right), \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      8. log-lowering-log.f64N/A

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)\right), \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      11. hypot-defineN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{log.f64}\left(\left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right), \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      12. hypot-lowering-hypot.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right), \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      13. cos-lowering-cos.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right), \mathsf{cos.f64}\left(\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      14. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      15. atan2-lowering-atan2.f6464.5%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
    7. Simplified64.5%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \mathsf{*.f64}\left(x.re, x.re\right)\right)\right)\right)\right), \mathsf{exp.f64}\left(\left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \mathsf{*.f64}\left(x.re, x.re\right)\right)\right)\right)\right), \mathsf{exp.f64}\left(\mathsf{*.f64}\left(y.im, \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
      12. atan2-lowering-atan2.f6445.7%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \mathsf{*.f64}\left(x.re, x.re\right)\right)\right)\right)\right), \mathsf{exp.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
    10. Simplified45.7%

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

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

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

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

        \[\leadsto \mathsf{neg.f64}\left(\left(\frac{y.im \cdot \log \left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)}{\mathsf{neg}\left(e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\right)}\right)\right) \]
    12. Applied egg-rr61.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y.re \leq -0.0055:\\ \;\;\;\;\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\left(\frac{y.re}{2}\right)}\\ \mathbf{elif}\;y.re \leq 40:\\ \;\;\;\;\frac{\sin \left(y.im \cdot \left(\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right) + y.re \cdot \frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.im}\right)\right)}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\\ \mathbf{elif}\;y.re \leq 4.9 \cdot 10^{+176}:\\ \;\;\;\;\frac{\frac{\log \left(x.re \cdot x.re + x.im \cdot x.im\right)}{\frac{2}{y.im}}}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\\ \mathbf{else}:\\ \;\;\;\;\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\left(\frac{y.re}{2}\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 62.3% accurate, 2.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\ t_1 := e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\ t_2 := x.re \cdot x.re + x.im \cdot x.im\\ t_3 := \sin t\_0 \cdot {t\_2}^{\left(\frac{y.re}{2}\right)}\\ \mathbf{if}\;y.re \leq -1.4:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;y.re \leq 3.45 \cdot 10^{-143}:\\ \;\;\;\;\frac{y.im \cdot \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)}{t\_1}\\ \mathbf{elif}\;y.re \leq 4.4 \cdot 10^{-32}:\\ \;\;\;\;\frac{t\_0}{t\_1}\\ \mathbf{elif}\;y.re \leq 3.1 \cdot 10^{+176}:\\ \;\;\;\;\frac{\frac{\log t\_2}{\frac{2}{y.im}}}{t\_1}\\ \mathbf{else}:\\ \;\;\;\;t\_3\\ \end{array} \end{array} \]
(FPCore (x.re x.im y.re y.im)
 :precision binary64
 (let* ((t_0 (* y.re (atan2 x.im x.re)))
        (t_1 (exp (* (atan2 x.im x.re) y.im)))
        (t_2 (+ (* x.re x.re) (* x.im x.im)))
        (t_3 (* (sin t_0) (pow t_2 (/ y.re 2.0)))))
   (if (<= y.re -1.4)
     t_3
     (if (<= y.re 3.45e-143)
       (/ (* y.im (log (hypot x.re x.im))) t_1)
       (if (<= y.re 4.4e-32)
         (/ t_0 t_1)
         (if (<= y.re 3.1e+176) (/ (/ (log t_2) (/ 2.0 y.im)) t_1) t_3))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
	double t_0 = y_46_re * atan2(x_46_im, x_46_re);
	double t_1 = exp((atan2(x_46_im, x_46_re) * y_46_im));
	double t_2 = (x_46_re * x_46_re) + (x_46_im * x_46_im);
	double t_3 = sin(t_0) * pow(t_2, (y_46_re / 2.0));
	double tmp;
	if (y_46_re <= -1.4) {
		tmp = t_3;
	} else if (y_46_re <= 3.45e-143) {
		tmp = (y_46_im * log(hypot(x_46_re, x_46_im))) / t_1;
	} else if (y_46_re <= 4.4e-32) {
		tmp = t_0 / t_1;
	} else if (y_46_re <= 3.1e+176) {
		tmp = (log(t_2) / (2.0 / y_46_im)) / t_1;
	} else {
		tmp = t_3;
	}
	return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
	double t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
	double t_1 = Math.exp((Math.atan2(x_46_im, x_46_re) * y_46_im));
	double t_2 = (x_46_re * x_46_re) + (x_46_im * x_46_im);
	double t_3 = Math.sin(t_0) * Math.pow(t_2, (y_46_re / 2.0));
	double tmp;
	if (y_46_re <= -1.4) {
		tmp = t_3;
	} else if (y_46_re <= 3.45e-143) {
		tmp = (y_46_im * Math.log(Math.hypot(x_46_re, x_46_im))) / t_1;
	} else if (y_46_re <= 4.4e-32) {
		tmp = t_0 / t_1;
	} else if (y_46_re <= 3.1e+176) {
		tmp = (Math.log(t_2) / (2.0 / y_46_im)) / t_1;
	} else {
		tmp = t_3;
	}
	return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im):
	t_0 = y_46_re * math.atan2(x_46_im, x_46_re)
	t_1 = math.exp((math.atan2(x_46_im, x_46_re) * y_46_im))
	t_2 = (x_46_re * x_46_re) + (x_46_im * x_46_im)
	t_3 = math.sin(t_0) * math.pow(t_2, (y_46_re / 2.0))
	tmp = 0
	if y_46_re <= -1.4:
		tmp = t_3
	elif y_46_re <= 3.45e-143:
		tmp = (y_46_im * math.log(math.hypot(x_46_re, x_46_im))) / t_1
	elif y_46_re <= 4.4e-32:
		tmp = t_0 / t_1
	elif y_46_re <= 3.1e+176:
		tmp = (math.log(t_2) / (2.0 / y_46_im)) / t_1
	else:
		tmp = t_3
	return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im)
	t_0 = Float64(y_46_re * atan(x_46_im, x_46_re))
	t_1 = exp(Float64(atan(x_46_im, x_46_re) * y_46_im))
	t_2 = Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))
	t_3 = Float64(sin(t_0) * (t_2 ^ Float64(y_46_re / 2.0)))
	tmp = 0.0
	if (y_46_re <= -1.4)
		tmp = t_3;
	elseif (y_46_re <= 3.45e-143)
		tmp = Float64(Float64(y_46_im * log(hypot(x_46_re, x_46_im))) / t_1);
	elseif (y_46_re <= 4.4e-32)
		tmp = Float64(t_0 / t_1);
	elseif (y_46_re <= 3.1e+176)
		tmp = Float64(Float64(log(t_2) / Float64(2.0 / y_46_im)) / t_1);
	else
		tmp = t_3;
	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 = exp((atan2(x_46_im, x_46_re) * y_46_im));
	t_2 = (x_46_re * x_46_re) + (x_46_im * x_46_im);
	t_3 = sin(t_0) * (t_2 ^ (y_46_re / 2.0));
	tmp = 0.0;
	if (y_46_re <= -1.4)
		tmp = t_3;
	elseif (y_46_re <= 3.45e-143)
		tmp = (y_46_im * log(hypot(x_46_re, x_46_im))) / t_1;
	elseif (y_46_re <= 4.4e-32)
		tmp = t_0 / t_1;
	elseif (y_46_re <= 3.1e+176)
		tmp = (log(t_2) / (2.0 / y_46_im)) / t_1;
	else
		tmp = t_3;
	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[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[Sin[t$95$0], $MachinePrecision] * N[Power[t$95$2, N[(y$46$re / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -1.4], t$95$3, If[LessEqual[y$46$re, 3.45e-143], N[(N[(y$46$im * N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], If[LessEqual[y$46$re, 4.4e-32], N[(t$95$0 / t$95$1), $MachinePrecision], If[LessEqual[y$46$re, 3.1e+176], N[(N[(N[Log[t$95$2], $MachinePrecision] / N[(2.0 / y$46$im), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], t$95$3]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\
t_2 := x.re \cdot x.re + x.im \cdot x.im\\
t_3 := \sin t\_0 \cdot {t\_2}^{\left(\frac{y.re}{2}\right)}\\
\mathbf{if}\;y.re \leq -1.4:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;y.re \leq 3.45 \cdot 10^{-143}:\\
\;\;\;\;\frac{y.im \cdot \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)}{t\_1}\\

\mathbf{elif}\;y.re \leq 4.4 \cdot 10^{-32}:\\
\;\;\;\;\frac{t\_0}{t\_1}\\

\mathbf{elif}\;y.re \leq 3.1 \cdot 10^{+176}:\\
\;\;\;\;\frac{\frac{\log t\_2}{\frac{2}{y.im}}}{t\_1}\\

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


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

    1. Initial program 45.6%

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \left({\left(\sqrt{{x.im}^{2} + \color{blue}{{x.re}^{2}}}\right)}^{y.re}\right)\right) \]
      5. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right), \color{blue}{y.re}\right)\right) \]
      6. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right), y.re\right)\right) \]
      7. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right), y.re\right)\right) \]
      8. hypot-defineN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(\left(\mathsf{hypot}\left(x.im, x.re\right)\right), y.re\right)\right) \]
      9. hypot-lowering-hypot.f6479.0%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right)\right) \]
    5. Simplified79.0%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \left(x.re \cdot x.re\right)\right), \left(\frac{y.re}{2}\right)\right), \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \mathsf{*.f64}\left(x.re, x.re\right)\right), \left(\frac{y.re}{2}\right)\right), \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
      12. /-lowering-/.f64N/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \mathsf{*.f64}\left(x.re, x.re\right)\right), \mathsf{/.f64}\left(y.re, 2\right)\right), \mathsf{sin.f64}\left(\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
      14. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \mathsf{*.f64}\left(x.re, x.re\right)\right), \mathsf{/.f64}\left(y.re, 2\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
      15. atan2-lowering-atan2.f6479.0%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \mathsf{*.f64}\left(x.re, x.re\right)\right), \mathsf{/.f64}\left(y.re, 2\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
    7. Applied egg-rr79.0%

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

    if -1.3999999999999999 < y.re < 3.44999999999999994e-143

    1. Initial program 36.9%

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

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

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

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

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

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

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

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

      \[\leadsto \mathsf{/.f64}\left(\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)}, \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
    6. Step-by-step derivation
      1. +-lowering-+.f64N/A

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{*.f64}\left(y.im, \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)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      6. *-commutativeN/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right), \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      8. log-lowering-log.f64N/A

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)\right), \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      11. hypot-defineN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{log.f64}\left(\left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right), \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      12. hypot-lowering-hypot.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right), \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      13. cos-lowering-cos.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right), \mathsf{cos.f64}\left(\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      14. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      15. atan2-lowering-atan2.f6481.2%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
    7. Simplified81.2%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \mathsf{*.f64}\left(x.re, x.re\right)\right)\right)\right)\right), \mathsf{exp.f64}\left(\left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \mathsf{*.f64}\left(x.re, x.re\right)\right)\right)\right)\right), \mathsf{exp.f64}\left(\mathsf{*.f64}\left(y.im, \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
      12. atan2-lowering-atan2.f6436.8%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \mathsf{*.f64}\left(x.re, x.re\right)\right)\right)\right)\right), \mathsf{exp.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
    10. Simplified36.8%

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)\right)\right), \mathsf{exp.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
      2. hypot-defineN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\mathsf{hypot}\left(x.re, x.im\right)\right)\right)\right), \mathsf{exp.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{atan2.f64}\left(\color{blue}{x.im}, x.re\right)\right)\right)\right) \]
      3. hypot-lowering-hypot.f6471.4%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right)\right)\right), \mathsf{exp.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{atan2.f64}\left(\color{blue}{x.im}, x.re\right)\right)\right)\right) \]
    12. Applied egg-rr71.4%

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

    if 3.44999999999999994e-143 < y.re < 4.4e-32

    1. Initial program 49.9%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)}\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      3. atan2-lowering-atan2.f6480.7%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), \color{blue}{y.im}\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
    7. Simplified80.7%

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right), \mathsf{exp.f64}\left(\left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right), \mathsf{exp.f64}\left(\mathsf{*.f64}\left(y.im, \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
      6. atan2-lowering-atan2.f6480.7%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right), \mathsf{exp.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
    10. Simplified80.7%

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

    if 4.4e-32 < y.re < 3.0999999999999999e176

    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. Step-by-step derivation
      1. exp-diffN/A

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

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

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

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

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

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

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

      \[\leadsto \mathsf{/.f64}\left(\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)}, \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
    6. Step-by-step derivation
      1. +-lowering-+.f64N/A

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{*.f64}\left(y.im, \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)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      6. *-commutativeN/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right), \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      8. log-lowering-log.f64N/A

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)\right), \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      11. hypot-defineN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{log.f64}\left(\left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right), \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      12. hypot-lowering-hypot.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right), \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      13. cos-lowering-cos.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right), \mathsf{cos.f64}\left(\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      14. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      15. atan2-lowering-atan2.f6467.5%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
    7. Simplified67.5%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \mathsf{*.f64}\left(x.re, x.re\right)\right)\right)\right)\right), \mathsf{exp.f64}\left(\left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \mathsf{*.f64}\left(x.re, x.re\right)\right)\right)\right)\right), \mathsf{exp.f64}\left(\mathsf{*.f64}\left(y.im, \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
      12. atan2-lowering-atan2.f6443.0%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \mathsf{*.f64}\left(x.re, x.re\right)\right)\right)\right)\right), \mathsf{exp.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
    10. Simplified43.0%

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

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

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

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

        \[\leadsto \mathsf{neg.f64}\left(\left(\frac{y.im \cdot \log \left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)}{\mathsf{neg}\left(e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\right)}\right)\right) \]
    12. Applied egg-rr60.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y.re \leq -1.4:\\ \;\;\;\;\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\left(\frac{y.re}{2}\right)}\\ \mathbf{elif}\;y.re \leq 3.45 \cdot 10^{-143}:\\ \;\;\;\;\frac{y.im \cdot \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\\ \mathbf{elif}\;y.re \leq 4.4 \cdot 10^{-32}:\\ \;\;\;\;\frac{y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\\ \mathbf{elif}\;y.re \leq 3.1 \cdot 10^{+176}:\\ \;\;\;\;\frac{\frac{\log \left(x.re \cdot x.re + x.im \cdot x.im\right)}{\frac{2}{y.im}}}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\\ \mathbf{else}:\\ \;\;\;\;\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\left(\frac{y.re}{2}\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 56.4% accurate, 2.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\ t_1 := x.re \cdot x.re + x.im \cdot x.im\\ t_2 := \sin t\_0 \cdot {t\_1}^{\left(\frac{y.re}{2}\right)}\\ t_3 := e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\ \mathbf{if}\;y.re \leq -1.2:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;y.re \leq 4.4 \cdot 10^{-32}:\\ \;\;\;\;\frac{t\_0}{t\_3}\\ \mathbf{elif}\;y.re \leq 9.5 \cdot 10^{+177}:\\ \;\;\;\;\frac{\frac{\log t\_1}{\frac{2}{y.im}}}{t\_3}\\ \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 (+ (* x.re x.re) (* x.im x.im)))
        (t_2 (* (sin t_0) (pow t_1 (/ y.re 2.0))))
        (t_3 (exp (* (atan2 x.im x.re) y.im))))
   (if (<= y.re -1.2)
     t_2
     (if (<= y.re 4.4e-32)
       (/ t_0 t_3)
       (if (<= y.re 9.5e+177) (/ (/ (log t_1) (/ 2.0 y.im)) t_3) 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 = (x_46_re * x_46_re) + (x_46_im * x_46_im);
	double t_2 = sin(t_0) * pow(t_1, (y_46_re / 2.0));
	double t_3 = exp((atan2(x_46_im, x_46_re) * y_46_im));
	double tmp;
	if (y_46_re <= -1.2) {
		tmp = t_2;
	} else if (y_46_re <= 4.4e-32) {
		tmp = t_0 / t_3;
	} else if (y_46_re <= 9.5e+177) {
		tmp = (log(t_1) / (2.0 / y_46_im)) / t_3;
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
    real(8), intent (in) :: x_46re
    real(8), intent (in) :: x_46im
    real(8), intent (in) :: y_46re
    real(8), intent (in) :: y_46im
    real(8) :: t_0
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: t_3
    real(8) :: tmp
    t_0 = y_46re * atan2(x_46im, x_46re)
    t_1 = (x_46re * x_46re) + (x_46im * x_46im)
    t_2 = sin(t_0) * (t_1 ** (y_46re / 2.0d0))
    t_3 = exp((atan2(x_46im, x_46re) * y_46im))
    if (y_46re <= (-1.2d0)) then
        tmp = t_2
    else if (y_46re <= 4.4d-32) then
        tmp = t_0 / t_3
    else if (y_46re <= 9.5d+177) then
        tmp = (log(t_1) / (2.0d0 / y_46im)) / t_3
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
	double t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
	double t_1 = (x_46_re * x_46_re) + (x_46_im * x_46_im);
	double t_2 = Math.sin(t_0) * Math.pow(t_1, (y_46_re / 2.0));
	double t_3 = Math.exp((Math.atan2(x_46_im, x_46_re) * y_46_im));
	double tmp;
	if (y_46_re <= -1.2) {
		tmp = t_2;
	} else if (y_46_re <= 4.4e-32) {
		tmp = t_0 / t_3;
	} else if (y_46_re <= 9.5e+177) {
		tmp = (Math.log(t_1) / (2.0 / y_46_im)) / t_3;
	} else {
		tmp = t_2;
	}
	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 = (x_46_re * x_46_re) + (x_46_im * x_46_im)
	t_2 = math.sin(t_0) * math.pow(t_1, (y_46_re / 2.0))
	t_3 = math.exp((math.atan2(x_46_im, x_46_re) * y_46_im))
	tmp = 0
	if y_46_re <= -1.2:
		tmp = t_2
	elif y_46_re <= 4.4e-32:
		tmp = t_0 / t_3
	elif y_46_re <= 9.5e+177:
		tmp = (math.log(t_1) / (2.0 / y_46_im)) / t_3
	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 = Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))
	t_2 = Float64(sin(t_0) * (t_1 ^ Float64(y_46_re / 2.0)))
	t_3 = exp(Float64(atan(x_46_im, x_46_re) * y_46_im))
	tmp = 0.0
	if (y_46_re <= -1.2)
		tmp = t_2;
	elseif (y_46_re <= 4.4e-32)
		tmp = Float64(t_0 / t_3);
	elseif (y_46_re <= 9.5e+177)
		tmp = Float64(Float64(log(t_1) / Float64(2.0 / y_46_im)) / t_3);
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im)
	t_0 = y_46_re * atan2(x_46_im, x_46_re);
	t_1 = (x_46_re * x_46_re) + (x_46_im * x_46_im);
	t_2 = sin(t_0) * (t_1 ^ (y_46_re / 2.0));
	t_3 = exp((atan2(x_46_im, x_46_re) * y_46_im));
	tmp = 0.0;
	if (y_46_re <= -1.2)
		tmp = t_2;
	elseif (y_46_re <= 4.4e-32)
		tmp = t_0 / t_3;
	elseif (y_46_re <= 9.5e+177)
		tmp = (log(t_1) / (2.0 / y_46_im)) / t_3;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[Sin[t$95$0], $MachinePrecision] * N[Power[t$95$1, N[(y$46$re / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -1.2], t$95$2, If[LessEqual[y$46$re, 4.4e-32], N[(t$95$0 / t$95$3), $MachinePrecision], If[LessEqual[y$46$re, 9.5e+177], N[(N[(N[Log[t$95$1], $MachinePrecision] / N[(2.0 / y$46$im), $MachinePrecision]), $MachinePrecision] / t$95$3), $MachinePrecision], t$95$2]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := x.re \cdot x.re + x.im \cdot x.im\\
t_2 := \sin t\_0 \cdot {t\_1}^{\left(\frac{y.re}{2}\right)}\\
t_3 := e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\
\mathbf{if}\;y.re \leq -1.2:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;y.re \leq 4.4 \cdot 10^{-32}:\\
\;\;\;\;\frac{t\_0}{t\_3}\\

\mathbf{elif}\;y.re \leq 9.5 \cdot 10^{+177}:\\
\;\;\;\;\frac{\frac{\log t\_1}{\frac{2}{y.im}}}{t\_3}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y.re < -1.19999999999999996 or 9.49999999999999996e177 < y.re

    1. Initial program 45.6%

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \left({\left(\sqrt{{x.im}^{2} + \color{blue}{{x.re}^{2}}}\right)}^{y.re}\right)\right) \]
      5. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right), \color{blue}{y.re}\right)\right) \]
      6. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right), y.re\right)\right) \]
      7. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right), y.re\right)\right) \]
      8. hypot-defineN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(\left(\mathsf{hypot}\left(x.im, x.re\right)\right), y.re\right)\right) \]
      9. hypot-lowering-hypot.f6479.0%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right)\right) \]
    5. Simplified79.0%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \left(x.re \cdot x.re\right)\right), \left(\frac{y.re}{2}\right)\right), \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \mathsf{*.f64}\left(x.re, x.re\right)\right), \left(\frac{y.re}{2}\right)\right), \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
      12. /-lowering-/.f64N/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \mathsf{*.f64}\left(x.re, x.re\right)\right), \mathsf{/.f64}\left(y.re, 2\right)\right), \mathsf{sin.f64}\left(\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
      14. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \mathsf{*.f64}\left(x.re, x.re\right)\right), \mathsf{/.f64}\left(y.re, 2\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
      15. atan2-lowering-atan2.f6479.0%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \mathsf{*.f64}\left(x.re, x.re\right)\right), \mathsf{/.f64}\left(y.re, 2\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
    7. Applied egg-rr79.0%

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

    if -1.19999999999999996 < y.re < 4.4e-32

    1. Initial program 39.0%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)}\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      3. atan2-lowering-atan2.f6449.6%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), \color{blue}{y.im}\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
    7. Simplified49.6%

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right), \mathsf{exp.f64}\left(\left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right), \mathsf{exp.f64}\left(\mathsf{*.f64}\left(y.im, \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
      6. atan2-lowering-atan2.f6449.6%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right), \mathsf{exp.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
    10. Simplified49.6%

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

    if 4.4e-32 < y.re < 9.49999999999999996e177

    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. Step-by-step derivation
      1. exp-diffN/A

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

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

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

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

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

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

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

      \[\leadsto \mathsf{/.f64}\left(\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)}, \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
    6. Step-by-step derivation
      1. +-lowering-+.f64N/A

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{*.f64}\left(y.im, \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)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      6. *-commutativeN/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right), \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      8. log-lowering-log.f64N/A

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)\right), \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      11. hypot-defineN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{log.f64}\left(\left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right), \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      12. hypot-lowering-hypot.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right), \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      13. cos-lowering-cos.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right), \mathsf{cos.f64}\left(\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      14. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      15. atan2-lowering-atan2.f6467.5%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
    7. Simplified67.5%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \mathsf{*.f64}\left(x.re, x.re\right)\right)\right)\right)\right), \mathsf{exp.f64}\left(\left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \mathsf{*.f64}\left(x.re, x.re\right)\right)\right)\right)\right), \mathsf{exp.f64}\left(\mathsf{*.f64}\left(y.im, \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
      12. atan2-lowering-atan2.f6443.0%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \mathsf{*.f64}\left(x.re, x.re\right)\right)\right)\right)\right), \mathsf{exp.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
    10. Simplified43.0%

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

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

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

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

        \[\leadsto \mathsf{neg.f64}\left(\left(\frac{y.im \cdot \log \left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)}{\mathsf{neg}\left(e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\right)}\right)\right) \]
    12. Applied egg-rr60.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y.re \leq -1.2:\\ \;\;\;\;\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\left(\frac{y.re}{2}\right)}\\ \mathbf{elif}\;y.re \leq 4.4 \cdot 10^{-32}:\\ \;\;\;\;\frac{y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\\ \mathbf{elif}\;y.re \leq 9.5 \cdot 10^{+177}:\\ \;\;\;\;\frac{\frac{\log \left(x.re \cdot x.re + x.im \cdot x.im\right)}{\frac{2}{y.im}}}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\\ \mathbf{else}:\\ \;\;\;\;\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\left(\frac{y.re}{2}\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 59.9% accurate, 2.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\ t_1 := \sin t\_0 \cdot {\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\left(\frac{y.re}{2}\right)}\\ \mathbf{if}\;y.re \leq -1.2:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y.re \leq 0.0235:\\ \;\;\;\;\frac{t\_0}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\\ \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 (* (sin t_0) (pow (+ (* x.re x.re) (* x.im x.im)) (/ y.re 2.0)))))
   (if (<= y.re -1.2)
     t_1
     (if (<= y.re 0.0235) (/ t_0 (exp (* (atan2 x.im x.re) y.im))) t_1))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
	double t_0 = y_46_re * atan2(x_46_im, x_46_re);
	double t_1 = sin(t_0) * pow(((x_46_re * x_46_re) + (x_46_im * x_46_im)), (y_46_re / 2.0));
	double tmp;
	if (y_46_re <= -1.2) {
		tmp = t_1;
	} else if (y_46_re <= 0.0235) {
		tmp = t_0 / exp((atan2(x_46_im, x_46_re) * y_46_im));
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
    real(8), intent (in) :: x_46re
    real(8), intent (in) :: x_46im
    real(8), intent (in) :: y_46re
    real(8), intent (in) :: y_46im
    real(8) :: t_0
    real(8) :: t_1
    real(8) :: tmp
    t_0 = y_46re * atan2(x_46im, x_46re)
    t_1 = sin(t_0) * (((x_46re * x_46re) + (x_46im * x_46im)) ** (y_46re / 2.0d0))
    if (y_46re <= (-1.2d0)) then
        tmp = t_1
    else if (y_46re <= 0.0235d0) then
        tmp = t_0 / exp((atan2(x_46im, x_46re) * y_46im))
    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 = Math.sin(t_0) * Math.pow(((x_46_re * x_46_re) + (x_46_im * x_46_im)), (y_46_re / 2.0));
	double tmp;
	if (y_46_re <= -1.2) {
		tmp = t_1;
	} else if (y_46_re <= 0.0235) {
		tmp = t_0 / Math.exp((Math.atan2(x_46_im, x_46_re) * y_46_im));
	} 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 = math.sin(t_0) * math.pow(((x_46_re * x_46_re) + (x_46_im * x_46_im)), (y_46_re / 2.0))
	tmp = 0
	if y_46_re <= -1.2:
		tmp = t_1
	elif y_46_re <= 0.0235:
		tmp = t_0 / math.exp((math.atan2(x_46_im, x_46_re) * y_46_im))
	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(sin(t_0) * (Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)) ^ Float64(y_46_re / 2.0)))
	tmp = 0.0
	if (y_46_re <= -1.2)
		tmp = t_1;
	elseif (y_46_re <= 0.0235)
		tmp = Float64(t_0 / exp(Float64(atan(x_46_im, x_46_re) * y_46_im)));
	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 = sin(t_0) * (((x_46_re * x_46_re) + (x_46_im * x_46_im)) ^ (y_46_re / 2.0));
	tmp = 0.0;
	if (y_46_re <= -1.2)
		tmp = t_1;
	elseif (y_46_re <= 0.0235)
		tmp = t_0 / exp((atan2(x_46_im, x_46_re) * y_46_im));
	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[(N[Sin[t$95$0], $MachinePrecision] * N[Power[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision], N[(y$46$re / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -1.2], t$95$1, If[LessEqual[y$46$re, 0.0235], N[(t$95$0 / N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := \sin t\_0 \cdot {\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\left(\frac{y.re}{2}\right)}\\
\mathbf{if}\;y.re \leq -1.2:\\
\;\;\;\;t\_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y.re < -1.19999999999999996 or 0.0235 < y.re

    1. Initial program 42.6%

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \left({\left(\sqrt{{x.im}^{2} + \color{blue}{{x.re}^{2}}}\right)}^{y.re}\right)\right) \]
      5. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right), \color{blue}{y.re}\right)\right) \]
      6. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right), y.re\right)\right) \]
      7. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right), y.re\right)\right) \]
      8. hypot-defineN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(\left(\mathsf{hypot}\left(x.im, x.re\right)\right), y.re\right)\right) \]
      9. hypot-lowering-hypot.f6470.6%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right)\right) \]
    5. Simplified70.6%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \left(x.re \cdot x.re\right)\right), \left(\frac{y.re}{2}\right)\right), \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \mathsf{*.f64}\left(x.re, x.re\right)\right), \left(\frac{y.re}{2}\right)\right), \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
      12. /-lowering-/.f64N/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \mathsf{*.f64}\left(x.re, x.re\right)\right), \mathsf{/.f64}\left(y.re, 2\right)\right), \mathsf{sin.f64}\left(\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
      14. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \mathsf{*.f64}\left(x.re, x.re\right)\right), \mathsf{/.f64}\left(y.re, 2\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
      15. atan2-lowering-atan2.f6470.6%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \mathsf{*.f64}\left(x.re, x.re\right)\right), \mathsf{/.f64}\left(y.re, 2\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
    7. Applied egg-rr70.6%

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

    if -1.19999999999999996 < y.re < 0.0235

    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. Step-by-step derivation
      1. exp-diffN/A

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)}\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      3. atan2-lowering-atan2.f6450.5%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), \color{blue}{y.im}\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
    7. Simplified50.5%

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right), \mathsf{exp.f64}\left(\left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right), \mathsf{exp.f64}\left(\mathsf{*.f64}\left(y.im, \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
      6. atan2-lowering-atan2.f6449.6%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right), \mathsf{exp.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
    10. Simplified49.6%

      \[\leadsto \color{blue}{\frac{y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}}{e^{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification59.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y.re \leq -1.2:\\ \;\;\;\;\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\left(\frac{y.re}{2}\right)}\\ \mathbf{elif}\;y.re \leq 0.0235:\\ \;\;\;\;\frac{y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\\ \mathbf{else}:\\ \;\;\;\;\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\left(\frac{y.re}{2}\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 38.2% accurate, 2.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\ t_1 := \sin t\_0\\ \mathbf{if}\;y.re \leq -3.05 \cdot 10^{-50}:\\ \;\;\;\;t\_1 \cdot {x.re}^{y.re}\\ \mathbf{elif}\;y.re \leq 2.6 \cdot 10^{-158}:\\ \;\;\;\;\left(y.im \cdot 0.5\right) \cdot \log \left(x.re \cdot x.re + x.im \cdot x.im\right)\\ \mathbf{elif}\;y.re \leq 0.08:\\ \;\;\;\;t\_0\\ \mathbf{else}:\\ \;\;\;\;t\_1 \cdot {x.im}^{y.re}\\ \end{array} \end{array} \]
(FPCore (x.re x.im y.re y.im)
 :precision binary64
 (let* ((t_0 (* y.re (atan2 x.im x.re))) (t_1 (sin t_0)))
   (if (<= y.re -3.05e-50)
     (* t_1 (pow x.re y.re))
     (if (<= y.re 2.6e-158)
       (* (* y.im 0.5) (log (+ (* x.re x.re) (* x.im x.im))))
       (if (<= y.re 0.08) t_0 (* t_1 (pow x.im y.re)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
	double t_0 = y_46_re * atan2(x_46_im, x_46_re);
	double t_1 = sin(t_0);
	double tmp;
	if (y_46_re <= -3.05e-50) {
		tmp = t_1 * pow(x_46_re, y_46_re);
	} else if (y_46_re <= 2.6e-158) {
		tmp = (y_46_im * 0.5) * log(((x_46_re * x_46_re) + (x_46_im * x_46_im)));
	} else if (y_46_re <= 0.08) {
		tmp = t_0;
	} else {
		tmp = t_1 * pow(x_46_im, y_46_re);
	}
	return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
    real(8), intent (in) :: x_46re
    real(8), intent (in) :: x_46im
    real(8), intent (in) :: y_46re
    real(8), intent (in) :: y_46im
    real(8) :: t_0
    real(8) :: t_1
    real(8) :: tmp
    t_0 = y_46re * atan2(x_46im, x_46re)
    t_1 = sin(t_0)
    if (y_46re <= (-3.05d-50)) then
        tmp = t_1 * (x_46re ** y_46re)
    else if (y_46re <= 2.6d-158) then
        tmp = (y_46im * 0.5d0) * log(((x_46re * x_46re) + (x_46im * x_46im)))
    else if (y_46re <= 0.08d0) then
        tmp = t_0
    else
        tmp = t_1 * (x_46im ** y_46re)
    end if
    code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
	double t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
	double t_1 = Math.sin(t_0);
	double tmp;
	if (y_46_re <= -3.05e-50) {
		tmp = t_1 * Math.pow(x_46_re, y_46_re);
	} else if (y_46_re <= 2.6e-158) {
		tmp = (y_46_im * 0.5) * Math.log(((x_46_re * x_46_re) + (x_46_im * x_46_im)));
	} else if (y_46_re <= 0.08) {
		tmp = t_0;
	} else {
		tmp = t_1 * Math.pow(x_46_im, y_46_re);
	}
	return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im):
	t_0 = y_46_re * math.atan2(x_46_im, x_46_re)
	t_1 = math.sin(t_0)
	tmp = 0
	if y_46_re <= -3.05e-50:
		tmp = t_1 * math.pow(x_46_re, y_46_re)
	elif y_46_re <= 2.6e-158:
		tmp = (y_46_im * 0.5) * math.log(((x_46_re * x_46_re) + (x_46_im * x_46_im)))
	elif y_46_re <= 0.08:
		tmp = t_0
	else:
		tmp = t_1 * math.pow(x_46_im, y_46_re)
	return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im)
	t_0 = Float64(y_46_re * atan(x_46_im, x_46_re))
	t_1 = sin(t_0)
	tmp = 0.0
	if (y_46_re <= -3.05e-50)
		tmp = Float64(t_1 * (x_46_re ^ y_46_re));
	elseif (y_46_re <= 2.6e-158)
		tmp = Float64(Float64(y_46_im * 0.5) * log(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))));
	elseif (y_46_re <= 0.08)
		tmp = t_0;
	else
		tmp = Float64(t_1 * (x_46_im ^ y_46_re));
	end
	return tmp
end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im)
	t_0 = y_46_re * atan2(x_46_im, x_46_re);
	t_1 = sin(t_0);
	tmp = 0.0;
	if (y_46_re <= -3.05e-50)
		tmp = t_1 * (x_46_re ^ y_46_re);
	elseif (y_46_re <= 2.6e-158)
		tmp = (y_46_im * 0.5) * log(((x_46_re * x_46_re) + (x_46_im * x_46_im)));
	elseif (y_46_re <= 0.08)
		tmp = t_0;
	else
		tmp = t_1 * (x_46_im ^ y_46_re);
	end
	tmp_2 = tmp;
end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sin[t$95$0], $MachinePrecision]}, If[LessEqual[y$46$re, -3.05e-50], N[(t$95$1 * N[Power[x$46$re, y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 2.6e-158], N[(N[(y$46$im * 0.5), $MachinePrecision] * N[Log[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 0.08], t$95$0, N[(t$95$1 * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := \sin t\_0\\
\mathbf{if}\;y.re \leq -3.05 \cdot 10^{-50}:\\
\;\;\;\;t\_1 \cdot {x.re}^{y.re}\\

\mathbf{elif}\;y.re \leq 2.6 \cdot 10^{-158}:\\
\;\;\;\;\left(y.im \cdot 0.5\right) \cdot \log \left(x.re \cdot x.re + x.im \cdot x.im\right)\\

\mathbf{elif}\;y.re \leq 0.08:\\
\;\;\;\;t\_0\\

\mathbf{else}:\\
\;\;\;\;t\_1 \cdot {x.im}^{y.re}\\


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

    1. Initial program 47.3%

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \left({\left(\sqrt{{x.im}^{2} + \color{blue}{{x.re}^{2}}}\right)}^{y.re}\right)\right) \]
      5. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right), \color{blue}{y.re}\right)\right) \]
      6. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right), y.re\right)\right) \]
      7. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right), y.re\right)\right) \]
      8. hypot-defineN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(\left(\mathsf{hypot}\left(x.im, x.re\right)\right), y.re\right)\right) \]
      9. hypot-lowering-hypot.f6471.7%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right)\right) \]
    5. Simplified71.7%

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}\right)\right), \left({x.re}^{y.re}\right)\right) \]
      4. atan2-lowering-atan2.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \left({x.re}^{y.re}\right)\right) \]
      5. pow-lowering-pow.f6458.4%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(x.re, \color{blue}{y.re}\right)\right) \]
    8. Simplified58.4%

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

    if -3.0499999999999998e-50 < y.re < 2.6e-158

    1. Initial program 36.7%

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

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

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

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

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

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

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

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

      \[\leadsto \mathsf{/.f64}\left(\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)}, \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
    6. Step-by-step derivation
      1. +-lowering-+.f64N/A

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{*.f64}\left(y.im, \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)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      6. *-commutativeN/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right), \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      8. log-lowering-log.f64N/A

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)\right), \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      11. hypot-defineN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{log.f64}\left(\left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right), \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      12. hypot-lowering-hypot.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right), \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      13. cos-lowering-cos.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right), \mathsf{cos.f64}\left(\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      14. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      15. atan2-lowering-atan2.f6481.7%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
    7. Simplified81.7%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \mathsf{*.f64}\left(x.re, x.re\right)\right)\right)\right)\right), \mathsf{exp.f64}\left(\left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \mathsf{*.f64}\left(x.re, x.re\right)\right)\right)\right)\right), \mathsf{exp.f64}\left(\mathsf{*.f64}\left(y.im, \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
      12. atan2-lowering-atan2.f6438.6%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \mathsf{*.f64}\left(x.re, x.re\right)\right)\right)\right)\right), \mathsf{exp.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
    10. Simplified38.6%

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

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

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

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

        \[\leadsto \mathsf{neg.f64}\left(\left(\frac{y.im \cdot \log \left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)}{\mathsf{neg}\left(e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\right)}\right)\right) \]
    12. Applied egg-rr35.5%

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

      \[\leadsto \color{blue}{\frac{1}{2} \cdot \left(y.im \cdot \log \left({x.im}^{2} + {x.re}^{2}\right)\right)} \]
    14. Step-by-step derivation
      1. associate-*r*N/A

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

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

        \[\leadsto \mathsf{*.f64}\left(\left(y.im \cdot \frac{1}{2}\right), \log \color{blue}{\left({x.im}^{2} + {x.re}^{2}\right)}\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(y.im, \frac{1}{2}\right), \log \color{blue}{\left({x.im}^{2} + {x.re}^{2}\right)}\right) \]
      5. log-lowering-log.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(y.im, \frac{1}{2}\right), \mathsf{log.f64}\left(\left({x.im}^{2} + {x.re}^{2}\right)\right)\right) \]
      6. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(y.im, \frac{1}{2}\right), \mathsf{log.f64}\left(\mathsf{+.f64}\left(\left({x.im}^{2}\right), \left({x.re}^{2}\right)\right)\right)\right) \]
      7. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(y.im, \frac{1}{2}\right), \mathsf{log.f64}\left(\mathsf{+.f64}\left(\left(x.im \cdot x.im\right), \left({x.re}^{2}\right)\right)\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(y.im, \frac{1}{2}\right), \mathsf{log.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \left({x.re}^{2}\right)\right)\right)\right) \]
      9. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(y.im, \frac{1}{2}\right), \mathsf{log.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \left(x.re \cdot x.re\right)\right)\right)\right) \]
      10. *-lowering-*.f6422.1%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(y.im, \frac{1}{2}\right), \mathsf{log.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \mathsf{*.f64}\left(x.re, x.re\right)\right)\right)\right) \]
    15. Simplified22.1%

      \[\leadsto \color{blue}{\left(y.im \cdot 0.5\right) \cdot \log \left(x.im \cdot x.im + x.re \cdot x.re\right)} \]

    if 2.6e-158 < y.re < 0.0800000000000000017

    1. Initial program 53.1%

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \left({\left(\sqrt{{x.im}^{2} + \color{blue}{{x.re}^{2}}}\right)}^{y.re}\right)\right) \]
      5. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right), \color{blue}{y.re}\right)\right) \]
      6. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right), y.re\right)\right) \]
      7. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right), y.re\right)\right) \]
      8. hypot-defineN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(\left(\mathsf{hypot}\left(x.im, x.re\right)\right), y.re\right)\right) \]
      9. hypot-lowering-hypot.f6445.5%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right)\right) \]
    5. Simplified45.5%

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

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

        \[\leadsto \mathsf{*.f64}\left(y.re, \color{blue}{\tan^{-1}_* \frac{x.im}{x.re}}\right) \]
      2. atan2-lowering-atan2.f6438.8%

        \[\leadsto \mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, \color{blue}{x.re}\right)\right) \]
    8. Simplified38.8%

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

    if 0.0800000000000000017 < y.re

    1. Initial program 35.1%

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \left({\left(\sqrt{{x.im}^{2} + \color{blue}{{x.re}^{2}}}\right)}^{y.re}\right)\right) \]
      5. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right), \color{blue}{y.re}\right)\right) \]
      6. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right), y.re\right)\right) \]
      7. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right), y.re\right)\right) \]
      8. hypot-defineN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(\left(\mathsf{hypot}\left(x.im, x.re\right)\right), y.re\right)\right) \]
      9. hypot-lowering-hypot.f6458.0%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right)\right) \]
    5. Simplified58.0%

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}\right)\right), \left({x.im}^{y.re}\right)\right) \]
      4. atan2-lowering-atan2.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \left({x.im}^{y.re}\right)\right) \]
      5. pow-lowering-pow.f6451.3%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(x.im, \color{blue}{y.re}\right)\right) \]
    8. Simplified51.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y.re \leq -3.05 \cdot 10^{-50}:\\ \;\;\;\;\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {x.re}^{y.re}\\ \mathbf{elif}\;y.re \leq 2.6 \cdot 10^{-158}:\\ \;\;\;\;\left(y.im \cdot 0.5\right) \cdot \log \left(x.re \cdot x.re + x.im \cdot x.im\right)\\ \mathbf{elif}\;y.re \leq 0.08:\\ \;\;\;\;y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\ \mathbf{else}:\\ \;\;\;\;\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {x.im}^{y.re}\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 38.1% accurate, 2.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\ t_1 := \sin t\_0 \cdot {x.im}^{y.re}\\ \mathbf{if}\;y.re \leq -6 \cdot 10^{-32}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y.re \leq 3.7 \cdot 10^{-159}:\\ \;\;\;\;\left(y.im \cdot 0.5\right) \cdot \log \left(x.re \cdot x.re + x.im \cdot x.im\right)\\ \mathbf{elif}\;y.re \leq 0.28:\\ \;\;\;\;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 (* (sin t_0) (pow x.im y.re))))
   (if (<= y.re -6e-32)
     t_1
     (if (<= y.re 3.7e-159)
       (* (* y.im 0.5) (log (+ (* x.re x.re) (* x.im x.im))))
       (if (<= y.re 0.28) 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 = sin(t_0) * pow(x_46_im, y_46_re);
	double tmp;
	if (y_46_re <= -6e-32) {
		tmp = t_1;
	} else if (y_46_re <= 3.7e-159) {
		tmp = (y_46_im * 0.5) * log(((x_46_re * x_46_re) + (x_46_im * x_46_im)));
	} else if (y_46_re <= 0.28) {
		tmp = t_0;
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
    real(8), intent (in) :: x_46re
    real(8), intent (in) :: x_46im
    real(8), intent (in) :: y_46re
    real(8), intent (in) :: y_46im
    real(8) :: t_0
    real(8) :: t_1
    real(8) :: tmp
    t_0 = y_46re * atan2(x_46im, x_46re)
    t_1 = sin(t_0) * (x_46im ** y_46re)
    if (y_46re <= (-6d-32)) then
        tmp = t_1
    else if (y_46re <= 3.7d-159) then
        tmp = (y_46im * 0.5d0) * log(((x_46re * x_46re) + (x_46im * x_46im)))
    else if (y_46re <= 0.28d0) 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 = Math.sin(t_0) * Math.pow(x_46_im, y_46_re);
	double tmp;
	if (y_46_re <= -6e-32) {
		tmp = t_1;
	} else if (y_46_re <= 3.7e-159) {
		tmp = (y_46_im * 0.5) * Math.log(((x_46_re * x_46_re) + (x_46_im * x_46_im)));
	} else if (y_46_re <= 0.28) {
		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 = math.sin(t_0) * math.pow(x_46_im, y_46_re)
	tmp = 0
	if y_46_re <= -6e-32:
		tmp = t_1
	elif y_46_re <= 3.7e-159:
		tmp = (y_46_im * 0.5) * math.log(((x_46_re * x_46_re) + (x_46_im * x_46_im)))
	elif y_46_re <= 0.28:
		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(sin(t_0) * (x_46_im ^ y_46_re))
	tmp = 0.0
	if (y_46_re <= -6e-32)
		tmp = t_1;
	elseif (y_46_re <= 3.7e-159)
		tmp = Float64(Float64(y_46_im * 0.5) * log(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))));
	elseif (y_46_re <= 0.28)
		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 = sin(t_0) * (x_46_im ^ y_46_re);
	tmp = 0.0;
	if (y_46_re <= -6e-32)
		tmp = t_1;
	elseif (y_46_re <= 3.7e-159)
		tmp = (y_46_im * 0.5) * log(((x_46_re * x_46_re) + (x_46_im * x_46_im)));
	elseif (y_46_re <= 0.28)
		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[(N[Sin[t$95$0], $MachinePrecision] * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -6e-32], t$95$1, If[LessEqual[y$46$re, 3.7e-159], N[(N[(y$46$im * 0.5), $MachinePrecision] * N[Log[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 0.28], 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 := \sin t\_0 \cdot {x.im}^{y.re}\\
\mathbf{if}\;y.re \leq -6 \cdot 10^{-32}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y.re \leq 3.7 \cdot 10^{-159}:\\
\;\;\;\;\left(y.im \cdot 0.5\right) \cdot \log \left(x.re \cdot x.re + x.im \cdot x.im\right)\\

\mathbf{elif}\;y.re \leq 0.28:\\
\;\;\;\;t\_0\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y.re < -6.0000000000000001e-32 or 0.28000000000000003 < y.re

    1. Initial program 42.5%

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \left({\left(\sqrt{{x.im}^{2} + \color{blue}{{x.re}^{2}}}\right)}^{y.re}\right)\right) \]
      5. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right), \color{blue}{y.re}\right)\right) \]
      6. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right), y.re\right)\right) \]
      7. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right), y.re\right)\right) \]
      8. hypot-defineN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(\left(\mathsf{hypot}\left(x.im, x.re\right)\right), y.re\right)\right) \]
      9. hypot-lowering-hypot.f6467.9%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right)\right) \]
    5. Simplified67.9%

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}\right)\right), \left({x.im}^{y.re}\right)\right) \]
      4. atan2-lowering-atan2.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \left({x.im}^{y.re}\right)\right) \]
      5. pow-lowering-pow.f6448.6%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(x.im, \color{blue}{y.re}\right)\right) \]
    8. Simplified48.6%

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

    if -6.0000000000000001e-32 < y.re < 3.6999999999999999e-159

    1. Initial program 36.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. Step-by-step derivation
      1. exp-diffN/A

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

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

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

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

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

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

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

      \[\leadsto \mathsf{/.f64}\left(\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)}, \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
    6. Step-by-step derivation
      1. +-lowering-+.f64N/A

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{*.f64}\left(y.im, \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)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      6. *-commutativeN/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right), \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      8. log-lowering-log.f64N/A

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)\right), \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      11. hypot-defineN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{log.f64}\left(\left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right), \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      12. hypot-lowering-hypot.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right), \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      13. cos-lowering-cos.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right), \mathsf{cos.f64}\left(\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      14. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      15. atan2-lowering-atan2.f6481.9%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
    7. Simplified81.9%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \mathsf{*.f64}\left(x.re, x.re\right)\right)\right)\right)\right), \mathsf{exp.f64}\left(\left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \mathsf{*.f64}\left(x.re, x.re\right)\right)\right)\right)\right), \mathsf{exp.f64}\left(\mathsf{*.f64}\left(y.im, \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
      12. atan2-lowering-atan2.f6436.5%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \mathsf{*.f64}\left(x.re, x.re\right)\right)\right)\right)\right), \mathsf{exp.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
    10. Simplified36.5%

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

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

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

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

        \[\leadsto \mathsf{neg.f64}\left(\left(\frac{y.im \cdot \log \left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)}{\mathsf{neg}\left(e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\right)}\right)\right) \]
    12. Applied egg-rr33.6%

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

      \[\leadsto \color{blue}{\frac{1}{2} \cdot \left(y.im \cdot \log \left({x.im}^{2} + {x.re}^{2}\right)\right)} \]
    14. Step-by-step derivation
      1. associate-*r*N/A

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

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

        \[\leadsto \mathsf{*.f64}\left(\left(y.im \cdot \frac{1}{2}\right), \log \color{blue}{\left({x.im}^{2} + {x.re}^{2}\right)}\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(y.im, \frac{1}{2}\right), \log \color{blue}{\left({x.im}^{2} + {x.re}^{2}\right)}\right) \]
      5. log-lowering-log.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(y.im, \frac{1}{2}\right), \mathsf{log.f64}\left(\left({x.im}^{2} + {x.re}^{2}\right)\right)\right) \]
      6. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(y.im, \frac{1}{2}\right), \mathsf{log.f64}\left(\mathsf{+.f64}\left(\left({x.im}^{2}\right), \left({x.re}^{2}\right)\right)\right)\right) \]
      7. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(y.im, \frac{1}{2}\right), \mathsf{log.f64}\left(\mathsf{+.f64}\left(\left(x.im \cdot x.im\right), \left({x.re}^{2}\right)\right)\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(y.im, \frac{1}{2}\right), \mathsf{log.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \left({x.re}^{2}\right)\right)\right)\right) \]
      9. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(y.im, \frac{1}{2}\right), \mathsf{log.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \left(x.re \cdot x.re\right)\right)\right)\right) \]
      10. *-lowering-*.f6421.1%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(y.im, \frac{1}{2}\right), \mathsf{log.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \mathsf{*.f64}\left(x.re, x.re\right)\right)\right)\right) \]
    15. Simplified21.1%

      \[\leadsto \color{blue}{\left(y.im \cdot 0.5\right) \cdot \log \left(x.im \cdot x.im + x.re \cdot x.re\right)} \]

    if 3.6999999999999999e-159 < y.re < 0.28000000000000003

    1. Initial program 53.1%

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \left({\left(\sqrt{{x.im}^{2} + \color{blue}{{x.re}^{2}}}\right)}^{y.re}\right)\right) \]
      5. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right), \color{blue}{y.re}\right)\right) \]
      6. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right), y.re\right)\right) \]
      7. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right), y.re\right)\right) \]
      8. hypot-defineN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(\left(\mathsf{hypot}\left(x.im, x.re\right)\right), y.re\right)\right) \]
      9. hypot-lowering-hypot.f6445.5%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right)\right) \]
    5. Simplified45.5%

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

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

        \[\leadsto \mathsf{*.f64}\left(y.re, \color{blue}{\tan^{-1}_* \frac{x.im}{x.re}}\right) \]
      2. atan2-lowering-atan2.f6438.8%

        \[\leadsto \mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, \color{blue}{x.re}\right)\right) \]
    8. Simplified38.8%

      \[\leadsto \color{blue}{y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification36.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y.re \leq -6 \cdot 10^{-32}:\\ \;\;\;\;\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {x.im}^{y.re}\\ \mathbf{elif}\;y.re \leq 3.7 \cdot 10^{-159}:\\ \;\;\;\;\left(y.im \cdot 0.5\right) \cdot \log \left(x.re \cdot x.re + x.im \cdot x.im\right)\\ \mathbf{elif}\;y.re \leq 0.28:\\ \;\;\;\;y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\ \mathbf{else}:\\ \;\;\;\;\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {x.im}^{y.re}\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 46.7% accurate, 2.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\ \mathbf{if}\;y.re \leq -1.4:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;y.re \leq 1.55 \cdot 10^{-139}:\\ \;\;\;\;\frac{y.im \cdot \log \left(0 - x.re\right)}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\\ \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 (hypot x.im x.re) y.re))))
   (if (<= y.re -1.4)
     t_0
     (if (<= y.re 1.55e-139)
       (/ (* y.im (log (- 0.0 x.re))) (exp (* (atan2 x.im x.re) y.im)))
       t_0))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
	double t_0 = (y_46_re * atan2(x_46_im, x_46_re)) * pow(hypot(x_46_im, x_46_re), y_46_re);
	double tmp;
	if (y_46_re <= -1.4) {
		tmp = t_0;
	} else if (y_46_re <= 1.55e-139) {
		tmp = (y_46_im * log((0.0 - x_46_re))) / exp((atan2(x_46_im, x_46_re) * y_46_im));
	} else {
		tmp = t_0;
	}
	return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
	double t_0 = (y_46_re * Math.atan2(x_46_im, x_46_re)) * Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
	double tmp;
	if (y_46_re <= -1.4) {
		tmp = t_0;
	} else if (y_46_re <= 1.55e-139) {
		tmp = (y_46_im * Math.log((0.0 - x_46_re))) / Math.exp((Math.atan2(x_46_im, x_46_re) * y_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(math.hypot(x_46_im, x_46_re), y_46_re)
	tmp = 0
	if y_46_re <= -1.4:
		tmp = t_0
	elif y_46_re <= 1.55e-139:
		tmp = (y_46_im * math.log((0.0 - x_46_re))) / math.exp((math.atan2(x_46_im, x_46_re) * y_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)) * (hypot(x_46_im, x_46_re) ^ y_46_re))
	tmp = 0.0
	if (y_46_re <= -1.4)
		tmp = t_0;
	elseif (y_46_re <= 1.55e-139)
		tmp = Float64(Float64(y_46_im * log(Float64(0.0 - x_46_re))) / exp(Float64(atan(x_46_im, x_46_re) * y_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)) * (hypot(x_46_im, x_46_re) ^ y_46_re);
	tmp = 0.0;
	if (y_46_re <= -1.4)
		tmp = t_0;
	elseif (y_46_re <= 1.55e-139)
		tmp = (y_46_im * log((0.0 - x_46_re))) / exp((atan2(x_46_im, x_46_re) * y_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[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -1.4], t$95$0, If[LessEqual[y$46$re, 1.55e-139], N[(N[(y$46$im * N[Log[N[(0.0 - x$46$re), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$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(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{if}\;y.re \leq -1.4:\\
\;\;\;\;t\_0\\

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

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


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

    1. Initial program 44.9%

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \left({\left(\sqrt{{x.im}^{2} + \color{blue}{{x.re}^{2}}}\right)}^{y.re}\right)\right) \]
      5. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right), \color{blue}{y.re}\right)\right) \]
      6. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right), y.re\right)\right) \]
      7. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right), y.re\right)\right) \]
      8. hypot-defineN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(\left(\mathsf{hypot}\left(x.im, x.re\right)\right), y.re\right)\right) \]
      9. hypot-lowering-hypot.f6466.2%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right)\right) \]
    5. Simplified66.2%

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}\right), \mathsf{pow.f64}\left(\color{blue}{\mathsf{hypot.f64}\left(x.im, x.re\right)}, y.re\right)\right) \]
      2. atan2-lowering-atan2.f6460.3%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, \color{blue}{x.re}\right), y.re\right)\right) \]
    8. Simplified60.3%

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

    if -1.3999999999999999 < y.re < 1.55e-139

    1. Initial program 36.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. Step-by-step derivation
      1. exp-diffN/A

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

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

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

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

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

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

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

      \[\leadsto \mathsf{/.f64}\left(\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)}, \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
    6. Step-by-step derivation
      1. +-lowering-+.f64N/A

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{*.f64}\left(y.im, \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)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      6. *-commutativeN/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right), \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      8. log-lowering-log.f64N/A

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)\right), \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      11. hypot-defineN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{log.f64}\left(\left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right), \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      12. hypot-lowering-hypot.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right), \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      13. cos-lowering-cos.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right), \mathsf{cos.f64}\left(\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      14. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      15. atan2-lowering-atan2.f6481.4%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
    7. Simplified81.4%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \mathsf{*.f64}\left(x.re, x.re\right)\right)\right)\right)\right), \mathsf{exp.f64}\left(\left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \mathsf{*.f64}\left(x.re, x.re\right)\right)\right)\right)\right), \mathsf{exp.f64}\left(\mathsf{*.f64}\left(y.im, \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
      12. atan2-lowering-atan2.f6436.5%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \mathsf{*.f64}\left(x.re, x.re\right)\right)\right)\right)\right), \mathsf{exp.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
    10. Simplified36.5%

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

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\color{blue}{\left(-1 \cdot x.re\right)}\right)\right), \mathsf{exp.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
    12. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\mathsf{neg}\left(x.re\right)\right)\right)\right), \mathsf{exp.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{atan2.f64}\left(\color{blue}{x.im}, x.re\right)\right)\right)\right) \]
      2. neg-lowering-neg.f6436.5%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{neg.f64}\left(x.re\right)\right)\right), \mathsf{exp.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{atan2.f64}\left(\color{blue}{x.im}, x.re\right)\right)\right)\right) \]
    13. Simplified36.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y.re \leq -1.4:\\ \;\;\;\;\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\ \mathbf{elif}\;y.re \leq 1.55 \cdot 10^{-139}:\\ \;\;\;\;\frac{y.im \cdot \log \left(0 - x.re\right)}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\\ \mathbf{else}:\\ \;\;\;\;\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 56.9% accurate, 2.6× speedup?

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

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

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

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


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

    1. Initial program 48.4%

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \left({\left(\sqrt{{x.im}^{2} + \color{blue}{{x.re}^{2}}}\right)}^{y.re}\right)\right) \]
      5. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right), \color{blue}{y.re}\right)\right) \]
      6. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right), y.re\right)\right) \]
      7. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right), y.re\right)\right) \]
      8. hypot-defineN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(\left(\mathsf{hypot}\left(x.im, x.re\right)\right), y.re\right)\right) \]
      9. hypot-lowering-hypot.f6481.4%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right)\right) \]
    5. Simplified81.4%

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}\right), \mathsf{pow.f64}\left(\color{blue}{\mathsf{hypot.f64}\left(x.im, x.re\right)}, y.re\right)\right) \]
      2. atan2-lowering-atan2.f6475.2%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, \color{blue}{x.re}\right), y.re\right)\right) \]
    8. Simplified75.2%

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

    if -2 < y.re < 7.49999999999999967e43

    1. Initial program 37.6%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)}\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      3. atan2-lowering-atan2.f6449.4%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), \color{blue}{y.im}\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
    7. Simplified49.4%

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right), \mathsf{exp.f64}\left(\left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right), \mathsf{exp.f64}\left(\mathsf{*.f64}\left(y.im, \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
      6. atan2-lowering-atan2.f6447.5%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right), \mathsf{exp.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
    10. Simplified47.5%

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

    if 7.49999999999999967e43 < y.re

    1. Initial program 44.2%

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \left({\left(\sqrt{{x.im}^{2} + \color{blue}{{x.re}^{2}}}\right)}^{y.re}\right)\right) \]
      5. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right), \color{blue}{y.re}\right)\right) \]
      6. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right), y.re\right)\right) \]
      7. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right), y.re\right)\right) \]
      8. hypot-defineN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(\left(\mathsf{hypot}\left(x.im, x.re\right)\right), y.re\right)\right) \]
      9. hypot-lowering-hypot.f6465.2%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right)\right) \]
    5. Simplified65.2%

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}\right)\right), \left({x.im}^{y.re}\right)\right) \]
      4. atan2-lowering-atan2.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \left({x.im}^{y.re}\right)\right) \]
      5. pow-lowering-pow.f6460.9%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(x.im, \color{blue}{y.re}\right)\right) \]
    8. Simplified60.9%

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

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

Alternative 16: 45.4% accurate, 2.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\ \mathbf{if}\;y.re \leq -0.00195:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;y.re \leq 2.2 \cdot 10^{-140}:\\ \;\;\;\;\frac{y.im \cdot \log x.im}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\\ \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 (hypot x.im x.re) y.re))))
   (if (<= y.re -0.00195)
     t_0
     (if (<= y.re 2.2e-140)
       (/ (* y.im (log x.im)) (exp (* (atan2 x.im x.re) y.im)))
       t_0))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
	double t_0 = (y_46_re * atan2(x_46_im, x_46_re)) * pow(hypot(x_46_im, x_46_re), y_46_re);
	double tmp;
	if (y_46_re <= -0.00195) {
		tmp = t_0;
	} else if (y_46_re <= 2.2e-140) {
		tmp = (y_46_im * log(x_46_im)) / exp((atan2(x_46_im, x_46_re) * y_46_im));
	} else {
		tmp = t_0;
	}
	return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
	double t_0 = (y_46_re * Math.atan2(x_46_im, x_46_re)) * Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
	double tmp;
	if (y_46_re <= -0.00195) {
		tmp = t_0;
	} else if (y_46_re <= 2.2e-140) {
		tmp = (y_46_im * Math.log(x_46_im)) / Math.exp((Math.atan2(x_46_im, x_46_re) * y_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(math.hypot(x_46_im, x_46_re), y_46_re)
	tmp = 0
	if y_46_re <= -0.00195:
		tmp = t_0
	elif y_46_re <= 2.2e-140:
		tmp = (y_46_im * math.log(x_46_im)) / math.exp((math.atan2(x_46_im, x_46_re) * y_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)) * (hypot(x_46_im, x_46_re) ^ y_46_re))
	tmp = 0.0
	if (y_46_re <= -0.00195)
		tmp = t_0;
	elseif (y_46_re <= 2.2e-140)
		tmp = Float64(Float64(y_46_im * log(x_46_im)) / exp(Float64(atan(x_46_im, x_46_re) * y_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)) * (hypot(x_46_im, x_46_re) ^ y_46_re);
	tmp = 0.0;
	if (y_46_re <= -0.00195)
		tmp = t_0;
	elseif (y_46_re <= 2.2e-140)
		tmp = (y_46_im * log(x_46_im)) / exp((atan2(x_46_im, x_46_re) * y_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[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -0.00195], t$95$0, If[LessEqual[y$46$re, 2.2e-140], N[(N[(y$46$im * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision] / N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$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(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{if}\;y.re \leq -0.00195:\\
\;\;\;\;t\_0\\

\mathbf{elif}\;y.re \leq 2.2 \cdot 10^{-140}:\\
\;\;\;\;\frac{y.im \cdot \log x.im}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y.re < -0.0019499999999999999 or 2.1999999999999999e-140 < y.re

    1. Initial program 44.9%

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \left({\left(\sqrt{{x.im}^{2} + \color{blue}{{x.re}^{2}}}\right)}^{y.re}\right)\right) \]
      5. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right), \color{blue}{y.re}\right)\right) \]
      6. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right), y.re\right)\right) \]
      7. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right), y.re\right)\right) \]
      8. hypot-defineN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(\left(\mathsf{hypot}\left(x.im, x.re\right)\right), y.re\right)\right) \]
      9. hypot-lowering-hypot.f6466.2%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right)\right) \]
    5. Simplified66.2%

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}\right), \mathsf{pow.f64}\left(\color{blue}{\mathsf{hypot.f64}\left(x.im, x.re\right)}, y.re\right)\right) \]
      2. atan2-lowering-atan2.f6460.3%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, \color{blue}{x.re}\right), y.re\right)\right) \]
    8. Simplified60.3%

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

    if -0.0019499999999999999 < y.re < 2.1999999999999999e-140

    1. Initial program 36.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. Step-by-step derivation
      1. exp-diffN/A

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

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

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

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

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

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

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

      \[\leadsto \mathsf{/.f64}\left(\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)}, \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
    6. Step-by-step derivation
      1. +-lowering-+.f64N/A

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{*.f64}\left(y.im, \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)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      6. *-commutativeN/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right), \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      8. log-lowering-log.f64N/A

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)\right), \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      11. hypot-defineN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{log.f64}\left(\left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right), \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      12. hypot-lowering-hypot.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right), \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      13. cos-lowering-cos.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right), \mathsf{cos.f64}\left(\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      14. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      15. atan2-lowering-atan2.f6481.4%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
    7. Simplified81.4%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \mathsf{*.f64}\left(x.re, x.re\right)\right)\right)\right)\right), \mathsf{exp.f64}\left(\left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \mathsf{*.f64}\left(x.re, x.re\right)\right)\right)\right)\right), \mathsf{exp.f64}\left(\mathsf{*.f64}\left(y.im, \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
      12. atan2-lowering-atan2.f6436.5%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \mathsf{*.f64}\left(x.re, x.re\right)\right)\right)\right)\right), \mathsf{exp.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
    10. Simplified36.5%

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(x.im\right)\right), \mathsf{exp.f64}\left(\left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(x.im\right)\right), \mathsf{exp.f64}\left(\mathsf{*.f64}\left(y.im, \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
      6. atan2-lowering-atan2.f6431.2%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(x.im\right)\right), \mathsf{exp.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
    13. Simplified31.2%

      \[\leadsto \color{blue}{\frac{y.im \cdot \log x.im}{e^{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification48.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y.re \leq -0.00195:\\ \;\;\;\;\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\ \mathbf{elif}\;y.re \leq 2.2 \cdot 10^{-140}:\\ \;\;\;\;\frac{y.im \cdot \log x.im}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\\ \mathbf{else}:\\ \;\;\;\;\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\ \end{array} \]
  5. Add Preprocessing

Alternative 17: 45.6% accurate, 2.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\ \mathbf{if}\;y.re \leq -3.7 \cdot 10^{-51}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;y.re \leq 1.5 \cdot 10^{-159}:\\ \;\;\;\;\left(y.im \cdot 0.5\right) \cdot \log \left(x.re \cdot x.re + x.im \cdot 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 (hypot x.im x.re) y.re))))
   (if (<= y.re -3.7e-51)
     t_0
     (if (<= y.re 1.5e-159)
       (* (* y.im 0.5) (log (+ (* x.re x.re) (* x.im 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(hypot(x_46_im, x_46_re), y_46_re);
	double tmp;
	if (y_46_re <= -3.7e-51) {
		tmp = t_0;
	} else if (y_46_re <= 1.5e-159) {
		tmp = (y_46_im * 0.5) * log(((x_46_re * x_46_re) + (x_46_im * x_46_im)));
	} else {
		tmp = t_0;
	}
	return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
	double t_0 = (y_46_re * Math.atan2(x_46_im, x_46_re)) * Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
	double tmp;
	if (y_46_re <= -3.7e-51) {
		tmp = t_0;
	} else if (y_46_re <= 1.5e-159) {
		tmp = (y_46_im * 0.5) * Math.log(((x_46_re * x_46_re) + (x_46_im * 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(math.hypot(x_46_im, x_46_re), y_46_re)
	tmp = 0
	if y_46_re <= -3.7e-51:
		tmp = t_0
	elif y_46_re <= 1.5e-159:
		tmp = (y_46_im * 0.5) * math.log(((x_46_re * x_46_re) + (x_46_im * 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)) * (hypot(x_46_im, x_46_re) ^ y_46_re))
	tmp = 0.0
	if (y_46_re <= -3.7e-51)
		tmp = t_0;
	elseif (y_46_re <= 1.5e-159)
		tmp = Float64(Float64(y_46_im * 0.5) * log(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * 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)) * (hypot(x_46_im, x_46_re) ^ y_46_re);
	tmp = 0.0;
	if (y_46_re <= -3.7e-51)
		tmp = t_0;
	elseif (y_46_re <= 1.5e-159)
		tmp = (y_46_im * 0.5) * log(((x_46_re * x_46_re) + (x_46_im * 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[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -3.7e-51], t$95$0, If[LessEqual[y$46$re, 1.5e-159], N[(N[(y$46$im * 0.5), $MachinePrecision] * N[Log[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $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(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{if}\;y.re \leq -3.7 \cdot 10^{-51}:\\
\;\;\;\;t\_0\\

\mathbf{elif}\;y.re \leq 1.5 \cdot 10^{-159}:\\
\;\;\;\;\left(y.im \cdot 0.5\right) \cdot \log \left(x.re \cdot x.re + x.im \cdot x.im\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y.re < -3.69999999999999973e-51 or 1.50000000000000005e-159 < y.re

    1. Initial program 44.1%

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \left({\left(\sqrt{{x.im}^{2} + \color{blue}{{x.re}^{2}}}\right)}^{y.re}\right)\right) \]
      5. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right), \color{blue}{y.re}\right)\right) \]
      6. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right), y.re\right)\right) \]
      7. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right), y.re\right)\right) \]
      8. hypot-defineN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(\left(\mathsf{hypot}\left(x.im, x.re\right)\right), y.re\right)\right) \]
      9. hypot-lowering-hypot.f6462.1%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right)\right) \]
    5. Simplified62.1%

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}\right), \mathsf{pow.f64}\left(\color{blue}{\mathsf{hypot.f64}\left(x.im, x.re\right)}, y.re\right)\right) \]
      2. atan2-lowering-atan2.f6456.6%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, \color{blue}{x.re}\right), y.re\right)\right) \]
    8. Simplified56.6%

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

    if -3.69999999999999973e-51 < y.re < 1.50000000000000005e-159

    1. Initial program 36.7%

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

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

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

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

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

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

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

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

      \[\leadsto \mathsf{/.f64}\left(\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)}, \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
    6. Step-by-step derivation
      1. +-lowering-+.f64N/A

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{*.f64}\left(y.im, \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)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      6. *-commutativeN/A

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right), \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      8. log-lowering-log.f64N/A

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)\right), \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      11. hypot-defineN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{log.f64}\left(\left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right), \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      12. hypot-lowering-hypot.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right), \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      13. cos-lowering-cos.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right), \mathsf{cos.f64}\left(\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      14. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      15. atan2-lowering-atan2.f6481.7%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
    7. Simplified81.7%

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\left({x.im}^{2}\right), \left({x.re}^{2}\right)\right)\right)\right)\right), \left(e^{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\right)\right) \]
      6. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\left(x.im \cdot x.im\right), \left({x.re}^{2}\right)\right)\right)\right)\right), \left(e^{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \left({x.re}^{2}\right)\right)\right)\right)\right), \left(e^{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\right)\right) \]
      8. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \left(x.re \cdot x.re\right)\right)\right)\right)\right), \left(e^{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \mathsf{*.f64}\left(x.re, x.re\right)\right)\right)\right)\right), \left(e^{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\right)\right) \]
      10. exp-lowering-exp.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \mathsf{*.f64}\left(x.re, x.re\right)\right)\right)\right)\right), \mathsf{exp.f64}\left(\left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \mathsf{*.f64}\left(x.re, x.re\right)\right)\right)\right)\right), \mathsf{exp.f64}\left(\mathsf{*.f64}\left(y.im, \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
      12. atan2-lowering-atan2.f6438.6%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \mathsf{*.f64}\left(x.re, x.re\right)\right)\right)\right)\right), \mathsf{exp.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
    10. Simplified38.6%

      \[\leadsto \color{blue}{\frac{y.im \cdot \log \left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)}{e^{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}}} \]
    11. Step-by-step derivation
      1. frac-2negN/A

        \[\leadsto \frac{\mathsf{neg}\left(y.im \cdot \log \left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)\right)}{\color{blue}{\mathsf{neg}\left(e^{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\right)}} \]
      2. *-commutativeN/A

        \[\leadsto \frac{\mathsf{neg}\left(y.im \cdot \log \left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)\right)}{\mathsf{neg}\left(e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\right)} \]
      3. distribute-frac-negN/A

        \[\leadsto \mathsf{neg}\left(\frac{y.im \cdot \log \left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)}{\mathsf{neg}\left(e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\right)}\right) \]
      4. neg-lowering-neg.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\frac{y.im \cdot \log \left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)}{\mathsf{neg}\left(e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\right)}\right)\right) \]
    12. Applied egg-rr35.5%

      \[\leadsto \color{blue}{-\frac{\frac{\log \left(x.re \cdot x.re + x.im \cdot x.im\right)}{\frac{2}{y.im}}}{0 - e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}} \]
    13. Taylor expanded in y.im around 0

      \[\leadsto \color{blue}{\frac{1}{2} \cdot \left(y.im \cdot \log \left({x.im}^{2} + {x.re}^{2}\right)\right)} \]
    14. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \left(\frac{1}{2} \cdot y.im\right) \cdot \color{blue}{\log \left({x.im}^{2} + {x.re}^{2}\right)} \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{1}{2} \cdot y.im\right), \color{blue}{\log \left({x.im}^{2} + {x.re}^{2}\right)}\right) \]
      3. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\left(y.im \cdot \frac{1}{2}\right), \log \color{blue}{\left({x.im}^{2} + {x.re}^{2}\right)}\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(y.im, \frac{1}{2}\right), \log \color{blue}{\left({x.im}^{2} + {x.re}^{2}\right)}\right) \]
      5. log-lowering-log.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(y.im, \frac{1}{2}\right), \mathsf{log.f64}\left(\left({x.im}^{2} + {x.re}^{2}\right)\right)\right) \]
      6. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(y.im, \frac{1}{2}\right), \mathsf{log.f64}\left(\mathsf{+.f64}\left(\left({x.im}^{2}\right), \left({x.re}^{2}\right)\right)\right)\right) \]
      7. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(y.im, \frac{1}{2}\right), \mathsf{log.f64}\left(\mathsf{+.f64}\left(\left(x.im \cdot x.im\right), \left({x.re}^{2}\right)\right)\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(y.im, \frac{1}{2}\right), \mathsf{log.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \left({x.re}^{2}\right)\right)\right)\right) \]
      9. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(y.im, \frac{1}{2}\right), \mathsf{log.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \left(x.re \cdot x.re\right)\right)\right)\right) \]
      10. *-lowering-*.f6422.1%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(y.im, \frac{1}{2}\right), \mathsf{log.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \mathsf{*.f64}\left(x.re, x.re\right)\right)\right)\right) \]
    15. Simplified22.1%

      \[\leadsto \color{blue}{\left(y.im \cdot 0.5\right) \cdot \log \left(x.im \cdot x.im + x.re \cdot x.re\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification44.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y.re \leq -3.7 \cdot 10^{-51}:\\ \;\;\;\;\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\ \mathbf{elif}\;y.re \leq 1.5 \cdot 10^{-159}:\\ \;\;\;\;\left(y.im \cdot 0.5\right) \cdot \log \left(x.re \cdot x.re + x.im \cdot x.im\right)\\ \mathbf{else}:\\ \;\;\;\;\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\ \end{array} \]
  5. Add Preprocessing

Alternative 18: 24.0% accurate, 2.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \left(y.im \cdot 0.5\right) \cdot \log \left(x.re \cdot x.re + x.im \cdot x.im\right)\\ \mathbf{if}\;y.re \leq -1.65 \cdot 10^{-51}:\\ \;\;\;\;y.re \cdot \log \left(e^{\tan^{-1}_* \frac{x.im}{x.re}}\right)\\ \mathbf{elif}\;y.re \leq 2.7 \cdot 10^{-156}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;y.re \leq 0.72:\\ \;\;\;\;y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
(FPCore (x.re x.im y.re y.im)
 :precision binary64
 (let* ((t_0 (* (* y.im 0.5) (log (+ (* x.re x.re) (* x.im x.im))))))
   (if (<= y.re -1.65e-51)
     (* y.re (log (exp (atan2 x.im x.re))))
     (if (<= y.re 2.7e-156)
       t_0
       (if (<= y.re 0.72) (* y.re (atan2 x.im x.re)) t_0)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
	double t_0 = (y_46_im * 0.5) * log(((x_46_re * x_46_re) + (x_46_im * x_46_im)));
	double tmp;
	if (y_46_re <= -1.65e-51) {
		tmp = y_46_re * log(exp(atan2(x_46_im, x_46_re)));
	} else if (y_46_re <= 2.7e-156) {
		tmp = t_0;
	} else if (y_46_re <= 0.72) {
		tmp = y_46_re * atan2(x_46_im, x_46_re);
	} else {
		tmp = t_0;
	}
	return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
    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_46im * 0.5d0) * log(((x_46re * x_46re) + (x_46im * x_46im)))
    if (y_46re <= (-1.65d-51)) then
        tmp = y_46re * log(exp(atan2(x_46im, x_46re)))
    else if (y_46re <= 2.7d-156) then
        tmp = t_0
    else if (y_46re <= 0.72d0) then
        tmp = y_46re * atan2(x_46im, x_46re)
    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_im * 0.5) * Math.log(((x_46_re * x_46_re) + (x_46_im * x_46_im)));
	double tmp;
	if (y_46_re <= -1.65e-51) {
		tmp = y_46_re * Math.log(Math.exp(Math.atan2(x_46_im, x_46_re)));
	} else if (y_46_re <= 2.7e-156) {
		tmp = t_0;
	} else if (y_46_re <= 0.72) {
		tmp = y_46_re * Math.atan2(x_46_im, x_46_re);
	} else {
		tmp = t_0;
	}
	return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im):
	t_0 = (y_46_im * 0.5) * math.log(((x_46_re * x_46_re) + (x_46_im * x_46_im)))
	tmp = 0
	if y_46_re <= -1.65e-51:
		tmp = y_46_re * math.log(math.exp(math.atan2(x_46_im, x_46_re)))
	elif y_46_re <= 2.7e-156:
		tmp = t_0
	elif y_46_re <= 0.72:
		tmp = y_46_re * math.atan2(x_46_im, x_46_re)
	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_im * 0.5) * log(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))
	tmp = 0.0
	if (y_46_re <= -1.65e-51)
		tmp = Float64(y_46_re * log(exp(atan(x_46_im, x_46_re))));
	elseif (y_46_re <= 2.7e-156)
		tmp = t_0;
	elseif (y_46_re <= 0.72)
		tmp = Float64(y_46_re * atan(x_46_im, x_46_re));
	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_im * 0.5) * log(((x_46_re * x_46_re) + (x_46_im * x_46_im)));
	tmp = 0.0;
	if (y_46_re <= -1.65e-51)
		tmp = y_46_re * log(exp(atan2(x_46_im, x_46_re)));
	elseif (y_46_re <= 2.7e-156)
		tmp = t_0;
	elseif (y_46_re <= 0.72)
		tmp = y_46_re * atan2(x_46_im, x_46_re);
	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$im * 0.5), $MachinePrecision] * N[Log[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -1.65e-51], N[(y$46$re * N[Log[N[Exp[N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 2.7e-156], t$95$0, If[LessEqual[y$46$re, 0.72], N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision], t$95$0]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \left(y.im \cdot 0.5\right) \cdot \log \left(x.re \cdot x.re + x.im \cdot x.im\right)\\
\mathbf{if}\;y.re \leq -1.65 \cdot 10^{-51}:\\
\;\;\;\;y.re \cdot \log \left(e^{\tan^{-1}_* \frac{x.im}{x.re}}\right)\\

\mathbf{elif}\;y.re \leq 2.7 \cdot 10^{-156}:\\
\;\;\;\;t\_0\\

\mathbf{elif}\;y.re \leq 0.72:\\
\;\;\;\;y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\

\mathbf{else}:\\
\;\;\;\;t\_0\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y.re < -1.64999999999999986e-51

    1. Initial program 47.3%

      \[e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \]
    2. Add Preprocessing
    3. Taylor expanded in y.im around 0

      \[\leadsto \color{blue}{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}} \]
    4. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right), \color{blue}{\left({\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}\right)}\right) \]
      2. sin-lowering-sin.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right), \left({\color{blue}{\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}}^{y.re}\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}\right)\right), \left({\left(\sqrt{\color{blue}{{x.im}^{2} + {x.re}^{2}}}\right)}^{y.re}\right)\right) \]
      4. atan2-lowering-atan2.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \left({\left(\sqrt{{x.im}^{2} + \color{blue}{{x.re}^{2}}}\right)}^{y.re}\right)\right) \]
      5. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right), \color{blue}{y.re}\right)\right) \]
      6. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right), y.re\right)\right) \]
      7. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right), y.re\right)\right) \]
      8. hypot-defineN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(\left(\mathsf{hypot}\left(x.im, x.re\right)\right), y.re\right)\right) \]
      9. hypot-lowering-hypot.f6471.7%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right)\right) \]
    5. Simplified71.7%

      \[\leadsto \color{blue}{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}} \]
    6. Taylor expanded in y.re around 0

      \[\leadsto \color{blue}{y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}} \]
    7. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(y.re, \color{blue}{\tan^{-1}_* \frac{x.im}{x.re}}\right) \]
      2. atan2-lowering-atan2.f6411.7%

        \[\leadsto \mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, \color{blue}{x.re}\right)\right) \]
    8. Simplified11.7%

      \[\leadsto \color{blue}{y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}} \]
    9. Step-by-step derivation
      1. rem-log-expN/A

        \[\leadsto \mathsf{*.f64}\left(y.re, \log \left(e^{\tan^{-1}_* \frac{x.im}{x.re}}\right)\right) \]
      2. log-lowering-log.f64N/A

        \[\leadsto \mathsf{*.f64}\left(y.re, \mathsf{log.f64}\left(\left(e^{\tan^{-1}_* \frac{x.im}{x.re}}\right)\right)\right) \]
      3. exp-lowering-exp.f64N/A

        \[\leadsto \mathsf{*.f64}\left(y.re, \mathsf{log.f64}\left(\mathsf{exp.f64}\left(\tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
      4. atan2-lowering-atan2.f6424.3%

        \[\leadsto \mathsf{*.f64}\left(y.re, \mathsf{log.f64}\left(\mathsf{exp.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
    10. Applied egg-rr24.3%

      \[\leadsto y.re \cdot \color{blue}{\log \left(e^{\tan^{-1}_* \frac{x.im}{x.re}}\right)} \]

    if -1.64999999999999986e-51 < y.re < 2.70000000000000012e-156 or 0.71999999999999997 < y.re

    1. Initial program 36.1%

      \[e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \]
    2. Step-by-step derivation
      1. exp-diffN/A

        \[\leadsto \frac{e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re}}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}} \cdot \sin \color{blue}{\left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)} \]
      2. associate-*l/N/A

        \[\leadsto \frac{e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re} \cdot \sin \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}{\color{blue}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}} \]
      3. associate-/l*N/A

        \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re} \cdot \color{blue}{\frac{\sin \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}} \]
      4. *-commutativeN/A

        \[\leadsto \frac{\sin \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}} \cdot \color{blue}{e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re}} \]
      5. associate-/r/N/A

        \[\leadsto \frac{\sin \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}{\color{blue}{\frac{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}{e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re}}}} \]
      6. exp-diffN/A

        \[\leadsto \frac{\sin \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im - \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re}} \]
    3. Simplified71.1%

      \[\leadsto \color{blue}{\frac{\sin \left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}{\frac{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}}} \]
    4. Add Preprocessing
    5. Taylor expanded in y.im around 0

      \[\leadsto \mathsf{/.f64}\left(\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)}, \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
    6. Step-by-step derivation
      1. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right), \left(y.im \cdot \left(\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right)\right), \mathsf{/.f64}\left(\color{blue}{\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)}, \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      2. sin-lowering-sin.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{sin.f64}\left(\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right), \left(y.im \cdot \left(\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)}\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}\right)\right), \left(y.im \cdot \left(\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\color{blue}{\mathsf{atan2.f64}\left(x.im, x.re\right)}, y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      4. atan2-lowering-atan2.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \left(y.im \cdot \left(\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, \color{blue}{x.re}\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{*.f64}\left(y.im, \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)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{*.f64}\left(y.im, \left(\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right) \cdot \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right), \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      8. log-lowering-log.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{log.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right), \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      9. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right)\right), \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      10. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)\right), \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      11. hypot-defineN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{log.f64}\left(\left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right), \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      12. hypot-lowering-hypot.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right), \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      13. cos-lowering-cos.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right), \mathsf{cos.f64}\left(\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      14. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      15. atan2-lowering-atan2.f6475.3%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
    7. Simplified75.3%

      \[\leadsto \frac{\color{blue}{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) + y.im \cdot \left(\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right) \cdot \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)}}{\frac{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}} \]
    8. Taylor expanded in y.re around 0

      \[\leadsto \color{blue}{\frac{y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}{e^{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}}} \]
    9. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right), \color{blue}{\left(e^{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\right)}\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y.im, \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right), \left(e^{\color{blue}{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}}\right)\right) \]
      3. log-lowering-log.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right), \left(e^{y.im \cdot \color{blue}{\tan^{-1}_* \frac{x.im}{x.re}}}\right)\right) \]
      4. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\left({x.im}^{2} + {x.re}^{2}\right)\right)\right)\right), \left(e^{y.im \cdot \tan^{-1}_* \frac{\color{blue}{x.im}}{x.re}}\right)\right) \]
      5. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\left({x.im}^{2}\right), \left({x.re}^{2}\right)\right)\right)\right)\right), \left(e^{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\right)\right) \]
      6. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\left(x.im \cdot x.im\right), \left({x.re}^{2}\right)\right)\right)\right)\right), \left(e^{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \left({x.re}^{2}\right)\right)\right)\right)\right), \left(e^{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\right)\right) \]
      8. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \left(x.re \cdot x.re\right)\right)\right)\right)\right), \left(e^{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \mathsf{*.f64}\left(x.re, x.re\right)\right)\right)\right)\right), \left(e^{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\right)\right) \]
      10. exp-lowering-exp.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \mathsf{*.f64}\left(x.re, x.re\right)\right)\right)\right)\right), \mathsf{exp.f64}\left(\left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \mathsf{*.f64}\left(x.re, x.re\right)\right)\right)\right)\right), \mathsf{exp.f64}\left(\mathsf{*.f64}\left(y.im, \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
      12. atan2-lowering-atan2.f6437.5%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \mathsf{*.f64}\left(x.re, x.re\right)\right)\right)\right)\right), \mathsf{exp.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
    10. Simplified37.5%

      \[\leadsto \color{blue}{\frac{y.im \cdot \log \left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)}{e^{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}}} \]
    11. Step-by-step derivation
      1. frac-2negN/A

        \[\leadsto \frac{\mathsf{neg}\left(y.im \cdot \log \left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)\right)}{\color{blue}{\mathsf{neg}\left(e^{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\right)}} \]
      2. *-commutativeN/A

        \[\leadsto \frac{\mathsf{neg}\left(y.im \cdot \log \left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)\right)}{\mathsf{neg}\left(e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\right)} \]
      3. distribute-frac-negN/A

        \[\leadsto \mathsf{neg}\left(\frac{y.im \cdot \log \left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)}{\mathsf{neg}\left(e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\right)}\right) \]
      4. neg-lowering-neg.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\frac{y.im \cdot \log \left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)}{\mathsf{neg}\left(e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\right)}\right)\right) \]
    12. Applied egg-rr41.6%

      \[\leadsto \color{blue}{-\frac{\frac{\log \left(x.re \cdot x.re + x.im \cdot x.im\right)}{\frac{2}{y.im}}}{0 - e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}} \]
    13. Taylor expanded in y.im around 0

      \[\leadsto \color{blue}{\frac{1}{2} \cdot \left(y.im \cdot \log \left({x.im}^{2} + {x.re}^{2}\right)\right)} \]
    14. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \left(\frac{1}{2} \cdot y.im\right) \cdot \color{blue}{\log \left({x.im}^{2} + {x.re}^{2}\right)} \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{1}{2} \cdot y.im\right), \color{blue}{\log \left({x.im}^{2} + {x.re}^{2}\right)}\right) \]
      3. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\left(y.im \cdot \frac{1}{2}\right), \log \color{blue}{\left({x.im}^{2} + {x.re}^{2}\right)}\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(y.im, \frac{1}{2}\right), \log \color{blue}{\left({x.im}^{2} + {x.re}^{2}\right)}\right) \]
      5. log-lowering-log.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(y.im, \frac{1}{2}\right), \mathsf{log.f64}\left(\left({x.im}^{2} + {x.re}^{2}\right)\right)\right) \]
      6. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(y.im, \frac{1}{2}\right), \mathsf{log.f64}\left(\mathsf{+.f64}\left(\left({x.im}^{2}\right), \left({x.re}^{2}\right)\right)\right)\right) \]
      7. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(y.im, \frac{1}{2}\right), \mathsf{log.f64}\left(\mathsf{+.f64}\left(\left(x.im \cdot x.im\right), \left({x.re}^{2}\right)\right)\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(y.im, \frac{1}{2}\right), \mathsf{log.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \left({x.re}^{2}\right)\right)\right)\right) \]
      9. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(y.im, \frac{1}{2}\right), \mathsf{log.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \left(x.re \cdot x.re\right)\right)\right)\right) \]
      10. *-lowering-*.f6423.5%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(y.im, \frac{1}{2}\right), \mathsf{log.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \mathsf{*.f64}\left(x.re, x.re\right)\right)\right)\right) \]
    15. Simplified23.5%

      \[\leadsto \color{blue}{\left(y.im \cdot 0.5\right) \cdot \log \left(x.im \cdot x.im + x.re \cdot x.re\right)} \]

    if 2.70000000000000012e-156 < y.re < 0.71999999999999997

    1. Initial program 53.1%

      \[e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \]
    2. Add Preprocessing
    3. Taylor expanded in y.im around 0

      \[\leadsto \color{blue}{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}} \]
    4. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right), \color{blue}{\left({\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}\right)}\right) \]
      2. sin-lowering-sin.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right), \left({\color{blue}{\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}}^{y.re}\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}\right)\right), \left({\left(\sqrt{\color{blue}{{x.im}^{2} + {x.re}^{2}}}\right)}^{y.re}\right)\right) \]
      4. atan2-lowering-atan2.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \left({\left(\sqrt{{x.im}^{2} + \color{blue}{{x.re}^{2}}}\right)}^{y.re}\right)\right) \]
      5. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right), \color{blue}{y.re}\right)\right) \]
      6. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right), y.re\right)\right) \]
      7. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right), y.re\right)\right) \]
      8. hypot-defineN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(\left(\mathsf{hypot}\left(x.im, x.re\right)\right), y.re\right)\right) \]
      9. hypot-lowering-hypot.f6445.5%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right)\right) \]
    5. Simplified45.5%

      \[\leadsto \color{blue}{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}} \]
    6. Taylor expanded in y.re around 0

      \[\leadsto \color{blue}{y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}} \]
    7. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(y.re, \color{blue}{\tan^{-1}_* \frac{x.im}{x.re}}\right) \]
      2. atan2-lowering-atan2.f6438.8%

        \[\leadsto \mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, \color{blue}{x.re}\right)\right) \]
    8. Simplified38.8%

      \[\leadsto \color{blue}{y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification25.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y.re \leq -1.65 \cdot 10^{-51}:\\ \;\;\;\;y.re \cdot \log \left(e^{\tan^{-1}_* \frac{x.im}{x.re}}\right)\\ \mathbf{elif}\;y.re \leq 2.7 \cdot 10^{-156}:\\ \;\;\;\;\left(y.im \cdot 0.5\right) \cdot \log \left(x.re \cdot x.re + x.im \cdot x.im\right)\\ \mathbf{elif}\;y.re \leq 0.72:\\ \;\;\;\;y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\ \mathbf{else}:\\ \;\;\;\;\left(y.im \cdot 0.5\right) \cdot \log \left(x.re \cdot x.re + x.im \cdot x.im\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 19: 19.7% accurate, 6.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \left(y.im \cdot 0.5\right) \cdot \log \left(x.re \cdot x.re + x.im \cdot x.im\right)\\ \mathbf{if}\;y.re \leq 7.4 \cdot 10^{-149}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;y.re \leq 1.22:\\ \;\;\;\;y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
(FPCore (x.re x.im y.re y.im)
 :precision binary64
 (let* ((t_0 (* (* y.im 0.5) (log (+ (* x.re x.re) (* x.im x.im))))))
   (if (<= y.re 7.4e-149)
     t_0
     (if (<= y.re 1.22) (* y.re (atan2 x.im x.re)) t_0))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
	double t_0 = (y_46_im * 0.5) * log(((x_46_re * x_46_re) + (x_46_im * x_46_im)));
	double tmp;
	if (y_46_re <= 7.4e-149) {
		tmp = t_0;
	} else if (y_46_re <= 1.22) {
		tmp = y_46_re * atan2(x_46_im, x_46_re);
	} else {
		tmp = t_0;
	}
	return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
    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_46im * 0.5d0) * log(((x_46re * x_46re) + (x_46im * x_46im)))
    if (y_46re <= 7.4d-149) then
        tmp = t_0
    else if (y_46re <= 1.22d0) then
        tmp = y_46re * atan2(x_46im, x_46re)
    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_im * 0.5) * Math.log(((x_46_re * x_46_re) + (x_46_im * x_46_im)));
	double tmp;
	if (y_46_re <= 7.4e-149) {
		tmp = t_0;
	} else if (y_46_re <= 1.22) {
		tmp = y_46_re * Math.atan2(x_46_im, x_46_re);
	} else {
		tmp = t_0;
	}
	return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im):
	t_0 = (y_46_im * 0.5) * math.log(((x_46_re * x_46_re) + (x_46_im * x_46_im)))
	tmp = 0
	if y_46_re <= 7.4e-149:
		tmp = t_0
	elif y_46_re <= 1.22:
		tmp = y_46_re * math.atan2(x_46_im, x_46_re)
	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_im * 0.5) * log(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))
	tmp = 0.0
	if (y_46_re <= 7.4e-149)
		tmp = t_0;
	elseif (y_46_re <= 1.22)
		tmp = Float64(y_46_re * atan(x_46_im, x_46_re));
	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_im * 0.5) * log(((x_46_re * x_46_re) + (x_46_im * x_46_im)));
	tmp = 0.0;
	if (y_46_re <= 7.4e-149)
		tmp = t_0;
	elseif (y_46_re <= 1.22)
		tmp = y_46_re * atan2(x_46_im, x_46_re);
	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$im * 0.5), $MachinePrecision] * N[Log[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, 7.4e-149], t$95$0, If[LessEqual[y$46$re, 1.22], N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \left(y.im \cdot 0.5\right) \cdot \log \left(x.re \cdot x.re + x.im \cdot x.im\right)\\
\mathbf{if}\;y.re \leq 7.4 \cdot 10^{-149}:\\
\;\;\;\;t\_0\\

\mathbf{elif}\;y.re \leq 1.22:\\
\;\;\;\;y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\

\mathbf{else}:\\
\;\;\;\;t\_0\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y.re < 7.3999999999999998e-149 or 1.21999999999999997 < 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. Step-by-step derivation
      1. exp-diffN/A

        \[\leadsto \frac{e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re}}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}} \cdot \sin \color{blue}{\left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)} \]
      2. associate-*l/N/A

        \[\leadsto \frac{e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re} \cdot \sin \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}{\color{blue}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}} \]
      3. associate-/l*N/A

        \[\leadsto e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re} \cdot \color{blue}{\frac{\sin \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}} \]
      4. *-commutativeN/A

        \[\leadsto \frac{\sin \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}} \cdot \color{blue}{e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re}} \]
      5. associate-/r/N/A

        \[\leadsto \frac{\sin \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}{\color{blue}{\frac{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}{e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re}}}} \]
      6. exp-diffN/A

        \[\leadsto \frac{\sin \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im - \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re}} \]
    3. Simplified72.4%

      \[\leadsto \color{blue}{\frac{\sin \left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}{\frac{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}}} \]
    4. Add Preprocessing
    5. Taylor expanded in y.im around 0

      \[\leadsto \mathsf{/.f64}\left(\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)}, \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
    6. Step-by-step derivation
      1. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right), \left(y.im \cdot \left(\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right)\right), \mathsf{/.f64}\left(\color{blue}{\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right)}, \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      2. sin-lowering-sin.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{sin.f64}\left(\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right), \left(y.im \cdot \left(\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)}\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}\right)\right), \left(y.im \cdot \left(\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\color{blue}{\mathsf{atan2.f64}\left(x.im, x.re\right)}, y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      4. atan2-lowering-atan2.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \left(y.im \cdot \left(\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, \color{blue}{x.re}\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{*.f64}\left(y.im, \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)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{*.f64}\left(y.im, \left(\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right) \cdot \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right), \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      8. log-lowering-log.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{log.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right), \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      9. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right)\right), \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      10. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{log.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)\right), \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      11. hypot-defineN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{log.f64}\left(\left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right), \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      12. hypot-lowering-hypot.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right), \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      13. cos-lowering-cos.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right), \mathsf{cos.f64}\left(\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      14. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
      15. atan2-lowering-atan2.f6473.9%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{*.f64}\left(y.im, \mathsf{*.f64}\left(\mathsf{log.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right)\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(\mathsf{atan2.f64}\left(x.im, x.re\right), y.im\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.re, x.im\right), y.re\right)\right)\right) \]
    7. Simplified73.9%

      \[\leadsto \frac{\color{blue}{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) + y.im \cdot \left(\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right) \cdot \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)}}{\frac{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}} \]
    8. Taylor expanded in y.re around 0

      \[\leadsto \color{blue}{\frac{y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}{e^{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}}} \]
    9. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(y.im \cdot \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right), \color{blue}{\left(e^{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\right)}\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y.im, \log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right), \left(e^{\color{blue}{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}}\right)\right) \]
      3. log-lowering-log.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)\right)\right), \left(e^{y.im \cdot \color{blue}{\tan^{-1}_* \frac{x.im}{x.re}}}\right)\right) \]
      4. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\left({x.im}^{2} + {x.re}^{2}\right)\right)\right)\right), \left(e^{y.im \cdot \tan^{-1}_* \frac{\color{blue}{x.im}}{x.re}}\right)\right) \]
      5. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\left({x.im}^{2}\right), \left({x.re}^{2}\right)\right)\right)\right)\right), \left(e^{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\right)\right) \]
      6. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\left(x.im \cdot x.im\right), \left({x.re}^{2}\right)\right)\right)\right)\right), \left(e^{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \left({x.re}^{2}\right)\right)\right)\right)\right), \left(e^{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\right)\right) \]
      8. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \left(x.re \cdot x.re\right)\right)\right)\right)\right), \left(e^{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \mathsf{*.f64}\left(x.re, x.re\right)\right)\right)\right)\right), \left(e^{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\right)\right) \]
      10. exp-lowering-exp.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \mathsf{*.f64}\left(x.re, x.re\right)\right)\right)\right)\right), \mathsf{exp.f64}\left(\left(y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \mathsf{*.f64}\left(x.re, x.re\right)\right)\right)\right)\right), \mathsf{exp.f64}\left(\mathsf{*.f64}\left(y.im, \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right) \]
      12. atan2-lowering-atan2.f6434.7%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{log.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \mathsf{*.f64}\left(x.re, x.re\right)\right)\right)\right)\right), \mathsf{exp.f64}\left(\mathsf{*.f64}\left(y.im, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right)\right) \]
    10. Simplified34.7%

      \[\leadsto \color{blue}{\frac{y.im \cdot \log \left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)}{e^{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}}} \]
    11. Step-by-step derivation
      1. frac-2negN/A

        \[\leadsto \frac{\mathsf{neg}\left(y.im \cdot \log \left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)\right)}{\color{blue}{\mathsf{neg}\left(e^{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\right)}} \]
      2. *-commutativeN/A

        \[\leadsto \frac{\mathsf{neg}\left(y.im \cdot \log \left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)\right)}{\mathsf{neg}\left(e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\right)} \]
      3. distribute-frac-negN/A

        \[\leadsto \mathsf{neg}\left(\frac{y.im \cdot \log \left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)}{\mathsf{neg}\left(e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\right)}\right) \]
      4. neg-lowering-neg.f64N/A

        \[\leadsto \mathsf{neg.f64}\left(\left(\frac{y.im \cdot \log \left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right)}{\mathsf{neg}\left(e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\right)}\right)\right) \]
    12. Applied egg-rr35.6%

      \[\leadsto \color{blue}{-\frac{\frac{\log \left(x.re \cdot x.re + x.im \cdot x.im\right)}{\frac{2}{y.im}}}{0 - e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}} \]
    13. Taylor expanded in y.im around 0

      \[\leadsto \color{blue}{\frac{1}{2} \cdot \left(y.im \cdot \log \left({x.im}^{2} + {x.re}^{2}\right)\right)} \]
    14. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \left(\frac{1}{2} \cdot y.im\right) \cdot \color{blue}{\log \left({x.im}^{2} + {x.re}^{2}\right)} \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{1}{2} \cdot y.im\right), \color{blue}{\log \left({x.im}^{2} + {x.re}^{2}\right)}\right) \]
      3. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\left(y.im \cdot \frac{1}{2}\right), \log \color{blue}{\left({x.im}^{2} + {x.re}^{2}\right)}\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(y.im, \frac{1}{2}\right), \log \color{blue}{\left({x.im}^{2} + {x.re}^{2}\right)}\right) \]
      5. log-lowering-log.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(y.im, \frac{1}{2}\right), \mathsf{log.f64}\left(\left({x.im}^{2} + {x.re}^{2}\right)\right)\right) \]
      6. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(y.im, \frac{1}{2}\right), \mathsf{log.f64}\left(\mathsf{+.f64}\left(\left({x.im}^{2}\right), \left({x.re}^{2}\right)\right)\right)\right) \]
      7. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(y.im, \frac{1}{2}\right), \mathsf{log.f64}\left(\mathsf{+.f64}\left(\left(x.im \cdot x.im\right), \left({x.re}^{2}\right)\right)\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(y.im, \frac{1}{2}\right), \mathsf{log.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \left({x.re}^{2}\right)\right)\right)\right) \]
      9. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(y.im, \frac{1}{2}\right), \mathsf{log.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \left(x.re \cdot x.re\right)\right)\right)\right) \]
      10. *-lowering-*.f6418.6%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(y.im, \frac{1}{2}\right), \mathsf{log.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(x.im, x.im\right), \mathsf{*.f64}\left(x.re, x.re\right)\right)\right)\right) \]
    15. Simplified18.6%

      \[\leadsto \color{blue}{\left(y.im \cdot 0.5\right) \cdot \log \left(x.im \cdot x.im + x.re \cdot x.re\right)} \]

    if 7.3999999999999998e-149 < y.re < 1.21999999999999997

    1. Initial program 53.1%

      \[e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \]
    2. Add Preprocessing
    3. Taylor expanded in y.im around 0

      \[\leadsto \color{blue}{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}} \]
    4. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right), \color{blue}{\left({\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}\right)}\right) \]
      2. sin-lowering-sin.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right), \left({\color{blue}{\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}}^{y.re}\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}\right)\right), \left({\left(\sqrt{\color{blue}{{x.im}^{2} + {x.re}^{2}}}\right)}^{y.re}\right)\right) \]
      4. atan2-lowering-atan2.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \left({\left(\sqrt{{x.im}^{2} + \color{blue}{{x.re}^{2}}}\right)}^{y.re}\right)\right) \]
      5. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right), \color{blue}{y.re}\right)\right) \]
      6. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right), y.re\right)\right) \]
      7. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right), y.re\right)\right) \]
      8. hypot-defineN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(\left(\mathsf{hypot}\left(x.im, x.re\right)\right), y.re\right)\right) \]
      9. hypot-lowering-hypot.f6445.5%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right)\right) \]
    5. Simplified45.5%

      \[\leadsto \color{blue}{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}} \]
    6. Taylor expanded in y.re around 0

      \[\leadsto \color{blue}{y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}} \]
    7. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(y.re, \color{blue}{\tan^{-1}_* \frac{x.im}{x.re}}\right) \]
      2. atan2-lowering-atan2.f6438.8%

        \[\leadsto \mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, \color{blue}{x.re}\right)\right) \]
    8. Simplified38.8%

      \[\leadsto \color{blue}{y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification21.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y.re \leq 7.4 \cdot 10^{-149}:\\ \;\;\;\;\left(y.im \cdot 0.5\right) \cdot \log \left(x.re \cdot x.re + x.im \cdot x.im\right)\\ \mathbf{elif}\;y.re \leq 1.22:\\ \;\;\;\;y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\ \mathbf{else}:\\ \;\;\;\;\left(y.im \cdot 0.5\right) \cdot \log \left(x.re \cdot x.re + x.im \cdot x.im\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 20: 13.8% accurate, 8.0× 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);
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
    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 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. Add Preprocessing
  3. Taylor expanded in y.im around 0

    \[\leadsto \color{blue}{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}} \]
  4. Step-by-step derivation
    1. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right), \color{blue}{\left({\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re}\right)}\right) \]
    2. sin-lowering-sin.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right), \left({\color{blue}{\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}}^{y.re}\right)\right) \]
    3. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}\right)\right), \left({\left(\sqrt{\color{blue}{{x.im}^{2} + {x.re}^{2}}}\right)}^{y.re}\right)\right) \]
    4. atan2-lowering-atan2.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \left({\left(\sqrt{{x.im}^{2} + \color{blue}{{x.re}^{2}}}\right)}^{y.re}\right)\right) \]
    5. pow-lowering-pow.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right), \color{blue}{y.re}\right)\right) \]
    6. unpow2N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(\left(\sqrt{x.im \cdot x.im + {x.re}^{2}}\right), y.re\right)\right) \]
    7. unpow2N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(\left(\sqrt{x.im \cdot x.im + x.re \cdot x.re}\right), y.re\right)\right) \]
    8. hypot-defineN/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(\left(\mathsf{hypot}\left(x.im, x.re\right)\right), y.re\right)\right) \]
    9. hypot-lowering-hypot.f6443.6%

      \[\leadsto \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, x.re\right)\right)\right), \mathsf{pow.f64}\left(\mathsf{hypot.f64}\left(x.im, x.re\right), y.re\right)\right) \]
  5. Simplified43.6%

    \[\leadsto \color{blue}{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}} \]
  6. Taylor expanded in y.re around 0

    \[\leadsto \color{blue}{y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}} \]
  7. Step-by-step derivation
    1. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(y.re, \color{blue}{\tan^{-1}_* \frac{x.im}{x.re}}\right) \]
    2. atan2-lowering-atan2.f6412.7%

      \[\leadsto \mathsf{*.f64}\left(y.re, \mathsf{atan2.f64}\left(x.im, \color{blue}{x.re}\right)\right) \]
  8. Simplified12.7%

    \[\leadsto \color{blue}{y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}} \]
  9. Add Preprocessing

Reproduce

?
herbie shell --seed 2024139 
(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)))))