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

\mathbf{elif}\;y.re \leq 7.427069807412213 \cdot 10^{-5}:\\
\;\;\;\;\frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{e^{{\left(\sqrt[3]{t_0}\right)}^{3}}} \cdot \sin \left(\mathsf{fma}\left(t_1, y.im, t_2\right)\right)\\

\mathbf{else}:\\
\;\;\;\;t_3 \cdot \sin \left(t_2 + y.im \cdot \log \left({\left(e^{\sqrt[3]{{t_1}^{2}}}\right)}^{\left(\sqrt[3]{t_1}\right)}\right)\right)\\


\end{array}

Error

Derivation

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

    1. Initial program 35.1

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

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

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

    if -4.90000000000000029e24 < y.re < 7.42706980741221267e-5

    1. Initial program 34.8

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

      \[\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))))): 57 points increase in error, 4 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))))): 0 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))))): 3 points increase in error, 6 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, 14 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))))): 79 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))))): 1 points increase in error, 0 points decrease in error
    3. Taylor expanded in x.im around 0 5.2

      \[\leadsto \frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{\color{blue}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot 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-rr5.2

      \[\leadsto \frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{e^{\color{blue}{{\left(\sqrt[3]{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\right)}^{3}}}} \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) \]

    if 7.42706980741221267e-5 < y.re

    1. Initial program 20.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. Applied egg-rr9.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 \sin \left(\log \color{blue}{\left({\left(e^{\sqrt[3]{{\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{2}}}\right)}^{\left(\sqrt[3]{\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)}\right)}\right)} \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \]
  3. Recombined 3 regimes into one program.
  4. Final simplification4.6

    \[\leadsto \begin{array}{l} \mathbf{if}\;y.re \leq -4.9 \cdot 10^{+24}:\\ \;\;\;\;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 7.427069807412213 \cdot 10^{-5}:\\ \;\;\;\;\frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{e^{{\left(\sqrt[3]{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\right)}^{3}}} \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 \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re} + y.im \cdot \log \left({\left(e^{\sqrt[3]{{\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{2}}}\right)}^{\left(\sqrt[3]{\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)}\right)}\right)\right)\\ \end{array} \]

Alternatives

Alternative 1
Error4.7
Cost71752
\[\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} \cdot t_1\\ \mathbf{if}\;y.re \leq -4.9 \cdot 10^{+24}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y.re \leq 7.427069807412213 \cdot 10^{-5}:\\ \;\;\;\;\frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{e^{{\left(\sqrt[3]{t_0}\right)}^{3}}} \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_2\\ \end{array} \]
Alternative 2
Error4.7
Cost58888
\[\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} \cdot t_1\\ \mathbf{if}\;y.re \leq -4.9 \cdot 10^{+24}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y.re \leq 7.427069807412213 \cdot 10^{-5}:\\ \;\;\;\;\sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, t_1\right)\right) \cdot \frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{e^{t_0}}\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 3
Error15.6
Cost45964
\[\begin{array}{l} t_0 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\ t_1 := {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\\ t_2 := t_1 \cdot \mathsf{expm1}\left(\mathsf{log1p}\left(\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\right)\right)\\ \mathbf{if}\;y.im \leq -1350000:\\ \;\;\;\;e^{y.re \cdot \log \left(-x.im\right) - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot t_0\\ \mathbf{elif}\;y.im \leq -2.8196458074219823 \cdot 10^{-159}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y.im \leq 1.231468254992672 \cdot 10^{-204}:\\ \;\;\;\;t_0 \cdot \frac{t_1}{{\left(e^{\tan^{-1}_* \frac{x.im}{x.re}}\right)}^{y.im}}\\ \mathbf{elif}\;y.im \leq 8.5 \cdot 10^{+35}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t_1 \cdot \mathsf{expm1}\left(\log \left(t_0 + 1\right)\right)\\ \end{array} \]
Alternative 4
Error14.5
Cost45964
\[\begin{array}{l} t_0 := {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\\ t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\ t_2 := \sin t_1\\ t_3 := \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\ \mathbf{if}\;y.im \leq -1 \cdot 10^{+140}:\\ \;\;\;\;t_1 \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\ \mathbf{elif}\;y.im \leq -2.8196458074219823 \cdot 10^{-159}:\\ \;\;\;\;\frac{t_0}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}} \cdot t_3\\ \mathbf{elif}\;y.im \leq 1.231468254992672 \cdot 10^{-204}:\\ \;\;\;\;t_2 \cdot \frac{t_0}{{\left(e^{\tan^{-1}_* \frac{x.im}{x.re}}\right)}^{y.im}}\\ \mathbf{elif}\;y.im \leq 8.5 \cdot 10^{+35}:\\ \;\;\;\;t_0 \cdot \mathsf{expm1}\left(\mathsf{log1p}\left(t_3\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t_0 \cdot \mathsf{expm1}\left(\log \left(t_2 + 1\right)\right)\\ \end{array} \]
Alternative 5
Error18.4
Cost45840
\[\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 := {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\\ t_4 := t_3 \cdot \mathsf{expm1}\left(\mathsf{log1p}\left(\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\right)\right)\\ \mathbf{if}\;y.im \leq -1350000:\\ \;\;\;\;e^{y.re \cdot \log \left(-x.im\right) - t_0} \cdot t_2\\ \mathbf{elif}\;y.im \leq -2.8196458074219823 \cdot 10^{-159}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;y.im \leq 1.1876363292267826 \cdot 10^{-212}:\\ \;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - t_0} \cdot t_1\\ \mathbf{elif}\;y.im \leq 8.5 \cdot 10^{+35}:\\ \;\;\;\;t_4\\ \mathbf{else}:\\ \;\;\;\;t_3 \cdot \mathsf{expm1}\left(\log \left(t_2 + 1\right)\right)\\ \end{array} \]
Alternative 6
Error8.3
Cost45768
\[\begin{array}{l} t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\ t_1 := \sin t_0\\ t_2 := {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\\ \mathbf{if}\;y.im \leq -1350000:\\ \;\;\;\;e^{y.re \cdot \log \left(-x.im\right) - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot t_1\\ \mathbf{elif}\;y.im \leq 8.5 \cdot 10^{+35}:\\ \;\;\;\;t_2 \cdot \sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, t_0\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t_2 \cdot \mathsf{expm1}\left(\log \left(t_1 + 1\right)\right)\\ \end{array} \]
Alternative 7
Error20.4
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.re \leq -7800:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y.re \leq 7.427069807412213 \cdot 10^{-5}:\\ \;\;\;\;t_0 \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 8
Error23.3
Cost33028
\[\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)\\ \mathbf{if}\;x.re \leq 0:\\ \;\;\;\;t_1 \cdot e^{y.re \cdot \log \left(-x.re\right) - t_0}\\ \mathbf{else}:\\ \;\;\;\;t_1 \cdot e^{y.re \cdot \log x.re - t_0}\\ \end{array} \]
Alternative 9
Error24.4
Cost33028
\[\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\\ \mathbf{if}\;x.im \leq 0:\\ \;\;\;\;e^{y.re \cdot \log \left(-x.im\right) - t_1} \cdot \sin t_0\\ \mathbf{else}:\\ \;\;\;\;t_0 \cdot e^{y.re \cdot \log x.im - t_1}\\ \end{array} \]
Alternative 10
Error27.4
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 -3900000000000:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y.re \leq 80000000000:\\ \;\;\;\;t_0 \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 11
Error42.4
Cost13248
\[\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {x.im}^{y.re} \]

Error

Reproduce

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