Average Error: 33.7 → 3.7
Time: 42.6s
Precision: binary64
Cost: 65024
\[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 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\ e^{\mathsf{fma}\left(-y.im, \tan^{-1}_* \frac{x.im}{x.re}, t_0 \cdot y.re\right)} \cdot \sin \left(\mathsf{fma}\left(\tan^{-1}_* \frac{x.im}{x.re}, y.re, t_0 \cdot y.im\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 (log (hypot x.re x.im))))
   (*
    (exp (fma (- y.im) (atan2 x.im x.re) (* t_0 y.re)))
    (sin (fma (atan2 x.im x.re) y.re (* t_0 y.im))))))
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 = log(hypot(x_46_re, x_46_im));
	return exp(fma(-y_46_im, atan2(x_46_im, x_46_re), (t_0 * y_46_re))) * sin(fma(atan2(x_46_im, x_46_re), y_46_re, (t_0 * y_46_im)));
}
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 = log(hypot(x_46_re, x_46_im))
	return Float64(exp(fma(Float64(-y_46_im), atan(x_46_im, x_46_re), Float64(t_0 * y_46_re))) * sin(fma(atan(x_46_im, x_46_re), y_46_re, Float64(t_0 * y_46_im))))
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[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, N[(N[Exp[N[((-y$46$im) * N[ArcTan[x$46$im / x$46$re], $MachinePrecision] + N[(t$95$0 * y$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re + N[(t$95$0 * y$46$im), $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 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
e^{\mathsf{fma}\left(-y.im, \tan^{-1}_* \frac{x.im}{x.re}, t_0 \cdot y.re\right)} \cdot \sin \left(\mathsf{fma}\left(\tan^{-1}_* \frac{x.im}{x.re}, y.re, t_0 \cdot y.im\right)\right)
\end{array}

Error

Derivation

  1. Initial program 33.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. Simplified3.7

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

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

Alternatives

Alternative 1
Error10.2
Cost65160
\[\begin{array}{l} t_0 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\ t_1 := e^{\mathsf{fma}\left(-y.im, \tan^{-1}_* \frac{x.im}{x.re}, t_0 \cdot y.re\right)}\\ \mathbf{if}\;x.im \leq -2.4 \cdot 10^{-188}:\\ \;\;\;\;t_1 \cdot \sin \left(\left(-\log \left(\frac{-1}{x.im}\right) \cdot y.im\right) + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\ \mathbf{elif}\;x.im \leq 7.6 \cdot 10^{-153}:\\ \;\;\;\;t_1 \cdot \sin \left({\left(\sqrt[3]{y.im \cdot t_0}\right)}^{3}\right)\\ \mathbf{else}:\\ \;\;\;\;t_1 \cdot \sin \left(\mathsf{fma}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}, -\log \left(\frac{1}{x.im}\right) \cdot y.im\right)\right)\\ \end{array} \]
Alternative 2
Error3.7
Cost65024
\[\begin{array}{l} t_0 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\ e^{\mathsf{fma}\left(-y.im, \tan^{-1}_* \frac{x.im}{x.re}, t_0 \cdot y.re\right)} \cdot \sin \left(\mathsf{fma}\left(t_0, y.im, \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\right) \end{array} \]
Alternative 3
Error10.1
Cost59016
\[\begin{array}{l} t_0 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\ t_1 := e^{\mathsf{fma}\left(-y.im, \tan^{-1}_* \frac{x.im}{x.re}, t_0 \cdot y.re\right)}\\ \mathbf{if}\;x.im \leq -1 \cdot 10^{-181}:\\ \;\;\;\;t_1 \cdot \sin \left(\left(-\log \left(\frac{-1}{x.im}\right) \cdot y.im\right) + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\ \mathbf{elif}\;x.im \leq 7.3 \cdot 10^{-153}:\\ \;\;\;\;t_1 \cdot \sin \left(y.im \cdot t_0\right)\\ \mathbf{else}:\\ \;\;\;\;t_1 \cdot \sin \left(\mathsf{fma}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}, -\log \left(\frac{1}{x.im}\right) \cdot y.im\right)\right)\\ \end{array} \]
Alternative 4
Error10.9
Cost52948
\[\begin{array}{l} t_0 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\ t_1 := e^{\mathsf{fma}\left(-y.im, \tan^{-1}_* \frac{x.im}{x.re}, t_0 \cdot y.re\right)}\\ t_2 := t_1 \cdot \sin \left(y.im \cdot t_0\right)\\ t_3 := e^{\log \left(-x.re\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(\mathsf{fma}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}, t_0 \cdot y.im\right)\right)\\ t_4 := t_1 \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\ \mathbf{if}\;x.re \leq -2250000:\\ \;\;\;\;t_3\\ \mathbf{elif}\;x.re \leq -2.3 \cdot 10^{-58}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x.re \leq -2.3 \cdot 10^{-167}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;x.re \leq -8.2 \cdot 10^{-206}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;x.re \leq -1.5 \cdot 10^{-243}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;x.re \leq 2.15 \cdot 10^{-35}:\\ \;\;\;\;t_4\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 5
Error10.1
Cost52808
\[\begin{array}{l} t_0 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\ t_1 := e^{\mathsf{fma}\left(-y.im, \tan^{-1}_* \frac{x.im}{x.re}, t_0 \cdot y.re\right)}\\ t_2 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\ \mathbf{if}\;x.im \leq -1 \cdot 10^{-181}:\\ \;\;\;\;t_1 \cdot \sin \left(\left(-\log \left(\frac{-1}{x.im}\right) \cdot y.im\right) + t_2\right)\\ \mathbf{elif}\;x.im \leq 6.6 \cdot 10^{-153}:\\ \;\;\;\;t_1 \cdot \sin \left(y.im \cdot t_0\right)\\ \mathbf{else}:\\ \;\;\;\;t_1 \cdot \sin \left(t_2 + -1 \cdot \left(\log \left(\frac{1}{x.im}\right) \cdot y.im\right)\right)\\ \end{array} \]
Alternative 6
Error9.0
Cost52548
\[\begin{array}{l} t_0 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\ \mathbf{if}\;x.re \leq -1 \cdot 10^{-310}:\\ \;\;\;\;e^{\log \left(-x.re\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(\mathsf{fma}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}, t_0 \cdot y.im\right)\right)\\ \mathbf{else}:\\ \;\;\;\;e^{\mathsf{fma}\left(-y.im, \tan^{-1}_* \frac{x.im}{x.re}, t_0 \cdot y.re\right)} \cdot \sin \left(\left(-\left(-y.im\right) \cdot \log x.re\right) + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\ \end{array} \]
Alternative 7
Error11.3
Cost52296
\[\begin{array}{l} t_0 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\ t_1 := e^{\mathsf{fma}\left(-y.im, \tan^{-1}_* \frac{x.im}{x.re}, t_0 \cdot y.re\right)}\\ t_2 := t_1 \cdot \sin \left(y.im \cdot t_0\right)\\ \mathbf{if}\;y.im \leq -2.8 \cdot 10^{-154}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y.im \leq 2 \cdot 10^{-129}:\\ \;\;\;\;t_1 \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 8
Error12.0
Cost46160
\[\begin{array}{l} t_0 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\ t_1 := t_0 \cdot y.re\\ t_2 := e^{t_1} \cdot \sin \left(y.im \cdot t_0\right)\\ t_3 := e^{\mathsf{fma}\left(-y.im, \tan^{-1}_* \frac{x.im}{x.re}, t_1\right)}\\ t_4 := t_3 \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\ \mathbf{if}\;y.im \leq -1050000:\\ \;\;\;\;t_3 \cdot y.im\\ \mathbf{elif}\;y.im \leq -4.3 \cdot 10^{-154}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y.im \leq 1.45 \cdot 10^{-129}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;y.im \leq 225000000:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t_4\\ \end{array} \]
Alternative 9
Error16.0
Cost39756
\[\begin{array}{l} t_0 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\ t_1 := t_0 \cdot y.re\\ t_2 := e^{t_1} \cdot \sin \left(y.im \cdot t_0\right)\\ t_3 := e^{\mathsf{fma}\left(-y.im, \tan^{-1}_* \frac{x.im}{x.re}, t_1\right)} \cdot y.im\\ \mathbf{if}\;y.im \leq -1050000:\\ \;\;\;\;t_3\\ \mathbf{elif}\;y.im \leq -1.04 \cdot 10^{-218}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y.im \leq 9 \cdot 10^{-162}:\\ \;\;\;\;e^{\log \left(\sqrt{x.im \cdot x.im}\right) \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)\\ \mathbf{elif}\;y.im \leq 205000000:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \end{array} \]
Alternative 10
Error17.9
Cost39636
\[\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 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\ t_3 := t_0 \cdot y.re\\ t_4 := e^{t_3} \cdot \sin \left(y.im \cdot t_0\right)\\ t_5 := e^{\mathsf{fma}\left(-y.im, \tan^{-1}_* \frac{x.im}{x.re}, t_3\right)} \cdot y.im\\ \mathbf{if}\;y.im \leq -1050000:\\ \;\;\;\;t_5\\ \mathbf{elif}\;y.im \leq -4.9 \cdot 10^{-216}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;y.im \leq 1.7 \cdot 10^{-270}:\\ \;\;\;\;e^{\log x.im \cdot y.re - t_1} \cdot t_2\\ \mathbf{elif}\;y.im \leq 9 \cdot 10^{-162}:\\ \;\;\;\;e^{\log \left(-x.im\right) \cdot y.re - t_1} \cdot t_2\\ \mathbf{elif}\;y.im \leq 205000000:\\ \;\;\;\;t_4\\ \mathbf{else}:\\ \;\;\;\;t_5\\ \end{array} \]
Alternative 11
Error14.5
Cost33360
\[\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 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\ \mathbf{if}\;y.re \leq -5.6 \cdot 10^{-9}:\\ \;\;\;\;e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - t_0} \cdot y.re\\ \mathbf{elif}\;y.re \leq 3.1 \cdot 10^{-52}:\\ \;\;\;\;e^{\left(-y.im\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \sin \left(y.im \cdot t_2\right)\\ \mathbf{elif}\;y.re \leq 9.5 \cdot 10^{-6}:\\ \;\;\;\;e^{\log \left(-x.im\right) \cdot y.re - t_0} \cdot t_1\\ \mathbf{elif}\;y.re \leq 7700000000:\\ \;\;\;\;e^{\log x.im \cdot y.re - t_0} \cdot t_1\\ \mathbf{else}:\\ \;\;\;\;e^{\mathsf{fma}\left(-y.im, \tan^{-1}_* \frac{x.im}{x.re}, t_2 \cdot y.re\right)} \cdot y.im\\ \end{array} \]
Alternative 12
Error15.3
Cost32904
\[\begin{array}{l} t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\ \mathbf{if}\;y.re \leq -9.5 \cdot 10^{-11}:\\ \;\;\;\;e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - t_0} \cdot y.re\\ \mathbf{elif}\;y.re \leq 8 \cdot 10^{+63}:\\ \;\;\;\;e^{\left(-y.im\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;e^{\log \left(\sqrt{x.im \cdot x.im}\right) \cdot y.re - t_0} \cdot y.re\\ \end{array} \]
Alternative 13
Error15.4
Cost32904
\[\begin{array}{l} t_0 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\ \mathbf{if}\;y.re \leq -1.45 \cdot 10^{-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 y.re\\ \mathbf{elif}\;y.re \leq 1.15 \cdot 10^{-107}:\\ \;\;\;\;e^{\left(-y.im\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \sin \left(y.im \cdot t_0\right)\\ \mathbf{else}:\\ \;\;\;\;e^{\mathsf{fma}\left(-y.im, \tan^{-1}_* \frac{x.im}{x.re}, t_0 \cdot y.re\right)} \cdot y.im\\ \end{array} \]
Alternative 14
Error28.5
Cost26756
\[\begin{array}{l} t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\ \mathbf{if}\;y.re \leq -0.165:\\ \;\;\;\;e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - t_0} \cdot y.re\\ \mathbf{elif}\;y.re \leq 2.2 \cdot 10^{+71}:\\ \;\;\;\;e^{\left(-\tan^{-1}_* \frac{x.im}{x.re}\right) \cdot y.im} \cdot y.re\\ \mathbf{else}:\\ \;\;\;\;e^{\log \left(\sqrt{x.im \cdot x.im}\right) \cdot y.re - t_0} \cdot y.re\\ \end{array} \]
Alternative 15
Error29.3
Cost26632
\[\begin{array}{l} \mathbf{if}\;y.re \leq -3.9 \cdot 10^{-28}:\\ \;\;\;\;{\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re} \cdot y.im\\ \mathbf{elif}\;y.re \leq 10^{+66}:\\ \;\;\;\;e^{\left(-\tan^{-1}_* \frac{x.im}{x.re}\right) \cdot y.im} \cdot y.re\\ \mathbf{else}:\\ \;\;\;\;e^{\log \left(\sqrt{x.im \cdot x.im}\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot y.re\\ \end{array} \]
Alternative 16
Error29.9
Cost26244
\[\begin{array}{l} \mathbf{if}\;y.re \leq -3.9 \cdot 10^{-28}:\\ \;\;\;\;{\left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right)}^{y.re} \cdot y.im\\ \mathbf{elif}\;y.re \leq 2.6 \cdot 10^{+76}:\\ \;\;\;\;e^{\left(-\tan^{-1}_* \frac{x.im}{x.re}\right) \cdot y.im} \cdot y.re\\ \mathbf{else}:\\ \;\;\;\;{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re} \cdot y.im\\ \end{array} \]
Alternative 17
Error29.2
Cost13512
\[\begin{array}{l} t_0 := {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re} \cdot y.im\\ \mathbf{if}\;y.re \leq -1.4:\\ \;\;\;\;t_0\\ \mathbf{elif}\;y.re \leq 2.25 \cdot 10^{+70}:\\ \;\;\;\;e^{\left(-y.im\right) \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot y.im\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 18
Error29.6
Cost13512
\[\begin{array}{l} t_0 := {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re} \cdot y.im\\ \mathbf{if}\;y.re \leq -1.2:\\ \;\;\;\;t_0\\ \mathbf{elif}\;y.re \leq 1.9 \cdot 10^{+67}:\\ \;\;\;\;e^{\left(-\tan^{-1}_* \frac{x.im}{x.re}\right) \cdot y.im} \cdot y.re\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 19
Error39.6
Cost13120
\[{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re} \cdot y.im \]

Error

Reproduce

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