
(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 27 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 (hypot x.re x.im)))
(t_1 (exp (- (* t_0 y.re) (* y.im (atan2 x.im x.re)))))
(t_2 (* y.re (atan2 x.im x.re)))
(t_3 (cbrt (fma t_0 y.im t_2)))
(t_4 (cbrt t_3)))
(if (<= y.im -5e+226)
(* t_1 (sin (pow (* t_4 (pow t_4 2.0)) 3.0)))
(if (<= y.im -1.1e+183)
(* t_1 (sin (pow (cbrt t_2) 3.0)))
(if (<= y.im -7.8e-75)
(* t_1 (sin (* (pow (cbrt y.im) 2.0) (* t_0 (cbrt y.im)))))
(if (<= y.im 2.45e+64)
(* t_1 (sin (* t_3 (pow t_3 2.0))))
(* t_1 (fabs (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(hypot(x_46_re, x_46_im));
double t_1 = exp(((t_0 * y_46_re) - (y_46_im * atan2(x_46_im, x_46_re))));
double t_2 = y_46_re * atan2(x_46_im, x_46_re);
double t_3 = cbrt(fma(t_0, y_46_im, t_2));
double t_4 = cbrt(t_3);
double tmp;
if (y_46_im <= -5e+226) {
tmp = t_1 * sin(pow((t_4 * pow(t_4, 2.0)), 3.0));
} else if (y_46_im <= -1.1e+183) {
tmp = t_1 * sin(pow(cbrt(t_2), 3.0));
} else if (y_46_im <= -7.8e-75) {
tmp = t_1 * sin((pow(cbrt(y_46_im), 2.0) * (t_0 * cbrt(y_46_im))));
} else if (y_46_im <= 2.45e+64) {
tmp = t_1 * sin((t_3 * pow(t_3, 2.0)));
} else {
tmp = t_1 * fabs(sin((y_46_im * log(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(hypot(x_46_re, x_46_im)) t_1 = exp(Float64(Float64(t_0 * y_46_re) - Float64(y_46_im * atan(x_46_im, x_46_re)))) t_2 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_3 = cbrt(fma(t_0, y_46_im, t_2)) t_4 = cbrt(t_3) tmp = 0.0 if (y_46_im <= -5e+226) tmp = Float64(t_1 * sin((Float64(t_4 * (t_4 ^ 2.0)) ^ 3.0))); elseif (y_46_im <= -1.1e+183) tmp = Float64(t_1 * sin((cbrt(t_2) ^ 3.0))); elseif (y_46_im <= -7.8e-75) tmp = Float64(t_1 * sin(Float64((cbrt(y_46_im) ^ 2.0) * Float64(t_0 * cbrt(y_46_im))))); elseif (y_46_im <= 2.45e+64) tmp = Float64(t_1 * sin(Float64(t_3 * (t_3 ^ 2.0)))); else tmp = Float64(t_1 * abs(sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))))); 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[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[Exp[N[(N[(t$95$0 * y$46$re), $MachinePrecision] - N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $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[Power[N[(t$95$0 * y$46$im + t$95$2), $MachinePrecision], 1/3], $MachinePrecision]}, Block[{t$95$4 = N[Power[t$95$3, 1/3], $MachinePrecision]}, If[LessEqual[y$46$im, -5e+226], N[(t$95$1 * N[Sin[N[Power[N[(t$95$4 * N[Power[t$95$4, 2.0], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, -1.1e+183], N[(t$95$1 * N[Sin[N[Power[N[Power[t$95$2, 1/3], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, -7.8e-75], N[(t$95$1 * N[Sin[N[(N[Power[N[Power[y$46$im, 1/3], $MachinePrecision], 2.0], $MachinePrecision] * N[(t$95$0 * N[Power[y$46$im, 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 2.45e+64], N[(t$95$1 * N[Sin[N[(t$95$3 * N[Power[t$95$3, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[Abs[N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
t_1 := e^{t_0 \cdot y.re - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\\
t_2 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_3 := \sqrt[3]{\mathsf{fma}\left(t_0, y.im, t_2\right)}\\
t_4 := \sqrt[3]{t_3}\\
\mathbf{if}\;y.im \leq -5 \cdot 10^{+226}:\\
\;\;\;\;t_1 \cdot \sin \left({\left(t_4 \cdot {t_4}^{2}\right)}^{3}\right)\\
\mathbf{elif}\;y.im \leq -1.1 \cdot 10^{+183}:\\
\;\;\;\;t_1 \cdot \sin \left({\left(\sqrt[3]{t_2}\right)}^{3}\right)\\
\mathbf{elif}\;y.im \leq -7.8 \cdot 10^{-75}:\\
\;\;\;\;t_1 \cdot \sin \left({\left(\sqrt[3]{y.im}\right)}^{2} \cdot \left(t_0 \cdot \sqrt[3]{y.im}\right)\right)\\
\mathbf{elif}\;y.im \leq 2.45 \cdot 10^{+64}:\\
\;\;\;\;t_1 \cdot \sin \left(t_3 \cdot {t_3}^{2}\right)\\
\mathbf{else}:\\
\;\;\;\;t_1 \cdot \left|\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\right|\\
\end{array}
\end{array}
if y.im < -5.0000000000000005e226Initial program 40.9%
Simplified72.7%
fma-udef72.7%
hypot-udef40.9%
*-commutative40.9%
add-cube-cbrt45.5%
pow345.5%
hypot-udef63.6%
*-commutative63.6%
fma-udef63.6%
*-commutative63.6%
Applied egg-rr63.6%
add-cube-cbrt81.8%
pow281.8%
Applied egg-rr81.8%
if -5.0000000000000005e226 < y.im < -1.09999999999999995e183Initial program 37.5%
Simplified62.5%
fma-udef62.5%
hypot-udef37.5%
*-commutative37.5%
add-cube-cbrt37.5%
pow343.8%
hypot-udef75.0%
*-commutative75.0%
fma-udef75.0%
*-commutative75.0%
Applied egg-rr75.0%
Taylor expanded in y.im around 0 18.8%
unpow1/3100.0%
Simplified100.0%
if -1.09999999999999995e183 < y.im < -7.8000000000000003e-75Initial program 43.3%
Simplified78.1%
Taylor expanded in y.im around inf 39.8%
unpow239.8%
unpow239.8%
hypot-def78.1%
Simplified78.1%
add-exp-log14.2%
Applied egg-rr14.2%
add-exp-log78.1%
add-cube-cbrt84.7%
associate-*l*88.0%
pow288.0%
hypot-udef46.6%
+-commutative46.6%
hypot-udef88.0%
Applied egg-rr88.0%
if -7.8000000000000003e-75 < y.im < 2.4500000000000001e64Initial program 45.3%
Simplified92.5%
fma-udef92.5%
hypot-udef45.3%
*-commutative45.3%
add-cube-cbrt49.5%
Applied egg-rr93.6%
if 2.4500000000000001e64 < y.im Initial program 22.0%
Simplified50.2%
Taylor expanded in y.im around inf 22.0%
unpow222.0%
unpow222.0%
hypot-def48.3%
Simplified48.3%
add-sqr-sqrt30.6%
sqrt-unprod72.4%
pow272.4%
Applied egg-rr72.4%
unpow272.4%
rem-sqrt-square72.4%
Simplified72.4%
Final simplification87.5%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re)))
(t_1 (log (hypot x.re x.im)))
(t_2 (fma t_1 y.im t_0))
(t_3 (cbrt t_2))
(t_4 (exp (- (* t_1 y.re) (* y.im (atan2 x.im x.re))))))
(if (<= y.im -1.4e+225)
(* t_4 (sin (/ 1.0 (/ 1.0 t_2))))
(if (<= y.im -1.1e+184)
(* t_4 (sin (pow (cbrt t_0) 3.0)))
(if (<= y.im -3.2e-75)
(* t_4 (sin (* (pow (cbrt y.im) 2.0) (* t_1 (cbrt y.im)))))
(if (<= y.im 5.4e+59)
(* t_4 (sin (* t_3 (pow t_3 2.0))))
(* t_4 (fabs (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 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = log(hypot(x_46_re, x_46_im));
double t_2 = fma(t_1, y_46_im, t_0);
double t_3 = cbrt(t_2);
double t_4 = exp(((t_1 * y_46_re) - (y_46_im * atan2(x_46_im, x_46_re))));
double tmp;
if (y_46_im <= -1.4e+225) {
tmp = t_4 * sin((1.0 / (1.0 / t_2)));
} else if (y_46_im <= -1.1e+184) {
tmp = t_4 * sin(pow(cbrt(t_0), 3.0));
} else if (y_46_im <= -3.2e-75) {
tmp = t_4 * sin((pow(cbrt(y_46_im), 2.0) * (t_1 * cbrt(y_46_im))));
} else if (y_46_im <= 5.4e+59) {
tmp = t_4 * sin((t_3 * pow(t_3, 2.0)));
} else {
tmp = t_4 * fabs(sin((y_46_im * log(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 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_1 = log(hypot(x_46_re, x_46_im)) t_2 = fma(t_1, y_46_im, t_0) t_3 = cbrt(t_2) t_4 = exp(Float64(Float64(t_1 * y_46_re) - Float64(y_46_im * atan(x_46_im, x_46_re)))) tmp = 0.0 if (y_46_im <= -1.4e+225) tmp = Float64(t_4 * sin(Float64(1.0 / Float64(1.0 / t_2)))); elseif (y_46_im <= -1.1e+184) tmp = Float64(t_4 * sin((cbrt(t_0) ^ 3.0))); elseif (y_46_im <= -3.2e-75) tmp = Float64(t_4 * sin(Float64((cbrt(y_46_im) ^ 2.0) * Float64(t_1 * cbrt(y_46_im))))); elseif (y_46_im <= 5.4e+59) tmp = Float64(t_4 * sin(Float64(t_3 * (t_3 ^ 2.0)))); else tmp = Float64(t_4 * abs(sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))))); 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[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 * y$46$im + t$95$0), $MachinePrecision]}, Block[{t$95$3 = N[Power[t$95$2, 1/3], $MachinePrecision]}, Block[{t$95$4 = N[Exp[N[(N[(t$95$1 * y$46$re), $MachinePrecision] - N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$im, -1.4e+225], N[(t$95$4 * N[Sin[N[(1.0 / N[(1.0 / t$95$2), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, -1.1e+184], N[(t$95$4 * N[Sin[N[Power[N[Power[t$95$0, 1/3], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, -3.2e-75], N[(t$95$4 * N[Sin[N[(N[Power[N[Power[y$46$im, 1/3], $MachinePrecision], 2.0], $MachinePrecision] * N[(t$95$1 * N[Power[y$46$im, 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 5.4e+59], N[(t$95$4 * N[Sin[N[(t$95$3 * N[Power[t$95$3, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$4 * N[Abs[N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
t_2 := \mathsf{fma}\left(t_1, y.im, t_0\right)\\
t_3 := \sqrt[3]{t_2}\\
t_4 := e^{t_1 \cdot y.re - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\\
\mathbf{if}\;y.im \leq -1.4 \cdot 10^{+225}:\\
\;\;\;\;t_4 \cdot \sin \left(\frac{1}{\frac{1}{t_2}}\right)\\
\mathbf{elif}\;y.im \leq -1.1 \cdot 10^{+184}:\\
\;\;\;\;t_4 \cdot \sin \left({\left(\sqrt[3]{t_0}\right)}^{3}\right)\\
\mathbf{elif}\;y.im \leq -3.2 \cdot 10^{-75}:\\
\;\;\;\;t_4 \cdot \sin \left({\left(\sqrt[3]{y.im}\right)}^{2} \cdot \left(t_1 \cdot \sqrt[3]{y.im}\right)\right)\\
\mathbf{elif}\;y.im \leq 5.4 \cdot 10^{+59}:\\
\;\;\;\;t_4 \cdot \sin \left(t_3 \cdot {t_3}^{2}\right)\\
\mathbf{else}:\\
\;\;\;\;t_4 \cdot \left|\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\right|\\
\end{array}
\end{array}
if y.im < -1.4e225Initial program 40.9%
Simplified72.7%
fma-udef72.7%
hypot-udef40.9%
*-commutative40.9%
+-commutative40.9%
flip-+0.0%
pow20.0%
pow20.0%
hypot-udef0.0%
Applied egg-rr0.0%
clear-num0.0%
inv-pow0.0%
clear-num0.0%
unpow20.0%
unpow20.0%
flip-+77.3%
fma-def77.3%
Applied egg-rr77.3%
unpow-177.3%
fma-def77.3%
+-commutative77.3%
fma-udef77.3%
*-commutative77.3%
Simplified77.3%
if -1.4e225 < y.im < -1.1e184Initial program 37.5%
Simplified62.5%
fma-udef62.5%
hypot-udef37.5%
*-commutative37.5%
add-cube-cbrt37.5%
pow343.8%
hypot-udef75.0%
*-commutative75.0%
fma-udef75.0%
*-commutative75.0%
Applied egg-rr75.0%
Taylor expanded in y.im around 0 18.8%
unpow1/3100.0%
Simplified100.0%
if -1.1e184 < y.im < -3.19999999999999977e-75Initial program 43.3%
Simplified78.1%
Taylor expanded in y.im around inf 39.8%
unpow239.8%
unpow239.8%
hypot-def78.1%
Simplified78.1%
add-exp-log14.2%
Applied egg-rr14.2%
add-exp-log78.1%
add-cube-cbrt84.7%
associate-*l*88.0%
pow288.0%
hypot-udef46.6%
+-commutative46.6%
hypot-udef88.0%
Applied egg-rr88.0%
if -3.19999999999999977e-75 < y.im < 5.4000000000000002e59Initial program 45.3%
Simplified92.5%
fma-udef92.5%
hypot-udef45.3%
*-commutative45.3%
add-cube-cbrt49.5%
Applied egg-rr93.6%
if 5.4000000000000002e59 < y.im Initial program 22.0%
Simplified50.2%
Taylor expanded in y.im around inf 22.0%
unpow222.0%
unpow222.0%
hypot-def48.3%
Simplified48.3%
add-sqr-sqrt30.6%
sqrt-unprod72.4%
pow272.4%
Applied egg-rr72.4%
unpow272.4%
rem-sqrt-square72.4%
Simplified72.4%
Final simplification87.1%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re)))
(t_1 (log (hypot x.re x.im)))
(t_2 (fma t_1 y.im t_0))
(t_3 (exp (- (* t_1 y.re) (* y.im (atan2 x.im x.re))))))
(if (<= y.im -4e+224)
(* t_3 (sin (/ 1.0 (/ 1.0 t_2))))
(if (<= y.im -9e+184)
(* t_3 (sin (pow (cbrt t_0) 3.0)))
(if (<= y.im -5.5e-97)
(* t_3 (sin (* (pow (cbrt y.im) 2.0) (* t_1 (cbrt y.im)))))
(if (<= y.im 8e+65)
(* t_3 (sin t_2))
(* t_3 (fabs (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 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = log(hypot(x_46_re, x_46_im));
double t_2 = fma(t_1, y_46_im, t_0);
double t_3 = exp(((t_1 * y_46_re) - (y_46_im * atan2(x_46_im, x_46_re))));
double tmp;
if (y_46_im <= -4e+224) {
tmp = t_3 * sin((1.0 / (1.0 / t_2)));
} else if (y_46_im <= -9e+184) {
tmp = t_3 * sin(pow(cbrt(t_0), 3.0));
} else if (y_46_im <= -5.5e-97) {
tmp = t_3 * sin((pow(cbrt(y_46_im), 2.0) * (t_1 * cbrt(y_46_im))));
} else if (y_46_im <= 8e+65) {
tmp = t_3 * sin(t_2);
} else {
tmp = t_3 * fabs(sin((y_46_im * log(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 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_1 = log(hypot(x_46_re, x_46_im)) t_2 = fma(t_1, y_46_im, t_0) t_3 = exp(Float64(Float64(t_1 * y_46_re) - Float64(y_46_im * atan(x_46_im, x_46_re)))) tmp = 0.0 if (y_46_im <= -4e+224) tmp = Float64(t_3 * sin(Float64(1.0 / Float64(1.0 / t_2)))); elseif (y_46_im <= -9e+184) tmp = Float64(t_3 * sin((cbrt(t_0) ^ 3.0))); elseif (y_46_im <= -5.5e-97) tmp = Float64(t_3 * sin(Float64((cbrt(y_46_im) ^ 2.0) * Float64(t_1 * cbrt(y_46_im))))); elseif (y_46_im <= 8e+65) tmp = Float64(t_3 * sin(t_2)); else tmp = Float64(t_3 * abs(sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))))); 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[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 * y$46$im + t$95$0), $MachinePrecision]}, Block[{t$95$3 = N[Exp[N[(N[(t$95$1 * y$46$re), $MachinePrecision] - N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$im, -4e+224], N[(t$95$3 * N[Sin[N[(1.0 / N[(1.0 / t$95$2), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, -9e+184], N[(t$95$3 * N[Sin[N[Power[N[Power[t$95$0, 1/3], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, -5.5e-97], N[(t$95$3 * N[Sin[N[(N[Power[N[Power[y$46$im, 1/3], $MachinePrecision], 2.0], $MachinePrecision] * N[(t$95$1 * N[Power[y$46$im, 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 8e+65], N[(t$95$3 * N[Sin[t$95$2], $MachinePrecision]), $MachinePrecision], N[(t$95$3 * N[Abs[N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
t_2 := \mathsf{fma}\left(t_1, y.im, t_0\right)\\
t_3 := e^{t_1 \cdot y.re - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\\
\mathbf{if}\;y.im \leq -4 \cdot 10^{+224}:\\
\;\;\;\;t_3 \cdot \sin \left(\frac{1}{\frac{1}{t_2}}\right)\\
\mathbf{elif}\;y.im \leq -9 \cdot 10^{+184}:\\
\;\;\;\;t_3 \cdot \sin \left({\left(\sqrt[3]{t_0}\right)}^{3}\right)\\
\mathbf{elif}\;y.im \leq -5.5 \cdot 10^{-97}:\\
\;\;\;\;t_3 \cdot \sin \left({\left(\sqrt[3]{y.im}\right)}^{2} \cdot \left(t_1 \cdot \sqrt[3]{y.im}\right)\right)\\
\mathbf{elif}\;y.im \leq 8 \cdot 10^{+65}:\\
\;\;\;\;t_3 \cdot \sin t_2\\
\mathbf{else}:\\
\;\;\;\;t_3 \cdot \left|\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\right|\\
\end{array}
\end{array}
if y.im < -3.99999999999999988e224Initial program 40.9%
Simplified72.7%
fma-udef72.7%
hypot-udef40.9%
*-commutative40.9%
+-commutative40.9%
flip-+0.0%
pow20.0%
pow20.0%
hypot-udef0.0%
Applied egg-rr0.0%
clear-num0.0%
inv-pow0.0%
clear-num0.0%
unpow20.0%
unpow20.0%
flip-+77.3%
fma-def77.3%
Applied egg-rr77.3%
unpow-177.3%
fma-def77.3%
+-commutative77.3%
fma-udef77.3%
*-commutative77.3%
Simplified77.3%
if -3.99999999999999988e224 < y.im < -9.00000000000000072e184Initial program 37.5%
Simplified62.5%
fma-udef62.5%
hypot-udef37.5%
*-commutative37.5%
add-cube-cbrt37.5%
pow343.8%
hypot-udef75.0%
*-commutative75.0%
fma-udef75.0%
*-commutative75.0%
Applied egg-rr75.0%
Taylor expanded in y.im around 0 18.8%
unpow1/3100.0%
Simplified100.0%
if -9.00000000000000072e184 < y.im < -5.49999999999999948e-97Initial program 42.6%
Simplified77.7%
Taylor expanded in y.im around inf 41.1%
unpow241.1%
unpow241.1%
hypot-def79.3%
Simplified79.3%
add-exp-log15.4%
Applied egg-rr15.4%
add-exp-log79.3%
add-cube-cbrt84.9%
associate-*l*87.8%
pow287.8%
hypot-udef47.0%
+-commutative47.0%
hypot-udef87.8%
Applied egg-rr87.8%
if -5.49999999999999948e-97 < y.im < 7.9999999999999999e65Initial program 45.7%
Simplified93.1%
if 7.9999999999999999e65 < y.im Initial program 22.1%
Simplified50.9%
Taylor expanded in y.im around inf 22.1%
unpow222.1%
unpow222.1%
hypot-def48.9%
Simplified48.9%
add-sqr-sqrt30.8%
sqrt-unprod73.5%
pow273.5%
Applied egg-rr73.5%
unpow273.5%
rem-sqrt-square73.5%
Simplified73.5%
Final simplification87.0%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.im (log (hypot x.im x.re))))
(t_1 (log (hypot x.re x.im)))
(t_2 (exp (- (* t_1 y.re) (* y.im (atan2 x.im x.re)))))
(t_3 (* y.re (atan2 x.im x.re))))
(if (<= y.im -2.7e+252)
(* t_2 t_0)
(if (<= y.im -4e+112)
(* t_2 (sin (pow (cbrt t_3) 3.0)))
(if (<= y.im 1.55e+65)
(* t_2 (sin (fma t_1 y.im t_3)))
(* t_2 (fabs (sin 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_im * log(hypot(x_46_im, x_46_re));
double t_1 = log(hypot(x_46_re, x_46_im));
double t_2 = exp(((t_1 * y_46_re) - (y_46_im * atan2(x_46_im, x_46_re))));
double t_3 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if (y_46_im <= -2.7e+252) {
tmp = t_2 * t_0;
} else if (y_46_im <= -4e+112) {
tmp = t_2 * sin(pow(cbrt(t_3), 3.0));
} else if (y_46_im <= 1.55e+65) {
tmp = t_2 * sin(fma(t_1, y_46_im, t_3));
} else {
tmp = t_2 * fabs(sin(t_0));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_im * log(hypot(x_46_im, x_46_re))) t_1 = log(hypot(x_46_re, x_46_im)) t_2 = exp(Float64(Float64(t_1 * y_46_re) - Float64(y_46_im * atan(x_46_im, x_46_re)))) t_3 = Float64(y_46_re * atan(x_46_im, x_46_re)) tmp = 0.0 if (y_46_im <= -2.7e+252) tmp = Float64(t_2 * t_0); elseif (y_46_im <= -4e+112) tmp = Float64(t_2 * sin((cbrt(t_3) ^ 3.0))); elseif (y_46_im <= 1.55e+65) tmp = Float64(t_2 * sin(fma(t_1, y_46_im, t_3))); else tmp = Float64(t_2 * abs(sin(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$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $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[Exp[N[(N[(t$95$1 * y$46$re), $MachinePrecision] - N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -2.7e+252], N[(t$95$2 * t$95$0), $MachinePrecision], If[LessEqual[y$46$im, -4e+112], N[(t$95$2 * N[Sin[N[Power[N[Power[t$95$3, 1/3], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 1.55e+65], N[(t$95$2 * N[Sin[N[(t$95$1 * y$46$im + t$95$3), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$2 * N[Abs[N[Sin[t$95$0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
t_1 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
t_2 := e^{t_1 \cdot y.re - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\\
t_3 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.im \leq -2.7 \cdot 10^{+252}:\\
\;\;\;\;t_2 \cdot t_0\\
\mathbf{elif}\;y.im \leq -4 \cdot 10^{+112}:\\
\;\;\;\;t_2 \cdot \sin \left({\left(\sqrt[3]{t_3}\right)}^{3}\right)\\
\mathbf{elif}\;y.im \leq 1.55 \cdot 10^{+65}:\\
\;\;\;\;t_2 \cdot \sin \left(\mathsf{fma}\left(t_1, y.im, t_3\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_2 \cdot \left|\sin t_0\right|\\
\end{array}
\end{array}
if y.im < -2.7000000000000001e252Initial program 40.0%
Simplified73.3%
Taylor expanded in y.im around inf 46.7%
unpow246.7%
unpow246.7%
hypot-def73.3%
Simplified73.3%
Taylor expanded in y.im around 0 66.7%
+-commutative66.7%
unpow266.7%
unpow266.7%
hypot-def80.0%
hypot-def66.7%
unpow266.7%
unpow266.7%
+-commutative66.7%
unpow266.7%
unpow266.7%
hypot-def80.0%
Simplified80.0%
if -2.7000000000000001e252 < y.im < -3.9999999999999997e112Initial program 45.2%
Simplified69.7%
fma-udef69.7%
hypot-udef45.2%
*-commutative45.2%
add-cube-cbrt45.2%
pow347.6%
hypot-udef71.5%
*-commutative71.5%
fma-udef71.5%
*-commutative71.5%
Applied egg-rr71.5%
Taylor expanded in y.im around 0 33.4%
unpow1/383.4%
Simplified83.4%
if -3.9999999999999997e112 < y.im < 1.54999999999999995e65Initial program 43.5%
Simplified88.7%
if 1.54999999999999995e65 < y.im Initial program 22.1%
Simplified50.9%
Taylor expanded in y.im around inf 22.1%
unpow222.1%
unpow222.1%
hypot-def48.9%
Simplified48.9%
add-sqr-sqrt30.8%
sqrt-unprod73.5%
pow273.5%
Applied egg-rr73.5%
unpow273.5%
rem-sqrt-square73.5%
Simplified73.5%
Final simplification84.3%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re)))
(t_1 (log (hypot x.re x.im)))
(t_2 (fma t_1 y.im t_0))
(t_3 (exp (- (* t_1 y.re) (* y.im (atan2 x.im x.re))))))
(if (<= y.im -4.1e+224)
(* t_3 (sin (/ 1.0 (/ 1.0 t_2))))
(if (<= y.im -1.6e+113)
(* t_3 (sin (pow (cbrt t_0) 3.0)))
(if (<= y.im 4.7e+27)
(* t_3 (sin t_2))
(* t_3 (fabs (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 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = log(hypot(x_46_re, x_46_im));
double t_2 = fma(t_1, y_46_im, t_0);
double t_3 = exp(((t_1 * y_46_re) - (y_46_im * atan2(x_46_im, x_46_re))));
double tmp;
if (y_46_im <= -4.1e+224) {
tmp = t_3 * sin((1.0 / (1.0 / t_2)));
} else if (y_46_im <= -1.6e+113) {
tmp = t_3 * sin(pow(cbrt(t_0), 3.0));
} else if (y_46_im <= 4.7e+27) {
tmp = t_3 * sin(t_2);
} else {
tmp = t_3 * fabs(sin((y_46_im * log(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 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_1 = log(hypot(x_46_re, x_46_im)) t_2 = fma(t_1, y_46_im, t_0) t_3 = exp(Float64(Float64(t_1 * y_46_re) - Float64(y_46_im * atan(x_46_im, x_46_re)))) tmp = 0.0 if (y_46_im <= -4.1e+224) tmp = Float64(t_3 * sin(Float64(1.0 / Float64(1.0 / t_2)))); elseif (y_46_im <= -1.6e+113) tmp = Float64(t_3 * sin((cbrt(t_0) ^ 3.0))); elseif (y_46_im <= 4.7e+27) tmp = Float64(t_3 * sin(t_2)); else tmp = Float64(t_3 * abs(sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))))); 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[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 * y$46$im + t$95$0), $MachinePrecision]}, Block[{t$95$3 = N[Exp[N[(N[(t$95$1 * y$46$re), $MachinePrecision] - N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$im, -4.1e+224], N[(t$95$3 * N[Sin[N[(1.0 / N[(1.0 / t$95$2), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, -1.6e+113], N[(t$95$3 * N[Sin[N[Power[N[Power[t$95$0, 1/3], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 4.7e+27], N[(t$95$3 * N[Sin[t$95$2], $MachinePrecision]), $MachinePrecision], N[(t$95$3 * N[Abs[N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
t_2 := \mathsf{fma}\left(t_1, y.im, t_0\right)\\
t_3 := e^{t_1 \cdot y.re - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\\
\mathbf{if}\;y.im \leq -4.1 \cdot 10^{+224}:\\
\;\;\;\;t_3 \cdot \sin \left(\frac{1}{\frac{1}{t_2}}\right)\\
\mathbf{elif}\;y.im \leq -1.6 \cdot 10^{+113}:\\
\;\;\;\;t_3 \cdot \sin \left({\left(\sqrt[3]{t_0}\right)}^{3}\right)\\
\mathbf{elif}\;y.im \leq 4.7 \cdot 10^{+27}:\\
\;\;\;\;t_3 \cdot \sin t_2\\
\mathbf{else}:\\
\;\;\;\;t_3 \cdot \left|\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\right|\\
\end{array}
\end{array}
if y.im < -4.09999999999999969e224Initial program 40.9%
Simplified72.7%
fma-udef72.7%
hypot-udef40.9%
*-commutative40.9%
+-commutative40.9%
flip-+0.0%
pow20.0%
pow20.0%
hypot-udef0.0%
Applied egg-rr0.0%
clear-num0.0%
inv-pow0.0%
clear-num0.0%
unpow20.0%
unpow20.0%
flip-+77.3%
fma-def77.3%
Applied egg-rr77.3%
unpow-177.3%
fma-def77.3%
+-commutative77.3%
fma-udef77.3%
*-commutative77.3%
Simplified77.3%
if -4.09999999999999969e224 < y.im < -1.5999999999999999e113Initial program 45.7%
Simplified69.4%
fma-udef69.4%
hypot-udef45.7%
*-commutative45.7%
add-cube-cbrt42.9%
pow345.7%
hypot-udef71.5%
*-commutative71.5%
fma-udef71.5%
*-commutative71.5%
Applied egg-rr71.5%
Taylor expanded in y.im around 0 34.4%
unpow1/388.7%
Simplified88.7%
if -1.5999999999999999e113 < y.im < 4.69999999999999976e27Initial program 44.4%
Simplified89.3%
if 4.69999999999999976e27 < y.im Initial program 22.8%
Simplified54.5%
Taylor expanded in y.im around inf 24.5%
unpow224.5%
unpow224.5%
hypot-def54.5%
Simplified54.5%
add-sqr-sqrt33.8%
sqrt-unprod74.0%
pow274.0%
Applied egg-rr74.0%
unpow274.0%
rem-sqrt-square74.0%
Simplified74.0%
Final simplification84.7%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.im (atan2 x.im x.re)))
(t_1 (* y.im (log (hypot x.im x.re))))
(t_2 (* y.re (atan2 x.im x.re)))
(t_3 (log (hypot x.re x.im)))
(t_4 (exp (- (* t_3 y.re) t_0)))
(t_5 (* t_4 t_1)))
(if (<= y.im -5.3e+246)
t_5
(if (<= y.im -1.02e+204)
(*
(exp (- (* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im))))) t_0))
(sin (fabs t_2)))
(if (<= y.im -7e-97)
t_5
(if (<= y.im 3e+20)
(* (sin (fma t_3 y.im t_2)) (pow (hypot x.im x.re) y.re))
(* t_4 (fabs (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_im * atan2(x_46_im, x_46_re);
double t_1 = y_46_im * log(hypot(x_46_im, x_46_re));
double t_2 = y_46_re * atan2(x_46_im, x_46_re);
double t_3 = log(hypot(x_46_re, x_46_im));
double t_4 = exp(((t_3 * y_46_re) - t_0));
double t_5 = t_4 * t_1;
double tmp;
if (y_46_im <= -5.3e+246) {
tmp = t_5;
} else if (y_46_im <= -1.02e+204) {
tmp = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0)) * sin(fabs(t_2));
} else if (y_46_im <= -7e-97) {
tmp = t_5;
} else if (y_46_im <= 3e+20) {
tmp = sin(fma(t_3, y_46_im, t_2)) * pow(hypot(x_46_im, x_46_re), y_46_re);
} else {
tmp = t_4 * fabs(sin(t_1));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_im * atan(x_46_im, x_46_re)) t_1 = Float64(y_46_im * log(hypot(x_46_im, x_46_re))) t_2 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_3 = log(hypot(x_46_re, x_46_im)) t_4 = exp(Float64(Float64(t_3 * y_46_re) - t_0)) t_5 = Float64(t_4 * t_1) tmp = 0.0 if (y_46_im <= -5.3e+246) tmp = t_5; elseif (y_46_im <= -1.02e+204) tmp = Float64(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)) * sin(abs(t_2))); elseif (y_46_im <= -7e-97) tmp = t_5; elseif (y_46_im <= 3e+20) tmp = Float64(sin(fma(t_3, y_46_im, t_2)) * (hypot(x_46_im, x_46_re) ^ y_46_re)); else tmp = Float64(t_4 * abs(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$im * 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[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$4 = N[Exp[N[(N[(t$95$3 * y$46$re), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$5 = N[(t$95$4 * t$95$1), $MachinePrecision]}, If[LessEqual[y$46$im, -5.3e+246], t$95$5, If[LessEqual[y$46$im, -1.02e+204], N[(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] * N[Sin[N[Abs[t$95$2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, -7e-97], t$95$5, If[LessEqual[y$46$im, 3e+20], N[(N[Sin[N[(t$95$3 * y$46$im + t$95$2), $MachinePrecision]], $MachinePrecision] * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], N[(t$95$4 * N[Abs[N[Sin[t$95$1], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.im \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 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_3 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
t_4 := e^{t_3 \cdot y.re - t_0}\\
t_5 := t_4 \cdot t_1\\
\mathbf{if}\;y.im \leq -5.3 \cdot 10^{+246}:\\
\;\;\;\;t_5\\
\mathbf{elif}\;y.im \leq -1.02 \cdot 10^{+204}:\\
\;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - t_0} \cdot \sin \left(\left|t_2\right|\right)\\
\mathbf{elif}\;y.im \leq -7 \cdot 10^{-97}:\\
\;\;\;\;t_5\\
\mathbf{elif}\;y.im \leq 3 \cdot 10^{+20}:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(t_3, y.im, t_2\right)\right) \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;t_4 \cdot \left|\sin t_1\right|\\
\end{array}
\end{array}
if y.im < -5.29999999999999976e246 or -1.02e204 < y.im < -7.00000000000000038e-97Initial program 39.4%
Simplified76.7%
Taylor expanded in y.im around inf 38.3%
unpow238.3%
unpow238.3%
hypot-def76.7%
Simplified76.7%
Taylor expanded in y.im around 0 56.5%
+-commutative56.5%
unpow256.5%
unpow256.5%
hypot-def79.8%
hypot-def56.5%
unpow256.5%
unpow256.5%
+-commutative56.5%
unpow256.5%
unpow256.5%
hypot-def79.8%
Simplified79.8%
if -5.29999999999999976e246 < y.im < -1.02e204Initial program 53.3%
Taylor expanded in y.im around 0 60.2%
*-commutative20.4%
add-sqr-sqrt6.8%
sqrt-prod13.8%
rem-sqrt-square33.8%
Applied egg-rr80.2%
if -7.00000000000000038e-97 < y.im < 3e20Initial program 48.2%
exp-diff46.1%
+-rgt-identity46.1%
+-rgt-identity46.1%
exp-to-pow46.1%
hypot-def46.1%
*-commutative46.1%
exp-prod46.1%
fma-def46.1%
hypot-def93.3%
*-commutative93.3%
Simplified93.3%
Taylor expanded in y.im around 0 76.0%
unpow276.0%
unpow276.0%
hypot-def94.4%
Simplified94.4%
if 3e20 < y.im Initial program 22.1%
Simplified54.4%
Taylor expanded in y.im around inf 23.7%
unpow223.7%
unpow223.7%
hypot-def54.4%
Simplified54.4%
add-sqr-sqrt32.6%
sqrt-unprod71.9%
pow271.9%
Applied egg-rr71.9%
unpow271.9%
rem-sqrt-square71.9%
Simplified71.9%
Final simplification83.3%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.re x.im)))
(t_1 (exp (- (* t_0 y.re) (* y.im (atan2 x.im x.re)))))
(t_2 (* y.re (atan2 x.im x.re)))
(t_3 (* y.im (log (hypot x.im x.re))))
(t_4 (sin t_3)))
(if (<= y.im -6.4e+252)
(* t_1 t_3)
(if (<= y.im -9.5e+112)
(* t_1 (sin (pow (cbrt t_2) 3.0)))
(if (<= y.im -6.8e-97)
(* t_1 t_4)
(if (<= y.im 4.6e+20)
(* (sin (fma t_0 y.im t_2)) (pow (hypot x.im x.re) y.re))
(* t_1 (fabs t_4))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(hypot(x_46_re, x_46_im));
double t_1 = exp(((t_0 * y_46_re) - (y_46_im * atan2(x_46_im, x_46_re))));
double t_2 = y_46_re * atan2(x_46_im, x_46_re);
double t_3 = y_46_im * log(hypot(x_46_im, x_46_re));
double t_4 = sin(t_3);
double tmp;
if (y_46_im <= -6.4e+252) {
tmp = t_1 * t_3;
} else if (y_46_im <= -9.5e+112) {
tmp = t_1 * sin(pow(cbrt(t_2), 3.0));
} else if (y_46_im <= -6.8e-97) {
tmp = t_1 * t_4;
} else if (y_46_im <= 4.6e+20) {
tmp = sin(fma(t_0, y_46_im, t_2)) * pow(hypot(x_46_im, x_46_re), y_46_re);
} else {
tmp = t_1 * fabs(t_4);
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_re, x_46_im)) t_1 = exp(Float64(Float64(t_0 * y_46_re) - Float64(y_46_im * atan(x_46_im, x_46_re)))) t_2 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_3 = Float64(y_46_im * log(hypot(x_46_im, x_46_re))) t_4 = sin(t_3) tmp = 0.0 if (y_46_im <= -6.4e+252) tmp = Float64(t_1 * t_3); elseif (y_46_im <= -9.5e+112) tmp = Float64(t_1 * sin((cbrt(t_2) ^ 3.0))); elseif (y_46_im <= -6.8e-97) tmp = Float64(t_1 * t_4); elseif (y_46_im <= 4.6e+20) tmp = Float64(sin(fma(t_0, y_46_im, t_2)) * (hypot(x_46_im, x_46_re) ^ y_46_re)); else tmp = Float64(t_1 * abs(t_4)); 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[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[Exp[N[(N[(t$95$0 * y$46$re), $MachinePrecision] - N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $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[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[Sin[t$95$3], $MachinePrecision]}, If[LessEqual[y$46$im, -6.4e+252], N[(t$95$1 * t$95$3), $MachinePrecision], If[LessEqual[y$46$im, -9.5e+112], N[(t$95$1 * N[Sin[N[Power[N[Power[t$95$2, 1/3], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, -6.8e-97], N[(t$95$1 * t$95$4), $MachinePrecision], If[LessEqual[y$46$im, 4.6e+20], N[(N[Sin[N[(t$95$0 * y$46$im + t$95$2), $MachinePrecision]], $MachinePrecision] * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[Abs[t$95$4], $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
t_1 := e^{t_0 \cdot y.re - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\\
t_2 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_3 := y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
t_4 := \sin t_3\\
\mathbf{if}\;y.im \leq -6.4 \cdot 10^{+252}:\\
\;\;\;\;t_1 \cdot t_3\\
\mathbf{elif}\;y.im \leq -9.5 \cdot 10^{+112}:\\
\;\;\;\;t_1 \cdot \sin \left({\left(\sqrt[3]{t_2}\right)}^{3}\right)\\
\mathbf{elif}\;y.im \leq -6.8 \cdot 10^{-97}:\\
\;\;\;\;t_1 \cdot t_4\\
\mathbf{elif}\;y.im \leq 4.6 \cdot 10^{+20}:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(t_0, y.im, t_2\right)\right) \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;t_1 \cdot \left|t_4\right|\\
\end{array}
\end{array}
if y.im < -6.4000000000000003e252Initial program 40.0%
Simplified73.3%
Taylor expanded in y.im around inf 46.7%
unpow246.7%
unpow246.7%
hypot-def73.3%
Simplified73.3%
Taylor expanded in y.im around 0 66.7%
+-commutative66.7%
unpow266.7%
unpow266.7%
hypot-def80.0%
hypot-def66.7%
unpow266.7%
unpow266.7%
+-commutative66.7%
unpow266.7%
unpow266.7%
hypot-def80.0%
Simplified80.0%
if -6.4000000000000003e252 < y.im < -9.5000000000000008e112Initial program 45.2%
Simplified69.7%
fma-udef69.7%
hypot-udef45.2%
*-commutative45.2%
add-cube-cbrt45.2%
pow347.6%
hypot-udef71.5%
*-commutative71.5%
fma-udef71.5%
*-commutative71.5%
Applied egg-rr71.5%
Taylor expanded in y.im around 0 33.4%
unpow1/383.4%
Simplified83.4%
if -9.5000000000000008e112 < y.im < -6.7999999999999998e-97Initial program 38.5%
Simplified78.8%
Taylor expanded in y.im around inf 38.5%
unpow238.5%
unpow238.5%
hypot-def83.1%
Simplified83.1%
if -6.7999999999999998e-97 < y.im < 4.6e20Initial program 48.2%
exp-diff46.1%
+-rgt-identity46.1%
+-rgt-identity46.1%
exp-to-pow46.1%
hypot-def46.1%
*-commutative46.1%
exp-prod46.1%
fma-def46.1%
hypot-def93.3%
*-commutative93.3%
Simplified93.3%
Taylor expanded in y.im around 0 76.0%
unpow276.0%
unpow276.0%
hypot-def94.4%
Simplified94.4%
if 4.6e20 < y.im Initial program 22.1%
Simplified54.4%
Taylor expanded in y.im around inf 23.7%
unpow223.7%
unpow223.7%
hypot-def54.4%
Simplified54.4%
add-sqr-sqrt32.6%
sqrt-unprod71.9%
pow271.9%
Applied egg-rr71.9%
unpow271.9%
rem-sqrt-square71.9%
Simplified71.9%
Final simplification84.4%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.im (atan2 x.im x.re)))
(t_1 (* y.re (atan2 x.im x.re)))
(t_2 (log (hypot x.re x.im)))
(t_3 (* (exp (- (* t_2 y.re) t_0)) (* y.im (log (hypot x.im x.re))))))
(if (<= y.im -3.5e+246)
t_3
(if (<= y.im -3.7e+206)
(*
(exp (- (* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im))))) t_0))
(sin (fabs t_1)))
(if (or (<= y.im -5e-97) (not (<= y.im 1.36e+21)))
t_3
(* (sin (fma t_2 y.im t_1)) (pow (hypot 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 = y_46_im * atan2(x_46_im, x_46_re);
double t_1 = y_46_re * atan2(x_46_im, x_46_re);
double t_2 = log(hypot(x_46_re, x_46_im));
double t_3 = exp(((t_2 * y_46_re) - t_0)) * (y_46_im * log(hypot(x_46_im, x_46_re)));
double tmp;
if (y_46_im <= -3.5e+246) {
tmp = t_3;
} else if (y_46_im <= -3.7e+206) {
tmp = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0)) * sin(fabs(t_1));
} else if ((y_46_im <= -5e-97) || !(y_46_im <= 1.36e+21)) {
tmp = t_3;
} else {
tmp = sin(fma(t_2, y_46_im, t_1)) * pow(hypot(x_46_im, x_46_re), y_46_re);
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_im * atan(x_46_im, x_46_re)) t_1 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_2 = log(hypot(x_46_re, x_46_im)) t_3 = Float64(exp(Float64(Float64(t_2 * y_46_re) - t_0)) * Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) tmp = 0.0 if (y_46_im <= -3.5e+246) tmp = t_3; elseif (y_46_im <= -3.7e+206) tmp = Float64(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)) * sin(abs(t_1))); elseif ((y_46_im <= -5e-97) || !(y_46_im <= 1.36e+21)) tmp = t_3; else tmp = Float64(sin(fma(t_2, y_46_im, t_1)) * (hypot(x_46_im, x_46_re) ^ y_46_re)); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $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[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[(N[Exp[N[(N[(t$95$2 * y$46$re), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision] * N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -3.5e+246], t$95$3, If[LessEqual[y$46$im, -3.7e+206], N[(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] * N[Sin[N[Abs[t$95$1], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y$46$im, -5e-97], N[Not[LessEqual[y$46$im, 1.36e+21]], $MachinePrecision]], t$95$3, N[(N[Sin[N[(t$95$2 * y$46$im + t$95$1), $MachinePrecision]], $MachinePrecision] * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_2 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
t_3 := e^{t_2 \cdot y.re - t_0} \cdot \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\mathbf{if}\;y.im \leq -3.5 \cdot 10^{+246}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;y.im \leq -3.7 \cdot 10^{+206}:\\
\;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - t_0} \cdot \sin \left(\left|t_1\right|\right)\\
\mathbf{elif}\;y.im \leq -5 \cdot 10^{-97} \lor \neg \left(y.im \leq 1.36 \cdot 10^{+21}\right):\\
\;\;\;\;t_3\\
\mathbf{else}:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(t_2, y.im, t_1\right)\right) \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\end{array}
\end{array}
if y.im < -3.49999999999999975e246 or -3.6999999999999997e206 < y.im < -4.9999999999999995e-97 or 1.36e21 < y.im Initial program 32.9%
Simplified67.9%
Taylor expanded in y.im around inf 32.9%
unpow232.9%
unpow232.9%
hypot-def67.9%
Simplified67.9%
Taylor expanded in y.im around 0 53.8%
+-commutative53.8%
unpow253.8%
unpow253.8%
hypot-def75.6%
hypot-def53.8%
unpow253.8%
unpow253.8%
+-commutative53.8%
unpow253.8%
unpow253.8%
hypot-def75.6%
Simplified75.6%
if -3.49999999999999975e246 < y.im < -3.6999999999999997e206Initial program 50.0%
Taylor expanded in y.im around 0 64.5%
*-commutative21.8%
add-sqr-sqrt7.3%
sqrt-prod7.7%
rem-sqrt-square29.1%
Applied egg-rr78.8%
if -4.9999999999999995e-97 < y.im < 1.36e21Initial program 48.2%
exp-diff46.1%
+-rgt-identity46.1%
+-rgt-identity46.1%
exp-to-pow46.1%
hypot-def46.1%
*-commutative46.1%
exp-prod46.1%
fma-def46.1%
hypot-def93.3%
*-commutative93.3%
Simplified93.3%
Taylor expanded in y.im around 0 76.0%
unpow276.0%
unpow276.0%
hypot-def94.4%
Simplified94.4%
Final simplification82.6%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.re x.im))))
(if (or (<= y.im -1.75e-97) (not (<= y.im 1.45e+21)))
(*
(exp (- (* t_0 y.re) (* y.im (atan2 x.im x.re))))
(* y.im (log (hypot x.im x.re))))
(*
(sin (fma t_0 y.im (* y.re (atan2 x.im x.re))))
(pow (hypot 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(hypot(x_46_re, x_46_im));
double tmp;
if ((y_46_im <= -1.75e-97) || !(y_46_im <= 1.45e+21)) {
tmp = exp(((t_0 * y_46_re) - (y_46_im * atan2(x_46_im, x_46_re)))) * (y_46_im * log(hypot(x_46_im, x_46_re)));
} else {
tmp = sin(fma(t_0, y_46_im, (y_46_re * atan2(x_46_im, x_46_re)))) * pow(hypot(x_46_im, x_46_re), y_46_re);
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_re, x_46_im)) tmp = 0.0 if ((y_46_im <= -1.75e-97) || !(y_46_im <= 1.45e+21)) tmp = Float64(exp(Float64(Float64(t_0 * y_46_re) - Float64(y_46_im * atan(x_46_im, x_46_re)))) * Float64(y_46_im * log(hypot(x_46_im, x_46_re)))); else tmp = Float64(sin(fma(t_0, y_46_im, Float64(y_46_re * atan(x_46_im, x_46_re)))) * (hypot(x_46_im, x_46_re) ^ y_46_re)); 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[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, If[Or[LessEqual[y$46$im, -1.75e-97], N[Not[LessEqual[y$46$im, 1.45e+21]], $MachinePrecision]], N[(N[Exp[N[(N[(t$95$0 * y$46$re), $MachinePrecision] - N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sin[N[(t$95$0 * y$46$im + N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
\mathbf{if}\;y.im \leq -1.75 \cdot 10^{-97} \lor \neg \left(y.im \leq 1.45 \cdot 10^{+21}\right):\\
\;\;\;\;e^{t_0 \cdot y.re - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(t_0, y.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\end{array}
\end{array}
if y.im < -1.7500000000000001e-97 or 1.45e21 < y.im Initial program 34.3%
Simplified67.0%
Taylor expanded in y.im around inf 34.3%
unpow234.3%
unpow234.3%
hypot-def67.0%
Simplified67.0%
Taylor expanded in y.im around 0 52.8%
+-commutative52.8%
unpow252.8%
unpow252.8%
hypot-def72.8%
hypot-def52.8%
unpow252.8%
unpow252.8%
+-commutative52.8%
unpow252.8%
unpow252.8%
hypot-def72.8%
Simplified72.8%
if -1.7500000000000001e-97 < y.im < 1.45e21Initial program 48.2%
exp-diff46.1%
+-rgt-identity46.1%
+-rgt-identity46.1%
exp-to-pow46.1%
hypot-def46.1%
*-commutative46.1%
exp-prod46.1%
fma-def46.1%
hypot-def93.3%
*-commutative93.3%
Simplified93.3%
Taylor expanded in y.im around 0 76.0%
unpow276.0%
unpow276.0%
hypot-def94.4%
Simplified94.4%
Final simplification80.6%
(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))
(t_2 (* y.im (atan2 x.im x.re)))
(t_3
(*
t_0
(exp (- (* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im))))) t_2))))
(t_4
(*
(sin (* y.im (log (hypot x.im x.re))))
(exp (- (* y.re (log x.re)) t_2)))))
(if (<= x.re -2e+128)
(* t_1 (exp (- (* y.re (log (- x.re))) t_2)))
(if (<= x.re -2.8e-154)
t_3
(if (<= x.re -2.45e-263)
(* t_0 (exp (* y.im (- (atan2 x.im x.re)))))
(if (<= x.re 5.2e-308)
(* (cbrt (pow t_1 3.0)) (pow x.im y.re))
(if (<= x.re 1.85e-221)
t_4
(if (<= x.re 4.1e-136)
(*
t_1
(exp
(-
(* y.re (log (+ x.re (* 0.5 (/ (* x.im x.im) x.re)))))
t_2)))
(if (or (<= x.re 7.5e-119) (not (<= x.re 4.2e-10)))
t_4
t_3)))))))))
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);
double t_2 = y_46_im * atan2(x_46_im, x_46_re);
double t_3 = t_0 * exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_2));
double t_4 = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) * exp(((y_46_re * log(x_46_re)) - t_2));
double tmp;
if (x_46_re <= -2e+128) {
tmp = t_1 * exp(((y_46_re * log(-x_46_re)) - t_2));
} else if (x_46_re <= -2.8e-154) {
tmp = t_3;
} else if (x_46_re <= -2.45e-263) {
tmp = t_0 * exp((y_46_im * -atan2(x_46_im, x_46_re)));
} else if (x_46_re <= 5.2e-308) {
tmp = cbrt(pow(t_1, 3.0)) * pow(x_46_im, y_46_re);
} else if (x_46_re <= 1.85e-221) {
tmp = t_4;
} else if (x_46_re <= 4.1e-136) {
tmp = t_1 * exp(((y_46_re * log((x_46_re + (0.5 * ((x_46_im * x_46_im) / x_46_re))))) - t_2));
} else if ((x_46_re <= 7.5e-119) || !(x_46_re <= 4.2e-10)) {
tmp = t_4;
} else {
tmp = 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 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_1 = Math.sin(t_0);
double t_2 = y_46_im * Math.atan2(x_46_im, x_46_re);
double t_3 = t_0 * 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 = Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re)))) * Math.exp(((y_46_re * Math.log(x_46_re)) - t_2));
double tmp;
if (x_46_re <= -2e+128) {
tmp = t_1 * Math.exp(((y_46_re * Math.log(-x_46_re)) - t_2));
} else if (x_46_re <= -2.8e-154) {
tmp = t_3;
} else if (x_46_re <= -2.45e-263) {
tmp = t_0 * Math.exp((y_46_im * -Math.atan2(x_46_im, x_46_re)));
} else if (x_46_re <= 5.2e-308) {
tmp = Math.cbrt(Math.pow(t_1, 3.0)) * Math.pow(x_46_im, y_46_re);
} else if (x_46_re <= 1.85e-221) {
tmp = t_4;
} else if (x_46_re <= 4.1e-136) {
tmp = t_1 * Math.exp(((y_46_re * Math.log((x_46_re + (0.5 * ((x_46_im * x_46_im) / x_46_re))))) - t_2));
} else if ((x_46_re <= 7.5e-119) || !(x_46_re <= 4.2e-10)) {
tmp = t_4;
} else {
tmp = t_3;
}
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(t_0) t_2 = Float64(y_46_im * atan(x_46_im, x_46_re)) t_3 = Float64(t_0 * 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(sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) * exp(Float64(Float64(y_46_re * log(x_46_re)) - t_2))) tmp = 0.0 if (x_46_re <= -2e+128) tmp = Float64(t_1 * exp(Float64(Float64(y_46_re * log(Float64(-x_46_re))) - t_2))); elseif (x_46_re <= -2.8e-154) tmp = t_3; elseif (x_46_re <= -2.45e-263) tmp = Float64(t_0 * exp(Float64(y_46_im * Float64(-atan(x_46_im, x_46_re))))); elseif (x_46_re <= 5.2e-308) tmp = Float64(cbrt((t_1 ^ 3.0)) * (x_46_im ^ y_46_re)); elseif (x_46_re <= 1.85e-221) tmp = t_4; elseif (x_46_re <= 4.1e-136) tmp = Float64(t_1 * exp(Float64(Float64(y_46_re * log(Float64(x_46_re + Float64(0.5 * Float64(Float64(x_46_im * x_46_im) / x_46_re))))) - t_2))); elseif ((x_46_re <= 7.5e-119) || !(x_46_re <= 4.2e-10)) tmp = t_4; else tmp = t_3; 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[Sin[t$95$0], $MachinePrecision]}, Block[{t$95$2 = N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$0 * 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]), $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] * N[Exp[N[(N[(y$46$re * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x$46$re, -2e+128], N[(t$95$1 * N[Exp[N[(N[(y$46$re * N[Log[(-x$46$re)], $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, -2.8e-154], t$95$3, If[LessEqual[x$46$re, -2.45e-263], N[(t$95$0 * N[Exp[N[(y$46$im * (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, 5.2e-308], N[(N[Power[N[Power[t$95$1, 3.0], $MachinePrecision], 1/3], $MachinePrecision] * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, 1.85e-221], t$95$4, If[LessEqual[x$46$re, 4.1e-136], N[(t$95$1 * N[Exp[N[(N[(y$46$re * N[Log[N[(x$46$re + N[(0.5 * N[(N[(x$46$im * x$46$im), $MachinePrecision] / x$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[x$46$re, 7.5e-119], N[Not[LessEqual[x$46$re, 4.2e-10]], $MachinePrecision]], t$95$4, t$95$3]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := \sin t_0\\
t_2 := y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_3 := t_0 \cdot e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - t_2}\\
t_4 := \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \cdot e^{y.re \cdot \log x.re - t_2}\\
\mathbf{if}\;x.re \leq -2 \cdot 10^{+128}:\\
\;\;\;\;t_1 \cdot e^{y.re \cdot \log \left(-x.re\right) - t_2}\\
\mathbf{elif}\;x.re \leq -2.8 \cdot 10^{-154}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;x.re \leq -2.45 \cdot 10^{-263}:\\
\;\;\;\;t_0 \cdot e^{y.im \cdot \left(-\tan^{-1}_* \frac{x.im}{x.re}\right)}\\
\mathbf{elif}\;x.re \leq 5.2 \cdot 10^{-308}:\\
\;\;\;\;\sqrt[3]{{t_1}^{3}} \cdot {x.im}^{y.re}\\
\mathbf{elif}\;x.re \leq 1.85 \cdot 10^{-221}:\\
\;\;\;\;t_4\\
\mathbf{elif}\;x.re \leq 4.1 \cdot 10^{-136}:\\
\;\;\;\;t_1 \cdot e^{y.re \cdot \log \left(x.re + 0.5 \cdot \frac{x.im \cdot x.im}{x.re}\right) - t_2}\\
\mathbf{elif}\;x.re \leq 7.5 \cdot 10^{-119} \lor \neg \left(x.re \leq 4.2 \cdot 10^{-10}\right):\\
\;\;\;\;t_4\\
\mathbf{else}:\\
\;\;\;\;t_3\\
\end{array}
\end{array}
if x.re < -2.0000000000000002e128Initial program 13.9%
Taylor expanded in y.im around 0 53.6%
Taylor expanded in x.re around -inf 72.6%
mul-1-neg72.6%
Simplified72.6%
if -2.0000000000000002e128 < x.re < -2.80000000000000012e-154 or 7.50000000000000044e-119 < x.re < 4.2e-10Initial program 59.0%
Taylor expanded in y.im around 0 52.2%
Taylor expanded in y.re around 0 62.5%
if -2.80000000000000012e-154 < x.re < -2.4499999999999999e-263Initial program 42.9%
Taylor expanded in y.im around 0 55.4%
Taylor expanded in x.re around 0 13.9%
Taylor expanded in y.re around 0 64.2%
distribute-lft-neg-in64.2%
Simplified64.2%
if -2.4499999999999999e-263 < x.re < 5.1999999999999999e-308Initial program 44.3%
Taylor expanded in y.im around 0 77.8%
Taylor expanded in x.re around 0 44.3%
Taylor expanded in y.im around 0 66.5%
add-cbrt-cube66.7%
pow366.7%
*-commutative66.7%
Applied egg-rr66.7%
if 5.1999999999999999e-308 < x.re < 1.84999999999999993e-221 or 4.10000000000000025e-136 < x.re < 7.50000000000000044e-119 or 4.2e-10 < x.re Initial program 31.7%
Simplified75.8%
Taylor expanded in y.im around inf 30.8%
unpow230.8%
unpow230.8%
hypot-def70.9%
Simplified70.9%
Taylor expanded in x.im around 0 68.9%
if 1.84999999999999993e-221 < x.re < 4.10000000000000025e-136Initial program 41.5%
Taylor expanded in y.im around 0 83.7%
Taylor expanded in x.re around inf 91.9%
unpow291.9%
Simplified91.9%
Final simplification68.1%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.im (atan2 x.im x.re)))
(t_1 (sin (* y.im (log (hypot x.im x.re)))))
(t_2 (* t_1 (exp (- (* y.re (log x.re)) t_0))))
(t_3 (* y.re (atan2 x.im x.re)))
(t_4 (sin t_3))
(t_5 (exp (- (* y.re (log x.im)) t_0))))
(if (<= x.im -6.8e-14)
(* t_4 (exp (- (* y.re (log (- x.im))) t_0)))
(if (<= x.im -6e-173)
(*
t_3
(exp (- (* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im))))) t_0)))
(if (<= x.im -2.1e-237)
t_2
(if (<= x.im -2.55e-282)
(* t_4 (exp (- (* y.re (log (- x.re))) t_0)))
(if (<= x.im 4.3e-303)
t_2
(if (<= x.im 2.3e-130)
(*
(exp (- (* (log (hypot x.re x.im)) y.re) t_0))
(sin (* y.im (log x.im))))
(if (<= x.im 5.7e+23)
(* t_1 t_5)
(* (sin (fabs t_3)) t_5))))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_im * 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 = t_1 * exp(((y_46_re * log(x_46_re)) - t_0));
double t_3 = y_46_re * atan2(x_46_im, x_46_re);
double t_4 = sin(t_3);
double t_5 = exp(((y_46_re * log(x_46_im)) - t_0));
double tmp;
if (x_46_im <= -6.8e-14) {
tmp = t_4 * exp(((y_46_re * log(-x_46_im)) - t_0));
} else if (x_46_im <= -6e-173) {
tmp = t_3 * 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 <= -2.1e-237) {
tmp = t_2;
} else if (x_46_im <= -2.55e-282) {
tmp = t_4 * exp(((y_46_re * log(-x_46_re)) - t_0));
} else if (x_46_im <= 4.3e-303) {
tmp = t_2;
} else if (x_46_im <= 2.3e-130) {
tmp = exp(((log(hypot(x_46_re, x_46_im)) * y_46_re) - t_0)) * sin((y_46_im * log(x_46_im)));
} else if (x_46_im <= 5.7e+23) {
tmp = t_1 * t_5;
} else {
tmp = sin(fabs(t_3)) * 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 = y_46_im * 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 = t_1 * Math.exp(((y_46_re * Math.log(x_46_re)) - t_0));
double t_3 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_4 = Math.sin(t_3);
double t_5 = Math.exp(((y_46_re * Math.log(x_46_im)) - t_0));
double tmp;
if (x_46_im <= -6.8e-14) {
tmp = t_4 * Math.exp(((y_46_re * Math.log(-x_46_im)) - t_0));
} else if (x_46_im <= -6e-173) {
tmp = t_3 * 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 <= -2.1e-237) {
tmp = t_2;
} else if (x_46_im <= -2.55e-282) {
tmp = t_4 * Math.exp(((y_46_re * Math.log(-x_46_re)) - t_0));
} else if (x_46_im <= 4.3e-303) {
tmp = t_2;
} else if (x_46_im <= 2.3e-130) {
tmp = Math.exp(((Math.log(Math.hypot(x_46_re, x_46_im)) * y_46_re) - t_0)) * Math.sin((y_46_im * Math.log(x_46_im)));
} else if (x_46_im <= 5.7e+23) {
tmp = t_1 * t_5;
} else {
tmp = Math.sin(Math.abs(t_3)) * t_5;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = y_46_im * 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 = t_1 * math.exp(((y_46_re * math.log(x_46_re)) - t_0)) t_3 = y_46_re * math.atan2(x_46_im, x_46_re) t_4 = math.sin(t_3) t_5 = math.exp(((y_46_re * math.log(x_46_im)) - t_0)) tmp = 0 if x_46_im <= -6.8e-14: tmp = t_4 * math.exp(((y_46_re * math.log(-x_46_im)) - t_0)) elif x_46_im <= -6e-173: tmp = t_3 * 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 <= -2.1e-237: tmp = t_2 elif x_46_im <= -2.55e-282: tmp = t_4 * math.exp(((y_46_re * math.log(-x_46_re)) - t_0)) elif x_46_im <= 4.3e-303: tmp = t_2 elif x_46_im <= 2.3e-130: tmp = math.exp(((math.log(math.hypot(x_46_re, x_46_im)) * y_46_re) - t_0)) * math.sin((y_46_im * math.log(x_46_im))) elif x_46_im <= 5.7e+23: tmp = t_1 * t_5 else: tmp = math.sin(math.fabs(t_3)) * t_5 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_im * 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(t_1 * exp(Float64(Float64(y_46_re * log(x_46_re)) - t_0))) t_3 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_4 = sin(t_3) t_5 = exp(Float64(Float64(y_46_re * log(x_46_im)) - t_0)) tmp = 0.0 if (x_46_im <= -6.8e-14) tmp = Float64(t_4 * exp(Float64(Float64(y_46_re * log(Float64(-x_46_im))) - t_0))); elseif (x_46_im <= -6e-173) tmp = Float64(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_0))); elseif (x_46_im <= -2.1e-237) tmp = t_2; elseif (x_46_im <= -2.55e-282) tmp = Float64(t_4 * exp(Float64(Float64(y_46_re * log(Float64(-x_46_re))) - t_0))); elseif (x_46_im <= 4.3e-303) tmp = t_2; elseif (x_46_im <= 2.3e-130) tmp = Float64(exp(Float64(Float64(log(hypot(x_46_re, x_46_im)) * y_46_re) - t_0)) * sin(Float64(y_46_im * log(x_46_im)))); elseif (x_46_im <= 5.7e+23) tmp = Float64(t_1 * t_5); else tmp = Float64(sin(abs(t_3)) * t_5); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = y_46_im * atan2(x_46_im, x_46_re); t_1 = sin((y_46_im * log(hypot(x_46_im, x_46_re)))); t_2 = t_1 * exp(((y_46_re * log(x_46_re)) - t_0)); t_3 = y_46_re * atan2(x_46_im, x_46_re); t_4 = sin(t_3); t_5 = exp(((y_46_re * log(x_46_im)) - t_0)); tmp = 0.0; if (x_46_im <= -6.8e-14) tmp = t_4 * exp(((y_46_re * log(-x_46_im)) - t_0)); elseif (x_46_im <= -6e-173) tmp = t_3 * exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0)); elseif (x_46_im <= -2.1e-237) tmp = t_2; elseif (x_46_im <= -2.55e-282) tmp = t_4 * exp(((y_46_re * log(-x_46_re)) - t_0)); elseif (x_46_im <= 4.3e-303) tmp = t_2; elseif (x_46_im <= 2.3e-130) tmp = exp(((log(hypot(x_46_re, x_46_im)) * y_46_re) - t_0)) * sin((y_46_im * log(x_46_im))); elseif (x_46_im <= 5.7e+23) tmp = t_1 * t_5; else tmp = sin(abs(t_3)) * t_5; 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$im * 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[(t$95$1 * N[Exp[N[(N[(y$46$re * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]), $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[t$95$3], $MachinePrecision]}, Block[{t$95$5 = N[Exp[N[(N[(y$46$re * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[x$46$im, -6.8e-14], N[(t$95$4 * 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, -6e-173], N[(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$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$im, -2.1e-237], t$95$2, If[LessEqual[x$46$im, -2.55e-282], N[(t$95$4 * N[Exp[N[(N[(y$46$re * N[Log[(-x$46$re)], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$im, 4.3e-303], t$95$2, If[LessEqual[x$46$im, 2.3e-130], N[(N[Exp[N[(N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$re), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(y$46$im * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$im, 5.7e+23], N[(t$95$1 * t$95$5), $MachinePrecision], N[(N[Sin[N[Abs[t$95$3], $MachinePrecision]], $MachinePrecision] * t$95$5), $MachinePrecision]]]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.im \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 := t_1 \cdot e^{y.re \cdot \log x.re - t_0}\\
t_3 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_4 := \sin t_3\\
t_5 := e^{y.re \cdot \log x.im - t_0}\\
\mathbf{if}\;x.im \leq -6.8 \cdot 10^{-14}:\\
\;\;\;\;t_4 \cdot e^{y.re \cdot \log \left(-x.im\right) - t_0}\\
\mathbf{elif}\;x.im \leq -6 \cdot 10^{-173}:\\
\;\;\;\;t_3 \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 -2.1 \cdot 10^{-237}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x.im \leq -2.55 \cdot 10^{-282}:\\
\;\;\;\;t_4 \cdot e^{y.re \cdot \log \left(-x.re\right) - t_0}\\
\mathbf{elif}\;x.im \leq 4.3 \cdot 10^{-303}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x.im \leq 2.3 \cdot 10^{-130}:\\
\;\;\;\;e^{\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.re - t_0} \cdot \sin \left(y.im \cdot \log x.im\right)\\
\mathbf{elif}\;x.im \leq 5.7 \cdot 10^{+23}:\\
\;\;\;\;t_1 \cdot t_5\\
\mathbf{else}:\\
\;\;\;\;\sin \left(\left|t_3\right|\right) \cdot t_5\\
\end{array}
\end{array}
if x.im < -6.80000000000000006e-14Initial program 34.4%
Taylor expanded in y.im around 0 51.7%
Taylor expanded in x.im around -inf 67.9%
mul-1-neg67.9%
Simplified67.9%
if -6.80000000000000006e-14 < x.im < -6.0000000000000002e-173Initial program 56.8%
Taylor expanded in y.im around 0 64.9%
Taylor expanded in y.re around 0 64.9%
if -6.0000000000000002e-173 < x.im < -2.1000000000000001e-237 or -2.54999999999999989e-282 < x.im < 4.29999999999999981e-303Initial program 33.3%
Simplified71.4%
Taylor expanded in y.im around inf 31.4%
unpow231.4%
unpow231.4%
hypot-def73.1%
Simplified73.1%
Taylor expanded in x.im around 0 62.0%
if -2.1000000000000001e-237 < x.im < -2.54999999999999989e-282Initial program 25.0%
Taylor expanded in y.im around 0 62.7%
Taylor expanded in x.re around -inf 75.0%
mul-1-neg75.0%
Simplified75.0%
if 4.29999999999999981e-303 < x.im < 2.3000000000000001e-130Initial program 40.6%
Simplified68.3%
Taylor expanded in y.im around inf 31.6%
unpow231.6%
unpow231.6%
hypot-def56.5%
Simplified56.5%
Taylor expanded in x.re around 0 56.0%
if 2.3000000000000001e-130 < x.im < 5.7e23Initial program 59.5%
Taylor expanded in x.re around 0 56.9%
Taylor expanded in y.re around 0 46.3%
unpow246.3%
unpow246.3%
hypot-def62.6%
Simplified62.6%
if 5.7e23 < x.im Initial program 24.0%
Taylor expanded in y.im around 0 63.7%
Taylor expanded in x.re around 0 70.8%
*-commutative53.1%
add-sqr-sqrt22.6%
sqrt-prod32.6%
rem-sqrt-square51.6%
Applied egg-rr78.5%
Final simplification67.0%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.im (atan2 x.im x.re)))
(t_1 (* y.re (atan2 x.im x.re)))
(t_2 (sin t_1)))
(if (<= x.re -8e+127)
(* t_2 (exp (- (* y.re (log (- x.re))) t_0)))
(if (<= x.re -2.8e-154)
(*
t_1
(exp (- (* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im))))) t_0)))
(if (<= x.re -6.7e-264)
(* t_1 (exp (* y.im (- (atan2 x.im x.re)))))
(if (<= x.re 1.15e-305)
(* (cbrt (pow t_2 3.0)) (pow x.im y.re))
(if (<= x.re 3.5e-116)
(* t_2 (exp (- (* y.re (log x.re)) t_0)))
(if (<= x.re 2.05e-87)
(* (sin (pow (cbrt t_1) 3.0)) (pow x.im y.re))
(*
(exp (- (* (log (hypot x.re x.im)) y.re) t_0))
(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_im * atan2(x_46_im, x_46_re);
double t_1 = y_46_re * atan2(x_46_im, x_46_re);
double t_2 = sin(t_1);
double tmp;
if (x_46_re <= -8e+127) {
tmp = t_2 * exp(((y_46_re * log(-x_46_re)) - t_0));
} else if (x_46_re <= -2.8e-154) {
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_re <= -6.7e-264) {
tmp = t_1 * exp((y_46_im * -atan2(x_46_im, x_46_re)));
} else if (x_46_re <= 1.15e-305) {
tmp = cbrt(pow(t_2, 3.0)) * pow(x_46_im, y_46_re);
} else if (x_46_re <= 3.5e-116) {
tmp = t_2 * exp(((y_46_re * log(x_46_re)) - t_0));
} else if (x_46_re <= 2.05e-87) {
tmp = sin(pow(cbrt(t_1), 3.0)) * pow(x_46_im, y_46_re);
} else {
tmp = exp(((log(hypot(x_46_re, x_46_im)) * y_46_re) - t_0)) * 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_im * Math.atan2(x_46_im, x_46_re);
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_re <= -8e+127) {
tmp = t_2 * Math.exp(((y_46_re * Math.log(-x_46_re)) - t_0));
} else if (x_46_re <= -2.8e-154) {
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_re <= -6.7e-264) {
tmp = t_1 * Math.exp((y_46_im * -Math.atan2(x_46_im, x_46_re)));
} else if (x_46_re <= 1.15e-305) {
tmp = Math.cbrt(Math.pow(t_2, 3.0)) * Math.pow(x_46_im, y_46_re);
} else if (x_46_re <= 3.5e-116) {
tmp = t_2 * Math.exp(((y_46_re * Math.log(x_46_re)) - t_0));
} else if (x_46_re <= 2.05e-87) {
tmp = Math.sin(Math.pow(Math.cbrt(t_1), 3.0)) * Math.pow(x_46_im, y_46_re);
} else {
tmp = Math.exp(((Math.log(Math.hypot(x_46_re, x_46_im)) * y_46_re) - t_0)) * 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_im * atan(x_46_im, x_46_re)) t_1 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_2 = sin(t_1) tmp = 0.0 if (x_46_re <= -8e+127) tmp = Float64(t_2 * exp(Float64(Float64(y_46_re * log(Float64(-x_46_re))) - t_0))); elseif (x_46_re <= -2.8e-154) 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_re <= -6.7e-264) tmp = Float64(t_1 * exp(Float64(y_46_im * Float64(-atan(x_46_im, x_46_re))))); elseif (x_46_re <= 1.15e-305) tmp = Float64(cbrt((t_2 ^ 3.0)) * (x_46_im ^ y_46_re)); elseif (x_46_re <= 3.5e-116) tmp = Float64(t_2 * exp(Float64(Float64(y_46_re * log(x_46_re)) - t_0))); elseif (x_46_re <= 2.05e-87) tmp = Float64(sin((cbrt(t_1) ^ 3.0)) * (x_46_im ^ y_46_re)); else tmp = Float64(exp(Float64(Float64(log(hypot(x_46_re, x_46_im)) * y_46_re) - t_0)) * sin(Float64(y_46_im * log(x_46_re)))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sin[t$95$1], $MachinePrecision]}, If[LessEqual[x$46$re, -8e+127], N[(t$95$2 * N[Exp[N[(N[(y$46$re * N[Log[(-x$46$re)], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, -2.8e-154], 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$re, -6.7e-264], N[(t$95$1 * N[Exp[N[(y$46$im * (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, 1.15e-305], N[(N[Power[N[Power[t$95$2, 3.0], $MachinePrecision], 1/3], $MachinePrecision] * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, 3.5e-116], N[(t$95$2 * N[Exp[N[(N[(y$46$re * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, 2.05e-87], N[(N[Sin[N[Power[N[Power[t$95$1, 1/3], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision] * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision], N[(N[Exp[N[(N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$re), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(y$46$im * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_2 := \sin t_1\\
\mathbf{if}\;x.re \leq -8 \cdot 10^{+127}:\\
\;\;\;\;t_2 \cdot e^{y.re \cdot \log \left(-x.re\right) - t_0}\\
\mathbf{elif}\;x.re \leq -2.8 \cdot 10^{-154}:\\
\;\;\;\;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.re \leq -6.7 \cdot 10^{-264}:\\
\;\;\;\;t_1 \cdot e^{y.im \cdot \left(-\tan^{-1}_* \frac{x.im}{x.re}\right)}\\
\mathbf{elif}\;x.re \leq 1.15 \cdot 10^{-305}:\\
\;\;\;\;\sqrt[3]{{t_2}^{3}} \cdot {x.im}^{y.re}\\
\mathbf{elif}\;x.re \leq 3.5 \cdot 10^{-116}:\\
\;\;\;\;t_2 \cdot e^{y.re \cdot \log x.re - t_0}\\
\mathbf{elif}\;x.re \leq 2.05 \cdot 10^{-87}:\\
\;\;\;\;\sin \left({\left(\sqrt[3]{t_1}\right)}^{3}\right) \cdot {x.im}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;e^{\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.re - t_0} \cdot \sin \left(y.im \cdot \log x.re\right)\\
\end{array}
\end{array}
if x.re < -7.99999999999999964e127Initial program 13.9%
Taylor expanded in y.im around 0 53.6%
Taylor expanded in x.re around -inf 72.6%
mul-1-neg72.6%
Simplified72.6%
if -7.99999999999999964e127 < x.re < -2.80000000000000012e-154Initial program 56.8%
Taylor expanded in y.im around 0 44.0%
Taylor expanded in y.re around 0 57.7%
if -2.80000000000000012e-154 < x.re < -6.7000000000000004e-264Initial program 42.9%
Taylor expanded in y.im around 0 55.4%
Taylor expanded in x.re around 0 13.9%
Taylor expanded in y.re around 0 64.2%
distribute-lft-neg-in64.2%
Simplified64.2%
if -6.7000000000000004e-264 < x.re < 1.15e-305Initial program 39.8%
Taylor expanded in y.im around 0 70.0%
Taylor expanded in x.re around 0 39.8%
Taylor expanded in y.im around 0 60.0%
add-cbrt-cube60.2%
pow360.2%
*-commutative60.2%
Applied egg-rr60.2%
if 1.15e-305 < x.re < 3.49999999999999984e-116Initial program 47.0%
Taylor expanded in y.im around 0 62.8%
Taylor expanded in x.re around inf 62.8%
if 3.49999999999999984e-116 < x.re < 2.05000000000000016e-87Initial program 66.7%
Taylor expanded in y.im around 0 83.3%
Taylor expanded in x.re around 0 50.0%
Taylor expanded in y.im around 0 83.3%
*-commutative83.3%
add-cube-cbrt83.1%
pow399.7%
Applied egg-rr99.7%
if 2.05000000000000016e-87 < x.re Initial program 34.4%
Simplified77.3%
Taylor expanded in y.im around inf 33.9%
unpow233.9%
unpow233.9%
hypot-def72.8%
Simplified72.8%
Taylor expanded in x.im around 0 69.8%
Final simplification66.7%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.im (atan2 x.im x.re))))
(if (or (<= y.im -8.5e-267) (not (<= y.im 1.55e-267)))
(*
(exp (- (* (log (hypot x.re x.im)) y.re) t_0))
(* y.im (log (hypot x.im x.re))))
(*
(exp (- (* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im))))) t_0))
(sin (* 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) {
double t_0 = y_46_im * atan2(x_46_im, x_46_re);
double tmp;
if ((y_46_im <= -8.5e-267) || !(y_46_im <= 1.55e-267)) {
tmp = exp(((log(hypot(x_46_re, x_46_im)) * y_46_re) - t_0)) * (y_46_im * log(hypot(x_46_im, x_46_re)));
} else {
tmp = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0)) * sin((y_46_re * atan2(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 = y_46_im * Math.atan2(x_46_im, x_46_re);
double tmp;
if ((y_46_im <= -8.5e-267) || !(y_46_im <= 1.55e-267)) {
tmp = Math.exp(((Math.log(Math.hypot(x_46_re, x_46_im)) * y_46_re) - t_0)) * (y_46_im * Math.log(Math.hypot(x_46_im, x_46_re)));
} else {
tmp = Math.exp(((y_46_re * Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0)) * Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = y_46_im * math.atan2(x_46_im, x_46_re) tmp = 0 if (y_46_im <= -8.5e-267) or not (y_46_im <= 1.55e-267): tmp = math.exp(((math.log(math.hypot(x_46_re, x_46_im)) * y_46_re) - t_0)) * (y_46_im * math.log(math.hypot(x_46_im, x_46_re))) else: tmp = math.exp(((y_46_re * math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0)) * math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_im * atan(x_46_im, x_46_re)) tmp = 0.0 if ((y_46_im <= -8.5e-267) || !(y_46_im <= 1.55e-267)) tmp = Float64(exp(Float64(Float64(log(hypot(x_46_re, x_46_im)) * y_46_re) - t_0)) * Float64(y_46_im * log(hypot(x_46_im, x_46_re)))); else tmp = Float64(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)) * sin(Float64(y_46_re * atan(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 = y_46_im * atan2(x_46_im, x_46_re); tmp = 0.0; if ((y_46_im <= -8.5e-267) || ~((y_46_im <= 1.55e-267))) tmp = exp(((log(hypot(x_46_re, x_46_im)) * y_46_re) - t_0)) * (y_46_im * log(hypot(x_46_im, x_46_re))); else tmp = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0)) * sin((y_46_re * atan2(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[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[y$46$im, -8.5e-267], N[Not[LessEqual[y$46$im, 1.55e-267]], $MachinePrecision]], N[(N[Exp[N[(N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$re), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision] * N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(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] * N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.im \leq -8.5 \cdot 10^{-267} \lor \neg \left(y.im \leq 1.55 \cdot 10^{-267}\right):\\
\;\;\;\;e^{\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.re - t_0} \cdot \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - t_0} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\end{array}
\end{array}
if y.im < -8.49999999999999987e-267 or 1.5500000000000001e-267 < y.im Initial program 38.8%
Simplified76.0%
Taylor expanded in y.im around inf 35.5%
unpow235.5%
unpow235.5%
hypot-def70.8%
Simplified70.8%
Taylor expanded in y.im around 0 50.2%
+-commutative50.2%
unpow250.2%
unpow250.2%
hypot-def74.4%
hypot-def50.2%
unpow250.2%
unpow250.2%
+-commutative50.2%
unpow250.2%
unpow250.2%
hypot-def74.4%
Simplified74.4%
if -8.49999999999999987e-267 < y.im < 1.5500000000000001e-267Initial program 45.3%
Taylor expanded in y.im around 0 82.2%
Final simplification75.1%
(FPCore (x.re x.im y.re y.im) :precision binary64 (* (exp (- (* (log (hypot x.re x.im)) y.re) (* y.im (atan2 x.im x.re)))) (* 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) {
return exp(((log(hypot(x_46_re, x_46_im)) * y_46_re) - (y_46_im * atan2(x_46_im, x_46_re)))) * (y_46_im * log(hypot(x_46_im, x_46_re)));
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return Math.exp(((Math.log(Math.hypot(x_46_re, x_46_im)) * y_46_re) - (y_46_im * Math.atan2(x_46_im, x_46_re)))) * (y_46_im * Math.log(Math.hypot(x_46_im, x_46_re)));
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): return math.exp(((math.log(math.hypot(x_46_re, x_46_im)) * y_46_re) - (y_46_im * math.atan2(x_46_im, x_46_re)))) * (y_46_im * math.log(math.hypot(x_46_im, x_46_re)))
function code(x_46_re, x_46_im, y_46_re, y_46_im) return Float64(exp(Float64(Float64(log(hypot(x_46_re, x_46_im)) * y_46_re) - Float64(y_46_im * atan(x_46_im, x_46_re)))) * Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = exp(((log(hypot(x_46_re, x_46_im)) * y_46_re) - (y_46_im * atan2(x_46_im, x_46_re)))) * (y_46_im * log(hypot(x_46_im, x_46_re))); end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[(N[Exp[N[(N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$re), $MachinePrecision] - N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
e^{\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.re - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)
\end{array}
Initial program 39.4%
Simplified77.3%
Taylor expanded in y.im around inf 33.7%
unpow233.7%
unpow233.7%
hypot-def68.3%
Simplified68.3%
Taylor expanded in y.im around 0 48.0%
+-commutative48.0%
unpow248.0%
unpow248.0%
hypot-def71.6%
hypot-def48.0%
unpow248.0%
unpow248.0%
+-commutative48.0%
unpow248.0%
unpow248.0%
hypot-def71.6%
Simplified71.6%
Final simplification71.6%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.im (atan2 x.im x.re)))
(t_1 (exp (- (* y.re (log x.im)) t_0)))
(t_2 (* y.re (atan2 x.im x.re)))
(t_3
(*
t_2
(exp (- (* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im))))) t_0))))
(t_4 (sin t_2))
(t_5 (* y.im (log x.im)))
(t_6 (* (sin t_5) t_1)))
(if (<= x.im -5.8e-14)
(* t_4 (exp (- (* y.re (log (- x.im))) t_0)))
(if (<= x.im 3.4e-308)
t_3
(if (<= x.im 1.75e-79)
(* (exp (- (* (log (hypot x.re x.im)) y.re) t_0)) t_5)
(if (<= x.im 3.2e-21)
t_3
(if (<= x.im 1.6e+23)
t_6
(if (<= x.im 7.6e+91)
(* t_4 t_1)
(if (or (<= x.im 6.6e+213) (not (<= x.im 1.7e+220)))
t_6
(*
(exp (* y.im (- (atan2 x.im x.re))))
(+
t_2
(*
(* y.re y.re)
(* (atan2 x.im x.re) (log x.im))))))))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_im * atan2(x_46_im, x_46_re);
double t_1 = exp(((y_46_re * log(x_46_im)) - t_0));
double t_2 = y_46_re * atan2(x_46_im, x_46_re);
double t_3 = t_2 * exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0));
double t_4 = sin(t_2);
double t_5 = y_46_im * log(x_46_im);
double t_6 = sin(t_5) * t_1;
double tmp;
if (x_46_im <= -5.8e-14) {
tmp = t_4 * exp(((y_46_re * log(-x_46_im)) - t_0));
} else if (x_46_im <= 3.4e-308) {
tmp = t_3;
} else if (x_46_im <= 1.75e-79) {
tmp = exp(((log(hypot(x_46_re, x_46_im)) * y_46_re) - t_0)) * t_5;
} else if (x_46_im <= 3.2e-21) {
tmp = t_3;
} else if (x_46_im <= 1.6e+23) {
tmp = t_6;
} else if (x_46_im <= 7.6e+91) {
tmp = t_4 * t_1;
} else if ((x_46_im <= 6.6e+213) || !(x_46_im <= 1.7e+220)) {
tmp = t_6;
} else {
tmp = exp((y_46_im * -atan2(x_46_im, x_46_re))) * (t_2 + ((y_46_re * y_46_re) * (atan2(x_46_im, x_46_re) * log(x_46_im))));
}
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_im * Math.atan2(x_46_im, x_46_re);
double t_1 = Math.exp(((y_46_re * Math.log(x_46_im)) - t_0));
double t_2 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_3 = t_2 * Math.exp(((y_46_re * Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0));
double t_4 = Math.sin(t_2);
double t_5 = y_46_im * Math.log(x_46_im);
double t_6 = Math.sin(t_5) * t_1;
double tmp;
if (x_46_im <= -5.8e-14) {
tmp = t_4 * Math.exp(((y_46_re * Math.log(-x_46_im)) - t_0));
} else if (x_46_im <= 3.4e-308) {
tmp = t_3;
} else if (x_46_im <= 1.75e-79) {
tmp = Math.exp(((Math.log(Math.hypot(x_46_re, x_46_im)) * y_46_re) - t_0)) * t_5;
} else if (x_46_im <= 3.2e-21) {
tmp = t_3;
} else if (x_46_im <= 1.6e+23) {
tmp = t_6;
} else if (x_46_im <= 7.6e+91) {
tmp = t_4 * t_1;
} else if ((x_46_im <= 6.6e+213) || !(x_46_im <= 1.7e+220)) {
tmp = t_6;
} else {
tmp = Math.exp((y_46_im * -Math.atan2(x_46_im, x_46_re))) * (t_2 + ((y_46_re * y_46_re) * (Math.atan2(x_46_im, x_46_re) * Math.log(x_46_im))));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = y_46_im * math.atan2(x_46_im, x_46_re) t_1 = math.exp(((y_46_re * math.log(x_46_im)) - t_0)) t_2 = y_46_re * math.atan2(x_46_im, x_46_re) t_3 = t_2 * math.exp(((y_46_re * math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0)) t_4 = math.sin(t_2) t_5 = y_46_im * math.log(x_46_im) t_6 = math.sin(t_5) * t_1 tmp = 0 if x_46_im <= -5.8e-14: tmp = t_4 * math.exp(((y_46_re * math.log(-x_46_im)) - t_0)) elif x_46_im <= 3.4e-308: tmp = t_3 elif x_46_im <= 1.75e-79: tmp = math.exp(((math.log(math.hypot(x_46_re, x_46_im)) * y_46_re) - t_0)) * t_5 elif x_46_im <= 3.2e-21: tmp = t_3 elif x_46_im <= 1.6e+23: tmp = t_6 elif x_46_im <= 7.6e+91: tmp = t_4 * t_1 elif (x_46_im <= 6.6e+213) or not (x_46_im <= 1.7e+220): tmp = t_6 else: tmp = math.exp((y_46_im * -math.atan2(x_46_im, x_46_re))) * (t_2 + ((y_46_re * y_46_re) * (math.atan2(x_46_im, x_46_re) * math.log(x_46_im)))) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_im * atan(x_46_im, x_46_re)) t_1 = exp(Float64(Float64(y_46_re * log(x_46_im)) - t_0)) t_2 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_3 = Float64(t_2 * 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))) t_4 = sin(t_2) t_5 = Float64(y_46_im * log(x_46_im)) t_6 = Float64(sin(t_5) * t_1) tmp = 0.0 if (x_46_im <= -5.8e-14) tmp = Float64(t_4 * exp(Float64(Float64(y_46_re * log(Float64(-x_46_im))) - t_0))); elseif (x_46_im <= 3.4e-308) tmp = t_3; elseif (x_46_im <= 1.75e-79) tmp = Float64(exp(Float64(Float64(log(hypot(x_46_re, x_46_im)) * y_46_re) - t_0)) * t_5); elseif (x_46_im <= 3.2e-21) tmp = t_3; elseif (x_46_im <= 1.6e+23) tmp = t_6; elseif (x_46_im <= 7.6e+91) tmp = Float64(t_4 * t_1); elseif ((x_46_im <= 6.6e+213) || !(x_46_im <= 1.7e+220)) tmp = t_6; else tmp = Float64(exp(Float64(y_46_im * Float64(-atan(x_46_im, x_46_re)))) * Float64(t_2 + Float64(Float64(y_46_re * y_46_re) * Float64(atan(x_46_im, x_46_re) * log(x_46_im))))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = y_46_im * atan2(x_46_im, x_46_re); t_1 = exp(((y_46_re * log(x_46_im)) - t_0)); t_2 = y_46_re * atan2(x_46_im, x_46_re); t_3 = t_2 * exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0)); t_4 = sin(t_2); t_5 = y_46_im * log(x_46_im); t_6 = sin(t_5) * t_1; tmp = 0.0; if (x_46_im <= -5.8e-14) tmp = t_4 * exp(((y_46_re * log(-x_46_im)) - t_0)); elseif (x_46_im <= 3.4e-308) tmp = t_3; elseif (x_46_im <= 1.75e-79) tmp = exp(((log(hypot(x_46_re, x_46_im)) * y_46_re) - t_0)) * t_5; elseif (x_46_im <= 3.2e-21) tmp = t_3; elseif (x_46_im <= 1.6e+23) tmp = t_6; elseif (x_46_im <= 7.6e+91) tmp = t_4 * t_1; elseif ((x_46_im <= 6.6e+213) || ~((x_46_im <= 1.7e+220))) tmp = t_6; else tmp = exp((y_46_im * -atan2(x_46_im, x_46_re))) * (t_2 + ((y_46_re * y_46_re) * (atan2(x_46_im, x_46_re) * log(x_46_im)))); 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$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $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[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 * 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]}, Block[{t$95$4 = N[Sin[t$95$2], $MachinePrecision]}, Block[{t$95$5 = N[(y$46$im * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(N[Sin[t$95$5], $MachinePrecision] * t$95$1), $MachinePrecision]}, If[LessEqual[x$46$im, -5.8e-14], N[(t$95$4 * 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, 3.4e-308], t$95$3, If[LessEqual[x$46$im, 1.75e-79], N[(N[Exp[N[(N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$re), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision] * t$95$5), $MachinePrecision], If[LessEqual[x$46$im, 3.2e-21], t$95$3, If[LessEqual[x$46$im, 1.6e+23], t$95$6, If[LessEqual[x$46$im, 7.6e+91], N[(t$95$4 * t$95$1), $MachinePrecision], If[Or[LessEqual[x$46$im, 6.6e+213], N[Not[LessEqual[x$46$im, 1.7e+220]], $MachinePrecision]], t$95$6, N[(N[Exp[N[(y$46$im * (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])), $MachinePrecision]], $MachinePrecision] * N[(t$95$2 + N[(N[(y$46$re * y$46$re), $MachinePrecision] * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := e^{y.re \cdot \log x.im - t_0}\\
t_2 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_3 := t_2 \cdot e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - t_0}\\
t_4 := \sin t_2\\
t_5 := y.im \cdot \log x.im\\
t_6 := \sin t_5 \cdot t_1\\
\mathbf{if}\;x.im \leq -5.8 \cdot 10^{-14}:\\
\;\;\;\;t_4 \cdot e^{y.re \cdot \log \left(-x.im\right) - t_0}\\
\mathbf{elif}\;x.im \leq 3.4 \cdot 10^{-308}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;x.im \leq 1.75 \cdot 10^{-79}:\\
\;\;\;\;e^{\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.re - t_0} \cdot t_5\\
\mathbf{elif}\;x.im \leq 3.2 \cdot 10^{-21}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;x.im \leq 1.6 \cdot 10^{+23}:\\
\;\;\;\;t_6\\
\mathbf{elif}\;x.im \leq 7.6 \cdot 10^{+91}:\\
\;\;\;\;t_4 \cdot t_1\\
\mathbf{elif}\;x.im \leq 6.6 \cdot 10^{+213} \lor \neg \left(x.im \leq 1.7 \cdot 10^{+220}\right):\\
\;\;\;\;t_6\\
\mathbf{else}:\\
\;\;\;\;e^{y.im \cdot \left(-\tan^{-1}_* \frac{x.im}{x.re}\right)} \cdot \left(t_2 + \left(y.re \cdot y.re\right) \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot \log x.im\right)\right)\\
\end{array}
\end{array}
if x.im < -5.8000000000000005e-14Initial program 34.4%
Taylor expanded in y.im around 0 51.7%
Taylor expanded in x.im around -inf 67.9%
mul-1-neg67.9%
Simplified67.9%
if -5.8000000000000005e-14 < x.im < 3.39999999999999999e-308 or 1.75000000000000015e-79 < x.im < 3.2000000000000002e-21Initial program 46.9%
Taylor expanded in y.im around 0 52.4%
Taylor expanded in y.re around 0 55.8%
if 3.39999999999999999e-308 < x.im < 1.75000000000000015e-79Initial program 44.6%
Simplified72.0%
Taylor expanded in y.im around inf 36.3%
unpow236.3%
unpow236.3%
hypot-def63.8%
Simplified63.8%
Taylor expanded in x.re around 0 50.5%
Taylor expanded in y.im around 0 52.6%
if 3.2000000000000002e-21 < x.im < 1.6e23 or 7.5999999999999995e91 < x.im < 6.6000000000000002e213 or 1.7e220 < x.im Initial program 22.2%
Simplified77.7%
Taylor expanded in y.im around inf 24.4%
unpow224.4%
unpow224.4%
hypot-def78.2%
Simplified78.2%
Taylor expanded in x.re around 0 73.3%
Taylor expanded in x.re around 0 71.1%
if 1.6e23 < x.im < 7.5999999999999995e91Initial program 59.9%
Taylor expanded in y.im around 0 93.2%
Taylor expanded in x.re around 0 93.2%
if 6.6000000000000002e213 < x.im < 1.7e220Initial program 0.0%
Taylor expanded in y.im around 0 2.4%
Taylor expanded in x.re around 0 66.1%
Taylor expanded in y.re around 0 66.1%
distribute-lft-out99.5%
distribute-lft-neg-in99.5%
unpow299.5%
Simplified99.5%
Final simplification63.5%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (- (atan2 x.im x.re)))
(t_1 (exp (- (* y.re (log x.im)) (* y.im (atan2 x.im x.re)))))
(t_2 (* y.re (atan2 x.im x.re))))
(if (<= x.im -2.3e+181)
(* t_2 (exp (* y.im t_0)))
(if (<= x.im -2.05e+116)
(* t_2 (pow x.im y.re))
(if (<= x.im 4.7e-240)
(* t_2 (pow (exp y.im) t_0))
(if (or (<= x.im 1.3e+27) (not (<= x.im 3.4e+236)))
(* (sin (* y.im (log x.im))) t_1)
(* (sin t_2) 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);
double t_1 = exp(((y_46_re * log(x_46_im)) - (y_46_im * atan2(x_46_im, x_46_re))));
double t_2 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if (x_46_im <= -2.3e+181) {
tmp = t_2 * exp((y_46_im * t_0));
} else if (x_46_im <= -2.05e+116) {
tmp = t_2 * pow(x_46_im, y_46_re);
} else if (x_46_im <= 4.7e-240) {
tmp = t_2 * pow(exp(y_46_im), t_0);
} else if ((x_46_im <= 1.3e+27) || !(x_46_im <= 3.4e+236)) {
tmp = sin((y_46_im * log(x_46_im))) * t_1;
} else {
tmp = sin(t_2) * t_1;
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_0 = -atan2(x_46im, x_46re)
t_1 = exp(((y_46re * log(x_46im)) - (y_46im * atan2(x_46im, x_46re))))
t_2 = y_46re * atan2(x_46im, x_46re)
if (x_46im <= (-2.3d+181)) then
tmp = t_2 * exp((y_46im * t_0))
else if (x_46im <= (-2.05d+116)) then
tmp = t_2 * (x_46im ** y_46re)
else if (x_46im <= 4.7d-240) then
tmp = t_2 * (exp(y_46im) ** t_0)
else if ((x_46im <= 1.3d+27) .or. (.not. (x_46im <= 3.4d+236))) then
tmp = sin((y_46im * log(x_46im))) * t_1
else
tmp = sin(t_2) * t_1
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = -Math.atan2(x_46_im, x_46_re);
double t_1 = Math.exp(((y_46_re * Math.log(x_46_im)) - (y_46_im * Math.atan2(x_46_im, x_46_re))));
double t_2 = y_46_re * Math.atan2(x_46_im, x_46_re);
double tmp;
if (x_46_im <= -2.3e+181) {
tmp = t_2 * Math.exp((y_46_im * t_0));
} else if (x_46_im <= -2.05e+116) {
tmp = t_2 * Math.pow(x_46_im, y_46_re);
} else if (x_46_im <= 4.7e-240) {
tmp = t_2 * Math.pow(Math.exp(y_46_im), t_0);
} else if ((x_46_im <= 1.3e+27) || !(x_46_im <= 3.4e+236)) {
tmp = Math.sin((y_46_im * Math.log(x_46_im))) * t_1;
} else {
tmp = Math.sin(t_2) * 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) t_1 = math.exp(((y_46_re * math.log(x_46_im)) - (y_46_im * math.atan2(x_46_im, x_46_re)))) t_2 = y_46_re * math.atan2(x_46_im, x_46_re) tmp = 0 if x_46_im <= -2.3e+181: tmp = t_2 * math.exp((y_46_im * t_0)) elif x_46_im <= -2.05e+116: tmp = t_2 * math.pow(x_46_im, y_46_re) elif x_46_im <= 4.7e-240: tmp = t_2 * math.pow(math.exp(y_46_im), t_0) elif (x_46_im <= 1.3e+27) or not (x_46_im <= 3.4e+236): tmp = math.sin((y_46_im * math.log(x_46_im))) * t_1 else: tmp = math.sin(t_2) * 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)) t_1 = exp(Float64(Float64(y_46_re * log(x_46_im)) - Float64(y_46_im * atan(x_46_im, x_46_re)))) t_2 = Float64(y_46_re * atan(x_46_im, x_46_re)) tmp = 0.0 if (x_46_im <= -2.3e+181) tmp = Float64(t_2 * exp(Float64(y_46_im * t_0))); elseif (x_46_im <= -2.05e+116) tmp = Float64(t_2 * (x_46_im ^ y_46_re)); elseif (x_46_im <= 4.7e-240) tmp = Float64(t_2 * (exp(y_46_im) ^ t_0)); elseif ((x_46_im <= 1.3e+27) || !(x_46_im <= 3.4e+236)) tmp = Float64(sin(Float64(y_46_im * log(x_46_im))) * t_1); else tmp = Float64(sin(t_2) * 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); t_1 = exp(((y_46_re * log(x_46_im)) - (y_46_im * atan2(x_46_im, x_46_re)))); t_2 = y_46_re * atan2(x_46_im, x_46_re); tmp = 0.0; if (x_46_im <= -2.3e+181) tmp = t_2 * exp((y_46_im * t_0)); elseif (x_46_im <= -2.05e+116) tmp = t_2 * (x_46_im ^ y_46_re); elseif (x_46_im <= 4.7e-240) tmp = t_2 * (exp(y_46_im) ^ t_0); elseif ((x_46_im <= 1.3e+27) || ~((x_46_im <= 3.4e+236))) tmp = sin((y_46_im * log(x_46_im))) * t_1; else tmp = sin(t_2) * 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[ArcTan[x$46$im / x$46$re], $MachinePrecision])}, Block[{t$95$1 = N[Exp[N[(N[(y$46$re * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision] - N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x$46$im, -2.3e+181], N[(t$95$2 * N[Exp[N[(y$46$im * t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$im, -2.05e+116], N[(t$95$2 * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$im, 4.7e-240], N[(t$95$2 * N[Power[N[Exp[y$46$im], $MachinePrecision], t$95$0], $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[x$46$im, 1.3e+27], N[Not[LessEqual[x$46$im, 3.4e+236]], $MachinePrecision]], N[(N[Sin[N[(y$46$im * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$1), $MachinePrecision], N[(N[Sin[t$95$2], $MachinePrecision] * t$95$1), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := -\tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := e^{y.re \cdot \log x.im - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\\
t_2 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;x.im \leq -2.3 \cdot 10^{+181}:\\
\;\;\;\;t_2 \cdot e^{y.im \cdot t_0}\\
\mathbf{elif}\;x.im \leq -2.05 \cdot 10^{+116}:\\
\;\;\;\;t_2 \cdot {x.im}^{y.re}\\
\mathbf{elif}\;x.im \leq 4.7 \cdot 10^{-240}:\\
\;\;\;\;t_2 \cdot {\left(e^{y.im}\right)}^{t_0}\\
\mathbf{elif}\;x.im \leq 1.3 \cdot 10^{+27} \lor \neg \left(x.im \leq 3.4 \cdot 10^{+236}\right):\\
\;\;\;\;\sin \left(y.im \cdot \log x.im\right) \cdot t_1\\
\mathbf{else}:\\
\;\;\;\;\sin t_2 \cdot t_1\\
\end{array}
\end{array}
if x.im < -2.2999999999999999e181Initial program 0.0%
Taylor expanded in y.im around 0 34.2%
Taylor expanded in x.re around 0 0.0%
Taylor expanded in y.re around 0 61.7%
distribute-lft-neg-in61.7%
Simplified61.7%
if -2.2999999999999999e181 < x.im < -2.0499999999999999e116Initial program 25.0%
Taylor expanded in y.im around 0 51.4%
Taylor expanded in x.re around 0 0.0%
Taylor expanded in y.im around 0 50.0%
Taylor expanded in y.re around 0 62.5%
if -2.0499999999999999e116 < x.im < 4.70000000000000012e-240Initial program 51.0%
Taylor expanded in y.im around 0 58.0%
Taylor expanded in x.re around 0 4.8%
Taylor expanded in y.re around 0 43.1%
distribute-rgt-neg-in43.1%
exp-prod45.6%
Simplified45.6%
if 4.70000000000000012e-240 < x.im < 1.30000000000000004e27 or 3.40000000000000007e236 < x.im Initial program 41.4%
Simplified73.1%
Taylor expanded in y.im around inf 33.3%
unpow233.3%
unpow233.3%
hypot-def63.7%
Simplified63.7%
Taylor expanded in x.re around 0 55.4%
Taylor expanded in x.re around 0 44.6%
if 1.30000000000000004e27 < x.im < 3.40000000000000007e236Initial program 30.9%
Taylor expanded in y.im around 0 67.3%
Taylor expanded in x.re around 0 76.5%
Final simplification52.5%
(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))
(t_2 (* t_0 (exp (* y.im (- (atan2 x.im x.re))))))
(t_3 (* y.im (atan2 x.im x.re))))
(if (<= x.re -1.55e+143)
t_2
(if (<= x.re -9.6e-20)
(* (sin (* y.im (log x.im))) (exp (- (* y.re (log x.im)) t_3)))
(if (<= x.re -1.08e-260)
t_2
(if (<= x.re 1.65e-305)
(* (cbrt (pow t_1 3.0)) (pow x.im y.re))
(* t_1 (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 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = sin(t_0);
double t_2 = t_0 * exp((y_46_im * -atan2(x_46_im, x_46_re)));
double t_3 = y_46_im * atan2(x_46_im, x_46_re);
double tmp;
if (x_46_re <= -1.55e+143) {
tmp = t_2;
} else if (x_46_re <= -9.6e-20) {
tmp = sin((y_46_im * log(x_46_im))) * exp(((y_46_re * log(x_46_im)) - t_3));
} else if (x_46_re <= -1.08e-260) {
tmp = t_2;
} else if (x_46_re <= 1.65e-305) {
tmp = cbrt(pow(t_1, 3.0)) * pow(x_46_im, y_46_re);
} else {
tmp = t_1 * exp(((y_46_re * log(x_46_re)) - 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 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_1 = Math.sin(t_0);
double t_2 = t_0 * Math.exp((y_46_im * -Math.atan2(x_46_im, x_46_re)));
double t_3 = y_46_im * Math.atan2(x_46_im, x_46_re);
double tmp;
if (x_46_re <= -1.55e+143) {
tmp = t_2;
} else if (x_46_re <= -9.6e-20) {
tmp = Math.sin((y_46_im * Math.log(x_46_im))) * Math.exp(((y_46_re * Math.log(x_46_im)) - t_3));
} else if (x_46_re <= -1.08e-260) {
tmp = t_2;
} else if (x_46_re <= 1.65e-305) {
tmp = Math.cbrt(Math.pow(t_1, 3.0)) * Math.pow(x_46_im, y_46_re);
} else {
tmp = t_1 * Math.exp(((y_46_re * Math.log(x_46_re)) - t_3));
}
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(t_0) t_2 = Float64(t_0 * exp(Float64(y_46_im * Float64(-atan(x_46_im, x_46_re))))) t_3 = Float64(y_46_im * atan(x_46_im, x_46_re)) tmp = 0.0 if (x_46_re <= -1.55e+143) tmp = t_2; elseif (x_46_re <= -9.6e-20) tmp = Float64(sin(Float64(y_46_im * log(x_46_im))) * exp(Float64(Float64(y_46_re * log(x_46_im)) - t_3))); elseif (x_46_re <= -1.08e-260) tmp = t_2; elseif (x_46_re <= 1.65e-305) tmp = Float64(cbrt((t_1 ^ 3.0)) * (x_46_im ^ y_46_re)); else tmp = Float64(t_1 * 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[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sin[t$95$0], $MachinePrecision]}, Block[{t$95$2 = N[(t$95$0 * N[Exp[N[(y$46$im * (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x$46$re, -1.55e+143], t$95$2, If[LessEqual[x$46$re, -9.6e-20], N[(N[Sin[N[(y$46$im * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Exp[N[(N[(y$46$re * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision] - t$95$3), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, -1.08e-260], t$95$2, If[LessEqual[x$46$re, 1.65e-305], N[(N[Power[N[Power[t$95$1, 3.0], $MachinePrecision], 1/3], $MachinePrecision] * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision], N[(t$95$1 * 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 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := \sin t_0\\
t_2 := t_0 \cdot e^{y.im \cdot \left(-\tan^{-1}_* \frac{x.im}{x.re}\right)}\\
t_3 := y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;x.re \leq -1.55 \cdot 10^{+143}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x.re \leq -9.6 \cdot 10^{-20}:\\
\;\;\;\;\sin \left(y.im \cdot \log x.im\right) \cdot e^{y.re \cdot \log x.im - t_3}\\
\mathbf{elif}\;x.re \leq -1.08 \cdot 10^{-260}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x.re \leq 1.65 \cdot 10^{-305}:\\
\;\;\;\;\sqrt[3]{{t_1}^{3}} \cdot {x.im}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;t_1 \cdot e^{y.re \cdot \log x.re - t_3}\\
\end{array}
\end{array}
if x.re < -1.54999999999999995e143 or -9.59999999999999971e-20 < x.re < -1.08e-260Initial program 33.0%
Taylor expanded in y.im around 0 56.3%
Taylor expanded in x.re around 0 20.8%
Taylor expanded in y.re around 0 58.0%
distribute-lft-neg-in58.0%
Simplified58.0%
if -1.54999999999999995e143 < x.re < -9.59999999999999971e-20Initial program 54.3%
Simplified65.6%
Taylor expanded in y.im around inf 51.4%
unpow251.4%
unpow251.4%
hypot-def65.9%
Simplified65.9%
Taylor expanded in x.re around 0 44.0%
Taylor expanded in x.re around 0 41.2%
if -1.08e-260 < x.re < 1.64999999999999991e-305Initial program 39.8%
Taylor expanded in y.im around 0 70.0%
Taylor expanded in x.re around 0 39.8%
Taylor expanded in y.im around 0 60.0%
add-cbrt-cube60.2%
pow360.2%
*-commutative60.2%
Applied egg-rr60.2%
if 1.64999999999999991e-305 < x.re Initial program 39.0%
Taylor expanded in y.im around 0 53.2%
Taylor expanded in x.re around inf 50.3%
Final simplification51.7%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (- (atan2 x.im x.re)))
(t_1 (* y.im (atan2 x.im x.re)))
(t_2 (* y.re (atan2 x.im x.re))))
(if (<= x.im -4e+183)
(* t_2 (exp (* y.im t_0)))
(if (<= x.im -4.1e+116)
(* t_2 (pow x.im y.re))
(if (<= x.im -5e-310)
(* t_2 (pow (exp y.im) t_0))
(if (<= x.im 6.5e+23)
(*
(exp (- (* (log (hypot x.re x.im)) y.re) t_1))
(* y.im (log x.im)))
(* (sin t_2) (exp (- (* y.re (log x.im)) 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);
double t_1 = y_46_im * atan2(x_46_im, x_46_re);
double t_2 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if (x_46_im <= -4e+183) {
tmp = t_2 * exp((y_46_im * t_0));
} else if (x_46_im <= -4.1e+116) {
tmp = t_2 * pow(x_46_im, y_46_re);
} else if (x_46_im <= -5e-310) {
tmp = t_2 * pow(exp(y_46_im), t_0);
} else if (x_46_im <= 6.5e+23) {
tmp = exp(((log(hypot(x_46_re, x_46_im)) * y_46_re) - t_1)) * (y_46_im * log(x_46_im));
} else {
tmp = sin(t_2) * exp(((y_46_re * log(x_46_im)) - 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);
double t_1 = y_46_im * Math.atan2(x_46_im, x_46_re);
double t_2 = y_46_re * Math.atan2(x_46_im, x_46_re);
double tmp;
if (x_46_im <= -4e+183) {
tmp = t_2 * Math.exp((y_46_im * t_0));
} else if (x_46_im <= -4.1e+116) {
tmp = t_2 * Math.pow(x_46_im, y_46_re);
} else if (x_46_im <= -5e-310) {
tmp = t_2 * Math.pow(Math.exp(y_46_im), t_0);
} else if (x_46_im <= 6.5e+23) {
tmp = Math.exp(((Math.log(Math.hypot(x_46_re, x_46_im)) * y_46_re) - t_1)) * (y_46_im * Math.log(x_46_im));
} else {
tmp = Math.sin(t_2) * Math.exp(((y_46_re * Math.log(x_46_im)) - 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) t_1 = y_46_im * math.atan2(x_46_im, x_46_re) t_2 = y_46_re * math.atan2(x_46_im, x_46_re) tmp = 0 if x_46_im <= -4e+183: tmp = t_2 * math.exp((y_46_im * t_0)) elif x_46_im <= -4.1e+116: tmp = t_2 * math.pow(x_46_im, y_46_re) elif x_46_im <= -5e-310: tmp = t_2 * math.pow(math.exp(y_46_im), t_0) elif x_46_im <= 6.5e+23: tmp = math.exp(((math.log(math.hypot(x_46_re, x_46_im)) * y_46_re) - t_1)) * (y_46_im * math.log(x_46_im)) else: tmp = math.sin(t_2) * math.exp(((y_46_re * math.log(x_46_im)) - 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)) t_1 = Float64(y_46_im * atan(x_46_im, x_46_re)) t_2 = Float64(y_46_re * atan(x_46_im, x_46_re)) tmp = 0.0 if (x_46_im <= -4e+183) tmp = Float64(t_2 * exp(Float64(y_46_im * t_0))); elseif (x_46_im <= -4.1e+116) tmp = Float64(t_2 * (x_46_im ^ y_46_re)); elseif (x_46_im <= -5e-310) tmp = Float64(t_2 * (exp(y_46_im) ^ t_0)); elseif (x_46_im <= 6.5e+23) tmp = Float64(exp(Float64(Float64(log(hypot(x_46_re, x_46_im)) * y_46_re) - t_1)) * Float64(y_46_im * log(x_46_im))); else tmp = Float64(sin(t_2) * exp(Float64(Float64(y_46_re * log(x_46_im)) - 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); t_1 = y_46_im * atan2(x_46_im, x_46_re); t_2 = y_46_re * atan2(x_46_im, x_46_re); tmp = 0.0; if (x_46_im <= -4e+183) tmp = t_2 * exp((y_46_im * t_0)); elseif (x_46_im <= -4.1e+116) tmp = t_2 * (x_46_im ^ y_46_re); elseif (x_46_im <= -5e-310) tmp = t_2 * (exp(y_46_im) ^ t_0); elseif (x_46_im <= 6.5e+23) tmp = exp(((log(hypot(x_46_re, x_46_im)) * y_46_re) - t_1)) * (y_46_im * log(x_46_im)); else tmp = sin(t_2) * exp(((y_46_re * log(x_46_im)) - 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[ArcTan[x$46$im / x$46$re], $MachinePrecision])}, Block[{t$95$1 = N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x$46$im, -4e+183], N[(t$95$2 * N[Exp[N[(y$46$im * t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$im, -4.1e+116], N[(t$95$2 * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$im, -5e-310], N[(t$95$2 * N[Power[N[Exp[y$46$im], $MachinePrecision], t$95$0], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$im, 6.5e+23], N[(N[Exp[N[(N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$re), $MachinePrecision] - t$95$1), $MachinePrecision]], $MachinePrecision] * N[(y$46$im * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sin[t$95$2], $MachinePrecision] * N[Exp[N[(N[(y$46$re * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := -\tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_2 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;x.im \leq -4 \cdot 10^{+183}:\\
\;\;\;\;t_2 \cdot e^{y.im \cdot t_0}\\
\mathbf{elif}\;x.im \leq -4.1 \cdot 10^{+116}:\\
\;\;\;\;t_2 \cdot {x.im}^{y.re}\\
\mathbf{elif}\;x.im \leq -5 \cdot 10^{-310}:\\
\;\;\;\;t_2 \cdot {\left(e^{y.im}\right)}^{t_0}\\
\mathbf{elif}\;x.im \leq 6.5 \cdot 10^{+23}:\\
\;\;\;\;e^{\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.re - t_1} \cdot \left(y.im \cdot \log x.im\right)\\
\mathbf{else}:\\
\;\;\;\;\sin t_2 \cdot e^{y.re \cdot \log x.im - t_1}\\
\end{array}
\end{array}
if x.im < -3.99999999999999979e183Initial program 0.0%
Taylor expanded in y.im around 0 34.2%
Taylor expanded in x.re around 0 0.0%
Taylor expanded in y.re around 0 61.7%
distribute-lft-neg-in61.7%
Simplified61.7%
if -3.99999999999999979e183 < x.im < -4.0999999999999998e116Initial program 25.0%
Taylor expanded in y.im around 0 51.4%
Taylor expanded in x.re around 0 0.0%
Taylor expanded in y.im around 0 50.0%
Taylor expanded in y.re around 0 62.5%
if -4.0999999999999998e116 < x.im < -4.999999999999985e-310Initial program 51.0%
Taylor expanded in y.im around 0 58.9%
Taylor expanded in x.re around 0 0.0%
Taylor expanded in y.re around 0 42.8%
distribute-rgt-neg-in42.8%
exp-prod44.7%
Simplified44.7%
if -4.999999999999985e-310 < x.im < 6.4999999999999996e23Initial program 49.9%
Simplified72.7%
Taylor expanded in y.im around inf 40.7%
unpow240.7%
unpow240.7%
hypot-def63.6%
Simplified63.6%
Taylor expanded in x.re around 0 50.5%
Taylor expanded in y.im around 0 47.9%
if 6.4999999999999996e23 < x.im Initial program 24.0%
Taylor expanded in y.im around 0 63.7%
Taylor expanded in x.re around 0 70.8%
Final simplification53.3%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (- (atan2 x.im x.re))) (t_1 (* y.re (atan2 x.im x.re))))
(if (<= x.im -1.8e+180)
(* t_1 (exp (* y.im t_0)))
(if (<= x.im -3.1e+116)
(* t_1 (pow x.im y.re))
(if (<= x.im 4.6e-240)
(* t_1 (pow (exp y.im) t_0))
(*
(sin (* y.im (log x.im)))
(exp (- (* y.re (log x.im)) (* y.im (atan2 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 = -atan2(x_46_im, x_46_re);
double t_1 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if (x_46_im <= -1.8e+180) {
tmp = t_1 * exp((y_46_im * t_0));
} else if (x_46_im <= -3.1e+116) {
tmp = t_1 * pow(x_46_im, y_46_re);
} else if (x_46_im <= 4.6e-240) {
tmp = t_1 * pow(exp(y_46_im), t_0);
} else {
tmp = sin((y_46_im * log(x_46_im))) * exp(((y_46_re * log(x_46_im)) - (y_46_im * atan2(x_46_im, x_46_re))));
}
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 = -atan2(x_46im, x_46re)
t_1 = y_46re * atan2(x_46im, x_46re)
if (x_46im <= (-1.8d+180)) then
tmp = t_1 * exp((y_46im * t_0))
else if (x_46im <= (-3.1d+116)) then
tmp = t_1 * (x_46im ** y_46re)
else if (x_46im <= 4.6d-240) then
tmp = t_1 * (exp(y_46im) ** t_0)
else
tmp = sin((y_46im * log(x_46im))) * exp(((y_46re * log(x_46im)) - (y_46im * atan2(x_46im, x_46re))))
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);
double t_1 = y_46_re * Math.atan2(x_46_im, x_46_re);
double tmp;
if (x_46_im <= -1.8e+180) {
tmp = t_1 * Math.exp((y_46_im * t_0));
} else if (x_46_im <= -3.1e+116) {
tmp = t_1 * Math.pow(x_46_im, y_46_re);
} else if (x_46_im <= 4.6e-240) {
tmp = t_1 * Math.pow(Math.exp(y_46_im), t_0);
} else {
tmp = Math.sin((y_46_im * Math.log(x_46_im))) * Math.exp(((y_46_re * Math.log(x_46_im)) - (y_46_im * Math.atan2(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.atan2(x_46_im, x_46_re) t_1 = y_46_re * math.atan2(x_46_im, x_46_re) tmp = 0 if x_46_im <= -1.8e+180: tmp = t_1 * math.exp((y_46_im * t_0)) elif x_46_im <= -3.1e+116: tmp = t_1 * math.pow(x_46_im, y_46_re) elif x_46_im <= 4.6e-240: tmp = t_1 * math.pow(math.exp(y_46_im), t_0) else: tmp = math.sin((y_46_im * math.log(x_46_im))) * math.exp(((y_46_re * math.log(x_46_im)) - (y_46_im * math.atan2(x_46_im, x_46_re)))) 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)) t_1 = Float64(y_46_re * atan(x_46_im, x_46_re)) tmp = 0.0 if (x_46_im <= -1.8e+180) tmp = Float64(t_1 * exp(Float64(y_46_im * t_0))); elseif (x_46_im <= -3.1e+116) tmp = Float64(t_1 * (x_46_im ^ y_46_re)); elseif (x_46_im <= 4.6e-240) tmp = Float64(t_1 * (exp(y_46_im) ^ t_0)); else tmp = Float64(sin(Float64(y_46_im * log(x_46_im))) * exp(Float64(Float64(y_46_re * log(x_46_im)) - Float64(y_46_im * atan(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 = -atan2(x_46_im, x_46_re); t_1 = y_46_re * atan2(x_46_im, x_46_re); tmp = 0.0; if (x_46_im <= -1.8e+180) tmp = t_1 * exp((y_46_im * t_0)); elseif (x_46_im <= -3.1e+116) tmp = t_1 * (x_46_im ^ y_46_re); elseif (x_46_im <= 4.6e-240) tmp = t_1 * (exp(y_46_im) ^ t_0); else tmp = sin((y_46_im * log(x_46_im))) * exp(((y_46_re * log(x_46_im)) - (y_46_im * atan2(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[ArcTan[x$46$im / x$46$re], $MachinePrecision])}, Block[{t$95$1 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x$46$im, -1.8e+180], N[(t$95$1 * N[Exp[N[(y$46$im * t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$im, -3.1e+116], N[(t$95$1 * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$im, 4.6e-240], N[(t$95$1 * N[Power[N[Exp[y$46$im], $MachinePrecision], t$95$0], $MachinePrecision]), $MachinePrecision], N[(N[Sin[N[(y$46$im * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Exp[N[(N[(y$46$re * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision] - N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := -\tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;x.im \leq -1.8 \cdot 10^{+180}:\\
\;\;\;\;t_1 \cdot e^{y.im \cdot t_0}\\
\mathbf{elif}\;x.im \leq -3.1 \cdot 10^{+116}:\\
\;\;\;\;t_1 \cdot {x.im}^{y.re}\\
\mathbf{elif}\;x.im \leq 4.6 \cdot 10^{-240}:\\
\;\;\;\;t_1 \cdot {\left(e^{y.im}\right)}^{t_0}\\
\mathbf{else}:\\
\;\;\;\;\sin \left(y.im \cdot \log x.im\right) \cdot e^{y.re \cdot \log x.im - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\\
\end{array}
\end{array}
if x.im < -1.8000000000000001e180Initial program 0.0%
Taylor expanded in y.im around 0 34.2%
Taylor expanded in x.re around 0 0.0%
Taylor expanded in y.re around 0 61.7%
distribute-lft-neg-in61.7%
Simplified61.7%
if -1.8000000000000001e180 < x.im < -3.09999999999999996e116Initial program 25.0%
Taylor expanded in y.im around 0 51.4%
Taylor expanded in x.re around 0 0.0%
Taylor expanded in y.im around 0 50.0%
Taylor expanded in y.re around 0 62.5%
if -3.09999999999999996e116 < x.im < 4.59999999999999986e-240Initial program 51.0%
Taylor expanded in y.im around 0 58.0%
Taylor expanded in x.re around 0 4.8%
Taylor expanded in y.re around 0 43.1%
distribute-rgt-neg-in43.1%
exp-prod45.6%
Simplified45.6%
if 4.59999999999999986e-240 < x.im Initial program 37.6%
Simplified75.9%
Taylor expanded in y.im around inf 31.6%
unpow231.6%
unpow231.6%
hypot-def65.1%
Simplified65.1%
Taylor expanded in x.re around 0 58.3%
Taylor expanded in x.re around 0 51.5%
Final simplification50.3%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.im (atan2 x.im x.re)))
(t_1 (sin (* y.re (atan2 x.im x.re)))))
(if (<= x.im -5e-310)
(* t_1 (exp (- (* y.re (log (- x.im))) t_0)))
(if (<= x.im 1.55e+27)
(* (exp (- (* (log (hypot x.re x.im)) y.re) t_0)) (* y.im (log x.im)))
(* t_1 (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 = y_46_im * atan2(x_46_im, x_46_re);
double t_1 = sin((y_46_re * atan2(x_46_im, x_46_re)));
double tmp;
if (x_46_im <= -5e-310) {
tmp = t_1 * exp(((y_46_re * log(-x_46_im)) - t_0));
} else if (x_46_im <= 1.55e+27) {
tmp = exp(((log(hypot(x_46_re, x_46_im)) * y_46_re) - t_0)) * (y_46_im * log(x_46_im));
} else {
tmp = t_1 * exp(((y_46_re * log(x_46_im)) - 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_im * Math.atan2(x_46_im, x_46_re);
double t_1 = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
double tmp;
if (x_46_im <= -5e-310) {
tmp = t_1 * Math.exp(((y_46_re * Math.log(-x_46_im)) - t_0));
} else if (x_46_im <= 1.55e+27) {
tmp = Math.exp(((Math.log(Math.hypot(x_46_re, x_46_im)) * y_46_re) - t_0)) * (y_46_im * Math.log(x_46_im));
} else {
tmp = t_1 * 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 = y_46_im * math.atan2(x_46_im, x_46_re) t_1 = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) tmp = 0 if x_46_im <= -5e-310: tmp = t_1 * math.exp(((y_46_re * math.log(-x_46_im)) - t_0)) elif x_46_im <= 1.55e+27: tmp = math.exp(((math.log(math.hypot(x_46_re, x_46_im)) * y_46_re) - t_0)) * (y_46_im * math.log(x_46_im)) else: tmp = t_1 * 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(y_46_im * atan(x_46_im, x_46_re)) t_1 = sin(Float64(y_46_re * atan(x_46_im, x_46_re))) tmp = 0.0 if (x_46_im <= -5e-310) tmp = Float64(t_1 * exp(Float64(Float64(y_46_re * log(Float64(-x_46_im))) - t_0))); elseif (x_46_im <= 1.55e+27) tmp = Float64(exp(Float64(Float64(log(hypot(x_46_re, x_46_im)) * y_46_re) - t_0)) * Float64(y_46_im * log(x_46_im))); else tmp = Float64(t_1 * 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 = y_46_im * atan2(x_46_im, x_46_re); t_1 = sin((y_46_re * atan2(x_46_im, x_46_re))); tmp = 0.0; if (x_46_im <= -5e-310) tmp = t_1 * exp(((y_46_re * log(-x_46_im)) - t_0)); elseif (x_46_im <= 1.55e+27) tmp = exp(((log(hypot(x_46_re, x_46_im)) * y_46_re) - t_0)) * (y_46_im * log(x_46_im)); else tmp = t_1 * 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[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[x$46$im, -5e-310], N[(t$95$1 * 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.55e+27], N[(N[Exp[N[(N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$re), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision] * N[(y$46$im * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 * 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 := y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{if}\;x.im \leq -5 \cdot 10^{-310}:\\
\;\;\;\;t_1 \cdot e^{y.re \cdot \log \left(-x.im\right) - t_0}\\
\mathbf{elif}\;x.im \leq 1.55 \cdot 10^{+27}:\\
\;\;\;\;e^{\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.re - t_0} \cdot \left(y.im \cdot \log x.im\right)\\
\mathbf{else}:\\
\;\;\;\;t_1 \cdot e^{y.re \cdot \log x.im - t_0}\\
\end{array}
\end{array}
if x.im < -4.999999999999985e-310Initial program 39.7%
Taylor expanded in y.im around 0 53.8%
Taylor expanded in x.im around -inf 53.2%
mul-1-neg53.2%
Simplified53.2%
if -4.999999999999985e-310 < x.im < 1.54999999999999998e27Initial program 49.9%
Simplified72.7%
Taylor expanded in y.im around inf 40.7%
unpow240.7%
unpow240.7%
hypot-def63.6%
Simplified63.6%
Taylor expanded in x.re around 0 50.5%
Taylor expanded in y.im around 0 47.9%
if 1.54999999999999998e27 < x.im Initial program 24.0%
Taylor expanded in y.im around 0 63.7%
Taylor expanded in x.re around 0 70.8%
Final simplification55.3%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.im (atan2 x.im x.re)))
(t_1 (sin (* y.re (atan2 x.im x.re)))))
(if (<= x.re -1e-311)
(* t_1 (exp (- (* y.re (log (- x.re))) t_0)))
(* t_1 (exp (- (* y.re (log x.re)) 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_im * atan2(x_46_im, x_46_re);
double t_1 = sin((y_46_re * atan2(x_46_im, x_46_re)));
double tmp;
if (x_46_re <= -1e-311) {
tmp = t_1 * exp(((y_46_re * log(-x_46_re)) - t_0));
} else {
tmp = t_1 * exp(((y_46_re * log(x_46_re)) - 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) :: tmp
t_0 = y_46im * atan2(x_46im, x_46re)
t_1 = sin((y_46re * atan2(x_46im, x_46re)))
if (x_46re <= (-1d-311)) then
tmp = t_1 * exp(((y_46re * log(-x_46re)) - t_0))
else
tmp = t_1 * exp(((y_46re * log(x_46re)) - 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_im * Math.atan2(x_46_im, x_46_re);
double t_1 = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
double tmp;
if (x_46_re <= -1e-311) {
tmp = t_1 * Math.exp(((y_46_re * Math.log(-x_46_re)) - t_0));
} else {
tmp = t_1 * Math.exp(((y_46_re * Math.log(x_46_re)) - t_0));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = y_46_im * math.atan2(x_46_im, x_46_re) t_1 = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) tmp = 0 if x_46_re <= -1e-311: tmp = t_1 * math.exp(((y_46_re * math.log(-x_46_re)) - t_0)) else: tmp = t_1 * math.exp(((y_46_re * math.log(x_46_re)) - t_0)) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_im * atan(x_46_im, x_46_re)) t_1 = sin(Float64(y_46_re * atan(x_46_im, x_46_re))) tmp = 0.0 if (x_46_re <= -1e-311) tmp = Float64(t_1 * exp(Float64(Float64(y_46_re * log(Float64(-x_46_re))) - t_0))); else tmp = Float64(t_1 * exp(Float64(Float64(y_46_re * log(x_46_re)) - 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_im * atan2(x_46_im, x_46_re); t_1 = sin((y_46_re * atan2(x_46_im, x_46_re))); tmp = 0.0; if (x_46_re <= -1e-311) tmp = t_1 * exp(((y_46_re * log(-x_46_re)) - t_0)); else tmp = t_1 * exp(((y_46_re * log(x_46_re)) - 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$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[x$46$re, -1e-311], N[(t$95$1 * N[Exp[N[(N[(y$46$re * N[Log[(-x$46$re)], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[Exp[N[(N[(y$46$re * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{if}\;x.re \leq -1 \cdot 10^{-311}:\\
\;\;\;\;t_1 \cdot e^{y.re \cdot \log \left(-x.re\right) - t_0}\\
\mathbf{else}:\\
\;\;\;\;t_1 \cdot e^{y.re \cdot \log x.re - t_0}\\
\end{array}
\end{array}
if x.re < -9.99999999999948e-312Initial program 40.5%
Taylor expanded in y.im around 0 51.2%
Taylor expanded in x.re around -inf 56.5%
mul-1-neg56.5%
Simplified56.5%
if -9.99999999999948e-312 < x.re Initial program 38.4%
Taylor expanded in y.im around 0 53.2%
Taylor expanded in x.re around inf 49.6%
Final simplification52.7%
(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 -2.7e+20) (not (<= y.im 0.00036)))
(* t_0 (pow (exp y.im) (- (atan2 x.im x.re))))
(* (sin t_0) (pow x.im y.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 tmp;
if ((y_46_im <= -2.7e+20) || !(y_46_im <= 0.00036)) {
tmp = t_0 * pow(exp(y_46_im), -atan2(x_46_im, x_46_re));
} else {
tmp = sin(t_0) * pow(x_46_im, y_46_re);
}
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 <= (-2.7d+20)) .or. (.not. (y_46im <= 0.00036d0))) then
tmp = t_0 * (exp(y_46im) ** -atan2(x_46im, x_46re))
else
tmp = sin(t_0) * (x_46im ** y_46re)
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 <= -2.7e+20) || !(y_46_im <= 0.00036)) {
tmp = t_0 * Math.pow(Math.exp(y_46_im), -Math.atan2(x_46_im, x_46_re));
} else {
tmp = Math.sin(t_0) * Math.pow(x_46_im, y_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) tmp = 0 if (y_46_im <= -2.7e+20) or not (y_46_im <= 0.00036): tmp = t_0 * math.pow(math.exp(y_46_im), -math.atan2(x_46_im, x_46_re)) else: tmp = math.sin(t_0) * math.pow(x_46_im, y_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)) tmp = 0.0 if ((y_46_im <= -2.7e+20) || !(y_46_im <= 0.00036)) tmp = Float64(t_0 * (exp(y_46_im) ^ Float64(-atan(x_46_im, x_46_re)))); else tmp = Float64(sin(t_0) * (x_46_im ^ y_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); tmp = 0.0; if ((y_46_im <= -2.7e+20) || ~((y_46_im <= 0.00036))) tmp = t_0 * (exp(y_46_im) ^ -atan2(x_46_im, x_46_re)); else tmp = sin(t_0) * (x_46_im ^ y_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]}, If[Or[LessEqual[y$46$im, -2.7e+20], N[Not[LessEqual[y$46$im, 0.00036]], $MachinePrecision]], N[(t$95$0 * N[Power[N[Exp[y$46$im], $MachinePrecision], (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])], $MachinePrecision]), $MachinePrecision], N[(N[Sin[t$95$0], $MachinePrecision] * N[Power[x$46$im, y$46$re], $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.7 \cdot 10^{+20} \lor \neg \left(y.im \leq 0.00036\right):\\
\;\;\;\;t_0 \cdot {\left(e^{y.im}\right)}^{\left(-\tan^{-1}_* \frac{x.im}{x.re}\right)}\\
\mathbf{else}:\\
\;\;\;\;\sin t_0 \cdot {x.im}^{y.re}\\
\end{array}
\end{array}
if y.im < -2.7e20 or 3.60000000000000023e-4 < y.im Initial program 33.2%
Taylor expanded in y.im around 0 55.9%
Taylor expanded in x.re around 0 21.4%
Taylor expanded in y.re around 0 52.4%
distribute-rgt-neg-in52.4%
exp-prod55.2%
Simplified55.2%
if -2.7e20 < y.im < 3.60000000000000023e-4Initial program 46.5%
Taylor expanded in y.im around 0 48.1%
Taylor expanded in x.re around 0 27.2%
Taylor expanded in y.im around 0 37.4%
Final simplification46.9%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re))))
(if (<= y.re -1.05e+206)
(* t_0 (pow x.im y.re))
(if (<= y.re 1.36e+17)
(* t_0 (exp (* y.im (- (atan2 x.im x.re)))))
(* (sin (fabs t_0)) (pow x.im y.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 tmp;
if (y_46_re <= -1.05e+206) {
tmp = t_0 * pow(x_46_im, y_46_re);
} else if (y_46_re <= 1.36e+17) {
tmp = t_0 * exp((y_46_im * -atan2(x_46_im, x_46_re)));
} else {
tmp = sin(fabs(t_0)) * pow(x_46_im, y_46_re);
}
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_46re <= (-1.05d+206)) then
tmp = t_0 * (x_46im ** y_46re)
else if (y_46re <= 1.36d+17) then
tmp = t_0 * exp((y_46im * -atan2(x_46im, x_46re)))
else
tmp = sin(abs(t_0)) * (x_46im ** y_46re)
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_re <= -1.05e+206) {
tmp = t_0 * Math.pow(x_46_im, y_46_re);
} else if (y_46_re <= 1.36e+17) {
tmp = t_0 * Math.exp((y_46_im * -Math.atan2(x_46_im, x_46_re)));
} else {
tmp = Math.sin(Math.abs(t_0)) * Math.pow(x_46_im, y_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) tmp = 0 if y_46_re <= -1.05e+206: tmp = t_0 * math.pow(x_46_im, y_46_re) elif y_46_re <= 1.36e+17: tmp = t_0 * math.exp((y_46_im * -math.atan2(x_46_im, x_46_re))) else: tmp = math.sin(math.fabs(t_0)) * math.pow(x_46_im, y_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)) tmp = 0.0 if (y_46_re <= -1.05e+206) tmp = Float64(t_0 * (x_46_im ^ y_46_re)); elseif (y_46_re <= 1.36e+17) tmp = Float64(t_0 * exp(Float64(y_46_im * Float64(-atan(x_46_im, x_46_re))))); else tmp = Float64(sin(abs(t_0)) * (x_46_im ^ y_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); tmp = 0.0; if (y_46_re <= -1.05e+206) tmp = t_0 * (x_46_im ^ y_46_re); elseif (y_46_re <= 1.36e+17) tmp = t_0 * exp((y_46_im * -atan2(x_46_im, x_46_re))); else tmp = sin(abs(t_0)) * (x_46_im ^ y_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]}, If[LessEqual[y$46$re, -1.05e+206], N[(t$95$0 * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 1.36e+17], N[(t$95$0 * N[Exp[N[(y$46$im * (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Sin[N[Abs[t$95$0], $MachinePrecision]], $MachinePrecision] * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.re \leq -1.05 \cdot 10^{+206}:\\
\;\;\;\;t_0 \cdot {x.im}^{y.re}\\
\mathbf{elif}\;y.re \leq 1.36 \cdot 10^{+17}:\\
\;\;\;\;t_0 \cdot e^{y.im \cdot \left(-\tan^{-1}_* \frac{x.im}{x.re}\right)}\\
\mathbf{else}:\\
\;\;\;\;\sin \left(\left|t_0\right|\right) \cdot {x.im}^{y.re}\\
\end{array}
\end{array}
if y.re < -1.04999999999999993e206Initial program 50.0%
Taylor expanded in y.im around 0 88.5%
Taylor expanded in x.re around 0 30.9%
Taylor expanded in y.im around 0 58.1%
Taylor expanded in y.re around 0 58.1%
if -1.04999999999999993e206 < y.re < 1.36e17Initial program 41.2%
Taylor expanded in y.im around 0 43.6%
Taylor expanded in x.re around 0 18.9%
Taylor expanded in y.re around 0 44.4%
distribute-lft-neg-in44.4%
Simplified44.4%
if 1.36e17 < y.re Initial program 30.2%
Taylor expanded in y.im around 0 60.4%
Taylor expanded in x.re around 0 35.1%
Taylor expanded in y.im around 0 48.2%
*-commutative48.2%
add-sqr-sqrt24.1%
sqrt-prod25.8%
rem-sqrt-square51.3%
Applied egg-rr51.3%
Final simplification47.5%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re))))
(if (<= y.re -1.4e+206)
(* t_0 (pow x.im y.re))
(if (<= y.re 1.2e+16)
(* t_0 (exp (* y.im (- (atan2 x.im x.re)))))
(* (sin t_0) (pow x.im y.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 tmp;
if (y_46_re <= -1.4e+206) {
tmp = t_0 * pow(x_46_im, y_46_re);
} else if (y_46_re <= 1.2e+16) {
tmp = t_0 * exp((y_46_im * -atan2(x_46_im, x_46_re)));
} else {
tmp = sin(t_0) * pow(x_46_im, y_46_re);
}
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_46re <= (-1.4d+206)) then
tmp = t_0 * (x_46im ** y_46re)
else if (y_46re <= 1.2d+16) then
tmp = t_0 * exp((y_46im * -atan2(x_46im, x_46re)))
else
tmp = sin(t_0) * (x_46im ** y_46re)
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_re <= -1.4e+206) {
tmp = t_0 * Math.pow(x_46_im, y_46_re);
} else if (y_46_re <= 1.2e+16) {
tmp = t_0 * Math.exp((y_46_im * -Math.atan2(x_46_im, x_46_re)));
} else {
tmp = Math.sin(t_0) * Math.pow(x_46_im, y_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) tmp = 0 if y_46_re <= -1.4e+206: tmp = t_0 * math.pow(x_46_im, y_46_re) elif y_46_re <= 1.2e+16: tmp = t_0 * math.exp((y_46_im * -math.atan2(x_46_im, x_46_re))) else: tmp = math.sin(t_0) * math.pow(x_46_im, y_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)) tmp = 0.0 if (y_46_re <= -1.4e+206) tmp = Float64(t_0 * (x_46_im ^ y_46_re)); elseif (y_46_re <= 1.2e+16) tmp = Float64(t_0 * exp(Float64(y_46_im * Float64(-atan(x_46_im, x_46_re))))); else tmp = Float64(sin(t_0) * (x_46_im ^ y_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); tmp = 0.0; if (y_46_re <= -1.4e+206) tmp = t_0 * (x_46_im ^ y_46_re); elseif (y_46_re <= 1.2e+16) tmp = t_0 * exp((y_46_im * -atan2(x_46_im, x_46_re))); else tmp = sin(t_0) * (x_46_im ^ y_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]}, If[LessEqual[y$46$re, -1.4e+206], N[(t$95$0 * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 1.2e+16], N[(t$95$0 * N[Exp[N[(y$46$im * (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Sin[t$95$0], $MachinePrecision] * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.re \leq -1.4 \cdot 10^{+206}:\\
\;\;\;\;t_0 \cdot {x.im}^{y.re}\\
\mathbf{elif}\;y.re \leq 1.2 \cdot 10^{+16}:\\
\;\;\;\;t_0 \cdot e^{y.im \cdot \left(-\tan^{-1}_* \frac{x.im}{x.re}\right)}\\
\mathbf{else}:\\
\;\;\;\;\sin t_0 \cdot {x.im}^{y.re}\\
\end{array}
\end{array}
if y.re < -1.3999999999999999e206Initial program 50.0%
Taylor expanded in y.im around 0 88.5%
Taylor expanded in x.re around 0 30.9%
Taylor expanded in y.im around 0 58.1%
Taylor expanded in y.re around 0 58.1%
if -1.3999999999999999e206 < y.re < 1.2e16Initial program 41.2%
Taylor expanded in y.im around 0 43.6%
Taylor expanded in x.re around 0 18.9%
Taylor expanded in y.re around 0 44.4%
distribute-lft-neg-in44.4%
Simplified44.4%
if 1.2e16 < y.re Initial program 30.2%
Taylor expanded in y.im around 0 60.4%
Taylor expanded in x.re around 0 35.1%
Taylor expanded in y.im around 0 48.2%
Final simplification46.7%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re))))
(if (or (<= y.re -2.4e+25) (not (<= y.re 6600000000.0)))
(* (sin t_0) (pow x.im y.re))
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_re <= -2.4e+25) || !(y_46_re <= 6600000000.0)) {
tmp = sin(t_0) * pow(x_46_im, y_46_re);
} 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_46re <= (-2.4d+25)) .or. (.not. (y_46re <= 6600000000.0d0))) then
tmp = sin(t_0) * (x_46im ** y_46re)
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_re <= -2.4e+25) || !(y_46_re <= 6600000000.0)) {
tmp = Math.sin(t_0) * Math.pow(x_46_im, y_46_re);
} 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_re <= -2.4e+25) or not (y_46_re <= 6600000000.0): tmp = math.sin(t_0) * math.pow(x_46_im, y_46_re) 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_re <= -2.4e+25) || !(y_46_re <= 6600000000.0)) tmp = Float64(sin(t_0) * (x_46_im ^ y_46_re)); 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_re <= -2.4e+25) || ~((y_46_re <= 6600000000.0))) tmp = sin(t_0) * (x_46_im ^ y_46_re); 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$re, -2.4e+25], N[Not[LessEqual[y$46$re, 6600000000.0]], $MachinePrecision]], N[(N[Sin[t$95$0], $MachinePrecision] * N[Power[x$46$im, y$46$re], $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.re \leq -2.4 \cdot 10^{+25} \lor \neg \left(y.re \leq 6600000000\right):\\
\;\;\;\;\sin t_0 \cdot {x.im}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if y.re < -2.39999999999999996e25 or 6.6e9 < y.re Initial program 36.4%
Taylor expanded in y.im around 0 72.0%
Taylor expanded in x.re around 0 34.0%
Taylor expanded in y.im around 0 50.1%
if -2.39999999999999996e25 < y.re < 6.6e9Initial program 42.1%
Taylor expanded in y.im around 0 34.6%
Taylor expanded in x.re around 0 15.2%
Taylor expanded in y.im around 0 6.8%
Taylor expanded in y.re around 0 16.8%
Final simplification32.5%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re))))
(if (or (<= y.re -3e+28) (not (<= y.re 6600000000.0)))
(* t_0 (pow x.im y.re))
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_re <= -3e+28) || !(y_46_re <= 6600000000.0)) {
tmp = t_0 * pow(x_46_im, y_46_re);
} 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_46re <= (-3d+28)) .or. (.not. (y_46re <= 6600000000.0d0))) then
tmp = t_0 * (x_46im ** y_46re)
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_re <= -3e+28) || !(y_46_re <= 6600000000.0)) {
tmp = t_0 * Math.pow(x_46_im, y_46_re);
} 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_re <= -3e+28) or not (y_46_re <= 6600000000.0): tmp = t_0 * math.pow(x_46_im, y_46_re) 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_re <= -3e+28) || !(y_46_re <= 6600000000.0)) tmp = Float64(t_0 * (x_46_im ^ y_46_re)); 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_re <= -3e+28) || ~((y_46_re <= 6600000000.0))) tmp = t_0 * (x_46_im ^ y_46_re); 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$re, -3e+28], N[Not[LessEqual[y$46$re, 6600000000.0]], $MachinePrecision]], N[(t$95$0 * N[Power[x$46$im, y$46$re], $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.re \leq -3 \cdot 10^{+28} \lor \neg \left(y.re \leq 6600000000\right):\\
\;\;\;\;t_0 \cdot {x.im}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if y.re < -3.0000000000000001e28 or 6.6e9 < y.re Initial program 36.4%
Taylor expanded in y.im around 0 71.3%
Taylor expanded in x.re around 0 33.2%
Taylor expanded in y.im around 0 49.7%
Taylor expanded in y.re around 0 45.4%
if -3.0000000000000001e28 < y.re < 6.6e9Initial program 41.9%
Taylor expanded in y.im around 0 36.0%
Taylor expanded in x.re around 0 16.3%
Taylor expanded in y.im around 0 8.1%
Taylor expanded in y.re around 0 17.2%
Final simplification30.2%
(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 39.4%
Taylor expanded in y.im around 0 52.3%
Taylor expanded in x.re around 0 24.1%
Taylor expanded in y.im around 0 27.3%
Taylor expanded in y.re around 0 11.9%
Final simplification11.9%
herbie shell --seed 2023194
(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)))))