powComplex, imaginary part

?

Percentage Accurate: 40.0% → 80.5%
Time: 34.1s
Precision: binary64
Cost: 84680

?

\[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)\\ t_1 := e^{t_0 \cdot y.re - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\\ t_2 := \mathsf{fma}\left(t_0, y.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\ \mathbf{if}\;y.im \leq -1.8 \cdot 10^{+15}:\\ \;\;\;\;t_1 \cdot \sin \left(\left|\mathsf{fma}\left(\tan^{-1}_* \frac{x.im}{x.re}, y.re, y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\right|\right)\\ \mathbf{elif}\;y.im \leq 6.4 \cdot 10^{+27}:\\ \;\;\;\;t_1 \cdot \sin t_2\\ \mathbf{else}:\\ \;\;\;\;t_1 \cdot \sin \left({\left(\sqrt{{\left(\sqrt[3]{t_2}\right)}^{2}}\right)}^{3}\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)))
        (t_1 (exp (- (* t_0 y.re) (* y.im (atan2 x.im x.re)))))
        (t_2 (fma t_0 y.im (* y.re (atan2 x.im x.re)))))
   (if (<= y.im -1.8e+15)
     (*
      t_1
      (sin
       (fabs (fma (atan2 x.im x.re) y.re (* y.im (log (hypot x.im x.re)))))))
     (if (<= y.im 6.4e+27)
       (* t_1 (sin t_2))
       (* t_1 (sin (pow (sqrt (pow (cbrt t_2) 2.0)) 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));
	double t_1 = exp(((t_0 * y_46_re) - (y_46_im * atan2(x_46_im, x_46_re))));
	double t_2 = fma(t_0, y_46_im, (y_46_re * atan2(x_46_im, x_46_re)));
	double tmp;
	if (y_46_im <= -1.8e+15) {
		tmp = t_1 * sin(fabs(fma(atan2(x_46_im, x_46_re), y_46_re, (y_46_im * log(hypot(x_46_im, x_46_re))))));
	} else if (y_46_im <= 6.4e+27) {
		tmp = t_1 * sin(t_2);
	} else {
		tmp = t_1 * sin(pow(sqrt(pow(cbrt(t_2), 2.0)), 3.0));
	}
	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 = log(hypot(x_46_re, x_46_im))
	t_1 = exp(Float64(Float64(t_0 * y_46_re) - Float64(y_46_im * atan(x_46_im, x_46_re))))
	t_2 = fma(t_0, y_46_im, Float64(y_46_re * atan(x_46_im, x_46_re)))
	tmp = 0.0
	if (y_46_im <= -1.8e+15)
		tmp = Float64(t_1 * sin(abs(fma(atan(x_46_im, x_46_re), y_46_re, Float64(y_46_im * log(hypot(x_46_im, x_46_re)))))));
	elseif (y_46_im <= 6.4e+27)
		tmp = Float64(t_1 * sin(t_2));
	else
		tmp = Float64(t_1 * sin((sqrt((cbrt(t_2) ^ 2.0)) ^ 3.0)));
	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[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[Exp[N[(N[(t$95$0 * y$46$re), $MachinePrecision] - N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(t$95$0 * y$46$im + N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -1.8e+15], N[(t$95$1 * N[Sin[N[Abs[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re + N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 6.4e+27], N[(t$95$1 * N[Sin[t$95$2], $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[Sin[N[Power[N[Sqrt[N[Power[N[Power[t$95$2, 1/3], $MachinePrecision], 2.0], $MachinePrecision]], $MachinePrecision], 3.0], $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)\\
t_1 := e^{t_0 \cdot y.re - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\\
t_2 := \mathsf{fma}\left(t_0, y.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{if}\;y.im \leq -1.8 \cdot 10^{+15}:\\
\;\;\;\;t_1 \cdot \sin \left(\left|\mathsf{fma}\left(\tan^{-1}_* \frac{x.im}{x.re}, y.re, y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\right|\right)\\

\mathbf{elif}\;y.im \leq 6.4 \cdot 10^{+27}:\\
\;\;\;\;t_1 \cdot \sin t_2\\

\mathbf{else}:\\
\;\;\;\;t_1 \cdot \sin \left({\left(\sqrt{{\left(\sqrt[3]{t_2}\right)}^{2}}\right)}^{3}\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 20 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. Split input into 3 regimes
  2. if y.im < -1.8e15

    1. Initial program 26.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. Simplified65.0%

      \[\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]26.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) \]
    3. Applied egg-rr30.4%

      \[\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 \color{blue}{\left(\sqrt{{\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)}^{2}}\right)} \]
      Step-by-step derivation

      [Start]65.0%

      \[ 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) \]

      fma-udef [=>]65.0%

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

      hypot-udef [=>]26.3%

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

      *-commutative [<=]26.3%

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

      add-sqr-sqrt [=>]10.7%

      \[ 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 \color{blue}{\left(\sqrt{\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} \cdot \sqrt{\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)} \]

      sqrt-unprod [=>]13.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 \color{blue}{\left(\sqrt{\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) \cdot \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)}\right)} \]

      pow2 [=>]13.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(\sqrt{\color{blue}{{\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}}}\right) \]

      fma-def [=>]13.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(\sqrt{{\color{blue}{\left(\mathsf{fma}\left(\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right), y.im, \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\right)}}^{2}}\right) \]

      hypot-udef [<=]30.4%

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

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

      [Start]30.4%

      \[ 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(\sqrt{{\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)}^{2}}\right) \]

      unpow2 [=>]30.4%

      \[ 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(\sqrt{\color{blue}{\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) \cdot \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) \]

      rem-sqrt-square [=>]77.9%

      \[ 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 \color{blue}{\left(\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|\right)} \]

      fma-def [<=]77.9%

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

      +-commutative [=>]77.9%

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

      fma-def [=>]77.9%

      \[ 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(\left|\color{blue}{\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|\right) \]

      hypot-def [<=]30.7%

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

      unpow2 [<=]30.7%

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

      unpow2 [<=]30.7%

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

      +-commutative [<=]30.7%

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

      *-commutative [<=]30.7%

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

      unpow2 [=>]30.7%

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

      unpow2 [=>]30.7%

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

      hypot-def [=>]77.9%

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

    if -1.8e15 < y.im < 6.4000000000000003e27

    1. Initial program 52.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. Simplified93.3%

      \[\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]52.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) \]

    if 6.4000000000000003e27 < y.im

    1. Initial program 30.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. Simplified64.6%

      \[\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]30.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) \]
    3. Applied egg-rr71.6%

      \[\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 \color{blue}{\left({\left(\sqrt[3]{\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)}^{3}\right)} \]
      Step-by-step derivation

      [Start]64.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, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]

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

      hypot-udef [=>]30.7%

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

      *-commutative [<=]30.7%

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

      add-cube-cbrt [=>]32.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 \color{blue}{\left(\left(\sqrt[3]{\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} \cdot \sqrt[3]{\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) \cdot \sqrt[3]{\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)} \]

      pow3 [=>]34.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 \color{blue}{\left({\left(\sqrt[3]{\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}\right)} \]

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

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

      fma-udef [<=]71.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({\left(\sqrt[3]{\color{blue}{\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}\right) \]

      *-commutative [<=]71.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({\left(\sqrt[3]{\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)}^{3}\right) \]
    4. Applied egg-rr79.7%

      \[\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({\color{blue}{\left(\sqrt{{\left(\sqrt[3]{\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)}^{2}}\right)}}^{3}\right) \]
      Step-by-step derivation

      [Start]71.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({\left(\sqrt[3]{\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)}^{3}\right) \]

      add-sqr-sqrt [=>]50.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({\color{blue}{\left(\sqrt{\sqrt[3]{\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)}} \cdot \sqrt{\sqrt[3]{\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)}}^{3}\right) \]

      sqrt-unprod [=>]79.7%

      \[ 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({\color{blue}{\left(\sqrt{\sqrt[3]{\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)} \cdot \sqrt[3]{\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)}}^{3}\right) \]

      pow2 [=>]79.7%

      \[ 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({\left(\sqrt{\color{blue}{{\left(\sqrt[3]{\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)}^{2}}}\right)}^{3}\right) \]
  3. Recombined 3 regimes into one program.
  4. Final simplification86.5%

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

Alternatives

Alternative 1
Accuracy80.5%
Cost84680
\[\begin{array}{l} t_0 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\ t_1 := e^{t_0 \cdot y.re - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\\ t_2 := \mathsf{fma}\left(t_0, y.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\ \mathbf{if}\;y.im \leq -1.8 \cdot 10^{+15}:\\ \;\;\;\;t_1 \cdot \sin \left(\left|\mathsf{fma}\left(\tan^{-1}_* \frac{x.im}{x.re}, y.re, y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\right|\right)\\ \mathbf{elif}\;y.im \leq 6.4 \cdot 10^{+27}:\\ \;\;\;\;t_1 \cdot \sin t_2\\ \mathbf{else}:\\ \;\;\;\;t_1 \cdot \sin \left({\left(\sqrt{{\left(\sqrt[3]{t_2}\right)}^{2}}\right)}^{3}\right)\\ \end{array} \]
Alternative 2
Accuracy80.5%
Cost78280
\[\begin{array}{l} t_0 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\ t_1 := e^{t_0 \cdot y.re - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\\ t_2 := \mathsf{fma}\left(t_0, y.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\ \mathbf{if}\;y.im \leq -1 \cdot 10^{+17}:\\ \;\;\;\;t_1 \cdot \sin \left(\left|\mathsf{fma}\left(\tan^{-1}_* \frac{x.im}{x.re}, y.re, y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\right|\right)\\ \mathbf{elif}\;y.im \leq 0.00096:\\ \;\;\;\;t_1 \cdot \sin t_2\\ \mathbf{else}:\\ \;\;\;\;t_1 \cdot \sin \left({\left({\left(\sqrt[3]{t_2}\right)}^{2}\right)}^{1.5}\right)\\ \end{array} \]
Alternative 3
Accuracy80.4%
Cost65220
\[\begin{array}{l} t_0 := y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\ t_1 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\ t_2 := e^{t_1 \cdot y.re - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\\ \mathbf{if}\;y.im \leq -2 \cdot 10^{+15}:\\ \;\;\;\;t_2 \cdot \sin \left(\left|\mathsf{fma}\left(\tan^{-1}_* \frac{x.im}{x.re}, y.re, t_0\right)\right|\right)\\ \mathbf{elif}\;y.im \leq 0.00048:\\ \;\;\;\;t_2 \cdot \sin \left(\mathsf{fma}\left(t_1, y.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t_2 \cdot \sin \left({\left(\sqrt[3]{t_0}\right)}^{3}\right)\\ \end{array} \]
Alternative 4
Accuracy80.4%
Cost58953
\[\begin{array}{l} t_0 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\ t_1 := e^{t_0 \cdot y.re - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\\ \mathbf{if}\;y.im \leq -2 \cdot 10^{+138} \lor \neg \left(y.im \leq 0.00043\right):\\ \;\;\;\;t_1 \cdot \sin \left({\left(\sqrt[3]{y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)}\right)}^{3}\right)\\ \mathbf{else}:\\ \;\;\;\;t_1 \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 5
Accuracy78.8%
Cost45897
\[\begin{array}{l} t_0 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\ t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\ \mathbf{if}\;y.re \leq -1.45 \cdot 10^{-46} \lor \neg \left(y.re \leq 1.7 \cdot 10^{-21}\right):\\ \;\;\;\;e^{t_0 \cdot y.re - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \sin t_1\\ \mathbf{else}:\\ \;\;\;\;\sin \left(\mathsf{fma}\left(t_0, y.im, t_1\right)\right) \cdot e^{y.im \cdot \left(-\tan^{-1}_* \frac{x.im}{x.re}\right)}\\ \end{array} \]
Alternative 6
Accuracy78.2%
Cost45896
\[\begin{array}{l} t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\ t_1 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\ t_2 := e^{t_1 \cdot y.re - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\\ \mathbf{if}\;y.re \leq -1.42 \cdot 10^{-8}:\\ \;\;\;\;t_2 \cdot \sin \left(\left|t_0\right|\right)\\ \mathbf{elif}\;y.re \leq 1.6 \cdot 10^{-22}:\\ \;\;\;\;\sin \left(\mathsf{fma}\left(t_1, y.im, t_0\right)\right) \cdot e^{y.im \cdot \left(-\tan^{-1}_* \frac{x.im}{x.re}\right)}\\ \mathbf{else}:\\ \;\;\;\;t_2 \cdot \sin t_0\\ \end{array} \]
Alternative 7
Accuracy78.8%
Cost45833
\[\begin{array}{l} t_0 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\ t_1 := y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\\ t_2 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\ \mathbf{if}\;y.re \leq -4.5 \cdot 10^{-45} \lor \neg \left(y.re \leq 1.7 \cdot 10^{-21}\right):\\ \;\;\;\;e^{t_0 \cdot y.re - t_1} \cdot \sin t_2\\ \mathbf{else}:\\ \;\;\;\;\frac{\sin \left(\mathsf{fma}\left(t_0, y.im, t_2\right)\right)}{e^{t_1}}\\ \end{array} \]
Alternative 8
Accuracy78.9%
Cost45769
\[\begin{array}{l} t_0 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\ t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\ \mathbf{if}\;y.im \leq -160 \lor \neg \left(y.im \leq 1.35 \cdot 10^{+14}\right):\\ \;\;\;\;e^{t_0 \cdot y.re - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \sin t_1\\ \mathbf{else}:\\ \;\;\;\;\sin \left(\mathsf{fma}\left(t_0, y.im, t_1\right)\right) \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\ \end{array} \]
Alternative 9
Accuracy65.3%
Cost39881
\[\begin{array}{l} t_0 := y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\\ \mathbf{if}\;y.re \leq -3.2 \cdot 10^{-184} \lor \neg \left(y.re \leq 3 \cdot 10^{-179}\right):\\ \;\;\;\;e^{\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.re - t_0} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\ \mathbf{else}:\\ \;\;\;\;\left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \cdot e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - t_0}\\ \end{array} \]
Alternative 10
Accuracy60.1%
Cost39761
\[\begin{array}{l} t_0 := \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\ t_1 := y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\\ \mathbf{if}\;x.im \leq -1.5 \cdot 10^{-282}:\\ \;\;\;\;e^{y.re \cdot \log \left(-x.im\right) - t_1} \cdot t_0\\ \mathbf{elif}\;x.im \leq 1.4 \cdot 10^{-179} \lor \neg \left(x.im \leq 3.3 \cdot 10^{-131}\right) \land x.im \leq 8.5 \cdot 10^{-39}:\\ \;\;\;\;\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{else}:\\ \;\;\;\;t_0 \cdot e^{y.re \cdot \log x.im - t_1}\\ \end{array} \]
Alternative 11
Accuracy60.6%
Cost39628
\[\begin{array}{l} t_0 := y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\\ t_1 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\ t_2 := e^{y.re \cdot \log x.re - t_0}\\ t_3 := y.im \cdot \log x.re\\ \mathbf{if}\;x.re \leq -1.08 \cdot 10^{-89}:\\ \;\;\;\;t_1 \cdot e^{\log \left(\frac{-1}{x.re}\right) \cdot \left(-y.re\right) - t_0}\\ \mathbf{elif}\;x.re \leq 2.7 \cdot 10^{-302}:\\ \;\;\;\;t_1 \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\ \mathbf{elif}\;x.re \leq 9 \cdot 10^{-130}:\\ \;\;\;\;\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \cdot t_2\\ \mathbf{elif}\;x.re \leq 5.5 \cdot 10^{+78}:\\ \;\;\;\;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_2 \cdot \sin t_3\\ \end{array} \]
Alternative 12
Accuracy64.4%
Cost39561
\[\begin{array}{l} t_0 := y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\\ \mathbf{if}\;y.re \leq -4.8 \cdot 10^{-208} \lor \neg \left(y.re \leq 4.3 \cdot 10^{-225}\right):\\ \;\;\;\;e^{\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.re - t_0} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\ \mathbf{else}:\\ \;\;\;\;e^{y.re \cdot \log \left(-x.im\right) - t_0} \cdot \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\ \end{array} \]
Alternative 13
Accuracy57.1%
Cost33164
\[\begin{array}{l} t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\ t_1 := t_0 \cdot e^{y.im \cdot \left(-\tan^{-1}_* \frac{x.im}{x.re}\right)}\\ t_2 := \sin t_0 \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\ \mathbf{if}\;y.re \leq -5.4 \cdot 10^{-15}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y.re \leq -2.35 \cdot 10^{-209}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y.re \leq 3 \cdot 10^{-179}:\\ \;\;\;\;e^{y.re \cdot \log x.re - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \sin \left(y.im \cdot \log x.re\right)\\ \mathbf{elif}\;y.re \leq 5.5:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 14
Accuracy59.7%
Cost26377
\[\begin{array}{l} \mathbf{if}\;y.re \leq -2.5 \cdot 10^{-13} \lor \neg \left(y.re \leq 4.2\right):\\ \;\;\;\;\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{else}:\\ \;\;\;\;\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(y.re \cdot e^{y.im \cdot \left(-\tan^{-1}_* \frac{x.im}{x.re}\right)}\right)\\ \end{array} \]
Alternative 15
Accuracy33.0%
Cost19849
\[\begin{array}{l} t_0 := \mathsf{expm1}\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\ \mathbf{if}\;y.im \leq -2.75 \cdot 10^{-15} \lor \neg \left(y.im \leq 4.5 \cdot 10^{-33}\right):\\ \;\;\;\;\log \left(1 + t_0\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{log1p}\left(t_0\right)\\ \end{array} \]
Alternative 16
Accuracy40.0%
Cost19840
\[\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot e^{y.im \cdot \left(-\tan^{-1}_* \frac{x.im}{x.re}\right)} \]
Alternative 17
Accuracy40.2%
Cost19840
\[\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(y.re \cdot e^{y.im \cdot \left(-\tan^{-1}_* \frac{x.im}{x.re}\right)}\right) \]
Alternative 18
Accuracy27.2%
Cost19785
\[\begin{array}{l} t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\ \mathbf{if}\;y.im \leq -2.3 \cdot 10^{-6} \lor \neg \left(y.im \leq 2.7 \cdot 10^{-195}\right):\\ \;\;\;\;\sqrt[3]{{t_0}^{3}}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{log1p}\left(\mathsf{expm1}\left(t_0\right)\right)\\ \end{array} \]
Alternative 19
Accuracy22.7%
Cost19456
\[\mathsf{log1p}\left(\mathsf{expm1}\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \]
Alternative 20
Accuracy13.8%
Cost6656
\[y.re \cdot \tan^{-1}_* \frac{x.im}{x.re} \]

Reproduce?

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