Average Error: 33.1 → 6.2
Time: 38.1s
Precision: binary64
Cost: 65224
\[e^{\log \left(\sqrt{x.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 := 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}\\ t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\ \mathbf{if}\;y.re \leq -0.7651020595615283:\\ \;\;\;\;t_0 \cdot \sin \left({\left(\sqrt[3]{t_1}\right)}^{3}\right)\\ \mathbf{elif}\;y.re \leq 0.0005686835782020167:\\ \;\;\;\;\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, t_1\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t_0 \cdot t_1\\ \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
         (exp
          (-
           (* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
           (* (atan2 x.im x.re) y.im))))
        (t_1 (* y.re (atan2 x.im x.re))))
   (if (<= y.re -0.7651020595615283)
     (* t_0 (sin (pow (cbrt t_1) 3.0)))
     (if (<= y.re 0.0005686835782020167)
       (*
        (/ (pow (hypot x.re x.im) y.re) (pow (exp (atan2 x.im x.re)) y.im))
        (sin (fma (log (hypot x.re x.im)) y.im t_1)))
       (* t_0 t_1)))))
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 = 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)));
	double t_1 = y_46_re * atan2(x_46_im, x_46_re);
	double tmp;
	if (y_46_re <= -0.7651020595615283) {
		tmp = t_0 * sin(pow(cbrt(t_1), 3.0));
	} else if (y_46_re <= 0.0005686835782020167) {
		tmp = (pow(hypot(x_46_re, x_46_im), y_46_re) / pow(exp(atan2(x_46_im, x_46_re)), y_46_im)) * sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_1));
	} else {
		tmp = t_0 * t_1;
	}
	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 = 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_1 = Float64(y_46_re * atan(x_46_im, x_46_re))
	tmp = 0.0
	if (y_46_re <= -0.7651020595615283)
		tmp = Float64(t_0 * sin((cbrt(t_1) ^ 3.0)));
	elseif (y_46_re <= 0.0005686835782020167)
		tmp = Float64(Float64((hypot(x_46_re, x_46_im) ^ y_46_re) / (exp(atan(x_46_im, x_46_re)) ^ y_46_im)) * sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_1)));
	else
		tmp = Float64(t_0 * t_1);
	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[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]}, Block[{t$95$1 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -0.7651020595615283], N[(t$95$0 * N[Sin[N[Power[N[Power[t$95$1, 1/3], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 0.0005686835782020167], N[(N[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] / N[Power[N[Exp[N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision], y$46$im], $MachinePrecision]), $MachinePrecision] * N[Sin[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im + t$95$1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$0 * t$95$1), $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 := 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}\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.re \leq -0.7651020595615283:\\
\;\;\;\;t_0 \cdot \sin \left({\left(\sqrt[3]{t_1}\right)}^{3}\right)\\

\mathbf{elif}\;y.re \leq 0.0005686835782020167:\\
\;\;\;\;\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, t_1\right)\right)\\

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


\end{array}

Error

Derivation

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

    1. Initial program 36.9

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

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

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

    if -0.76510205956152832 < y.re < 5.68683578202016705e-4

    1. Initial program 33.8

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

      \[\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)} \]
      Proof
      (*.f64 (/.f64 (pow.f64 (hypot.f64 x.re x.im) y.re) (pow.f64 (exp.f64 (atan2.f64 x.im x.re)) y.im)) (sin.f64 (fma.f64 (log.f64 (hypot.f64 x.re x.im)) y.im (*.f64 y.re (atan2.f64 x.im x.re))))): 0 points increase in error, 0 points decrease in error
      (*.f64 (/.f64 (pow.f64 (Rewrite<= hypot-def_binary64 (sqrt.f64 (+.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)))) y.re) (pow.f64 (exp.f64 (atan2.f64 x.im x.re)) y.im)) (sin.f64 (fma.f64 (log.f64 (hypot.f64 x.re x.im)) y.im (*.f64 y.re (atan2.f64 x.im x.re))))): 70 points increase in error, 3 points decrease in error
      (*.f64 (/.f64 (Rewrite<= exp-to-pow_binary64 (exp.f64 (*.f64 (log.f64 (sqrt.f64 (+.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)))) y.re))) (pow.f64 (exp.f64 (atan2.f64 x.im x.re)) y.im)) (sin.f64 (fma.f64 (log.f64 (hypot.f64 x.re x.im)) y.im (*.f64 y.re (atan2.f64 x.im x.re))))): 1 points increase in error, 0 points decrease in error
      (*.f64 (/.f64 (exp.f64 (*.f64 (log.f64 (sqrt.f64 (+.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)))) y.re)) (Rewrite<= exp-prod_binary64 (exp.f64 (*.f64 (atan2.f64 x.im x.re) y.im)))) (sin.f64 (fma.f64 (log.f64 (hypot.f64 x.re x.im)) y.im (*.f64 y.re (atan2.f64 x.im x.re))))): 1 points increase in error, 2 points decrease in error
      (*.f64 (Rewrite<= exp-diff_binary64 (exp.f64 (-.f64 (*.f64 (log.f64 (sqrt.f64 (+.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)))) y.re) (*.f64 (atan2.f64 x.im x.re) y.im)))) (sin.f64 (fma.f64 (log.f64 (hypot.f64 x.re x.im)) y.im (*.f64 y.re (atan2.f64 x.im x.re))))): 0 points increase in error, 22 points decrease in error
      (*.f64 (exp.f64 (-.f64 (*.f64 (log.f64 (sqrt.f64 (+.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)))) y.re) (*.f64 (atan2.f64 x.im x.re) y.im))) (sin.f64 (fma.f64 (log.f64 (Rewrite<= hypot-def_binary64 (sqrt.f64 (+.f64 (*.f64 x.re x.re) (*.f64 x.im x.im))))) y.im (*.f64 y.re (atan2.f64 x.im x.re))))): 86 points increase in error, 0 points decrease in error
      (*.f64 (exp.f64 (-.f64 (*.f64 (log.f64 (sqrt.f64 (+.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)))) y.re) (*.f64 (atan2.f64 x.im x.re) y.im))) (sin.f64 (fma.f64 (log.f64 (sqrt.f64 (+.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)))) y.im (Rewrite<= *-commutative_binary64 (*.f64 (atan2.f64 x.im x.re) y.re))))): 0 points increase in error, 0 points decrease in error
      (*.f64 (exp.f64 (-.f64 (*.f64 (log.f64 (sqrt.f64 (+.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)))) y.re) (*.f64 (atan2.f64 x.im x.re) y.im))) (sin.f64 (Rewrite<= fma-def_binary64 (+.f64 (*.f64 (log.f64 (sqrt.f64 (+.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)))) y.im) (*.f64 (atan2.f64 x.im x.re) y.re))))): 2 points increase in error, 0 points decrease in error

    if 5.68683578202016705e-4 < y.re

    1. Initial program 20.7

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y.re \leq -0.7651020595615283:\\ \;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left({\left(\sqrt[3]{y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}}\right)}^{3}\right)\\ \mathbf{elif}\;y.re \leq 0.0005686835782020167:\\ \;\;\;\;\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)\\ \mathbf{else}:\\ \;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\ \end{array} \]

Alternatives

Alternative 1
Error5.7
Cost59272
\[\begin{array}{l} t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\ t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\ t_2 := \sin t_1\\ t_3 := e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - t_0}\\ \mathbf{if}\;y.re \leq -7.195175365582101 \cdot 10^{-13}:\\ \;\;\;\;t_3 \cdot t_2\\ \mathbf{elif}\;y.re \leq 5.4229339526224514 \cdot 10^{-11}:\\ \;\;\;\;\sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, t_1\right)\right) \cdot \frac{1}{e^{t_0}}\\ \mathbf{else}:\\ \;\;\;\;t_3 \cdot \mathsf{fma}\left(y.im, \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right), t_2\right)\\ \end{array} \]
Alternative 2
Error5.7
Cost45960
\[\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 := e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - t_0}\\ \mathbf{if}\;y.re \leq -7.195175365582101 \cdot 10^{-13}:\\ \;\;\;\;t_2 \cdot \sin t_1\\ \mathbf{elif}\;y.re \leq 5.4229339526224514 \cdot 10^{-11}:\\ \;\;\;\;\sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, t_1\right)\right) \cdot \frac{1}{e^{t_0}}\\ \mathbf{else}:\\ \;\;\;\;t_2 \cdot t_1\\ \end{array} \]
Alternative 3
Error8.5
Cost45768
\[\begin{array}{l} t_0 := 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}\\ t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\ \mathbf{if}\;y.im \leq -4.2 \cdot 10^{+52}:\\ \;\;\;\;t_0 \cdot \left(\left(\sin t_1 + 1\right) + -1\right)\\ \mathbf{elif}\;y.im \leq 3900000000:\\ \;\;\;\;\sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, t_1\right)\right) \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\ \mathbf{else}:\\ \;\;\;\;t_0 \cdot t_1\\ \end{array} \]
Alternative 4
Error22.5
Cost40004
\[\begin{array}{l} t_0 := 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}\\ t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\ t_2 := \sin t_1\\ \mathbf{if}\;y.im \leq -4.2 \cdot 10^{+52}:\\ \;\;\;\;t_0 \cdot \left(\left(t_2 + 1\right) + -1\right)\\ \mathbf{elif}\;y.im \leq 0.005495891957786452:\\ \;\;\;\;t_2 \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\ \mathbf{else}:\\ \;\;\;\;t_0 \cdot t_1\\ \end{array} \]
Alternative 5
Error21.9
Cost33480
\[\begin{array}{l} t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\ t_1 := 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{if}\;y.im \leq -0.4596766459576207:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y.im \leq 0.005495891957786452:\\ \;\;\;\;\sin t_0 \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 6
Error22.0
Cost26632
\[\begin{array}{l} t_0 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\ t_1 := \left(1 + t_0\right) + -1\\ \mathbf{if}\;y.im \leq -4.2 \cdot 10^{+52}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y.im \leq 3.622113538289586 \cdot 10^{-5}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 7
Error27.9
Cost26376
\[\begin{array}{l} t_0 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\ \mathbf{if}\;y.re \leq -1.589726086168466 \cdot 10^{-211}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;y.re \leq 4.805532723754756 \cdot 10^{-116}:\\ \;\;\;\;\sqrt[3]{{\tan^{-1}_* \frac{x.im}{x.re}}^{3} \cdot {y.re}^{3}}\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 8
Error28.2
Cost26248
\[\begin{array}{l} t_0 := \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\ \mathbf{if}\;y.re \leq -1.589726086168466 \cdot 10^{-211}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;y.re \leq 4.805532723754756 \cdot 10^{-116}:\\ \;\;\;\;\sqrt[3]{{\tan^{-1}_* \frac{x.im}{x.re}}^{3} \cdot {y.re}^{3}}\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 9
Error28.2
Cost19976
\[\begin{array}{l} t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\ t_1 := t_0 \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\ \mathbf{if}\;y.re \leq -1.589726086168466 \cdot 10^{-211}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y.re \leq 4.805532723754756 \cdot 10^{-116}:\\ \;\;\;\;\sqrt[3]{{t_0}^{3}}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 10
Error35.1
Cost19912
\[\begin{array}{l} t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\ t_1 := \sin t_0 \cdot {x.im}^{y.re}\\ \mathbf{if}\;y.re \leq -6.55886811411731 \cdot 10^{-12}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y.re \leq 6.7812108043543535 \cdot 10^{-49}:\\ \;\;\;\;\sqrt[3]{{t_0}^{3}}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 11
Error33.9
Cost19912
\[\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 -6.55886811411731 \cdot 10^{-12}:\\ \;\;\;\;t_1 \cdot {x.im}^{y.re}\\ \mathbf{elif}\;y.re \leq 0.0005686835782020167:\\ \;\;\;\;\sqrt[3]{{t_0}^{3}}\\ \mathbf{else}:\\ \;\;\;\;t_1 \cdot {x.re}^{y.re}\\ \end{array} \]
Alternative 12
Error34.0
Cost19912
\[\begin{array}{l} t_0 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\ \mathbf{if}\;x.re \leq -6 \cdot 10^{-24}:\\ \;\;\;\;t_0 \cdot {\left(-x.re\right)}^{y.re}\\ \mathbf{elif}\;x.re \leq 1:\\ \;\;\;\;t_0 \cdot {x.im}^{y.re}\\ \mathbf{else}:\\ \;\;\;\;t_0 \cdot {x.re}^{y.re}\\ \end{array} \]
Alternative 13
Error42.1
Cost19848
\[\begin{array}{l} t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\ t_1 := e^{\mathsf{log1p}\left(t_0\right)} + -1\\ \mathbf{if}\;y.im \leq -4.2 \cdot 10^{+52}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y.im \leq 3.622113538289586 \cdot 10^{-5}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 14
Error46.5
Cost19784
\[\begin{array}{l} t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\ t_1 := \sqrt{{t_0}^{2}}\\ \mathbf{if}\;y.im \leq -6.2 \cdot 10^{+18}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y.im \leq 1.8525839484859087 \cdot 10^{-27}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 15
Error45.0
Cost19784
\[\begin{array}{l} t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\ t_1 := \sqrt[3]{{t_0}^{3}}\\ \mathbf{if}\;y.im \leq -4.2 \cdot 10^{+52}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y.im \leq 3.622113538289586 \cdot 10^{-5}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 16
Error50.9
Cost6656
\[y.re \cdot \tan^{-1}_* \frac{x.im}{x.re} \]

Error

Reproduce

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