Average Error: 33.1 → 7.3
Time: 27.0s
Precision: binary64
Cost: 181640
\[e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \]
\[\begin{array}{l} t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\ t_1 := \sqrt[3]{\sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, t_0\right)\right)}\\ t_2 := \sqrt[3]{t_1}\\ \mathbf{if}\;y.re \leq -1 \cdot 10^{+120}:\\ \;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot t_0\\ \mathbf{elif}\;y.re \leq 340000000000:\\ \;\;\;\;\frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{{\log \left(1 + \mathsf{expm1}\left(e^{\tan^{-1}_* \frac{x.im}{x.re}}\right)\right)}^{y.im}} \cdot \left(t_2 \cdot {\left(t_1 \cdot t_2\right)}^{2}\right)\\ \mathbf{else}:\\ \;\;\;\;t_0 \cdot {x.im}^{y.re}\\ \end{array} \]
(FPCore (x.re x.im y.re y.im)
 :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)))))
(FPCore (x.re x.im y.re y.im)
 :precision binary64
 (let* ((t_0 (* y.re (atan2 x.im x.re)))
        (t_1 (cbrt (sin (fma (log (hypot x.re x.im)) y.im t_0))))
        (t_2 (cbrt t_1)))
   (if (<= y.re -1e+120)
     (*
      (exp
       (-
        (* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
        (* (atan2 x.im x.re) y.im)))
      t_0)
     (if (<= y.re 340000000000.0)
       (*
        (/
         (pow (hypot x.re x.im) y.re)
         (pow (log (+ 1.0 (expm1 (exp (atan2 x.im x.re))))) y.im))
        (* t_2 (pow (* t_1 t_2) 2.0)))
       (* 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) {
	return exp(((log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin(((log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_im) + (atan2(x_46_im, x_46_re) * y_46_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 = cbrt(sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_0)));
	double t_2 = cbrt(t_1);
	double tmp;
	if (y_46_re <= -1e+120) {
		tmp = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (atan2(x_46_im, x_46_re) * y_46_im))) * t_0;
	} else if (y_46_re <= 340000000000.0) {
		tmp = (pow(hypot(x_46_re, x_46_im), y_46_re) / pow(log((1.0 + expm1(exp(atan2(x_46_im, x_46_re))))), y_46_im)) * (t_2 * pow((t_1 * t_2), 2.0));
	} else {
		tmp = t_0 * pow(x_46_im, y_46_re);
	}
	return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im)
	return Float64(exp(Float64(Float64(log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) * y_46_re) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * sin(Float64(Float64(log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) * y_46_im) + Float64(atan(x_46_im, x_46_re) * y_46_re))))
end
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 = cbrt(sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_0)))
	t_2 = cbrt(t_1)
	tmp = 0.0
	if (y_46_re <= -1e+120)
		tmp = Float64(exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * t_0);
	elseif (y_46_re <= 340000000000.0)
		tmp = Float64(Float64((hypot(x_46_re, x_46_im) ^ y_46_re) / (log(Float64(1.0 + expm1(exp(atan(x_46_im, x_46_re))))) ^ y_46_im)) * Float64(t_2 * (Float64(t_1 * t_2) ^ 2.0)));
	else
		tmp = Float64(t_0 * (x_46_im ^ y_46_re));
	end
	return tmp
end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[(N[Exp[N[(N[(N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * y$46$re), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[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$im), $MachinePrecision] + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
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[Power[N[Sin[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im + t$95$0), $MachinePrecision]], $MachinePrecision], 1/3], $MachinePrecision]}, Block[{t$95$2 = N[Power[t$95$1, 1/3], $MachinePrecision]}, If[LessEqual[y$46$re, -1e+120], N[(N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$0), $MachinePrecision], If[LessEqual[y$46$re, 340000000000.0], N[(N[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] / N[Power[N[Log[N[(1.0 + N[(Exp[N[Exp[N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision]] - 1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], y$46$im], $MachinePrecision]), $MachinePrecision] * N[(t$95$2 * N[Power[N[(t$95$1 * t$95$2), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision]]]]]]
e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := \sqrt[3]{\sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, t_0\right)\right)}\\
t_2 := \sqrt[3]{t_1}\\
\mathbf{if}\;y.re \leq -1 \cdot 10^{+120}:\\
\;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot t_0\\

\mathbf{elif}\;y.re \leq 340000000000:\\
\;\;\;\;\frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{{\log \left(1 + \mathsf{expm1}\left(e^{\tan^{-1}_* \frac{x.im}{x.re}}\right)\right)}^{y.im}} \cdot \left(t_2 \cdot {\left(t_1 \cdot t_2\right)}^{2}\right)\\

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


\end{array}

Error

Derivation

  1. Split input into 3 regimes
  2. if y.re < -9.9999999999999998e119

    1. Initial program 36.4

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

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

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

    if -9.9999999999999998e119 < y.re < 3.4e11

    1. Initial program 34.5

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

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

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

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

      \[\leadsto \frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{{\log \left(1 + \mathsf{expm1}\left(e^{\tan^{-1}_* \frac{x.im}{x.re}}\right)\right)}^{y.im}} \cdot {\left(\sqrt[3]{\color{blue}{{\left(\sqrt[3]{\sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)}\right)}^{3}}}\right)}^{3} \]
    6. Applied egg-rr8.2

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

    if 3.4e11 < y.re

    1. Initial program 19.3

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

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

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

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

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

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

Alternatives

Alternative 1
Error12.5
Cost78420
\[\begin{array}{l} t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\ t_1 := e^{\tan^{-1}_* \frac{x.im}{x.re}}\\ t_2 := {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\\ t_3 := \frac{t_2}{{t_1}^{y.im}}\\ t_4 := t_3 \cdot \sin \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\mathsf{fma}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}, y.im \cdot \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\right)\right)\right)\right)\\ \mathbf{if}\;y.im \leq -1.55 \cdot 10^{+172}:\\ \;\;\;\;t_0 \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\ \mathbf{elif}\;y.im \leq -1.8664265349179165 \cdot 10^{-115}:\\ \;\;\;\;\frac{t_2}{{\log \left(1 + \mathsf{expm1}\left(t_1\right)\right)}^{y.im}} \cdot \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\ \mathbf{elif}\;y.im \leq -9.122261899655937 \cdot 10^{-268}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;y.im \leq 5.8768607307216613 \cdot 10^{-272}:\\ \;\;\;\;t_3 \cdot \sin t_0\\ \mathbf{elif}\;y.im \leq 4.135396356803478:\\ \;\;\;\;t_4\\ \mathbf{else}:\\ \;\;\;\;y.re \cdot \frac{\tan^{-1}_* \frac{x.im}{x.re}}{{\left(e^{y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}}\\ \end{array} \]
Alternative 2
Error7.2
Cost78088
\[\begin{array}{l} t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\ \mathbf{if}\;y.re \leq -1 \cdot 10^{+120}:\\ \;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot t_0\\ \mathbf{elif}\;y.re \leq 340000000000:\\ \;\;\;\;\frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{{\left(e^{\tan^{-1}_* \frac{x.im}{x.re}}\right)}^{y.im}} \cdot \sin \left({\left(\sqrt[3]{\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, t_0\right)}\right)}^{3}\right)\\ \mathbf{else}:\\ \;\;\;\;t_0 \cdot {x.im}^{y.re}\\ \end{array} \]
Alternative 3
Error14.3
Cost65292
\[\begin{array}{l} t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\ t_1 := {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\\ t_2 := e^{\tan^{-1}_* \frac{x.im}{x.re}}\\ t_3 := \frac{t_1}{{t_2}^{y.im}} \cdot \sin t_0\\ \mathbf{if}\;y.re \leq -1 \cdot 10^{+120}:\\ \;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot t_0\\ \mathbf{elif}\;y.re \leq -1.307335530812674 \cdot 10^{-52}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;y.re \leq 5.640764771666021 \cdot 10^{-85}:\\ \;\;\;\;\frac{t_1}{{\log \left(1 + \mathsf{expm1}\left(t_2\right)\right)}^{y.im}} \cdot \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\ \mathbf{elif}\;y.re \leq 340000000000:\\ \;\;\;\;t_3\\ \mathbf{else}:\\ \;\;\;\;t_0 \cdot {x.im}^{y.re}\\ \end{array} \]
Alternative 4
Error14.3
Cost52364
\[\begin{array}{l} t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\ t_1 := \frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{{\left(e^{\tan^{-1}_* \frac{x.im}{x.re}}\right)}^{y.im}}\\ t_2 := t_1 \cdot \sin t_0\\ \mathbf{if}\;y.re \leq -1 \cdot 10^{+120}:\\ \;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot t_0\\ \mathbf{elif}\;y.re \leq -1.307335530812674 \cdot 10^{-52}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y.re \leq 5.640764771666021 \cdot 10^{-85}:\\ \;\;\;\;t_1 \cdot \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\ \mathbf{elif}\;y.re \leq 340000000000:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t_0 \cdot {x.im}^{y.re}\\ \end{array} \]
Alternative 5
Error21.3
Cost46808
\[\begin{array}{l} t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\ t_1 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\ t_2 := t_1 \cdot e^{y.re \cdot \log \left(-x.re\right) - t_0}\\ t_3 := e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - t_0} \cdot \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\ \mathbf{if}\;x.re \leq -1 \cdot 10^{+80}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x.re \leq -1 \cdot 10^{-98}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;x.re \leq -1.2 \cdot 10^{-154}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x.re \leq -5.5 \cdot 10^{-238}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;x.re \leq -1 \cdot 10^{-263}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x.re \leq 8.4 \cdot 10^{-184}:\\ \;\;\;\;\frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{{\left(e^{\tan^{-1}_* \frac{x.im}{x.re}}\right)}^{y.im}} \cdot t_1\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \end{array} \]
Alternative 6
Error23.6
Cost46096
\[\begin{array}{l} t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\ t_1 := \frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{{\left(e^{\tan^{-1}_* \frac{x.im}{x.re}}\right)}^{y.im}}\\ t_2 := t_1 \cdot \sin \left(y.im \cdot \left(-\log \left(\frac{-1}{x.im}\right)\right)\right)\\ t_3 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\ t_4 := \sin t_3\\ \mathbf{if}\;x.im \leq -6.8 \cdot 10^{+99}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x.im \leq -9 \cdot 10^{-61}:\\ \;\;\;\;t_4 \cdot e^{y.re \cdot \log \left(-x.im\right) - t_0}\\ \mathbf{elif}\;x.im \leq -3.8 \cdot 10^{-127}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x.im \leq -1.12 \cdot 10^{-206}:\\ \;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - t_0} \cdot t_3\\ \mathbf{else}:\\ \;\;\;\;t_1 \cdot t_4\\ \end{array} \]
Alternative 7
Error21.8
Cost46096
\[\begin{array}{l} t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\ t_1 := \frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{{\left(e^{\tan^{-1}_* \frac{x.im}{x.re}}\right)}^{y.im}}\\ t_2 := t_1 \cdot \sin t_0\\ \mathbf{if}\;y.re \leq -1 \cdot 10^{+120}:\\ \;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot t_0\\ \mathbf{elif}\;y.re \leq -2.5722089042789038 \cdot 10^{-141}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y.re \leq -2.8269589030944268 \cdot 10^{-188}:\\ \;\;\;\;t_1 \cdot \sin \left(y.im \cdot \left(-\log \left(\frac{-1}{x.re}\right)\right)\right)\\ \mathbf{elif}\;y.re \leq 340000000000:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t_0 \cdot {x.im}^{y.re}\\ \end{array} \]
Alternative 8
Error21.2
Cost45832
\[\begin{array}{l} t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\ \mathbf{if}\;y.re \leq -1 \cdot 10^{+120}:\\ \;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot t_0\\ \mathbf{elif}\;y.re \leq 340000000000:\\ \;\;\;\;\frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{{\left(e^{\tan^{-1}_* \frac{x.im}{x.re}}\right)}^{y.im}} \cdot \sin t_0\\ \mathbf{else}:\\ \;\;\;\;t_0 \cdot {x.im}^{y.re}\\ \end{array} \]
Alternative 9
Error20.6
Cost33348
\[\begin{array}{l} t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\ \mathbf{if}\;y.re \leq -4.367650436428469 \cdot 10^{-8}:\\ \;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot t_0\\ \mathbf{elif}\;y.re \leq 8.6 \cdot 10^{+64}:\\ \;\;\;\;t_0 \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\ \mathbf{else}:\\ \;\;\;\;t_0 \cdot {x.im}^{y.re}\\ \end{array} \]
Alternative 10
Error23.6
Cost33228
\[\begin{array}{l} t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\ t_1 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\ t_2 := t_1 \cdot e^{y.re \cdot \log x.re - t_0}\\ \mathbf{if}\;x.re \leq 0:\\ \;\;\;\;t_1 \cdot e^{y.re \cdot \log \left(-x.re\right) - t_0}\\ \mathbf{elif}\;x.re \leq 1.02 \cdot 10^{-118}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x.re \leq 1200:\\ \;\;\;\;{x.im}^{y.re} \cdot \left(-1 + \left(1 + t_1\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 11
Error29.2
Cost33040
\[\begin{array}{l} t_0 := y.re \cdot \frac{\tan^{-1}_* \frac{x.im}{x.re}}{{\left(e^{y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}}\\ t_1 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\ t_2 := {x.im}^{y.re} \cdot t_1\\ \mathbf{if}\;x.im \leq -9.5 \cdot 10^{-147}:\\ \;\;\;\;t_1 \cdot e^{y.re \cdot \log \left(-x.im\right) - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\ \mathbf{elif}\;x.im \leq 2.5 \cdot 10^{-118}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;x.im \leq 5 \cdot 10^{+151}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x.im \leq 9 \cdot 10^{+235}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;\sqrt[3]{{t_2}^{3}}\\ \end{array} \]
Alternative 12
Error27.7
Cost20104
\[\begin{array}{l} t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\ t_1 := t_0 \cdot {x.im}^{y.re}\\ \mathbf{if}\;y.re \leq -2.9 \cdot 10^{+70}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y.re \leq 8.6 \cdot 10^{+64}:\\ \;\;\;\;t_0 \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 13
Error36.6
Cost19780
\[\begin{array}{l} t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\ \mathbf{if}\;y.re \leq -4.367650436428469 \cdot 10^{-8}:\\ \;\;\;\;{x.im}^{y.re} \cdot \sin t_0\\ \mathbf{elif}\;y.re \leq 500000000:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;t_0 \cdot {x.im}^{y.re}\\ \end{array} \]
Alternative 14
Error36.7
Cost13512
\[\begin{array}{l} t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\ t_1 := t_0 \cdot {x.im}^{y.re}\\ \mathbf{if}\;y.re \leq -4.367650436428469 \cdot 10^{-8}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y.re \leq 500000000:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 15
Error50.9
Cost6656
\[y.re \cdot \tan^{-1}_* \frac{x.im}{x.re} \]

Error

Reproduce

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