
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (sqrt (+ (* x.re x.re) (* x.im x.im))))))
(*
(exp (- (* t_0 y.re) (* (atan2 x.im x.re) y.im)))
(sin (+ (* t_0 y.im) (* (atan2 x.im x.re) y.re))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
return exp(((t_0 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin(((t_0 * y_46_im) + (atan2(x_46_im, x_46_re) * y_46_re)));
}
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
t_0 = log(sqrt(((x_46re * x_46re) + (x_46im * x_46im))))
code = exp(((t_0 * y_46re) - (atan2(x_46im, x_46re) * y_46im))) * sin(((t_0 * y_46im) + (atan2(x_46im, x_46re) * y_46re)))
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
return Math.exp(((t_0 * y_46_re) - (Math.atan2(x_46_im, x_46_re) * y_46_im))) * Math.sin(((t_0 * 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.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) return math.exp(((t_0 * y_46_re) - (math.atan2(x_46_im, x_46_re) * y_46_im))) * math.sin(((t_0 * y_46_im) + (math.atan2(x_46_im, x_46_re) * y_46_re)))
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) return Float64(exp(Float64(Float64(t_0 * y_46_re) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * sin(Float64(Float64(t_0 * y_46_im) + Float64(atan(x_46_im, x_46_re) * y_46_re)))) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))); tmp = exp(((t_0 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin(((t_0 * y_46_im) + (atan2(x_46_im, x_46_re) * y_46_re))); end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]}, N[(N[Exp[N[(N[(t$95$0 * y$46$re), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(N[(t$95$0 * y$46$im), $MachinePrecision] + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)\\
e^{t_0 \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(t_0 \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)
\end{array}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 21 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (sqrt (+ (* x.re x.re) (* x.im x.im))))))
(*
(exp (- (* t_0 y.re) (* (atan2 x.im x.re) y.im)))
(sin (+ (* t_0 y.im) (* (atan2 x.im x.re) y.re))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
return exp(((t_0 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin(((t_0 * y_46_im) + (atan2(x_46_im, x_46_re) * y_46_re)));
}
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
t_0 = log(sqrt(((x_46re * x_46re) + (x_46im * x_46im))))
code = exp(((t_0 * y_46re) - (atan2(x_46im, x_46re) * y_46im))) * sin(((t_0 * y_46im) + (atan2(x_46im, x_46re) * y_46re)))
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
return Math.exp(((t_0 * y_46_re) - (Math.atan2(x_46_im, x_46_re) * y_46_im))) * Math.sin(((t_0 * 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.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) return math.exp(((t_0 * y_46_re) - (math.atan2(x_46_im, x_46_re) * y_46_im))) * math.sin(((t_0 * y_46_im) + (math.atan2(x_46_im, x_46_re) * y_46_re)))
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) return Float64(exp(Float64(Float64(t_0 * y_46_re) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * sin(Float64(Float64(t_0 * y_46_im) + Float64(atan(x_46_im, x_46_re) * y_46_re)))) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))); tmp = exp(((t_0 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin(((t_0 * y_46_im) + (atan2(x_46_im, x_46_re) * y_46_re))); end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]}, N[(N[Exp[N[(N[(t$95$0 * y$46$re), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(N[(t$95$0 * y$46$im), $MachinePrecision] + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)\\
e^{t_0 \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(t_0 \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)
\end{array}
\end{array}
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(t_1 (log (hypot x.re x.im)))
(t_2 (cbrt t_1))
(t_3 (* y.re (atan2 x.im x.re)))
(t_4 (sin (+ t_3 (* y.im (log (pow (exp (pow t_2 2.0)) t_2))))))
(t_5 (* (atan2 x.im x.re) y.im))
(t_6 (exp (- (* (log (- x.re)) y.re) t_5)))
(t_7 (* t_6 (pow (cbrt (sin (fma t_1 y.im t_3))) 3.0)))
(t_8 (exp (- (* y.re t_0) t_5))))
(if (<= x.re -2.26e+21)
t_7
(if (<= x.re -1.3e-91)
(* t_8 t_4)
(if (<= x.re -1.3e-138)
t_7
(if (<= x.re -1.6e-209)
(* t_3 t_8)
(if (<= x.re -1.92e-230)
(* t_8 (sin (pow (cbrt (* y.im (log (hypot x.im x.re)))) 3.0)))
(if (<= x.re -3.8e-261)
(* t_6 (sin t_3))
(if (<= x.re 2.3e-260)
(* t_8 (* y.im t_0))
(* t_4 (exp (- (* y.re (log x.re)) t_5))))))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
double t_1 = log(hypot(x_46_re, x_46_im));
double t_2 = cbrt(t_1);
double t_3 = y_46_re * atan2(x_46_im, x_46_re);
double t_4 = sin((t_3 + (y_46_im * log(pow(exp(pow(t_2, 2.0)), t_2)))));
double t_5 = atan2(x_46_im, x_46_re) * y_46_im;
double t_6 = exp(((log(-x_46_re) * y_46_re) - t_5));
double t_7 = t_6 * pow(cbrt(sin(fma(t_1, y_46_im, t_3))), 3.0);
double t_8 = exp(((y_46_re * t_0) - t_5));
double tmp;
if (x_46_re <= -2.26e+21) {
tmp = t_7;
} else if (x_46_re <= -1.3e-91) {
tmp = t_8 * t_4;
} else if (x_46_re <= -1.3e-138) {
tmp = t_7;
} else if (x_46_re <= -1.6e-209) {
tmp = t_3 * t_8;
} else if (x_46_re <= -1.92e-230) {
tmp = t_8 * sin(pow(cbrt((y_46_im * log(hypot(x_46_im, x_46_re)))), 3.0));
} else if (x_46_re <= -3.8e-261) {
tmp = t_6 * sin(t_3);
} else if (x_46_re <= 2.3e-260) {
tmp = t_8 * (y_46_im * t_0);
} else {
tmp = t_4 * exp(((y_46_re * log(x_46_re)) - t_5));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) t_1 = log(hypot(x_46_re, x_46_im)) t_2 = cbrt(t_1) t_3 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_4 = sin(Float64(t_3 + Float64(y_46_im * log((exp((t_2 ^ 2.0)) ^ t_2))))) t_5 = Float64(atan(x_46_im, x_46_re) * y_46_im) t_6 = exp(Float64(Float64(log(Float64(-x_46_re)) * y_46_re) - t_5)) t_7 = Float64(t_6 * (cbrt(sin(fma(t_1, y_46_im, t_3))) ^ 3.0)) t_8 = exp(Float64(Float64(y_46_re * t_0) - t_5)) tmp = 0.0 if (x_46_re <= -2.26e+21) tmp = t_7; elseif (x_46_re <= -1.3e-91) tmp = Float64(t_8 * t_4); elseif (x_46_re <= -1.3e-138) tmp = t_7; elseif (x_46_re <= -1.6e-209) tmp = Float64(t_3 * t_8); elseif (x_46_re <= -1.92e-230) tmp = Float64(t_8 * sin((cbrt(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) ^ 3.0))); elseif (x_46_re <= -3.8e-261) tmp = Float64(t_6 * sin(t_3)); elseif (x_46_re <= 2.3e-260) tmp = Float64(t_8 * Float64(y_46_im * t_0)); else tmp = Float64(t_4 * exp(Float64(Float64(y_46_re * log(x_46_re)) - t_5))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[Power[t$95$1, 1/3], $MachinePrecision]}, Block[{t$95$3 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[Sin[N[(t$95$3 + N[(y$46$im * N[Log[N[Power[N[Exp[N[Power[t$95$2, 2.0], $MachinePrecision]], $MachinePrecision], t$95$2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$5 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, Block[{t$95$6 = N[Exp[N[(N[(N[Log[(-x$46$re)], $MachinePrecision] * y$46$re), $MachinePrecision] - t$95$5), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$7 = N[(t$95$6 * N[Power[N[Power[N[Sin[N[(t$95$1 * y$46$im + t$95$3), $MachinePrecision]], $MachinePrecision], 1/3], $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$8 = N[Exp[N[(N[(y$46$re * t$95$0), $MachinePrecision] - t$95$5), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[x$46$re, -2.26e+21], t$95$7, If[LessEqual[x$46$re, -1.3e-91], N[(t$95$8 * t$95$4), $MachinePrecision], If[LessEqual[x$46$re, -1.3e-138], t$95$7, If[LessEqual[x$46$re, -1.6e-209], N[(t$95$3 * t$95$8), $MachinePrecision], If[LessEqual[x$46$re, -1.92e-230], N[(t$95$8 * N[Sin[N[Power[N[Power[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, -3.8e-261], N[(t$95$6 * N[Sin[t$95$3], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, 2.3e-260], N[(t$95$8 * N[(y$46$im * t$95$0), $MachinePrecision]), $MachinePrecision], N[(t$95$4 * N[Exp[N[(N[(y$46$re * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision] - t$95$5), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)\\
t_1 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
t_2 := \sqrt[3]{t_1}\\
t_3 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_4 := \sin \left(t_3 + y.im \cdot \log \left({\left(e^{{t_2}^{2}}\right)}^{t_2}\right)\right)\\
t_5 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_6 := e^{\log \left(-x.re\right) \cdot y.re - t_5}\\
t_7 := t_6 \cdot {\left(\sqrt[3]{\sin \left(\mathsf{fma}\left(t_1, y.im, t_3\right)\right)}\right)}^{3}\\
t_8 := e^{y.re \cdot t_0 - t_5}\\
\mathbf{if}\;x.re \leq -2.26 \cdot 10^{+21}:\\
\;\;\;\;t_7\\
\mathbf{elif}\;x.re \leq -1.3 \cdot 10^{-91}:\\
\;\;\;\;t_8 \cdot t_4\\
\mathbf{elif}\;x.re \leq -1.3 \cdot 10^{-138}:\\
\;\;\;\;t_7\\
\mathbf{elif}\;x.re \leq -1.6 \cdot 10^{-209}:\\
\;\;\;\;t_3 \cdot t_8\\
\mathbf{elif}\;x.re \leq -1.92 \cdot 10^{-230}:\\
\;\;\;\;t_8 \cdot \sin \left({\left(\sqrt[3]{y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)}\right)}^{3}\right)\\
\mathbf{elif}\;x.re \leq -3.8 \cdot 10^{-261}:\\
\;\;\;\;t_6 \cdot \sin t_3\\
\mathbf{elif}\;x.re \leq 2.3 \cdot 10^{-260}:\\
\;\;\;\;t_8 \cdot \left(y.im \cdot t_0\right)\\
\mathbf{else}:\\
\;\;\;\;t_4 \cdot e^{y.re \cdot \log x.re - t_5}\\
\end{array}
\end{array}
if x.re < -2.26e21 or -1.30000000000000007e-91 < x.re < -1.3e-138Initial program 29.4%
add-cube-cbrt29.3%
pow329.3%
fma-def29.3%
hypot-def53.9%
Applied egg-rr53.9%
Taylor expanded in x.re around -inf 84.7%
mul-1-neg84.7%
Simplified84.7%
if -2.26e21 < x.re < -1.30000000000000007e-91Initial program 59.9%
add-exp-log59.9%
add-cube-cbrt64.8%
exp-prod64.8%
pow264.8%
hypot-def64.8%
hypot-def79.8%
Applied egg-rr79.8%
if -1.3e-138 < x.re < -1.6000000000000001e-209Initial program 50.0%
Taylor expanded in y.im around 0 57.3%
Taylor expanded in y.re around 0 78.7%
if -1.6000000000000001e-209 < x.re < -1.91999999999999993e-230Initial program 16.4%
Taylor expanded in y.re around 0 33.1%
unpow233.1%
unpow233.1%
hypot-def67.2%
Simplified67.2%
add-cube-cbrt83.8%
pow383.8%
Applied egg-rr83.8%
if -1.91999999999999993e-230 < x.re < -3.8e-261Initial program 50.0%
Taylor expanded in y.im around 0 75.4%
Taylor expanded in x.re around -inf 100.0%
mul-1-neg86.8%
Simplified100.0%
if -3.8e-261 < x.re < 2.3e-260Initial program 42.1%
Taylor expanded in y.re around 0 52.6%
unpow252.6%
unpow252.6%
hypot-def63.4%
Simplified63.4%
Taylor expanded in y.im around 0 79.2%
unpow279.2%
unpow279.2%
Simplified79.2%
if 2.3e-260 < x.re Initial program 43.5%
add-exp-log43.5%
add-cube-cbrt46.6%
exp-prod46.6%
pow246.6%
hypot-def46.6%
hypot-def68.1%
Applied egg-rr68.1%
Taylor expanded in x.re around inf 80.6%
Final simplification82.1%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(t_1 (log (hypot x.re x.im)))
(t_2 (* y.re (atan2 x.im x.re)))
(t_3 (* (atan2 x.im x.re) y.im))
(t_4 (exp (- (* (log (- x.re)) y.re) t_3)))
(t_5 (exp (- (* y.re t_0) t_3)))
(t_6 (cbrt t_1)))
(if (<= x.re -1.7e-26)
(* t_4 (pow (cbrt (sin (fma t_1 y.im t_2))) 3.0))
(if (<= x.re -2.45e-229)
(* t_5 (sin (pow (cbrt (* y.im (log (hypot x.im x.re)))) 3.0)))
(if (<= x.re -2.6e-261)
(* t_4 (sin t_2))
(if (<= x.re 2.3e-260)
(* t_5 (* y.im t_0))
(*
(sin (+ t_2 (* y.im (log (pow (exp (pow t_6 2.0)) t_6)))))
(exp (- (* y.re (log x.re)) t_3)))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
double t_1 = log(hypot(x_46_re, x_46_im));
double t_2 = y_46_re * atan2(x_46_im, x_46_re);
double t_3 = atan2(x_46_im, x_46_re) * y_46_im;
double t_4 = exp(((log(-x_46_re) * y_46_re) - t_3));
double t_5 = exp(((y_46_re * t_0) - t_3));
double t_6 = cbrt(t_1);
double tmp;
if (x_46_re <= -1.7e-26) {
tmp = t_4 * pow(cbrt(sin(fma(t_1, y_46_im, t_2))), 3.0);
} else if (x_46_re <= -2.45e-229) {
tmp = t_5 * sin(pow(cbrt((y_46_im * log(hypot(x_46_im, x_46_re)))), 3.0));
} else if (x_46_re <= -2.6e-261) {
tmp = t_4 * sin(t_2);
} else if (x_46_re <= 2.3e-260) {
tmp = t_5 * (y_46_im * t_0);
} else {
tmp = sin((t_2 + (y_46_im * log(pow(exp(pow(t_6, 2.0)), t_6))))) * exp(((y_46_re * log(x_46_re)) - t_3));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) t_1 = log(hypot(x_46_re, x_46_im)) t_2 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_3 = Float64(atan(x_46_im, x_46_re) * y_46_im) t_4 = exp(Float64(Float64(log(Float64(-x_46_re)) * y_46_re) - t_3)) t_5 = exp(Float64(Float64(y_46_re * t_0) - t_3)) t_6 = cbrt(t_1) tmp = 0.0 if (x_46_re <= -1.7e-26) tmp = Float64(t_4 * (cbrt(sin(fma(t_1, y_46_im, t_2))) ^ 3.0)); elseif (x_46_re <= -2.45e-229) tmp = Float64(t_5 * sin((cbrt(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) ^ 3.0))); elseif (x_46_re <= -2.6e-261) tmp = Float64(t_4 * sin(t_2)); elseif (x_46_re <= 2.3e-260) tmp = Float64(t_5 * Float64(y_46_im * t_0)); else tmp = Float64(sin(Float64(t_2 + Float64(y_46_im * log((exp((t_6 ^ 2.0)) ^ t_6))))) * exp(Float64(Float64(y_46_re * log(x_46_re)) - t_3))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, Block[{t$95$4 = N[Exp[N[(N[(N[Log[(-x$46$re)], $MachinePrecision] * y$46$re), $MachinePrecision] - t$95$3), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$5 = N[Exp[N[(N[(y$46$re * t$95$0), $MachinePrecision] - t$95$3), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$6 = N[Power[t$95$1, 1/3], $MachinePrecision]}, If[LessEqual[x$46$re, -1.7e-26], N[(t$95$4 * N[Power[N[Power[N[Sin[N[(t$95$1 * y$46$im + t$95$2), $MachinePrecision]], $MachinePrecision], 1/3], $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, -2.45e-229], N[(t$95$5 * N[Sin[N[Power[N[Power[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, -2.6e-261], N[(t$95$4 * N[Sin[t$95$2], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, 2.3e-260], N[(t$95$5 * N[(y$46$im * t$95$0), $MachinePrecision]), $MachinePrecision], N[(N[Sin[N[(t$95$2 + N[(y$46$im * N[Log[N[Power[N[Exp[N[Power[t$95$6, 2.0], $MachinePrecision]], $MachinePrecision], t$95$6], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Exp[N[(N[(y$46$re * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision] - t$95$3), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)\\
t_1 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
t_2 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_3 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_4 := e^{\log \left(-x.re\right) \cdot y.re - t_3}\\
t_5 := e^{y.re \cdot t_0 - t_3}\\
t_6 := \sqrt[3]{t_1}\\
\mathbf{if}\;x.re \leq -1.7 \cdot 10^{-26}:\\
\;\;\;\;t_4 \cdot {\left(\sqrt[3]{\sin \left(\mathsf{fma}\left(t_1, y.im, t_2\right)\right)}\right)}^{3}\\
\mathbf{elif}\;x.re \leq -2.45 \cdot 10^{-229}:\\
\;\;\;\;t_5 \cdot \sin \left({\left(\sqrt[3]{y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)}\right)}^{3}\right)\\
\mathbf{elif}\;x.re \leq -2.6 \cdot 10^{-261}:\\
\;\;\;\;t_4 \cdot \sin t_2\\
\mathbf{elif}\;x.re \leq 2.3 \cdot 10^{-260}:\\
\;\;\;\;t_5 \cdot \left(y.im \cdot t_0\right)\\
\mathbf{else}:\\
\;\;\;\;\sin \left(t_2 + y.im \cdot \log \left({\left(e^{{t_6}^{2}}\right)}^{t_6}\right)\right) \cdot e^{y.re \cdot \log x.re - t_3}\\
\end{array}
\end{array}
if x.re < -1.70000000000000007e-26Initial program 28.1%
add-cube-cbrt27.9%
pow327.9%
fma-def27.9%
hypot-def55.5%
Applied egg-rr55.5%
Taylor expanded in x.re around -inf 80.7%
mul-1-neg80.7%
Simplified80.7%
if -1.70000000000000007e-26 < x.re < -2.44999999999999987e-229Initial program 49.9%
Taylor expanded in y.re around 0 46.9%
unpow246.9%
unpow246.9%
hypot-def65.4%
Simplified65.4%
add-cube-cbrt74.5%
pow376.8%
Applied egg-rr76.8%
if -2.44999999999999987e-229 < x.re < -2.6000000000000001e-261Initial program 50.0%
Taylor expanded in y.im around 0 75.4%
Taylor expanded in x.re around -inf 100.0%
mul-1-neg86.8%
Simplified100.0%
if -2.6000000000000001e-261 < x.re < 2.3e-260Initial program 42.1%
Taylor expanded in y.re around 0 52.6%
unpow252.6%
unpow252.6%
hypot-def63.4%
Simplified63.4%
Taylor expanded in y.im around 0 79.2%
unpow279.2%
unpow279.2%
Simplified79.2%
if 2.3e-260 < x.re Initial program 43.5%
add-exp-log43.5%
add-cube-cbrt46.6%
exp-prod46.6%
pow246.6%
hypot-def46.6%
hypot-def68.1%
Applied egg-rr68.1%
Taylor expanded in x.re around inf 80.6%
Final simplification80.5%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(t_1 (* y.re (atan2 x.im x.re)))
(t_2 (* (atan2 x.im x.re) y.im))
(t_3 (exp (- (* (log (- x.re)) y.re) t_2)))
(t_4 (exp (- (* y.re t_0) t_2))))
(if (<= x.re -1.25e-26)
(* t_3 (sin (- t_1 (* y.im (log (/ -1.0 x.re))))))
(if (<= x.re -1.08e-228)
(* t_4 (sin (pow (cbrt (* y.im (log (hypot x.im x.re)))) 3.0)))
(if (<= x.re -4.8e-261)
(* t_3 (sin t_1))
(if (<= x.re 2.5e-260)
(* t_4 (* y.im t_0))
(*
(pow (cbrt (sin (fma (log (hypot x.re x.im)) y.im t_1))) 3.0)
(exp (- (* y.re (log x.re)) t_2)))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(sqrt(((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 = atan2(x_46_im, x_46_re) * y_46_im;
double t_3 = exp(((log(-x_46_re) * y_46_re) - t_2));
double t_4 = exp(((y_46_re * t_0) - t_2));
double tmp;
if (x_46_re <= -1.25e-26) {
tmp = t_3 * sin((t_1 - (y_46_im * log((-1.0 / x_46_re)))));
} else if (x_46_re <= -1.08e-228) {
tmp = t_4 * sin(pow(cbrt((y_46_im * log(hypot(x_46_im, x_46_re)))), 3.0));
} else if (x_46_re <= -4.8e-261) {
tmp = t_3 * sin(t_1);
} else if (x_46_re <= 2.5e-260) {
tmp = t_4 * (y_46_im * t_0);
} else {
tmp = pow(cbrt(sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_1))), 3.0) * exp(((y_46_re * log(x_46_re)) - t_2));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(sqrt(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 = Float64(atan(x_46_im, x_46_re) * y_46_im) t_3 = exp(Float64(Float64(log(Float64(-x_46_re)) * y_46_re) - t_2)) t_4 = exp(Float64(Float64(y_46_re * t_0) - t_2)) tmp = 0.0 if (x_46_re <= -1.25e-26) tmp = Float64(t_3 * sin(Float64(t_1 - Float64(y_46_im * log(Float64(-1.0 / x_46_re)))))); elseif (x_46_re <= -1.08e-228) tmp = Float64(t_4 * sin((cbrt(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) ^ 3.0))); elseif (x_46_re <= -4.8e-261) tmp = Float64(t_3 * sin(t_1)); elseif (x_46_re <= 2.5e-260) tmp = Float64(t_4 * Float64(y_46_im * t_0)); else tmp = Float64((cbrt(sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_1))) ^ 3.0) * exp(Float64(Float64(y_46_re * log(x_46_re)) - t_2))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $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[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, Block[{t$95$3 = N[Exp[N[(N[(N[Log[(-x$46$re)], $MachinePrecision] * y$46$re), $MachinePrecision] - t$95$2), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$4 = N[Exp[N[(N[(y$46$re * t$95$0), $MachinePrecision] - t$95$2), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[x$46$re, -1.25e-26], N[(t$95$3 * N[Sin[N[(t$95$1 - N[(y$46$im * N[Log[N[(-1.0 / x$46$re), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, -1.08e-228], N[(t$95$4 * N[Sin[N[Power[N[Power[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, -4.8e-261], N[(t$95$3 * N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, 2.5e-260], N[(t$95$4 * N[(y$46$im * t$95$0), $MachinePrecision]), $MachinePrecision], N[(N[Power[N[Power[N[Sin[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im + t$95$1), $MachinePrecision]], $MachinePrecision], 1/3], $MachinePrecision], 3.0], $MachinePrecision] * N[Exp[N[(N[(y$46$re * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_2 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_3 := e^{\log \left(-x.re\right) \cdot y.re - t_2}\\
t_4 := e^{y.re \cdot t_0 - t_2}\\
\mathbf{if}\;x.re \leq -1.25 \cdot 10^{-26}:\\
\;\;\;\;t_3 \cdot \sin \left(t_1 - y.im \cdot \log \left(\frac{-1}{x.re}\right)\right)\\
\mathbf{elif}\;x.re \leq -1.08 \cdot 10^{-228}:\\
\;\;\;\;t_4 \cdot \sin \left({\left(\sqrt[3]{y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)}\right)}^{3}\right)\\
\mathbf{elif}\;x.re \leq -4.8 \cdot 10^{-261}:\\
\;\;\;\;t_3 \cdot \sin t_1\\
\mathbf{elif}\;x.re \leq 2.5 \cdot 10^{-260}:\\
\;\;\;\;t_4 \cdot \left(y.im \cdot t_0\right)\\
\mathbf{else}:\\
\;\;\;\;{\left(\sqrt[3]{\sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, t_1\right)\right)}\right)}^{3} \cdot e^{y.re \cdot \log x.re - t_2}\\
\end{array}
\end{array}
if x.re < -1.25000000000000005e-26Initial program 28.1%
add-log-exp20.0%
fma-def20.0%
hypot-def47.3%
Applied egg-rr47.3%
Taylor expanded in x.re around -inf 50.9%
mul-1-neg80.7%
Simplified50.9%
Taylor expanded in x.re around -inf 79.8%
if -1.25000000000000005e-26 < x.re < -1.0799999999999999e-228Initial program 49.9%
Taylor expanded in y.re around 0 46.9%
unpow246.9%
unpow246.9%
hypot-def65.4%
Simplified65.4%
add-cube-cbrt74.5%
pow376.8%
Applied egg-rr76.8%
if -1.0799999999999999e-228 < x.re < -4.80000000000000028e-261Initial program 50.0%
Taylor expanded in y.im around 0 75.4%
Taylor expanded in x.re around -inf 100.0%
mul-1-neg86.8%
Simplified100.0%
if -4.80000000000000028e-261 < x.re < 2.5000000000000002e-260Initial program 42.1%
Taylor expanded in y.re around 0 52.6%
unpow252.6%
unpow252.6%
hypot-def63.4%
Simplified63.4%
Taylor expanded in y.im around 0 79.2%
unpow279.2%
unpow279.2%
Simplified79.2%
if 2.5000000000000002e-260 < x.re Initial program 43.5%
add-cube-cbrt43.3%
pow343.3%
fma-def43.3%
hypot-def66.4%
Applied egg-rr66.4%
Taylor expanded in x.re around inf 78.0%
Final simplification79.0%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(t_1 (* y.re (atan2 x.im x.re)))
(t_2 (pow (cbrt (sin (fma (log (hypot x.re x.im)) y.im t_1))) 3.0))
(t_3 (* (atan2 x.im x.re) y.im))
(t_4 (exp (- (* (log (- x.re)) y.re) t_3)))
(t_5 (exp (- (* y.re t_0) t_3))))
(if (<= x.re -4.8e-26)
(* t_4 t_2)
(if (<= x.re -3.6e-229)
(* t_5 (sin (pow (cbrt (* y.im (log (hypot x.im x.re)))) 3.0)))
(if (<= x.re -4.8e-261)
(* t_4 (sin t_1))
(if (<= x.re 2.3e-260)
(* t_5 (* y.im t_0))
(* t_2 (exp (- (* y.re (log x.re)) t_3)))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(sqrt(((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 = pow(cbrt(sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_1))), 3.0);
double t_3 = atan2(x_46_im, x_46_re) * y_46_im;
double t_4 = exp(((log(-x_46_re) * y_46_re) - t_3));
double t_5 = exp(((y_46_re * t_0) - t_3));
double tmp;
if (x_46_re <= -4.8e-26) {
tmp = t_4 * t_2;
} else if (x_46_re <= -3.6e-229) {
tmp = t_5 * sin(pow(cbrt((y_46_im * log(hypot(x_46_im, x_46_re)))), 3.0));
} else if (x_46_re <= -4.8e-261) {
tmp = t_4 * sin(t_1);
} else if (x_46_re <= 2.3e-260) {
tmp = t_5 * (y_46_im * t_0);
} else {
tmp = t_2 * exp(((y_46_re * log(x_46_re)) - t_3));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(sqrt(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 = cbrt(sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_1))) ^ 3.0 t_3 = Float64(atan(x_46_im, x_46_re) * y_46_im) t_4 = exp(Float64(Float64(log(Float64(-x_46_re)) * y_46_re) - t_3)) t_5 = exp(Float64(Float64(y_46_re * t_0) - t_3)) tmp = 0.0 if (x_46_re <= -4.8e-26) tmp = Float64(t_4 * t_2); elseif (x_46_re <= -3.6e-229) tmp = Float64(t_5 * sin((cbrt(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) ^ 3.0))); elseif (x_46_re <= -4.8e-261) tmp = Float64(t_4 * sin(t_1)); elseif (x_46_re <= 2.3e-260) tmp = Float64(t_5 * Float64(y_46_im * t_0)); else tmp = Float64(t_2 * exp(Float64(Float64(y_46_re * log(x_46_re)) - t_3))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $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[Power[N[Power[N[Sin[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im + t$95$1), $MachinePrecision]], $MachinePrecision], 1/3], $MachinePrecision], 3.0], $MachinePrecision]}, Block[{t$95$3 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, Block[{t$95$4 = N[Exp[N[(N[(N[Log[(-x$46$re)], $MachinePrecision] * y$46$re), $MachinePrecision] - t$95$3), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$5 = N[Exp[N[(N[(y$46$re * t$95$0), $MachinePrecision] - t$95$3), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[x$46$re, -4.8e-26], N[(t$95$4 * t$95$2), $MachinePrecision], If[LessEqual[x$46$re, -3.6e-229], N[(t$95$5 * N[Sin[N[Power[N[Power[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, -4.8e-261], N[(t$95$4 * N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, 2.3e-260], N[(t$95$5 * N[(y$46$im * t$95$0), $MachinePrecision]), $MachinePrecision], N[(t$95$2 * N[Exp[N[(N[(y$46$re * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision] - t$95$3), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_2 := {\left(\sqrt[3]{\sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, t_1\right)\right)}\right)}^{3}\\
t_3 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_4 := e^{\log \left(-x.re\right) \cdot y.re - t_3}\\
t_5 := e^{y.re \cdot t_0 - t_3}\\
\mathbf{if}\;x.re \leq -4.8 \cdot 10^{-26}:\\
\;\;\;\;t_4 \cdot t_2\\
\mathbf{elif}\;x.re \leq -3.6 \cdot 10^{-229}:\\
\;\;\;\;t_5 \cdot \sin \left({\left(\sqrt[3]{y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)}\right)}^{3}\right)\\
\mathbf{elif}\;x.re \leq -4.8 \cdot 10^{-261}:\\
\;\;\;\;t_4 \cdot \sin t_1\\
\mathbf{elif}\;x.re \leq 2.3 \cdot 10^{-260}:\\
\;\;\;\;t_5 \cdot \left(y.im \cdot t_0\right)\\
\mathbf{else}:\\
\;\;\;\;t_2 \cdot e^{y.re \cdot \log x.re - t_3}\\
\end{array}
\end{array}
if x.re < -4.8000000000000002e-26Initial program 28.1%
add-cube-cbrt27.9%
pow327.9%
fma-def27.9%
hypot-def55.5%
Applied egg-rr55.5%
Taylor expanded in x.re around -inf 80.7%
mul-1-neg80.7%
Simplified80.7%
if -4.8000000000000002e-26 < x.re < -3.60000000000000003e-229Initial program 49.9%
Taylor expanded in y.re around 0 46.9%
unpow246.9%
unpow246.9%
hypot-def65.4%
Simplified65.4%
add-cube-cbrt74.5%
pow376.8%
Applied egg-rr76.8%
if -3.60000000000000003e-229 < x.re < -4.80000000000000028e-261Initial program 50.0%
Taylor expanded in y.im around 0 75.4%
Taylor expanded in x.re around -inf 100.0%
mul-1-neg86.8%
Simplified100.0%
if -4.80000000000000028e-261 < x.re < 2.3e-260Initial program 42.1%
Taylor expanded in y.re around 0 52.6%
unpow252.6%
unpow252.6%
hypot-def63.4%
Simplified63.4%
Taylor expanded in y.im around 0 79.2%
unpow279.2%
unpow279.2%
Simplified79.2%
if 2.3e-260 < x.re Initial program 43.5%
add-cube-cbrt43.3%
pow343.3%
fma-def43.3%
hypot-def66.4%
Applied egg-rr66.4%
Taylor expanded in x.re around inf 78.0%
Final simplification79.2%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(t_1 (* y.re (atan2 x.im x.re)))
(t_2 (* (atan2 x.im x.re) y.im))
(t_3 (exp (- (* y.re t_0) t_2)))
(t_4 (exp (- (* (log (- x.re)) y.re) t_2)))
(t_5 (* y.im (log (hypot x.im x.re)))))
(if (<= x.re -4.2e-26)
(* t_4 (sin (- t_1 (* y.im (log (/ -1.0 x.re))))))
(if (<= x.re -1.3e-229)
(* t_3 (sin (pow (cbrt t_5) 3.0)))
(if (<= x.re -2.8e-261)
(* t_4 (sin t_1))
(if (<= x.re 2.7e-192)
(* t_3 (* y.im t_0))
(if (<= x.re 205000.0)
(* t_3 (pow (cbrt (sin (+ t_1 (* y.im (log x.re))))) 3.0))
(* (exp (- (* y.re (log x.re)) t_2)) (sin t_5)))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(sqrt(((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 = atan2(x_46_im, x_46_re) * y_46_im;
double t_3 = exp(((y_46_re * t_0) - t_2));
double t_4 = exp(((log(-x_46_re) * y_46_re) - t_2));
double t_5 = y_46_im * log(hypot(x_46_im, x_46_re));
double tmp;
if (x_46_re <= -4.2e-26) {
tmp = t_4 * sin((t_1 - (y_46_im * log((-1.0 / x_46_re)))));
} else if (x_46_re <= -1.3e-229) {
tmp = t_3 * sin(pow(cbrt(t_5), 3.0));
} else if (x_46_re <= -2.8e-261) {
tmp = t_4 * sin(t_1);
} else if (x_46_re <= 2.7e-192) {
tmp = t_3 * (y_46_im * t_0);
} else if (x_46_re <= 205000.0) {
tmp = t_3 * pow(cbrt(sin((t_1 + (y_46_im * log(x_46_re))))), 3.0);
} else {
tmp = exp(((y_46_re * log(x_46_re)) - t_2)) * sin(t_5);
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.log(Math.sqrt(((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.atan2(x_46_im, x_46_re) * y_46_im;
double t_3 = Math.exp(((y_46_re * t_0) - t_2));
double t_4 = Math.exp(((Math.log(-x_46_re) * y_46_re) - t_2));
double t_5 = y_46_im * Math.log(Math.hypot(x_46_im, x_46_re));
double tmp;
if (x_46_re <= -4.2e-26) {
tmp = t_4 * Math.sin((t_1 - (y_46_im * Math.log((-1.0 / x_46_re)))));
} else if (x_46_re <= -1.3e-229) {
tmp = t_3 * Math.sin(Math.pow(Math.cbrt(t_5), 3.0));
} else if (x_46_re <= -2.8e-261) {
tmp = t_4 * Math.sin(t_1);
} else if (x_46_re <= 2.7e-192) {
tmp = t_3 * (y_46_im * t_0);
} else if (x_46_re <= 205000.0) {
tmp = t_3 * Math.pow(Math.cbrt(Math.sin((t_1 + (y_46_im * Math.log(x_46_re))))), 3.0);
} else {
tmp = Math.exp(((y_46_re * Math.log(x_46_re)) - t_2)) * Math.sin(t_5);
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(sqrt(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 = Float64(atan(x_46_im, x_46_re) * y_46_im) t_3 = exp(Float64(Float64(y_46_re * t_0) - t_2)) t_4 = exp(Float64(Float64(log(Float64(-x_46_re)) * y_46_re) - t_2)) t_5 = Float64(y_46_im * log(hypot(x_46_im, x_46_re))) tmp = 0.0 if (x_46_re <= -4.2e-26) tmp = Float64(t_4 * sin(Float64(t_1 - Float64(y_46_im * log(Float64(-1.0 / x_46_re)))))); elseif (x_46_re <= -1.3e-229) tmp = Float64(t_3 * sin((cbrt(t_5) ^ 3.0))); elseif (x_46_re <= -2.8e-261) tmp = Float64(t_4 * sin(t_1)); elseif (x_46_re <= 2.7e-192) tmp = Float64(t_3 * Float64(y_46_im * t_0)); elseif (x_46_re <= 205000.0) tmp = Float64(t_3 * (cbrt(sin(Float64(t_1 + Float64(y_46_im * log(x_46_re))))) ^ 3.0)); else tmp = Float64(exp(Float64(Float64(y_46_re * log(x_46_re)) - t_2)) * sin(t_5)); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $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[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, Block[{t$95$3 = N[Exp[N[(N[(y$46$re * t$95$0), $MachinePrecision] - t$95$2), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$4 = N[Exp[N[(N[(N[Log[(-x$46$re)], $MachinePrecision] * y$46$re), $MachinePrecision] - t$95$2), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$5 = N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x$46$re, -4.2e-26], N[(t$95$4 * N[Sin[N[(t$95$1 - N[(y$46$im * N[Log[N[(-1.0 / x$46$re), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, -1.3e-229], N[(t$95$3 * N[Sin[N[Power[N[Power[t$95$5, 1/3], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, -2.8e-261], N[(t$95$4 * N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, 2.7e-192], N[(t$95$3 * N[(y$46$im * t$95$0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, 205000.0], N[(t$95$3 * N[Power[N[Power[N[Sin[N[(t$95$1 + N[(y$46$im * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], 1/3], $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision], N[(N[Exp[N[(N[(y$46$re * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision]], $MachinePrecision] * N[Sin[t$95$5], $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_2 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_3 := e^{y.re \cdot t_0 - t_2}\\
t_4 := e^{\log \left(-x.re\right) \cdot y.re - t_2}\\
t_5 := y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
\mathbf{if}\;x.re \leq -4.2 \cdot 10^{-26}:\\
\;\;\;\;t_4 \cdot \sin \left(t_1 - y.im \cdot \log \left(\frac{-1}{x.re}\right)\right)\\
\mathbf{elif}\;x.re \leq -1.3 \cdot 10^{-229}:\\
\;\;\;\;t_3 \cdot \sin \left({\left(\sqrt[3]{t_5}\right)}^{3}\right)\\
\mathbf{elif}\;x.re \leq -2.8 \cdot 10^{-261}:\\
\;\;\;\;t_4 \cdot \sin t_1\\
\mathbf{elif}\;x.re \leq 2.7 \cdot 10^{-192}:\\
\;\;\;\;t_3 \cdot \left(y.im \cdot t_0\right)\\
\mathbf{elif}\;x.re \leq 205000:\\
\;\;\;\;t_3 \cdot {\left(\sqrt[3]{\sin \left(t_1 + y.im \cdot \log x.re\right)}\right)}^{3}\\
\mathbf{else}:\\
\;\;\;\;e^{y.re \cdot \log x.re - t_2} \cdot \sin t_5\\
\end{array}
\end{array}
if x.re < -4.20000000000000016e-26Initial program 28.1%
add-log-exp20.0%
fma-def20.0%
hypot-def47.3%
Applied egg-rr47.3%
Taylor expanded in x.re around -inf 50.9%
mul-1-neg80.7%
Simplified50.9%
Taylor expanded in x.re around -inf 79.8%
if -4.20000000000000016e-26 < x.re < -1.3000000000000001e-229Initial program 49.9%
Taylor expanded in y.re around 0 46.9%
unpow246.9%
unpow246.9%
hypot-def65.4%
Simplified65.4%
add-cube-cbrt74.5%
pow376.8%
Applied egg-rr76.8%
if -1.3000000000000001e-229 < x.re < -2.80000000000000009e-261Initial program 50.0%
Taylor expanded in y.im around 0 75.4%
Taylor expanded in x.re around -inf 100.0%
mul-1-neg86.8%
Simplified100.0%
if -2.80000000000000009e-261 < x.re < 2.69999999999999991e-192Initial program 45.2%
Taylor expanded in y.re around 0 51.6%
unpow251.6%
unpow251.6%
hypot-def61.8%
Simplified61.8%
Taylor expanded in y.im around 0 74.5%
unpow274.5%
unpow274.5%
Simplified74.5%
if 2.69999999999999991e-192 < x.re < 205000Initial program 62.3%
add-cube-cbrt62.0%
pow362.0%
fma-def62.0%
hypot-def80.6%
Applied egg-rr80.6%
Taylor expanded in x.im around 0 78.6%
if 205000 < x.re Initial program 31.9%
Taylor expanded in y.re around 0 30.5%
unpow230.5%
unpow230.5%
hypot-def59.9%
Simplified59.9%
Taylor expanded in x.re around inf 76.0%
Final simplification78.1%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re)))
(t_1 (* y.im (log (hypot x.im x.re))))
(t_2 (* (atan2 x.im x.re) y.im))
(t_3
(exp (- (* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im))))) t_2)))
(t_4 (* t_3 (sin (pow (cbrt t_1) 3.0)))))
(if (<= x.re -6.8e-27)
(*
(exp (- (* (log (- x.re)) y.re) t_2))
(sin (- t_0 (* y.im (log (/ -1.0 x.re))))))
(if (<= x.re -2.35e-226)
t_4
(if (<= x.re -4e-288)
(* t_0 t_3)
(if (<= x.re 2.9e-157)
t_4
(if (<= x.re 2.05e-81)
(pow
(cbrt
(*
(sin t_0)
(/
(pow (hypot x.re x.im) y.re)
(pow (exp y.im) (atan2 x.im x.re)))))
3.0)
(* (exp (- (* y.re (log x.re)) t_2)) (sin t_1)))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = y_46_im * log(hypot(x_46_im, x_46_re));
double t_2 = atan2(x_46_im, x_46_re) * y_46_im;
double t_3 = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_2));
double t_4 = t_3 * sin(pow(cbrt(t_1), 3.0));
double tmp;
if (x_46_re <= -6.8e-27) {
tmp = exp(((log(-x_46_re) * y_46_re) - t_2)) * sin((t_0 - (y_46_im * log((-1.0 / x_46_re)))));
} else if (x_46_re <= -2.35e-226) {
tmp = t_4;
} else if (x_46_re <= -4e-288) {
tmp = t_0 * t_3;
} else if (x_46_re <= 2.9e-157) {
tmp = t_4;
} else if (x_46_re <= 2.05e-81) {
tmp = pow(cbrt((sin(t_0) * (pow(hypot(x_46_re, x_46_im), y_46_re) / pow(exp(y_46_im), atan2(x_46_im, x_46_re))))), 3.0);
} else {
tmp = exp(((y_46_re * log(x_46_re)) - t_2)) * sin(t_1);
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_1 = y_46_im * Math.log(Math.hypot(x_46_im, x_46_re));
double t_2 = Math.atan2(x_46_im, x_46_re) * y_46_im;
double t_3 = Math.exp(((y_46_re * Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_2));
double t_4 = t_3 * Math.sin(Math.pow(Math.cbrt(t_1), 3.0));
double tmp;
if (x_46_re <= -6.8e-27) {
tmp = Math.exp(((Math.log(-x_46_re) * y_46_re) - t_2)) * Math.sin((t_0 - (y_46_im * Math.log((-1.0 / x_46_re)))));
} else if (x_46_re <= -2.35e-226) {
tmp = t_4;
} else if (x_46_re <= -4e-288) {
tmp = t_0 * t_3;
} else if (x_46_re <= 2.9e-157) {
tmp = t_4;
} else if (x_46_re <= 2.05e-81) {
tmp = Math.pow(Math.cbrt((Math.sin(t_0) * (Math.pow(Math.hypot(x_46_re, x_46_im), y_46_re) / Math.pow(Math.exp(y_46_im), Math.atan2(x_46_im, x_46_re))))), 3.0);
} else {
tmp = Math.exp(((y_46_re * Math.log(x_46_re)) - t_2)) * Math.sin(t_1);
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_1 = Float64(y_46_im * log(hypot(x_46_im, x_46_re))) t_2 = Float64(atan(x_46_im, x_46_re) * y_46_im) t_3 = exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - t_2)) t_4 = Float64(t_3 * sin((cbrt(t_1) ^ 3.0))) tmp = 0.0 if (x_46_re <= -6.8e-27) tmp = Float64(exp(Float64(Float64(log(Float64(-x_46_re)) * y_46_re) - t_2)) * sin(Float64(t_0 - Float64(y_46_im * log(Float64(-1.0 / x_46_re)))))); elseif (x_46_re <= -2.35e-226) tmp = t_4; elseif (x_46_re <= -4e-288) tmp = Float64(t_0 * t_3); elseif (x_46_re <= 2.9e-157) tmp = t_4; elseif (x_46_re <= 2.05e-81) tmp = cbrt(Float64(sin(t_0) * Float64((hypot(x_46_re, x_46_im) ^ y_46_re) / (exp(y_46_im) ^ atan(x_46_im, x_46_re))))) ^ 3.0; else tmp = Float64(exp(Float64(Float64(y_46_re * log(x_46_re)) - t_2)) * sin(t_1)); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, Block[{t$95$3 = N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$4 = N[(t$95$3 * N[Sin[N[Power[N[Power[t$95$1, 1/3], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x$46$re, -6.8e-27], N[(N[Exp[N[(N[(N[Log[(-x$46$re)], $MachinePrecision] * y$46$re), $MachinePrecision] - t$95$2), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(t$95$0 - N[(y$46$im * N[Log[N[(-1.0 / x$46$re), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, -2.35e-226], t$95$4, If[LessEqual[x$46$re, -4e-288], N[(t$95$0 * t$95$3), $MachinePrecision], If[LessEqual[x$46$re, 2.9e-157], t$95$4, If[LessEqual[x$46$re, 2.05e-81], N[Power[N[Power[N[(N[Sin[t$95$0], $MachinePrecision] * N[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] / N[Power[N[Exp[y$46$im], $MachinePrecision], N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision], 3.0], $MachinePrecision], N[(N[Exp[N[(N[(y$46$re * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision]], $MachinePrecision] * N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
t_2 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_3 := e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - t_2}\\
t_4 := t_3 \cdot \sin \left({\left(\sqrt[3]{t_1}\right)}^{3}\right)\\
\mathbf{if}\;x.re \leq -6.8 \cdot 10^{-27}:\\
\;\;\;\;e^{\log \left(-x.re\right) \cdot y.re - t_2} \cdot \sin \left(t_0 - y.im \cdot \log \left(\frac{-1}{x.re}\right)\right)\\
\mathbf{elif}\;x.re \leq -2.35 \cdot 10^{-226}:\\
\;\;\;\;t_4\\
\mathbf{elif}\;x.re \leq -4 \cdot 10^{-288}:\\
\;\;\;\;t_0 \cdot t_3\\
\mathbf{elif}\;x.re \leq 2.9 \cdot 10^{-157}:\\
\;\;\;\;t_4\\
\mathbf{elif}\;x.re \leq 2.05 \cdot 10^{-81}:\\
\;\;\;\;{\left(\sqrt[3]{\sin t_0 \cdot \frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{{\left(e^{y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}}}\right)}^{3}\\
\mathbf{else}:\\
\;\;\;\;e^{y.re \cdot \log x.re - t_2} \cdot \sin t_1\\
\end{array}
\end{array}
if x.re < -6.7999999999999994e-27Initial program 28.1%
add-log-exp20.0%
fma-def20.0%
hypot-def47.3%
Applied egg-rr47.3%
Taylor expanded in x.re around -inf 50.9%
mul-1-neg80.7%
Simplified50.9%
Taylor expanded in x.re around -inf 79.8%
if -6.7999999999999994e-27 < x.re < -2.34999999999999999e-226 or -4.00000000000000023e-288 < x.re < 2.89999999999999988e-157Initial program 49.7%
Taylor expanded in y.re around 0 50.6%
unpow250.6%
unpow250.6%
hypot-def68.3%
Simplified68.3%
add-cube-cbrt74.8%
pow377.4%
Applied egg-rr77.4%
if -2.34999999999999999e-226 < x.re < -4.00000000000000023e-288Initial program 46.7%
Taylor expanded in y.im around 0 66.9%
Taylor expanded in y.re around 0 80.2%
if 2.89999999999999988e-157 < x.re < 2.04999999999999992e-81Initial program 52.4%
Taylor expanded in y.im around 0 60.7%
add-cube-cbrt60.6%
pow360.6%
Applied egg-rr69.2%
if 2.04999999999999992e-81 < x.re Initial program 38.4%
Taylor expanded in y.re around 0 37.3%
unpow237.3%
unpow237.3%
hypot-def63.4%
Simplified63.4%
Taylor expanded in x.re around inf 76.4%
Final simplification77.2%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(t_1 (* y.re (atan2 x.im x.re)))
(t_2 (sin (* y.im (log (hypot x.im x.re)))))
(t_3 (* (atan2 x.im x.re) y.im))
(t_4 (exp (- (* y.re (log x.re)) t_3)))
(t_5 (exp (- (* (log (- x.re)) y.re) t_3)))
(t_6 (exp (- (* y.re t_0) t_3)))
(t_7 (* t_6 t_2))
(t_8 (sin t_1)))
(if (<= x.re -11200000.0)
(* t_5 (sin (- t_1 (* y.im (log (/ -1.0 x.re))))))
(if (<= x.re -5.5e-228)
t_7
(if (<= x.re -2.9e-261)
(* t_5 t_8)
(if (<= x.re 1.95e-199)
(* t_6 (* y.im t_0))
(if (<= x.re 5.5e-138)
(* t_8 t_4)
(if (<= x.re 4.6e+48) t_7 (* t_4 t_2)))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(sqrt(((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((y_46_im * log(hypot(x_46_im, x_46_re))));
double t_3 = atan2(x_46_im, x_46_re) * y_46_im;
double t_4 = exp(((y_46_re * log(x_46_re)) - t_3));
double t_5 = exp(((log(-x_46_re) * y_46_re) - t_3));
double t_6 = exp(((y_46_re * t_0) - t_3));
double t_7 = t_6 * t_2;
double t_8 = sin(t_1);
double tmp;
if (x_46_re <= -11200000.0) {
tmp = t_5 * sin((t_1 - (y_46_im * log((-1.0 / x_46_re)))));
} else if (x_46_re <= -5.5e-228) {
tmp = t_7;
} else if (x_46_re <= -2.9e-261) {
tmp = t_5 * t_8;
} else if (x_46_re <= 1.95e-199) {
tmp = t_6 * (y_46_im * t_0);
} else if (x_46_re <= 5.5e-138) {
tmp = t_8 * t_4;
} else if (x_46_re <= 4.6e+48) {
tmp = t_7;
} else {
tmp = t_4 * t_2;
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.log(Math.sqrt(((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((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re))));
double t_3 = Math.atan2(x_46_im, x_46_re) * y_46_im;
double t_4 = Math.exp(((y_46_re * Math.log(x_46_re)) - t_3));
double t_5 = Math.exp(((Math.log(-x_46_re) * y_46_re) - t_3));
double t_6 = Math.exp(((y_46_re * t_0) - t_3));
double t_7 = t_6 * t_2;
double t_8 = Math.sin(t_1);
double tmp;
if (x_46_re <= -11200000.0) {
tmp = t_5 * Math.sin((t_1 - (y_46_im * Math.log((-1.0 / x_46_re)))));
} else if (x_46_re <= -5.5e-228) {
tmp = t_7;
} else if (x_46_re <= -2.9e-261) {
tmp = t_5 * t_8;
} else if (x_46_re <= 1.95e-199) {
tmp = t_6 * (y_46_im * t_0);
} else if (x_46_re <= 5.5e-138) {
tmp = t_8 * t_4;
} else if (x_46_re <= 4.6e+48) {
tmp = t_7;
} else {
tmp = t_4 * t_2;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.log(math.sqrt(((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((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) t_3 = math.atan2(x_46_im, x_46_re) * y_46_im t_4 = math.exp(((y_46_re * math.log(x_46_re)) - t_3)) t_5 = math.exp(((math.log(-x_46_re) * y_46_re) - t_3)) t_6 = math.exp(((y_46_re * t_0) - t_3)) t_7 = t_6 * t_2 t_8 = math.sin(t_1) tmp = 0 if x_46_re <= -11200000.0: tmp = t_5 * math.sin((t_1 - (y_46_im * math.log((-1.0 / x_46_re))))) elif x_46_re <= -5.5e-228: tmp = t_7 elif x_46_re <= -2.9e-261: tmp = t_5 * t_8 elif x_46_re <= 1.95e-199: tmp = t_6 * (y_46_im * t_0) elif x_46_re <= 5.5e-138: tmp = t_8 * t_4 elif x_46_re <= 4.6e+48: tmp = t_7 else: tmp = t_4 * t_2 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(sqrt(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(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) t_3 = Float64(atan(x_46_im, x_46_re) * y_46_im) t_4 = exp(Float64(Float64(y_46_re * log(x_46_re)) - t_3)) t_5 = exp(Float64(Float64(log(Float64(-x_46_re)) * y_46_re) - t_3)) t_6 = exp(Float64(Float64(y_46_re * t_0) - t_3)) t_7 = Float64(t_6 * t_2) t_8 = sin(t_1) tmp = 0.0 if (x_46_re <= -11200000.0) tmp = Float64(t_5 * sin(Float64(t_1 - Float64(y_46_im * log(Float64(-1.0 / x_46_re)))))); elseif (x_46_re <= -5.5e-228) tmp = t_7; elseif (x_46_re <= -2.9e-261) tmp = Float64(t_5 * t_8); elseif (x_46_re <= 1.95e-199) tmp = Float64(t_6 * Float64(y_46_im * t_0)); elseif (x_46_re <= 5.5e-138) tmp = Float64(t_8 * t_4); elseif (x_46_re <= 4.6e+48) tmp = t_7; else tmp = Float64(t_4 * t_2); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(sqrt(((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((y_46_im * log(hypot(x_46_im, x_46_re)))); t_3 = atan2(x_46_im, x_46_re) * y_46_im; t_4 = exp(((y_46_re * log(x_46_re)) - t_3)); t_5 = exp(((log(-x_46_re) * y_46_re) - t_3)); t_6 = exp(((y_46_re * t_0) - t_3)); t_7 = t_6 * t_2; t_8 = sin(t_1); tmp = 0.0; if (x_46_re <= -11200000.0) tmp = t_5 * sin((t_1 - (y_46_im * log((-1.0 / x_46_re))))); elseif (x_46_re <= -5.5e-228) tmp = t_7; elseif (x_46_re <= -2.9e-261) tmp = t_5 * t_8; elseif (x_46_re <= 1.95e-199) tmp = t_6 * (y_46_im * t_0); elseif (x_46_re <= 5.5e-138) tmp = t_8 * t_4; elseif (x_46_re <= 4.6e+48) tmp = t_7; else tmp = t_4 * t_2; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $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[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, Block[{t$95$4 = N[Exp[N[(N[(y$46$re * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision] - t$95$3), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$5 = N[Exp[N[(N[(N[Log[(-x$46$re)], $MachinePrecision] * y$46$re), $MachinePrecision] - t$95$3), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$6 = N[Exp[N[(N[(y$46$re * t$95$0), $MachinePrecision] - t$95$3), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$7 = N[(t$95$6 * t$95$2), $MachinePrecision]}, Block[{t$95$8 = N[Sin[t$95$1], $MachinePrecision]}, If[LessEqual[x$46$re, -11200000.0], N[(t$95$5 * N[Sin[N[(t$95$1 - N[(y$46$im * N[Log[N[(-1.0 / x$46$re), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, -5.5e-228], t$95$7, If[LessEqual[x$46$re, -2.9e-261], N[(t$95$5 * t$95$8), $MachinePrecision], If[LessEqual[x$46$re, 1.95e-199], N[(t$95$6 * N[(y$46$im * t$95$0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, 5.5e-138], N[(t$95$8 * t$95$4), $MachinePrecision], If[LessEqual[x$46$re, 4.6e+48], t$95$7, N[(t$95$4 * t$95$2), $MachinePrecision]]]]]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_2 := \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
t_3 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_4 := e^{y.re \cdot \log x.re - t_3}\\
t_5 := e^{\log \left(-x.re\right) \cdot y.re - t_3}\\
t_6 := e^{y.re \cdot t_0 - t_3}\\
t_7 := t_6 \cdot t_2\\
t_8 := \sin t_1\\
\mathbf{if}\;x.re \leq -11200000:\\
\;\;\;\;t_5 \cdot \sin \left(t_1 - y.im \cdot \log \left(\frac{-1}{x.re}\right)\right)\\
\mathbf{elif}\;x.re \leq -5.5 \cdot 10^{-228}:\\
\;\;\;\;t_7\\
\mathbf{elif}\;x.re \leq -2.9 \cdot 10^{-261}:\\
\;\;\;\;t_5 \cdot t_8\\
\mathbf{elif}\;x.re \leq 1.95 \cdot 10^{-199}:\\
\;\;\;\;t_6 \cdot \left(y.im \cdot t_0\right)\\
\mathbf{elif}\;x.re \leq 5.5 \cdot 10^{-138}:\\
\;\;\;\;t_8 \cdot t_4\\
\mathbf{elif}\;x.re \leq 4.6 \cdot 10^{+48}:\\
\;\;\;\;t_7\\
\mathbf{else}:\\
\;\;\;\;t_4 \cdot t_2\\
\end{array}
\end{array}
if x.re < -1.12e7Initial program 24.1%
add-log-exp16.9%
fma-def16.9%
hypot-def45.2%
Applied egg-rr45.2%
Taylor expanded in x.re around -inf 52.6%
mul-1-neg83.8%
Simplified52.6%
Taylor expanded in x.re around -inf 82.9%
if -1.12e7 < x.re < -5.49999999999999952e-228 or 5.5000000000000003e-138 < x.re < 4.6e48Initial program 53.0%
Taylor expanded in y.re around 0 49.7%
unpow249.7%
unpow249.7%
hypot-def69.2%
Simplified69.2%
if -5.49999999999999952e-228 < x.re < -2.89999999999999985e-261Initial program 44.4%
Taylor expanded in y.im around 0 67.0%
Taylor expanded in x.re around -inf 89.1%
mul-1-neg77.3%
Simplified89.1%
if -2.89999999999999985e-261 < x.re < 1.9500000000000001e-199Initial program 45.2%
Taylor expanded in y.re around 0 51.6%
unpow251.6%
unpow251.6%
hypot-def61.8%
Simplified61.8%
Taylor expanded in y.im around 0 74.5%
unpow274.5%
unpow274.5%
Simplified74.5%
if 1.9500000000000001e-199 < x.re < 5.5000000000000003e-138Initial program 69.8%
Taylor expanded in y.im around 0 79.1%
Taylor expanded in x.im around 0 85.9%
if 4.6e48 < x.re Initial program 28.9%
Taylor expanded in y.re around 0 27.1%
unpow227.1%
unpow227.1%
hypot-def56.8%
Simplified56.8%
Taylor expanded in x.re around inf 76.9%
Final simplification76.2%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re)))
(t_1 (sin (* y.im (log (hypot x.im x.re)))))
(t_2 (* (atan2 x.im x.re) y.im))
(t_3 (exp (- (* (log (- x.re)) y.re) t_2)))
(t_4
(exp (- (* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im))))) t_2))))
(if (<= x.re -3.6e-138)
(* t_3 (sin (- t_0 (* y.im (log (/ -1.0 x.re))))))
(if (<= x.re -3e-294)
(* t_0 t_4)
(if (<= x.re -7.2e-308)
(* t_3 t_1)
(if (<= x.re 2e-268)
(* (sin t_0) (exp (- (log (pow x.im y.re)) t_2)))
(if (or (<= x.re 1.5e-128) (not (<= x.re 54000.0)))
(* (exp (- (* y.re (log x.re)) t_2)) t_1)
(* t_4 (sin (* y.im (log x.re)))))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = sin((y_46_im * log(hypot(x_46_im, x_46_re))));
double t_2 = atan2(x_46_im, x_46_re) * y_46_im;
double t_3 = exp(((log(-x_46_re) * y_46_re) - t_2));
double t_4 = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_2));
double tmp;
if (x_46_re <= -3.6e-138) {
tmp = t_3 * sin((t_0 - (y_46_im * log((-1.0 / x_46_re)))));
} else if (x_46_re <= -3e-294) {
tmp = t_0 * t_4;
} else if (x_46_re <= -7.2e-308) {
tmp = t_3 * t_1;
} else if (x_46_re <= 2e-268) {
tmp = sin(t_0) * exp((log(pow(x_46_im, y_46_re)) - t_2));
} else if ((x_46_re <= 1.5e-128) || !(x_46_re <= 54000.0)) {
tmp = exp(((y_46_re * log(x_46_re)) - t_2)) * t_1;
} else {
tmp = t_4 * sin((y_46_im * log(x_46_re)));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_1 = Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re))));
double t_2 = Math.atan2(x_46_im, x_46_re) * y_46_im;
double t_3 = Math.exp(((Math.log(-x_46_re) * y_46_re) - t_2));
double t_4 = Math.exp(((y_46_re * Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_2));
double tmp;
if (x_46_re <= -3.6e-138) {
tmp = t_3 * Math.sin((t_0 - (y_46_im * Math.log((-1.0 / x_46_re)))));
} else if (x_46_re <= -3e-294) {
tmp = t_0 * t_4;
} else if (x_46_re <= -7.2e-308) {
tmp = t_3 * t_1;
} else if (x_46_re <= 2e-268) {
tmp = Math.sin(t_0) * Math.exp((Math.log(Math.pow(x_46_im, y_46_re)) - t_2));
} else if ((x_46_re <= 1.5e-128) || !(x_46_re <= 54000.0)) {
tmp = Math.exp(((y_46_re * Math.log(x_46_re)) - t_2)) * t_1;
} else {
tmp = t_4 * Math.sin((y_46_im * Math.log(x_46_re)));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = y_46_re * math.atan2(x_46_im, x_46_re) t_1 = math.sin((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) t_2 = math.atan2(x_46_im, x_46_re) * y_46_im t_3 = math.exp(((math.log(-x_46_re) * y_46_re) - t_2)) t_4 = math.exp(((y_46_re * math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_2)) tmp = 0 if x_46_re <= -3.6e-138: tmp = t_3 * math.sin((t_0 - (y_46_im * math.log((-1.0 / x_46_re))))) elif x_46_re <= -3e-294: tmp = t_0 * t_4 elif x_46_re <= -7.2e-308: tmp = t_3 * t_1 elif x_46_re <= 2e-268: tmp = math.sin(t_0) * math.exp((math.log(math.pow(x_46_im, y_46_re)) - t_2)) elif (x_46_re <= 1.5e-128) or not (x_46_re <= 54000.0): tmp = math.exp(((y_46_re * math.log(x_46_re)) - t_2)) * t_1 else: tmp = t_4 * math.sin((y_46_im * math.log(x_46_re))) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_1 = sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) t_2 = Float64(atan(x_46_im, x_46_re) * y_46_im) t_3 = exp(Float64(Float64(log(Float64(-x_46_re)) * y_46_re) - t_2)) t_4 = exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - t_2)) tmp = 0.0 if (x_46_re <= -3.6e-138) tmp = Float64(t_3 * sin(Float64(t_0 - Float64(y_46_im * log(Float64(-1.0 / x_46_re)))))); elseif (x_46_re <= -3e-294) tmp = Float64(t_0 * t_4); elseif (x_46_re <= -7.2e-308) tmp = Float64(t_3 * t_1); elseif (x_46_re <= 2e-268) tmp = Float64(sin(t_0) * exp(Float64(log((x_46_im ^ y_46_re)) - t_2))); elseif ((x_46_re <= 1.5e-128) || !(x_46_re <= 54000.0)) tmp = Float64(exp(Float64(Float64(y_46_re * log(x_46_re)) - t_2)) * t_1); else tmp = Float64(t_4 * sin(Float64(y_46_im * log(x_46_re)))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = y_46_re * atan2(x_46_im, x_46_re); t_1 = sin((y_46_im * log(hypot(x_46_im, x_46_re)))); t_2 = atan2(x_46_im, x_46_re) * y_46_im; t_3 = exp(((log(-x_46_re) * y_46_re) - t_2)); t_4 = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_2)); tmp = 0.0; if (x_46_re <= -3.6e-138) tmp = t_3 * sin((t_0 - (y_46_im * log((-1.0 / x_46_re))))); elseif (x_46_re <= -3e-294) tmp = t_0 * t_4; elseif (x_46_re <= -7.2e-308) tmp = t_3 * t_1; elseif (x_46_re <= 2e-268) tmp = sin(t_0) * exp((log((x_46_im ^ y_46_re)) - t_2)); elseif ((x_46_re <= 1.5e-128) || ~((x_46_re <= 54000.0))) tmp = exp(((y_46_re * log(x_46_re)) - t_2)) * t_1; else tmp = t_4 * sin((y_46_im * log(x_46_re))); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, Block[{t$95$3 = N[Exp[N[(N[(N[Log[(-x$46$re)], $MachinePrecision] * y$46$re), $MachinePrecision] - t$95$2), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$4 = N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[x$46$re, -3.6e-138], N[(t$95$3 * N[Sin[N[(t$95$0 - N[(y$46$im * N[Log[N[(-1.0 / x$46$re), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, -3e-294], N[(t$95$0 * t$95$4), $MachinePrecision], If[LessEqual[x$46$re, -7.2e-308], N[(t$95$3 * t$95$1), $MachinePrecision], If[LessEqual[x$46$re, 2e-268], N[(N[Sin[t$95$0], $MachinePrecision] * N[Exp[N[(N[Log[N[Power[x$46$im, y$46$re], $MachinePrecision]], $MachinePrecision] - t$95$2), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[x$46$re, 1.5e-128], N[Not[LessEqual[x$46$re, 54000.0]], $MachinePrecision]], N[(N[Exp[N[(N[(y$46$re * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision]], $MachinePrecision] * t$95$1), $MachinePrecision], N[(t$95$4 * N[Sin[N[(y$46$im * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
t_2 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_3 := e^{\log \left(-x.re\right) \cdot y.re - t_2}\\
t_4 := e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - t_2}\\
\mathbf{if}\;x.re \leq -3.6 \cdot 10^{-138}:\\
\;\;\;\;t_3 \cdot \sin \left(t_0 - y.im \cdot \log \left(\frac{-1}{x.re}\right)\right)\\
\mathbf{elif}\;x.re \leq -3 \cdot 10^{-294}:\\
\;\;\;\;t_0 \cdot t_4\\
\mathbf{elif}\;x.re \leq -7.2 \cdot 10^{-308}:\\
\;\;\;\;t_3 \cdot t_1\\
\mathbf{elif}\;x.re \leq 2 \cdot 10^{-268}:\\
\;\;\;\;\sin t_0 \cdot e^{\log \left({x.im}^{y.re}\right) - t_2}\\
\mathbf{elif}\;x.re \leq 1.5 \cdot 10^{-128} \lor \neg \left(x.re \leq 54000\right):\\
\;\;\;\;e^{y.re \cdot \log x.re - t_2} \cdot t_1\\
\mathbf{else}:\\
\;\;\;\;t_4 \cdot \sin \left(y.im \cdot \log x.re\right)\\
\end{array}
\end{array}
if x.re < -3.60000000000000018e-138Initial program 36.3%
add-log-exp25.0%
fma-def25.0%
hypot-def46.1%
Applied egg-rr46.1%
Taylor expanded in x.re around -inf 48.8%
mul-1-neg78.0%
Simplified48.8%
Taylor expanded in x.re around -inf 74.4%
if -3.60000000000000018e-138 < x.re < -2.9999999999999999e-294Initial program 47.2%
Taylor expanded in y.im around 0 55.9%
Taylor expanded in y.re around 0 72.6%
if -2.9999999999999999e-294 < x.re < -7.1999999999999997e-308Initial program 20.0%
Taylor expanded in y.re around 0 40.0%
unpow240.0%
unpow240.0%
hypot-def60.6%
Simplified60.6%
Taylor expanded in x.re around -inf 100.0%
mul-1-neg80.0%
Simplified100.0%
if -7.1999999999999997e-308 < x.re < 1.99999999999999992e-268Initial program 25.0%
Taylor expanded in y.im around 0 75.5%
Taylor expanded in x.re around 0 49.6%
*-commutative49.6%
Simplified49.6%
add-log-exp49.6%
*-commutative49.6%
exp-to-pow99.6%
Applied egg-rr99.6%
if 1.99999999999999992e-268 < x.re < 1.49999999999999989e-128 or 54000 < x.re Initial program 39.3%
Taylor expanded in y.re around 0 36.7%
unpow236.7%
unpow236.7%
hypot-def62.2%
Simplified62.2%
Taylor expanded in x.re around inf 71.8%
if 1.49999999999999989e-128 < x.re < 54000Initial program 64.4%
Taylor expanded in y.re around 0 60.5%
unpow260.5%
unpow260.5%
hypot-def74.8%
Simplified74.8%
Taylor expanded in x.im around 0 79.3%
Final simplification74.4%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(t_1 (* y.re (atan2 x.im x.re)))
(t_2 (* (atan2 x.im x.re) y.im))
(t_3 (exp (- (* y.re t_0) t_2)))
(t_4 (* t_1 t_3)))
(if (<= x.re -1.2e-138)
(*
(exp (- (* (log (- x.re)) y.re) t_2))
(sin (- t_1 (* y.im (log (/ -1.0 x.re))))))
(if (<= x.re -2.6e-261)
t_4
(if (<= x.re 2.1e-180)
(* t_3 (* y.im t_0))
(if (<= x.re 2.35e-89)
t_4
(*
(exp (- (* y.re (log x.re)) t_2))
(sin (* y.im (log (hypot x.im x.re)))))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(sqrt(((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 = atan2(x_46_im, x_46_re) * y_46_im;
double t_3 = exp(((y_46_re * t_0) - t_2));
double t_4 = t_1 * t_3;
double tmp;
if (x_46_re <= -1.2e-138) {
tmp = exp(((log(-x_46_re) * y_46_re) - t_2)) * sin((t_1 - (y_46_im * log((-1.0 / x_46_re)))));
} else if (x_46_re <= -2.6e-261) {
tmp = t_4;
} else if (x_46_re <= 2.1e-180) {
tmp = t_3 * (y_46_im * t_0);
} else if (x_46_re <= 2.35e-89) {
tmp = t_4;
} else {
tmp = exp(((y_46_re * log(x_46_re)) - t_2)) * sin((y_46_im * log(hypot(x_46_im, x_46_re))));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.log(Math.sqrt(((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.atan2(x_46_im, x_46_re) * y_46_im;
double t_3 = Math.exp(((y_46_re * t_0) - t_2));
double t_4 = t_1 * t_3;
double tmp;
if (x_46_re <= -1.2e-138) {
tmp = Math.exp(((Math.log(-x_46_re) * y_46_re) - t_2)) * Math.sin((t_1 - (y_46_im * Math.log((-1.0 / x_46_re)))));
} else if (x_46_re <= -2.6e-261) {
tmp = t_4;
} else if (x_46_re <= 2.1e-180) {
tmp = t_3 * (y_46_im * t_0);
} else if (x_46_re <= 2.35e-89) {
tmp = t_4;
} else {
tmp = Math.exp(((y_46_re * Math.log(x_46_re)) - t_2)) * Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re))));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.log(math.sqrt(((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.atan2(x_46_im, x_46_re) * y_46_im t_3 = math.exp(((y_46_re * t_0) - t_2)) t_4 = t_1 * t_3 tmp = 0 if x_46_re <= -1.2e-138: tmp = math.exp(((math.log(-x_46_re) * y_46_re) - t_2)) * math.sin((t_1 - (y_46_im * math.log((-1.0 / x_46_re))))) elif x_46_re <= -2.6e-261: tmp = t_4 elif x_46_re <= 2.1e-180: tmp = t_3 * (y_46_im * t_0) elif x_46_re <= 2.35e-89: tmp = t_4 else: tmp = math.exp(((y_46_re * math.log(x_46_re)) - t_2)) * math.sin((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(sqrt(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 = Float64(atan(x_46_im, x_46_re) * y_46_im) t_3 = exp(Float64(Float64(y_46_re * t_0) - t_2)) t_4 = Float64(t_1 * t_3) tmp = 0.0 if (x_46_re <= -1.2e-138) tmp = Float64(exp(Float64(Float64(log(Float64(-x_46_re)) * y_46_re) - t_2)) * sin(Float64(t_1 - Float64(y_46_im * log(Float64(-1.0 / x_46_re)))))); elseif (x_46_re <= -2.6e-261) tmp = t_4; elseif (x_46_re <= 2.1e-180) tmp = Float64(t_3 * Float64(y_46_im * t_0)); elseif (x_46_re <= 2.35e-89) tmp = t_4; else tmp = Float64(exp(Float64(Float64(y_46_re * log(x_46_re)) - t_2)) * sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re))))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(sqrt(((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 = atan2(x_46_im, x_46_re) * y_46_im; t_3 = exp(((y_46_re * t_0) - t_2)); t_4 = t_1 * t_3; tmp = 0.0; if (x_46_re <= -1.2e-138) tmp = exp(((log(-x_46_re) * y_46_re) - t_2)) * sin((t_1 - (y_46_im * log((-1.0 / x_46_re))))); elseif (x_46_re <= -2.6e-261) tmp = t_4; elseif (x_46_re <= 2.1e-180) tmp = t_3 * (y_46_im * t_0); elseif (x_46_re <= 2.35e-89) tmp = t_4; else tmp = exp(((y_46_re * log(x_46_re)) - t_2)) * sin((y_46_im * log(hypot(x_46_im, x_46_re)))); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $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[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, Block[{t$95$3 = N[Exp[N[(N[(y$46$re * t$95$0), $MachinePrecision] - t$95$2), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$4 = N[(t$95$1 * t$95$3), $MachinePrecision]}, If[LessEqual[x$46$re, -1.2e-138], N[(N[Exp[N[(N[(N[Log[(-x$46$re)], $MachinePrecision] * y$46$re), $MachinePrecision] - t$95$2), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(t$95$1 - N[(y$46$im * N[Log[N[(-1.0 / x$46$re), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, -2.6e-261], t$95$4, If[LessEqual[x$46$re, 2.1e-180], N[(t$95$3 * N[(y$46$im * t$95$0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, 2.35e-89], t$95$4, N[(N[Exp[N[(N[(y$46$re * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_2 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_3 := e^{y.re \cdot t_0 - t_2}\\
t_4 := t_1 \cdot t_3\\
\mathbf{if}\;x.re \leq -1.2 \cdot 10^{-138}:\\
\;\;\;\;e^{\log \left(-x.re\right) \cdot y.re - t_2} \cdot \sin \left(t_1 - y.im \cdot \log \left(\frac{-1}{x.re}\right)\right)\\
\mathbf{elif}\;x.re \leq -2.6 \cdot 10^{-261}:\\
\;\;\;\;t_4\\
\mathbf{elif}\;x.re \leq 2.1 \cdot 10^{-180}:\\
\;\;\;\;t_3 \cdot \left(y.im \cdot t_0\right)\\
\mathbf{elif}\;x.re \leq 2.35 \cdot 10^{-89}:\\
\;\;\;\;t_4\\
\mathbf{else}:\\
\;\;\;\;e^{y.re \cdot \log x.re - t_2} \cdot \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\end{array}
\end{array}
if x.re < -1.2e-138Initial program 36.3%
add-log-exp25.0%
fma-def25.0%
hypot-def46.1%
Applied egg-rr46.1%
Taylor expanded in x.re around -inf 48.8%
mul-1-neg78.0%
Simplified48.8%
Taylor expanded in x.re around -inf 74.4%
if -1.2e-138 < x.re < -2.6000000000000001e-261 or 2.0999999999999999e-180 < x.re < 2.34999999999999998e-89Initial program 47.8%
Taylor expanded in y.im around 0 57.3%
Taylor expanded in y.re around 0 68.2%
if -2.6000000000000001e-261 < x.re < 2.0999999999999999e-180Initial program 47.1%
Taylor expanded in y.re around 0 52.9%
unpow252.9%
unpow252.9%
hypot-def62.2%
Simplified62.2%
Taylor expanded in y.im around 0 73.8%
unpow273.8%
unpow273.8%
Simplified73.8%
if 2.34999999999999998e-89 < x.re Initial program 38.4%
Taylor expanded in y.re around 0 37.3%
unpow237.3%
unpow237.3%
hypot-def63.4%
Simplified63.4%
Taylor expanded in x.re around inf 76.4%
Final simplification73.6%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* (atan2 x.im x.re) y.im))
(t_1 (* y.re (atan2 x.im x.re)))
(t_2 (sin t_1))
(t_3 (exp (- (* y.re (log x.im)) t_0)))
(t_4 (* (sin (* y.im (log (hypot x.im x.re)))) t_3)))
(if (<= x.im -1.4e+42)
(* t_2 (exp (- (* y.re (log (- x.im))) t_0)))
(if (<= x.im 1.7e-94)
(*
t_1
(exp (- (* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im))))) t_0)))
(if (<= x.im 4.9e-34)
t_4
(if (<= x.im 5.2e-22)
(* t_2 (pow (hypot x.im x.re) y.re))
(if (<= x.im 2.7e+70) t_4 (* t_2 t_3))))))))
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 = y_46_re * atan2(x_46_im, x_46_re);
double t_2 = sin(t_1);
double t_3 = exp(((y_46_re * log(x_46_im)) - t_0));
double t_4 = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) * t_3;
double tmp;
if (x_46_im <= -1.4e+42) {
tmp = t_2 * exp(((y_46_re * log(-x_46_im)) - t_0));
} else if (x_46_im <= 1.7e-94) {
tmp = t_1 * exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0));
} else if (x_46_im <= 4.9e-34) {
tmp = t_4;
} else if (x_46_im <= 5.2e-22) {
tmp = t_2 * pow(hypot(x_46_im, x_46_re), y_46_re);
} else if (x_46_im <= 2.7e+70) {
tmp = t_4;
} else {
tmp = t_2 * t_3;
}
return tmp;
}
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 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_2 = Math.sin(t_1);
double t_3 = Math.exp(((y_46_re * Math.log(x_46_im)) - t_0));
double t_4 = Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re)))) * t_3;
double tmp;
if (x_46_im <= -1.4e+42) {
tmp = t_2 * Math.exp(((y_46_re * Math.log(-x_46_im)) - t_0));
} else if (x_46_im <= 1.7e-94) {
tmp = t_1 * Math.exp(((y_46_re * Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0));
} else if (x_46_im <= 4.9e-34) {
tmp = t_4;
} else if (x_46_im <= 5.2e-22) {
tmp = t_2 * Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
} else if (x_46_im <= 2.7e+70) {
tmp = t_4;
} else {
tmp = t_2 * t_3;
}
return tmp;
}
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 = y_46_re * math.atan2(x_46_im, x_46_re) t_2 = math.sin(t_1) t_3 = math.exp(((y_46_re * math.log(x_46_im)) - t_0)) t_4 = math.sin((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) * t_3 tmp = 0 if x_46_im <= -1.4e+42: tmp = t_2 * math.exp(((y_46_re * math.log(-x_46_im)) - t_0)) elif x_46_im <= 1.7e-94: tmp = t_1 * math.exp(((y_46_re * math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0)) elif x_46_im <= 4.9e-34: tmp = t_4 elif x_46_im <= 5.2e-22: tmp = t_2 * math.pow(math.hypot(x_46_im, x_46_re), y_46_re) elif x_46_im <= 2.7e+70: tmp = t_4 else: tmp = t_2 * t_3 return tmp
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(y_46_re * atan(x_46_im, x_46_re)) t_2 = sin(t_1) t_3 = exp(Float64(Float64(y_46_re * log(x_46_im)) - t_0)) t_4 = Float64(sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) * t_3) tmp = 0.0 if (x_46_im <= -1.4e+42) tmp = Float64(t_2 * exp(Float64(Float64(y_46_re * log(Float64(-x_46_im))) - t_0))); elseif (x_46_im <= 1.7e-94) tmp = Float64(t_1 * exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - t_0))); elseif (x_46_im <= 4.9e-34) tmp = t_4; elseif (x_46_im <= 5.2e-22) tmp = Float64(t_2 * (hypot(x_46_im, x_46_re) ^ y_46_re)); elseif (x_46_im <= 2.7e+70) tmp = t_4; else tmp = Float64(t_2 * t_3); end return tmp 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 = y_46_re * atan2(x_46_im, x_46_re); t_2 = sin(t_1); t_3 = exp(((y_46_re * log(x_46_im)) - t_0)); t_4 = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) * t_3; tmp = 0.0; if (x_46_im <= -1.4e+42) tmp = t_2 * exp(((y_46_re * log(-x_46_im)) - t_0)); elseif (x_46_im <= 1.7e-94) tmp = t_1 * exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0)); elseif (x_46_im <= 4.9e-34) tmp = t_4; elseif (x_46_im <= 5.2e-22) tmp = t_2 * (hypot(x_46_im, x_46_re) ^ y_46_re); elseif (x_46_im <= 2.7e+70) tmp = t_4; else tmp = t_2 * t_3; end tmp_2 = tmp; end
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[(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[Exp[N[(N[(y$46$re * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$4 = N[(N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$3), $MachinePrecision]}, If[LessEqual[x$46$im, -1.4e+42], N[(t$95$2 * N[Exp[N[(N[(y$46$re * N[Log[(-x$46$im)], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$im, 1.7e-94], N[(t$95$1 * N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$im, 4.9e-34], t$95$4, If[LessEqual[x$46$im, 5.2e-22], N[(t$95$2 * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$im, 2.7e+70], t$95$4, N[(t$95$2 * t$95$3), $MachinePrecision]]]]]]]]]]]
\begin{array}{l}
\\
\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 := \sin t_1\\
t_3 := e^{y.re \cdot \log x.im - t_0}\\
t_4 := \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \cdot t_3\\
\mathbf{if}\;x.im \leq -1.4 \cdot 10^{+42}:\\
\;\;\;\;t_2 \cdot e^{y.re \cdot \log \left(-x.im\right) - t_0}\\
\mathbf{elif}\;x.im \leq 1.7 \cdot 10^{-94}:\\
\;\;\;\;t_1 \cdot e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - t_0}\\
\mathbf{elif}\;x.im \leq 4.9 \cdot 10^{-34}:\\
\;\;\;\;t_4\\
\mathbf{elif}\;x.im \leq 5.2 \cdot 10^{-22}:\\
\;\;\;\;t_2 \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{elif}\;x.im \leq 2.7 \cdot 10^{+70}:\\
\;\;\;\;t_4\\
\mathbf{else}:\\
\;\;\;\;t_2 \cdot t_3\\
\end{array}
\end{array}
if x.im < -1.4e42Initial program 12.5%
Taylor expanded in y.im around 0 44.5%
Taylor expanded in x.im around -inf 62.8%
mul-1-neg62.8%
Simplified62.8%
if -1.4e42 < x.im < 1.6999999999999999e-94Initial program 50.9%
Taylor expanded in y.im around 0 51.5%
Taylor expanded in y.re around 0 55.8%
if 1.6999999999999999e-94 < x.im < 4.89999999999999962e-34 or 5.2e-22 < x.im < 2.7e70Initial program 64.8%
Taylor expanded in y.re around 0 57.6%
unpow257.6%
unpow257.6%
hypot-def61.1%
Simplified61.1%
Taylor expanded in x.re around 0 84.5%
*-commutative84.5%
Simplified84.5%
if 4.89999999999999962e-34 < x.im < 5.2e-22Initial program 20.0%
Taylor expanded in y.im around 0 100.0%
Taylor expanded in y.im around 0 100.0%
unpow2100.0%
unpow2100.0%
hypot-def100.0%
Simplified100.0%
if 2.7e70 < x.im Initial program 28.5%
Taylor expanded in y.im around 0 51.8%
Taylor expanded in x.re around 0 72.0%
*-commutative72.0%
Simplified72.0%
Final simplification65.2%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* (atan2 x.im x.re) y.im))
(t_1 (exp (- (* y.re (log x.im)) t_0)))
(t_2 (sin (* y.im (log (hypot x.im x.re)))))
(t_3 (* t_2 t_1))
(t_4 (* y.re (atan2 x.im x.re)))
(t_5 (sin t_4)))
(if (<= x.im -9e-281)
(* t_2 (exp (- (* y.re (log (- x.im))) t_0)))
(if (<= x.im 2.95e-95)
(*
t_4
(exp (- (* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im))))) t_0)))
(if (<= x.im 3.9e-33)
t_3
(if (<= x.im 4.5e-21)
(* t_5 (pow (hypot x.im x.re) y.re))
(if (<= x.im 4e+64) t_3 (* t_5 t_1))))))))
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 = exp(((y_46_re * log(x_46_im)) - t_0));
double t_2 = sin((y_46_im * log(hypot(x_46_im, x_46_re))));
double t_3 = t_2 * t_1;
double t_4 = y_46_re * atan2(x_46_im, x_46_re);
double t_5 = sin(t_4);
double tmp;
if (x_46_im <= -9e-281) {
tmp = t_2 * exp(((y_46_re * log(-x_46_im)) - t_0));
} else if (x_46_im <= 2.95e-95) {
tmp = t_4 * exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0));
} else if (x_46_im <= 3.9e-33) {
tmp = t_3;
} else if (x_46_im <= 4.5e-21) {
tmp = t_5 * pow(hypot(x_46_im, x_46_re), y_46_re);
} else if (x_46_im <= 4e+64) {
tmp = t_3;
} else {
tmp = t_5 * t_1;
}
return tmp;
}
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.exp(((y_46_re * Math.log(x_46_im)) - t_0));
double t_2 = Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re))));
double t_3 = t_2 * t_1;
double t_4 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_5 = Math.sin(t_4);
double tmp;
if (x_46_im <= -9e-281) {
tmp = t_2 * Math.exp(((y_46_re * Math.log(-x_46_im)) - t_0));
} else if (x_46_im <= 2.95e-95) {
tmp = t_4 * Math.exp(((y_46_re * Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0));
} else if (x_46_im <= 3.9e-33) {
tmp = t_3;
} else if (x_46_im <= 4.5e-21) {
tmp = t_5 * Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
} else if (x_46_im <= 4e+64) {
tmp = t_3;
} else {
tmp = t_5 * t_1;
}
return tmp;
}
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.exp(((y_46_re * math.log(x_46_im)) - t_0)) t_2 = math.sin((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) t_3 = t_2 * t_1 t_4 = y_46_re * math.atan2(x_46_im, x_46_re) t_5 = math.sin(t_4) tmp = 0 if x_46_im <= -9e-281: tmp = t_2 * math.exp(((y_46_re * math.log(-x_46_im)) - t_0)) elif x_46_im <= 2.95e-95: tmp = t_4 * math.exp(((y_46_re * math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0)) elif x_46_im <= 3.9e-33: tmp = t_3 elif x_46_im <= 4.5e-21: tmp = t_5 * math.pow(math.hypot(x_46_im, x_46_re), y_46_re) elif x_46_im <= 4e+64: tmp = t_3 else: tmp = t_5 * t_1 return tmp
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 = exp(Float64(Float64(y_46_re * log(x_46_im)) - t_0)) t_2 = sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) t_3 = Float64(t_2 * t_1) t_4 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_5 = sin(t_4) tmp = 0.0 if (x_46_im <= -9e-281) tmp = Float64(t_2 * exp(Float64(Float64(y_46_re * log(Float64(-x_46_im))) - t_0))); elseif (x_46_im <= 2.95e-95) tmp = Float64(t_4 * exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - t_0))); elseif (x_46_im <= 3.9e-33) tmp = t_3; elseif (x_46_im <= 4.5e-21) tmp = Float64(t_5 * (hypot(x_46_im, x_46_re) ^ y_46_re)); elseif (x_46_im <= 4e+64) tmp = t_3; else tmp = Float64(t_5 * t_1); end return tmp 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 = exp(((y_46_re * log(x_46_im)) - t_0)); t_2 = sin((y_46_im * log(hypot(x_46_im, x_46_re)))); t_3 = t_2 * t_1; t_4 = y_46_re * atan2(x_46_im, x_46_re); t_5 = sin(t_4); tmp = 0.0; if (x_46_im <= -9e-281) tmp = t_2 * exp(((y_46_re * log(-x_46_im)) - t_0)); elseif (x_46_im <= 2.95e-95) tmp = t_4 * exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0)); elseif (x_46_im <= 3.9e-33) tmp = t_3; elseif (x_46_im <= 4.5e-21) tmp = t_5 * (hypot(x_46_im, x_46_re) ^ y_46_re); elseif (x_46_im <= 4e+64) tmp = t_3; else tmp = t_5 * t_1; end tmp_2 = tmp; end
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[Exp[N[(N[(y$46$re * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 * t$95$1), $MachinePrecision]}, Block[{t$95$4 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[Sin[t$95$4], $MachinePrecision]}, If[LessEqual[x$46$im, -9e-281], N[(t$95$2 * N[Exp[N[(N[(y$46$re * N[Log[(-x$46$im)], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$im, 2.95e-95], N[(t$95$4 * N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$im, 3.9e-33], t$95$3, If[LessEqual[x$46$im, 4.5e-21], N[(t$95$5 * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$im, 4e+64], t$95$3, N[(t$95$5 * t$95$1), $MachinePrecision]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_1 := e^{y.re \cdot \log x.im - t_0}\\
t_2 := \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
t_3 := t_2 \cdot t_1\\
t_4 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_5 := \sin t_4\\
\mathbf{if}\;x.im \leq -9 \cdot 10^{-281}:\\
\;\;\;\;t_2 \cdot e^{y.re \cdot \log \left(-x.im\right) - t_0}\\
\mathbf{elif}\;x.im \leq 2.95 \cdot 10^{-95}:\\
\;\;\;\;t_4 \cdot e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - t_0}\\
\mathbf{elif}\;x.im \leq 3.9 \cdot 10^{-33}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;x.im \leq 4.5 \cdot 10^{-21}:\\
\;\;\;\;t_5 \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{elif}\;x.im \leq 4 \cdot 10^{+64}:\\
\;\;\;\;t_3\\
\mathbf{else}:\\
\;\;\;\;t_5 \cdot t_1\\
\end{array}
\end{array}
if x.im < -8.99999999999999986e-281Initial program 34.0%
Taylor expanded in y.re around 0 34.2%
unpow234.2%
unpow234.2%
hypot-def62.8%
Simplified62.8%
Taylor expanded in x.im around -inf 68.7%
mul-1-neg53.2%
Simplified68.7%
if -8.99999999999999986e-281 < x.im < 2.9499999999999999e-95Initial program 54.7%
Taylor expanded in y.im around 0 48.9%
Taylor expanded in y.re around 0 55.3%
if 2.9499999999999999e-95 < x.im < 3.89999999999999974e-33 or 4.49999999999999968e-21 < x.im < 4.00000000000000009e64Initial program 64.8%
Taylor expanded in y.re around 0 57.6%
unpow257.6%
unpow257.6%
hypot-def61.1%
Simplified61.1%
Taylor expanded in x.re around 0 84.5%
*-commutative84.5%
Simplified84.5%
if 3.89999999999999974e-33 < x.im < 4.49999999999999968e-21Initial program 20.0%
Taylor expanded in y.im around 0 100.0%
Taylor expanded in y.im around 0 100.0%
unpow2100.0%
unpow2100.0%
hypot-def100.0%
Simplified100.0%
if 4.00000000000000009e64 < x.im Initial program 28.5%
Taylor expanded in y.im around 0 51.8%
Taylor expanded in x.re around 0 72.0%
*-commutative72.0%
Simplified72.0%
Final simplification69.8%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* (atan2 x.im x.re) y.im))
(t_1 (* y.re (atan2 x.im x.re)))
(t_2 (sin t_1)))
(if (<= x.im -4e+42)
(* t_2 (exp (- (* y.re (log (- x.im))) t_0)))
(if (<= x.im 7.8e-17)
(*
t_1
(exp (- (* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im))))) t_0)))
(* t_2 (exp (- (* y.re (log x.im)) t_0)))))))
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 = y_46_re * atan2(x_46_im, x_46_re);
double t_2 = sin(t_1);
double tmp;
if (x_46_im <= -4e+42) {
tmp = t_2 * exp(((y_46_re * log(-x_46_im)) - t_0));
} else if (x_46_im <= 7.8e-17) {
tmp = t_1 * exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0));
} else {
tmp = t_2 * exp(((y_46_re * log(x_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
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 = y_46re * atan2(x_46im, x_46re)
t_2 = sin(t_1)
if (x_46im <= (-4d+42)) then
tmp = t_2 * exp(((y_46re * log(-x_46im)) - t_0))
else if (x_46im <= 7.8d-17) then
tmp = t_1 * exp(((y_46re * log(sqrt(((x_46re * x_46re) + (x_46im * x_46im))))) - t_0))
else
tmp = t_2 * exp(((y_46re * log(x_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) {
double t_0 = Math.atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_2 = Math.sin(t_1);
double tmp;
if (x_46_im <= -4e+42) {
tmp = t_2 * Math.exp(((y_46_re * Math.log(-x_46_im)) - t_0));
} else if (x_46_im <= 7.8e-17) {
tmp = t_1 * Math.exp(((y_46_re * Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0));
} else {
tmp = t_2 * Math.exp(((y_46_re * Math.log(x_46_im)) - t_0));
}
return tmp;
}
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 = y_46_re * math.atan2(x_46_im, x_46_re) t_2 = math.sin(t_1) tmp = 0 if x_46_im <= -4e+42: tmp = t_2 * math.exp(((y_46_re * math.log(-x_46_im)) - t_0)) elif x_46_im <= 7.8e-17: tmp = t_1 * math.exp(((y_46_re * math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0)) else: tmp = t_2 * math.exp(((y_46_re * math.log(x_46_im)) - t_0)) return tmp
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(y_46_re * atan(x_46_im, x_46_re)) t_2 = sin(t_1) tmp = 0.0 if (x_46_im <= -4e+42) tmp = Float64(t_2 * exp(Float64(Float64(y_46_re * log(Float64(-x_46_im))) - t_0))); elseif (x_46_im <= 7.8e-17) tmp = Float64(t_1 * exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - t_0))); else tmp = Float64(t_2 * exp(Float64(Float64(y_46_re * log(x_46_im)) - t_0))); end return tmp 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 = y_46_re * atan2(x_46_im, x_46_re); t_2 = sin(t_1); tmp = 0.0; if (x_46_im <= -4e+42) tmp = t_2 * exp(((y_46_re * log(-x_46_im)) - t_0)); elseif (x_46_im <= 7.8e-17) tmp = t_1 * exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0)); else tmp = t_2 * exp(((y_46_re * log(x_46_im)) - t_0)); end tmp_2 = tmp; end
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[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sin[t$95$1], $MachinePrecision]}, If[LessEqual[x$46$im, -4e+42], N[(t$95$2 * N[Exp[N[(N[(y$46$re * N[Log[(-x$46$im)], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$im, 7.8e-17], N[(t$95$1 * N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$2 * N[Exp[N[(N[(y$46$re * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\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 := \sin t_1\\
\mathbf{if}\;x.im \leq -4 \cdot 10^{+42}:\\
\;\;\;\;t_2 \cdot e^{y.re \cdot \log \left(-x.im\right) - t_0}\\
\mathbf{elif}\;x.im \leq 7.8 \cdot 10^{-17}:\\
\;\;\;\;t_1 \cdot e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - t_0}\\
\mathbf{else}:\\
\;\;\;\;t_2 \cdot e^{y.re \cdot \log x.im - t_0}\\
\end{array}
\end{array}
if x.im < -4.00000000000000018e42Initial program 12.5%
Taylor expanded in y.im around 0 44.5%
Taylor expanded in x.im around -inf 62.8%
mul-1-neg62.8%
Simplified62.8%
if -4.00000000000000018e42 < x.im < 7.79999999999999979e-17Initial program 51.5%
Taylor expanded in y.im around 0 51.6%
Taylor expanded in y.re around 0 54.5%
if 7.79999999999999979e-17 < x.im Initial program 39.4%
Taylor expanded in y.im around 0 45.9%
Taylor expanded in x.re around 0 62.8%
*-commutative62.8%
Simplified62.8%
Final simplification58.3%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re)))
(t_1 (* (sin t_0) (pow (hypot x.im x.re) y.re))))
(if (<= y.re -7.1e-9)
t_1
(if (<= y.re 15000000.0)
(* y.re (* (atan2 x.im x.re) (exp (* (atan2 x.im x.re) (- y.im)))))
(if (<= y.re 2.55e+187)
t_1
(if (<= y.re 4.6e+219)
(pow (pow t_0 3.0) 0.3333333333333333)
t_1))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = sin(t_0) * pow(hypot(x_46_im, x_46_re), y_46_re);
double tmp;
if (y_46_re <= -7.1e-9) {
tmp = t_1;
} else if (y_46_re <= 15000000.0) {
tmp = y_46_re * (atan2(x_46_im, x_46_re) * exp((atan2(x_46_im, x_46_re) * -y_46_im)));
} else if (y_46_re <= 2.55e+187) {
tmp = t_1;
} else if (y_46_re <= 4.6e+219) {
tmp = pow(pow(t_0, 3.0), 0.3333333333333333);
} else {
tmp = t_1;
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_1 = Math.sin(t_0) * Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
double tmp;
if (y_46_re <= -7.1e-9) {
tmp = t_1;
} else if (y_46_re <= 15000000.0) {
tmp = y_46_re * (Math.atan2(x_46_im, x_46_re) * Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im)));
} else if (y_46_re <= 2.55e+187) {
tmp = t_1;
} else if (y_46_re <= 4.6e+219) {
tmp = Math.pow(Math.pow(t_0, 3.0), 0.3333333333333333);
} else {
tmp = t_1;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = y_46_re * math.atan2(x_46_im, x_46_re) t_1 = math.sin(t_0) * math.pow(math.hypot(x_46_im, x_46_re), y_46_re) tmp = 0 if y_46_re <= -7.1e-9: tmp = t_1 elif y_46_re <= 15000000.0: tmp = y_46_re * (math.atan2(x_46_im, x_46_re) * math.exp((math.atan2(x_46_im, x_46_re) * -y_46_im))) elif y_46_re <= 2.55e+187: tmp = t_1 elif y_46_re <= 4.6e+219: tmp = math.pow(math.pow(t_0, 3.0), 0.3333333333333333) else: tmp = t_1 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_1 = Float64(sin(t_0) * (hypot(x_46_im, x_46_re) ^ y_46_re)) tmp = 0.0 if (y_46_re <= -7.1e-9) tmp = t_1; elseif (y_46_re <= 15000000.0) tmp = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))))); elseif (y_46_re <= 2.55e+187) tmp = t_1; elseif (y_46_re <= 4.6e+219) tmp = (t_0 ^ 3.0) ^ 0.3333333333333333; else tmp = t_1; end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = y_46_re * atan2(x_46_im, x_46_re); t_1 = sin(t_0) * (hypot(x_46_im, x_46_re) ^ y_46_re); tmp = 0.0; if (y_46_re <= -7.1e-9) tmp = t_1; elseif (y_46_re <= 15000000.0) tmp = y_46_re * (atan2(x_46_im, x_46_re) * exp((atan2(x_46_im, x_46_re) * -y_46_im))); elseif (y_46_re <= 2.55e+187) tmp = t_1; elseif (y_46_re <= 4.6e+219) tmp = (t_0 ^ 3.0) ^ 0.3333333333333333; else tmp = t_1; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[Sin[t$95$0], $MachinePrecision] * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -7.1e-9], t$95$1, If[LessEqual[y$46$re, 15000000.0], N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 2.55e+187], t$95$1, If[LessEqual[y$46$re, 4.6e+219], N[Power[N[Power[t$95$0, 3.0], $MachinePrecision], 0.3333333333333333], $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := \sin t_0 \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{if}\;y.re \leq -7.1 \cdot 10^{-9}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y.re \leq 15000000:\\
\;\;\;\;y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\right)\\
\mathbf{elif}\;y.re \leq 2.55 \cdot 10^{+187}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y.re \leq 4.6 \cdot 10^{+219}:\\
\;\;\;\;{\left({t_0}^{3}\right)}^{0.3333333333333333}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y.re < -7.09999999999999988e-9 or 1.5e7 < y.re < 2.55e187 or 4.6000000000000002e219 < y.re Initial program 42.2%
Taylor expanded in y.im around 0 70.8%
Taylor expanded in y.im around 0 66.5%
unpow266.5%
unpow266.5%
hypot-def66.5%
Simplified66.5%
if -7.09999999999999988e-9 < y.re < 1.5e7Initial program 41.5%
Taylor expanded in y.im around 0 31.0%
Taylor expanded in y.re around 0 47.5%
*-commutative47.5%
distribute-rgt-neg-in47.5%
Simplified47.5%
Taylor expanded in y.re around 0 48.2%
neg-mul-148.2%
distribute-rgt-neg-in48.2%
Simplified48.2%
if 2.55e187 < y.re < 4.6000000000000002e219Initial program 0.0%
Taylor expanded in y.im around 0 16.7%
Taylor expanded in y.re around 0 17.1%
*-commutative17.1%
distribute-rgt-neg-in17.1%
Simplified17.1%
Taylor expanded in y.im around 0 1.4%
*-commutative1.4%
add-cbrt-cube16.9%
pow1/383.6%
pow383.6%
Applied egg-rr83.6%
Final simplification57.3%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re)))
(t_1 (exp (* (atan2 x.im x.re) (- y.im)))))
(if (<= y.re -1.45e-9)
(* t_1 (+ -1.0 (+ t_0 1.0)))
(if (<= y.re 3.9e+37)
(* y.re (* (atan2 x.im x.re) t_1))
(if (<= y.re 1.05e+186)
(log (pow (exp y.re) (atan2 x.im x.re)))
(pow (pow t_0 3.0) 0.3333333333333333))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = exp((atan2(x_46_im, x_46_re) * -y_46_im));
double tmp;
if (y_46_re <= -1.45e-9) {
tmp = t_1 * (-1.0 + (t_0 + 1.0));
} else if (y_46_re <= 3.9e+37) {
tmp = y_46_re * (atan2(x_46_im, x_46_re) * t_1);
} else if (y_46_re <= 1.05e+186) {
tmp = log(pow(exp(y_46_re), atan2(x_46_im, x_46_re)));
} else {
tmp = pow(pow(t_0, 3.0), 0.3333333333333333);
}
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
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = y_46re * atan2(x_46im, x_46re)
t_1 = exp((atan2(x_46im, x_46re) * -y_46im))
if (y_46re <= (-1.45d-9)) then
tmp = t_1 * ((-1.0d0) + (t_0 + 1.0d0))
else if (y_46re <= 3.9d+37) then
tmp = y_46re * (atan2(x_46im, x_46re) * t_1)
else if (y_46re <= 1.05d+186) then
tmp = log((exp(y_46re) ** atan2(x_46im, x_46re)))
else
tmp = (t_0 ** 3.0d0) ** 0.3333333333333333d0
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) {
double t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_1 = Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im));
double tmp;
if (y_46_re <= -1.45e-9) {
tmp = t_1 * (-1.0 + (t_0 + 1.0));
} else if (y_46_re <= 3.9e+37) {
tmp = y_46_re * (Math.atan2(x_46_im, x_46_re) * t_1);
} else if (y_46_re <= 1.05e+186) {
tmp = Math.log(Math.pow(Math.exp(y_46_re), Math.atan2(x_46_im, x_46_re)));
} else {
tmp = Math.pow(Math.pow(t_0, 3.0), 0.3333333333333333);
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = y_46_re * math.atan2(x_46_im, x_46_re) t_1 = math.exp((math.atan2(x_46_im, x_46_re) * -y_46_im)) tmp = 0 if y_46_re <= -1.45e-9: tmp = t_1 * (-1.0 + (t_0 + 1.0)) elif y_46_re <= 3.9e+37: tmp = y_46_re * (math.atan2(x_46_im, x_46_re) * t_1) elif y_46_re <= 1.05e+186: tmp = math.log(math.pow(math.exp(y_46_re), math.atan2(x_46_im, x_46_re))) else: tmp = math.pow(math.pow(t_0, 3.0), 0.3333333333333333) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_1 = exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))) tmp = 0.0 if (y_46_re <= -1.45e-9) tmp = Float64(t_1 * Float64(-1.0 + Float64(t_0 + 1.0))); elseif (y_46_re <= 3.9e+37) tmp = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * t_1)); elseif (y_46_re <= 1.05e+186) tmp = log((exp(y_46_re) ^ atan(x_46_im, x_46_re))); else tmp = (t_0 ^ 3.0) ^ 0.3333333333333333; end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = y_46_re * atan2(x_46_im, x_46_re); t_1 = exp((atan2(x_46_im, x_46_re) * -y_46_im)); tmp = 0.0; if (y_46_re <= -1.45e-9) tmp = t_1 * (-1.0 + (t_0 + 1.0)); elseif (y_46_re <= 3.9e+37) tmp = y_46_re * (atan2(x_46_im, x_46_re) * t_1); elseif (y_46_re <= 1.05e+186) tmp = log((exp(y_46_re) ^ atan2(x_46_im, x_46_re))); else tmp = (t_0 ^ 3.0) ^ 0.3333333333333333; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -1.45e-9], N[(t$95$1 * N[(-1.0 + N[(t$95$0 + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 3.9e+37], N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 1.05e+186], N[Log[N[Power[N[Exp[y$46$re], $MachinePrecision], N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision]], $MachinePrecision], N[Power[N[Power[t$95$0, 3.0], $MachinePrecision], 0.3333333333333333], $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\
\mathbf{if}\;y.re \leq -1.45 \cdot 10^{-9}:\\
\;\;\;\;t_1 \cdot \left(-1 + \left(t_0 + 1\right)\right)\\
\mathbf{elif}\;y.re \leq 3.9 \cdot 10^{+37}:\\
\;\;\;\;y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot t_1\right)\\
\mathbf{elif}\;y.re \leq 1.05 \cdot 10^{+186}:\\
\;\;\;\;\log \left({\left(e^{y.re}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}\right)\\
\mathbf{else}:\\
\;\;\;\;{\left({t_0}^{3}\right)}^{0.3333333333333333}\\
\end{array}
\end{array}
if y.re < -1.44999999999999996e-9Initial program 43.5%
Taylor expanded in y.im around 0 77.5%
Taylor expanded in y.re around 0 22.0%
*-commutative22.0%
distribute-rgt-neg-in22.0%
Simplified22.0%
*-commutative6.8%
expm1-log1p-u5.8%
expm1-udef14.9%
log1p-udef14.9%
add-exp-log15.9%
Applied egg-rr31.1%
if -1.44999999999999996e-9 < y.re < 3.8999999999999999e37Initial program 41.5%
Taylor expanded in y.im around 0 31.6%
Taylor expanded in y.re around 0 45.9%
*-commutative45.9%
distribute-rgt-neg-in45.9%
Simplified45.9%
Taylor expanded in y.re around 0 46.6%
neg-mul-146.6%
distribute-rgt-neg-in46.6%
Simplified46.6%
if 3.8999999999999999e37 < y.re < 1.05e186Initial program 37.0%
Taylor expanded in y.im around 0 74.1%
Taylor expanded in y.re around 0 12.9%
*-commutative12.9%
distribute-rgt-neg-in12.9%
Simplified12.9%
Taylor expanded in y.im around 0 2.5%
add-log-exp34.0%
exp-prod48.6%
Applied egg-rr48.6%
if 1.05e186 < y.re Initial program 34.6%
Taylor expanded in y.im around 0 46.2%
Taylor expanded in y.re around 0 9.2%
*-commutative9.2%
distribute-rgt-neg-in9.2%
Simplified9.2%
Taylor expanded in y.im around 0 2.2%
*-commutative2.2%
add-cbrt-cube19.8%
pow1/342.9%
pow342.9%
Applied egg-rr42.9%
Final simplification42.7%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re)))
(t_1 (exp (* (atan2 x.im x.re) (- y.im)))))
(if (<= y.re -3.7e-9)
(* t_1 (+ -1.0 (+ t_0 1.0)))
(if (<= y.re 1.2e+38)
(* y.re (* (atan2 x.im x.re) t_1))
(if (<= y.re 7.5e+185)
(log1p (expm1 t_0))
(pow (pow t_0 3.0) 0.3333333333333333))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = exp((atan2(x_46_im, x_46_re) * -y_46_im));
double tmp;
if (y_46_re <= -3.7e-9) {
tmp = t_1 * (-1.0 + (t_0 + 1.0));
} else if (y_46_re <= 1.2e+38) {
tmp = y_46_re * (atan2(x_46_im, x_46_re) * t_1);
} else if (y_46_re <= 7.5e+185) {
tmp = log1p(expm1(t_0));
} else {
tmp = pow(pow(t_0, 3.0), 0.3333333333333333);
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_1 = Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im));
double tmp;
if (y_46_re <= -3.7e-9) {
tmp = t_1 * (-1.0 + (t_0 + 1.0));
} else if (y_46_re <= 1.2e+38) {
tmp = y_46_re * (Math.atan2(x_46_im, x_46_re) * t_1);
} else if (y_46_re <= 7.5e+185) {
tmp = Math.log1p(Math.expm1(t_0));
} else {
tmp = Math.pow(Math.pow(t_0, 3.0), 0.3333333333333333);
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = y_46_re * math.atan2(x_46_im, x_46_re) t_1 = math.exp((math.atan2(x_46_im, x_46_re) * -y_46_im)) tmp = 0 if y_46_re <= -3.7e-9: tmp = t_1 * (-1.0 + (t_0 + 1.0)) elif y_46_re <= 1.2e+38: tmp = y_46_re * (math.atan2(x_46_im, x_46_re) * t_1) elif y_46_re <= 7.5e+185: tmp = math.log1p(math.expm1(t_0)) else: tmp = math.pow(math.pow(t_0, 3.0), 0.3333333333333333) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_1 = exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))) tmp = 0.0 if (y_46_re <= -3.7e-9) tmp = Float64(t_1 * Float64(-1.0 + Float64(t_0 + 1.0))); elseif (y_46_re <= 1.2e+38) tmp = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * t_1)); elseif (y_46_re <= 7.5e+185) tmp = log1p(expm1(t_0)); else tmp = (t_0 ^ 3.0) ^ 0.3333333333333333; end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -3.7e-9], N[(t$95$1 * N[(-1.0 + N[(t$95$0 + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 1.2e+38], N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 7.5e+185], N[Log[1 + N[(Exp[t$95$0] - 1), $MachinePrecision]], $MachinePrecision], N[Power[N[Power[t$95$0, 3.0], $MachinePrecision], 0.3333333333333333], $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\
\mathbf{if}\;y.re \leq -3.7 \cdot 10^{-9}:\\
\;\;\;\;t_1 \cdot \left(-1 + \left(t_0 + 1\right)\right)\\
\mathbf{elif}\;y.re \leq 1.2 \cdot 10^{+38}:\\
\;\;\;\;y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot t_1\right)\\
\mathbf{elif}\;y.re \leq 7.5 \cdot 10^{+185}:\\
\;\;\;\;\mathsf{log1p}\left(\mathsf{expm1}\left(t_0\right)\right)\\
\mathbf{else}:\\
\;\;\;\;{\left({t_0}^{3}\right)}^{0.3333333333333333}\\
\end{array}
\end{array}
if y.re < -3.7e-9Initial program 43.5%
Taylor expanded in y.im around 0 77.5%
Taylor expanded in y.re around 0 22.0%
*-commutative22.0%
distribute-rgt-neg-in22.0%
Simplified22.0%
*-commutative6.8%
expm1-log1p-u5.8%
expm1-udef14.9%
log1p-udef14.9%
add-exp-log15.9%
Applied egg-rr31.1%
if -3.7e-9 < y.re < 1.20000000000000009e38Initial program 41.5%
Taylor expanded in y.im around 0 31.6%
Taylor expanded in y.re around 0 45.9%
*-commutative45.9%
distribute-rgt-neg-in45.9%
Simplified45.9%
Taylor expanded in y.re around 0 46.6%
neg-mul-146.6%
distribute-rgt-neg-in46.6%
Simplified46.6%
if 1.20000000000000009e38 < y.re < 7.49999999999999955e185Initial program 37.0%
Taylor expanded in y.im around 0 74.1%
Taylor expanded in y.re around 0 12.9%
*-commutative12.9%
distribute-rgt-neg-in12.9%
Simplified12.9%
Taylor expanded in y.im around 0 2.5%
*-commutative2.5%
log1p-expm1-u34.1%
Applied egg-rr34.1%
if 7.49999999999999955e185 < y.re Initial program 34.6%
Taylor expanded in y.im around 0 46.2%
Taylor expanded in y.re around 0 9.2%
*-commutative9.2%
distribute-rgt-neg-in9.2%
Simplified9.2%
Taylor expanded in y.im around 0 2.2%
*-commutative2.2%
add-cbrt-cube19.8%
pow1/342.9%
pow342.9%
Applied egg-rr42.9%
Final simplification41.1%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re))))
(if (<= y.re 5.4e+37)
(* y.re (* (atan2 x.im x.re) (exp (* (atan2 x.im x.re) (- y.im)))))
(if (<= y.re 1.22e+184)
(log1p (expm1 t_0))
(pow (pow t_0 3.0) 0.3333333333333333)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if (y_46_re <= 5.4e+37) {
tmp = y_46_re * (atan2(x_46_im, x_46_re) * exp((atan2(x_46_im, x_46_re) * -y_46_im)));
} else if (y_46_re <= 1.22e+184) {
tmp = log1p(expm1(t_0));
} else {
tmp = pow(pow(t_0, 3.0), 0.3333333333333333);
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
double tmp;
if (y_46_re <= 5.4e+37) {
tmp = y_46_re * (Math.atan2(x_46_im, x_46_re) * Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im)));
} else if (y_46_re <= 1.22e+184) {
tmp = Math.log1p(Math.expm1(t_0));
} else {
tmp = Math.pow(Math.pow(t_0, 3.0), 0.3333333333333333);
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = y_46_re * math.atan2(x_46_im, x_46_re) tmp = 0 if y_46_re <= 5.4e+37: tmp = y_46_re * (math.atan2(x_46_im, x_46_re) * math.exp((math.atan2(x_46_im, x_46_re) * -y_46_im))) elif y_46_re <= 1.22e+184: tmp = math.log1p(math.expm1(t_0)) else: tmp = math.pow(math.pow(t_0, 3.0), 0.3333333333333333) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) tmp = 0.0 if (y_46_re <= 5.4e+37) tmp = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))))); elseif (y_46_re <= 1.22e+184) tmp = log1p(expm1(t_0)); else tmp = (t_0 ^ 3.0) ^ 0.3333333333333333; end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, 5.4e+37], N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 1.22e+184], N[Log[1 + N[(Exp[t$95$0] - 1), $MachinePrecision]], $MachinePrecision], N[Power[N[Power[t$95$0, 3.0], $MachinePrecision], 0.3333333333333333], $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.re \leq 5.4 \cdot 10^{+37}:\\
\;\;\;\;y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\right)\\
\mathbf{elif}\;y.re \leq 1.22 \cdot 10^{+184}:\\
\;\;\;\;\mathsf{log1p}\left(\mathsf{expm1}\left(t_0\right)\right)\\
\mathbf{else}:\\
\;\;\;\;{\left({t_0}^{3}\right)}^{0.3333333333333333}\\
\end{array}
\end{array}
if y.re < 5.39999999999999973e37Initial program 42.2%
Taylor expanded in y.im around 0 45.6%
Taylor expanded in y.re around 0 38.6%
*-commutative38.6%
distribute-rgt-neg-in38.6%
Simplified38.6%
Taylor expanded in y.re around 0 39.1%
neg-mul-139.1%
distribute-rgt-neg-in39.1%
Simplified39.1%
if 5.39999999999999973e37 < y.re < 1.22000000000000006e184Initial program 37.0%
Taylor expanded in y.im around 0 74.1%
Taylor expanded in y.re around 0 12.9%
*-commutative12.9%
distribute-rgt-neg-in12.9%
Simplified12.9%
Taylor expanded in y.im around 0 2.5%
*-commutative2.5%
log1p-expm1-u34.1%
Applied egg-rr34.1%
if 1.22000000000000006e184 < y.re Initial program 34.6%
Taylor expanded in y.im around 0 46.2%
Taylor expanded in y.re around 0 9.2%
*-commutative9.2%
distribute-rgt-neg-in9.2%
Simplified9.2%
Taylor expanded in y.im around 0 2.2%
*-commutative2.2%
add-cbrt-cube19.8%
pow1/342.9%
pow342.9%
Applied egg-rr42.9%
Final simplification38.9%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re))))
(if (<= y.im -2.85e+29)
(+ -1.0 (+ t_0 1.0))
(if (<= y.im 1.22e+116) (log1p (expm1 t_0)) (cbrt (pow t_0 3.0))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if (y_46_im <= -2.85e+29) {
tmp = -1.0 + (t_0 + 1.0);
} else if (y_46_im <= 1.22e+116) {
tmp = log1p(expm1(t_0));
} else {
tmp = cbrt(pow(t_0, 3.0));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
double tmp;
if (y_46_im <= -2.85e+29) {
tmp = -1.0 + (t_0 + 1.0);
} else if (y_46_im <= 1.22e+116) {
tmp = Math.log1p(Math.expm1(t_0));
} else {
tmp = Math.cbrt(Math.pow(t_0, 3.0));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) tmp = 0.0 if (y_46_im <= -2.85e+29) tmp = Float64(-1.0 + Float64(t_0 + 1.0)); elseif (y_46_im <= 1.22e+116) tmp = log1p(expm1(t_0)); else tmp = cbrt((t_0 ^ 3.0)); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -2.85e+29], N[(-1.0 + N[(t$95$0 + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 1.22e+116], N[Log[1 + N[(Exp[t$95$0] - 1), $MachinePrecision]], $MachinePrecision], N[Power[N[Power[t$95$0, 3.0], $MachinePrecision], 1/3], $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.im \leq -2.85 \cdot 10^{+29}:\\
\;\;\;\;-1 + \left(t_0 + 1\right)\\
\mathbf{elif}\;y.im \leq 1.22 \cdot 10^{+116}:\\
\;\;\;\;\mathsf{log1p}\left(\mathsf{expm1}\left(t_0\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\sqrt[3]{{t_0}^{3}}\\
\end{array}
\end{array}
if y.im < -2.85e29Initial program 39.2%
Taylor expanded in y.im around 0 44.2%
Taylor expanded in y.re around 0 40.9%
*-commutative40.9%
distribute-rgt-neg-in40.9%
Simplified40.9%
Taylor expanded in y.im around 0 2.9%
*-commutative2.9%
expm1-log1p-u2.6%
expm1-udef25.7%
log1p-udef25.7%
add-exp-log26.1%
Applied egg-rr26.1%
if -2.85e29 < y.im < 1.21999999999999993e116Initial program 40.3%
Taylor expanded in y.im around 0 47.5%
Taylor expanded in y.re around 0 25.6%
*-commutative25.6%
distribute-rgt-neg-in25.6%
Simplified25.6%
Taylor expanded in y.im around 0 19.3%
*-commutative19.3%
log1p-expm1-u30.0%
Applied egg-rr30.0%
if 1.21999999999999993e116 < y.im Initial program 46.9%
Taylor expanded in y.im around 0 62.7%
Taylor expanded in y.re around 0 56.8%
*-commutative56.8%
distribute-rgt-neg-in56.8%
Simplified56.8%
Taylor expanded in y.im around 0 3.4%
*-commutative3.4%
add-cbrt-cube38.5%
pow338.5%
Applied egg-rr38.5%
Final simplification30.2%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re))) (t_1 (pow t_0 3.0)))
(if (<= y.im -1.4e-166)
(pow t_1 0.3333333333333333)
(if (<= y.im 1.25e+117) (log1p (expm1 t_0)) (cbrt t_1)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = pow(t_0, 3.0);
double tmp;
if (y_46_im <= -1.4e-166) {
tmp = pow(t_1, 0.3333333333333333);
} else if (y_46_im <= 1.25e+117) {
tmp = log1p(expm1(t_0));
} else {
tmp = cbrt(t_1);
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_1 = Math.pow(t_0, 3.0);
double tmp;
if (y_46_im <= -1.4e-166) {
tmp = Math.pow(t_1, 0.3333333333333333);
} else if (y_46_im <= 1.25e+117) {
tmp = Math.log1p(Math.expm1(t_0));
} else {
tmp = Math.cbrt(t_1);
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_1 = t_0 ^ 3.0 tmp = 0.0 if (y_46_im <= -1.4e-166) tmp = t_1 ^ 0.3333333333333333; elseif (y_46_im <= 1.25e+117) tmp = log1p(expm1(t_0)); else tmp = cbrt(t_1); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Power[t$95$0, 3.0], $MachinePrecision]}, If[LessEqual[y$46$im, -1.4e-166], N[Power[t$95$1, 0.3333333333333333], $MachinePrecision], If[LessEqual[y$46$im, 1.25e+117], N[Log[1 + N[(Exp[t$95$0] - 1), $MachinePrecision]], $MachinePrecision], N[Power[t$95$1, 1/3], $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := {t_0}^{3}\\
\mathbf{if}\;y.im \leq -1.4 \cdot 10^{-166}:\\
\;\;\;\;{t_1}^{0.3333333333333333}\\
\mathbf{elif}\;y.im \leq 1.25 \cdot 10^{+117}:\\
\;\;\;\;\mathsf{log1p}\left(\mathsf{expm1}\left(t_0\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\sqrt[3]{t_1}\\
\end{array}
\end{array}
if y.im < -1.4e-166Initial program 41.1%
Taylor expanded in y.im around 0 46.4%
Taylor expanded in y.re around 0 29.7%
*-commutative29.7%
distribute-rgt-neg-in29.7%
Simplified29.7%
Taylor expanded in y.im around 0 5.2%
*-commutative5.2%
add-cbrt-cube20.2%
pow1/323.0%
pow323.0%
Applied egg-rr23.0%
if -1.4e-166 < y.im < 1.24999999999999996e117Initial program 39.2%
Taylor expanded in y.im around 0 46.8%
Taylor expanded in y.re around 0 29.3%
*-commutative29.3%
distribute-rgt-neg-in29.3%
Simplified29.3%
Taylor expanded in y.im around 0 22.1%
*-commutative22.1%
log1p-expm1-u34.2%
Applied egg-rr34.2%
if 1.24999999999999996e117 < y.im Initial program 46.9%
Taylor expanded in y.im around 0 62.7%
Taylor expanded in y.re around 0 56.8%
*-commutative56.8%
distribute-rgt-neg-in56.8%
Simplified56.8%
Taylor expanded in y.im around 0 3.4%
*-commutative3.4%
add-cbrt-cube38.5%
pow338.5%
Applied egg-rr38.5%
Final simplification30.7%
(FPCore (x.re x.im y.re y.im) :precision binary64 (let* ((t_0 (* y.re (atan2 x.im x.re)))) (if (<= y.im -2.45e+29) (+ -1.0 (+ t_0 1.0)) (log1p (expm1 t_0)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if (y_46_im <= -2.45e+29) {
tmp = -1.0 + (t_0 + 1.0);
} else {
tmp = log1p(expm1(t_0));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
double tmp;
if (y_46_im <= -2.45e+29) {
tmp = -1.0 + (t_0 + 1.0);
} else {
tmp = Math.log1p(Math.expm1(t_0));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = y_46_re * math.atan2(x_46_im, x_46_re) tmp = 0 if y_46_im <= -2.45e+29: tmp = -1.0 + (t_0 + 1.0) else: tmp = math.log1p(math.expm1(t_0)) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) tmp = 0.0 if (y_46_im <= -2.45e+29) tmp = Float64(-1.0 + Float64(t_0 + 1.0)); else tmp = log1p(expm1(t_0)); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -2.45e+29], N[(-1.0 + N[(t$95$0 + 1.0), $MachinePrecision]), $MachinePrecision], N[Log[1 + N[(Exp[t$95$0] - 1), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.im \leq -2.45 \cdot 10^{+29}:\\
\;\;\;\;-1 + \left(t_0 + 1\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{log1p}\left(\mathsf{expm1}\left(t_0\right)\right)\\
\end{array}
\end{array}
if y.im < -2.4500000000000001e29Initial program 39.2%
Taylor expanded in y.im around 0 44.2%
Taylor expanded in y.re around 0 40.9%
*-commutative40.9%
distribute-rgt-neg-in40.9%
Simplified40.9%
Taylor expanded in y.im around 0 2.9%
*-commutative2.9%
expm1-log1p-u2.6%
expm1-udef25.7%
log1p-udef25.7%
add-exp-log26.1%
Applied egg-rr26.1%
if -2.4500000000000001e29 < y.im Initial program 41.3%
Taylor expanded in y.im around 0 50.0%
Taylor expanded in y.re around 0 30.6%
*-commutative30.6%
distribute-rgt-neg-in30.6%
Simplified30.6%
Taylor expanded in y.im around 0 16.8%
*-commutative16.8%
log1p-expm1-u28.5%
Applied egg-rr28.5%
Final simplification28.0%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re))))
(if (or (<= y.im -3.6e+34) (not (<= y.im 5.5e-24)))
(+ -1.0 (+ t_0 1.0))
t_0)))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if ((y_46_im <= -3.6e+34) || !(y_46_im <= 5.5e-24)) {
tmp = -1.0 + (t_0 + 1.0);
} else {
tmp = 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
real(8) :: t_0
real(8) :: tmp
t_0 = y_46re * atan2(x_46im, x_46re)
if ((y_46im <= (-3.6d+34)) .or. (.not. (y_46im <= 5.5d-24))) then
tmp = (-1.0d0) + (t_0 + 1.0d0)
else
tmp = 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) {
double t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
double tmp;
if ((y_46_im <= -3.6e+34) || !(y_46_im <= 5.5e-24)) {
tmp = -1.0 + (t_0 + 1.0);
} else {
tmp = t_0;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = y_46_re * math.atan2(x_46_im, x_46_re) tmp = 0 if (y_46_im <= -3.6e+34) or not (y_46_im <= 5.5e-24): tmp = -1.0 + (t_0 + 1.0) else: tmp = t_0 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) tmp = 0.0 if ((y_46_im <= -3.6e+34) || !(y_46_im <= 5.5e-24)) tmp = Float64(-1.0 + Float64(t_0 + 1.0)); else tmp = t_0; end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = y_46_re * atan2(x_46_im, x_46_re); tmp = 0.0; if ((y_46_im <= -3.6e+34) || ~((y_46_im <= 5.5e-24))) tmp = -1.0 + (t_0 + 1.0); else tmp = t_0; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[y$46$im, -3.6e+34], N[Not[LessEqual[y$46$im, 5.5e-24]], $MachinePrecision]], N[(-1.0 + N[(t$95$0 + 1.0), $MachinePrecision]), $MachinePrecision], t$95$0]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.im \leq -3.6 \cdot 10^{+34} \lor \neg \left(y.im \leq 5.5 \cdot 10^{-24}\right):\\
\;\;\;\;-1 + \left(t_0 + 1\right)\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if y.im < -3.6e34 or 5.4999999999999999e-24 < y.im Initial program 38.8%
Taylor expanded in y.im around 0 47.9%
Taylor expanded in y.re around 0 43.4%
*-commutative43.4%
distribute-rgt-neg-in43.4%
Simplified43.4%
Taylor expanded in y.im around 0 3.8%
*-commutative3.8%
expm1-log1p-u3.4%
expm1-udef22.7%
log1p-udef22.7%
add-exp-log23.2%
Applied egg-rr23.2%
if -3.6e34 < y.im < 5.4999999999999999e-24Initial program 42.7%
Taylor expanded in y.im around 0 49.4%
Taylor expanded in y.re around 0 23.3%
*-commutative23.3%
distribute-rgt-neg-in23.3%
Simplified23.3%
Taylor expanded in y.im around 0 22.6%
Final simplification22.9%
(FPCore (x.re x.im y.re y.im) :precision binary64 (* y.re (atan2 x.im x.re)))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return y_46_re * atan2(x_46_im, x_46_re);
}
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 = y_46re * atan2(x_46im, x_46re)
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return y_46_re * Math.atan2(x_46_im, x_46_re);
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): return y_46_re * math.atan2(x_46_im, x_46_re)
function code(x_46_re, x_46_im, y_46_re, y_46_im) return Float64(y_46_re * atan(x_46_im, x_46_re)) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = y_46_re * atan2(x_46_im, x_46_re); end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}
\end{array}
Initial program 40.8%
Taylor expanded in y.im around 0 48.7%
Taylor expanded in y.re around 0 32.9%
*-commutative32.9%
distribute-rgt-neg-in32.9%
Simplified32.9%
Taylor expanded in y.im around 0 13.7%
Final simplification13.7%
herbie shell --seed 2023174
(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)))))