?

Average Error: 33.6 → 15.7
Time: 12.1s
Precision: binary64
Cost: 39880

?

\[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 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\\ t_2 := \log \left(x.re \cdot -1\right)\\ \mathbf{if}\;x.re \leq -10000000000000:\\ \;\;\;\;e^{t_2 \cdot y.re - t_0} \cdot \sin \left(t_2 \cdot y.im + t_1\right)\\ \mathbf{elif}\;x.re \leq 2.05 \cdot 10^{-16}:\\ \;\;\;\;e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - t_0} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\ \mathbf{else}:\\ \;\;\;\;e^{\log x.re \cdot y.re - t_0} \cdot \sin \left(\log x.re \cdot y.im + t_1\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 (* (atan2 x.im x.re) y.re))
        (t_2 (log (* x.re -1.0))))
   (if (<= x.re -10000000000000.0)
     (* (exp (- (* t_2 y.re) t_0)) (sin (+ (* t_2 y.im) t_1)))
     (if (<= x.re 2.05e-16)
       (*
        (exp (- (* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.re) t_0))
        (sin (* y.re (atan2 x.im x.re))))
       (*
        (exp (- (* (log x.re) y.re) t_0))
        (sin (+ (* (log x.re) y.im) 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 = atan2(x_46_im, x_46_re) * y_46_re;
	double t_2 = log((x_46_re * -1.0));
	double tmp;
	if (x_46_re <= -10000000000000.0) {
		tmp = exp(((t_2 * y_46_re) - t_0)) * sin(((t_2 * y_46_im) + t_1));
	} else if (x_46_re <= 2.05e-16) {
		tmp = exp(((log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - t_0)) * sin((y_46_re * atan2(x_46_im, x_46_re)));
	} else {
		tmp = exp(((log(x_46_re) * y_46_re) - t_0)) * sin(((log(x_46_re) * y_46_im) + t_1));
	}
	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))) * sin(((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) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_0 = atan2(x_46im, x_46re) * y_46im
    t_1 = atan2(x_46im, x_46re) * y_46re
    t_2 = log((x_46re * (-1.0d0)))
    if (x_46re <= (-10000000000000.0d0)) then
        tmp = exp(((t_2 * y_46re) - t_0)) * sin(((t_2 * y_46im) + t_1))
    else if (x_46re <= 2.05d-16) then
        tmp = exp(((log(sqrt(((x_46re * x_46re) + (x_46im * x_46im)))) * y_46re) - t_0)) * sin((y_46re * atan2(x_46im, x_46re)))
    else
        tmp = exp(((log(x_46re) * y_46re) - t_0)) * sin(((log(x_46re) * y_46im) + t_1))
    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.sin(((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 t_1 = Math.atan2(x_46_im, x_46_re) * y_46_re;
	double t_2 = Math.log((x_46_re * -1.0));
	double tmp;
	if (x_46_re <= -10000000000000.0) {
		tmp = Math.exp(((t_2 * y_46_re) - t_0)) * Math.sin(((t_2 * y_46_im) + t_1));
	} else if (x_46_re <= 2.05e-16) {
		tmp = Math.exp(((Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - t_0)) * Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
	} else {
		tmp = Math.exp(((Math.log(x_46_re) * y_46_re) - t_0)) * Math.sin(((Math.log(x_46_re) * y_46_im) + t_1));
	}
	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.sin(((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
	t_1 = math.atan2(x_46_im, x_46_re) * y_46_re
	t_2 = math.log((x_46_re * -1.0))
	tmp = 0
	if x_46_re <= -10000000000000.0:
		tmp = math.exp(((t_2 * y_46_re) - t_0)) * math.sin(((t_2 * y_46_im) + t_1))
	elif x_46_re <= 2.05e-16:
		tmp = math.exp(((math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - t_0)) * math.sin((y_46_re * math.atan2(x_46_im, x_46_re)))
	else:
		tmp = math.exp(((math.log(x_46_re) * y_46_re) - t_0)) * math.sin(((math.log(x_46_re) * y_46_im) + 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 = Float64(atan(x_46_im, x_46_re) * y_46_re)
	t_2 = log(Float64(x_46_re * -1.0))
	tmp = 0.0
	if (x_46_re <= -10000000000000.0)
		tmp = Float64(exp(Float64(Float64(t_2 * y_46_re) - t_0)) * sin(Float64(Float64(t_2 * y_46_im) + t_1)));
	elseif (x_46_re <= 2.05e-16)
		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)) * sin(Float64(y_46_re * atan(x_46_im, x_46_re))));
	else
		tmp = Float64(exp(Float64(Float64(log(x_46_re) * y_46_re) - t_0)) * sin(Float64(Float64(log(x_46_re) * y_46_im) + t_1)));
	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))) * 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)));
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;
	t_1 = atan2(x_46_im, x_46_re) * y_46_re;
	t_2 = log((x_46_re * -1.0));
	tmp = 0.0;
	if (x_46_re <= -10000000000000.0)
		tmp = exp(((t_2 * y_46_re) - t_0)) * sin(((t_2 * y_46_im) + t_1));
	elseif (x_46_re <= 2.05e-16)
		tmp = exp(((log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - t_0)) * sin((y_46_re * atan2(x_46_im, x_46_re)));
	else
		tmp = exp(((log(x_46_re) * y_46_re) - t_0)) * sin(((log(x_46_re) * y_46_im) + t_1));
	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[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[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]}, Block[{t$95$2 = N[Log[N[(x$46$re * -1.0), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[x$46$re, -10000000000000.0], N[(N[Exp[N[(N[(t$95$2 * y$46$re), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(N[(t$95$2 * y$46$im), $MachinePrecision] + t$95$1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, 2.05e-16], 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[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Exp[N[(N[(N[Log[x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(N[(N[Log[x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision] + t$95$1), $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 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\\
t_2 := \log \left(x.re \cdot -1\right)\\
\mathbf{if}\;x.re \leq -10000000000000:\\
\;\;\;\;e^{t_2 \cdot y.re - t_0} \cdot \sin \left(t_2 \cdot y.im + t_1\right)\\

\mathbf{elif}\;x.re \leq 2.05 \cdot 10^{-16}:\\
\;\;\;\;e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - t_0} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\

\mathbf{else}:\\
\;\;\;\;e^{\log x.re \cdot y.re - t_0} \cdot \sin \left(\log x.re \cdot y.im + t_1\right)\\


\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 x.re < -1e13

    1. Initial program 40.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. Taylor expanded in x.re around -inf 40.5

      \[\leadsto e^{\log \color{blue}{\left(-1 \cdot x.re\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. Simplified40.5

      \[\leadsto e^{\log \color{blue}{\left(x.re \cdot -1\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) \]
      Proof

      [Start]40.5

      \[ e^{\log \left(-1 \cdot x.re\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) \]

      rational.json-simplify-2 [=>]40.5

      \[ e^{\log \color{blue}{\left(x.re \cdot -1\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) \]
    4. Taylor expanded in x.re around -inf 3.2

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

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

      [Start]3.2

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

      rational.json-simplify-2 [=>]3.2

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

    if -1e13 < x.re < 2.05000000000000003e-16

    1. Initial program 24.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. Taylor expanded in y.im around 0 22.3

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

    if 2.05000000000000003e-16 < x.re

    1. Initial program 43.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. Taylor expanded in x.re around inf 44.0

      \[\leadsto e^{\log \color{blue}{x.re} \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. Taylor expanded in x.re around inf 14.5

      \[\leadsto e^{\log x.re \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(\log \color{blue}{x.re} \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right) \]
  3. Recombined 3 regimes into one program.
  4. Final simplification15.7

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

Alternatives

Alternative 1
Error18.1
Cost39880
\[\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.re \leq -5.8 \cdot 10^{+19}:\\ \;\;\;\;e^{\log \left(x.re \cdot -1\right) \cdot y.re - t_0} \cdot t_1\\ \mathbf{elif}\;x.re \leq 1.45 \cdot 10^{-21}:\\ \;\;\;\;e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - t_0} \cdot \sin t_1\\ \mathbf{else}:\\ \;\;\;\;e^{\log x.re \cdot y.re - t_0} \cdot \sin \left(\log x.re \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\\ \end{array} \]
Alternative 2
Error20.2
Cost39752
\[\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 \cdot 10^{-260}:\\ \;\;\;\;e^{\log \left(x.im \cdot -1\right) \cdot y.re - t_0} \cdot \sin t_1\\ \mathbf{elif}\;x.im \leq 0.98:\\ \;\;\;\;e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - t_0} \cdot t_1\\ \mathbf{else}:\\ \;\;\;\;e^{\log x.im \cdot y.re - t_0} \cdot \sin \left(\log x.im \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\\ \end{array} \]
Alternative 3
Error18.2
Cost39752
\[\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.re \leq -2.1 \cdot 10^{+14}:\\ \;\;\;\;e^{\log \left(x.re \cdot -1\right) \cdot y.re - t_0} \cdot t_1\\ \mathbf{elif}\;x.re \leq 4.2 \cdot 10^{-15}:\\ \;\;\;\;e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - t_0} \cdot t_1\\ \mathbf{else}:\\ \;\;\;\;e^{\log x.re \cdot y.re - t_0} \cdot \sin \left(\log x.re \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\\ \end{array} \]
Alternative 4
Error20.8
Cost33480
\[\begin{array}{l} t_0 := 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(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\ \mathbf{if}\;y.re \leq -2.35 \cdot 10^{-11}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;y.re \leq 5.8 \cdot 10^{-37}:\\ \;\;\;\;\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(e^{-y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot y.re\right)\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 5
Error23.9
Cost33092
\[\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.im \leq -5 \cdot 10^{-310}:\\ \;\;\;\;e^{\log \left(x.im \cdot -1\right) \cdot y.re - t_0} \cdot t_1\\ \mathbf{else}:\\ \;\;\;\;e^{\log x.im \cdot y.re - t_0} \cdot t_1\\ \end{array} \]
Alternative 6
Error24.0
Cost32964
\[\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 -5 \cdot 10^{-310}:\\ \;\;\;\;e^{\log \left(x.im \cdot -1\right) \cdot y.re - t_0} \cdot t_1\\ \mathbf{else}:\\ \;\;\;\;e^{\log x.im \cdot y.re - t_0} \cdot \sin t_1\\ \end{array} \]
Alternative 7
Error24.5
Cost27092
\[\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^{\log \left(x.re \cdot -1\right) \cdot y.re - t_0} \cdot t_1\\ t_3 := t_1 \cdot {x.im}^{y.re}\\ \mathbf{if}\;x.re \leq -1.55 \cdot 10^{-83}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x.re \leq -9.5 \cdot 10^{-107}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;x.re \leq -4.2 \cdot 10^{-184}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x.re \leq -4.3 \cdot 10^{-259}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;x.re \leq 3.7 \cdot 10^{-267}:\\ \;\;\;\;\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(e^{-y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot y.re\right)\\ \mathbf{else}:\\ \;\;\;\;e^{\log x.re \cdot y.re - t_0} \cdot t_1\\ \end{array} \]
Alternative 8
Error28.9
Cost26692
\[\begin{array}{l} t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\ t_1 := t_0 \cdot {x.im}^{y.re}\\ t_2 := \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(e^{-y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot y.re\right)\\ \mathbf{if}\;x.im \leq -5.5 \cdot 10^{-266}:\\ \;\;\;\;e^{\log \left(x.im \cdot -1\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot t_0\\ \mathbf{elif}\;x.im \leq 4.9 \cdot 10^{-82}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;x.im \leq 8.6 \cdot 10^{+137}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x.im \leq 1.5 \cdot 10^{+196}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 9
Error27.3
Cost20104
\[\begin{array}{l} t_0 := \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {x.im}^{y.re}\\ \mathbf{if}\;y.re \leq -1.9 \cdot 10^{+35}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;y.re \leq 10^{+58}:\\ \;\;\;\;\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(e^{-y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot y.re\right)\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 10
Error37.1
Cost13512
\[\begin{array}{l} t_0 := \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {x.im}^{y.re}\\ \mathbf{if}\;y.re \leq -2.4 \cdot 10^{+24}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;y.re \leq 1.25:\\ \;\;\;\;\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 11
Error51.0
Cost6656
\[\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re \]

Error

Reproduce?

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