powComplex, imaginary part

Percentage Accurate: 40.4% → 76.1%
Time: 34.5s
Alternatives: 21
Speedup: 1.9×

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

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

Initial Program: 40.4% 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: 76.1% 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 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\ t_3 := e^{y.re \cdot t_2 - t_0}\\ t_4 := y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\ \mathbf{if}\;y.re \leq -9.6 \cdot 10^{+152}:\\ \;\;\;\;\sin \left({\left(\sqrt[3]{t_1}\right)}^{3}\right) \cdot {\left(\sqrt{{x.re}^{2} + {x.im}^{2}}\right)}^{y.re}\\ \mathbf{elif}\;y.re \leq -3.7 \cdot 10^{-23}:\\ \;\;\;\;t_3 \cdot \sin t_1\\ \mathbf{elif}\;y.re \leq 1.22 \cdot 10^{-62}:\\ \;\;\;\;e^{y.im \cdot \left(-\tan^{-1}_* \frac{x.im}{x.re}\right)} \cdot \sin \left(\mathsf{fma}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}, y.im \cdot t_2\right)\right)\\ \mathbf{elif}\;y.re \leq 1.55 \cdot 10^{+134}:\\ \;\;\;\;e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - t_0} \cdot \sin \left(t_1 - t_4\right)\\ \mathbf{else}:\\ \;\;\;\;t_3 \cdot \sin t_4\\ \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 (hypot x.re x.im)))
        (t_3 (exp (- (* y.re t_2) t_0)))
        (t_4 (* y.im (log (hypot x.im x.re)))))
   (if (<= y.re -9.6e+152)
     (*
      (sin (pow (cbrt t_1) 3.0))
      (pow (sqrt (+ (pow x.re 2.0) (pow x.im 2.0))) y.re))
     (if (<= y.re -3.7e-23)
       (* t_3 (sin t_1))
       (if (<= y.re 1.22e-62)
         (*
          (exp (* y.im (- (atan2 x.im x.re))))
          (sin (fma y.re (atan2 x.im x.re) (* y.im t_2))))
         (if (<= y.re 1.55e+134)
           (*
            (exp (- (* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.re) t_0))
            (sin (- t_1 t_4)))
           (* t_3 (sin t_4))))))))
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(hypot(x_46_re, x_46_im));
	double t_3 = exp(((y_46_re * t_2) - t_0));
	double t_4 = y_46_im * log(hypot(x_46_im, x_46_re));
	double tmp;
	if (y_46_re <= -9.6e+152) {
		tmp = sin(pow(cbrt(t_1), 3.0)) * pow(sqrt((pow(x_46_re, 2.0) + pow(x_46_im, 2.0))), y_46_re);
	} else if (y_46_re <= -3.7e-23) {
		tmp = t_3 * sin(t_1);
	} else if (y_46_re <= 1.22e-62) {
		tmp = exp((y_46_im * -atan2(x_46_im, x_46_re))) * sin(fma(y_46_re, atan2(x_46_im, x_46_re), (y_46_im * t_2)));
	} else if (y_46_re <= 1.55e+134) {
		tmp = exp(((log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - t_0)) * sin((t_1 - t_4));
	} else {
		tmp = t_3 * sin(t_4);
	}
	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(hypot(x_46_re, x_46_im))
	t_3 = exp(Float64(Float64(y_46_re * t_2) - t_0))
	t_4 = Float64(y_46_im * log(hypot(x_46_im, x_46_re)))
	tmp = 0.0
	if (y_46_re <= -9.6e+152)
		tmp = Float64(sin((cbrt(t_1) ^ 3.0)) * (sqrt(Float64((x_46_re ^ 2.0) + (x_46_im ^ 2.0))) ^ y_46_re));
	elseif (y_46_re <= -3.7e-23)
		tmp = Float64(t_3 * sin(t_1));
	elseif (y_46_re <= 1.22e-62)
		tmp = Float64(exp(Float64(y_46_im * Float64(-atan(x_46_im, x_46_re)))) * sin(fma(y_46_re, atan(x_46_im, x_46_re), Float64(y_46_im * t_2))));
	elseif (y_46_re <= 1.55e+134)
		tmp = Float64(exp(Float64(Float64(log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) * y_46_re) - t_0)) * sin(Float64(t_1 - t_4)));
	else
		tmp = Float64(t_3 * sin(t_4));
	end
	return 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[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[Exp[N[(N[(y$46$re * t$95$2), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$4 = N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -9.6e+152], N[(N[Sin[N[Power[N[Power[t$95$1, 1/3], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision] * N[Power[N[Sqrt[N[(N[Power[x$46$re, 2.0], $MachinePrecision] + N[Power[x$46$im, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, -3.7e-23], N[(t$95$3 * N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 1.22e-62], N[(N[Exp[N[(y$46$im * (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision] + N[(y$46$im * t$95$2), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 1.55e+134], N[(N[Exp[N[(N[(N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * y$46$re), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(t$95$1 - t$95$4), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$3 * N[Sin[t$95$4], $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(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
t_3 := e^{y.re \cdot t_2 - t_0}\\
t_4 := y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
\mathbf{if}\;y.re \leq -9.6 \cdot 10^{+152}:\\
\;\;\;\;\sin \left({\left(\sqrt[3]{t_1}\right)}^{3}\right) \cdot {\left(\sqrt{{x.re}^{2} + {x.im}^{2}}\right)}^{y.re}\\

\mathbf{elif}\;y.re \leq -3.7 \cdot 10^{-23}:\\
\;\;\;\;t_3 \cdot \sin t_1\\

\mathbf{elif}\;y.re \leq 1.22 \cdot 10^{-62}:\\
\;\;\;\;e^{y.im \cdot \left(-\tan^{-1}_* \frac{x.im}{x.re}\right)} \cdot \sin \left(\mathsf{fma}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}, y.im \cdot t_2\right)\right)\\

\mathbf{elif}\;y.re \leq 1.55 \cdot 10^{+134}:\\
\;\;\;\;e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - t_0} \cdot \sin \left(t_1 - t_4\right)\\

\mathbf{else}:\\
\;\;\;\;t_3 \cdot \sin t_4\\


\end{array}
\end{array}
Derivation
    &prev;&pcontext;&pcontext2;&ctx;
  1. Add Preprocessing

Alternative 2: 79.6% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\ t_1 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\ t_2 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\ t_3 := \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)\\ t_4 := e^{t_3 \cdot y.re - t_1}\\ t_5 := t_4 \cdot \sin \left(t_3 \cdot y.im + t_2\right)\\ t_6 := y.im \cdot t_0\\ \mathbf{if}\;t_5 \leq 0.1:\\ \;\;\;\;t_4 \cdot \sin \left({\left(\sqrt[3]{t_6}\right)}^{3} + t_2\right)\\ \mathbf{elif}\;t_5 \leq \infty:\\ \;\;\;\;t_4 \cdot \sin \left(t_2 - y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;e^{y.re \cdot t_0 - t_1} \cdot \mathsf{fma}\left(\sin t_6, \cos t_2, \sin t_2 \cdot \cos t_6\right)\\ \end{array} \end{array} \]
(FPCore (x.re x.im y.re y.im)
 :precision binary64
 (let* ((t_0 (log (hypot x.re x.im)))
        (t_1 (* (atan2 x.im x.re) y.im))
        (t_2 (* y.re (atan2 x.im x.re)))
        (t_3 (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
        (t_4 (exp (- (* t_3 y.re) t_1)))
        (t_5 (* t_4 (sin (+ (* t_3 y.im) t_2))))
        (t_6 (* y.im t_0)))
   (if (<= t_5 0.1)
     (* t_4 (sin (+ (pow (cbrt t_6) 3.0) t_2)))
     (if (<= t_5 INFINITY)
       (* t_4 (sin (- t_2 (* y.im (log (hypot x.im x.re))))))
       (*
        (exp (- (* y.re t_0) t_1))
        (fma (sin t_6) (cos t_2) (* (sin t_2) (cos t_6))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
	double t_0 = log(hypot(x_46_re, x_46_im));
	double t_1 = atan2(x_46_im, x_46_re) * y_46_im;
	double t_2 = y_46_re * atan2(x_46_im, x_46_re);
	double t_3 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
	double t_4 = exp(((t_3 * y_46_re) - t_1));
	double t_5 = t_4 * sin(((t_3 * y_46_im) + t_2));
	double t_6 = y_46_im * t_0;
	double tmp;
	if (t_5 <= 0.1) {
		tmp = t_4 * sin((pow(cbrt(t_6), 3.0) + t_2));
	} else if (t_5 <= ((double) INFINITY)) {
		tmp = t_4 * sin((t_2 - (y_46_im * log(hypot(x_46_im, x_46_re)))));
	} else {
		tmp = exp(((y_46_re * t_0) - t_1)) * fma(sin(t_6), cos(t_2), (sin(t_2) * cos(t_6)));
	}
	return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im)
	t_0 = log(hypot(x_46_re, x_46_im))
	t_1 = Float64(atan(x_46_im, x_46_re) * y_46_im)
	t_2 = Float64(y_46_re * atan(x_46_im, x_46_re))
	t_3 = log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))
	t_4 = exp(Float64(Float64(t_3 * y_46_re) - t_1))
	t_5 = Float64(t_4 * sin(Float64(Float64(t_3 * y_46_im) + t_2)))
	t_6 = Float64(y_46_im * t_0)
	tmp = 0.0
	if (t_5 <= 0.1)
		tmp = Float64(t_4 * sin(Float64((cbrt(t_6) ^ 3.0) + t_2)));
	elseif (t_5 <= Inf)
		tmp = Float64(t_4 * sin(Float64(t_2 - Float64(y_46_im * log(hypot(x_46_im, x_46_re))))));
	else
		tmp = Float64(exp(Float64(Float64(y_46_re * t_0) - t_1)) * fma(sin(t_6), cos(t_2), Float64(sin(t_2) * cos(t_6))));
	end
	return tmp
end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, Block[{t$95$2 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = 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$4 = N[Exp[N[(N[(t$95$3 * y$46$re), $MachinePrecision] - t$95$1), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$5 = N[(t$95$4 * N[Sin[N[(N[(t$95$3 * y$46$im), $MachinePrecision] + t$95$2), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(y$46$im * t$95$0), $MachinePrecision]}, If[LessEqual[t$95$5, 0.1], N[(t$95$4 * N[Sin[N[(N[Power[N[Power[t$95$6, 1/3], $MachinePrecision], 3.0], $MachinePrecision] + t$95$2), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$5, Infinity], N[(t$95$4 * N[Sin[N[(t$95$2 - N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Exp[N[(N[(y$46$re * t$95$0), $MachinePrecision] - t$95$1), $MachinePrecision]], $MachinePrecision] * N[(N[Sin[t$95$6], $MachinePrecision] * N[Cos[t$95$2], $MachinePrecision] + N[(N[Sin[t$95$2], $MachinePrecision] * N[Cos[t$95$6], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
t_1 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_2 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_3 := \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)\\
t_4 := e^{t_3 \cdot y.re - t_1}\\
t_5 := t_4 \cdot \sin \left(t_3 \cdot y.im + t_2\right)\\
t_6 := y.im \cdot t_0\\
\mathbf{if}\;t_5 \leq 0.1:\\
\;\;\;\;t_4 \cdot \sin \left({\left(\sqrt[3]{t_6}\right)}^{3} + t_2\right)\\

\mathbf{elif}\;t_5 \leq \infty:\\
\;\;\;\;t_4 \cdot \sin \left(t_2 - y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\

\mathbf{else}:\\
\;\;\;\;e^{y.re \cdot t_0 - t_1} \cdot \mathsf{fma}\left(\sin t_6, \cos t_2, \sin t_2 \cdot \cos t_6\right)\\


\end{array}
\end{array}
Derivation
    &prev;&pcontext;&pcontext2;&ctx;
  1. Add Preprocessing

Alternative 3: 79.9% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\ t_1 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\ t_2 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\ t_3 := \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)\\ t_4 := e^{t_3 \cdot y.re - t_1}\\ t_5 := t_4 \cdot \sin \left(t_3 \cdot y.im + t_2\right)\\ \mathbf{if}\;t_5 \leq 0.1:\\ \;\;\;\;t_4 \cdot \sin \left({\left(\sqrt[3]{y.im \cdot t_0}\right)}^{3} + t_2\right)\\ \mathbf{elif}\;t_5 \leq \infty:\\ \;\;\;\;t_4 \cdot \sin \left(t_2 - y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;e^{y.re \cdot t_0 - t_1} \cdot \sin \left(\mathsf{fma}\left(t_0, y.im, t_2\right)\right)\\ \end{array} \end{array} \]
(FPCore (x.re x.im y.re y.im)
 :precision binary64
 (let* ((t_0 (log (hypot x.re x.im)))
        (t_1 (* (atan2 x.im x.re) y.im))
        (t_2 (* y.re (atan2 x.im x.re)))
        (t_3 (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
        (t_4 (exp (- (* t_3 y.re) t_1)))
        (t_5 (* t_4 (sin (+ (* t_3 y.im) t_2)))))
   (if (<= t_5 0.1)
     (* t_4 (sin (+ (pow (cbrt (* y.im t_0)) 3.0) t_2)))
     (if (<= t_5 INFINITY)
       (* t_4 (sin (- t_2 (* y.im (log (hypot x.im x.re))))))
       (* (exp (- (* y.re t_0) t_1)) (sin (fma t_0 y.im t_2)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
	double t_0 = log(hypot(x_46_re, x_46_im));
	double t_1 = atan2(x_46_im, x_46_re) * y_46_im;
	double t_2 = y_46_re * atan2(x_46_im, x_46_re);
	double t_3 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
	double t_4 = exp(((t_3 * y_46_re) - t_1));
	double t_5 = t_4 * sin(((t_3 * y_46_im) + t_2));
	double tmp;
	if (t_5 <= 0.1) {
		tmp = t_4 * sin((pow(cbrt((y_46_im * t_0)), 3.0) + t_2));
	} else if (t_5 <= ((double) INFINITY)) {
		tmp = t_4 * sin((t_2 - (y_46_im * log(hypot(x_46_im, x_46_re)))));
	} else {
		tmp = exp(((y_46_re * t_0) - t_1)) * sin(fma(t_0, y_46_im, t_2));
	}
	return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im)
	t_0 = log(hypot(x_46_re, x_46_im))
	t_1 = Float64(atan(x_46_im, x_46_re) * y_46_im)
	t_2 = Float64(y_46_re * atan(x_46_im, x_46_re))
	t_3 = log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))
	t_4 = exp(Float64(Float64(t_3 * y_46_re) - t_1))
	t_5 = Float64(t_4 * sin(Float64(Float64(t_3 * y_46_im) + t_2)))
	tmp = 0.0
	if (t_5 <= 0.1)
		tmp = Float64(t_4 * sin(Float64((cbrt(Float64(y_46_im * t_0)) ^ 3.0) + t_2)));
	elseif (t_5 <= Inf)
		tmp = Float64(t_4 * sin(Float64(t_2 - Float64(y_46_im * log(hypot(x_46_im, x_46_re))))));
	else
		tmp = Float64(exp(Float64(Float64(y_46_re * t_0) - t_1)) * sin(fma(t_0, y_46_im, t_2)));
	end
	return tmp
end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, Block[{t$95$2 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = 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$4 = N[Exp[N[(N[(t$95$3 * y$46$re), $MachinePrecision] - t$95$1), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$5 = N[(t$95$4 * N[Sin[N[(N[(t$95$3 * y$46$im), $MachinePrecision] + t$95$2), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$5, 0.1], N[(t$95$4 * N[Sin[N[(N[Power[N[Power[N[(y$46$im * t$95$0), $MachinePrecision], 1/3], $MachinePrecision], 3.0], $MachinePrecision] + t$95$2), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$5, Infinity], N[(t$95$4 * N[Sin[N[(t$95$2 - N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Exp[N[(N[(y$46$re * t$95$0), $MachinePrecision] - t$95$1), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(t$95$0 * y$46$im + t$95$2), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
t_1 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_2 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_3 := \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)\\
t_4 := e^{t_3 \cdot y.re - t_1}\\
t_5 := t_4 \cdot \sin \left(t_3 \cdot y.im + t_2\right)\\
\mathbf{if}\;t_5 \leq 0.1:\\
\;\;\;\;t_4 \cdot \sin \left({\left(\sqrt[3]{y.im \cdot t_0}\right)}^{3} + t_2\right)\\

\mathbf{elif}\;t_5 \leq \infty:\\
\;\;\;\;t_4 \cdot \sin \left(t_2 - y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\

\mathbf{else}:\\
\;\;\;\;e^{y.re \cdot t_0 - t_1} \cdot \sin \left(\mathsf{fma}\left(t_0, y.im, t_2\right)\right)\\


\end{array}
\end{array}
Derivation
    &prev;&pcontext;&pcontext2;&ctx;
  1. Add Preprocessing

Alternative 4: 80.3% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\ e^{y.re \cdot t_0 - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(\mathsf{fma}\left(t_0, y.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \end{array} \end{array} \]
(FPCore (x.re x.im y.re y.im)
 :precision binary64
 (let* ((t_0 (log (hypot x.re x.im))))
   (*
    (exp (- (* y.re t_0) (* (atan2 x.im x.re) y.im)))
    (sin (fma t_0 y.im (* y.re (atan2 x.im x.re)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
	double t_0 = log(hypot(x_46_re, x_46_im));
	return exp(((y_46_re * t_0) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin(fma(t_0, y_46_im, (y_46_re * atan2(x_46_im, x_46_re))));
}
function code(x_46_re, x_46_im, y_46_re, y_46_im)
	t_0 = log(hypot(x_46_re, x_46_im))
	return Float64(exp(Float64(Float64(y_46_re * t_0) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * sin(fma(t_0, y_46_im, Float64(y_46_re * atan(x_46_im, x_46_re)))))
end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, N[(N[Exp[N[(N[(y$46$re * t$95$0), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(t$95$0 * y$46$im + N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
e^{y.re \cdot t_0 - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(\mathsf{fma}\left(t_0, y.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)
\end{array}
\end{array}
Derivation
    &prev;&pcontext;&pcontext2;&ctx;
  1. Add Preprocessing

Alternative 5: 78.4% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\ t_1 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\ t_2 := e^{y.re \cdot t_1 - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\ t_3 := t_2 \cdot \sin t_0\\ \mathbf{if}\;y.re \leq -2.5 \cdot 10^{+150}:\\ \;\;\;\;\sin \left({\left(\sqrt[3]{t_0}\right)}^{3}\right) \cdot {\left(\sqrt{{x.re}^{2} + {x.im}^{2}}\right)}^{y.re}\\ \mathbf{elif}\;y.re \leq -1.65 \cdot 10^{-25}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;y.re \leq 1.2 \cdot 10^{-71}:\\ \;\;\;\;e^{y.im \cdot \left(-\tan^{-1}_* \frac{x.im}{x.re}\right)} \cdot \sin \left(\mathsf{fma}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}, y.im \cdot t_1\right)\right)\\ \mathbf{elif}\;y.re \leq 8.5 \cdot 10^{+134}:\\ \;\;\;\;t_3\\ \mathbf{else}:\\ \;\;\;\;t_2 \cdot \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\ \end{array} \end{array} \]
(FPCore (x.re x.im y.re y.im)
 :precision binary64
 (let* ((t_0 (* y.re (atan2 x.im x.re)))
        (t_1 (log (hypot x.re x.im)))
        (t_2 (exp (- (* y.re t_1) (* (atan2 x.im x.re) y.im))))
        (t_3 (* t_2 (sin t_0))))
   (if (<= y.re -2.5e+150)
     (*
      (sin (pow (cbrt t_0) 3.0))
      (pow (sqrt (+ (pow x.re 2.0) (pow x.im 2.0))) y.re))
     (if (<= y.re -1.65e-25)
       t_3
       (if (<= y.re 1.2e-71)
         (*
          (exp (* y.im (- (atan2 x.im x.re))))
          (sin (fma y.re (atan2 x.im x.re) (* y.im t_1))))
         (if (<= y.re 8.5e+134)
           t_3
           (* t_2 (sin (* y.im (log (hypot x.im x.re)))))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
	double t_0 = y_46_re * atan2(x_46_im, x_46_re);
	double t_1 = log(hypot(x_46_re, x_46_im));
	double t_2 = exp(((y_46_re * t_1) - (atan2(x_46_im, x_46_re) * y_46_im)));
	double t_3 = t_2 * sin(t_0);
	double tmp;
	if (y_46_re <= -2.5e+150) {
		tmp = sin(pow(cbrt(t_0), 3.0)) * pow(sqrt((pow(x_46_re, 2.0) + pow(x_46_im, 2.0))), y_46_re);
	} else if (y_46_re <= -1.65e-25) {
		tmp = t_3;
	} else if (y_46_re <= 1.2e-71) {
		tmp = exp((y_46_im * -atan2(x_46_im, x_46_re))) * sin(fma(y_46_re, atan2(x_46_im, x_46_re), (y_46_im * t_1)));
	} else if (y_46_re <= 8.5e+134) {
		tmp = t_3;
	} else {
		tmp = t_2 * sin((y_46_im * log(hypot(x_46_im, x_46_re))));
	}
	return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im)
	t_0 = Float64(y_46_re * atan(x_46_im, x_46_re))
	t_1 = log(hypot(x_46_re, x_46_im))
	t_2 = exp(Float64(Float64(y_46_re * t_1) - Float64(atan(x_46_im, x_46_re) * y_46_im)))
	t_3 = Float64(t_2 * sin(t_0))
	tmp = 0.0
	if (y_46_re <= -2.5e+150)
		tmp = Float64(sin((cbrt(t_0) ^ 3.0)) * (sqrt(Float64((x_46_re ^ 2.0) + (x_46_im ^ 2.0))) ^ y_46_re));
	elseif (y_46_re <= -1.65e-25)
		tmp = t_3;
	elseif (y_46_re <= 1.2e-71)
		tmp = Float64(exp(Float64(y_46_im * Float64(-atan(x_46_im, x_46_re)))) * sin(fma(y_46_re, atan(x_46_im, x_46_re), Float64(y_46_im * t_1))));
	elseif (y_46_re <= 8.5e+134)
		tmp = t_3;
	else
		tmp = Float64(t_2 * sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))));
	end
	return tmp
end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[Exp[N[(N[(y$46$re * t$95$1), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -2.5e+150], N[(N[Sin[N[Power[N[Power[t$95$0, 1/3], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision] * N[Power[N[Sqrt[N[(N[Power[x$46$re, 2.0], $MachinePrecision] + N[Power[x$46$im, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, -1.65e-25], t$95$3, If[LessEqual[y$46$re, 1.2e-71], N[(N[Exp[N[(y$46$im * (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision] + N[(y$46$im * t$95$1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 8.5e+134], t$95$3, N[(t$95$2 * N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
t_2 := e^{y.re \cdot t_1 - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\
t_3 := t_2 \cdot \sin t_0\\
\mathbf{if}\;y.re \leq -2.5 \cdot 10^{+150}:\\
\;\;\;\;\sin \left({\left(\sqrt[3]{t_0}\right)}^{3}\right) \cdot {\left(\sqrt{{x.re}^{2} + {x.im}^{2}}\right)}^{y.re}\\

\mathbf{elif}\;y.re \leq -1.65 \cdot 10^{-25}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;y.re \leq 1.2 \cdot 10^{-71}:\\
\;\;\;\;e^{y.im \cdot \left(-\tan^{-1}_* \frac{x.im}{x.re}\right)} \cdot \sin \left(\mathsf{fma}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}, y.im \cdot t_1\right)\right)\\

\mathbf{elif}\;y.re \leq 8.5 \cdot 10^{+134}:\\
\;\;\;\;t_3\\

\mathbf{else}:\\
\;\;\;\;t_2 \cdot \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\


\end{array}
\end{array}
Derivation
    &prev;&pcontext;&pcontext2;&ctx;
  1. Add Preprocessing

Alternative 6: 78.7% accurate, 1.1× speedup?

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

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

\mathbf{elif}\;y.re \leq 9.5 \cdot 10^{-71}:\\
\;\;\;\;e^{y.im \cdot \left(-\tan^{-1}_* \frac{x.im}{x.re}\right)} \cdot \sin \left(\mathsf{fma}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}, y.im \cdot t_0\right)\right)\\

\mathbf{elif}\;y.re \leq 1.75 \cdot 10^{+135}:\\
\;\;\;\;t_2\\

\mathbf{else}:\\
\;\;\;\;t_1 \cdot \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\


\end{array}
\end{array}
Derivation
    &prev;&pcontext;&pcontext2;&ctx;
  1. Add Preprocessing

Alternative 7: 69.5% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\ t_1 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\ t_2 := e^{y.re \cdot \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) - t_1} \cdot \sin t_0\\ t_3 := \log \left(-x.re\right)\\ t_4 := e^{t_1}\\ \mathbf{if}\;x.re \leq -4.4 \cdot 10^{-50}:\\ \;\;\;\;e^{y.re \cdot t_3 - t_1} \cdot \sin \left(t_0 + y.im \cdot t_3\right)\\ \mathbf{elif}\;x.re \leq 9.2 \cdot 10^{-106}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x.re \leq 1.02 \cdot 10^{-79}:\\ \;\;\;\;\frac{\sin \left(y.im \cdot \log \left(\sqrt{{x.re}^{2} + {x.im}^{2}}\right)\right)}{t_4}\\ \mathbf{elif}\;x.re \leq 21000000000:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;\frac{{x.re}^{y.re} \cdot \sin \left(t_0 + y.im \cdot \log x.re\right)}{t_4}\\ \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 (* (atan2 x.im x.re) y.im))
        (t_2 (* (exp (- (* y.re (log (hypot x.re x.im))) t_1)) (sin t_0)))
        (t_3 (log (- x.re)))
        (t_4 (exp t_1)))
   (if (<= x.re -4.4e-50)
     (* (exp (- (* y.re t_3) t_1)) (sin (+ t_0 (* y.im t_3))))
     (if (<= x.re 9.2e-106)
       t_2
       (if (<= x.re 1.02e-79)
         (/ (sin (* y.im (log (sqrt (+ (pow x.re 2.0) (pow x.im 2.0)))))) t_4)
         (if (<= x.re 21000000000.0)
           t_2
           (/ (* (pow x.re y.re) (sin (+ t_0 (* y.im (log x.re))))) t_4)))))))
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 = atan2(x_46_im, x_46_re) * y_46_im;
	double t_2 = exp(((y_46_re * log(hypot(x_46_re, x_46_im))) - t_1)) * sin(t_0);
	double t_3 = log(-x_46_re);
	double t_4 = exp(t_1);
	double tmp;
	if (x_46_re <= -4.4e-50) {
		tmp = exp(((y_46_re * t_3) - t_1)) * sin((t_0 + (y_46_im * t_3)));
	} else if (x_46_re <= 9.2e-106) {
		tmp = t_2;
	} else if (x_46_re <= 1.02e-79) {
		tmp = sin((y_46_im * log(sqrt((pow(x_46_re, 2.0) + pow(x_46_im, 2.0)))))) / t_4;
	} else if (x_46_re <= 21000000000.0) {
		tmp = t_2;
	} else {
		tmp = (pow(x_46_re, y_46_re) * sin((t_0 + (y_46_im * log(x_46_re))))) / t_4;
	}
	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.atan2(x_46_im, x_46_re) * y_46_im;
	double t_2 = Math.exp(((y_46_re * Math.log(Math.hypot(x_46_re, x_46_im))) - t_1)) * Math.sin(t_0);
	double t_3 = Math.log(-x_46_re);
	double t_4 = Math.exp(t_1);
	double tmp;
	if (x_46_re <= -4.4e-50) {
		tmp = Math.exp(((y_46_re * t_3) - t_1)) * Math.sin((t_0 + (y_46_im * t_3)));
	} else if (x_46_re <= 9.2e-106) {
		tmp = t_2;
	} else if (x_46_re <= 1.02e-79) {
		tmp = Math.sin((y_46_im * Math.log(Math.sqrt((Math.pow(x_46_re, 2.0) + Math.pow(x_46_im, 2.0)))))) / t_4;
	} else if (x_46_re <= 21000000000.0) {
		tmp = t_2;
	} else {
		tmp = (Math.pow(x_46_re, y_46_re) * Math.sin((t_0 + (y_46_im * Math.log(x_46_re))))) / t_4;
	}
	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.atan2(x_46_im, x_46_re) * y_46_im
	t_2 = math.exp(((y_46_re * math.log(math.hypot(x_46_re, x_46_im))) - t_1)) * math.sin(t_0)
	t_3 = math.log(-x_46_re)
	t_4 = math.exp(t_1)
	tmp = 0
	if x_46_re <= -4.4e-50:
		tmp = math.exp(((y_46_re * t_3) - t_1)) * math.sin((t_0 + (y_46_im * t_3)))
	elif x_46_re <= 9.2e-106:
		tmp = t_2
	elif x_46_re <= 1.02e-79:
		tmp = math.sin((y_46_im * math.log(math.sqrt((math.pow(x_46_re, 2.0) + math.pow(x_46_im, 2.0)))))) / t_4
	elif x_46_re <= 21000000000.0:
		tmp = t_2
	else:
		tmp = (math.pow(x_46_re, y_46_re) * math.sin((t_0 + (y_46_im * math.log(x_46_re))))) / t_4
	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(atan(x_46_im, x_46_re) * y_46_im)
	t_2 = Float64(exp(Float64(Float64(y_46_re * log(hypot(x_46_re, x_46_im))) - t_1)) * sin(t_0))
	t_3 = log(Float64(-x_46_re))
	t_4 = exp(t_1)
	tmp = 0.0
	if (x_46_re <= -4.4e-50)
		tmp = Float64(exp(Float64(Float64(y_46_re * t_3) - t_1)) * sin(Float64(t_0 + Float64(y_46_im * t_3))));
	elseif (x_46_re <= 9.2e-106)
		tmp = t_2;
	elseif (x_46_re <= 1.02e-79)
		tmp = Float64(sin(Float64(y_46_im * log(sqrt(Float64((x_46_re ^ 2.0) + (x_46_im ^ 2.0)))))) / t_4);
	elseif (x_46_re <= 21000000000.0)
		tmp = t_2;
	else
		tmp = Float64(Float64((x_46_re ^ y_46_re) * sin(Float64(t_0 + Float64(y_46_im * log(x_46_re))))) / t_4);
	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 = atan2(x_46_im, x_46_re) * y_46_im;
	t_2 = exp(((y_46_re * log(hypot(x_46_re, x_46_im))) - t_1)) * sin(t_0);
	t_3 = log(-x_46_re);
	t_4 = exp(t_1);
	tmp = 0.0;
	if (x_46_re <= -4.4e-50)
		tmp = exp(((y_46_re * t_3) - t_1)) * sin((t_0 + (y_46_im * t_3)));
	elseif (x_46_re <= 9.2e-106)
		tmp = t_2;
	elseif (x_46_re <= 1.02e-79)
		tmp = sin((y_46_im * log(sqrt(((x_46_re ^ 2.0) + (x_46_im ^ 2.0)))))) / t_4;
	elseif (x_46_re <= 21000000000.0)
		tmp = t_2;
	else
		tmp = ((x_46_re ^ y_46_re) * sin((t_0 + (y_46_im * log(x_46_re))))) / t_4;
	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[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, Block[{t$95$2 = N[(N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]], $MachinePrecision] * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[Log[(-x$46$re)], $MachinePrecision]}, Block[{t$95$4 = N[Exp[t$95$1], $MachinePrecision]}, If[LessEqual[x$46$re, -4.4e-50], N[(N[Exp[N[(N[(y$46$re * t$95$3), $MachinePrecision] - t$95$1), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(t$95$0 + N[(y$46$im * t$95$3), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, 9.2e-106], t$95$2, If[LessEqual[x$46$re, 1.02e-79], N[(N[Sin[N[(y$46$im * N[Log[N[Sqrt[N[(N[Power[x$46$re, 2.0], $MachinePrecision] + N[Power[x$46$im, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t$95$4), $MachinePrecision], If[LessEqual[x$46$re, 21000000000.0], t$95$2, N[(N[(N[Power[x$46$re, y$46$re], $MachinePrecision] * N[Sin[N[(t$95$0 + N[(y$46$im * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / t$95$4), $MachinePrecision]]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;x.re \leq 9.2 \cdot 10^{-106}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;x.re \leq 1.02 \cdot 10^{-79}:\\
\;\;\;\;\frac{\sin \left(y.im \cdot \log \left(\sqrt{{x.re}^{2} + {x.im}^{2}}\right)\right)}{t_4}\\

\mathbf{elif}\;x.re \leq 21000000000:\\
\;\;\;\;t_2\\

\mathbf{else}:\\
\;\;\;\;\frac{{x.re}^{y.re} \cdot \sin \left(t_0 + y.im \cdot \log x.re\right)}{t_4}\\


\end{array}
\end{array}
Derivation
    &prev;&pcontext;&pcontext2;&ctx;
  1. Add Preprocessing

Alternative 8: 76.9% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := \sin t_0\\
t_2 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
t_3 := e^{y.re \cdot t_2 - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot t_1\\
\mathbf{if}\;y.re \leq -9.6 \cdot 10^{-23}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;y.re \leq 8 \cdot 10^{-71}:\\
\;\;\;\;e^{y.im \cdot \left(-\tan^{-1}_* \frac{x.im}{x.re}\right)} \cdot \sin \left(\mathsf{fma}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}, y.im \cdot t_2\right)\right)\\

\mathbf{elif}\;y.re \leq 2.4 \cdot 10^{+216}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;y.re \leq 2.2 \cdot 10^{+278}:\\
\;\;\;\;t_0 \cdot {x.re}^{y.re}\\

\mathbf{else}:\\
\;\;\;\;t_1 \cdot {\left(x.im + \frac{{x.re}^{2} \cdot 0.5}{x.im}\right)}^{y.re}\\


\end{array}
\end{array}
Derivation
    &prev;&pcontext;&pcontext2;&ctx;
  1. Add Preprocessing

Alternative 9: 46.8% accurate, 1.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \sin \left(y.im \cdot \log x.re\right)\\ t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\ t_2 := \sin t_1\\ t_3 := {\left(\sqrt{{x.re}^{2} + {x.im}^{2}}\right)}^{y.re}\\ \mathbf{if}\;x.re \leq 1.6 \cdot 10^{-291}:\\ \;\;\;\;t_1 \cdot t_3\\ \mathbf{elif}\;x.re \leq 2.4 \cdot 10^{-248}:\\ \;\;\;\;\sin \left({\left(\sqrt[3]{t_1}\right)}^{3}\right) \cdot {x.re}^{y.re}\\ \mathbf{elif}\;x.re \leq 7.8 \cdot 10^{-203}:\\ \;\;\;\;t_2 \cdot t_3\\ \mathbf{elif}\;x.re \leq 4.8 \cdot 10^{-74}:\\ \;\;\;\;\frac{t_0}{{\left(e^{y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}}\\ \mathbf{elif}\;x.re \leq 0.039:\\ \;\;\;\;t_2 \cdot {x.im}^{y.re}\\ \mathbf{else}:\\ \;\;\;\;\frac{{x.re}^{y.re} \cdot t_0}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\\ \end{array} \end{array} \]
(FPCore (x.re x.im y.re y.im)
 :precision binary64
 (let* ((t_0 (sin (* y.im (log x.re))))
        (t_1 (* y.re (atan2 x.im x.re)))
        (t_2 (sin t_1))
        (t_3 (pow (sqrt (+ (pow x.re 2.0) (pow x.im 2.0))) y.re)))
   (if (<= x.re 1.6e-291)
     (* t_1 t_3)
     (if (<= x.re 2.4e-248)
       (* (sin (pow (cbrt t_1) 3.0)) (pow x.re y.re))
       (if (<= x.re 7.8e-203)
         (* t_2 t_3)
         (if (<= x.re 4.8e-74)
           (/ t_0 (pow (exp y.im) (atan2 x.im x.re)))
           (if (<= x.re 0.039)
             (* t_2 (pow x.im y.re))
             (/
              (* (pow x.re y.re) t_0)
              (exp (* (atan2 x.im x.re) y.im))))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
	double t_0 = sin((y_46_im * log(x_46_re)));
	double t_1 = y_46_re * atan2(x_46_im, x_46_re);
	double t_2 = sin(t_1);
	double t_3 = pow(sqrt((pow(x_46_re, 2.0) + pow(x_46_im, 2.0))), y_46_re);
	double tmp;
	if (x_46_re <= 1.6e-291) {
		tmp = t_1 * t_3;
	} else if (x_46_re <= 2.4e-248) {
		tmp = sin(pow(cbrt(t_1), 3.0)) * pow(x_46_re, y_46_re);
	} else if (x_46_re <= 7.8e-203) {
		tmp = t_2 * t_3;
	} else if (x_46_re <= 4.8e-74) {
		tmp = t_0 / pow(exp(y_46_im), atan2(x_46_im, x_46_re));
	} else if (x_46_re <= 0.039) {
		tmp = t_2 * pow(x_46_im, y_46_re);
	} else {
		tmp = (pow(x_46_re, y_46_re) * t_0) / exp((atan2(x_46_im, x_46_re) * y_46_im));
	}
	return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
	double t_0 = Math.sin((y_46_im * Math.log(x_46_re)));
	double t_1 = y_46_re * Math.atan2(x_46_im, x_46_re);
	double t_2 = Math.sin(t_1);
	double t_3 = Math.pow(Math.sqrt((Math.pow(x_46_re, 2.0) + Math.pow(x_46_im, 2.0))), y_46_re);
	double tmp;
	if (x_46_re <= 1.6e-291) {
		tmp = t_1 * t_3;
	} else if (x_46_re <= 2.4e-248) {
		tmp = Math.sin(Math.pow(Math.cbrt(t_1), 3.0)) * Math.pow(x_46_re, y_46_re);
	} else if (x_46_re <= 7.8e-203) {
		tmp = t_2 * t_3;
	} else if (x_46_re <= 4.8e-74) {
		tmp = t_0 / Math.pow(Math.exp(y_46_im), Math.atan2(x_46_im, x_46_re));
	} else if (x_46_re <= 0.039) {
		tmp = t_2 * Math.pow(x_46_im, y_46_re);
	} else {
		tmp = (Math.pow(x_46_re, y_46_re) * t_0) / Math.exp((Math.atan2(x_46_im, x_46_re) * y_46_im));
	}
	return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im)
	t_0 = sin(Float64(y_46_im * log(x_46_re)))
	t_1 = Float64(y_46_re * atan(x_46_im, x_46_re))
	t_2 = sin(t_1)
	t_3 = sqrt(Float64((x_46_re ^ 2.0) + (x_46_im ^ 2.0))) ^ y_46_re
	tmp = 0.0
	if (x_46_re <= 1.6e-291)
		tmp = Float64(t_1 * t_3);
	elseif (x_46_re <= 2.4e-248)
		tmp = Float64(sin((cbrt(t_1) ^ 3.0)) * (x_46_re ^ y_46_re));
	elseif (x_46_re <= 7.8e-203)
		tmp = Float64(t_2 * t_3);
	elseif (x_46_re <= 4.8e-74)
		tmp = Float64(t_0 / (exp(y_46_im) ^ atan(x_46_im, x_46_re)));
	elseif (x_46_re <= 0.039)
		tmp = Float64(t_2 * (x_46_im ^ y_46_re));
	else
		tmp = Float64(Float64((x_46_re ^ y_46_re) * t_0) / exp(Float64(atan(x_46_im, x_46_re) * y_46_im)));
	end
	return tmp
end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Sin[N[(y$46$im * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sin[t$95$1], $MachinePrecision]}, Block[{t$95$3 = N[Power[N[Sqrt[N[(N[Power[x$46$re, 2.0], $MachinePrecision] + N[Power[x$46$im, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], y$46$re], $MachinePrecision]}, If[LessEqual[x$46$re, 1.6e-291], N[(t$95$1 * t$95$3), $MachinePrecision], If[LessEqual[x$46$re, 2.4e-248], N[(N[Sin[N[Power[N[Power[t$95$1, 1/3], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision] * N[Power[x$46$re, y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, 7.8e-203], N[(t$95$2 * t$95$3), $MachinePrecision], If[LessEqual[x$46$re, 4.8e-74], N[(t$95$0 / N[Power[N[Exp[y$46$im], $MachinePrecision], N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, 0.039], N[(t$95$2 * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision], N[(N[(N[Power[x$46$re, y$46$re], $MachinePrecision] * t$95$0), $MachinePrecision] / N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;x.re \leq 2.4 \cdot 10^{-248}:\\
\;\;\;\;\sin \left({\left(\sqrt[3]{t_1}\right)}^{3}\right) \cdot {x.re}^{y.re}\\

\mathbf{elif}\;x.re \leq 7.8 \cdot 10^{-203}:\\
\;\;\;\;t_2 \cdot t_3\\

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

\mathbf{elif}\;x.re \leq 0.039:\\
\;\;\;\;t_2 \cdot {x.im}^{y.re}\\

\mathbf{else}:\\
\;\;\;\;\frac{{x.re}^{y.re} \cdot t_0}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\\


\end{array}
\end{array}
Derivation
    &prev;&pcontext;&pcontext2;&ctx;
  1. Add Preprocessing

Alternative 10: 70.3% accurate, 1.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\ t_1 := \log \left(-x.re\right)\\ t_2 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\ \mathbf{if}\;x.re \leq -2.9 \cdot 10^{-49}:\\ \;\;\;\;e^{y.re \cdot t_1 - t_2} \cdot \sin \left(t_0 + y.im \cdot t_1\right)\\ \mathbf{elif}\;x.re \leq 15200000000:\\ \;\;\;\;e^{y.re \cdot \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) - t_2} \cdot \sin t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{{x.re}^{y.re} \cdot \sin \left(t_0 + y.im \cdot \log x.re\right)}{e^{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 (log (- x.re)))
        (t_2 (* (atan2 x.im x.re) y.im)))
   (if (<= x.re -2.9e-49)
     (* (exp (- (* y.re t_1) t_2)) (sin (+ t_0 (* y.im t_1))))
     (if (<= x.re 15200000000.0)
       (* (exp (- (* y.re (log (hypot x.re x.im))) t_2)) (sin t_0))
       (/ (* (pow x.re y.re) (sin (+ t_0 (* y.im (log x.re))))) (exp 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 = log(-x_46_re);
	double t_2 = atan2(x_46_im, x_46_re) * y_46_im;
	double tmp;
	if (x_46_re <= -2.9e-49) {
		tmp = exp(((y_46_re * t_1) - t_2)) * sin((t_0 + (y_46_im * t_1)));
	} else if (x_46_re <= 15200000000.0) {
		tmp = exp(((y_46_re * log(hypot(x_46_re, x_46_im))) - t_2)) * sin(t_0);
	} else {
		tmp = (pow(x_46_re, y_46_re) * sin((t_0 + (y_46_im * log(x_46_re))))) / exp(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 = y_46_re * Math.atan2(x_46_im, x_46_re);
	double t_1 = Math.log(-x_46_re);
	double t_2 = Math.atan2(x_46_im, x_46_re) * y_46_im;
	double tmp;
	if (x_46_re <= -2.9e-49) {
		tmp = Math.exp(((y_46_re * t_1) - t_2)) * Math.sin((t_0 + (y_46_im * t_1)));
	} else if (x_46_re <= 15200000000.0) {
		tmp = Math.exp(((y_46_re * Math.log(Math.hypot(x_46_re, x_46_im))) - t_2)) * Math.sin(t_0);
	} else {
		tmp = (Math.pow(x_46_re, y_46_re) * Math.sin((t_0 + (y_46_im * Math.log(x_46_re))))) / Math.exp(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 = math.log(-x_46_re)
	t_2 = math.atan2(x_46_im, x_46_re) * y_46_im
	tmp = 0
	if x_46_re <= -2.9e-49:
		tmp = math.exp(((y_46_re * t_1) - t_2)) * math.sin((t_0 + (y_46_im * t_1)))
	elif x_46_re <= 15200000000.0:
		tmp = math.exp(((y_46_re * math.log(math.hypot(x_46_re, x_46_im))) - t_2)) * math.sin(t_0)
	else:
		tmp = (math.pow(x_46_re, y_46_re) * math.sin((t_0 + (y_46_im * math.log(x_46_re))))) / math.exp(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 = log(Float64(-x_46_re))
	t_2 = Float64(atan(x_46_im, x_46_re) * y_46_im)
	tmp = 0.0
	if (x_46_re <= -2.9e-49)
		tmp = Float64(exp(Float64(Float64(y_46_re * t_1) - t_2)) * sin(Float64(t_0 + Float64(y_46_im * t_1))));
	elseif (x_46_re <= 15200000000.0)
		tmp = Float64(exp(Float64(Float64(y_46_re * log(hypot(x_46_re, x_46_im))) - t_2)) * sin(t_0));
	else
		tmp = Float64(Float64((x_46_re ^ y_46_re) * sin(Float64(t_0 + Float64(y_46_im * log(x_46_re))))) / exp(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 = log(-x_46_re);
	t_2 = atan2(x_46_im, x_46_re) * y_46_im;
	tmp = 0.0;
	if (x_46_re <= -2.9e-49)
		tmp = exp(((y_46_re * t_1) - t_2)) * sin((t_0 + (y_46_im * t_1)));
	elseif (x_46_re <= 15200000000.0)
		tmp = exp(((y_46_re * log(hypot(x_46_re, x_46_im))) - t_2)) * sin(t_0);
	else
		tmp = ((x_46_re ^ y_46_re) * sin((t_0 + (y_46_im * log(x_46_re))))) / exp(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[Log[(-x$46$re)], $MachinePrecision]}, Block[{t$95$2 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, If[LessEqual[x$46$re, -2.9e-49], N[(N[Exp[N[(N[(y$46$re * t$95$1), $MachinePrecision] - t$95$2), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(t$95$0 + N[(y$46$im * t$95$1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, 15200000000.0], N[(N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision]], $MachinePrecision] * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision], N[(N[(N[Power[x$46$re, y$46$re], $MachinePrecision] * N[Sin[N[(t$95$0 + N[(y$46$im * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[Exp[t$95$2], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;x.re \leq 15200000000:\\
\;\;\;\;e^{y.re \cdot \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) - t_2} \cdot \sin t_0\\

\mathbf{else}:\\
\;\;\;\;\frac{{x.re}^{y.re} \cdot \sin \left(t_0 + y.im \cdot \log x.re\right)}{e^{t_2}}\\


\end{array}
\end{array}
Derivation
    &prev;&pcontext;&pcontext2;&ctx;
  1. Add Preprocessing

Alternative 11: 68.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 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\ \mathbf{if}\;x.re \leq 13500000000:\\ \;\;\;\;e^{y.re \cdot \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) - t_0} \cdot \sin t_1\\ \mathbf{else}:\\ \;\;\;\;\frac{{x.re}^{y.re} \cdot \sin \left(t_1 + y.im \cdot \log x.re\right)}{e^{t_0}}\\ \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))))
   (if (<= x.re 13500000000.0)
     (* (exp (- (* y.re (log (hypot x.re x.im))) t_0)) (sin t_1))
     (/ (* (pow x.re y.re) (sin (+ t_1 (* y.im (log x.re))))) (exp t_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 tmp;
	if (x_46_re <= 13500000000.0) {
		tmp = exp(((y_46_re * log(hypot(x_46_re, x_46_im))) - t_0)) * sin(t_1);
	} else {
		tmp = (pow(x_46_re, y_46_re) * sin((t_1 + (y_46_im * log(x_46_re))))) / exp(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 = 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 tmp;
	if (x_46_re <= 13500000000.0) {
		tmp = Math.exp(((y_46_re * Math.log(Math.hypot(x_46_re, x_46_im))) - t_0)) * Math.sin(t_1);
	} else {
		tmp = (Math.pow(x_46_re, y_46_re) * Math.sin((t_1 + (y_46_im * Math.log(x_46_re))))) / Math.exp(t_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)
	tmp = 0
	if x_46_re <= 13500000000.0:
		tmp = math.exp(((y_46_re * math.log(math.hypot(x_46_re, x_46_im))) - t_0)) * math.sin(t_1)
	else:
		tmp = (math.pow(x_46_re, y_46_re) * math.sin((t_1 + (y_46_im * math.log(x_46_re))))) / math.exp(t_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))
	tmp = 0.0
	if (x_46_re <= 13500000000.0)
		tmp = Float64(exp(Float64(Float64(y_46_re * log(hypot(x_46_re, x_46_im))) - t_0)) * sin(t_1));
	else
		tmp = Float64(Float64((x_46_re ^ y_46_re) * sin(Float64(t_1 + Float64(y_46_im * log(x_46_re))))) / exp(t_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);
	tmp = 0.0;
	if (x_46_re <= 13500000000.0)
		tmp = exp(((y_46_re * log(hypot(x_46_re, x_46_im))) - t_0)) * sin(t_1);
	else
		tmp = ((x_46_re ^ y_46_re) * sin((t_1 + (y_46_im * log(x_46_re))))) / exp(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[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]}, If[LessEqual[x$46$re, 13500000000.0], N[(N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision] * N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision], N[(N[(N[Power[x$46$re, y$46$re], $MachinePrecision] * N[Sin[N[(t$95$1 + N[(y$46$im * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[Exp[t$95$0], $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}\\
\mathbf{if}\;x.re \leq 13500000000:\\
\;\;\;\;e^{y.re \cdot \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) - t_0} \cdot \sin t_1\\

\mathbf{else}:\\
\;\;\;\;\frac{{x.re}^{y.re} \cdot \sin \left(t_1 + y.im \cdot \log x.re\right)}{e^{t_0}}\\


\end{array}
\end{array}
Derivation
    &prev;&pcontext;&pcontext2;&ctx;
  1. Add Preprocessing

Alternative 12: 66.7% accurate, 1.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\ \mathbf{if}\;x.re \leq 18000000000:\\ \;\;\;\;e^{y.re \cdot \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) - t_0} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{{x.re}^{y.re} \cdot \sin \left(y.im \cdot \log x.re\right)}{e^{t_0}}\\ \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)))
   (if (<= x.re 18000000000.0)
     (*
      (exp (- (* y.re (log (hypot x.re x.im))) t_0))
      (sin (* y.re (atan2 x.im x.re))))
     (/ (* (pow x.re y.re) (sin (* y.im (log x.re)))) (exp t_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 tmp;
	if (x_46_re <= 18000000000.0) {
		tmp = exp(((y_46_re * log(hypot(x_46_re, x_46_im))) - t_0)) * sin((y_46_re * atan2(x_46_im, x_46_re)));
	} else {
		tmp = (pow(x_46_re, y_46_re) * sin((y_46_im * log(x_46_re)))) / exp(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 = Math.atan2(x_46_im, x_46_re) * y_46_im;
	double tmp;
	if (x_46_re <= 18000000000.0) {
		tmp = Math.exp(((y_46_re * Math.log(Math.hypot(x_46_re, x_46_im))) - t_0)) * Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
	} else {
		tmp = (Math.pow(x_46_re, y_46_re) * Math.sin((y_46_im * Math.log(x_46_re)))) / Math.exp(t_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
	tmp = 0
	if x_46_re <= 18000000000.0:
		tmp = math.exp(((y_46_re * math.log(math.hypot(x_46_re, x_46_im))) - t_0)) * math.sin((y_46_re * math.atan2(x_46_im, x_46_re)))
	else:
		tmp = (math.pow(x_46_re, y_46_re) * math.sin((y_46_im * math.log(x_46_re)))) / math.exp(t_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)
	tmp = 0.0
	if (x_46_re <= 18000000000.0)
		tmp = Float64(exp(Float64(Float64(y_46_re * log(hypot(x_46_re, x_46_im))) - t_0)) * sin(Float64(y_46_re * atan(x_46_im, x_46_re))));
	else
		tmp = Float64(Float64((x_46_re ^ y_46_re) * sin(Float64(y_46_im * log(x_46_re)))) / exp(t_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;
	tmp = 0.0;
	if (x_46_re <= 18000000000.0)
		tmp = exp(((y_46_re * log(hypot(x_46_re, x_46_im))) - t_0)) * sin((y_46_re * atan2(x_46_im, x_46_re)));
	else
		tmp = ((x_46_re ^ y_46_re) * sin((y_46_im * log(x_46_re)))) / exp(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[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, If[LessEqual[x$46$re, 18000000000.0], N[(N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $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], N[(N[(N[Power[x$46$re, y$46$re], $MachinePrecision] * N[Sin[N[(y$46$im * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[Exp[t$95$0], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
\mathbf{if}\;x.re \leq 18000000000:\\
\;\;\;\;e^{y.re \cdot \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) - t_0} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\

\mathbf{else}:\\
\;\;\;\;\frac{{x.re}^{y.re} \cdot \sin \left(y.im \cdot \log x.re\right)}{e^{t_0}}\\


\end{array}
\end{array}
Derivation
    &prev;&pcontext;&pcontext2;&ctx;
  1. Add Preprocessing

Alternative 13: 47.5% accurate, 1.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\ \mathbf{if}\;x.re \leq 2.05 \cdot 10^{-290}:\\ \;\;\;\;t_0 \cdot {\left(\sqrt{{x.re}^{2} + {x.im}^{2}}\right)}^{y.re}\\ \mathbf{elif}\;x.re \leq 3.5 \cdot 10^{-76} \lor \neg \left(x.re \leq 0.0058\right):\\ \;\;\;\;\frac{{x.re}^{y.re} \cdot \sin \left(y.im \cdot \log x.re\right)}{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 (<= x.re 2.05e-290)
     (* t_0 (pow (sqrt (+ (pow x.re 2.0) (pow x.im 2.0))) y.re))
     (if (or (<= x.re 3.5e-76) (not (<= x.re 0.0058)))
       (/
        (* (pow x.re y.re) (sin (* y.im (log x.re))))
        (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 (x_46_re <= 2.05e-290) {
		tmp = t_0 * pow(sqrt((pow(x_46_re, 2.0) + pow(x_46_im, 2.0))), y_46_re);
	} else if ((x_46_re <= 3.5e-76) || !(x_46_re <= 0.0058)) {
		tmp = (pow(x_46_re, y_46_re) * sin((y_46_im * log(x_46_re)))) / 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;
}
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_46re * atan2(x_46im, x_46re)
    if (x_46re <= 2.05d-290) then
        tmp = t_0 * (sqrt(((x_46re ** 2.0d0) + (x_46im ** 2.0d0))) ** y_46re)
    else if ((x_46re <= 3.5d-76) .or. (.not. (x_46re <= 0.0058d0))) then
        tmp = ((x_46re ** y_46re) * sin((y_46im * log(x_46re)))) / exp((atan2(x_46im, x_46re) * y_46im))
    else
        tmp = sin(t_0) * (x_46im ** y_46re)
    end if
    code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
	double t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
	double tmp;
	if (x_46_re <= 2.05e-290) {
		tmp = t_0 * Math.pow(Math.sqrt((Math.pow(x_46_re, 2.0) + Math.pow(x_46_im, 2.0))), y_46_re);
	} else if ((x_46_re <= 3.5e-76) || !(x_46_re <= 0.0058)) {
		tmp = (Math.pow(x_46_re, y_46_re) * Math.sin((y_46_im * Math.log(x_46_re)))) / 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 x_46_re <= 2.05e-290:
		tmp = t_0 * math.pow(math.sqrt((math.pow(x_46_re, 2.0) + math.pow(x_46_im, 2.0))), y_46_re)
	elif (x_46_re <= 3.5e-76) or not (x_46_re <= 0.0058):
		tmp = (math.pow(x_46_re, y_46_re) * math.sin((y_46_im * math.log(x_46_re)))) / 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 (x_46_re <= 2.05e-290)
		tmp = Float64(t_0 * (sqrt(Float64((x_46_re ^ 2.0) + (x_46_im ^ 2.0))) ^ y_46_re));
	elseif ((x_46_re <= 3.5e-76) || !(x_46_re <= 0.0058))
		tmp = Float64(Float64((x_46_re ^ y_46_re) * sin(Float64(y_46_im * log(x_46_re)))) / 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 (x_46_re <= 2.05e-290)
		tmp = t_0 * (sqrt(((x_46_re ^ 2.0) + (x_46_im ^ 2.0))) ^ y_46_re);
	elseif ((x_46_re <= 3.5e-76) || ~((x_46_re <= 0.0058)))
		tmp = ((x_46_re ^ y_46_re) * sin((y_46_im * log(x_46_re)))) / 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[x$46$re, 2.05e-290], N[(t$95$0 * N[Power[N[Sqrt[N[(N[Power[x$46$re, 2.0], $MachinePrecision] + N[Power[x$46$im, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[x$46$re, 3.5e-76], N[Not[LessEqual[x$46$re, 0.0058]], $MachinePrecision]], N[(N[(N[Power[x$46$re, y$46$re], $MachinePrecision] * N[Sin[N[(y$46$im * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / 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}\;x.re \leq 2.05 \cdot 10^{-290}:\\
\;\;\;\;t_0 \cdot {\left(\sqrt{{x.re}^{2} + {x.im}^{2}}\right)}^{y.re}\\

\mathbf{elif}\;x.re \leq 3.5 \cdot 10^{-76} \lor \neg \left(x.re \leq 0.0058\right):\\
\;\;\;\;\frac{{x.re}^{y.re} \cdot \sin \left(y.im \cdot \log x.re\right)}{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
    &prev;&pcontext;&pcontext2;&ctx;
  1. Add Preprocessing

Alternative 14: 43.9% accurate, 1.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 -5.8 \cdot 10^{-81}:\\ \;\;\;\;t_0 \cdot {\left(\sqrt{{x.re}^{2} + {x.im}^{2}}\right)}^{y.re}\\ \mathbf{elif}\;y.re \leq 1.18 \cdot 10^{-68}:\\ \;\;\;\;\frac{\sin \left(y.im \cdot \log x.re\right)}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\\ \mathbf{elif}\;y.re \leq 7.8 \cdot 10^{+103}:\\ \;\;\;\;t_1 \cdot {x.im}^{y.re}\\ \mathbf{elif}\;y.re \leq 1.15 \cdot 10^{+193}:\\ \;\;\;\;t_1 \cdot {\left(x.re + 0.5 \cdot \frac{{x.im}^{2}}{x.re}\right)}^{y.re}\\ \mathbf{else}:\\ \;\;\;\;t_0 \cdot {x.re}^{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 -5.8e-81)
     (* t_0 (pow (sqrt (+ (pow x.re 2.0) (pow x.im 2.0))) y.re))
     (if (<= y.re 1.18e-68)
       (/ (sin (* y.im (log x.re))) (exp (* (atan2 x.im x.re) y.im)))
       (if (<= y.re 7.8e+103)
         (* t_1 (pow x.im y.re))
         (if (<= y.re 1.15e+193)
           (* t_1 (pow (+ x.re (* 0.5 (/ (pow x.im 2.0) x.re))) y.re))
           (* t_0 (pow x.re y.re))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
	double t_0 = y_46_re * atan2(x_46_im, x_46_re);
	double t_1 = sin(t_0);
	double tmp;
	if (y_46_re <= -5.8e-81) {
		tmp = t_0 * pow(sqrt((pow(x_46_re, 2.0) + pow(x_46_im, 2.0))), y_46_re);
	} else if (y_46_re <= 1.18e-68) {
		tmp = sin((y_46_im * log(x_46_re))) / exp((atan2(x_46_im, x_46_re) * y_46_im));
	} else if (y_46_re <= 7.8e+103) {
		tmp = t_1 * pow(x_46_im, y_46_re);
	} else if (y_46_re <= 1.15e+193) {
		tmp = t_1 * pow((x_46_re + (0.5 * (pow(x_46_im, 2.0) / x_46_re))), y_46_re);
	} else {
		tmp = t_0 * pow(x_46_re, 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 <= (-5.8d-81)) then
        tmp = t_0 * (sqrt(((x_46re ** 2.0d0) + (x_46im ** 2.0d0))) ** y_46re)
    else if (y_46re <= 1.18d-68) then
        tmp = sin((y_46im * log(x_46re))) / exp((atan2(x_46im, x_46re) * y_46im))
    else if (y_46re <= 7.8d+103) then
        tmp = t_1 * (x_46im ** y_46re)
    else if (y_46re <= 1.15d+193) then
        tmp = t_1 * ((x_46re + (0.5d0 * ((x_46im ** 2.0d0) / x_46re))) ** y_46re)
    else
        tmp = t_0 * (x_46re ** 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 <= -5.8e-81) {
		tmp = t_0 * Math.pow(Math.sqrt((Math.pow(x_46_re, 2.0) + Math.pow(x_46_im, 2.0))), y_46_re);
	} else if (y_46_re <= 1.18e-68) {
		tmp = Math.sin((y_46_im * Math.log(x_46_re))) / Math.exp((Math.atan2(x_46_im, x_46_re) * y_46_im));
	} else if (y_46_re <= 7.8e+103) {
		tmp = t_1 * Math.pow(x_46_im, y_46_re);
	} else if (y_46_re <= 1.15e+193) {
		tmp = t_1 * Math.pow((x_46_re + (0.5 * (Math.pow(x_46_im, 2.0) / x_46_re))), y_46_re);
	} else {
		tmp = t_0 * Math.pow(x_46_re, y_46_re);
	}
	return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im):
	t_0 = y_46_re * math.atan2(x_46_im, x_46_re)
	t_1 = math.sin(t_0)
	tmp = 0
	if y_46_re <= -5.8e-81:
		tmp = t_0 * math.pow(math.sqrt((math.pow(x_46_re, 2.0) + math.pow(x_46_im, 2.0))), y_46_re)
	elif y_46_re <= 1.18e-68:
		tmp = math.sin((y_46_im * math.log(x_46_re))) / math.exp((math.atan2(x_46_im, x_46_re) * y_46_im))
	elif y_46_re <= 7.8e+103:
		tmp = t_1 * math.pow(x_46_im, y_46_re)
	elif y_46_re <= 1.15e+193:
		tmp = t_1 * math.pow((x_46_re + (0.5 * (math.pow(x_46_im, 2.0) / x_46_re))), y_46_re)
	else:
		tmp = t_0 * math.pow(x_46_re, y_46_re)
	return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im)
	t_0 = Float64(y_46_re * atan(x_46_im, x_46_re))
	t_1 = sin(t_0)
	tmp = 0.0
	if (y_46_re <= -5.8e-81)
		tmp = Float64(t_0 * (sqrt(Float64((x_46_re ^ 2.0) + (x_46_im ^ 2.0))) ^ y_46_re));
	elseif (y_46_re <= 1.18e-68)
		tmp = Float64(sin(Float64(y_46_im * log(x_46_re))) / exp(Float64(atan(x_46_im, x_46_re) * y_46_im)));
	elseif (y_46_re <= 7.8e+103)
		tmp = Float64(t_1 * (x_46_im ^ y_46_re));
	elseif (y_46_re <= 1.15e+193)
		tmp = Float64(t_1 * (Float64(x_46_re + Float64(0.5 * Float64((x_46_im ^ 2.0) / x_46_re))) ^ y_46_re));
	else
		tmp = Float64(t_0 * (x_46_re ^ y_46_re));
	end
	return tmp
end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im)
	t_0 = y_46_re * atan2(x_46_im, x_46_re);
	t_1 = sin(t_0);
	tmp = 0.0;
	if (y_46_re <= -5.8e-81)
		tmp = t_0 * (sqrt(((x_46_re ^ 2.0) + (x_46_im ^ 2.0))) ^ y_46_re);
	elseif (y_46_re <= 1.18e-68)
		tmp = sin((y_46_im * log(x_46_re))) / exp((atan2(x_46_im, x_46_re) * y_46_im));
	elseif (y_46_re <= 7.8e+103)
		tmp = t_1 * (x_46_im ^ y_46_re);
	elseif (y_46_re <= 1.15e+193)
		tmp = t_1 * ((x_46_re + (0.5 * ((x_46_im ^ 2.0) / x_46_re))) ^ y_46_re);
	else
		tmp = t_0 * (x_46_re ^ y_46_re);
	end
	tmp_2 = tmp;
end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sin[t$95$0], $MachinePrecision]}, If[LessEqual[y$46$re, -5.8e-81], N[(t$95$0 * N[Power[N[Sqrt[N[(N[Power[x$46$re, 2.0], $MachinePrecision] + N[Power[x$46$im, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 1.18e-68], N[(N[Sin[N[(y$46$im * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 7.8e+103], N[(t$95$1 * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 1.15e+193], N[(t$95$1 * N[Power[N[(x$46$re + N[(0.5 * N[(N[Power[x$46$im, 2.0], $MachinePrecision] / x$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[Power[x$46$re, 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 -5.8 \cdot 10^{-81}:\\
\;\;\;\;t_0 \cdot {\left(\sqrt{{x.re}^{2} + {x.im}^{2}}\right)}^{y.re}\\

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

\mathbf{elif}\;y.re \leq 7.8 \cdot 10^{+103}:\\
\;\;\;\;t_1 \cdot {x.im}^{y.re}\\

\mathbf{elif}\;y.re \leq 1.15 \cdot 10^{+193}:\\
\;\;\;\;t_1 \cdot {\left(x.re + 0.5 \cdot \frac{{x.im}^{2}}{x.re}\right)}^{y.re}\\

\mathbf{else}:\\
\;\;\;\;t_0 \cdot {x.re}^{y.re}\\


\end{array}
\end{array}
Derivation
    &prev;&pcontext;&pcontext2;&ctx;
  1. Add Preprocessing

Alternative 15: 42.4% accurate, 1.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\ t_1 := \sin t_0\\ t_2 := t_1 \cdot {\left(x.im + \frac{{x.re}^{2} \cdot 0.5}{x.im}\right)}^{y.re}\\ \mathbf{if}\;y.re \leq -5.1 \cdot 10^{-39}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y.re \leq 3 \cdot 10^{-69}:\\ \;\;\;\;\frac{\sin \left(y.im \cdot \log x.re\right)}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\\ \mathbf{elif}\;y.re \leq 9 \cdot 10^{+103}:\\ \;\;\;\;t_1 \cdot {x.im}^{y.re}\\ \mathbf{elif}\;y.re \leq 4 \cdot 10^{+194}:\\ \;\;\;\;t_1 \cdot {\left(x.re + 0.5 \cdot \frac{{x.im}^{2}}{x.re}\right)}^{y.re}\\ \mathbf{elif}\;y.re \leq 1.25 \cdot 10^{+217}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t_0 \cdot {x.re}^{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))
        (t_2 (* t_1 (pow (+ x.im (/ (* (pow x.re 2.0) 0.5) x.im)) y.re))))
   (if (<= y.re -5.1e-39)
     t_2
     (if (<= y.re 3e-69)
       (/ (sin (* y.im (log x.re))) (exp (* (atan2 x.im x.re) y.im)))
       (if (<= y.re 9e+103)
         (* t_1 (pow x.im y.re))
         (if (<= y.re 4e+194)
           (* t_1 (pow (+ x.re (* 0.5 (/ (pow x.im 2.0) x.re))) y.re))
           (if (<= y.re 1.25e+217) t_2 (* t_0 (pow x.re y.re)))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
	double t_0 = y_46_re * atan2(x_46_im, x_46_re);
	double t_1 = sin(t_0);
	double t_2 = t_1 * pow((x_46_im + ((pow(x_46_re, 2.0) * 0.5) / x_46_im)), y_46_re);
	double tmp;
	if (y_46_re <= -5.1e-39) {
		tmp = t_2;
	} else if (y_46_re <= 3e-69) {
		tmp = sin((y_46_im * log(x_46_re))) / exp((atan2(x_46_im, x_46_re) * y_46_im));
	} else if (y_46_re <= 9e+103) {
		tmp = t_1 * pow(x_46_im, y_46_re);
	} else if (y_46_re <= 4e+194) {
		tmp = t_1 * pow((x_46_re + (0.5 * (pow(x_46_im, 2.0) / x_46_re))), y_46_re);
	} else if (y_46_re <= 1.25e+217) {
		tmp = t_2;
	} else {
		tmp = t_0 * pow(x_46_re, 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) :: t_2
    real(8) :: tmp
    t_0 = y_46re * atan2(x_46im, x_46re)
    t_1 = sin(t_0)
    t_2 = t_1 * ((x_46im + (((x_46re ** 2.0d0) * 0.5d0) / x_46im)) ** y_46re)
    if (y_46re <= (-5.1d-39)) then
        tmp = t_2
    else if (y_46re <= 3d-69) then
        tmp = sin((y_46im * log(x_46re))) / exp((atan2(x_46im, x_46re) * y_46im))
    else if (y_46re <= 9d+103) then
        tmp = t_1 * (x_46im ** y_46re)
    else if (y_46re <= 4d+194) then
        tmp = t_1 * ((x_46re + (0.5d0 * ((x_46im ** 2.0d0) / x_46re))) ** y_46re)
    else if (y_46re <= 1.25d+217) then
        tmp = t_2
    else
        tmp = t_0 * (x_46re ** 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 t_2 = t_1 * Math.pow((x_46_im + ((Math.pow(x_46_re, 2.0) * 0.5) / x_46_im)), y_46_re);
	double tmp;
	if (y_46_re <= -5.1e-39) {
		tmp = t_2;
	} else if (y_46_re <= 3e-69) {
		tmp = Math.sin((y_46_im * Math.log(x_46_re))) / Math.exp((Math.atan2(x_46_im, x_46_re) * y_46_im));
	} else if (y_46_re <= 9e+103) {
		tmp = t_1 * Math.pow(x_46_im, y_46_re);
	} else if (y_46_re <= 4e+194) {
		tmp = t_1 * Math.pow((x_46_re + (0.5 * (Math.pow(x_46_im, 2.0) / x_46_re))), y_46_re);
	} else if (y_46_re <= 1.25e+217) {
		tmp = t_2;
	} else {
		tmp = t_0 * Math.pow(x_46_re, y_46_re);
	}
	return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im):
	t_0 = y_46_re * math.atan2(x_46_im, x_46_re)
	t_1 = math.sin(t_0)
	t_2 = t_1 * math.pow((x_46_im + ((math.pow(x_46_re, 2.0) * 0.5) / x_46_im)), y_46_re)
	tmp = 0
	if y_46_re <= -5.1e-39:
		tmp = t_2
	elif y_46_re <= 3e-69:
		tmp = math.sin((y_46_im * math.log(x_46_re))) / math.exp((math.atan2(x_46_im, x_46_re) * y_46_im))
	elif y_46_re <= 9e+103:
		tmp = t_1 * math.pow(x_46_im, y_46_re)
	elif y_46_re <= 4e+194:
		tmp = t_1 * math.pow((x_46_re + (0.5 * (math.pow(x_46_im, 2.0) / x_46_re))), y_46_re)
	elif y_46_re <= 1.25e+217:
		tmp = t_2
	else:
		tmp = t_0 * math.pow(x_46_re, y_46_re)
	return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im)
	t_0 = Float64(y_46_re * atan(x_46_im, x_46_re))
	t_1 = sin(t_0)
	t_2 = Float64(t_1 * (Float64(x_46_im + Float64(Float64((x_46_re ^ 2.0) * 0.5) / x_46_im)) ^ y_46_re))
	tmp = 0.0
	if (y_46_re <= -5.1e-39)
		tmp = t_2;
	elseif (y_46_re <= 3e-69)
		tmp = Float64(sin(Float64(y_46_im * log(x_46_re))) / exp(Float64(atan(x_46_im, x_46_re) * y_46_im)));
	elseif (y_46_re <= 9e+103)
		tmp = Float64(t_1 * (x_46_im ^ y_46_re));
	elseif (y_46_re <= 4e+194)
		tmp = Float64(t_1 * (Float64(x_46_re + Float64(0.5 * Float64((x_46_im ^ 2.0) / x_46_re))) ^ y_46_re));
	elseif (y_46_re <= 1.25e+217)
		tmp = t_2;
	else
		tmp = Float64(t_0 * (x_46_re ^ y_46_re));
	end
	return tmp
end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im)
	t_0 = y_46_re * atan2(x_46_im, x_46_re);
	t_1 = sin(t_0);
	t_2 = t_1 * ((x_46_im + (((x_46_re ^ 2.0) * 0.5) / x_46_im)) ^ y_46_re);
	tmp = 0.0;
	if (y_46_re <= -5.1e-39)
		tmp = t_2;
	elseif (y_46_re <= 3e-69)
		tmp = sin((y_46_im * log(x_46_re))) / exp((atan2(x_46_im, x_46_re) * y_46_im));
	elseif (y_46_re <= 9e+103)
		tmp = t_1 * (x_46_im ^ y_46_re);
	elseif (y_46_re <= 4e+194)
		tmp = t_1 * ((x_46_re + (0.5 * ((x_46_im ^ 2.0) / x_46_re))) ^ y_46_re);
	elseif (y_46_re <= 1.25e+217)
		tmp = t_2;
	else
		tmp = t_0 * (x_46_re ^ y_46_re);
	end
	tmp_2 = tmp;
end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sin[t$95$0], $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 * N[Power[N[(x$46$im + N[(N[(N[Power[x$46$re, 2.0], $MachinePrecision] * 0.5), $MachinePrecision] / x$46$im), $MachinePrecision]), $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -5.1e-39], t$95$2, If[LessEqual[y$46$re, 3e-69], N[(N[Sin[N[(y$46$im * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 9e+103], N[(t$95$1 * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 4e+194], N[(t$95$1 * N[Power[N[(x$46$re + N[(0.5 * N[(N[Power[x$46$im, 2.0], $MachinePrecision] / x$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 1.25e+217], t$95$2, N[(t$95$0 * N[Power[x$46$re, 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\\
t_2 := t_1 \cdot {\left(x.im + \frac{{x.re}^{2} \cdot 0.5}{x.im}\right)}^{y.re}\\
\mathbf{if}\;y.re \leq -5.1 \cdot 10^{-39}:\\
\;\;\;\;t_2\\

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

\mathbf{elif}\;y.re \leq 9 \cdot 10^{+103}:\\
\;\;\;\;t_1 \cdot {x.im}^{y.re}\\

\mathbf{elif}\;y.re \leq 4 \cdot 10^{+194}:\\
\;\;\;\;t_1 \cdot {\left(x.re + 0.5 \cdot \frac{{x.im}^{2}}{x.re}\right)}^{y.re}\\

\mathbf{elif}\;y.re \leq 1.25 \cdot 10^{+217}:\\
\;\;\;\;t_2\\

\mathbf{else}:\\
\;\;\;\;t_0 \cdot {x.re}^{y.re}\\


\end{array}
\end{array}
Derivation
    &prev;&pcontext;&pcontext2;&ctx;
  1. Add Preprocessing

Alternative 16: 42.3% accurate, 1.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\ t_1 := \sin t_0 \cdot {\left(x.im + \frac{{x.re}^{2} \cdot 0.5}{x.im}\right)}^{y.re}\\ \mathbf{if}\;y.re \leq -4 \cdot 10^{-30}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y.re \leq 3.5 \cdot 10^{-69}:\\ \;\;\;\;\frac{\sin \left(y.im \cdot \log x.re\right)}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\\ \mathbf{elif}\;y.re \leq 2.9 \cdot 10^{+192}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_0 \cdot {x.re}^{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) (pow (+ x.im (/ (* (pow x.re 2.0) 0.5) x.im)) y.re))))
   (if (<= y.re -4e-30)
     t_1
     (if (<= y.re 3.5e-69)
       (/ (sin (* y.im (log x.re))) (exp (* (atan2 x.im x.re) y.im)))
       (if (<= y.re 2.9e+192) t_1 (* t_0 (pow x.re y.re)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
	double t_0 = y_46_re * atan2(x_46_im, x_46_re);
	double t_1 = sin(t_0) * pow((x_46_im + ((pow(x_46_re, 2.0) * 0.5) / x_46_im)), y_46_re);
	double tmp;
	if (y_46_re <= -4e-30) {
		tmp = t_1;
	} else if (y_46_re <= 3.5e-69) {
		tmp = sin((y_46_im * log(x_46_re))) / exp((atan2(x_46_im, x_46_re) * y_46_im));
	} else if (y_46_re <= 2.9e+192) {
		tmp = t_1;
	} else {
		tmp = t_0 * pow(x_46_re, 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) * ((x_46im + (((x_46re ** 2.0d0) * 0.5d0) / x_46im)) ** y_46re)
    if (y_46re <= (-4d-30)) then
        tmp = t_1
    else if (y_46re <= 3.5d-69) then
        tmp = sin((y_46im * log(x_46re))) / exp((atan2(x_46im, x_46re) * y_46im))
    else if (y_46re <= 2.9d+192) then
        tmp = t_1
    else
        tmp = t_0 * (x_46re ** 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) * Math.pow((x_46_im + ((Math.pow(x_46_re, 2.0) * 0.5) / x_46_im)), y_46_re);
	double tmp;
	if (y_46_re <= -4e-30) {
		tmp = t_1;
	} else if (y_46_re <= 3.5e-69) {
		tmp = Math.sin((y_46_im * Math.log(x_46_re))) / Math.exp((Math.atan2(x_46_im, x_46_re) * y_46_im));
	} else if (y_46_re <= 2.9e+192) {
		tmp = t_1;
	} else {
		tmp = t_0 * Math.pow(x_46_re, y_46_re);
	}
	return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im):
	t_0 = y_46_re * math.atan2(x_46_im, x_46_re)
	t_1 = math.sin(t_0) * math.pow((x_46_im + ((math.pow(x_46_re, 2.0) * 0.5) / x_46_im)), y_46_re)
	tmp = 0
	if y_46_re <= -4e-30:
		tmp = t_1
	elif y_46_re <= 3.5e-69:
		tmp = math.sin((y_46_im * math.log(x_46_re))) / math.exp((math.atan2(x_46_im, x_46_re) * y_46_im))
	elif y_46_re <= 2.9e+192:
		tmp = t_1
	else:
		tmp = t_0 * math.pow(x_46_re, y_46_re)
	return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im)
	t_0 = Float64(y_46_re * atan(x_46_im, x_46_re))
	t_1 = Float64(sin(t_0) * (Float64(x_46_im + Float64(Float64((x_46_re ^ 2.0) * 0.5) / x_46_im)) ^ y_46_re))
	tmp = 0.0
	if (y_46_re <= -4e-30)
		tmp = t_1;
	elseif (y_46_re <= 3.5e-69)
		tmp = Float64(sin(Float64(y_46_im * log(x_46_re))) / exp(Float64(atan(x_46_im, x_46_re) * y_46_im)));
	elseif (y_46_re <= 2.9e+192)
		tmp = t_1;
	else
		tmp = Float64(t_0 * (x_46_re ^ y_46_re));
	end
	return tmp
end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im)
	t_0 = y_46_re * atan2(x_46_im, x_46_re);
	t_1 = sin(t_0) * ((x_46_im + (((x_46_re ^ 2.0) * 0.5) / x_46_im)) ^ y_46_re);
	tmp = 0.0;
	if (y_46_re <= -4e-30)
		tmp = t_1;
	elseif (y_46_re <= 3.5e-69)
		tmp = sin((y_46_im * log(x_46_re))) / exp((atan2(x_46_im, x_46_re) * y_46_im));
	elseif (y_46_re <= 2.9e+192)
		tmp = t_1;
	else
		tmp = t_0 * (x_46_re ^ y_46_re);
	end
	tmp_2 = tmp;
end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[Sin[t$95$0], $MachinePrecision] * N[Power[N[(x$46$im + N[(N[(N[Power[x$46$re, 2.0], $MachinePrecision] * 0.5), $MachinePrecision] / x$46$im), $MachinePrecision]), $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -4e-30], t$95$1, If[LessEqual[y$46$re, 3.5e-69], N[(N[Sin[N[(y$46$im * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 2.9e+192], t$95$1, N[(t$95$0 * N[Power[x$46$re, 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 \cdot {\left(x.im + \frac{{x.re}^{2} \cdot 0.5}{x.im}\right)}^{y.re}\\
\mathbf{if}\;y.re \leq -4 \cdot 10^{-30}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;y.re \leq 2.9 \cdot 10^{+192}:\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;t_0 \cdot {x.re}^{y.re}\\


\end{array}
\end{array}
Derivation
    &prev;&pcontext;&pcontext2;&ctx;
  1. Add Preprocessing

Alternative 17: 37.4% accurate, 2.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\ t_1 := \sin t_0 \cdot {x.im}^{y.re}\\ \mathbf{if}\;y.re \leq -7.8 \cdot 10^{-32}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y.re \leq 5.6 \cdot 10^{-68}:\\ \;\;\;\;\frac{\sin \left(y.im \cdot \log x.re\right)}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\\ \mathbf{elif}\;y.re \leq 1.22 \cdot 10^{+161}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_0 \cdot {x.re}^{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) (pow x.im y.re))))
   (if (<= y.re -7.8e-32)
     t_1
     (if (<= y.re 5.6e-68)
       (/ (sin (* y.im (log x.re))) (exp (* (atan2 x.im x.re) y.im)))
       (if (<= y.re 1.22e+161) t_1 (* t_0 (pow x.re y.re)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
	double t_0 = y_46_re * atan2(x_46_im, x_46_re);
	double t_1 = sin(t_0) * pow(x_46_im, y_46_re);
	double tmp;
	if (y_46_re <= -7.8e-32) {
		tmp = t_1;
	} else if (y_46_re <= 5.6e-68) {
		tmp = sin((y_46_im * log(x_46_re))) / exp((atan2(x_46_im, x_46_re) * y_46_im));
	} else if (y_46_re <= 1.22e+161) {
		tmp = t_1;
	} else {
		tmp = t_0 * pow(x_46_re, 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) * (x_46im ** y_46re)
    if (y_46re <= (-7.8d-32)) then
        tmp = t_1
    else if (y_46re <= 5.6d-68) then
        tmp = sin((y_46im * log(x_46re))) / exp((atan2(x_46im, x_46re) * y_46im))
    else if (y_46re <= 1.22d+161) then
        tmp = t_1
    else
        tmp = t_0 * (x_46re ** 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) * Math.pow(x_46_im, y_46_re);
	double tmp;
	if (y_46_re <= -7.8e-32) {
		tmp = t_1;
	} else if (y_46_re <= 5.6e-68) {
		tmp = Math.sin((y_46_im * Math.log(x_46_re))) / Math.exp((Math.atan2(x_46_im, x_46_re) * y_46_im));
	} else if (y_46_re <= 1.22e+161) {
		tmp = t_1;
	} else {
		tmp = t_0 * Math.pow(x_46_re, y_46_re);
	}
	return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im):
	t_0 = y_46_re * math.atan2(x_46_im, x_46_re)
	t_1 = math.sin(t_0) * math.pow(x_46_im, y_46_re)
	tmp = 0
	if y_46_re <= -7.8e-32:
		tmp = t_1
	elif y_46_re <= 5.6e-68:
		tmp = math.sin((y_46_im * math.log(x_46_re))) / math.exp((math.atan2(x_46_im, x_46_re) * y_46_im))
	elif y_46_re <= 1.22e+161:
		tmp = t_1
	else:
		tmp = t_0 * math.pow(x_46_re, y_46_re)
	return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im)
	t_0 = Float64(y_46_re * atan(x_46_im, x_46_re))
	t_1 = Float64(sin(t_0) * (x_46_im ^ y_46_re))
	tmp = 0.0
	if (y_46_re <= -7.8e-32)
		tmp = t_1;
	elseif (y_46_re <= 5.6e-68)
		tmp = Float64(sin(Float64(y_46_im * log(x_46_re))) / exp(Float64(atan(x_46_im, x_46_re) * y_46_im)));
	elseif (y_46_re <= 1.22e+161)
		tmp = t_1;
	else
		tmp = Float64(t_0 * (x_46_re ^ y_46_re));
	end
	return tmp
end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im)
	t_0 = y_46_re * atan2(x_46_im, x_46_re);
	t_1 = sin(t_0) * (x_46_im ^ y_46_re);
	tmp = 0.0;
	if (y_46_re <= -7.8e-32)
		tmp = t_1;
	elseif (y_46_re <= 5.6e-68)
		tmp = sin((y_46_im * log(x_46_re))) / exp((atan2(x_46_im, x_46_re) * y_46_im));
	elseif (y_46_re <= 1.22e+161)
		tmp = t_1;
	else
		tmp = t_0 * (x_46_re ^ y_46_re);
	end
	tmp_2 = tmp;
end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, 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, -7.8e-32], t$95$1, If[LessEqual[y$46$re, 5.6e-68], N[(N[Sin[N[(y$46$im * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 1.22e+161], t$95$1, N[(t$95$0 * N[Power[x$46$re, 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 \cdot {x.im}^{y.re}\\
\mathbf{if}\;y.re \leq -7.8 \cdot 10^{-32}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;y.re \leq 1.22 \cdot 10^{+161}:\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;t_0 \cdot {x.re}^{y.re}\\


\end{array}
\end{array}
Derivation
    &prev;&pcontext;&pcontext2;&ctx;
  1. Add Preprocessing

Alternative 18: 39.4% accurate, 2.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\ \mathbf{if}\;x.im \leq -7 \cdot 10^{-83}:\\ \;\;\;\;t_0 \cdot {\left(-x.im\right)}^{y.re}\\ \mathbf{elif}\;x.im \leq 1.6 \cdot 10^{-269}:\\ \;\;\;\;t_0 \cdot {x.re}^{y.re}\\ \mathbf{else}:\\ \;\;\;\;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 (sin (* y.re (atan2 x.im x.re)))))
   (if (<= x.im -7e-83)
     (* t_0 (pow (- x.im) y.re))
     (if (<= x.im 1.6e-269) (* t_0 (pow x.re y.re)) (* 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 = sin((y_46_re * atan2(x_46_im, x_46_re)));
	double tmp;
	if (x_46_im <= -7e-83) {
		tmp = t_0 * pow(-x_46_im, y_46_re);
	} else if (x_46_im <= 1.6e-269) {
		tmp = t_0 * pow(x_46_re, y_46_re);
	} else {
		tmp = t_0 * 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) :: tmp
    t_0 = sin((y_46re * atan2(x_46im, x_46re)))
    if (x_46im <= (-7d-83)) then
        tmp = t_0 * (-x_46im ** y_46re)
    else if (x_46im <= 1.6d-269) then
        tmp = t_0 * (x_46re ** y_46re)
    else
        tmp = t_0 * (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 = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
	double tmp;
	if (x_46_im <= -7e-83) {
		tmp = t_0 * Math.pow(-x_46_im, y_46_re);
	} else if (x_46_im <= 1.6e-269) {
		tmp = t_0 * Math.pow(x_46_re, y_46_re);
	} else {
		tmp = 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 = math.sin((y_46_re * math.atan2(x_46_im, x_46_re)))
	tmp = 0
	if x_46_im <= -7e-83:
		tmp = t_0 * math.pow(-x_46_im, y_46_re)
	elif x_46_im <= 1.6e-269:
		tmp = t_0 * math.pow(x_46_re, y_46_re)
	else:
		tmp = 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 = sin(Float64(y_46_re * atan(x_46_im, x_46_re)))
	tmp = 0.0
	if (x_46_im <= -7e-83)
		tmp = Float64(t_0 * (Float64(-x_46_im) ^ y_46_re));
	elseif (x_46_im <= 1.6e-269)
		tmp = Float64(t_0 * (x_46_re ^ y_46_re));
	else
		tmp = Float64(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 = sin((y_46_re * atan2(x_46_im, x_46_re)));
	tmp = 0.0;
	if (x_46_im <= -7e-83)
		tmp = t_0 * (-x_46_im ^ y_46_re);
	elseif (x_46_im <= 1.6e-269)
		tmp = t_0 * (x_46_re ^ y_46_re);
	else
		tmp = 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[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[x$46$im, -7e-83], N[(t$95$0 * N[Power[(-x$46$im), y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$im, 1.6e-269], N[(t$95$0 * N[Power[x$46$re, y$46$re], $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{if}\;x.im \leq -7 \cdot 10^{-83}:\\
\;\;\;\;t_0 \cdot {\left(-x.im\right)}^{y.re}\\

\mathbf{elif}\;x.im \leq 1.6 \cdot 10^{-269}:\\
\;\;\;\;t_0 \cdot {x.re}^{y.re}\\

\mathbf{else}:\\
\;\;\;\;t_0 \cdot {x.im}^{y.re}\\


\end{array}
\end{array}
Derivation
    &prev;&pcontext;&pcontext2;&ctx;
  1. Add Preprocessing

Alternative 19: 31.6% accurate, 2.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\ \mathbf{if}\;y.im \leq 4.9 \cdot 10^{-23}:\\ \;\;\;\;\sin t_0 \cdot {x.im}^{y.re}\\ \mathbf{else}:\\ \;\;\;\;t_0 \cdot {x.re}^{y.re}\\ \end{array} \end{array} \]
(FPCore (x.re x.im y.re y.im)
 :precision binary64
 (let* ((t_0 (* y.re (atan2 x.im x.re))))
   (if (<= y.im 4.9e-23)
     (* (sin t_0) (pow x.im y.re))
     (* t_0 (pow x.re y.re)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
	double t_0 = y_46_re * atan2(x_46_im, x_46_re);
	double tmp;
	if (y_46_im <= 4.9e-23) {
		tmp = sin(t_0) * pow(x_46_im, y_46_re);
	} else {
		tmp = t_0 * pow(x_46_re, 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) :: tmp
    t_0 = y_46re * atan2(x_46im, x_46re)
    if (y_46im <= 4.9d-23) then
        tmp = sin(t_0) * (x_46im ** y_46re)
    else
        tmp = t_0 * (x_46re ** y_46re)
    end if
    code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
	double t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
	double tmp;
	if (y_46_im <= 4.9e-23) {
		tmp = Math.sin(t_0) * Math.pow(x_46_im, y_46_re);
	} else {
		tmp = t_0 * Math.pow(x_46_re, y_46_re);
	}
	return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im):
	t_0 = y_46_re * math.atan2(x_46_im, x_46_re)
	tmp = 0
	if y_46_im <= 4.9e-23:
		tmp = math.sin(t_0) * math.pow(x_46_im, y_46_re)
	else:
		tmp = t_0 * math.pow(x_46_re, y_46_re)
	return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im)
	t_0 = Float64(y_46_re * atan(x_46_im, x_46_re))
	tmp = 0.0
	if (y_46_im <= 4.9e-23)
		tmp = Float64(sin(t_0) * (x_46_im ^ y_46_re));
	else
		tmp = Float64(t_0 * (x_46_re ^ y_46_re));
	end
	return tmp
end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im)
	t_0 = y_46_re * atan2(x_46_im, x_46_re);
	tmp = 0.0;
	if (y_46_im <= 4.9e-23)
		tmp = sin(t_0) * (x_46_im ^ y_46_re);
	else
		tmp = t_0 * (x_46_re ^ y_46_re);
	end
	tmp_2 = tmp;
end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, 4.9e-23], N[(N[Sin[t$95$0], $MachinePrecision] * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[Power[x$46$re, y$46$re], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.im \leq 4.9 \cdot 10^{-23}:\\
\;\;\;\;\sin t_0 \cdot {x.im}^{y.re}\\

\mathbf{else}:\\
\;\;\;\;t_0 \cdot {x.re}^{y.re}\\


\end{array}
\end{array}
Derivation
    &prev;&pcontext;&pcontext2;&ctx;
  1. Add Preprocessing

Alternative 20: 36.4% accurate, 3.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\ \mathbf{if}\;y.re \leq -195000000 \lor \neg \left(y.re \leq 1620000\right):\\ \;\;\;\;t_0 \cdot {x.re}^{y.re}\\ \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))))
   (if (or (<= y.re -195000000.0) (not (<= y.re 1620000.0)))
     (* t_0 (pow x.re y.re))
     t_0)))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
	double t_0 = y_46_re * atan2(x_46_im, x_46_re);
	double tmp;
	if ((y_46_re <= -195000000.0) || !(y_46_re <= 1620000.0)) {
		tmp = t_0 * pow(x_46_re, y_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_46re * atan2(x_46im, x_46re)
    if ((y_46re <= (-195000000.0d0)) .or. (.not. (y_46re <= 1620000.0d0))) then
        tmp = t_0 * (x_46re ** y_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_re * Math.atan2(x_46_im, x_46_re);
	double tmp;
	if ((y_46_re <= -195000000.0) || !(y_46_re <= 1620000.0)) {
		tmp = t_0 * Math.pow(x_46_re, y_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_re * math.atan2(x_46_im, x_46_re)
	tmp = 0
	if (y_46_re <= -195000000.0) or not (y_46_re <= 1620000.0):
		tmp = t_0 * math.pow(x_46_re, y_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(y_46_re * atan(x_46_im, x_46_re))
	tmp = 0.0
	if ((y_46_re <= -195000000.0) || !(y_46_re <= 1620000.0))
		tmp = Float64(t_0 * (x_46_re ^ y_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_re * atan2(x_46_im, x_46_re);
	tmp = 0.0;
	if ((y_46_re <= -195000000.0) || ~((y_46_re <= 1620000.0)))
		tmp = t_0 * (x_46_re ^ y_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[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[y$46$re, -195000000.0], N[Not[LessEqual[y$46$re, 1620000.0]], $MachinePrecision]], N[(t$95$0 * N[Power[x$46$re, y$46$re], $MachinePrecision]), $MachinePrecision], t$95$0]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.re \leq -195000000 \lor \neg \left(y.re \leq 1620000\right):\\
\;\;\;\;t_0 \cdot {x.re}^{y.re}\\

\mathbf{else}:\\
\;\;\;\;t_0\\


\end{array}
\end{array}
Derivation
    &prev;&pcontext;&pcontext2;&ctx;
  1. Add Preprocessing

Alternative 21: 13.4% 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
    &prev;&pcontext;&pcontext2;&ctx;
  1. Add Preprocessing

Reproduce

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