?

Average Error: 32.8 → 14.2
Time: 53.4s
Precision: binary64
Cost: 40012

?

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

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

\mathbf{elif}\;x.re \leq -2 \cdot 10^{-311}:\\
\;\;\;\;t_3\\

\mathbf{else}:\\
\;\;\;\;e^{\log x.re \cdot y.re - t_2} \cdot \sin \left(\log x.re \cdot y.im + t_0\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 < -1.9e-27 or -3.20000000000000015e-180 < x.re < -1.9999999999999e-311

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

      \[\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. Simplified37.7

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

      [Start]37.7

      \[ 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 [=>]37.7

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

      rational.json-simplify-9 [=>]37.7

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

      \[\leadsto e^{\log \left(-x.re\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. Simplified8.6

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

      [Start]8.6

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

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

      rational.json-simplify-9 [=>]8.6

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

    if -1.9e-27 < x.re < -3.20000000000000015e-180

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

      \[\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)} \]
    3. Taylor expanded in y.re around 0 19.1

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

    if -1.9999999999999e-311 < x.re

    1. Initial program 34.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 \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 36.5

      \[\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 17.0

      \[\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 simplification14.2

    \[\leadsto \begin{array}{l} \mathbf{if}\;x.re \leq -1.9 \cdot 10^{-27}:\\ \;\;\;\;e^{\log \left(-x.re\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(\log \left(-x.re\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\\ \mathbf{elif}\;x.re \leq -3.2 \cdot 10^{-180}:\\ \;\;\;\;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{elif}\;x.re \leq -2 \cdot 10^{-311}:\\ \;\;\;\;e^{\log \left(-x.re\right) \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(\log \left(-x.re\right) \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.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
Error17.7
Cost39620
\[\begin{array}{l} t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\ \mathbf{if}\;x.re \leq -2 \cdot 10^{-311}:\\ \;\;\;\;e^{\log \left(-x.re\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 + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)\\ \end{array} \]
Alternative 2
Error20.2
Cost33032
\[\begin{array}{l} t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\ t_1 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\ t_2 := e^{\log x.re \cdot y.re - t_1}\\ \mathbf{if}\;x.re \leq -2 \cdot 10^{-311}:\\ \;\;\;\;e^{\log \left(-x.re\right) \cdot y.re - t_1} \cdot t_0\\ \mathbf{elif}\;x.re \leq 2.25 \cdot 10^{-13}:\\ \;\;\;\;t_2 \cdot t_0\\ \mathbf{else}:\\ \;\;\;\;t_2 \cdot \sin \left(y.im \cdot \log x.re\right)\\ \end{array} \]
Alternative 3
Error20.1
Cost33032
\[\begin{array}{l} t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\ t_1 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\ t_2 := e^{\log x.re \cdot y.re - t_1}\\ \mathbf{if}\;x.re \leq -2 \cdot 10^{-311}:\\ \;\;\;\;e^{\log \left(-x.re\right) \cdot y.re - t_1} \cdot \sin t_0\\ \mathbf{elif}\;x.re \leq 8.5 \cdot 10^{-12}:\\ \;\;\;\;t_2 \cdot t_0\\ \mathbf{else}:\\ \;\;\;\;t_2 \cdot \sin \left(y.im \cdot \log x.re\right)\\ \end{array} \]
Alternative 4
Error23.2
Cost26628
\[\begin{array}{l} t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\ t_1 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\ \mathbf{if}\;x.re \leq -2 \cdot 10^{-311}:\\ \;\;\;\;e^{\log \left(-x.re\right) \cdot y.re - t_1} \cdot t_0\\ \mathbf{else}:\\ \;\;\;\;e^{\log x.re \cdot y.re - t_1} \cdot t_0\\ \end{array} \]
Alternative 5
Error26.5
Cost20040
\[\begin{array}{l} t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\ \mathbf{if}\;y.re \leq -5.1 \cdot 10^{+20}:\\ \;\;\;\;{\left(-x.re\right)}^{y.re} \cdot t_0\\ \mathbf{elif}\;y.re \leq 3 \cdot 10^{+20}:\\ \;\;\;\;y.re \cdot \frac{\tan^{-1}_* \frac{x.im}{x.re}}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\\ \mathbf{else}:\\ \;\;\;\;{\left(-x.im\right)}^{y.re} \cdot t_0\\ \end{array} \]
Alternative 6
Error38.3
Cost13576
\[\begin{array}{l} t_0 := {\left(-x.im\right)}^{y.re} \cdot \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\ \mathbf{if}\;y.re \leq -1.65 \cdot 10^{+56}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;y.re \leq 1.12 \cdot 10^{+19}:\\ \;\;\;\;\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 7
Error36.7
Cost13576
\[\begin{array}{l} t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\ \mathbf{if}\;y.re \leq -1.2 \cdot 10^{-5}:\\ \;\;\;\;{\left(-x.re\right)}^{y.re} \cdot t_0\\ \mathbf{elif}\;y.re \leq 1.12 \cdot 10^{+19}:\\ \;\;\;\;\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\\ \mathbf{else}:\\ \;\;\;\;{\left(-x.im\right)}^{y.re} \cdot t_0\\ \end{array} \]
Alternative 8
Error50.5
Cost6656
\[\tan^{-1}_* \frac{x.im}{x.re} \cdot y.re \]

Error

Reproduce?

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