?

Average Error: 33.0 → 5.6
Time: 1.2min
Precision: binary64
Cost: 40068

?

\[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 \cos \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\\ \mathbf{if}\;y.re \leq -2.65 \cdot 10^{-11}:\\ \;\;\;\;e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - t_0} \cdot \left(-1 + \left(1 - \left(-\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right)\\ \mathbf{elif}\;y.re \leq 2.6 \cdot 10^{-39}:\\ \;\;\;\;e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)} \cdot 1\\ \mathbf{else}:\\ \;\;\;\;e^{\log \left({x.re}^{2}\right) \cdot \left(y.re \cdot 0.5\right) - t_0} \cdot 1\\ \end{array} \]
(FPCore (x.re x.im y.re y.im)
 :precision binary64
 (*
  (exp
   (-
    (* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.re)
    (* (atan2 x.im x.re) y.im)))
  (cos
   (+
    (* (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)))
   (if (<= y.re -2.65e-11)
     (*
      (exp (- (* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.re) t_0))
      (+ -1.0 (- 1.0 (- (cos (* y.re (atan2 x.im x.re)))))))
     (if (<= y.re 2.6e-39)
       (* (exp (* (atan2 x.im x.re) (- y.im))) 1.0)
       (* (exp (- (* (log (pow x.re 2.0)) (* y.re 0.5)) t_0)) 1.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))) * cos(((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 tmp;
	if (y_46_re <= -2.65e-11) {
		tmp = exp(((log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - t_0)) * (-1.0 + (1.0 - -cos((y_46_re * atan2(x_46_im, x_46_re)))));
	} else if (y_46_re <= 2.6e-39) {
		tmp = exp((atan2(x_46_im, x_46_re) * -y_46_im)) * 1.0;
	} else {
		tmp = exp(((log(pow(x_46_re, 2.0)) * (y_46_re * 0.5)) - t_0)) * 1.0;
	}
	return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
    real(8), intent (in) :: x_46re
    real(8), intent (in) :: x_46im
    real(8), intent (in) :: y_46re
    real(8), intent (in) :: y_46im
    code = exp(((log(sqrt(((x_46re * x_46re) + (x_46im * x_46im)))) * y_46re) - (atan2(x_46im, x_46re) * y_46im))) * cos(((log(sqrt(((x_46re * x_46re) + (x_46im * x_46im)))) * y_46im) + (atan2(x_46im, x_46re) * y_46re)))
end function
real(8) function code(x_46re, x_46im, y_46re, y_46im)
    real(8), intent (in) :: x_46re
    real(8), intent (in) :: x_46im
    real(8), intent (in) :: y_46re
    real(8), intent (in) :: y_46im
    real(8) :: t_0
    real(8) :: tmp
    t_0 = atan2(x_46im, x_46re) * y_46im
    if (y_46re <= (-2.65d-11)) then
        tmp = exp(((log(sqrt(((x_46re * x_46re) + (x_46im * x_46im)))) * y_46re) - t_0)) * ((-1.0d0) + (1.0d0 - -cos((y_46re * atan2(x_46im, x_46re)))))
    else if (y_46re <= 2.6d-39) then
        tmp = exp((atan2(x_46im, x_46re) * -y_46im)) * 1.0d0
    else
        tmp = exp(((log((x_46re ** 2.0d0)) * (y_46re * 0.5d0)) - t_0)) * 1.0d0
    end if
    code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
	return Math.exp(((Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - (Math.atan2(x_46_im, x_46_re) * y_46_im))) * Math.cos(((Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_im) + (Math.atan2(x_46_im, x_46_re) * y_46_re)));
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
	double t_0 = Math.atan2(x_46_im, x_46_re) * y_46_im;
	double tmp;
	if (y_46_re <= -2.65e-11) {
		tmp = Math.exp(((Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - t_0)) * (-1.0 + (1.0 - -Math.cos((y_46_re * Math.atan2(x_46_im, x_46_re)))));
	} else if (y_46_re <= 2.6e-39) {
		tmp = Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im)) * 1.0;
	} else {
		tmp = Math.exp(((Math.log(Math.pow(x_46_re, 2.0)) * (y_46_re * 0.5)) - t_0)) * 1.0;
	}
	return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im):
	return math.exp(((math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - (math.atan2(x_46_im, x_46_re) * y_46_im))) * math.cos(((math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_im) + (math.atan2(x_46_im, x_46_re) * y_46_re)))
def code(x_46_re, x_46_im, y_46_re, y_46_im):
	t_0 = math.atan2(x_46_im, x_46_re) * y_46_im
	tmp = 0
	if y_46_re <= -2.65e-11:
		tmp = math.exp(((math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - t_0)) * (-1.0 + (1.0 - -math.cos((y_46_re * math.atan2(x_46_im, x_46_re)))))
	elif y_46_re <= 2.6e-39:
		tmp = math.exp((math.atan2(x_46_im, x_46_re) * -y_46_im)) * 1.0
	else:
		tmp = math.exp(((math.log(math.pow(x_46_re, 2.0)) * (y_46_re * 0.5)) - t_0)) * 1.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))) * cos(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)
	tmp = 0.0
	if (y_46_re <= -2.65e-11)
		tmp = Float64(exp(Float64(Float64(log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) * y_46_re) - t_0)) * Float64(-1.0 + Float64(1.0 - Float64(-cos(Float64(y_46_re * atan(x_46_im, x_46_re)))))));
	elseif (y_46_re <= 2.6e-39)
		tmp = Float64(exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))) * 1.0);
	else
		tmp = Float64(exp(Float64(Float64(log((x_46_re ^ 2.0)) * Float64(y_46_re * 0.5)) - t_0)) * 1.0);
	end
	return tmp
end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im)
	tmp = 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))) * cos(((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)));
end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im)
	t_0 = atan2(x_46_im, x_46_re) * y_46_im;
	tmp = 0.0;
	if (y_46_re <= -2.65e-11)
		tmp = exp(((log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - t_0)) * (-1.0 + (1.0 - -cos((y_46_re * atan2(x_46_im, x_46_re)))));
	elseif (y_46_re <= 2.6e-39)
		tmp = exp((atan2(x_46_im, x_46_re) * -y_46_im)) * 1.0;
	else
		tmp = exp(((log((x_46_re ^ 2.0)) * (y_46_re * 0.5)) - t_0)) * 1.0;
	end
	tmp_2 = 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[Cos[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]}, If[LessEqual[y$46$re, -2.65e-11], 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] - t$95$0), $MachinePrecision]], $MachinePrecision] * N[(-1.0 + N[(1.0 - (-N[Cos[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision])), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 2.6e-39], N[(N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision] * 1.0), $MachinePrecision], N[(N[Exp[N[(N[(N[Log[N[Power[x$46$re, 2.0], $MachinePrecision]], $MachinePrecision] * N[(y$46$re * 0.5), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision] * 1.0), $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 \cos \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\\
\mathbf{if}\;y.re \leq -2.65 \cdot 10^{-11}:\\
\;\;\;\;e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - t_0} \cdot \left(-1 + \left(1 - \left(-\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right)\\

\mathbf{elif}\;y.re \leq 2.6 \cdot 10^{-39}:\\
\;\;\;\;e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)} \cdot 1\\

\mathbf{else}:\\
\;\;\;\;e^{\log \left({x.re}^{2}\right) \cdot \left(y.re \cdot 0.5\right) - t_0} \cdot 1\\


\end{array}

Error?

Try it out?

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation?

  1. Split input into 3 regimes
  2. if y.re < -2.6499999999999999e-11

    1. Initial program 36.4

      \[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 \cos \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 1.8

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

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

    if -2.6499999999999999e-11 < y.re < 2.6e-39

    1. Initial program 33.8

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

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

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

      \[\leadsto \color{blue}{e^{-\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}} \cdot 1 \]
    5. Simplified6.0

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

      [Start]6.0

      \[ e^{-\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot 1 \]

      rational_best-simplify-11 [=>]6.0

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

      rational_best-simplify-1 [=>]6.0

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

      rational_best-simplify-1 [=>]6.0

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

      rational_best-simplify-50 [=>]6.0

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

      rational_best-simplify-10 [=>]6.0

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

    if 2.6e-39 < y.re

    1. Initial program 24.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 \cos \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 15.0

      \[\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}{\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)} \]
    3. Taylor expanded in y.re around 0 15.5

      \[\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}{1} \]
    4. Applied egg-rr15.5

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

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

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

      [Start]11.3

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

      rational_best-simplify-50 [=>]11.3

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y.re \leq -2.65 \cdot 10^{-11}:\\ \;\;\;\;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 \left(-1 + \left(1 - \left(-\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\right)\\ \mathbf{elif}\;y.re \leq 2.6 \cdot 10^{-39}:\\ \;\;\;\;e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)} \cdot 1\\ \mathbf{else}:\\ \;\;\;\;e^{\log \left({x.re}^{2}\right) \cdot \left(y.re \cdot 0.5\right) - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot 1\\ \end{array} \]

Alternatives

Alternative 1
Error5.6
Cost39748
\[\begin{array}{l} t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\ \mathbf{if}\;y.re \leq -2.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 \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\ \mathbf{elif}\;y.re \leq 2.6 \cdot 10^{-39}:\\ \;\;\;\;e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)} \cdot 1\\ \mathbf{else}:\\ \;\;\;\;e^{\log \left({x.re}^{2}\right) \cdot \left(y.re \cdot 0.5\right) - t_0} \cdot 1\\ \end{array} \]
Alternative 2
Error5.6
Cost26696
\[\begin{array}{l} t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\ \mathbf{if}\;y.re \leq -2.55 \cdot 10^{-11}:\\ \;\;\;\;e^{\log \left(x.re \cdot x.re + x.im \cdot x.im\right) \cdot \left(y.re \cdot 0.5\right) - t_0} \cdot 1\\ \mathbf{elif}\;y.re \leq 4.5 \cdot 10^{+59}:\\ \;\;\;\;e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)} \cdot 1\\ \mathbf{else}:\\ \;\;\;\;e^{\log \left({x.im}^{2}\right) \cdot \left(y.re \cdot 0.5\right) - t_0} \cdot 1\\ \end{array} \]
Alternative 3
Error5.7
Cost26696
\[\begin{array}{l} t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\ \mathbf{if}\;y.re \leq -2.65 \cdot 10^{-11}:\\ \;\;\;\;e^{\log \left(x.re \cdot x.re + x.im \cdot x.im\right) \cdot \left(y.re \cdot 0.5\right) - t_0} \cdot 1\\ \mathbf{elif}\;y.re \leq 2.6 \cdot 10^{-39}:\\ \;\;\;\;e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)} \cdot 1\\ \mathbf{else}:\\ \;\;\;\;e^{\log \left({x.re}^{2}\right) \cdot \left(y.re \cdot 0.5\right) - t_0} \cdot 1\\ \end{array} \]
Alternative 4
Error5.7
Cost20616
\[\begin{array}{l} t_0 := e^{\log \left(x.re \cdot x.re + x.im \cdot x.im\right) \cdot \left(y.re \cdot 0.5\right) - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot 1\\ \mathbf{if}\;y.re \leq -2.3 \cdot 10^{-11}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;y.re \leq 7.8 \cdot 10^{+41}:\\ \;\;\;\;e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)} \cdot 1\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 5
Error9.9
Cost20300
\[\begin{array}{l} t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\ t_1 := e^{\log \left(-x.im\right) \cdot y.re - t_0} \cdot 1\\ \mathbf{if}\;x.im \leq -1.3 \cdot 10^{-84}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x.im \leq -9 \cdot 10^{-128}:\\ \;\;\;\;{\left(-x.re\right)}^{y.re} \cdot 1\\ \mathbf{elif}\;x.im \leq -5 \cdot 10^{-310}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;e^{\log x.im \cdot y.re - t_0} \cdot 1\\ \end{array} \]
Alternative 6
Error15.5
Cost13380
\[\begin{array}{l} \mathbf{if}\;y.re \leq -2.2 \cdot 10^{+57}:\\ \;\;\;\;{\left(-x.re\right)}^{y.re} \cdot 1\\ \mathbf{else}:\\ \;\;\;\;e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)} \cdot 1\\ \end{array} \]
Alternative 7
Error22.8
Cost6984
\[\begin{array}{l} t_0 := {\left(-x.re\right)}^{y.re} \cdot 1\\ \mathbf{if}\;y.re \leq -2.6 \cdot 10^{-11}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;y.re \leq 640000000:\\ \;\;\;\;1\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 8
Error38.9
Cost64
\[1 \]

Error

Reproduce?

herbie shell --seed 2023099 
(FPCore (x.re x.im y.re y.im)
  :name "powComplex, real part"
  :precision binary64
  (* (exp (- (* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.re) (* (atan2 x.im x.re) y.im))) (cos (+ (* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.im) (* (atan2 x.im x.re) y.re)))))