
(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 19 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 (* y.im (log (hypot x.im x.re))))
(t_1 (log (hypot x.re x.im)))
(t_2 (exp (fma t_1 y.re (* (atan2 x.im x.re) (- y.im))))))
(if (<= y.im -2e+241)
(* t_2 (sin (fabs (fma y.re (atan2 x.im x.re) t_0))))
(if (<= y.im 8e-114)
(* t_2 (sin (fma t_1 y.im (* y.re (atan2 x.im x.re)))))
(if (<= y.im 1.22e+129)
(*
(exp
(-
(* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(* y.im (atan2 x.im x.re))))
(sin t_0))
(*
(atan2 x.im x.re)
(* y.re (pow (exp (- 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 = 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(fma(t_1, y_46_re, (atan2(x_46_im, x_46_re) * -y_46_im)));
double tmp;
if (y_46_im <= -2e+241) {
tmp = t_2 * sin(fabs(fma(y_46_re, atan2(x_46_im, x_46_re), t_0)));
} else if (y_46_im <= 8e-114) {
tmp = t_2 * sin(fma(t_1, y_46_im, (y_46_re * atan2(x_46_im, x_46_re))));
} else if (y_46_im <= 1.22e+129) {
tmp = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (y_46_im * atan2(x_46_im, x_46_re)))) * sin(t_0);
} else {
tmp = atan2(x_46_im, x_46_re) * (y_46_re * pow(exp(-y_46_im), 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 * log(hypot(x_46_im, x_46_re))) t_1 = log(hypot(x_46_re, x_46_im)) t_2 = exp(fma(t_1, y_46_re, Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))) tmp = 0.0 if (y_46_im <= -2e+241) tmp = Float64(t_2 * sin(abs(fma(y_46_re, atan(x_46_im, x_46_re), t_0)))); elseif (y_46_im <= 8e-114) tmp = Float64(t_2 * sin(fma(t_1, y_46_im, Float64(y_46_re * atan(x_46_im, x_46_re))))); elseif (y_46_im <= 1.22e+129) 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))))) - Float64(y_46_im * atan(x_46_im, x_46_re)))) * sin(t_0)); else tmp = Float64(atan(x_46_im, x_46_re) * Float64(y_46_re * (exp(Float64(-y_46_im)) ^ atan(x_46_im, x_46_re)))); 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[(t$95$1 * y$46$re + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$im, -2e+241], N[(t$95$2 * N[Sin[N[Abs[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision] + t$95$0), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 8e-114], N[(t$95$2 * N[Sin[N[(t$95$1 * y$46$im + N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 1.22e+129], 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] - N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision], N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[(y$46$re * N[Power[N[Exp[(-y$46$im)], $MachinePrecision], N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $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^{\mathsf{fma}\left(t_1, y.re, \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)\right)}\\
\mathbf{if}\;y.im \leq -2 \cdot 10^{+241}:\\
\;\;\;\;t_2 \cdot \sin \left(\left|\mathsf{fma}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}, t_0\right)\right|\right)\\
\mathbf{elif}\;y.im \leq 8 \cdot 10^{-114}:\\
\;\;\;\;t_2 \cdot \sin \left(\mathsf{fma}\left(t_1, y.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\\
\mathbf{elif}\;y.im \leq 1.22 \cdot 10^{+129}:\\
\;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \sin t_0\\
\mathbf{else}:\\
\;\;\;\;\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(y.re \cdot {\left(e^{-y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}\right)\\
\end{array}
\end{array}
if y.im < -2.0000000000000001e241Initial program 33.3%
cancel-sign-sub-inv33.3%
fma-def33.3%
hypot-def33.3%
distribute-lft-neg-in33.3%
distribute-rgt-neg-out33.3%
fma-def33.3%
hypot-def55.6%
*-commutative55.6%
Simplified55.6%
add-sqr-sqrt27.8%
sqrt-unprod0.0%
pow20.0%
fma-udef0.0%
*-commutative0.0%
*-commutative0.0%
fma-def0.0%
Applied egg-rr0.0%
unpow20.0%
rem-sqrt-square88.9%
hypot-def55.6%
unpow255.6%
unpow255.6%
+-commutative55.6%
*-commutative55.6%
fma-def55.6%
+-commutative55.6%
fma-def55.6%
unpow255.6%
unpow255.6%
hypot-def88.9%
Simplified88.9%
if -2.0000000000000001e241 < y.im < 8.0000000000000004e-114Initial program 44.1%
cancel-sign-sub-inv44.1%
fma-def44.1%
hypot-def44.1%
distribute-lft-neg-in44.1%
distribute-rgt-neg-out44.1%
fma-def44.1%
hypot-def85.6%
*-commutative85.6%
Simplified85.6%
if 8.0000000000000004e-114 < y.im < 1.2200000000000001e129Initial program 44.8%
Taylor expanded in y.re around 0 51.5%
unpow251.5%
unpow251.5%
hypot-def82.8%
Simplified82.8%
if 1.2200000000000001e129 < y.im Initial program 40.4%
Taylor expanded in y.im around 0 60.0%
Taylor expanded in y.re around 0 72.6%
associate-*r*72.6%
distribute-lft-neg-in72.6%
exp-prod74.6%
Simplified74.6%
Final simplification83.3%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.im (log (hypot x.im x.re))))
(t_1 (* (atan2 x.im x.re) (- y.im)))
(t_2 (log (hypot x.re x.im))))
(if (<= y.im -8.8e+240)
(* (sin (fabs (fma y.re (atan2 x.im x.re) t_0))) (exp t_1))
(if (<= y.im 1.55e-113)
(*
(exp (fma t_2 y.re t_1))
(sin (fma t_2 y.im (* y.re (atan2 x.im x.re)))))
(if (<= y.im 1.2e+129)
(*
(exp
(-
(* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(* y.im (atan2 x.im x.re))))
(sin t_0))
(*
(atan2 x.im x.re)
(* y.re (pow (exp (- 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 = y_46_im * log(hypot(x_46_im, x_46_re));
double t_1 = atan2(x_46_im, x_46_re) * -y_46_im;
double t_2 = log(hypot(x_46_re, x_46_im));
double tmp;
if (y_46_im <= -8.8e+240) {
tmp = sin(fabs(fma(y_46_re, atan2(x_46_im, x_46_re), t_0))) * exp(t_1);
} else if (y_46_im <= 1.55e-113) {
tmp = exp(fma(t_2, y_46_re, t_1)) * sin(fma(t_2, y_46_im, (y_46_re * atan2(x_46_im, x_46_re))));
} else if (y_46_im <= 1.2e+129) {
tmp = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (y_46_im * atan2(x_46_im, x_46_re)))) * sin(t_0);
} else {
tmp = atan2(x_46_im, x_46_re) * (y_46_re * pow(exp(-y_46_im), 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 * log(hypot(x_46_im, x_46_re))) t_1 = Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)) t_2 = log(hypot(x_46_re, x_46_im)) tmp = 0.0 if (y_46_im <= -8.8e+240) tmp = Float64(sin(abs(fma(y_46_re, atan(x_46_im, x_46_re), t_0))) * exp(t_1)); elseif (y_46_im <= 1.55e-113) tmp = Float64(exp(fma(t_2, y_46_re, t_1)) * sin(fma(t_2, y_46_im, Float64(y_46_re * atan(x_46_im, x_46_re))))); elseif (y_46_im <= 1.2e+129) 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))))) - Float64(y_46_im * atan(x_46_im, x_46_re)))) * sin(t_0)); else tmp = Float64(atan(x_46_im, x_46_re) * Float64(y_46_re * (exp(Float64(-y_46_im)) ^ atan(x_46_im, x_46_re)))); 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[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]}, Block[{t$95$2 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$im, -8.8e+240], N[(N[Sin[N[Abs[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision] + t$95$0), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * N[Exp[t$95$1], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 1.55e-113], N[(N[Exp[N[(t$95$2 * y$46$re + t$95$1), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(t$95$2 * y$46$im + N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 1.2e+129], 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] - N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision], N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[(y$46$re * N[Power[N[Exp[(-y$46$im)], $MachinePrecision], N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $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 := \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)\\
t_2 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
\mathbf{if}\;y.im \leq -8.8 \cdot 10^{+240}:\\
\;\;\;\;\sin \left(\left|\mathsf{fma}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}, t_0\right)\right|\right) \cdot e^{t_1}\\
\mathbf{elif}\;y.im \leq 1.55 \cdot 10^{-113}:\\
\;\;\;\;e^{\mathsf{fma}\left(t_2, y.re, t_1\right)} \cdot \sin \left(\mathsf{fma}\left(t_2, y.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\\
\mathbf{elif}\;y.im \leq 1.2 \cdot 10^{+129}:\\
\;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \sin t_0\\
\mathbf{else}:\\
\;\;\;\;\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(y.re \cdot {\left(e^{-y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}\right)\\
\end{array}
\end{array}
if y.im < -8.8000000000000006e240Initial program 33.3%
exp-diff27.8%
exp-to-pow27.8%
hypot-def27.8%
*-commutative27.8%
exp-prod27.8%
fma-def27.8%
hypot-def50.0%
*-commutative50.0%
Simplified50.0%
add-sqr-sqrt27.8%
sqrt-unprod0.0%
pow20.0%
fma-udef0.0%
*-commutative0.0%
*-commutative0.0%
fma-def0.0%
Applied egg-rr0.0%
unpow20.0%
rem-sqrt-square88.9%
hypot-def55.6%
unpow255.6%
unpow255.6%
+-commutative55.6%
*-commutative55.6%
fma-def55.6%
+-commutative55.6%
fma-def55.6%
unpow255.6%
unpow255.6%
hypot-def88.9%
Simplified72.2%
Taylor expanded in y.re around 0 83.5%
rec-exp55.6%
distribute-rgt-neg-in55.6%
Simplified83.5%
if -8.8000000000000006e240 < y.im < 1.55000000000000006e-113Initial program 44.1%
cancel-sign-sub-inv44.1%
fma-def44.1%
hypot-def44.1%
distribute-lft-neg-in44.1%
distribute-rgt-neg-out44.1%
fma-def44.1%
hypot-def85.6%
*-commutative85.6%
Simplified85.6%
if 1.55000000000000006e-113 < y.im < 1.1999999999999999e129Initial program 44.8%
Taylor expanded in y.re around 0 51.5%
unpow251.5%
unpow251.5%
hypot-def82.8%
Simplified82.8%
if 1.1999999999999999e129 < y.im Initial program 40.4%
Taylor expanded in y.im around 0 60.0%
Taylor expanded in y.re around 0 72.6%
associate-*r*72.6%
distribute-lft-neg-in72.6%
exp-prod74.6%
Simplified74.6%
Final simplification82.9%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re)))
(t_1
(exp
(fma (log (hypot x.re x.im)) y.re (* (atan2 x.im x.re) (- y.im))))))
(if (<= x.re -5e-309)
(* t_1 (sin (- t_0 (* y.im (log (/ -1.0 x.re))))))
(* t_1 (sin (+ t_0 (* y.im (log x.re))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = exp(fma(log(hypot(x_46_re, x_46_im)), y_46_re, (atan2(x_46_im, x_46_re) * -y_46_im)));
double tmp;
if (x_46_re <= -5e-309) {
tmp = t_1 * sin((t_0 - (y_46_im * log((-1.0 / x_46_re)))));
} else {
tmp = t_1 * sin((t_0 + (y_46_im * log(x_46_re))));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_1 = exp(fma(log(hypot(x_46_re, x_46_im)), y_46_re, Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))) tmp = 0.0 if (x_46_re <= -5e-309) tmp = Float64(t_1 * sin(Float64(t_0 - Float64(y_46_im * log(Float64(-1.0 / x_46_re)))))); else tmp = Float64(t_1 * sin(Float64(t_0 + 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$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Exp[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$re + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[x$46$re, -5e-309], N[(t$95$1 * N[Sin[N[(t$95$0 - N[(y$46$im * N[Log[N[(-1.0 / x$46$re), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[Sin[N[(t$95$0 + N[(y$46$im * N[Log[x$46$re], $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 := e^{\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.re, \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)\right)}\\
\mathbf{if}\;x.re \leq -5 \cdot 10^{-309}:\\
\;\;\;\;t_1 \cdot \sin \left(t_0 - y.im \cdot \log \left(\frac{-1}{x.re}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_1 \cdot \sin \left(t_0 + y.im \cdot \log x.re\right)\\
\end{array}
\end{array}
if x.re < -4.9999999999999995e-309Initial program 51.2%
cancel-sign-sub-inv51.2%
fma-def51.2%
hypot-def51.2%
distribute-lft-neg-in51.2%
distribute-rgt-neg-out51.2%
fma-def51.2%
hypot-def81.5%
*-commutative81.5%
Simplified81.5%
Taylor expanded in x.re around -inf 77.1%
+-commutative77.1%
mul-1-neg77.1%
unsub-neg77.1%
Simplified77.1%
if -4.9999999999999995e-309 < x.re Initial program 34.8%
cancel-sign-sub-inv34.8%
fma-def34.8%
hypot-def34.8%
distribute-lft-neg-in34.8%
distribute-rgt-neg-out34.8%
fma-def34.8%
hypot-def74.2%
*-commutative74.2%
Simplified74.2%
Taylor expanded in x.im around 0 76.1%
Final simplification76.6%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (or (<= y.re -6.8) (not (<= y.re 2.3e-5)))
(*
(exp
(-
(* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(* y.im (atan2 x.im x.re))))
(sin (* y.im (log (hypot x.im x.re)))))
(*
(sin (fma (log (hypot x.re x.im)) y.im (* y.re (atan2 x.im x.re))))
(exp (* (atan2 x.im x.re) (- y.im))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_re <= -6.8) || !(y_46_re <= 2.3e-5)) {
tmp = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (y_46_im * atan2(x_46_im, x_46_re)))) * sin((y_46_im * log(hypot(x_46_im, x_46_re))));
} else {
tmp = sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, (y_46_re * atan2(x_46_im, x_46_re)))) * exp((atan2(x_46_im, x_46_re) * -y_46_im));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if ((y_46_re <= -6.8) || !(y_46_re <= 2.3e-5)) 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))))) - Float64(y_46_im * atan(x_46_im, x_46_re)))) * sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re))))); else tmp = Float64(sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, Float64(y_46_re * atan(x_46_im, x_46_re)))) * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[Or[LessEqual[y$46$re, -6.8], N[Not[LessEqual[y$46$re, 2.3e-5]], $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] - N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Sin[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im + N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq -6.8 \lor \neg \left(y.re \leq 2.3 \cdot 10^{-5}\right):\\
\;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\
\end{array}
\end{array}
if y.re < -6.79999999999999982 or 2.3e-5 < y.re Initial program 42.5%
Taylor expanded in y.re around 0 44.0%
unpow244.0%
unpow244.0%
hypot-def77.0%
Simplified77.0%
if -6.79999999999999982 < y.re < 2.3e-5Initial program 43.1%
exp-diff43.1%
exp-to-pow43.1%
hypot-def43.1%
*-commutative43.1%
exp-prod42.5%
fma-def42.5%
hypot-def77.3%
*-commutative77.3%
Simplified77.3%
Taylor expanded in y.re around 0 77.2%
rec-exp77.2%
distribute-rgt-neg-in77.2%
Simplified77.2%
Final simplification77.1%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.im (log (hypot x.im x.re))))
(t_1
(*
(exp
(-
(* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(* y.im (atan2 x.im x.re))))
(sin (* y.re (atan2 x.im x.re)))))
(t_2 (pow (hypot x.im x.re) y.re))
(t_3 (* (sin t_0) t_2)))
(if (<= y.im -9e+161)
(* y.re (* (atan2 x.im x.re) (exp (* (atan2 x.im x.re) (- y.im)))))
(if (<= y.im -1.8e+16)
t_1
(if (<= y.im 6e-155)
(* t_2 (sin (fma y.re (atan2 x.im x.re) t_0)))
(if (<= y.im 11500000000000.0)
t_3
(if (<= y.im 4.2e+113)
t_1
(if (<= y.im 5.5e+128)
t_3
(*
(atan2 x.im x.re)
(* y.re (pow (exp (- 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 = y_46_im * log(hypot(x_46_im, x_46_re));
double t_1 = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (y_46_im * atan2(x_46_im, x_46_re)))) * sin((y_46_re * atan2(x_46_im, x_46_re)));
double t_2 = pow(hypot(x_46_im, x_46_re), y_46_re);
double t_3 = sin(t_0) * t_2;
double tmp;
if (y_46_im <= -9e+161) {
tmp = y_46_re * (atan2(x_46_im, x_46_re) * exp((atan2(x_46_im, x_46_re) * -y_46_im)));
} else if (y_46_im <= -1.8e+16) {
tmp = t_1;
} else if (y_46_im <= 6e-155) {
tmp = t_2 * sin(fma(y_46_re, atan2(x_46_im, x_46_re), t_0));
} else if (y_46_im <= 11500000000000.0) {
tmp = t_3;
} else if (y_46_im <= 4.2e+113) {
tmp = t_1;
} else if (y_46_im <= 5.5e+128) {
tmp = t_3;
} else {
tmp = atan2(x_46_im, x_46_re) * (y_46_re * pow(exp(-y_46_im), 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 * log(hypot(x_46_im, x_46_re))) t_1 = Float64(exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - Float64(y_46_im * atan(x_46_im, x_46_re)))) * sin(Float64(y_46_re * atan(x_46_im, x_46_re)))) t_2 = hypot(x_46_im, x_46_re) ^ y_46_re t_3 = Float64(sin(t_0) * t_2) tmp = 0.0 if (y_46_im <= -9e+161) tmp = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))))); elseif (y_46_im <= -1.8e+16) tmp = t_1; elseif (y_46_im <= 6e-155) tmp = Float64(t_2 * sin(fma(y_46_re, atan(x_46_im, x_46_re), t_0))); elseif (y_46_im <= 11500000000000.0) tmp = t_3; elseif (y_46_im <= 4.2e+113) tmp = t_1; elseif (y_46_im <= 5.5e+128) tmp = t_3; else tmp = Float64(atan(x_46_im, x_46_re) * Float64(y_46_re * (exp(Float64(-y_46_im)) ^ atan(x_46_im, x_46_re)))); 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[(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] - N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, Block[{t$95$3 = N[(N[Sin[t$95$0], $MachinePrecision] * t$95$2), $MachinePrecision]}, If[LessEqual[y$46$im, -9e+161], N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, -1.8e+16], t$95$1, If[LessEqual[y$46$im, 6e-155], N[(t$95$2 * N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision] + t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 11500000000000.0], t$95$3, If[LessEqual[y$46$im, 4.2e+113], t$95$1, If[LessEqual[y$46$im, 5.5e+128], t$95$3, N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[(y$46$re * N[Power[N[Exp[(-y$46$im)], $MachinePrecision], N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $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 := e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
t_2 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
t_3 := \sin t_0 \cdot t_2\\
\mathbf{if}\;y.im \leq -9 \cdot 10^{+161}:\\
\;\;\;\;y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\right)\\
\mathbf{elif}\;y.im \leq -1.8 \cdot 10^{+16}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y.im \leq 6 \cdot 10^{-155}:\\
\;\;\;\;t_2 \cdot \sin \left(\mathsf{fma}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}, t_0\right)\right)\\
\mathbf{elif}\;y.im \leq 11500000000000:\\
\;\;\;\;t_3\\
\mathbf{elif}\;y.im \leq 4.2 \cdot 10^{+113}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y.im \leq 5.5 \cdot 10^{+128}:\\
\;\;\;\;t_3\\
\mathbf{else}:\\
\;\;\;\;\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(y.re \cdot {\left(e^{-y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}\right)\\
\end{array}
\end{array}
if y.im < -8.99999999999999984e161Initial program 30.2%
Taylor expanded in y.im around 0 56.3%
Taylor expanded in y.re around 0 70.8%
*-commutative70.8%
distribute-lft-neg-in70.8%
Simplified70.8%
if -8.99999999999999984e161 < y.im < -1.8e16 or 1.15e13 < y.im < 4.1999999999999998e113Initial program 51.9%
Taylor expanded in y.im around 0 65.4%
if -1.8e16 < y.im < 5.99999999999999967e-155Initial program 44.6%
exp-diff44.6%
exp-to-pow44.6%
hypot-def44.6%
*-commutative44.6%
exp-prod44.6%
fma-def44.6%
hypot-def91.1%
*-commutative91.1%
Simplified91.1%
Taylor expanded in y.im around 0 67.3%
unpow267.3%
unpow267.3%
hypot-def91.5%
Simplified91.5%
Taylor expanded in y.im around 0 43.9%
+-commutative43.9%
fma-def43.9%
unpow243.9%
unpow243.9%
hypot-def91.5%
Simplified91.5%
if 5.99999999999999967e-155 < y.im < 1.15e13 or 4.1999999999999998e113 < y.im < 5.4999999999999998e128Initial program 37.9%
exp-diff34.4%
exp-to-pow34.4%
hypot-def34.4%
*-commutative34.4%
exp-prod34.4%
fma-def34.4%
hypot-def68.9%
*-commutative68.9%
Simplified68.9%
Taylor expanded in y.im around 0 59.1%
unpow259.1%
unpow259.1%
hypot-def69.0%
Simplified69.0%
Taylor expanded in y.re around 0 44.9%
unpow244.9%
unpow244.9%
hypot-def93.2%
Simplified93.2%
if 5.4999999999999998e128 < y.im Initial program 40.4%
Taylor expanded in y.im around 0 60.0%
Taylor expanded in y.re around 0 72.6%
associate-*r*72.6%
distribute-lft-neg-in72.6%
exp-prod74.6%
Simplified74.6%
Final simplification80.0%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (pow (hypot x.im x.re) y.re))
(t_1 (* (sin (* y.im (log (hypot x.im x.re)))) t_0))
(t_2 (* y.re (atan2 x.im x.re)))
(t_3
(*
(exp
(-
(* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(* y.im (atan2 x.im x.re))))
(sin t_2))))
(if (<= y.im -4.8e+160)
(* y.re (* (atan2 x.im x.re) (exp (* (atan2 x.im x.re) (- y.im)))))
(if (<= y.im -4e+16)
t_3
(if (<= y.im 1.8e-153)
(* (sin (fma (log (hypot x.re x.im)) y.im t_2)) t_0)
(if (<= y.im 16000000000000.0)
t_1
(if (<= y.im 1.45e+113)
t_3
(if (<= y.im 5.5e+128)
t_1
(*
(atan2 x.im x.re)
(* y.re (pow (exp (- 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 = pow(hypot(x_46_im, x_46_re), y_46_re);
double t_1 = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) * t_0;
double t_2 = y_46_re * atan2(x_46_im, x_46_re);
double t_3 = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (y_46_im * atan2(x_46_im, x_46_re)))) * sin(t_2);
double tmp;
if (y_46_im <= -4.8e+160) {
tmp = y_46_re * (atan2(x_46_im, x_46_re) * exp((atan2(x_46_im, x_46_re) * -y_46_im)));
} else if (y_46_im <= -4e+16) {
tmp = t_3;
} else if (y_46_im <= 1.8e-153) {
tmp = sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_2)) * t_0;
} else if (y_46_im <= 16000000000000.0) {
tmp = t_1;
} else if (y_46_im <= 1.45e+113) {
tmp = t_3;
} else if (y_46_im <= 5.5e+128) {
tmp = t_1;
} else {
tmp = atan2(x_46_im, x_46_re) * (y_46_re * pow(exp(-y_46_im), 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 = hypot(x_46_im, x_46_re) ^ y_46_re t_1 = Float64(sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) * t_0) t_2 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_3 = Float64(exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - Float64(y_46_im * atan(x_46_im, x_46_re)))) * sin(t_2)) tmp = 0.0 if (y_46_im <= -4.8e+160) tmp = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))))); elseif (y_46_im <= -4e+16) tmp = t_3; elseif (y_46_im <= 1.8e-153) tmp = Float64(sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_2)) * t_0); elseif (y_46_im <= 16000000000000.0) tmp = t_1; elseif (y_46_im <= 1.45e+113) tmp = t_3; elseif (y_46_im <= 5.5e+128) tmp = t_1; else tmp = Float64(atan(x_46_im, x_46_re) * Float64(y_46_re * (exp(Float64(-y_46_im)) ^ atan(x_46_im, x_46_re)))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, Block[{t$95$1 = N[(N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$0), $MachinePrecision]}, Block[{t$95$2 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[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] - N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[t$95$2], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -4.8e+160], N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, -4e+16], t$95$3, If[LessEqual[y$46$im, 1.8e-153], N[(N[Sin[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im + t$95$2), $MachinePrecision]], $MachinePrecision] * t$95$0), $MachinePrecision], If[LessEqual[y$46$im, 16000000000000.0], t$95$1, If[LessEqual[y$46$im, 1.45e+113], t$95$3, If[LessEqual[y$46$im, 5.5e+128], t$95$1, N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[(y$46$re * N[Power[N[Exp[(-y$46$im)], $MachinePrecision], N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
t_1 := \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \cdot t_0\\
t_2 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_3 := e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \sin t_2\\
\mathbf{if}\;y.im \leq -4.8 \cdot 10^{+160}:\\
\;\;\;\;y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\right)\\
\mathbf{elif}\;y.im \leq -4 \cdot 10^{+16}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;y.im \leq 1.8 \cdot 10^{-153}:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, t_2\right)\right) \cdot t_0\\
\mathbf{elif}\;y.im \leq 16000000000000:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y.im \leq 1.45 \cdot 10^{+113}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;y.im \leq 5.5 \cdot 10^{+128}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(y.re \cdot {\left(e^{-y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}\right)\\
\end{array}
\end{array}
if y.im < -4.8000000000000003e160Initial program 30.2%
Taylor expanded in y.im around 0 56.3%
Taylor expanded in y.re around 0 70.8%
*-commutative70.8%
distribute-lft-neg-in70.8%
Simplified70.8%
if -4.8000000000000003e160 < y.im < -4e16 or 1.6e13 < y.im < 1.44999999999999992e113Initial program 51.9%
Taylor expanded in y.im around 0 65.4%
if -4e16 < y.im < 1.7999999999999999e-153Initial program 44.6%
exp-diff44.6%
exp-to-pow44.6%
hypot-def44.6%
*-commutative44.6%
exp-prod44.6%
fma-def44.6%
hypot-def91.1%
*-commutative91.1%
Simplified91.1%
Taylor expanded in y.im around 0 67.3%
unpow267.3%
unpow267.3%
hypot-def91.5%
Simplified91.5%
if 1.7999999999999999e-153 < y.im < 1.6e13 or 1.44999999999999992e113 < y.im < 5.4999999999999998e128Initial program 37.9%
exp-diff34.4%
exp-to-pow34.4%
hypot-def34.4%
*-commutative34.4%
exp-prod34.4%
fma-def34.4%
hypot-def68.9%
*-commutative68.9%
Simplified68.9%
Taylor expanded in y.im around 0 59.1%
unpow259.1%
unpow259.1%
hypot-def69.0%
Simplified69.0%
Taylor expanded in y.re around 0 44.9%
unpow244.9%
unpow244.9%
hypot-def93.2%
Simplified93.2%
if 5.4999999999999998e128 < y.im Initial program 40.4%
Taylor expanded in y.im around 0 60.0%
Taylor expanded in y.re around 0 72.6%
associate-*r*72.6%
distribute-lft-neg-in72.6%
exp-prod74.6%
Simplified74.6%
Final simplification80.0%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re))))
(if (<= y.re -6.8)
(*
(exp
(-
(* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(* y.im (atan2 x.im x.re))))
(sin t_0))
(if (<= y.re 72000000.0)
(*
(sin (fma (log (hypot x.re x.im)) y.im t_0))
(exp (* (atan2 x.im x.re) (- y.im))))
(*
(pow (hypot x.im x.re) y.re)
(log1p (expm1 (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 tmp;
if (y_46_re <= -6.8) {
tmp = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (y_46_im * atan2(x_46_im, x_46_re)))) * sin(t_0);
} else if (y_46_re <= 72000000.0) {
tmp = sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_0)) * exp((atan2(x_46_im, x_46_re) * -y_46_im));
} else {
tmp = pow(hypot(x_46_im, x_46_re), y_46_re) * log1p(expm1(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)) tmp = 0.0 if (y_46_re <= -6.8) 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))))) - Float64(y_46_im * atan(x_46_im, x_46_re)))) * sin(t_0)); elseif (y_46_re <= 72000000.0) tmp = Float64(sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_0)) * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))); else tmp = Float64((hypot(x_46_im, x_46_re) ^ y_46_re) * log1p(expm1(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]}, If[LessEqual[y$46$re, -6.8], 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] - N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 72000000.0], N[(N[Sin[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im + t$95$0), $MachinePrecision]], $MachinePrecision] * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * N[Log[1 + N[(Exp[N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]] - 1), $MachinePrecision]], $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 -6.8:\\
\;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \sin t_0\\
\mathbf{elif}\;y.re \leq 72000000:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, t_0\right)\right) \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\
\mathbf{else}:\\
\;\;\;\;{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \cdot \mathsf{log1p}\left(\mathsf{expm1}\left(\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\right)\right)\\
\end{array}
\end{array}
if y.re < -6.79999999999999982Initial program 58.9%
Taylor expanded in y.im around 0 84.1%
if -6.79999999999999982 < y.re < 7.2e7Initial program 43.3%
exp-diff42.5%
exp-to-pow42.5%
hypot-def42.5%
*-commutative42.5%
exp-prod42.0%
fma-def42.0%
hypot-def75.6%
*-commutative75.6%
Simplified75.6%
Taylor expanded in y.re around 0 75.8%
rec-exp75.8%
distribute-rgt-neg-in75.8%
Simplified75.8%
if 7.2e7 < y.re Initial program 29.7%
exp-diff18.9%
exp-to-pow18.9%
hypot-def18.9%
*-commutative18.9%
exp-prod16.2%
fma-def16.2%
hypot-def45.9%
*-commutative45.9%
Simplified45.9%
add-sqr-sqrt29.7%
sqrt-unprod27.0%
pow227.0%
fma-udef27.0%
*-commutative27.0%
*-commutative27.0%
fma-def27.0%
Applied egg-rr20.3%
unpow227.0%
rem-sqrt-square58.1%
hypot-def27.0%
unpow227.0%
unpow227.0%
+-commutative27.0%
*-commutative27.0%
fma-def27.0%
+-commutative27.0%
fma-def27.0%
unpow227.0%
unpow227.0%
hypot-def58.1%
Simplified37.8%
add-sqr-sqrt17.6%
fabs-sqr17.6%
add-sqr-sqrt45.9%
fma-udef45.9%
*-commutative45.9%
+-commutative45.9%
*-commutative45.9%
hypot-udef16.2%
+-commutative16.2%
hypot-udef45.9%
*-commutative45.9%
fma-udef45.9%
log1p-expm1-u45.9%
Applied egg-rr45.9%
Taylor expanded in y.im around 0 62.3%
unpow262.3%
unpow262.3%
hypot-def62.3%
Simplified62.3%
Taylor expanded in y.re around 0 28.4%
unpow228.4%
unpow228.4%
hypot-def67.7%
Simplified67.7%
Final simplification75.3%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (sin (* y.im (log (hypot x.im x.re)))))
(t_1 (sin (* y.re (atan2 x.im x.re))))
(t_2
(*
(exp
(-
(* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(* y.im (atan2 x.im x.re))))
t_1))
(t_3 (pow (hypot x.im x.re) y.re))
(t_4 (* t_0 t_3)))
(if (<= y.im -5.2e+160)
(* y.re (* (atan2 x.im x.re) (exp (* (atan2 x.im x.re) (- y.im)))))
(if (<= y.im -3.6e+16)
t_2
(if (<= y.im -7.2e-272)
(* t_3 (log1p (expm1 t_0)))
(if (<= y.im 1.1e-201)
(* t_1 t_3)
(if (<= y.im 42000000000000.0)
t_4
(if (<= y.im 5e+113)
t_2
(if (<= y.im 7e+128)
t_4
(*
(atan2 x.im x.re)
(* y.re (pow (exp (- 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 = sin((y_46_im * log(hypot(x_46_im, x_46_re))));
double t_1 = sin((y_46_re * atan2(x_46_im, x_46_re)));
double t_2 = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (y_46_im * atan2(x_46_im, x_46_re)))) * t_1;
double t_3 = pow(hypot(x_46_im, x_46_re), y_46_re);
double t_4 = t_0 * t_3;
double tmp;
if (y_46_im <= -5.2e+160) {
tmp = y_46_re * (atan2(x_46_im, x_46_re) * exp((atan2(x_46_im, x_46_re) * -y_46_im)));
} else if (y_46_im <= -3.6e+16) {
tmp = t_2;
} else if (y_46_im <= -7.2e-272) {
tmp = t_3 * log1p(expm1(t_0));
} else if (y_46_im <= 1.1e-201) {
tmp = t_1 * t_3;
} else if (y_46_im <= 42000000000000.0) {
tmp = t_4;
} else if (y_46_im <= 5e+113) {
tmp = t_2;
} else if (y_46_im <= 7e+128) {
tmp = t_4;
} else {
tmp = atan2(x_46_im, x_46_re) * (y_46_re * pow(exp(-y_46_im), 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 = Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re))));
double t_1 = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
double t_2 = Math.exp(((y_46_re * Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (y_46_im * Math.atan2(x_46_im, x_46_re)))) * t_1;
double t_3 = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
double t_4 = t_0 * t_3;
double tmp;
if (y_46_im <= -5.2e+160) {
tmp = y_46_re * (Math.atan2(x_46_im, x_46_re) * Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im)));
} else if (y_46_im <= -3.6e+16) {
tmp = t_2;
} else if (y_46_im <= -7.2e-272) {
tmp = t_3 * Math.log1p(Math.expm1(t_0));
} else if (y_46_im <= 1.1e-201) {
tmp = t_1 * t_3;
} else if (y_46_im <= 42000000000000.0) {
tmp = t_4;
} else if (y_46_im <= 5e+113) {
tmp = t_2;
} else if (y_46_im <= 7e+128) {
tmp = t_4;
} else {
tmp = Math.atan2(x_46_im, x_46_re) * (y_46_re * Math.pow(Math.exp(-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.sin((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) t_1 = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) t_2 = math.exp(((y_46_re * math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (y_46_im * math.atan2(x_46_im, x_46_re)))) * t_1 t_3 = math.pow(math.hypot(x_46_im, x_46_re), y_46_re) t_4 = t_0 * t_3 tmp = 0 if y_46_im <= -5.2e+160: tmp = y_46_re * (math.atan2(x_46_im, x_46_re) * math.exp((math.atan2(x_46_im, x_46_re) * -y_46_im))) elif y_46_im <= -3.6e+16: tmp = t_2 elif y_46_im <= -7.2e-272: tmp = t_3 * math.log1p(math.expm1(t_0)) elif y_46_im <= 1.1e-201: tmp = t_1 * t_3 elif y_46_im <= 42000000000000.0: tmp = t_4 elif y_46_im <= 5e+113: tmp = t_2 elif y_46_im <= 7e+128: tmp = t_4 else: tmp = math.atan2(x_46_im, x_46_re) * (y_46_re * math.pow(math.exp(-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 = sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) t_1 = sin(Float64(y_46_re * atan(x_46_im, x_46_re))) t_2 = Float64(exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - Float64(y_46_im * atan(x_46_im, x_46_re)))) * t_1) t_3 = hypot(x_46_im, x_46_re) ^ y_46_re t_4 = Float64(t_0 * t_3) tmp = 0.0 if (y_46_im <= -5.2e+160) tmp = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))))); elseif (y_46_im <= -3.6e+16) tmp = t_2; elseif (y_46_im <= -7.2e-272) tmp = Float64(t_3 * log1p(expm1(t_0))); elseif (y_46_im <= 1.1e-201) tmp = Float64(t_1 * t_3); elseif (y_46_im <= 42000000000000.0) tmp = t_4; elseif (y_46_im <= 5e+113) tmp = t_2; elseif (y_46_im <= 7e+128) tmp = t_4; else tmp = Float64(atan(x_46_im, x_46_re) * Float64(y_46_re * (exp(Float64(-y_46_im)) ^ atan(x_46_im, x_46_re)))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = 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$1 = N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = 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] - N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, Block[{t$95$4 = N[(t$95$0 * t$95$3), $MachinePrecision]}, If[LessEqual[y$46$im, -5.2e+160], N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, -3.6e+16], t$95$2, If[LessEqual[y$46$im, -7.2e-272], N[(t$95$3 * N[Log[1 + N[(Exp[t$95$0] - 1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 1.1e-201], N[(t$95$1 * t$95$3), $MachinePrecision], If[LessEqual[y$46$im, 42000000000000.0], t$95$4, If[LessEqual[y$46$im, 5e+113], t$95$2, If[LessEqual[y$46$im, 7e+128], t$95$4, N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[(y$46$re * N[Power[N[Exp[(-y$46$im)], $MachinePrecision], N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
t_1 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
t_2 := e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot t_1\\
t_3 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
t_4 := t_0 \cdot t_3\\
\mathbf{if}\;y.im \leq -5.2 \cdot 10^{+160}:\\
\;\;\;\;y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\right)\\
\mathbf{elif}\;y.im \leq -3.6 \cdot 10^{+16}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y.im \leq -7.2 \cdot 10^{-272}:\\
\;\;\;\;t_3 \cdot \mathsf{log1p}\left(\mathsf{expm1}\left(t_0\right)\right)\\
\mathbf{elif}\;y.im \leq 1.1 \cdot 10^{-201}:\\
\;\;\;\;t_1 \cdot t_3\\
\mathbf{elif}\;y.im \leq 42000000000000:\\
\;\;\;\;t_4\\
\mathbf{elif}\;y.im \leq 5 \cdot 10^{+113}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y.im \leq 7 \cdot 10^{+128}:\\
\;\;\;\;t_4\\
\mathbf{else}:\\
\;\;\;\;\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(y.re \cdot {\left(e^{-y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}\right)\\
\end{array}
\end{array}
if y.im < -5.2000000000000001e160Initial program 30.2%
Taylor expanded in y.im around 0 56.3%
Taylor expanded in y.re around 0 70.8%
*-commutative70.8%
distribute-lft-neg-in70.8%
Simplified70.8%
if -5.2000000000000001e160 < y.im < -3.6e16 or 4.2e13 < y.im < 5e113Initial program 51.9%
Taylor expanded in y.im around 0 65.4%
if -3.6e16 < y.im < -7.19999999999999937e-272Initial program 48.6%
exp-diff48.6%
exp-to-pow48.6%
hypot-def48.6%
*-commutative48.6%
exp-prod48.6%
fma-def48.6%
hypot-def91.1%
*-commutative91.1%
Simplified91.1%
add-sqr-sqrt39.4%
sqrt-unprod39.3%
pow239.3%
fma-udef39.3%
*-commutative39.3%
*-commutative39.3%
fma-def39.3%
Applied egg-rr39.3%
unpow239.3%
rem-sqrt-square53.2%
hypot-def34.4%
unpow234.4%
unpow234.4%
+-commutative34.4%
*-commutative34.4%
fma-def34.4%
+-commutative34.4%
fma-def34.4%
unpow234.4%
unpow234.4%
hypot-def53.2%
Simplified53.2%
add-sqr-sqrt39.4%
fabs-sqr39.4%
add-sqr-sqrt91.0%
fma-udef91.1%
*-commutative91.1%
+-commutative91.1%
*-commutative91.1%
hypot-udef48.6%
+-commutative48.6%
hypot-udef91.1%
*-commutative91.1%
fma-udef91.1%
log1p-expm1-u91.1%
Applied egg-rr91.0%
Taylor expanded in y.im around 0 70.0%
unpow270.0%
unpow270.0%
hypot-def91.8%
Simplified91.7%
Taylor expanded in y.re around 0 38.3%
unpow238.3%
unpow238.3%
hypot-def80.8%
Simplified80.8%
if -7.19999999999999937e-272 < y.im < 1.1e-201Initial program 38.5%
Taylor expanded in y.im around 0 62.9%
Taylor expanded in y.im around 0 62.9%
unpow262.9%
unpow262.9%
hypot-def88.2%
Simplified88.2%
if 1.1e-201 < y.im < 4.2e13 or 5e113 < y.im < 6.99999999999999937e128Initial program 37.8%
exp-diff35.1%
exp-to-pow35.1%
hypot-def35.1%
*-commutative35.1%
exp-prod35.1%
fma-def35.1%
hypot-def72.9%
*-commutative72.9%
Simplified72.9%
Taylor expanded in y.im around 0 60.0%
unpow260.0%
unpow260.0%
hypot-def73.0%
Simplified73.0%
Taylor expanded in y.re around 0 43.1%
unpow243.1%
unpow243.1%
hypot-def86.7%
Simplified86.7%
if 6.99999999999999937e128 < y.im Initial program 40.4%
Taylor expanded in y.im around 0 60.0%
Taylor expanded in y.re around 0 72.6%
associate-*r*72.6%
distribute-lft-neg-in72.6%
exp-prod74.6%
Simplified74.6%
Final simplification76.5%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (pow (hypot x.im x.re) y.re))
(t_1 (* (sin (* y.im (log (hypot x.im x.re)))) t_0))
(t_2 (sin (* y.re (atan2 x.im x.re))))
(t_3
(*
(exp
(-
(* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(* y.im (atan2 x.im x.re))))
t_2)))
(if (<= y.im -2e+161)
(* y.re (* (atan2 x.im x.re) (exp (* (atan2 x.im x.re) (- y.im)))))
(if (<= y.im -1.76e+16)
t_3
(if (<= y.im -4.4e-273)
t_1
(if (<= y.im 1.65e-198)
(* t_2 t_0)
(if (<= y.im 11500000000000.0)
t_1
(if (<= y.im 5.7e+113)
t_3
(if (<= y.im 6e+128)
t_1
(*
(atan2 x.im x.re)
(* y.re (pow (exp (- 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 = pow(hypot(x_46_im, x_46_re), y_46_re);
double t_1 = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) * t_0;
double t_2 = sin((y_46_re * atan2(x_46_im, x_46_re)));
double t_3 = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (y_46_im * atan2(x_46_im, x_46_re)))) * t_2;
double tmp;
if (y_46_im <= -2e+161) {
tmp = y_46_re * (atan2(x_46_im, x_46_re) * exp((atan2(x_46_im, x_46_re) * -y_46_im)));
} else if (y_46_im <= -1.76e+16) {
tmp = t_3;
} else if (y_46_im <= -4.4e-273) {
tmp = t_1;
} else if (y_46_im <= 1.65e-198) {
tmp = t_2 * t_0;
} else if (y_46_im <= 11500000000000.0) {
tmp = t_1;
} else if (y_46_im <= 5.7e+113) {
tmp = t_3;
} else if (y_46_im <= 6e+128) {
tmp = t_1;
} else {
tmp = atan2(x_46_im, x_46_re) * (y_46_re * pow(exp(-y_46_im), 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 = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
double t_1 = Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re)))) * t_0;
double t_2 = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
double t_3 = Math.exp(((y_46_re * Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (y_46_im * Math.atan2(x_46_im, x_46_re)))) * t_2;
double tmp;
if (y_46_im <= -2e+161) {
tmp = y_46_re * (Math.atan2(x_46_im, x_46_re) * Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im)));
} else if (y_46_im <= -1.76e+16) {
tmp = t_3;
} else if (y_46_im <= -4.4e-273) {
tmp = t_1;
} else if (y_46_im <= 1.65e-198) {
tmp = t_2 * t_0;
} else if (y_46_im <= 11500000000000.0) {
tmp = t_1;
} else if (y_46_im <= 5.7e+113) {
tmp = t_3;
} else if (y_46_im <= 6e+128) {
tmp = t_1;
} else {
tmp = Math.atan2(x_46_im, x_46_re) * (y_46_re * Math.pow(Math.exp(-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.pow(math.hypot(x_46_im, x_46_re), y_46_re) t_1 = math.sin((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) * t_0 t_2 = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) t_3 = math.exp(((y_46_re * math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (y_46_im * math.atan2(x_46_im, x_46_re)))) * t_2 tmp = 0 if y_46_im <= -2e+161: tmp = y_46_re * (math.atan2(x_46_im, x_46_re) * math.exp((math.atan2(x_46_im, x_46_re) * -y_46_im))) elif y_46_im <= -1.76e+16: tmp = t_3 elif y_46_im <= -4.4e-273: tmp = t_1 elif y_46_im <= 1.65e-198: tmp = t_2 * t_0 elif y_46_im <= 11500000000000.0: tmp = t_1 elif y_46_im <= 5.7e+113: tmp = t_3 elif y_46_im <= 6e+128: tmp = t_1 else: tmp = math.atan2(x_46_im, x_46_re) * (y_46_re * math.pow(math.exp(-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 = hypot(x_46_im, x_46_re) ^ y_46_re t_1 = Float64(sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) * t_0) t_2 = sin(Float64(y_46_re * atan(x_46_im, x_46_re))) t_3 = Float64(exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - Float64(y_46_im * atan(x_46_im, x_46_re)))) * t_2) tmp = 0.0 if (y_46_im <= -2e+161) tmp = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))))); elseif (y_46_im <= -1.76e+16) tmp = t_3; elseif (y_46_im <= -4.4e-273) tmp = t_1; elseif (y_46_im <= 1.65e-198) tmp = Float64(t_2 * t_0); elseif (y_46_im <= 11500000000000.0) tmp = t_1; elseif (y_46_im <= 5.7e+113) tmp = t_3; elseif (y_46_im <= 6e+128) tmp = t_1; else tmp = Float64(atan(x_46_im, x_46_re) * Float64(y_46_re * (exp(Float64(-y_46_im)) ^ atan(x_46_im, x_46_re)))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = hypot(x_46_im, x_46_re) ^ y_46_re; t_1 = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) * t_0; t_2 = sin((y_46_re * atan2(x_46_im, x_46_re))); t_3 = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (y_46_im * atan2(x_46_im, x_46_re)))) * t_2; tmp = 0.0; if (y_46_im <= -2e+161) tmp = y_46_re * (atan2(x_46_im, x_46_re) * exp((atan2(x_46_im, x_46_re) * -y_46_im))); elseif (y_46_im <= -1.76e+16) tmp = t_3; elseif (y_46_im <= -4.4e-273) tmp = t_1; elseif (y_46_im <= 1.65e-198) tmp = t_2 * t_0; elseif (y_46_im <= 11500000000000.0) tmp = t_1; elseif (y_46_im <= 5.7e+113) tmp = t_3; elseif (y_46_im <= 6e+128) tmp = t_1; else tmp = atan2(x_46_im, x_46_re) * (y_46_re * (exp(-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[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, Block[{t$95$1 = N[(N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$0), $MachinePrecision]}, Block[{t$95$2 = N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = 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] - N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$2), $MachinePrecision]}, If[LessEqual[y$46$im, -2e+161], N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, -1.76e+16], t$95$3, If[LessEqual[y$46$im, -4.4e-273], t$95$1, If[LessEqual[y$46$im, 1.65e-198], N[(t$95$2 * t$95$0), $MachinePrecision], If[LessEqual[y$46$im, 11500000000000.0], t$95$1, If[LessEqual[y$46$im, 5.7e+113], t$95$3, If[LessEqual[y$46$im, 6e+128], t$95$1, N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[(y$46$re * N[Power[N[Exp[(-y$46$im)], $MachinePrecision], N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
t_1 := \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \cdot t_0\\
t_2 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
t_3 := e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot t_2\\
\mathbf{if}\;y.im \leq -2 \cdot 10^{+161}:\\
\;\;\;\;y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\right)\\
\mathbf{elif}\;y.im \leq -1.76 \cdot 10^{+16}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;y.im \leq -4.4 \cdot 10^{-273}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y.im \leq 1.65 \cdot 10^{-198}:\\
\;\;\;\;t_2 \cdot t_0\\
\mathbf{elif}\;y.im \leq 11500000000000:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y.im \leq 5.7 \cdot 10^{+113}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;y.im \leq 6 \cdot 10^{+128}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(y.re \cdot {\left(e^{-y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}\right)\\
\end{array}
\end{array}
if y.im < -2.0000000000000001e161Initial program 30.2%
Taylor expanded in y.im around 0 56.3%
Taylor expanded in y.re around 0 70.8%
*-commutative70.8%
distribute-lft-neg-in70.8%
Simplified70.8%
if -2.0000000000000001e161 < y.im < -1.76e16 or 1.15e13 < y.im < 5.6999999999999998e113Initial program 51.9%
Taylor expanded in y.im around 0 65.4%
if -1.76e16 < y.im < -4.39999999999999959e-273 or 1.65e-198 < y.im < 1.15e13 or 5.6999999999999998e113 < y.im < 5.9999999999999997e128Initial program 44.2%
exp-diff43.2%
exp-to-pow43.2%
hypot-def43.2%
*-commutative43.2%
exp-prod43.2%
fma-def43.2%
hypot-def83.8%
*-commutative83.8%
Simplified83.8%
Taylor expanded in y.im around 0 66.0%
unpow266.0%
unpow266.0%
hypot-def84.2%
Simplified84.2%
Taylor expanded in y.re around 0 40.2%
unpow240.2%
unpow240.2%
hypot-def83.2%
Simplified83.2%
if -4.39999999999999959e-273 < y.im < 1.65e-198Initial program 38.5%
Taylor expanded in y.im around 0 62.9%
Taylor expanded in y.im around 0 62.9%
unpow262.9%
unpow262.9%
hypot-def88.2%
Simplified88.2%
if 5.9999999999999997e128 < y.im Initial program 40.4%
Taylor expanded in y.im around 0 60.0%
Taylor expanded in y.re around 0 72.6%
associate-*r*72.6%
distribute-lft-neg-in72.6%
exp-prod74.6%
Simplified74.6%
Final simplification76.5%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (pow (hypot x.im x.re) y.re))
(t_1 (* (sin (* y.im (log (hypot x.im x.re)))) t_0)))
(if (<= y.im -1.45e+54)
(* y.re (* (atan2 x.im x.re) (exp (* (atan2 x.im x.re) (- y.im)))))
(if (<= y.im -7e-272)
t_1
(if (<= y.im 3.6e-199)
(* (sin (* y.re (atan2 x.im x.re))) t_0)
(if (<= y.im 5.8e+128)
t_1
(*
(atan2 x.im x.re)
(* y.re (pow (exp (- 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 = pow(hypot(x_46_im, x_46_re), y_46_re);
double t_1 = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) * t_0;
double tmp;
if (y_46_im <= -1.45e+54) {
tmp = y_46_re * (atan2(x_46_im, x_46_re) * exp((atan2(x_46_im, x_46_re) * -y_46_im)));
} else if (y_46_im <= -7e-272) {
tmp = t_1;
} else if (y_46_im <= 3.6e-199) {
tmp = sin((y_46_re * atan2(x_46_im, x_46_re))) * t_0;
} else if (y_46_im <= 5.8e+128) {
tmp = t_1;
} else {
tmp = atan2(x_46_im, x_46_re) * (y_46_re * pow(exp(-y_46_im), 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 = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
double t_1 = Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re)))) * t_0;
double tmp;
if (y_46_im <= -1.45e+54) {
tmp = y_46_re * (Math.atan2(x_46_im, x_46_re) * Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im)));
} else if (y_46_im <= -7e-272) {
tmp = t_1;
} else if (y_46_im <= 3.6e-199) {
tmp = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re))) * t_0;
} else if (y_46_im <= 5.8e+128) {
tmp = t_1;
} else {
tmp = Math.atan2(x_46_im, x_46_re) * (y_46_re * Math.pow(Math.exp(-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.pow(math.hypot(x_46_im, x_46_re), y_46_re) t_1 = math.sin((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) * t_0 tmp = 0 if y_46_im <= -1.45e+54: tmp = y_46_re * (math.atan2(x_46_im, x_46_re) * math.exp((math.atan2(x_46_im, x_46_re) * -y_46_im))) elif y_46_im <= -7e-272: tmp = t_1 elif y_46_im <= 3.6e-199: tmp = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) * t_0 elif y_46_im <= 5.8e+128: tmp = t_1 else: tmp = math.atan2(x_46_im, x_46_re) * (y_46_re * math.pow(math.exp(-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 = hypot(x_46_im, x_46_re) ^ y_46_re t_1 = Float64(sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) * t_0) tmp = 0.0 if (y_46_im <= -1.45e+54) tmp = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))))); elseif (y_46_im <= -7e-272) tmp = t_1; elseif (y_46_im <= 3.6e-199) tmp = Float64(sin(Float64(y_46_re * atan(x_46_im, x_46_re))) * t_0); elseif (y_46_im <= 5.8e+128) tmp = t_1; else tmp = Float64(atan(x_46_im, x_46_re) * Float64(y_46_re * (exp(Float64(-y_46_im)) ^ atan(x_46_im, x_46_re)))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = hypot(x_46_im, x_46_re) ^ y_46_re; t_1 = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) * t_0; tmp = 0.0; if (y_46_im <= -1.45e+54) tmp = y_46_re * (atan2(x_46_im, x_46_re) * exp((atan2(x_46_im, x_46_re) * -y_46_im))); elseif (y_46_im <= -7e-272) tmp = t_1; elseif (y_46_im <= 3.6e-199) tmp = sin((y_46_re * atan2(x_46_im, x_46_re))) * t_0; elseif (y_46_im <= 5.8e+128) tmp = t_1; else tmp = atan2(x_46_im, x_46_re) * (y_46_re * (exp(-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[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, Block[{t$95$1 = N[(N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$0), $MachinePrecision]}, If[LessEqual[y$46$im, -1.45e+54], N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, -7e-272], t$95$1, If[LessEqual[y$46$im, 3.6e-199], N[(N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$0), $MachinePrecision], If[LessEqual[y$46$im, 5.8e+128], t$95$1, N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[(y$46$re * N[Power[N[Exp[(-y$46$im)], $MachinePrecision], N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
t_1 := \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \cdot t_0\\
\mathbf{if}\;y.im \leq -1.45 \cdot 10^{+54}:\\
\;\;\;\;y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\right)\\
\mathbf{elif}\;y.im \leq -7 \cdot 10^{-272}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y.im \leq 3.6 \cdot 10^{-199}:\\
\;\;\;\;\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot t_0\\
\mathbf{elif}\;y.im \leq 5.8 \cdot 10^{+128}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(y.re \cdot {\left(e^{-y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}\right)\\
\end{array}
\end{array}
if y.im < -1.4499999999999999e54Initial program 43.0%
Taylor expanded in y.im around 0 58.6%
Taylor expanded in y.re around 0 62.2%
*-commutative62.2%
distribute-lft-neg-in62.2%
Simplified62.2%
if -1.4499999999999999e54 < y.im < -6.9999999999999993e-272 or 3.6000000000000002e-199 < y.im < 5.8000000000000001e128Initial program 44.5%
exp-diff39.0%
exp-to-pow39.0%
hypot-def39.0%
*-commutative39.0%
exp-prod38.1%
fma-def38.1%
hypot-def71.2%
*-commutative71.2%
Simplified71.2%
Taylor expanded in y.im around 0 62.6%
unpow262.6%
unpow262.6%
hypot-def73.4%
Simplified73.4%
Taylor expanded in y.re around 0 37.8%
unpow237.8%
unpow237.8%
hypot-def72.7%
Simplified72.7%
if -6.9999999999999993e-272 < y.im < 3.6000000000000002e-199Initial program 38.5%
Taylor expanded in y.im around 0 62.9%
Taylor expanded in y.im around 0 62.9%
unpow262.9%
unpow262.9%
hypot-def88.2%
Simplified88.2%
if 5.8000000000000001e128 < y.im Initial program 40.4%
Taylor expanded in y.im around 0 60.0%
Taylor expanded in y.re around 0 72.6%
associate-*r*72.6%
distribute-lft-neg-in72.6%
exp-prod74.6%
Simplified74.6%
Final simplification72.4%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (<= y.im -8e+53)
(* y.re (* (atan2 x.im x.re) (exp (* (atan2 x.im x.re) (- y.im)))))
(if (<= y.im 3.25e+97)
(* (sin (* y.re (atan2 x.im x.re))) (pow (hypot x.im x.re) y.re))
(* (atan2 x.im x.re) (* y.re (pow (exp (- 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 tmp;
if (y_46_im <= -8e+53) {
tmp = y_46_re * (atan2(x_46_im, x_46_re) * exp((atan2(x_46_im, x_46_re) * -y_46_im)));
} else if (y_46_im <= 3.25e+97) {
tmp = sin((y_46_re * atan2(x_46_im, x_46_re))) * pow(hypot(x_46_im, x_46_re), y_46_re);
} else {
tmp = atan2(x_46_im, x_46_re) * (y_46_re * pow(exp(-y_46_im), 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 tmp;
if (y_46_im <= -8e+53) {
tmp = y_46_re * (Math.atan2(x_46_im, x_46_re) * Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im)));
} else if (y_46_im <= 3.25e+97) {
tmp = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re))) * Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
} else {
tmp = Math.atan2(x_46_im, x_46_re) * (y_46_re * Math.pow(Math.exp(-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): tmp = 0 if y_46_im <= -8e+53: tmp = y_46_re * (math.atan2(x_46_im, x_46_re) * math.exp((math.atan2(x_46_im, x_46_re) * -y_46_im))) elif y_46_im <= 3.25e+97: tmp = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) * math.pow(math.hypot(x_46_im, x_46_re), y_46_re) else: tmp = math.atan2(x_46_im, x_46_re) * (y_46_re * math.pow(math.exp(-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) tmp = 0.0 if (y_46_im <= -8e+53) tmp = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))))); elseif (y_46_im <= 3.25e+97) tmp = Float64(sin(Float64(y_46_re * atan(x_46_im, x_46_re))) * (hypot(x_46_im, x_46_re) ^ y_46_re)); else tmp = Float64(atan(x_46_im, x_46_re) * Float64(y_46_re * (exp(Float64(-y_46_im)) ^ atan(x_46_im, x_46_re)))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if (y_46_im <= -8e+53) tmp = y_46_re * (atan2(x_46_im, x_46_re) * exp((atan2(x_46_im, x_46_re) * -y_46_im))); elseif (y_46_im <= 3.25e+97) tmp = sin((y_46_re * atan2(x_46_im, x_46_re))) * (hypot(x_46_im, x_46_re) ^ y_46_re); else tmp = atan2(x_46_im, x_46_re) * (y_46_re * (exp(-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_] := If[LessEqual[y$46$im, -8e+53], N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 3.25e+97], N[(N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[(y$46$re * N[Power[N[Exp[(-y$46$im)], $MachinePrecision], N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.im \leq -8 \cdot 10^{+53}:\\
\;\;\;\;y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\right)\\
\mathbf{elif}\;y.im \leq 3.25 \cdot 10^{+97}:\\
\;\;\;\;\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(y.re \cdot {\left(e^{-y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}\right)\\
\end{array}
\end{array}
if y.im < -7.9999999999999999e53Initial program 43.0%
Taylor expanded in y.im around 0 58.6%
Taylor expanded in y.re around 0 62.2%
*-commutative62.2%
distribute-lft-neg-in62.2%
Simplified62.2%
if -7.9999999999999999e53 < y.im < 3.25e97Initial program 41.8%
Taylor expanded in y.im around 0 50.1%
Taylor expanded in y.im around 0 49.5%
unpow249.5%
unpow249.5%
hypot-def53.8%
Simplified53.8%
if 3.25e97 < y.im Initial program 45.3%
Taylor expanded in y.im around 0 62.6%
Taylor expanded in y.re around 0 71.9%
associate-*r*71.9%
distribute-lft-neg-in71.9%
exp-prod73.7%
Simplified73.7%
Final simplification59.8%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (or (<= y.im -9.6e+53) (not (<= y.im 3.3e+97))) (* y.re (* (atan2 x.im x.re) (exp (* (atan2 x.im x.re) (- y.im))))) (* (sin (* 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 tmp;
if ((y_46_im <= -9.6e+53) || !(y_46_im <= 3.3e+97)) {
tmp = y_46_re * (atan2(x_46_im, x_46_re) * exp((atan2(x_46_im, x_46_re) * -y_46_im)));
} else {
tmp = sin((y_46_re * atan2(x_46_im, x_46_re))) * pow(hypot(x_46_im, x_46_re), y_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 tmp;
if ((y_46_im <= -9.6e+53) || !(y_46_im <= 3.3e+97)) {
tmp = y_46_re * (Math.atan2(x_46_im, x_46_re) * Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im)));
} else {
tmp = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re))) * Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if (y_46_im <= -9.6e+53) or not (y_46_im <= 3.3e+97): tmp = y_46_re * (math.atan2(x_46_im, x_46_re) * math.exp((math.atan2(x_46_im, x_46_re) * -y_46_im))) else: tmp = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) * math.pow(math.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) tmp = 0.0 if ((y_46_im <= -9.6e+53) || !(y_46_im <= 3.3e+97)) tmp = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))))); else tmp = Float64(sin(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
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if ((y_46_im <= -9.6e+53) || ~((y_46_im <= 3.3e+97))) tmp = y_46_re * (atan2(x_46_im, x_46_re) * exp((atan2(x_46_im, x_46_re) * -y_46_im))); else tmp = sin((y_46_re * atan2(x_46_im, x_46_re))) * (hypot(x_46_im, x_46_re) ^ y_46_re); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[Or[LessEqual[y$46$im, -9.6e+53], N[Not[LessEqual[y$46$im, 3.3e+97]], $MachinePrecision]], N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $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}
\mathbf{if}\;y.im \leq -9.6 \cdot 10^{+53} \lor \neg \left(y.im \leq 3.3 \cdot 10^{+97}\right):\\
\;\;\;\;y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\end{array}
\end{array}
if y.im < -9.5999999999999999e53 or 3.3000000000000001e97 < y.im Initial program 44.1%
Taylor expanded in y.im around 0 60.6%
Taylor expanded in y.re around 0 67.0%
*-commutative67.0%
distribute-lft-neg-in67.0%
Simplified67.0%
if -9.5999999999999999e53 < y.im < 3.3000000000000001e97Initial program 41.8%
Taylor expanded in y.im around 0 50.1%
Taylor expanded in y.im around 0 49.5%
unpow249.5%
unpow249.5%
hypot-def53.8%
Simplified53.8%
Final simplification59.4%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (<= y.re -2.25e+164)
(* y.re (* (atan2 x.im x.re) (exp (* y.im (atan2 x.im x.re)))))
(if (<= y.re -1.45e+56)
(log (pow (exp y.re) (atan2 x.im x.re)))
(if (<= y.re 1.9e+118)
(* y.re (* (atan2 x.im x.re) (exp (* (atan2 x.im x.re) (- y.im)))))
(pow (pow (* y.re (atan2 x.im x.re)) 3.0) 0.3333333333333333)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_re <= -2.25e+164) {
tmp = y_46_re * (atan2(x_46_im, x_46_re) * exp((y_46_im * atan2(x_46_im, x_46_re))));
} else if (y_46_re <= -1.45e+56) {
tmp = log(pow(exp(y_46_re), atan2(x_46_im, x_46_re)));
} else if (y_46_re <= 1.9e+118) {
tmp = y_46_re * (atan2(x_46_im, x_46_re) * exp((atan2(x_46_im, x_46_re) * -y_46_im)));
} else {
tmp = pow(pow((y_46_re * atan2(x_46_im, x_46_re)), 3.0), 0.3333333333333333);
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: tmp
if (y_46re <= (-2.25d+164)) then
tmp = y_46re * (atan2(x_46im, x_46re) * exp((y_46im * atan2(x_46im, x_46re))))
else if (y_46re <= (-1.45d+56)) then
tmp = log((exp(y_46re) ** atan2(x_46im, x_46re)))
else if (y_46re <= 1.9d+118) then
tmp = y_46re * (atan2(x_46im, x_46re) * exp((atan2(x_46im, x_46re) * -y_46im)))
else
tmp = ((y_46re * atan2(x_46im, x_46re)) ** 3.0d0) ** 0.3333333333333333d0
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_re <= -2.25e+164) {
tmp = y_46_re * (Math.atan2(x_46_im, x_46_re) * Math.exp((y_46_im * Math.atan2(x_46_im, x_46_re))));
} else if (y_46_re <= -1.45e+56) {
tmp = Math.log(Math.pow(Math.exp(y_46_re), Math.atan2(x_46_im, x_46_re)));
} else if (y_46_re <= 1.9e+118) {
tmp = y_46_re * (Math.atan2(x_46_im, x_46_re) * Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im)));
} else {
tmp = Math.pow(Math.pow((y_46_re * Math.atan2(x_46_im, x_46_re)), 3.0), 0.3333333333333333);
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if y_46_re <= -2.25e+164: tmp = y_46_re * (math.atan2(x_46_im, x_46_re) * math.exp((y_46_im * math.atan2(x_46_im, x_46_re)))) elif y_46_re <= -1.45e+56: tmp = math.log(math.pow(math.exp(y_46_re), math.atan2(x_46_im, x_46_re))) elif y_46_re <= 1.9e+118: tmp = y_46_re * (math.atan2(x_46_im, x_46_re) * math.exp((math.atan2(x_46_im, x_46_re) * -y_46_im))) else: tmp = math.pow(math.pow((y_46_re * math.atan2(x_46_im, x_46_re)), 3.0), 0.3333333333333333) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if (y_46_re <= -2.25e+164) tmp = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * exp(Float64(y_46_im * atan(x_46_im, x_46_re))))); elseif (y_46_re <= -1.45e+56) tmp = log((exp(y_46_re) ^ atan(x_46_im, x_46_re))); elseif (y_46_re <= 1.9e+118) tmp = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))))); else tmp = (Float64(y_46_re * atan(x_46_im, x_46_re)) ^ 3.0) ^ 0.3333333333333333; end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if (y_46_re <= -2.25e+164) tmp = y_46_re * (atan2(x_46_im, x_46_re) * exp((y_46_im * atan2(x_46_im, x_46_re)))); elseif (y_46_re <= -1.45e+56) tmp = log((exp(y_46_re) ^ atan2(x_46_im, x_46_re))); elseif (y_46_re <= 1.9e+118) tmp = y_46_re * (atan2(x_46_im, x_46_re) * exp((atan2(x_46_im, x_46_re) * -y_46_im))); else tmp = ((y_46_re * atan2(x_46_im, x_46_re)) ^ 3.0) ^ 0.3333333333333333; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[y$46$re, -2.25e+164], N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Exp[N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, -1.45e+56], N[Log[N[Power[N[Exp[y$46$re], $MachinePrecision], N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision]], $MachinePrecision], If[LessEqual[y$46$re, 1.9e+118], N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Power[N[Power[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision], 0.3333333333333333], $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq -2.25 \cdot 10^{+164}:\\
\;\;\;\;y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot e^{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\right)\\
\mathbf{elif}\;y.re \leq -1.45 \cdot 10^{+56}:\\
\;\;\;\;\log \left({\left(e^{y.re}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}\right)\\
\mathbf{elif}\;y.re \leq 1.9 \cdot 10^{+118}:\\
\;\;\;\;y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\right)\\
\mathbf{else}:\\
\;\;\;\;{\left({\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}^{3}\right)}^{0.3333333333333333}\\
\end{array}
\end{array}
if y.re < -2.24999999999999988e164Initial program 68.0%
Taylor expanded in y.im around 0 92.1%
Taylor expanded in y.re around 0 25.3%
*-commutative25.3%
distribute-lft-neg-in25.3%
Simplified25.3%
add-sqr-sqrt12.5%
sqrt-unprod29.3%
sqr-neg29.3%
sqrt-unprod20.8%
add-sqr-sqrt41.2%
add-log-exp41.2%
log-pow41.2%
*-un-lft-identity41.2%
log-prod41.2%
metadata-eval41.2%
pow-exp41.2%
rem-log-exp41.2%
Applied egg-rr41.2%
+-lft-identity41.2%
*-commutative41.2%
Simplified41.2%
if -2.24999999999999988e164 < y.re < -1.45000000000000004e56Initial program 47.6%
Taylor expanded in y.im around 0 76.4%
Taylor expanded in y.re around 0 39.6%
*-commutative39.6%
distribute-lft-neg-in39.6%
Simplified39.6%
Taylor expanded in y.im around 0 7.5%
add-log-exp34.4%
exp-prod43.7%
Applied egg-rr43.7%
if -1.45000000000000004e56 < y.re < 1.90000000000000008e118Initial program 42.0%
Taylor expanded in y.im around 0 44.4%
Taylor expanded in y.re around 0 49.2%
*-commutative49.2%
distribute-lft-neg-in49.2%
Simplified49.2%
if 1.90000000000000008e118 < y.re Initial program 28.6%
Taylor expanded in y.im around 0 61.9%
Taylor expanded in y.re around 0 18.1%
*-commutative18.1%
distribute-lft-neg-in18.1%
Simplified18.1%
Taylor expanded in y.im around 0 2.4%
*-commutative2.4%
add-cbrt-cube31.5%
pow1/345.7%
pow345.7%
*-commutative45.7%
Applied egg-rr45.7%
Final simplification47.4%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (<= y.re 7.8e+118) (* y.re (* (atan2 x.im x.re) (exp (* (atan2 x.im x.re) (- y.im))))) (pow (pow (* y.re (atan2 x.im x.re)) 3.0) 0.3333333333333333)))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_re <= 7.8e+118) {
tmp = y_46_re * (atan2(x_46_im, x_46_re) * exp((atan2(x_46_im, x_46_re) * -y_46_im)));
} else {
tmp = pow(pow((y_46_re * atan2(x_46_im, x_46_re)), 3.0), 0.3333333333333333);
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: tmp
if (y_46re <= 7.8d+118) then
tmp = y_46re * (atan2(x_46im, x_46re) * exp((atan2(x_46im, x_46re) * -y_46im)))
else
tmp = ((y_46re * atan2(x_46im, x_46re)) ** 3.0d0) ** 0.3333333333333333d0
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_re <= 7.8e+118) {
tmp = y_46_re * (Math.atan2(x_46_im, x_46_re) * Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im)));
} else {
tmp = Math.pow(Math.pow((y_46_re * Math.atan2(x_46_im, x_46_re)), 3.0), 0.3333333333333333);
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if y_46_re <= 7.8e+118: tmp = y_46_re * (math.atan2(x_46_im, x_46_re) * math.exp((math.atan2(x_46_im, x_46_re) * -y_46_im))) else: tmp = math.pow(math.pow((y_46_re * math.atan2(x_46_im, x_46_re)), 3.0), 0.3333333333333333) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if (y_46_re <= 7.8e+118) tmp = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))))); else tmp = (Float64(y_46_re * atan(x_46_im, x_46_re)) ^ 3.0) ^ 0.3333333333333333; end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if (y_46_re <= 7.8e+118) tmp = y_46_re * (atan2(x_46_im, x_46_re) * exp((atan2(x_46_im, x_46_re) * -y_46_im))); else tmp = ((y_46_re * atan2(x_46_im, x_46_re)) ^ 3.0) ^ 0.3333333333333333; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[y$46$re, 7.8e+118], N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Power[N[Power[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision], 0.3333333333333333], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq 7.8 \cdot 10^{+118}:\\
\;\;\;\;y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\right)\\
\mathbf{else}:\\
\;\;\;\;{\left({\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}^{3}\right)}^{0.3333333333333333}\\
\end{array}
\end{array}
if y.re < 7.8e118Initial program 45.6%
Taylor expanded in y.im around 0 53.1%
Taylor expanded in y.re around 0 45.4%
*-commutative45.4%
distribute-lft-neg-in45.4%
Simplified45.4%
if 7.8e118 < y.re Initial program 28.6%
Taylor expanded in y.im around 0 61.9%
Taylor expanded in y.re around 0 18.1%
*-commutative18.1%
distribute-lft-neg-in18.1%
Simplified18.1%
Taylor expanded in y.im around 0 2.4%
*-commutative2.4%
add-cbrt-cube31.5%
pow1/345.7%
pow345.7%
*-commutative45.7%
Applied egg-rr45.7%
Final simplification45.5%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (expm1 (* y.re (atan2 x.im x.re)))))
(if (or (<= y.im -1.3e+28) (not (<= y.im 3.1e-83)))
(log (+ 1.0 t_0))
(log1p t_0))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = expm1((y_46_re * atan2(x_46_im, x_46_re)));
double tmp;
if ((y_46_im <= -1.3e+28) || !(y_46_im <= 3.1e-83)) {
tmp = log((1.0 + t_0));
} else {
tmp = log1p(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 = Math.expm1((y_46_re * Math.atan2(x_46_im, x_46_re)));
double tmp;
if ((y_46_im <= -1.3e+28) || !(y_46_im <= 3.1e-83)) {
tmp = Math.log((1.0 + t_0));
} else {
tmp = Math.log1p(t_0);
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.expm1((y_46_re * math.atan2(x_46_im, x_46_re))) tmp = 0 if (y_46_im <= -1.3e+28) or not (y_46_im <= 3.1e-83): tmp = math.log((1.0 + t_0)) else: tmp = math.log1p(t_0) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = expm1(Float64(y_46_re * atan(x_46_im, x_46_re))) tmp = 0.0 if ((y_46_im <= -1.3e+28) || !(y_46_im <= 3.1e-83)) tmp = log(Float64(1.0 + t_0)); else tmp = log1p(t_0); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(Exp[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]] - 1), $MachinePrecision]}, If[Or[LessEqual[y$46$im, -1.3e+28], N[Not[LessEqual[y$46$im, 3.1e-83]], $MachinePrecision]], N[Log[N[(1.0 + t$95$0), $MachinePrecision]], $MachinePrecision], N[Log[1 + t$95$0], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \mathsf{expm1}\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{if}\;y.im \leq -1.3 \cdot 10^{+28} \lor \neg \left(y.im \leq 3.1 \cdot 10^{-83}\right):\\
\;\;\;\;\log \left(1 + t_0\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{log1p}\left(t_0\right)\\
\end{array}
\end{array}
if y.im < -1.3000000000000001e28 or 3.09999999999999992e-83 < y.im Initial program 42.0%
Taylor expanded in y.im around 0 59.0%
Taylor expanded in y.re around 0 53.9%
*-commutative53.9%
distribute-lft-neg-in53.9%
Simplified53.9%
Taylor expanded in y.im around 0 6.1%
*-commutative6.1%
log1p-expm1-u19.1%
log1p-udef37.8%
*-commutative37.8%
Applied egg-rr37.8%
if -1.3000000000000001e28 < y.im < 3.09999999999999992e-83Initial program 44.0%
Taylor expanded in y.im around 0 48.1%
Taylor expanded in y.re around 0 22.0%
*-commutative22.0%
distribute-lft-neg-in22.0%
Simplified22.0%
Taylor expanded in y.im around 0 20.1%
log1p-expm1-u27.3%
Applied egg-rr27.3%
Final simplification33.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.im -8.8e+17) (not (<= y.im 5.8e+131)))
(cbrt (pow t_0 3.0))
(log1p (expm1 t_0)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if ((y_46_im <= -8.8e+17) || !(y_46_im <= 5.8e+131)) {
tmp = cbrt(pow(t_0, 3.0));
} else {
tmp = log1p(expm1(t_0));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
double tmp;
if ((y_46_im <= -8.8e+17) || !(y_46_im <= 5.8e+131)) {
tmp = Math.cbrt(Math.pow(t_0, 3.0));
} else {
tmp = Math.log1p(Math.expm1(t_0));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) tmp = 0.0 if ((y_46_im <= -8.8e+17) || !(y_46_im <= 5.8e+131)) tmp = cbrt((t_0 ^ 3.0)); else tmp = log1p(expm1(t_0)); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[y$46$im, -8.8e+17], N[Not[LessEqual[y$46$im, 5.8e+131]], $MachinePrecision]], N[Power[N[Power[t$95$0, 3.0], $MachinePrecision], 1/3], $MachinePrecision], N[Log[1 + N[(Exp[t$95$0] - 1), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.im \leq -8.8 \cdot 10^{+17} \lor \neg \left(y.im \leq 5.8 \cdot 10^{+131}\right):\\
\;\;\;\;\sqrt[3]{{t_0}^{3}}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{log1p}\left(\mathsf{expm1}\left(t_0\right)\right)\\
\end{array}
\end{array}
if y.im < -8.8e17 or 5.8000000000000002e131 < y.im Initial program 42.2%
Taylor expanded in y.im around 0 59.7%
Taylor expanded in y.re around 0 62.4%
*-commutative62.4%
distribute-lft-neg-in62.4%
Simplified62.4%
Taylor expanded in y.im around 0 6.5%
*-commutative6.5%
add-cbrt-cube27.2%
pow327.2%
*-commutative27.2%
Applied egg-rr27.2%
if -8.8e17 < y.im < 5.8000000000000002e131Initial program 43.3%
Taylor expanded in y.im around 0 50.4%
Taylor expanded in y.re around 0 24.0%
*-commutative24.0%
distribute-lft-neg-in24.0%
Simplified24.0%
Taylor expanded in y.im around 0 15.9%
log1p-expm1-u25.1%
Applied egg-rr25.1%
Final simplification26.1%
(FPCore (x.re x.im y.re y.im) :precision binary64 (log1p (expm1 (* 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 log1p(expm1((y_46_re * atan2(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.log1p(Math.expm1((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 math.log1p(math.expm1((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 log1p(expm1(Float64(y_46_re * atan(x_46_im, x_46_re)))) end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[Log[1 + N[(Exp[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]] - 1), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\mathsf{log1p}\left(\mathsf{expm1}\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)
\end{array}
Initial program 42.8%
Taylor expanded in y.im around 0 54.5%
Taylor expanded in y.re around 0 41.0%
*-commutative41.0%
distribute-lft-neg-in41.0%
Simplified41.0%
Taylor expanded in y.im around 0 11.8%
log1p-expm1-u22.4%
Applied egg-rr22.4%
Final simplification22.4%
(FPCore (x.re x.im y.re y.im) :precision binary64 (* y.re (* (atan2 x.im x.re) (- 1.0 (* 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) {
return y_46_re * (atan2(x_46_im, x_46_re) * (1.0 - (y_46_im * 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) * (1.0d0 - (y_46im * 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) * (1.0 - (y_46_im * 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) * (1.0 - (y_46_im * 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 * Float64(atan(x_46_im, x_46_re) * Float64(1.0 - Float64(y_46_im * 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) * (1.0 - (y_46_im * 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[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[(1.0 - N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(1 - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)
\end{array}
Initial program 42.8%
Taylor expanded in y.im around 0 54.5%
Taylor expanded in y.re around 0 41.0%
*-commutative41.0%
distribute-lft-neg-in41.0%
Simplified41.0%
Taylor expanded in y.im around 0 13.8%
mul-1-neg13.8%
*-commutative13.8%
distribute-rgt-neg-in13.8%
Simplified13.8%
Final simplification13.8%
(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 42.8%
Taylor expanded in y.im around 0 54.5%
Taylor expanded in y.re around 0 41.0%
*-commutative41.0%
distribute-lft-neg-in41.0%
Simplified41.0%
Taylor expanded in y.im around 0 11.8%
Final simplification11.8%
herbie shell --seed 2023321
(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)))))