powComplex, imaginary part

?

Percentage Accurate: 39.5% → 79.1%
Time: 31.5s
Precision: binary64
Cost: 71552

?

\[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^{t_0 \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(\mathsf{fma}\left(t_0, y.im, {\left(\sqrt[3]{y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}}\right)}^{3}\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 (- (* t_0 y.re) (* (atan2 x.im x.re) y.im)))
    (sin (fma t_0 y.im (pow (cbrt (* y.re (atan2 x.im x.re))) 3.0))))))
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(((t_0 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin(fma(t_0, y_46_im, pow(cbrt((y_46_re * atan2(x_46_im, x_46_re))), 3.0)));
}
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(Float64(Float64(t_0 * y_46_re) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * sin(fma(t_0, y_46_im, (cbrt(Float64(y_46_re * atan(x_46_im, x_46_re))) ^ 3.0))))
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[(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[(t$95$0 * y$46$im + N[Power[N[Power[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision], 3.0], $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^{t_0 \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(\mathsf{fma}\left(t_0, y.im, {\left(\sqrt[3]{y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}}\right)}^{3}\right)\right)
\end{array}

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.

Herbie found 19 alternatives:

AlternativeAccuracySpeedup

Accuracy vs Speed

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.

Bogosity?

Bogosity

Derivation?

  1. Initial program 32.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. Simplified78.1%

    \[\leadsto \color{blue}{e^{\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.re - \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)} \]
    Step-by-step derivation

    [Start]32.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) \]
  3. Applied egg-rr82.2%

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

    [Start]78.1%

    \[ e^{\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.re - \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) \]

    *-commutative [<=]78.1%

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

    add-cube-cbrt [=>]82.6%

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

    pow3 [=>]82.2%

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

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

Alternatives

Alternative 1
Accuracy79.1%
Cost71552
\[\begin{array}{l} t_0 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\ e^{t_0 \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(\mathsf{fma}\left(t_0, y.im, {\left(\sqrt[3]{y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}}\right)}^{3}\right)\right) \end{array} \]
Alternative 2
Accuracy78.9%
Cost118212
\[\begin{array}{l} t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\ t_1 := \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)\\ t_2 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\ t_3 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\ t_4 := e^{t_2 \cdot y.re - t_3}\\ t_5 := \sin \left(\mathsf{fma}\left(t_2, y.im, t_0\right)\right)\\ \mathbf{if}\;e^{y.re \cdot t_1 - t_3} \cdot \sin \left(y.im \cdot t_1 + t_0\right) \leq -\infty:\\ \;\;\;\;t_4 \cdot \left|t_5\right|\\ \mathbf{else}:\\ \;\;\;\;t_4 \cdot t_5\\ \end{array} \]
Alternative 3
Accuracy79.2%
Cost58688
\[\begin{array}{l} t_0 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\ e^{t_0 \cdot y.re - \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} \]
Alternative 4
Accuracy75.1%
Cost52292
\[\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)\\ \mathbf{if}\;y.re \leq -5.6 \cdot 10^{-17}:\\ \;\;\;\;e^{t_2 \cdot y.re - t_0} \cdot {\left(\sqrt[3]{\sin t_1}\right)}^{3}\\ \mathbf{elif}\;y.re \leq 3.15 \cdot 10^{-24}:\\ \;\;\;\;\sin \left(\mathsf{fma}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}, t_2 \cdot y.im\right)\right) \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\ \mathbf{else}:\\ \;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - t_0} \cdot \sin \left(\left|t_1\right|\right)\\ \end{array} \]
Alternative 5
Accuracy72.9%
Cost46544
\[\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 := t_0 \cdot \sin \left(\left|t_1\right|\right)\\ \mathbf{if}\;y.re \leq -5 \cdot 10^{+18}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y.re \leq 5.8 \cdot 10^{+27}:\\ \;\;\;\;\sin \left(\mathsf{fma}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}, \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im\right)\right) \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\ \mathbf{elif}\;y.re \leq 6.6 \cdot 10^{+69}:\\ \;\;\;\;t_0 \cdot \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\ \mathbf{elif}\;y.re \leq 9.8 \cdot 10^{+191}:\\ \;\;\;\;\sin t_1 \cdot {x.re}^{y.re}\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 6
Accuracy73.8%
Cost46148
\[\begin{array}{l} t_0 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\ 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}\\ \mathbf{if}\;y.re \leq -0.8:\\ \;\;\;\;t_1 \cdot \left|t_0\right|\\ \mathbf{elif}\;y.re \leq 5.8 \cdot 10^{+27}:\\ \;\;\;\;\sin \left(\mathsf{fma}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}, \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im\right)\right) \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\ \mathbf{elif}\;y.re \leq 3.3 \cdot 10^{+65} \lor \neg \left(y.re \leq 1.25 \cdot 10^{+196}\right):\\ \;\;\;\;t_1 \cdot \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t_0 \cdot {x.re}^{y.re}\\ \end{array} \]
Alternative 7
Accuracy73.2%
Cost45896
\[\begin{array}{l} t_0 := \sin \left(\mathsf{fma}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}, \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im\right)\right)\\ \mathbf{if}\;y.re \leq -4 \cdot 10^{-16}:\\ \;\;\;\;t_0 \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\ \mathbf{elif}\;y.re \leq 6 \cdot 10^{+27}:\\ \;\;\;\;t_0 \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\ \mathbf{elif}\;y.re \leq 4.8 \cdot 10^{+67} \lor \neg \left(y.re \leq 4.9 \cdot 10^{+191}\right):\\ \;\;\;\;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.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {x.re}^{y.re}\\ \end{array} \]
Alternative 8
Accuracy72.1%
Cost45768
\[\begin{array}{l} t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\ \mathbf{if}\;y.im \leq -1.75 \cdot 10^{+92}:\\ \;\;\;\;t_0 \cdot {\left(e^{-y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}\\ \mathbf{elif}\;y.im \leq 8.5 \cdot 10^{-13}:\\ \;\;\;\;\sin \left(\mathsf{fma}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}, \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im\right)\right) \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\ \mathbf{elif}\;y.im \leq 4.7 \cdot 10^{+45}:\\ \;\;\;\;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.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t_0 \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\ \end{array} \]
Alternative 9
Accuracy62.4%
Cost40344
\[\begin{array}{l} t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\ t_1 := e^{y.re \cdot \log x.re - t_0}\\ t_2 := e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - t_0}\\ t_3 := y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\ t_4 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\ t_5 := e^{y.re \cdot \log \left(-x.re\right) - t_0}\\ t_6 := t_3 \cdot t_5\\ \mathbf{if}\;x.re \leq -2.8 \cdot 10^{+47}:\\ \;\;\;\;t_6\\ \mathbf{elif}\;x.re \leq -290000000000:\\ \;\;\;\;t_4 \cdot t_5\\ \mathbf{elif}\;x.re \leq -1.9 \cdot 10^{-12}:\\ \;\;\;\;t_6\\ \mathbf{elif}\;x.re \leq 2.05 \cdot 10^{-98}:\\ \;\;\;\;t_2 \cdot t_3\\ \mathbf{elif}\;x.re \leq 6 \cdot 10^{-56}:\\ \;\;\;\;\left|t_4\right| \cdot t_1\\ \mathbf{elif}\;x.re \leq 4.5:\\ \;\;\;\;t_2 \cdot \sin \left(y.im \cdot \log x.re\right)\\ \mathbf{elif}\;x.re \leq 7 \cdot 10^{+136}:\\ \;\;\;\;t_4 \cdot t_1\\ \mathbf{else}:\\ \;\;\;\;t_3 \cdot t_1\\ \end{array} \]
Alternative 10
Accuracy59.6%
Cost40212
\[\begin{array}{l} t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\ t_1 := y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\ t_2 := t_1 \cdot e^{y.re \cdot \log \left(-x.im\right) - t_0}\\ t_3 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\ t_4 := e^{y.re \cdot \log x.im - t_0}\\ \mathbf{if}\;x.im \leq -2.5 \cdot 10^{-49}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x.im \leq -2.02 \cdot 10^{-224}:\\ \;\;\;\;t_3 \cdot e^{y.re \cdot \log \left(\frac{\left(x.re \cdot x.re\right) \cdot -0.5}{x.im} - x.im\right) - t_0}\\ \mathbf{elif}\;x.im \leq -4 \cdot 10^{-310}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x.im \leq 5.4 \cdot 10^{-160}:\\ \;\;\;\;t_1 \cdot t_4\\ \mathbf{elif}\;x.im \leq 2.2 \cdot 10^{-6}:\\ \;\;\;\;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 x.im\right)\\ \mathbf{else}:\\ \;\;\;\;t_3 \cdot t_4\\ \end{array} \]
Alternative 11
Accuracy60.0%
Cost39892
\[\begin{array}{l} t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\ t_1 := e^{y.re \cdot \log x.re - t_0}\\ t_2 := y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\ t_3 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\ t_4 := e^{y.re \cdot \log \left(-x.re\right) - t_0}\\ t_5 := t_2 \cdot t_4\\ \mathbf{if}\;x.re \leq -9.5 \cdot 10^{+46}:\\ \;\;\;\;t_5\\ \mathbf{elif}\;x.re \leq -3.7 \cdot 10^{-81}:\\ \;\;\;\;t_3 \cdot t_4\\ \mathbf{elif}\;x.re \leq -2 \cdot 10^{-310}:\\ \;\;\;\;t_5\\ \mathbf{elif}\;x.re \leq 2.05 \cdot 10^{-125}:\\ \;\;\;\;t_2 \cdot e^{y.re \cdot \log \left(x.re + 0.5 \cdot \frac{x.im \cdot x.im}{x.re}\right) - t_0}\\ \mathbf{elif}\;x.re \leq 2.65 \cdot 10^{-56}:\\ \;\;\;\;\left|t_3\right| \cdot t_1\\ \mathbf{elif}\;x.re \leq 2.65:\\ \;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - t_0} \cdot \left(y.im \cdot \log x.re\right)\\ \mathbf{elif}\;x.re \leq 7.5 \cdot 10^{+136}:\\ \;\;\;\;t_3 \cdot t_1\\ \mathbf{else}:\\ \;\;\;\;t_2 \cdot t_1\\ \end{array} \]
Alternative 12
Accuracy59.3%
Cost33812
\[\begin{array}{l} t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\ t_1 := y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\ t_2 := t_1 \cdot e^{y.re \cdot \log \left(-x.im\right) - t_0}\\ t_3 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\ t_4 := e^{y.re \cdot \log x.im - t_0}\\ \mathbf{if}\;x.im \leq -3.4 \cdot 10^{-49}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x.im \leq -1.5 \cdot 10^{-226}:\\ \;\;\;\;t_3 \cdot e^{y.re \cdot \log \left(\frac{\left(x.re \cdot x.re\right) \cdot -0.5}{x.im} - x.im\right) - t_0}\\ \mathbf{elif}\;x.im \leq -4 \cdot 10^{-310}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x.im \leq 6.6 \cdot 10^{-110}:\\ \;\;\;\;t_1 \cdot t_4\\ \mathbf{elif}\;x.im \leq 1.65 \cdot 10^{-6}:\\ \;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - t_0} \cdot \left(y.im \cdot \log x.im\right)\\ \mathbf{else}:\\ \;\;\;\;t_3 \cdot t_4\\ \end{array} \]
Alternative 13
Accuracy58.8%
Cost33548
\[\begin{array}{l} t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\ t_1 := y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\ t_2 := e^{y.re \cdot \log x.im - t_0}\\ \mathbf{if}\;x.im \leq -4 \cdot 10^{-310}:\\ \;\;\;\;t_1 \cdot e^{y.re \cdot \log \left(-x.im\right) - t_0}\\ \mathbf{elif}\;x.im \leq 6.2 \cdot 10^{-109}:\\ \;\;\;\;t_1 \cdot t_2\\ \mathbf{elif}\;x.im \leq 1.12 \cdot 10^{-14}:\\ \;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - t_0} \cdot \left(y.im \cdot \log x.im\right)\\ \mathbf{else}:\\ \;\;\;\;\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot t_2\\ \end{array} \]
Alternative 14
Accuracy54.4%
Cost33228
\[\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 := t_1 \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\ \mathbf{if}\;y.re \leq -5.2 \cdot 10^{+18}:\\ \;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - t_0} \cdot 0\\ \mathbf{elif}\;y.re \leq -3.5 \cdot 10^{-268}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y.re \leq 2.7 \cdot 10^{-307}:\\ \;\;\;\;\left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \cdot e^{y.re \cdot \log x.im - t_0}\\ \mathbf{elif}\;y.re \leq 10^{+28}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;\sin t_1 \cdot {x.re}^{y.re}\\ \end{array} \]
Alternative 15
Accuracy57.6%
Cost33096
\[\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.im \leq -1.42 \cdot 10^{-145}:\\ \;\;\;\;\sin t_1 \cdot e^{y.re \cdot \log \left(-x.im\right) - t_0}\\ \mathbf{elif}\;x.im \leq -4 \cdot 10^{-310}:\\ \;\;\;\;t_1 \cdot {\left(e^{-y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}\\ \mathbf{else}:\\ \;\;\;\;\left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \cdot e^{y.re \cdot \log x.im - t_0}\\ \end{array} \]
Alternative 16
Accuracy59.7%
Cost33028
\[\begin{array}{l} t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\ t_1 := y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\ \mathbf{if}\;x.im \leq -4 \cdot 10^{-310}:\\ \;\;\;\;t_1 \cdot e^{y.re \cdot \log \left(-x.im\right) - t_0}\\ \mathbf{else}:\\ \;\;\;\;t_1 \cdot e^{y.re \cdot \log x.im - t_0}\\ \end{array} \]
Alternative 17
Accuracy54.4%
Cost26756
\[\begin{array}{l} t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\ \mathbf{if}\;y.re \leq -5 \cdot 10^{+18}:\\ \;\;\;\;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 0\\ \mathbf{elif}\;y.re \leq 1.6 \cdot 10^{+29}:\\ \;\;\;\;t_0 \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\ \mathbf{else}:\\ \;\;\;\;\sin t_0 \cdot {x.re}^{y.re}\\ \end{array} \]
Alternative 18
Accuracy51.7%
Cost20105
\[\begin{array}{l} t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\ \mathbf{if}\;y.re \leq -9 \cdot 10^{+18} \lor \neg \left(y.re \leq 7.4 \cdot 10^{+27}\right):\\ \;\;\;\;\sin t_0 \cdot {x.re}^{y.re}\\ \mathbf{else}:\\ \;\;\;\;t_0 \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\ \end{array} \]
Alternative 19
Accuracy30.9%
Cost19648
\[\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {x.re}^{y.re} \]

Reproduce?

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