| Alternative 1 | |
|---|---|
| Error | 19.6 |
| Cost | 47064 |
(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 (+ (* x.re x.re) (* x.im x.im)))
(t_1 (* y.re (atan2 x.im x.re)))
(t_2 (sin t_1))
(t_3 (* (atan2 x.im x.re) y.re))
(t_4 (log (- x.re)))
(t_5 (* (atan2 x.im x.re) y.im)))
(if (<= x.re -4.8e-60)
(* (exp (- (* t_4 y.re) t_5)) (sin (+ (* t_4 y.im) t_3)))
(if (<= x.re -9e-210)
(* (exp (- (/ (* y.re (log t_0)) 2.0) t_5)) t_1)
(if (<= x.re -1.45e-288)
(* (atan2 x.im x.re) (/ y.re (exp (* y.im (atan2 x.im x.re)))))
(if (<= x.re 5.8e-279)
(*
(exp (- (* (log x.im) y.re) t_5))
(sin (+ (* (log x.im) y.im) t_3)))
(if (<= x.re 2.5e-16)
(*
(exp (- (* (log (sqrt t_0)) y.re) t_5))
(+ (* y.im (* (log x.re) 1.0)) t_2))
(*
(exp (- (* (log x.re) y.re) t_5))
(+ (* y.im (* (log x.re) (cos t_1))) t_2)))))))))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 = (x_46_re * x_46_re) + (x_46_im * x_46_im);
double t_1 = y_46_re * atan2(x_46_im, x_46_re);
double t_2 = sin(t_1);
double t_3 = atan2(x_46_im, x_46_re) * y_46_re;
double t_4 = log(-x_46_re);
double t_5 = atan2(x_46_im, x_46_re) * y_46_im;
double tmp;
if (x_46_re <= -4.8e-60) {
tmp = exp(((t_4 * y_46_re) - t_5)) * sin(((t_4 * y_46_im) + t_3));
} else if (x_46_re <= -9e-210) {
tmp = exp((((y_46_re * log(t_0)) / 2.0) - t_5)) * t_1;
} else if (x_46_re <= -1.45e-288) {
tmp = atan2(x_46_im, x_46_re) * (y_46_re / exp((y_46_im * atan2(x_46_im, x_46_re))));
} else if (x_46_re <= 5.8e-279) {
tmp = exp(((log(x_46_im) * y_46_re) - t_5)) * sin(((log(x_46_im) * y_46_im) + t_3));
} else if (x_46_re <= 2.5e-16) {
tmp = exp(((log(sqrt(t_0)) * y_46_re) - t_5)) * ((y_46_im * (log(x_46_re) * 1.0)) + t_2);
} else {
tmp = exp(((log(x_46_re) * y_46_re) - t_5)) * ((y_46_im * (log(x_46_re) * cos(t_1))) + t_2);
}
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) :: t_4
real(8) :: t_5
real(8) :: tmp
t_0 = (x_46re * x_46re) + (x_46im * x_46im)
t_1 = y_46re * atan2(x_46im, x_46re)
t_2 = sin(t_1)
t_3 = atan2(x_46im, x_46re) * y_46re
t_4 = log(-x_46re)
t_5 = atan2(x_46im, x_46re) * y_46im
if (x_46re <= (-4.8d-60)) then
tmp = exp(((t_4 * y_46re) - t_5)) * sin(((t_4 * y_46im) + t_3))
else if (x_46re <= (-9d-210)) then
tmp = exp((((y_46re * log(t_0)) / 2.0d0) - t_5)) * t_1
else if (x_46re <= (-1.45d-288)) then
tmp = atan2(x_46im, x_46re) * (y_46re / exp((y_46im * atan2(x_46im, x_46re))))
else if (x_46re <= 5.8d-279) then
tmp = exp(((log(x_46im) * y_46re) - t_5)) * sin(((log(x_46im) * y_46im) + t_3))
else if (x_46re <= 2.5d-16) then
tmp = exp(((log(sqrt(t_0)) * y_46re) - t_5)) * ((y_46im * (log(x_46re) * 1.0d0)) + t_2)
else
tmp = exp(((log(x_46re) * y_46re) - t_5)) * ((y_46im * (log(x_46re) * cos(t_1))) + t_2)
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 = (x_46_re * x_46_re) + (x_46_im * x_46_im);
double t_1 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_2 = Math.sin(t_1);
double t_3 = Math.atan2(x_46_im, x_46_re) * y_46_re;
double t_4 = Math.log(-x_46_re);
double t_5 = Math.atan2(x_46_im, x_46_re) * y_46_im;
double tmp;
if (x_46_re <= -4.8e-60) {
tmp = Math.exp(((t_4 * y_46_re) - t_5)) * Math.sin(((t_4 * y_46_im) + t_3));
} else if (x_46_re <= -9e-210) {
tmp = Math.exp((((y_46_re * Math.log(t_0)) / 2.0) - t_5)) * t_1;
} else if (x_46_re <= -1.45e-288) {
tmp = Math.atan2(x_46_im, x_46_re) * (y_46_re / Math.exp((y_46_im * Math.atan2(x_46_im, x_46_re))));
} else if (x_46_re <= 5.8e-279) {
tmp = Math.exp(((Math.log(x_46_im) * y_46_re) - t_5)) * Math.sin(((Math.log(x_46_im) * y_46_im) + t_3));
} else if (x_46_re <= 2.5e-16) {
tmp = Math.exp(((Math.log(Math.sqrt(t_0)) * y_46_re) - t_5)) * ((y_46_im * (Math.log(x_46_re) * 1.0)) + t_2);
} else {
tmp = Math.exp(((Math.log(x_46_re) * y_46_re) - t_5)) * ((y_46_im * (Math.log(x_46_re) * Math.cos(t_1))) + t_2);
}
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 = (x_46_re * x_46_re) + (x_46_im * x_46_im) t_1 = y_46_re * math.atan2(x_46_im, x_46_re) t_2 = math.sin(t_1) t_3 = math.atan2(x_46_im, x_46_re) * y_46_re t_4 = math.log(-x_46_re) t_5 = math.atan2(x_46_im, x_46_re) * y_46_im tmp = 0 if x_46_re <= -4.8e-60: tmp = math.exp(((t_4 * y_46_re) - t_5)) * math.sin(((t_4 * y_46_im) + t_3)) elif x_46_re <= -9e-210: tmp = math.exp((((y_46_re * math.log(t_0)) / 2.0) - t_5)) * t_1 elif x_46_re <= -1.45e-288: tmp = math.atan2(x_46_im, x_46_re) * (y_46_re / math.exp((y_46_im * math.atan2(x_46_im, x_46_re)))) elif x_46_re <= 5.8e-279: tmp = math.exp(((math.log(x_46_im) * y_46_re) - t_5)) * math.sin(((math.log(x_46_im) * y_46_im) + t_3)) elif x_46_re <= 2.5e-16: tmp = math.exp(((math.log(math.sqrt(t_0)) * y_46_re) - t_5)) * ((y_46_im * (math.log(x_46_re) * 1.0)) + t_2) else: tmp = math.exp(((math.log(x_46_re) * y_46_re) - t_5)) * ((y_46_im * (math.log(x_46_re) * math.cos(t_1))) + t_2) 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(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)) t_1 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_2 = sin(t_1) t_3 = Float64(atan(x_46_im, x_46_re) * y_46_re) t_4 = log(Float64(-x_46_re)) t_5 = Float64(atan(x_46_im, x_46_re) * y_46_im) tmp = 0.0 if (x_46_re <= -4.8e-60) tmp = Float64(exp(Float64(Float64(t_4 * y_46_re) - t_5)) * sin(Float64(Float64(t_4 * y_46_im) + t_3))); elseif (x_46_re <= -9e-210) tmp = Float64(exp(Float64(Float64(Float64(y_46_re * log(t_0)) / 2.0) - t_5)) * t_1); elseif (x_46_re <= -1.45e-288) tmp = Float64(atan(x_46_im, x_46_re) * Float64(y_46_re / exp(Float64(y_46_im * atan(x_46_im, x_46_re))))); elseif (x_46_re <= 5.8e-279) tmp = Float64(exp(Float64(Float64(log(x_46_im) * y_46_re) - t_5)) * sin(Float64(Float64(log(x_46_im) * y_46_im) + t_3))); elseif (x_46_re <= 2.5e-16) tmp = Float64(exp(Float64(Float64(log(sqrt(t_0)) * y_46_re) - t_5)) * Float64(Float64(y_46_im * Float64(log(x_46_re) * 1.0)) + t_2)); else tmp = Float64(exp(Float64(Float64(log(x_46_re) * y_46_re) - t_5)) * Float64(Float64(y_46_im * Float64(log(x_46_re) * cos(t_1))) + t_2)); 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 = (x_46_re * x_46_re) + (x_46_im * x_46_im); t_1 = y_46_re * atan2(x_46_im, x_46_re); t_2 = sin(t_1); t_3 = atan2(x_46_im, x_46_re) * y_46_re; t_4 = log(-x_46_re); t_5 = atan2(x_46_im, x_46_re) * y_46_im; tmp = 0.0; if (x_46_re <= -4.8e-60) tmp = exp(((t_4 * y_46_re) - t_5)) * sin(((t_4 * y_46_im) + t_3)); elseif (x_46_re <= -9e-210) tmp = exp((((y_46_re * log(t_0)) / 2.0) - t_5)) * t_1; elseif (x_46_re <= -1.45e-288) tmp = atan2(x_46_im, x_46_re) * (y_46_re / exp((y_46_im * atan2(x_46_im, x_46_re)))); elseif (x_46_re <= 5.8e-279) tmp = exp(((log(x_46_im) * y_46_re) - t_5)) * sin(((log(x_46_im) * y_46_im) + t_3)); elseif (x_46_re <= 2.5e-16) tmp = exp(((log(sqrt(t_0)) * y_46_re) - t_5)) * ((y_46_im * (log(x_46_re) * 1.0)) + t_2); else tmp = exp(((log(x_46_re) * y_46_re) - t_5)) * ((y_46_im * (log(x_46_re) * cos(t_1))) + t_2); 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[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sin[t$95$1], $MachinePrecision]}, Block[{t$95$3 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]}, Block[{t$95$4 = N[Log[(-x$46$re)], $MachinePrecision]}, Block[{t$95$5 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, If[LessEqual[x$46$re, -4.8e-60], N[(N[Exp[N[(N[(t$95$4 * y$46$re), $MachinePrecision] - t$95$5), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(N[(t$95$4 * y$46$im), $MachinePrecision] + t$95$3), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, -9e-210], N[(N[Exp[N[(N[(N[(y$46$re * N[Log[t$95$0], $MachinePrecision]), $MachinePrecision] / 2.0), $MachinePrecision] - t$95$5), $MachinePrecision]], $MachinePrecision] * t$95$1), $MachinePrecision], If[LessEqual[x$46$re, -1.45e-288], N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[(y$46$re / N[Exp[N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, 5.8e-279], N[(N[Exp[N[(N[(N[Log[x$46$im], $MachinePrecision] * y$46$re), $MachinePrecision] - t$95$5), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(N[(N[Log[x$46$im], $MachinePrecision] * y$46$im), $MachinePrecision] + t$95$3), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, 2.5e-16], N[(N[Exp[N[(N[(N[Log[N[Sqrt[t$95$0], $MachinePrecision]], $MachinePrecision] * y$46$re), $MachinePrecision] - t$95$5), $MachinePrecision]], $MachinePrecision] * N[(N[(y$46$im * N[(N[Log[x$46$re], $MachinePrecision] * 1.0), $MachinePrecision]), $MachinePrecision] + t$95$2), $MachinePrecision]), $MachinePrecision], N[(N[Exp[N[(N[(N[Log[x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision] - t$95$5), $MachinePrecision]], $MachinePrecision] * N[(N[(y$46$im * N[(N[Log[x$46$re], $MachinePrecision] * N[Cos[t$95$1], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$2), $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 := x.re \cdot x.re + x.im \cdot x.im\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_2 := \sin t_1\\
t_3 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\\
t_4 := \log \left(-x.re\right)\\
t_5 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
\mathbf{if}\;x.re \leq -4.8 \cdot 10^{-60}:\\
\;\;\;\;e^{t_4 \cdot y.re - t_5} \cdot \sin \left(t_4 \cdot y.im + t_3\right)\\
\mathbf{elif}\;x.re \leq -9 \cdot 10^{-210}:\\
\;\;\;\;e^{\frac{y.re \cdot \log t_0}{2} - t_5} \cdot t_1\\
\mathbf{elif}\;x.re \leq -1.45 \cdot 10^{-288}:\\
\;\;\;\;\tan^{-1}_* \frac{x.im}{x.re} \cdot \frac{y.re}{e^{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}}\\
\mathbf{elif}\;x.re \leq 5.8 \cdot 10^{-279}:\\
\;\;\;\;e^{\log x.im \cdot y.re - t_5} \cdot \sin \left(\log x.im \cdot y.im + t_3\right)\\
\mathbf{elif}\;x.re \leq 2.5 \cdot 10^{-16}:\\
\;\;\;\;e^{\log \left(\sqrt{t_0}\right) \cdot y.re - t_5} \cdot \left(y.im \cdot \left(\log x.re \cdot 1\right) + t_2\right)\\
\mathbf{else}:\\
\;\;\;\;e^{\log x.re \cdot y.re - t_5} \cdot \left(y.im \cdot \left(\log x.re \cdot \cos t_1\right) + t_2\right)\\
\end{array}
Results
if x.re < -4.80000000000000019e-60Initial program 35.4
Taylor expanded in x.re around -inf 36.4
Simplified36.4
[Start]36.4 | \[ 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_best-simplify-1 [=>]36.4 | \[ 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_best-simplify-10 [=>]36.4 | \[ 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)
\] |
Taylor expanded in x.re around -inf 5.4
Simplified5.4
[Start]5.4 | \[ 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_best-simplify-1 [=>]5.4 | \[ 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_best-simplify-10 [=>]5.4 | \[ 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 -4.80000000000000019e-60 < x.re < -9.00000000000000039e-210Initial program 22.0
Taylor expanded in y.im around 0 19.9
Taylor expanded in y.re around 0 20.1
Applied egg-rr20.1
if -9.00000000000000039e-210 < x.re < -1.45000000000000007e-288Initial program 30.4
Taylor expanded in y.im around 0 24.3
Taylor expanded in x.re around 0 38.5
Taylor expanded in y.re around 0 27.4
Simplified27.4
[Start]27.4 | \[ e^{-y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)
\] |
|---|---|
rational_best-simplify-50 [=>]27.4 | \[ \color{blue}{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(y.re \cdot e^{-y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\right)}
\] |
rational_best-simplify-1 [<=]27.4 | \[ \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(y.re \cdot e^{-\color{blue}{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\right)
\] |
exponential-simplify-2 [=>]27.4 | \[ \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(y.re \cdot \color{blue}{\frac{1}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}}\right)
\] |
rational_best-simplify-55 [=>]27.4 | \[ \tan^{-1}_* \frac{x.im}{x.re} \cdot \color{blue}{\left(1 \cdot \frac{y.re}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\right)}
\] |
rational_best-simplify-1 [=>]27.4 | \[ \tan^{-1}_* \frac{x.im}{x.re} \cdot \color{blue}{\left(\frac{y.re}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}} \cdot 1\right)}
\] |
rational_best-simplify-7 [=>]27.4 | \[ \tan^{-1}_* \frac{x.im}{x.re} \cdot \color{blue}{\frac{y.re}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}}
\] |
rational_best-simplify-1 [=>]27.4 | \[ \tan^{-1}_* \frac{x.im}{x.re} \cdot \frac{y.re}{e^{\color{blue}{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}}}
\] |
if -1.45000000000000007e-288 < x.re < 5.8e-279Initial program 30.8
Taylor expanded in x.re around 0 48.5
Taylor expanded in x.re around 0 33.5
if 5.8e-279 < x.re < 2.5000000000000002e-16Initial program 24.6
Taylor expanded in y.im around 0 24.9
Simplified24.9
[Start]24.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 \left(\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) + y.im \cdot \left(\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right) \cdot \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)
\] |
|---|---|
rational_best-simplify-3 [=>]24.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 \color{blue}{\left(y.im \cdot \left(\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right) \cdot \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) + \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)}
\] |
rational_best-simplify-3 [=>]24.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 \left(y.im \cdot \left(\log \left(\sqrt{\color{blue}{{x.re}^{2} + {x.im}^{2}}}\right) \cdot \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) + \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)
\] |
Taylor expanded in x.re around inf 18.8
Taylor expanded in y.re around 0 18.8
if 2.5000000000000002e-16 < x.re Initial program 43.0
Taylor expanded in y.im around 0 43.6
Simplified43.6
[Start]43.6 | \[ 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(\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) + y.im \cdot \left(\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right) \cdot \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)
\] |
|---|---|
rational_best-simplify-3 [=>]43.6 | \[ 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.im \cdot \left(\log \left(\sqrt{{x.im}^{2} + {x.re}^{2}}\right) \cdot \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) + \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)}
\] |
rational_best-simplify-3 [=>]43.6 | \[ 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.im \cdot \left(\log \left(\sqrt{\color{blue}{{x.re}^{2} + {x.im}^{2}}}\right) \cdot \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) + \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)
\] |
Taylor expanded in x.re around inf 28.6
Taylor expanded in x.re around inf 14.9
Final simplification15.0
| Alternative 1 | |
|---|---|
| Error | 19.6 |
| Cost | 47064 |
| Alternative 2 | |
|---|---|
| Error | 18.9 |
| Cost | 46600 |
| Alternative 3 | |
|---|---|
| Error | 18.5 |
| Cost | 40016 |
| Alternative 4 | |
|---|---|
| Error | 19.0 |
| Cost | 40012 |
| Alternative 5 | |
|---|---|
| Error | 18.9 |
| Cost | 40012 |
| Alternative 6 | |
|---|---|
| Error | 20.1 |
| Cost | 27208 |
| Alternative 7 | |
|---|---|
| Error | 24.0 |
| Cost | 26828 |
| Alternative 8 | |
|---|---|
| Error | 26.9 |
| Cost | 20040 |
| Alternative 9 | |
|---|---|
| Error | 36.9 |
| Cost | 13512 |
| Alternative 10 | |
|---|---|
| Error | 51.2 |
| Cost | 6656 |
herbie shell --seed 2023099
(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)))))