
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (sqrt (+ (* x.re x.re) (* x.im x.im))))))
(*
(exp (- (* t_0 y.re) (* (atan2 x.im x.re) y.im)))
(sin (+ (* t_0 y.im) (* (atan2 x.im x.re) y.re))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
return exp(((t_0 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin(((t_0 * y_46_im) + (atan2(x_46_im, x_46_re) * y_46_re)));
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
t_0 = log(sqrt(((x_46re * x_46re) + (x_46im * x_46im))))
code = exp(((t_0 * y_46re) - (atan2(x_46im, x_46re) * y_46im))) * sin(((t_0 * y_46im) + (atan2(x_46im, x_46re) * y_46re)))
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
return Math.exp(((t_0 * y_46_re) - (Math.atan2(x_46_im, x_46_re) * y_46_im))) * Math.sin(((t_0 * y_46_im) + (Math.atan2(x_46_im, x_46_re) * y_46_re)));
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) return math.exp(((t_0 * y_46_re) - (math.atan2(x_46_im, x_46_re) * y_46_im))) * math.sin(((t_0 * y_46_im) + (math.atan2(x_46_im, x_46_re) * y_46_re)))
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) return Float64(exp(Float64(Float64(t_0 * y_46_re) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * sin(Float64(Float64(t_0 * y_46_im) + Float64(atan(x_46_im, x_46_re) * y_46_re)))) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))); tmp = exp(((t_0 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin(((t_0 * y_46_im) + (atan2(x_46_im, x_46_re) * y_46_re))); end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]}, N[(N[Exp[N[(N[(t$95$0 * y$46$re), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(N[(t$95$0 * y$46$im), $MachinePrecision] + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)\\
e^{t_0 \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(t_0 \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)
\end{array}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 21 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (sqrt (+ (* x.re x.re) (* x.im x.im))))))
(*
(exp (- (* t_0 y.re) (* (atan2 x.im x.re) y.im)))
(sin (+ (* t_0 y.im) (* (atan2 x.im x.re) y.re))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
return exp(((t_0 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin(((t_0 * y_46_im) + (atan2(x_46_im, x_46_re) * y_46_re)));
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
t_0 = log(sqrt(((x_46re * x_46re) + (x_46im * x_46im))))
code = exp(((t_0 * y_46re) - (atan2(x_46im, x_46re) * y_46im))) * sin(((t_0 * y_46im) + (atan2(x_46im, x_46re) * y_46re)))
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
return Math.exp(((t_0 * y_46_re) - (Math.atan2(x_46_im, x_46_re) * y_46_im))) * Math.sin(((t_0 * y_46_im) + (Math.atan2(x_46_im, x_46_re) * y_46_re)));
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) return math.exp(((t_0 * y_46_re) - (math.atan2(x_46_im, x_46_re) * y_46_im))) * math.sin(((t_0 * y_46_im) + (math.atan2(x_46_im, x_46_re) * y_46_re)))
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) return Float64(exp(Float64(Float64(t_0 * y_46_re) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * sin(Float64(Float64(t_0 * y_46_im) + Float64(atan(x_46_im, x_46_re) * y_46_re)))) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))); tmp = exp(((t_0 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin(((t_0 * y_46_im) + (atan2(x_46_im, x_46_re) * y_46_re))); end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]}, N[(N[Exp[N[(N[(t$95$0 * y$46$re), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(N[(t$95$0 * y$46$im), $MachinePrecision] + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)\\
e^{t_0 \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(t_0 \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)
\end{array}
\end{array}
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.re x.im)))
(t_1 (sin (fma t_0 y.im (* y.re (atan2 x.im x.re)))))
(t_2 (exp (fma t_0 y.re (* (atan2 x.im x.re) (- y.im))))))
(if (<= y.re 500000.0)
(* t_2 t_1)
(if (<= y.re 3.5e+221)
(* t_2 (sin (* y.im (log (hypot x.im x.re)))))
(*
t_1
(/
(pow (hypot x.re x.im) y.re)
(+ 1.0 (* (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 t_0 = log(hypot(x_46_re, x_46_im));
double t_1 = sin(fma(t_0, y_46_im, (y_46_re * atan2(x_46_im, x_46_re))));
double t_2 = exp(fma(t_0, y_46_re, (atan2(x_46_im, x_46_re) * -y_46_im)));
double tmp;
if (y_46_re <= 500000.0) {
tmp = t_2 * t_1;
} else if (y_46_re <= 3.5e+221) {
tmp = t_2 * sin((y_46_im * log(hypot(x_46_im, x_46_re))));
} else {
tmp = t_1 * (pow(hypot(x_46_re, x_46_im), y_46_re) / (1.0 + (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) t_0 = log(hypot(x_46_re, x_46_im)) t_1 = sin(fma(t_0, y_46_im, Float64(y_46_re * atan(x_46_im, x_46_re)))) t_2 = exp(fma(t_0, y_46_re, Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))) tmp = 0.0 if (y_46_re <= 500000.0) tmp = Float64(t_2 * t_1); elseif (y_46_re <= 3.5e+221) tmp = Float64(t_2 * sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re))))); else tmp = Float64(t_1 * Float64((hypot(x_46_re, x_46_im) ^ y_46_re) / Float64(1.0 + Float64(atan(x_46_im, x_46_re) * y_46_im)))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[Sin[N[(t$95$0 * y$46$im + N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[Exp[N[(t$95$0 * y$46$re + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, 500000.0], N[(t$95$2 * t$95$1), $MachinePrecision], If[LessEqual[y$46$re, 3.5e+221], N[(t$95$2 * N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] / N[(1.0 + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
t_1 := \sin \left(\mathsf{fma}\left(t_0, y.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\\
t_2 := e^{\mathsf{fma}\left(t_0, y.re, \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)\right)}\\
\mathbf{if}\;y.re \leq 500000:\\
\;\;\;\;t_2 \cdot t_1\\
\mathbf{elif}\;y.re \leq 3.5 \cdot 10^{+221}:\\
\;\;\;\;t_2 \cdot \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_1 \cdot \frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{1 + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\
\end{array}
\end{array}
if y.re < 5e5Initial program 46.8%
cancel-sign-sub-inv46.8%
fma-def46.8%
hypot-def46.8%
distribute-lft-neg-in46.8%
distribute-rgt-neg-out46.8%
fma-def46.8%
hypot-def89.2%
*-commutative89.2%
Simplified89.2%
if 5e5 < y.re < 3.5000000000000002e221Initial 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-def65.2%
*-commutative65.2%
Simplified65.2%
add-cube-cbrt63.0%
pow363.0%
fma-udef63.0%
*-commutative63.0%
*-commutative63.0%
fma-def63.0%
Applied egg-rr63.0%
Taylor expanded in y.re around 0 41.3%
pow-base-141.3%
*-lft-identity41.3%
unpow241.3%
unpow241.3%
hypot-def80.4%
Simplified80.4%
if 3.5000000000000002e221 < y.re Initial program 38.1%
exp-diff19.0%
exp-to-pow19.0%
hypot-def19.0%
*-commutative19.0%
exp-prod19.0%
fma-def19.0%
hypot-def52.4%
*-commutative52.4%
Simplified52.4%
Taylor expanded in y.im around 0 85.7%
Final simplification87.4%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (pow (hypot x.re x.im) y.re))
(t_1 (* (atan2 x.im x.re) y.im))
(t_2 (* y.re (atan2 x.im x.re)))
(t_3 (log (hypot x.re x.im)))
(t_4 (sin (fma t_3 y.im t_2))))
(if (<= y.re -5.5)
(*
(exp (- (* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im))))) t_1))
(sin t_2))
(if (<= y.re 1030000.0)
(* t_4 (/ t_0 (pow (exp y.im) (atan2 x.im x.re))))
(if (<= y.re 2.8e+220)
(*
(exp (fma t_3 y.re (* (atan2 x.im x.re) (- y.im))))
(sin (* y.im (log (hypot x.im x.re)))))
(* t_4 (/ t_0 (+ 1.0 t_1))))))))
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_re, x_46_im), y_46_re);
double t_1 = atan2(x_46_im, x_46_re) * y_46_im;
double t_2 = y_46_re * atan2(x_46_im, x_46_re);
double t_3 = log(hypot(x_46_re, x_46_im));
double t_4 = sin(fma(t_3, y_46_im, t_2));
double tmp;
if (y_46_re <= -5.5) {
tmp = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_1)) * sin(t_2);
} else if (y_46_re <= 1030000.0) {
tmp = t_4 * (t_0 / pow(exp(y_46_im), atan2(x_46_im, x_46_re)));
} else if (y_46_re <= 2.8e+220) {
tmp = exp(fma(t_3, y_46_re, (atan2(x_46_im, x_46_re) * -y_46_im))) * sin((y_46_im * log(hypot(x_46_im, x_46_re))));
} else {
tmp = t_4 * (t_0 / (1.0 + t_1));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = hypot(x_46_re, x_46_im) ^ y_46_re t_1 = Float64(atan(x_46_im, x_46_re) * y_46_im) t_2 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_3 = log(hypot(x_46_re, x_46_im)) t_4 = sin(fma(t_3, y_46_im, t_2)) tmp = 0.0 if (y_46_re <= -5.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))))) - t_1)) * sin(t_2)); elseif (y_46_re <= 1030000.0) tmp = Float64(t_4 * Float64(t_0 / (exp(y_46_im) ^ atan(x_46_im, x_46_re)))); elseif (y_46_re <= 2.8e+220) tmp = Float64(exp(fma(t_3, y_46_re, Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))) * sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re))))); else tmp = Float64(t_4 * Float64(t_0 / Float64(1.0 + t_1))); 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$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, Block[{t$95$1 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, Block[{t$95$2 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$4 = N[Sin[N[(t$95$3 * y$46$im + t$95$2), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -5.5], N[(N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]], $MachinePrecision] * N[Sin[t$95$2], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 1030000.0], N[(t$95$4 * N[(t$95$0 / N[Power[N[Exp[y$46$im], $MachinePrecision], N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 2.8e+220], N[(N[Exp[N[(t$95$3 * y$46$re + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $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[(t$95$4 * N[(t$95$0 / N[(1.0 + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\\
t_1 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_2 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_3 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
t_4 := \sin \left(\mathsf{fma}\left(t_3, y.im, t_2\right)\right)\\
\mathbf{if}\;y.re \leq -5.5:\\
\;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - t_1} \cdot \sin t_2\\
\mathbf{elif}\;y.re \leq 1030000:\\
\;\;\;\;t_4 \cdot \frac{t_0}{{\left(e^{y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}}\\
\mathbf{elif}\;y.re \leq 2.8 \cdot 10^{+220}:\\
\;\;\;\;e^{\mathsf{fma}\left(t_3, y.re, \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)\right)} \cdot \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_4 \cdot \frac{t_0}{1 + t_1}\\
\end{array}
\end{array}
if y.re < -5.5Initial program 51.6%
Taylor expanded in y.im around 0 88.8%
if -5.5 < y.re < 1.03e6Initial program 44.4%
exp-diff44.4%
exp-to-pow44.4%
hypot-def44.4%
*-commutative44.4%
exp-prod44.0%
fma-def44.0%
hypot-def87.3%
*-commutative87.3%
Simplified87.3%
if 1.03e6 < y.re < 2.8000000000000001e220Initial 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-def65.2%
*-commutative65.2%
Simplified65.2%
add-cube-cbrt63.0%
pow363.0%
fma-udef63.0%
*-commutative63.0%
*-commutative63.0%
fma-def63.0%
Applied egg-rr63.0%
Taylor expanded in y.re around 0 41.3%
pow-base-141.3%
*-lft-identity41.3%
unpow241.3%
unpow241.3%
hypot-def80.4%
Simplified80.4%
if 2.8000000000000001e220 < y.re Initial program 38.1%
exp-diff19.0%
exp-to-pow19.0%
hypot-def19.0%
*-commutative19.0%
exp-prod19.0%
fma-def19.0%
hypot-def52.4%
*-commutative52.4%
Simplified52.4%
Taylor expanded in y.im around 0 85.7%
Final simplification86.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 (log (hypot x.re x.im)))
(t_2 (exp (fma t_1 y.re (* (atan2 x.im x.re) (- y.im)))))
(t_3 (* t_2 (sin t_0))))
(if (<= y.im -1.28e+157)
t_3
(if (<= y.im -2e+43)
(* t_2 (sin (pow (cbrt t_0) 3.0)))
(if (or (<= y.im -5e-9) (not (<= y.im 2.45e-98)))
t_3
(*
(sin (fma t_1 y.im (* y.re (atan2 x.im x.re))))
(/
(pow (hypot x.re x.im) y.re)
(+ 1.0 (* (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 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 t_3 = t_2 * sin(t_0);
double tmp;
if (y_46_im <= -1.28e+157) {
tmp = t_3;
} else if (y_46_im <= -2e+43) {
tmp = t_2 * sin(pow(cbrt(t_0), 3.0));
} else if ((y_46_im <= -5e-9) || !(y_46_im <= 2.45e-98)) {
tmp = t_3;
} else {
tmp = sin(fma(t_1, y_46_im, (y_46_re * atan2(x_46_im, x_46_re)))) * (pow(hypot(x_46_re, x_46_im), y_46_re) / (1.0 + (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) 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)))) t_3 = Float64(t_2 * sin(t_0)) tmp = 0.0 if (y_46_im <= -1.28e+157) tmp = t_3; elseif (y_46_im <= -2e+43) tmp = Float64(t_2 * sin((cbrt(t_0) ^ 3.0))); elseif ((y_46_im <= -5e-9) || !(y_46_im <= 2.45e-98)) tmp = t_3; else tmp = Float64(sin(fma(t_1, y_46_im, Float64(y_46_re * atan(x_46_im, x_46_re)))) * Float64((hypot(x_46_re, x_46_im) ^ y_46_re) / Float64(1.0 + Float64(atan(x_46_im, x_46_re) * y_46_im)))); 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]}, Block[{t$95$3 = N[(t$95$2 * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -1.28e+157], t$95$3, If[LessEqual[y$46$im, -2e+43], N[(t$95$2 * N[Sin[N[Power[N[Power[t$95$0, 1/3], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y$46$im, -5e-9], N[Not[LessEqual[y$46$im, 2.45e-98]], $MachinePrecision]], t$95$3, N[(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] * N[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] / N[(1.0 + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $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)}\\
t_3 := t_2 \cdot \sin t_0\\
\mathbf{if}\;y.im \leq -1.28 \cdot 10^{+157}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;y.im \leq -2 \cdot 10^{+43}:\\
\;\;\;\;t_2 \cdot \sin \left({\left(\sqrt[3]{t_0}\right)}^{3}\right)\\
\mathbf{elif}\;y.im \leq -5 \cdot 10^{-9} \lor \neg \left(y.im \leq 2.45 \cdot 10^{-98}\right):\\
\;\;\;\;t_3\\
\mathbf{else}:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(t_1, y.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \cdot \frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{1 + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\
\end{array}
\end{array}
if y.im < -1.28000000000000001e157 or -2.00000000000000003e43 < y.im < -5.0000000000000001e-9 or 2.45000000000000007e-98 < y.im Initial program 40.7%
cancel-sign-sub-inv40.7%
fma-def40.7%
hypot-def40.7%
distribute-lft-neg-in40.7%
distribute-rgt-neg-out40.7%
fma-def40.7%
hypot-def78.9%
*-commutative78.9%
Simplified78.9%
add-cube-cbrt72.7%
pow374.2%
fma-udef74.2%
*-commutative74.2%
*-commutative74.2%
fma-def74.2%
Applied egg-rr74.2%
Taylor expanded in y.re around 0 40.6%
pow-base-140.6%
*-lft-identity40.6%
unpow240.6%
unpow240.6%
hypot-def79.6%
Simplified79.6%
if -1.28000000000000001e157 < y.im < -2.00000000000000003e43Initial program 41.2%
cancel-sign-sub-inv41.2%
fma-def41.2%
hypot-def41.2%
distribute-lft-neg-in41.2%
distribute-rgt-neg-out41.2%
fma-def41.2%
hypot-def54.1%
*-commutative54.1%
Simplified54.1%
add-cube-cbrt60.0%
pow371.8%
fma-udef71.8%
*-commutative71.8%
*-commutative71.8%
fma-def71.8%
Applied egg-rr71.8%
Taylor expanded in y.re around 0 11.8%
unpow1/370.6%
unpow270.6%
unpow270.6%
hypot-def89.5%
Simplified89.5%
if -5.0000000000000001e-9 < y.im < 2.45000000000000007e-98Initial program 48.4%
exp-diff48.4%
exp-to-pow48.4%
hypot-def48.4%
*-commutative48.4%
exp-prod48.4%
fma-def48.4%
hypot-def94.9%
*-commutative94.9%
Simplified94.9%
Taylor expanded in y.im around 0 94.9%
Final simplification86.5%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.re x.im))))
(if (or (<= y.im -1.08e-8) (not (<= y.im 1.05e-97)))
(*
(exp (fma t_0 y.re (* (atan2 x.im x.re) (- y.im))))
(sin (* y.im (log (hypot x.im x.re)))))
(*
(sin (fma t_0 y.im (* y.re (atan2 x.im x.re))))
(/ (pow (hypot x.re x.im) y.re) (+ 1.0 (* (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 t_0 = log(hypot(x_46_re, x_46_im));
double tmp;
if ((y_46_im <= -1.08e-8) || !(y_46_im <= 1.05e-97)) {
tmp = exp(fma(t_0, y_46_re, (atan2(x_46_im, x_46_re) * -y_46_im))) * sin((y_46_im * log(hypot(x_46_im, x_46_re))));
} else {
tmp = sin(fma(t_0, y_46_im, (y_46_re * atan2(x_46_im, x_46_re)))) * (pow(hypot(x_46_re, x_46_im), y_46_re) / (1.0 + (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) t_0 = log(hypot(x_46_re, x_46_im)) tmp = 0.0 if ((y_46_im <= -1.08e-8) || !(y_46_im <= 1.05e-97)) tmp = Float64(exp(fma(t_0, y_46_re, Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))) * sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re))))); else tmp = Float64(sin(fma(t_0, y_46_im, Float64(y_46_re * atan(x_46_im, x_46_re)))) * Float64((hypot(x_46_re, x_46_im) ^ y_46_re) / Float64(1.0 + Float64(atan(x_46_im, x_46_re) * y_46_im)))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, If[Or[LessEqual[y$46$im, -1.08e-8], N[Not[LessEqual[y$46$im, 1.05e-97]], $MachinePrecision]], N[(N[Exp[N[(t$95$0 * y$46$re + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $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[(t$95$0 * y$46$im + N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] / N[(1.0 + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
\mathbf{if}\;y.im \leq -1.08 \cdot 10^{-8} \lor \neg \left(y.im \leq 1.05 \cdot 10^{-97}\right):\\
\;\;\;\;e^{\mathsf{fma}\left(t_0, y.re, \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)\right)} \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(t_0, y.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \cdot \frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{1 + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\
\end{array}
\end{array}
if y.im < -1.0800000000000001e-8 or 1.0500000000000001e-97 < y.im Initial program 40.8%
cancel-sign-sub-inv40.8%
fma-def40.8%
hypot-def40.8%
distribute-lft-neg-in40.8%
distribute-rgt-neg-out40.8%
fma-def40.8%
hypot-def76.1%
*-commutative76.1%
Simplified76.1%
add-cube-cbrt71.3%
pow373.9%
fma-udef73.9%
*-commutative73.9%
*-commutative73.9%
fma-def73.9%
Applied egg-rr73.9%
Taylor expanded in y.re around 0 41.3%
pow-base-141.3%
*-lft-identity41.3%
unpow241.3%
unpow241.3%
hypot-def77.4%
Simplified77.4%
if -1.0800000000000001e-8 < y.im < 1.0500000000000001e-97Initial program 48.4%
exp-diff48.4%
exp-to-pow48.4%
hypot-def48.4%
*-commutative48.4%
exp-prod48.4%
fma-def48.4%
hypot-def94.9%
*-commutative94.9%
Simplified94.9%
Taylor expanded in y.im around 0 94.9%
Final simplification84.6%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.re x.im))))
(if (or (<= y.im -7e-16) (not (<= y.im 8e-99)))
(*
(exp (fma t_0 y.re (* (atan2 x.im x.re) (- y.im))))
(sin (* y.im (log (hypot x.im x.re)))))
(*
(sin (fma t_0 y.im (* y.re (atan2 x.im x.re))))
(pow (hypot x.re x.im) y.re)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(hypot(x_46_re, x_46_im));
double tmp;
if ((y_46_im <= -7e-16) || !(y_46_im <= 8e-99)) {
tmp = exp(fma(t_0, y_46_re, (atan2(x_46_im, x_46_re) * -y_46_im))) * sin((y_46_im * log(hypot(x_46_im, x_46_re))));
} else {
tmp = sin(fma(t_0, y_46_im, (y_46_re * atan2(x_46_im, x_46_re)))) * pow(hypot(x_46_re, x_46_im), y_46_re);
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_re, x_46_im)) tmp = 0.0 if ((y_46_im <= -7e-16) || !(y_46_im <= 8e-99)) tmp = Float64(exp(fma(t_0, y_46_re, Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))) * sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re))))); else tmp = Float64(sin(fma(t_0, y_46_im, Float64(y_46_re * atan(x_46_im, x_46_re)))) * (hypot(x_46_re, x_46_im) ^ y_46_re)); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, If[Or[LessEqual[y$46$im, -7e-16], N[Not[LessEqual[y$46$im, 8e-99]], $MachinePrecision]], N[(N[Exp[N[(t$95$0 * y$46$re + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $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[(t$95$0 * y$46$im + N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
\mathbf{if}\;y.im \leq -7 \cdot 10^{-16} \lor \neg \left(y.im \leq 8 \cdot 10^{-99}\right):\\
\;\;\;\;e^{\mathsf{fma}\left(t_0, y.re, \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)\right)} \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(t_0, y.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \cdot {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\\
\end{array}
\end{array}
if y.im < -7.00000000000000035e-16 or 8.0000000000000002e-99 < y.im Initial program 41.6%
cancel-sign-sub-inv41.6%
fma-def41.6%
hypot-def41.6%
distribute-lft-neg-in41.6%
distribute-rgt-neg-out41.6%
fma-def41.6%
hypot-def76.7%
*-commutative76.7%
Simplified76.7%
add-cube-cbrt72.0%
pow374.5%
fma-udef74.5%
*-commutative74.5%
*-commutative74.5%
fma-def74.5%
Applied egg-rr74.5%
Taylor expanded in y.re around 0 42.2%
pow-base-142.2%
*-lft-identity42.2%
unpow242.2%
unpow242.2%
hypot-def77.9%
Simplified77.9%
if -7.00000000000000035e-16 < y.im < 8.0000000000000002e-99Initial program 47.4%
exp-diff47.4%
exp-to-pow47.4%
hypot-def47.4%
*-commutative47.4%
exp-prod47.4%
fma-def47.4%
hypot-def94.8%
*-commutative94.8%
Simplified94.8%
Taylor expanded in y.im around 0 94.8%
Final simplification84.6%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (or (<= y.im -1.05e+15) (not (<= y.im 6e-28)))
(*
(sin (* y.im (log (hypot x.im x.re))))
(exp
(-
(* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(* (atan2 x.im x.re) y.im))))
(*
(sin (fma (log (hypot x.re x.im)) y.im (* y.re (atan2 x.im x.re))))
(pow (hypot x.re x.im) 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 <= -1.05e+15) || !(y_46_im <= 6e-28)) {
tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) * exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (atan2(x_46_im, x_46_re) * y_46_im)));
} 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)))) * pow(hypot(x_46_re, x_46_im), 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 <= -1.05e+15) || !(y_46_im <= 6e-28)) tmp = Float64(sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) * exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - Float64(atan(x_46_im, x_46_re) * y_46_im)))); 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)))) * (hypot(x_46_re, x_46_im) ^ y_46_re)); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[Or[LessEqual[y$46$im, -1.05e+15], N[Not[LessEqual[y$46$im, 6e-28]], $MachinePrecision]], N[(N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $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[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.im \leq -1.05 \cdot 10^{+15} \lor \neg \left(y.im \leq 6 \cdot 10^{-28}\right):\\
\;\;\;\;\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \cdot e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\
\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 {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\\
\end{array}
\end{array}
if y.im < -1.05e15 or 6.00000000000000005e-28 < y.im Initial program 43.7%
Taylor expanded in y.re around 0 43.7%
unpow243.7%
unpow243.7%
hypot-def67.1%
Simplified67.1%
if -1.05e15 < y.im < 6.00000000000000005e-28Initial program 44.1%
exp-diff44.1%
exp-to-pow44.1%
hypot-def44.1%
*-commutative44.1%
exp-prod43.3%
fma-def43.3%
hypot-def91.3%
*-commutative91.3%
Simplified91.3%
Taylor expanded in y.im around 0 89.7%
Final simplification78.7%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re)))
(t_1
(exp
(-
(* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(* (atan2 x.im x.re) y.im)))))
(if (<= y.im -1.18e+19)
(* t_0 t_1)
(if (<= y.im 9.8e+61)
(*
(sin (fma (log (hypot x.re x.im)) y.im t_0))
(pow (hypot x.re x.im) y.re))
(* t_1 (sin t_0))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(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))))) - (atan2(x_46_im, x_46_re) * y_46_im)));
double tmp;
if (y_46_im <= -1.18e+19) {
tmp = t_0 * t_1;
} else if (y_46_im <= 9.8e+61) {
tmp = sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_0)) * pow(hypot(x_46_re, x_46_im), y_46_re);
} else {
tmp = t_1 * sin(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)) t_1 = exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - Float64(atan(x_46_im, x_46_re) * y_46_im))) tmp = 0.0 if (y_46_im <= -1.18e+19) tmp = Float64(t_0 * t_1); elseif (y_46_im <= 9.8e+61) tmp = Float64(sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_0)) * (hypot(x_46_re, x_46_im) ^ y_46_re)); else tmp = Float64(t_1 * sin(t_0)); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$im, -1.18e+19], N[(t$95$0 * t$95$1), $MachinePrecision], If[LessEqual[y$46$im, 9.8e+61], 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[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\
\mathbf{if}\;y.im \leq -1.18 \cdot 10^{+19}:\\
\;\;\;\;t_0 \cdot t_1\\
\mathbf{elif}\;y.im \leq 9.8 \cdot 10^{+61}:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, t_0\right)\right) \cdot {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;t_1 \cdot \sin t_0\\
\end{array}
\end{array}
if y.im < -1.18e19Initial program 40.8%
Taylor expanded in y.im around 0 62.1%
Taylor expanded in y.re around 0 65.7%
if -1.18e19 < y.im < 9.8000000000000005e61Initial program 43.4%
exp-diff43.4%
exp-to-pow43.4%
hypot-def43.4%
*-commutative43.4%
exp-prod42.0%
fma-def42.0%
hypot-def87.5%
*-commutative87.5%
Simplified87.5%
Taylor expanded in y.im around 0 85.6%
if 9.8000000000000005e61 < y.im Initial program 48.5%
Taylor expanded in y.im around 0 61.4%
Final simplification76.2%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* (atan2 x.im x.re) y.im))
(t_1 (* y.re (atan2 x.im x.re)))
(t_2 (log (hypot x.im x.re)))
(t_3 (sin t_1))
(t_4
(*
(exp (- (* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im))))) t_0))
t_3))
(t_5 (sin (* y.im t_2))))
(if (<= x.re -1.6e+68)
(* t_3 (exp (- (* y.re (log (- x.re))) t_0)))
(if (<= x.re -5.7e-64)
(*
t_5
(exp (- (* (atan2 x.im x.re) (- y.im)) (* y.re (log (/ -1.0 x.re))))))
(if (<= x.re -9.2e-303)
t_4
(if (<= x.re 2.8e-227)
(* t_5 (exp (* y.re t_2)))
(if (<= x.re 1.85e-56)
t_4
(*
(exp (- (* y.re (log x.re)) t_0))
(sin (+ t_1 (* 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 = atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = y_46_re * atan2(x_46_im, x_46_re);
double t_2 = log(hypot(x_46_im, x_46_re));
double t_3 = sin(t_1);
double t_4 = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0)) * t_3;
double t_5 = sin((y_46_im * t_2));
double tmp;
if (x_46_re <= -1.6e+68) {
tmp = t_3 * exp(((y_46_re * log(-x_46_re)) - t_0));
} else if (x_46_re <= -5.7e-64) {
tmp = t_5 * exp(((atan2(x_46_im, x_46_re) * -y_46_im) - (y_46_re * log((-1.0 / x_46_re)))));
} else if (x_46_re <= -9.2e-303) {
tmp = t_4;
} else if (x_46_re <= 2.8e-227) {
tmp = t_5 * exp((y_46_re * t_2));
} else if (x_46_re <= 1.85e-56) {
tmp = t_4;
} else {
tmp = exp(((y_46_re * log(x_46_re)) - t_0)) * sin((t_1 + (y_46_im * log(x_46_re))));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_2 = Math.log(Math.hypot(x_46_im, x_46_re));
double t_3 = Math.sin(t_1);
double t_4 = Math.exp(((y_46_re * Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0)) * t_3;
double t_5 = Math.sin((y_46_im * t_2));
double tmp;
if (x_46_re <= -1.6e+68) {
tmp = t_3 * Math.exp(((y_46_re * Math.log(-x_46_re)) - t_0));
} else if (x_46_re <= -5.7e-64) {
tmp = t_5 * Math.exp(((Math.atan2(x_46_im, x_46_re) * -y_46_im) - (y_46_re * Math.log((-1.0 / x_46_re)))));
} else if (x_46_re <= -9.2e-303) {
tmp = t_4;
} else if (x_46_re <= 2.8e-227) {
tmp = t_5 * Math.exp((y_46_re * t_2));
} else if (x_46_re <= 1.85e-56) {
tmp = t_4;
} else {
tmp = Math.exp(((y_46_re * Math.log(x_46_re)) - t_0)) * Math.sin((t_1 + (y_46_im * Math.log(x_46_re))));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.atan2(x_46_im, x_46_re) * y_46_im t_1 = y_46_re * math.atan2(x_46_im, x_46_re) t_2 = math.log(math.hypot(x_46_im, x_46_re)) t_3 = math.sin(t_1) t_4 = math.exp(((y_46_re * math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0)) * t_3 t_5 = math.sin((y_46_im * t_2)) tmp = 0 if x_46_re <= -1.6e+68: tmp = t_3 * math.exp(((y_46_re * math.log(-x_46_re)) - t_0)) elif x_46_re <= -5.7e-64: tmp = t_5 * math.exp(((math.atan2(x_46_im, x_46_re) * -y_46_im) - (y_46_re * math.log((-1.0 / x_46_re))))) elif x_46_re <= -9.2e-303: tmp = t_4 elif x_46_re <= 2.8e-227: tmp = t_5 * math.exp((y_46_re * t_2)) elif x_46_re <= 1.85e-56: tmp = t_4 else: tmp = math.exp(((y_46_re * math.log(x_46_re)) - t_0)) * math.sin((t_1 + (y_46_im * math.log(x_46_re)))) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(atan(x_46_im, x_46_re) * y_46_im) t_1 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_2 = log(hypot(x_46_im, x_46_re)) t_3 = sin(t_1) t_4 = Float64(exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - t_0)) * t_3) t_5 = sin(Float64(y_46_im * t_2)) tmp = 0.0 if (x_46_re <= -1.6e+68) tmp = Float64(t_3 * exp(Float64(Float64(y_46_re * log(Float64(-x_46_re))) - t_0))); elseif (x_46_re <= -5.7e-64) tmp = Float64(t_5 * exp(Float64(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)) - Float64(y_46_re * log(Float64(-1.0 / x_46_re)))))); elseif (x_46_re <= -9.2e-303) tmp = t_4; elseif (x_46_re <= 2.8e-227) tmp = Float64(t_5 * exp(Float64(y_46_re * t_2))); elseif (x_46_re <= 1.85e-56) tmp = t_4; else tmp = Float64(exp(Float64(Float64(y_46_re * log(x_46_re)) - t_0)) * sin(Float64(t_1 + Float64(y_46_im * log(x_46_re))))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = atan2(x_46_im, x_46_re) * y_46_im; t_1 = y_46_re * atan2(x_46_im, x_46_re); t_2 = log(hypot(x_46_im, x_46_re)); t_3 = sin(t_1); t_4 = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0)) * t_3; t_5 = sin((y_46_im * t_2)); tmp = 0.0; if (x_46_re <= -1.6e+68) tmp = t_3 * exp(((y_46_re * log(-x_46_re)) - t_0)); elseif (x_46_re <= -5.7e-64) tmp = t_5 * exp(((atan2(x_46_im, x_46_re) * -y_46_im) - (y_46_re * log((-1.0 / x_46_re))))); elseif (x_46_re <= -9.2e-303) tmp = t_4; elseif (x_46_re <= 2.8e-227) tmp = t_5 * exp((y_46_re * t_2)); elseif (x_46_re <= 1.85e-56) tmp = t_4; else tmp = exp(((y_46_re * log(x_46_re)) - t_0)) * sin((t_1 + (y_46_im * log(x_46_re)))); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, Block[{t$95$1 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[Sin[t$95$1], $MachinePrecision]}, Block[{t$95$4 = N[(N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision] * t$95$3), $MachinePrecision]}, Block[{t$95$5 = N[Sin[N[(y$46$im * t$95$2), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[x$46$re, -1.6e+68], N[(t$95$3 * N[Exp[N[(N[(y$46$re * N[Log[(-x$46$re)], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, -5.7e-64], N[(t$95$5 * N[Exp[N[(N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision] - N[(y$46$re * N[Log[N[(-1.0 / x$46$re), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, -9.2e-303], t$95$4, If[LessEqual[x$46$re, 2.8e-227], N[(t$95$5 * N[Exp[N[(y$46$re * t$95$2), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, 1.85e-56], t$95$4, N[(N[Exp[N[(N[(y$46$re * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(t$95$1 + N[(y$46$im * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_2 := \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
t_3 := \sin t_1\\
t_4 := e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - t_0} \cdot t_3\\
t_5 := \sin \left(y.im \cdot t_2\right)\\
\mathbf{if}\;x.re \leq -1.6 \cdot 10^{+68}:\\
\;\;\;\;t_3 \cdot e^{y.re \cdot \log \left(-x.re\right) - t_0}\\
\mathbf{elif}\;x.re \leq -5.7 \cdot 10^{-64}:\\
\;\;\;\;t_5 \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right) - y.re \cdot \log \left(\frac{-1}{x.re}\right)}\\
\mathbf{elif}\;x.re \leq -9.2 \cdot 10^{-303}:\\
\;\;\;\;t_4\\
\mathbf{elif}\;x.re \leq 2.8 \cdot 10^{-227}:\\
\;\;\;\;t_5 \cdot e^{y.re \cdot t_2}\\
\mathbf{elif}\;x.re \leq 1.85 \cdot 10^{-56}:\\
\;\;\;\;t_4\\
\mathbf{else}:\\
\;\;\;\;e^{y.re \cdot \log x.re - t_0} \cdot \sin \left(t_1 + y.im \cdot \log x.re\right)\\
\end{array}
\end{array}
if x.re < -1.59999999999999997e68Initial program 26.0%
Taylor expanded in y.im around 0 57.1%
Taylor expanded in x.re around -inf 76.3%
mul-1-neg76.3%
Simplified76.3%
if -1.59999999999999997e68 < x.re < -5.7000000000000003e-64Initial program 59.8%
cancel-sign-sub-inv59.8%
fma-def59.8%
hypot-def59.8%
distribute-lft-neg-in59.8%
distribute-rgt-neg-out59.8%
fma-def59.8%
hypot-def83.1%
*-commutative83.1%
Simplified83.1%
add-cube-cbrt76.0%
pow379.4%
fma-udef79.4%
*-commutative79.4%
*-commutative79.4%
fma-def79.4%
Applied egg-rr79.4%
Taylor expanded in y.re around 0 60.0%
pow-base-160.0%
*-lft-identity60.0%
unpow260.0%
unpow260.0%
hypot-def86.7%
Simplified86.7%
Taylor expanded in x.re around -inf 83.4%
mul-1-neg83.4%
unsub-neg83.4%
neg-mul-183.4%
*-commutative83.4%
distribute-rgt-neg-in83.4%
Simplified83.4%
if -5.7000000000000003e-64 < x.re < -9.19999999999999981e-303 or 2.7999999999999998e-227 < x.re < 1.8500000000000001e-56Initial program 60.4%
Taylor expanded in y.im around 0 74.2%
if -9.19999999999999981e-303 < x.re < 2.7999999999999998e-227Initial program 52.8%
cancel-sign-sub-inv52.8%
fma-def52.8%
hypot-def52.8%
distribute-lft-neg-in52.8%
distribute-rgt-neg-out52.8%
fma-def52.9%
hypot-def82.3%
*-commutative82.3%
Simplified82.3%
add-cube-cbrt75.8%
pow381.6%
fma-udef81.6%
*-commutative81.6%
*-commutative81.6%
fma-def81.6%
Applied egg-rr81.6%
Taylor expanded in y.re around 0 54.6%
pow-base-154.6%
*-lft-identity54.6%
unpow254.6%
unpow254.6%
hypot-def84.2%
Simplified84.2%
Taylor expanded in y.re around inf 72.7%
unpow272.7%
unpow272.7%
hypot-def71.7%
Simplified71.7%
if 1.8500000000000001e-56 < x.re Initial program 25.7%
cancel-sign-sub-inv25.7%
fma-def25.7%
hypot-def25.7%
distribute-lft-neg-in25.7%
distribute-rgt-neg-out25.7%
fma-def25.7%
hypot-def83.1%
*-commutative83.1%
Simplified83.1%
Taylor expanded in x.im around 0 81.7%
+-commutative66.2%
neg-mul-166.2%
unsub-neg66.2%
Simplified81.7%
Taylor expanded in x.im around 0 79.6%
Final simplification77.0%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* (atan2 x.im x.re) y.im))
(t_1 (* y.re (atan2 x.im x.re)))
(t_2 (sin t_1))
(t_3 (log (hypot x.im x.re)))
(t_4 (sin (* y.im t_3)))
(t_5 (exp (- (* y.re (log x.re)) t_0))))
(if (<= x.re -1.5e+52)
(* t_2 (exp (- (* y.re (log (- x.re))) t_0)))
(if (<= x.re -2.5e-67)
(*
t_4
(exp (- (* (atan2 x.im x.re) (- y.im)) (* y.re (log (/ -1.0 x.re))))))
(if (<= x.re 7.6e-60)
(*
t_1
(exp (- (* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im))))) t_0)))
(if (<= x.re 2.05e+17)
(* t_4 (exp (* y.re t_3)))
(if (<= x.re 1.95e+130) (* t_2 t_5) (* t_4 t_5))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = y_46_re * atan2(x_46_im, x_46_re);
double t_2 = sin(t_1);
double t_3 = log(hypot(x_46_im, x_46_re));
double t_4 = sin((y_46_im * t_3));
double t_5 = exp(((y_46_re * log(x_46_re)) - t_0));
double tmp;
if (x_46_re <= -1.5e+52) {
tmp = t_2 * exp(((y_46_re * log(-x_46_re)) - t_0));
} else if (x_46_re <= -2.5e-67) {
tmp = t_4 * exp(((atan2(x_46_im, x_46_re) * -y_46_im) - (y_46_re * log((-1.0 / x_46_re)))));
} else if (x_46_re <= 7.6e-60) {
tmp = t_1 * exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0));
} else if (x_46_re <= 2.05e+17) {
tmp = t_4 * exp((y_46_re * t_3));
} else if (x_46_re <= 1.95e+130) {
tmp = t_2 * t_5;
} else {
tmp = t_4 * t_5;
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_2 = Math.sin(t_1);
double t_3 = Math.log(Math.hypot(x_46_im, x_46_re));
double t_4 = Math.sin((y_46_im * t_3));
double t_5 = Math.exp(((y_46_re * Math.log(x_46_re)) - t_0));
double tmp;
if (x_46_re <= -1.5e+52) {
tmp = t_2 * Math.exp(((y_46_re * Math.log(-x_46_re)) - t_0));
} else if (x_46_re <= -2.5e-67) {
tmp = t_4 * Math.exp(((Math.atan2(x_46_im, x_46_re) * -y_46_im) - (y_46_re * Math.log((-1.0 / x_46_re)))));
} else if (x_46_re <= 7.6e-60) {
tmp = t_1 * Math.exp(((y_46_re * Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0));
} else if (x_46_re <= 2.05e+17) {
tmp = t_4 * Math.exp((y_46_re * t_3));
} else if (x_46_re <= 1.95e+130) {
tmp = t_2 * t_5;
} else {
tmp = t_4 * t_5;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.atan2(x_46_im, x_46_re) * y_46_im t_1 = y_46_re * math.atan2(x_46_im, x_46_re) t_2 = math.sin(t_1) t_3 = math.log(math.hypot(x_46_im, x_46_re)) t_4 = math.sin((y_46_im * t_3)) t_5 = math.exp(((y_46_re * math.log(x_46_re)) - t_0)) tmp = 0 if x_46_re <= -1.5e+52: tmp = t_2 * math.exp(((y_46_re * math.log(-x_46_re)) - t_0)) elif x_46_re <= -2.5e-67: tmp = t_4 * math.exp(((math.atan2(x_46_im, x_46_re) * -y_46_im) - (y_46_re * math.log((-1.0 / x_46_re))))) elif x_46_re <= 7.6e-60: tmp = t_1 * math.exp(((y_46_re * math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0)) elif x_46_re <= 2.05e+17: tmp = t_4 * math.exp((y_46_re * t_3)) elif x_46_re <= 1.95e+130: tmp = t_2 * t_5 else: tmp = t_4 * t_5 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(atan(x_46_im, x_46_re) * y_46_im) t_1 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_2 = sin(t_1) t_3 = log(hypot(x_46_im, x_46_re)) t_4 = sin(Float64(y_46_im * t_3)) t_5 = exp(Float64(Float64(y_46_re * log(x_46_re)) - t_0)) tmp = 0.0 if (x_46_re <= -1.5e+52) tmp = Float64(t_2 * exp(Float64(Float64(y_46_re * log(Float64(-x_46_re))) - t_0))); elseif (x_46_re <= -2.5e-67) tmp = Float64(t_4 * exp(Float64(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)) - Float64(y_46_re * log(Float64(-1.0 / x_46_re)))))); elseif (x_46_re <= 7.6e-60) tmp = Float64(t_1 * exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - t_0))); elseif (x_46_re <= 2.05e+17) tmp = Float64(t_4 * exp(Float64(y_46_re * t_3))); elseif (x_46_re <= 1.95e+130) tmp = Float64(t_2 * t_5); else tmp = Float64(t_4 * t_5); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = atan2(x_46_im, x_46_re) * y_46_im; t_1 = y_46_re * atan2(x_46_im, x_46_re); t_2 = sin(t_1); t_3 = log(hypot(x_46_im, x_46_re)); t_4 = sin((y_46_im * t_3)); t_5 = exp(((y_46_re * log(x_46_re)) - t_0)); tmp = 0.0; if (x_46_re <= -1.5e+52) tmp = t_2 * exp(((y_46_re * log(-x_46_re)) - t_0)); elseif (x_46_re <= -2.5e-67) tmp = t_4 * exp(((atan2(x_46_im, x_46_re) * -y_46_im) - (y_46_re * log((-1.0 / x_46_re))))); elseif (x_46_re <= 7.6e-60) tmp = t_1 * exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0)); elseif (x_46_re <= 2.05e+17) tmp = t_4 * exp((y_46_re * t_3)); elseif (x_46_re <= 1.95e+130) tmp = t_2 * t_5; else tmp = t_4 * t_5; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, Block[{t$95$1 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sin[t$95$1], $MachinePrecision]}, Block[{t$95$3 = N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$4 = N[Sin[N[(y$46$im * t$95$3), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$5 = N[Exp[N[(N[(y$46$re * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[x$46$re, -1.5e+52], N[(t$95$2 * N[Exp[N[(N[(y$46$re * N[Log[(-x$46$re)], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, -2.5e-67], N[(t$95$4 * N[Exp[N[(N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision] - N[(y$46$re * N[Log[N[(-1.0 / x$46$re), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, 7.6e-60], N[(t$95$1 * N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, 2.05e+17], N[(t$95$4 * N[Exp[N[(y$46$re * t$95$3), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, 1.95e+130], N[(t$95$2 * t$95$5), $MachinePrecision], N[(t$95$4 * t$95$5), $MachinePrecision]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_2 := \sin t_1\\
t_3 := \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
t_4 := \sin \left(y.im \cdot t_3\right)\\
t_5 := e^{y.re \cdot \log x.re - t_0}\\
\mathbf{if}\;x.re \leq -1.5 \cdot 10^{+52}:\\
\;\;\;\;t_2 \cdot e^{y.re \cdot \log \left(-x.re\right) - t_0}\\
\mathbf{elif}\;x.re \leq -2.5 \cdot 10^{-67}:\\
\;\;\;\;t_4 \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right) - y.re \cdot \log \left(\frac{-1}{x.re}\right)}\\
\mathbf{elif}\;x.re \leq 7.6 \cdot 10^{-60}:\\
\;\;\;\;t_1 \cdot e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - t_0}\\
\mathbf{elif}\;x.re \leq 2.05 \cdot 10^{+17}:\\
\;\;\;\;t_4 \cdot e^{y.re \cdot t_3}\\
\mathbf{elif}\;x.re \leq 1.95 \cdot 10^{+130}:\\
\;\;\;\;t_2 \cdot t_5\\
\mathbf{else}:\\
\;\;\;\;t_4 \cdot t_5\\
\end{array}
\end{array}
if x.re < -1.5e52Initial program 26.0%
Taylor expanded in y.im around 0 57.1%
Taylor expanded in x.re around -inf 76.3%
mul-1-neg76.3%
Simplified76.3%
if -1.5e52 < x.re < -2.4999999999999999e-67Initial program 59.2%
cancel-sign-sub-inv59.2%
fma-def59.2%
hypot-def59.2%
distribute-lft-neg-in59.2%
distribute-rgt-neg-out59.2%
fma-def59.2%
hypot-def81.1%
*-commutative81.1%
Simplified81.1%
add-cube-cbrt71.3%
pow374.4%
fma-udef74.4%
*-commutative74.4%
*-commutative74.4%
fma-def74.4%
Applied egg-rr74.4%
Taylor expanded in y.re around 0 59.4%
pow-base-159.4%
*-lft-identity59.4%
unpow259.4%
unpow259.4%
hypot-def84.4%
Simplified84.4%
Taylor expanded in x.re around -inf 78.3%
mul-1-neg78.3%
unsub-neg78.3%
neg-mul-178.3%
*-commutative78.3%
distribute-rgt-neg-in78.3%
Simplified78.3%
if -2.4999999999999999e-67 < x.re < 7.59999999999999989e-60Initial program 58.8%
Taylor expanded in y.im around 0 69.2%
Taylor expanded in y.re around 0 68.3%
if 7.59999999999999989e-60 < x.re < 2.05e17Initial program 68.1%
cancel-sign-sub-inv68.1%
fma-def68.1%
hypot-def68.1%
distribute-lft-neg-in68.1%
distribute-rgt-neg-out68.1%
fma-def68.1%
hypot-def82.4%
*-commutative82.4%
Simplified82.4%
add-cube-cbrt81.3%
pow380.7%
fma-udef80.7%
*-commutative80.7%
*-commutative80.7%
fma-def80.7%
Applied egg-rr80.7%
Taylor expanded in y.re around 0 62.0%
pow-base-162.0%
*-lft-identity62.0%
unpow262.0%
unpow262.0%
hypot-def76.3%
Simplified76.3%
Taylor expanded in y.re around inf 69.3%
unpow269.3%
unpow269.3%
hypot-def69.3%
Simplified69.3%
if 2.05e17 < x.re < 1.9500000000000001e130Initial program 53.2%
Taylor expanded in y.im around 0 74.4%
Taylor expanded in x.re around inf 87.5%
if 1.9500000000000001e130 < x.re Initial program 8.5%
cancel-sign-sub-inv8.5%
fma-def8.5%
hypot-def8.5%
distribute-lft-neg-in8.5%
distribute-rgt-neg-out8.5%
fma-def8.5%
hypot-def85.8%
*-commutative85.8%
Simplified85.8%
add-cube-cbrt78.7%
pow378.7%
fma-udef78.7%
*-commutative78.7%
*-commutative78.7%
fma-def78.7%
Applied egg-rr78.7%
Taylor expanded in y.re around 0 8.5%
pow-base-18.5%
*-lft-identity8.5%
unpow28.5%
unpow28.5%
hypot-def69.3%
Simplified69.3%
Taylor expanded in x.im around 0 69.3%
+-commutative69.3%
neg-mul-169.3%
unsub-neg69.3%
Simplified69.3%
Final simplification72.3%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* (atan2 x.im x.re) y.im)) (t_1 (* y.re (atan2 x.im x.re))))
(if (<= x.re -6.6e+59)
(* (sin t_1) (exp (- (* y.re (log (- x.re))) t_0)))
(if (<= x.re -3.9e-67)
(*
(sin (* y.im (log (hypot x.im x.re))))
(exp (- (* (atan2 x.im x.re) (- y.im)) (* y.re (log (/ -1.0 x.re))))))
(if (<= x.re 8.6e-256)
(*
t_1
(exp (- (* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im))))) t_0)))
(*
(exp (- (* y.re (log x.re)) t_0))
(sin (+ t_1 (* 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 = atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if (x_46_re <= -6.6e+59) {
tmp = sin(t_1) * exp(((y_46_re * log(-x_46_re)) - t_0));
} else if (x_46_re <= -3.9e-67) {
tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) * exp(((atan2(x_46_im, x_46_re) * -y_46_im) - (y_46_re * log((-1.0 / x_46_re)))));
} else if (x_46_re <= 8.6e-256) {
tmp = t_1 * exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0));
} else {
tmp = exp(((y_46_re * log(x_46_re)) - t_0)) * sin((t_1 + (y_46_im * log(x_46_re))));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = y_46_re * Math.atan2(x_46_im, x_46_re);
double tmp;
if (x_46_re <= -6.6e+59) {
tmp = Math.sin(t_1) * Math.exp(((y_46_re * Math.log(-x_46_re)) - t_0));
} else if (x_46_re <= -3.9e-67) {
tmp = Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re)))) * Math.exp(((Math.atan2(x_46_im, x_46_re) * -y_46_im) - (y_46_re * Math.log((-1.0 / x_46_re)))));
} else if (x_46_re <= 8.6e-256) {
tmp = t_1 * Math.exp(((y_46_re * Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0));
} else {
tmp = Math.exp(((y_46_re * Math.log(x_46_re)) - t_0)) * Math.sin((t_1 + (y_46_im * Math.log(x_46_re))));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.atan2(x_46_im, x_46_re) * y_46_im t_1 = y_46_re * math.atan2(x_46_im, x_46_re) tmp = 0 if x_46_re <= -6.6e+59: tmp = math.sin(t_1) * math.exp(((y_46_re * math.log(-x_46_re)) - t_0)) elif x_46_re <= -3.9e-67: tmp = math.sin((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) * math.exp(((math.atan2(x_46_im, x_46_re) * -y_46_im) - (y_46_re * math.log((-1.0 / x_46_re))))) elif x_46_re <= 8.6e-256: tmp = t_1 * math.exp(((y_46_re * math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0)) else: tmp = math.exp(((y_46_re * math.log(x_46_re)) - t_0)) * math.sin((t_1 + (y_46_im * math.log(x_46_re)))) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(atan(x_46_im, x_46_re) * y_46_im) t_1 = Float64(y_46_re * atan(x_46_im, x_46_re)) tmp = 0.0 if (x_46_re <= -6.6e+59) tmp = Float64(sin(t_1) * exp(Float64(Float64(y_46_re * log(Float64(-x_46_re))) - t_0))); elseif (x_46_re <= -3.9e-67) tmp = Float64(sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) * exp(Float64(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)) - Float64(y_46_re * log(Float64(-1.0 / x_46_re)))))); elseif (x_46_re <= 8.6e-256) tmp = Float64(t_1 * exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - t_0))); else tmp = Float64(exp(Float64(Float64(y_46_re * log(x_46_re)) - t_0)) * sin(Float64(t_1 + Float64(y_46_im * log(x_46_re))))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = atan2(x_46_im, x_46_re) * y_46_im; t_1 = y_46_re * atan2(x_46_im, x_46_re); tmp = 0.0; if (x_46_re <= -6.6e+59) tmp = sin(t_1) * exp(((y_46_re * log(-x_46_re)) - t_0)); elseif (x_46_re <= -3.9e-67) tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) * exp(((atan2(x_46_im, x_46_re) * -y_46_im) - (y_46_re * log((-1.0 / x_46_re))))); elseif (x_46_re <= 8.6e-256) tmp = t_1 * exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0)); else tmp = exp(((y_46_re * log(x_46_re)) - t_0)) * sin((t_1 + (y_46_im * log(x_46_re)))); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, Block[{t$95$1 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x$46$re, -6.6e+59], N[(N[Sin[t$95$1], $MachinePrecision] * N[Exp[N[(N[(y$46$re * N[Log[(-x$46$re)], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, -3.9e-67], N[(N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Exp[N[(N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision] - N[(y$46$re * N[Log[N[(-1.0 / x$46$re), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, 8.6e-256], N[(t$95$1 * N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Exp[N[(N[(y$46$re * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(t$95$1 + N[(y$46$im * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;x.re \leq -6.6 \cdot 10^{+59}:\\
\;\;\;\;\sin t_1 \cdot e^{y.re \cdot \log \left(-x.re\right) - t_0}\\
\mathbf{elif}\;x.re \leq -3.9 \cdot 10^{-67}:\\
\;\;\;\;\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right) - y.re \cdot \log \left(\frac{-1}{x.re}\right)}\\
\mathbf{elif}\;x.re \leq 8.6 \cdot 10^{-256}:\\
\;\;\;\;t_1 \cdot e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - t_0}\\
\mathbf{else}:\\
\;\;\;\;e^{y.re \cdot \log x.re - t_0} \cdot \sin \left(t_1 + y.im \cdot \log x.re\right)\\
\end{array}
\end{array}
if x.re < -6.5999999999999999e59Initial program 26.0%
Taylor expanded in y.im around 0 57.1%
Taylor expanded in x.re around -inf 76.3%
mul-1-neg76.3%
Simplified76.3%
if -6.5999999999999999e59 < x.re < -3.8999999999999998e-67Initial program 59.2%
cancel-sign-sub-inv59.2%
fma-def59.2%
hypot-def59.2%
distribute-lft-neg-in59.2%
distribute-rgt-neg-out59.2%
fma-def59.2%
hypot-def81.1%
*-commutative81.1%
Simplified81.1%
add-cube-cbrt71.3%
pow374.4%
fma-udef74.4%
*-commutative74.4%
*-commutative74.4%
fma-def74.4%
Applied egg-rr74.4%
Taylor expanded in y.re around 0 59.4%
pow-base-159.4%
*-lft-identity59.4%
unpow259.4%
unpow259.4%
hypot-def84.4%
Simplified84.4%
Taylor expanded in x.re around -inf 78.3%
mul-1-neg78.3%
unsub-neg78.3%
neg-mul-178.3%
*-commutative78.3%
distribute-rgt-neg-in78.3%
Simplified78.3%
if -3.8999999999999998e-67 < x.re < 8.6000000000000002e-256Initial program 60.5%
Taylor expanded in y.im around 0 73.3%
Taylor expanded in y.re around 0 73.3%
if 8.6000000000000002e-256 < x.re Initial program 37.1%
cancel-sign-sub-inv37.1%
fma-def37.1%
hypot-def37.1%
distribute-lft-neg-in37.1%
distribute-rgt-neg-out37.1%
fma-def37.1%
hypot-def84.7%
*-commutative84.7%
Simplified84.7%
Taylor expanded in x.im around 0 78.3%
+-commutative62.5%
neg-mul-162.5%
unsub-neg62.5%
Simplified78.3%
Taylor expanded in x.im around 0 72.8%
Final simplification74.2%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* (atan2 x.im x.re) y.im))
(t_1 (log (hypot x.im x.re)))
(t_2 (sin (* y.im t_1)))
(t_3 (* y.re (atan2 x.im x.re)))
(t_4 (sin t_3))
(t_5 (exp (- (* y.re (log x.re)) t_0))))
(if (<= x.re -2.85e-67)
(* t_4 (exp (- (* y.re (log (- x.re))) t_0)))
(if (<= x.re 4.2e-60)
(*
t_3
(exp (- (* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im))))) t_0)))
(if (<= x.re 5e+18)
(* t_2 (exp (* y.re t_1)))
(if (<= x.re 9.8e+130) (* t_4 t_5) (* t_2 t_5)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = log(hypot(x_46_im, x_46_re));
double t_2 = sin((y_46_im * t_1));
double t_3 = y_46_re * atan2(x_46_im, x_46_re);
double t_4 = sin(t_3);
double t_5 = exp(((y_46_re * log(x_46_re)) - t_0));
double tmp;
if (x_46_re <= -2.85e-67) {
tmp = t_4 * exp(((y_46_re * log(-x_46_re)) - t_0));
} else if (x_46_re <= 4.2e-60) {
tmp = t_3 * exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0));
} else if (x_46_re <= 5e+18) {
tmp = t_2 * exp((y_46_re * t_1));
} else if (x_46_re <= 9.8e+130) {
tmp = t_4 * t_5;
} else {
tmp = t_2 * t_5;
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = Math.log(Math.hypot(x_46_im, x_46_re));
double t_2 = Math.sin((y_46_im * t_1));
double t_3 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_4 = Math.sin(t_3);
double t_5 = Math.exp(((y_46_re * Math.log(x_46_re)) - t_0));
double tmp;
if (x_46_re <= -2.85e-67) {
tmp = t_4 * Math.exp(((y_46_re * Math.log(-x_46_re)) - t_0));
} else if (x_46_re <= 4.2e-60) {
tmp = t_3 * Math.exp(((y_46_re * Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0));
} else if (x_46_re <= 5e+18) {
tmp = t_2 * Math.exp((y_46_re * t_1));
} else if (x_46_re <= 9.8e+130) {
tmp = t_4 * t_5;
} else {
tmp = t_2 * t_5;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.atan2(x_46_im, x_46_re) * y_46_im t_1 = math.log(math.hypot(x_46_im, x_46_re)) t_2 = math.sin((y_46_im * t_1)) t_3 = y_46_re * math.atan2(x_46_im, x_46_re) t_4 = math.sin(t_3) t_5 = math.exp(((y_46_re * math.log(x_46_re)) - t_0)) tmp = 0 if x_46_re <= -2.85e-67: tmp = t_4 * math.exp(((y_46_re * math.log(-x_46_re)) - t_0)) elif x_46_re <= 4.2e-60: tmp = t_3 * math.exp(((y_46_re * math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0)) elif x_46_re <= 5e+18: tmp = t_2 * math.exp((y_46_re * t_1)) elif x_46_re <= 9.8e+130: tmp = t_4 * t_5 else: tmp = t_2 * t_5 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(atan(x_46_im, x_46_re) * y_46_im) t_1 = log(hypot(x_46_im, x_46_re)) t_2 = sin(Float64(y_46_im * t_1)) t_3 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_4 = sin(t_3) t_5 = exp(Float64(Float64(y_46_re * log(x_46_re)) - t_0)) tmp = 0.0 if (x_46_re <= -2.85e-67) tmp = Float64(t_4 * exp(Float64(Float64(y_46_re * log(Float64(-x_46_re))) - t_0))); elseif (x_46_re <= 4.2e-60) tmp = Float64(t_3 * exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - t_0))); elseif (x_46_re <= 5e+18) tmp = Float64(t_2 * exp(Float64(y_46_re * t_1))); elseif (x_46_re <= 9.8e+130) tmp = Float64(t_4 * t_5); else tmp = Float64(t_2 * t_5); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = atan2(x_46_im, x_46_re) * y_46_im; t_1 = log(hypot(x_46_im, x_46_re)); t_2 = sin((y_46_im * t_1)); t_3 = y_46_re * atan2(x_46_im, x_46_re); t_4 = sin(t_3); t_5 = exp(((y_46_re * log(x_46_re)) - t_0)); tmp = 0.0; if (x_46_re <= -2.85e-67) tmp = t_4 * exp(((y_46_re * log(-x_46_re)) - t_0)); elseif (x_46_re <= 4.2e-60) tmp = t_3 * exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0)); elseif (x_46_re <= 5e+18) tmp = t_2 * exp((y_46_re * t_1)); elseif (x_46_re <= 9.8e+130) tmp = t_4 * t_5; else tmp = t_2 * t_5; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, Block[{t$95$1 = N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[Sin[N[(y$46$im * t$95$1), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[Sin[t$95$3], $MachinePrecision]}, Block[{t$95$5 = N[Exp[N[(N[(y$46$re * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[x$46$re, -2.85e-67], N[(t$95$4 * N[Exp[N[(N[(y$46$re * N[Log[(-x$46$re)], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, 4.2e-60], N[(t$95$3 * N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, 5e+18], N[(t$95$2 * N[Exp[N[(y$46$re * t$95$1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, 9.8e+130], N[(t$95$4 * t$95$5), $MachinePrecision], N[(t$95$2 * t$95$5), $MachinePrecision]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_1 := \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
t_2 := \sin \left(y.im \cdot t_1\right)\\
t_3 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_4 := \sin t_3\\
t_5 := e^{y.re \cdot \log x.re - t_0}\\
\mathbf{if}\;x.re \leq -2.85 \cdot 10^{-67}:\\
\;\;\;\;t_4 \cdot e^{y.re \cdot \log \left(-x.re\right) - t_0}\\
\mathbf{elif}\;x.re \leq 4.2 \cdot 10^{-60}:\\
\;\;\;\;t_3 \cdot e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - t_0}\\
\mathbf{elif}\;x.re \leq 5 \cdot 10^{+18}:\\
\;\;\;\;t_2 \cdot e^{y.re \cdot t_1}\\
\mathbf{elif}\;x.re \leq 9.8 \cdot 10^{+130}:\\
\;\;\;\;t_4 \cdot t_5\\
\mathbf{else}:\\
\;\;\;\;t_2 \cdot t_5\\
\end{array}
\end{array}
if x.re < -2.8500000000000001e-67Initial program 39.6%
Taylor expanded in y.im around 0 57.2%
Taylor expanded in x.re around -inf 67.2%
mul-1-neg67.2%
Simplified67.2%
if -2.8500000000000001e-67 < x.re < 4.19999999999999982e-60Initial program 58.8%
Taylor expanded in y.im around 0 69.2%
Taylor expanded in y.re around 0 68.3%
if 4.19999999999999982e-60 < x.re < 5e18Initial program 68.1%
cancel-sign-sub-inv68.1%
fma-def68.1%
hypot-def68.1%
distribute-lft-neg-in68.1%
distribute-rgt-neg-out68.1%
fma-def68.1%
hypot-def82.4%
*-commutative82.4%
Simplified82.4%
add-cube-cbrt81.3%
pow380.7%
fma-udef80.7%
*-commutative80.7%
*-commutative80.7%
fma-def80.7%
Applied egg-rr80.7%
Taylor expanded in y.re around 0 62.0%
pow-base-162.0%
*-lft-identity62.0%
unpow262.0%
unpow262.0%
hypot-def76.3%
Simplified76.3%
Taylor expanded in y.re around inf 69.3%
unpow269.3%
unpow269.3%
hypot-def69.3%
Simplified69.3%
if 5e18 < x.re < 9.7999999999999991e130Initial program 53.2%
Taylor expanded in y.im around 0 74.4%
Taylor expanded in x.re around inf 87.5%
if 9.7999999999999991e130 < x.re Initial program 8.5%
cancel-sign-sub-inv8.5%
fma-def8.5%
hypot-def8.5%
distribute-lft-neg-in8.5%
distribute-rgt-neg-out8.5%
fma-def8.5%
hypot-def85.8%
*-commutative85.8%
Simplified85.8%
add-cube-cbrt78.7%
pow378.7%
fma-udef78.7%
*-commutative78.7%
*-commutative78.7%
fma-def78.7%
Applied egg-rr78.7%
Taylor expanded in y.re around 0 8.5%
pow-base-18.5%
*-lft-identity8.5%
unpow28.5%
unpow28.5%
hypot-def69.3%
Simplified69.3%
Taylor expanded in x.im around 0 69.3%
+-commutative69.3%
neg-mul-169.3%
unsub-neg69.3%
Simplified69.3%
Final simplification69.3%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* (atan2 x.im x.re) y.im))
(t_1 (* y.re (atan2 x.im x.re)))
(t_2 (log (hypot x.im x.re)))
(t_3 (exp (- (* y.re (log x.im)) t_0)))
(t_4 (sin t_1))
(t_5 (sin (* y.im t_2))))
(if (<= x.im -1.75e-126)
(* t_4 (exp (- (* y.re (log (- x.im))) t_0)))
(if (<= x.im 1.25e-189)
(* t_5 (exp (* y.re t_2)))
(if (<= x.im 1.22e-73)
(*
t_1
(exp (- (* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im))))) t_0)))
(if (<= x.im 2.3e+22) (* t_5 t_3) (* t_4 t_3)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = y_46_re * atan2(x_46_im, x_46_re);
double t_2 = log(hypot(x_46_im, x_46_re));
double t_3 = exp(((y_46_re * log(x_46_im)) - t_0));
double t_4 = sin(t_1);
double t_5 = sin((y_46_im * t_2));
double tmp;
if (x_46_im <= -1.75e-126) {
tmp = t_4 * exp(((y_46_re * log(-x_46_im)) - t_0));
} else if (x_46_im <= 1.25e-189) {
tmp = t_5 * exp((y_46_re * t_2));
} else if (x_46_im <= 1.22e-73) {
tmp = t_1 * exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0));
} else if (x_46_im <= 2.3e+22) {
tmp = t_5 * t_3;
} else {
tmp = t_4 * t_3;
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_2 = Math.log(Math.hypot(x_46_im, x_46_re));
double t_3 = Math.exp(((y_46_re * Math.log(x_46_im)) - t_0));
double t_4 = Math.sin(t_1);
double t_5 = Math.sin((y_46_im * t_2));
double tmp;
if (x_46_im <= -1.75e-126) {
tmp = t_4 * Math.exp(((y_46_re * Math.log(-x_46_im)) - t_0));
} else if (x_46_im <= 1.25e-189) {
tmp = t_5 * Math.exp((y_46_re * t_2));
} else if (x_46_im <= 1.22e-73) {
tmp = t_1 * Math.exp(((y_46_re * Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0));
} else if (x_46_im <= 2.3e+22) {
tmp = t_5 * t_3;
} else {
tmp = t_4 * t_3;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.atan2(x_46_im, x_46_re) * y_46_im t_1 = y_46_re * math.atan2(x_46_im, x_46_re) t_2 = math.log(math.hypot(x_46_im, x_46_re)) t_3 = math.exp(((y_46_re * math.log(x_46_im)) - t_0)) t_4 = math.sin(t_1) t_5 = math.sin((y_46_im * t_2)) tmp = 0 if x_46_im <= -1.75e-126: tmp = t_4 * math.exp(((y_46_re * math.log(-x_46_im)) - t_0)) elif x_46_im <= 1.25e-189: tmp = t_5 * math.exp((y_46_re * t_2)) elif x_46_im <= 1.22e-73: tmp = t_1 * math.exp(((y_46_re * math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0)) elif x_46_im <= 2.3e+22: tmp = t_5 * t_3 else: tmp = t_4 * t_3 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(atan(x_46_im, x_46_re) * y_46_im) t_1 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_2 = log(hypot(x_46_im, x_46_re)) t_3 = exp(Float64(Float64(y_46_re * log(x_46_im)) - t_0)) t_4 = sin(t_1) t_5 = sin(Float64(y_46_im * t_2)) tmp = 0.0 if (x_46_im <= -1.75e-126) tmp = Float64(t_4 * exp(Float64(Float64(y_46_re * log(Float64(-x_46_im))) - t_0))); elseif (x_46_im <= 1.25e-189) tmp = Float64(t_5 * exp(Float64(y_46_re * t_2))); elseif (x_46_im <= 1.22e-73) tmp = Float64(t_1 * exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - t_0))); elseif (x_46_im <= 2.3e+22) tmp = Float64(t_5 * t_3); else tmp = Float64(t_4 * t_3); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = atan2(x_46_im, x_46_re) * y_46_im; t_1 = y_46_re * atan2(x_46_im, x_46_re); t_2 = log(hypot(x_46_im, x_46_re)); t_3 = exp(((y_46_re * log(x_46_im)) - t_0)); t_4 = sin(t_1); t_5 = sin((y_46_im * t_2)); tmp = 0.0; if (x_46_im <= -1.75e-126) tmp = t_4 * exp(((y_46_re * log(-x_46_im)) - t_0)); elseif (x_46_im <= 1.25e-189) tmp = t_5 * exp((y_46_re * t_2)); elseif (x_46_im <= 1.22e-73) tmp = t_1 * exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0)); elseif (x_46_im <= 2.3e+22) tmp = t_5 * t_3; else tmp = t_4 * t_3; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, Block[{t$95$1 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[Exp[N[(N[(y$46$re * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$4 = N[Sin[t$95$1], $MachinePrecision]}, Block[{t$95$5 = N[Sin[N[(y$46$im * t$95$2), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[x$46$im, -1.75e-126], N[(t$95$4 * N[Exp[N[(N[(y$46$re * N[Log[(-x$46$im)], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$im, 1.25e-189], N[(t$95$5 * N[Exp[N[(y$46$re * t$95$2), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$im, 1.22e-73], N[(t$95$1 * N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$im, 2.3e+22], N[(t$95$5 * t$95$3), $MachinePrecision], N[(t$95$4 * t$95$3), $MachinePrecision]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_2 := \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
t_3 := e^{y.re \cdot \log x.im - t_0}\\
t_4 := \sin t_1\\
t_5 := \sin \left(y.im \cdot t_2\right)\\
\mathbf{if}\;x.im \leq -1.75 \cdot 10^{-126}:\\
\;\;\;\;t_4 \cdot e^{y.re \cdot \log \left(-x.im\right) - t_0}\\
\mathbf{elif}\;x.im \leq 1.25 \cdot 10^{-189}:\\
\;\;\;\;t_5 \cdot e^{y.re \cdot t_2}\\
\mathbf{elif}\;x.im \leq 1.22 \cdot 10^{-73}:\\
\;\;\;\;t_1 \cdot e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - t_0}\\
\mathbf{elif}\;x.im \leq 2.3 \cdot 10^{+22}:\\
\;\;\;\;t_5 \cdot t_3\\
\mathbf{else}:\\
\;\;\;\;t_4 \cdot t_3\\
\end{array}
\end{array}
if x.im < -1.75e-126Initial program 32.6%
Taylor expanded in y.im around 0 56.9%
Taylor expanded in x.im around -inf 67.5%
mul-1-neg67.5%
Simplified67.5%
if -1.75e-126 < x.im < 1.2499999999999999e-189Initial program 45.3%
cancel-sign-sub-inv45.3%
fma-def45.3%
hypot-def45.3%
distribute-lft-neg-in45.3%
distribute-rgt-neg-out45.3%
fma-def45.3%
hypot-def86.0%
*-commutative86.0%
Simplified86.0%
add-cube-cbrt83.4%
pow383.3%
fma-udef83.3%
*-commutative83.3%
*-commutative83.3%
fma-def83.3%
Applied egg-rr83.3%
Taylor expanded in y.re around 0 40.2%
pow-base-140.2%
*-lft-identity40.2%
unpow240.2%
unpow240.2%
hypot-def82.7%
Simplified82.7%
Taylor expanded in y.re around inf 55.5%
unpow255.5%
unpow255.5%
hypot-def62.6%
Simplified62.6%
if 1.2499999999999999e-189 < x.im < 1.22e-73Initial program 58.5%
Taylor expanded in y.im around 0 73.7%
Taylor expanded in y.re around 0 70.3%
if 1.22e-73 < x.im < 2.3000000000000002e22Initial program 73.7%
cancel-sign-sub-inv73.7%
fma-def73.7%
hypot-def73.7%
distribute-lft-neg-in73.7%
distribute-rgt-neg-out73.7%
fma-def73.7%
hypot-def86.7%
*-commutative86.7%
Simplified86.7%
add-cube-cbrt81.9%
pow382.0%
fma-udef82.0%
*-commutative82.0%
*-commutative82.0%
fma-def82.0%
Applied egg-rr82.0%
Taylor expanded in y.re around 0 67.0%
pow-base-167.0%
*-lft-identity67.0%
unpow267.0%
unpow267.0%
hypot-def80.0%
Simplified80.0%
Taylor expanded in x.re around 0 80.0%
+-commutative80.0%
neg-mul-180.0%
unsub-neg80.0%
*-commutative80.0%
Simplified80.0%
if 2.3000000000000002e22 < x.im Initial program 40.9%
Taylor expanded in y.im around 0 61.6%
Taylor expanded in x.re around 0 74.7%
Final simplification69.6%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* (atan2 x.im x.re) y.im))
(t_1 (* y.re (atan2 x.im x.re)))
(t_2 (sin t_1))
(t_3 (log (hypot x.im x.re)))
(t_4 (* (sin (* y.im t_3)) (exp (* y.re t_3)))))
(if (<= x.im -4.1e-128)
(* t_2 (exp (- (* y.re (log (- x.im))) t_0)))
(if (<= x.im 1.7e-189)
t_4
(if (<= x.im 1.4e+57)
(*
t_1
(exp (- (* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im))))) t_0)))
(if (<= x.im 7.4e+63)
t_4
(* t_2 (exp (- (* y.re (log x.im)) t_0)))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = y_46_re * atan2(x_46_im, x_46_re);
double t_2 = sin(t_1);
double t_3 = log(hypot(x_46_im, x_46_re));
double t_4 = sin((y_46_im * t_3)) * exp((y_46_re * t_3));
double tmp;
if (x_46_im <= -4.1e-128) {
tmp = t_2 * exp(((y_46_re * log(-x_46_im)) - t_0));
} else if (x_46_im <= 1.7e-189) {
tmp = t_4;
} else if (x_46_im <= 1.4e+57) {
tmp = t_1 * exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0));
} else if (x_46_im <= 7.4e+63) {
tmp = t_4;
} else {
tmp = t_2 * exp(((y_46_re * log(x_46_im)) - t_0));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_2 = Math.sin(t_1);
double t_3 = Math.log(Math.hypot(x_46_im, x_46_re));
double t_4 = Math.sin((y_46_im * t_3)) * Math.exp((y_46_re * t_3));
double tmp;
if (x_46_im <= -4.1e-128) {
tmp = t_2 * Math.exp(((y_46_re * Math.log(-x_46_im)) - t_0));
} else if (x_46_im <= 1.7e-189) {
tmp = t_4;
} else if (x_46_im <= 1.4e+57) {
tmp = t_1 * Math.exp(((y_46_re * Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0));
} else if (x_46_im <= 7.4e+63) {
tmp = t_4;
} else {
tmp = t_2 * Math.exp(((y_46_re * Math.log(x_46_im)) - t_0));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.atan2(x_46_im, x_46_re) * y_46_im t_1 = y_46_re * math.atan2(x_46_im, x_46_re) t_2 = math.sin(t_1) t_3 = math.log(math.hypot(x_46_im, x_46_re)) t_4 = math.sin((y_46_im * t_3)) * math.exp((y_46_re * t_3)) tmp = 0 if x_46_im <= -4.1e-128: tmp = t_2 * math.exp(((y_46_re * math.log(-x_46_im)) - t_0)) elif x_46_im <= 1.7e-189: tmp = t_4 elif x_46_im <= 1.4e+57: tmp = t_1 * math.exp(((y_46_re * math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0)) elif x_46_im <= 7.4e+63: tmp = t_4 else: tmp = t_2 * math.exp(((y_46_re * math.log(x_46_im)) - t_0)) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(atan(x_46_im, x_46_re) * y_46_im) t_1 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_2 = sin(t_1) t_3 = log(hypot(x_46_im, x_46_re)) t_4 = Float64(sin(Float64(y_46_im * t_3)) * exp(Float64(y_46_re * t_3))) tmp = 0.0 if (x_46_im <= -4.1e-128) tmp = Float64(t_2 * exp(Float64(Float64(y_46_re * log(Float64(-x_46_im))) - t_0))); elseif (x_46_im <= 1.7e-189) tmp = t_4; elseif (x_46_im <= 1.4e+57) tmp = Float64(t_1 * exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - t_0))); elseif (x_46_im <= 7.4e+63) tmp = t_4; else tmp = Float64(t_2 * exp(Float64(Float64(y_46_re * log(x_46_im)) - t_0))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = atan2(x_46_im, x_46_re) * y_46_im; t_1 = y_46_re * atan2(x_46_im, x_46_re); t_2 = sin(t_1); t_3 = log(hypot(x_46_im, x_46_re)); t_4 = sin((y_46_im * t_3)) * exp((y_46_re * t_3)); tmp = 0.0; if (x_46_im <= -4.1e-128) tmp = t_2 * exp(((y_46_re * log(-x_46_im)) - t_0)); elseif (x_46_im <= 1.7e-189) tmp = t_4; elseif (x_46_im <= 1.4e+57) tmp = t_1 * exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0)); elseif (x_46_im <= 7.4e+63) tmp = t_4; else tmp = t_2 * exp(((y_46_re * log(x_46_im)) - t_0)); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, Block[{t$95$1 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sin[t$95$1], $MachinePrecision]}, Block[{t$95$3 = N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$4 = N[(N[Sin[N[(y$46$im * t$95$3), $MachinePrecision]], $MachinePrecision] * N[Exp[N[(y$46$re * t$95$3), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x$46$im, -4.1e-128], N[(t$95$2 * N[Exp[N[(N[(y$46$re * N[Log[(-x$46$im)], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$im, 1.7e-189], t$95$4, If[LessEqual[x$46$im, 1.4e+57], N[(t$95$1 * N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$im, 7.4e+63], t$95$4, N[(t$95$2 * N[Exp[N[(N[(y$46$re * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_2 := \sin t_1\\
t_3 := \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
t_4 := \sin \left(y.im \cdot t_3\right) \cdot e^{y.re \cdot t_3}\\
\mathbf{if}\;x.im \leq -4.1 \cdot 10^{-128}:\\
\;\;\;\;t_2 \cdot e^{y.re \cdot \log \left(-x.im\right) - t_0}\\
\mathbf{elif}\;x.im \leq 1.7 \cdot 10^{-189}:\\
\;\;\;\;t_4\\
\mathbf{elif}\;x.im \leq 1.4 \cdot 10^{+57}:\\
\;\;\;\;t_1 \cdot e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - t_0}\\
\mathbf{elif}\;x.im \leq 7.4 \cdot 10^{+63}:\\
\;\;\;\;t_4\\
\mathbf{else}:\\
\;\;\;\;t_2 \cdot e^{y.re \cdot \log x.im - t_0}\\
\end{array}
\end{array}
if x.im < -4.1e-128Initial program 32.6%
Taylor expanded in y.im around 0 56.9%
Taylor expanded in x.im around -inf 67.5%
mul-1-neg67.5%
Simplified67.5%
if -4.1e-128 < x.im < 1.7000000000000001e-189 or 1.4e57 < x.im < 7.39999999999999937e63Initial program 48.3%
cancel-sign-sub-inv48.3%
fma-def48.3%
hypot-def48.3%
distribute-lft-neg-in48.3%
distribute-rgt-neg-out48.3%
fma-def48.3%
hypot-def87.5%
*-commutative87.5%
Simplified87.5%
add-cube-cbrt83.5%
pow383.4%
fma-udef83.4%
*-commutative83.4%
*-commutative83.4%
fma-def83.4%
Applied egg-rr83.4%
Taylor expanded in y.re around 0 43.7%
pow-base-143.7%
*-lft-identity43.7%
unpow243.7%
unpow243.7%
hypot-def83.0%
Simplified83.0%
Taylor expanded in y.re around inf 56.7%
unpow256.7%
unpow256.7%
hypot-def64.7%
Simplified64.7%
if 1.7000000000000001e-189 < x.im < 1.4e57Initial program 63.4%
Taylor expanded in y.im around 0 64.9%
Taylor expanded in y.re around 0 66.5%
if 7.39999999999999937e63 < x.im Initial program 32.5%
Taylor expanded in y.im around 0 65.8%
Taylor expanded in x.re around 0 79.8%
Final simplification68.6%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* (atan2 x.im x.re) y.im))
(t_1 (* y.re (atan2 x.im x.re)))
(t_2 (sin t_1)))
(if (<= x.im -8.4e-249)
(* t_2 (exp (- (* y.re (log (- x.im))) t_0)))
(if (<= x.im 5e+50)
(*
t_1
(exp (- (* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im))))) t_0)))
(* t_2 (exp (- (* y.re (log x.im)) t_0)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = y_46_re * atan2(x_46_im, x_46_re);
double t_2 = sin(t_1);
double tmp;
if (x_46_im <= -8.4e-249) {
tmp = t_2 * exp(((y_46_re * log(-x_46_im)) - t_0));
} else if (x_46_im <= 5e+50) {
tmp = t_1 * exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0));
} else {
tmp = t_2 * exp(((y_46_re * log(x_46_im)) - t_0));
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_0 = atan2(x_46im, x_46re) * y_46im
t_1 = y_46re * atan2(x_46im, x_46re)
t_2 = sin(t_1)
if (x_46im <= (-8.4d-249)) then
tmp = t_2 * exp(((y_46re * log(-x_46im)) - t_0))
else if (x_46im <= 5d+50) then
tmp = t_1 * exp(((y_46re * log(sqrt(((x_46re * x_46re) + (x_46im * x_46im))))) - t_0))
else
tmp = t_2 * exp(((y_46re * log(x_46im)) - t_0))
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_2 = Math.sin(t_1);
double tmp;
if (x_46_im <= -8.4e-249) {
tmp = t_2 * Math.exp(((y_46_re * Math.log(-x_46_im)) - t_0));
} else if (x_46_im <= 5e+50) {
tmp = t_1 * Math.exp(((y_46_re * Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0));
} else {
tmp = t_2 * Math.exp(((y_46_re * Math.log(x_46_im)) - t_0));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.atan2(x_46_im, x_46_re) * y_46_im t_1 = y_46_re * math.atan2(x_46_im, x_46_re) t_2 = math.sin(t_1) tmp = 0 if x_46_im <= -8.4e-249: tmp = t_2 * math.exp(((y_46_re * math.log(-x_46_im)) - t_0)) elif x_46_im <= 5e+50: tmp = t_1 * math.exp(((y_46_re * math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0)) else: tmp = t_2 * math.exp(((y_46_re * math.log(x_46_im)) - t_0)) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(atan(x_46_im, x_46_re) * y_46_im) t_1 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_2 = sin(t_1) tmp = 0.0 if (x_46_im <= -8.4e-249) tmp = Float64(t_2 * exp(Float64(Float64(y_46_re * log(Float64(-x_46_im))) - t_0))); elseif (x_46_im <= 5e+50) tmp = Float64(t_1 * exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - t_0))); else tmp = Float64(t_2 * exp(Float64(Float64(y_46_re * log(x_46_im)) - t_0))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = atan2(x_46_im, x_46_re) * y_46_im; t_1 = y_46_re * atan2(x_46_im, x_46_re); t_2 = sin(t_1); tmp = 0.0; if (x_46_im <= -8.4e-249) tmp = t_2 * exp(((y_46_re * log(-x_46_im)) - t_0)); elseif (x_46_im <= 5e+50) tmp = t_1 * exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0)); else tmp = t_2 * exp(((y_46_re * log(x_46_im)) - t_0)); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, Block[{t$95$1 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sin[t$95$1], $MachinePrecision]}, If[LessEqual[x$46$im, -8.4e-249], N[(t$95$2 * N[Exp[N[(N[(y$46$re * N[Log[(-x$46$im)], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$im, 5e+50], N[(t$95$1 * N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$2 * N[Exp[N[(N[(y$46$re * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_2 := \sin t_1\\
\mathbf{if}\;x.im \leq -8.4 \cdot 10^{-249}:\\
\;\;\;\;t_2 \cdot e^{y.re \cdot \log \left(-x.im\right) - t_0}\\
\mathbf{elif}\;x.im \leq 5 \cdot 10^{+50}:\\
\;\;\;\;t_1 \cdot e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - t_0}\\
\mathbf{else}:\\
\;\;\;\;t_2 \cdot e^{y.re \cdot \log x.im - t_0}\\
\end{array}
\end{array}
if x.im < -8.39999999999999971e-249Initial program 34.8%
Taylor expanded in y.im around 0 51.8%
Taylor expanded in x.im around -inf 60.4%
mul-1-neg60.4%
Simplified60.4%
if -8.39999999999999971e-249 < x.im < 5e50Initial program 58.6%
Taylor expanded in y.im around 0 61.9%
Taylor expanded in y.re around 0 63.0%
if 5e50 < x.im Initial program 36.4%
Taylor expanded in y.im around 0 60.6%
Taylor expanded in x.re around 0 74.1%
Final simplification64.2%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* (atan2 x.im x.re) y.im))
(t_1 (sin (* y.re (atan2 x.im x.re)))))
(if (<= x.im -1.4e-249)
(* t_1 (exp (- (* y.re (log (- x.im))) t_0)))
(if (<= x.im 3e-85)
(* t_1 (pow (hypot x.im x.re) y.re))
(* t_1 (exp (- (* y.re (log x.im)) t_0)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = sin((y_46_re * atan2(x_46_im, x_46_re)));
double tmp;
if (x_46_im <= -1.4e-249) {
tmp = t_1 * exp(((y_46_re * log(-x_46_im)) - t_0));
} else if (x_46_im <= 3e-85) {
tmp = t_1 * pow(hypot(x_46_im, x_46_re), y_46_re);
} else {
tmp = t_1 * exp(((y_46_re * log(x_46_im)) - t_0));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
double tmp;
if (x_46_im <= -1.4e-249) {
tmp = t_1 * Math.exp(((y_46_re * Math.log(-x_46_im)) - t_0));
} else if (x_46_im <= 3e-85) {
tmp = t_1 * Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
} else {
tmp = t_1 * Math.exp(((y_46_re * Math.log(x_46_im)) - t_0));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.atan2(x_46_im, x_46_re) * y_46_im t_1 = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) tmp = 0 if x_46_im <= -1.4e-249: tmp = t_1 * math.exp(((y_46_re * math.log(-x_46_im)) - t_0)) elif x_46_im <= 3e-85: tmp = t_1 * math.pow(math.hypot(x_46_im, x_46_re), y_46_re) else: tmp = t_1 * math.exp(((y_46_re * math.log(x_46_im)) - t_0)) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(atan(x_46_im, x_46_re) * y_46_im) t_1 = sin(Float64(y_46_re * atan(x_46_im, x_46_re))) tmp = 0.0 if (x_46_im <= -1.4e-249) tmp = Float64(t_1 * exp(Float64(Float64(y_46_re * log(Float64(-x_46_im))) - t_0))); elseif (x_46_im <= 3e-85) tmp = Float64(t_1 * (hypot(x_46_im, x_46_re) ^ y_46_re)); else tmp = Float64(t_1 * exp(Float64(Float64(y_46_re * log(x_46_im)) - t_0))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = atan2(x_46_im, x_46_re) * y_46_im; t_1 = sin((y_46_re * atan2(x_46_im, x_46_re))); tmp = 0.0; if (x_46_im <= -1.4e-249) tmp = t_1 * exp(((y_46_re * log(-x_46_im)) - t_0)); elseif (x_46_im <= 3e-85) tmp = t_1 * (hypot(x_46_im, x_46_re) ^ y_46_re); else tmp = t_1 * exp(((y_46_re * log(x_46_im)) - t_0)); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, Block[{t$95$1 = N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[x$46$im, -1.4e-249], N[(t$95$1 * N[Exp[N[(N[(y$46$re * N[Log[(-x$46$im)], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$im, 3e-85], N[(t$95$1 * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[Exp[N[(N[(y$46$re * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_1 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{if}\;x.im \leq -1.4 \cdot 10^{-249}:\\
\;\;\;\;t_1 \cdot e^{y.re \cdot \log \left(-x.im\right) - t_0}\\
\mathbf{elif}\;x.im \leq 3 \cdot 10^{-85}:\\
\;\;\;\;t_1 \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;t_1 \cdot e^{y.re \cdot \log x.im - t_0}\\
\end{array}
\end{array}
if x.im < -1.4e-249Initial program 34.8%
Taylor expanded in y.im around 0 51.8%
Taylor expanded in x.im around -inf 60.4%
mul-1-neg60.4%
Simplified60.4%
if -1.4e-249 < x.im < 3.00000000000000022e-85Initial program 50.3%
Taylor expanded in y.im around 0 63.9%
Taylor expanded in y.im around 0 54.2%
unpow254.2%
unpow254.2%
hypot-def56.1%
Simplified56.1%
if 3.00000000000000022e-85 < x.im Initial program 51.0%
Taylor expanded in y.im around 0 59.8%
Taylor expanded in x.re around 0 69.2%
Final simplification62.4%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (or (<= y.re -4.8e-9) (not (<= y.re 0.027))) (* (sin (* y.re (atan2 x.im x.re))) (pow (hypot x.im x.re) y.re)) (* 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 <= -4.8e-9) || !(y_46_re <= 0.027)) {
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 = y_46_re * (atan2(x_46_im, x_46_re) * exp((atan2(x_46_im, x_46_re) * -y_46_im)));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_re <= -4.8e-9) || !(y_46_re <= 0.027)) {
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 = y_46_re * (Math.atan2(x_46_im, x_46_re) * Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im)));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if (y_46_re <= -4.8e-9) or not (y_46_re <= 0.027): 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 = y_46_re * (math.atan2(x_46_im, x_46_re) * math.exp((math.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 <= -4.8e-9) || !(y_46_re <= 0.027)) 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(y_46_re * Float64(atan(x_46_im, x_46_re) * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))))); 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 <= -4.8e-9) || ~((y_46_re <= 0.027))) tmp = sin((y_46_re * atan2(x_46_im, x_46_re))) * (hypot(x_46_im, x_46_re) ^ y_46_re); else tmp = y_46_re * (atan2(x_46_im, x_46_re) * exp((atan2(x_46_im, x_46_re) * -y_46_im))); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[Or[LessEqual[y$46$re, -4.8e-9], N[Not[LessEqual[y$46$re, 0.027]], $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], 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]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq -4.8 \cdot 10^{-9} \lor \neg \left(y.re \leq 0.027\right):\\
\;\;\;\;\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}:\\
\;\;\;\;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)\\
\end{array}
\end{array}
if y.re < -4.8e-9 or 0.0269999999999999997 < y.re Initial program 43.3%
Taylor expanded in y.im around 0 75.4%
Taylor expanded in y.im around 0 68.8%
unpow268.8%
unpow268.8%
hypot-def68.8%
Simplified68.8%
if -4.8e-9 < y.re < 0.0269999999999999997Initial program 44.6%
Taylor expanded in y.im around 0 37.4%
Taylor expanded in y.re around 0 53.1%
*-commutative53.1%
distribute-lft-neg-in53.1%
Simplified53.1%
Final simplification61.3%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re))))
(if (<= y.re -2.3e-9)
(* t_0 (pow (hypot x.im x.re) y.re))
(if (<= y.re 2.25)
(* y.re (* (atan2 x.im x.re) (exp (* (atan2 x.im x.re) (- y.im)))))
(* (sin t_0) (pow x.im y.re))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if (y_46_re <= -2.3e-9) {
tmp = t_0 * pow(hypot(x_46_im, x_46_re), y_46_re);
} else if (y_46_re <= 2.25) {
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(t_0) * pow(x_46_im, 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 t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
double tmp;
if (y_46_re <= -2.3e-9) {
tmp = t_0 * Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
} else if (y_46_re <= 2.25) {
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(t_0) * Math.pow(x_46_im, y_46_re);
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = y_46_re * math.atan2(x_46_im, x_46_re) tmp = 0 if y_46_re <= -2.3e-9: tmp = t_0 * math.pow(math.hypot(x_46_im, x_46_re), y_46_re) elif y_46_re <= 2.25: 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(t_0) * math.pow(x_46_im, y_46_re) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) tmp = 0.0 if (y_46_re <= -2.3e-9) tmp = Float64(t_0 * (hypot(x_46_im, x_46_re) ^ y_46_re)); elseif (y_46_re <= 2.25) 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(t_0) * (x_46_im ^ y_46_re)); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = y_46_re * atan2(x_46_im, x_46_re); tmp = 0.0; if (y_46_re <= -2.3e-9) tmp = t_0 * (hypot(x_46_im, x_46_re) ^ y_46_re); elseif (y_46_re <= 2.25) 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(t_0) * (x_46_im ^ y_46_re); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -2.3e-9], N[(t$95$0 * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 2.25], 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[t$95$0], $MachinePrecision] * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.re \leq -2.3 \cdot 10^{-9}:\\
\;\;\;\;t_0 \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{elif}\;y.re \leq 2.25:\\
\;\;\;\;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 t_0 \cdot {x.im}^{y.re}\\
\end{array}
\end{array}
if y.re < -2.2999999999999999e-9Initial program 53.1%
Taylor expanded in y.im around 0 87.5%
Taylor expanded in y.im around 0 81.4%
unpow281.4%
unpow281.4%
hypot-def81.4%
Simplified81.4%
Taylor expanded in y.re around 0 76.7%
if -2.2999999999999999e-9 < y.re < 2.25Initial program 44.6%
Taylor expanded in y.im around 0 37.4%
Taylor expanded in y.re around 0 53.1%
*-commutative53.1%
distribute-lft-neg-in53.1%
Simplified53.1%
if 2.25 < y.re Initial program 34.3%
Taylor expanded in y.im around 0 64.3%
Taylor expanded in y.im around 0 57.3%
unpow257.3%
unpow257.3%
hypot-def57.3%
Simplified57.3%
Taylor expanded in x.re around 0 54.6%
Final simplification59.4%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re))))
(if (or (<= y.re -6.6e+16) (not (<= y.re 0.00122)))
(* (sin t_0) (pow x.im y.re))
t_0)))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if ((y_46_re <= -6.6e+16) || !(y_46_re <= 0.00122)) {
tmp = sin(t_0) * pow(x_46_im, y_46_re);
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
real(8) :: tmp
t_0 = y_46re * atan2(x_46im, x_46re)
if ((y_46re <= (-6.6d+16)) .or. (.not. (y_46re <= 0.00122d0))) then
tmp = sin(t_0) * (x_46im ** y_46re)
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
double tmp;
if ((y_46_re <= -6.6e+16) || !(y_46_re <= 0.00122)) {
tmp = Math.sin(t_0) * Math.pow(x_46_im, y_46_re);
} else {
tmp = t_0;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = y_46_re * math.atan2(x_46_im, x_46_re) tmp = 0 if (y_46_re <= -6.6e+16) or not (y_46_re <= 0.00122): tmp = math.sin(t_0) * math.pow(x_46_im, y_46_re) else: tmp = t_0 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) tmp = 0.0 if ((y_46_re <= -6.6e+16) || !(y_46_re <= 0.00122)) tmp = Float64(sin(t_0) * (x_46_im ^ y_46_re)); else tmp = t_0; end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = y_46_re * atan2(x_46_im, x_46_re); tmp = 0.0; if ((y_46_re <= -6.6e+16) || ~((y_46_re <= 0.00122))) tmp = sin(t_0) * (x_46_im ^ y_46_re); else tmp = t_0; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[y$46$re, -6.6e+16], N[Not[LessEqual[y$46$re, 0.00122]], $MachinePrecision]], N[(N[Sin[t$95$0], $MachinePrecision] * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision], t$95$0]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.re \leq -6.6 \cdot 10^{+16} \lor \neg \left(y.re \leq 0.00122\right):\\
\;\;\;\;\sin t_0 \cdot {x.im}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if y.re < -6.6e16 or 0.00121999999999999995 < y.re Initial program 41.7%
Taylor expanded in y.im around 0 74.9%
Taylor expanded in y.im around 0 67.9%
unpow267.9%
unpow267.9%
hypot-def67.9%
Simplified67.9%
Taylor expanded in x.re around 0 57.9%
if -6.6e16 < y.re < 0.00121999999999999995Initial program 46.0%
Taylor expanded in y.im around 0 40.0%
Taylor expanded in y.im around 0 24.5%
unpow224.5%
unpow224.5%
hypot-def28.9%
Simplified28.9%
Taylor expanded in y.re around 0 24.7%
Final simplification41.2%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re))))
(if (<= y.re 0.116)
(* t_0 (pow (hypot x.im x.re) y.re))
(* (sin t_0) (pow x.im y.re)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if (y_46_re <= 0.116) {
tmp = t_0 * pow(hypot(x_46_im, x_46_re), y_46_re);
} else {
tmp = sin(t_0) * pow(x_46_im, 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 t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
double tmp;
if (y_46_re <= 0.116) {
tmp = t_0 * Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
} else {
tmp = Math.sin(t_0) * Math.pow(x_46_im, y_46_re);
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = y_46_re * math.atan2(x_46_im, x_46_re) tmp = 0 if y_46_re <= 0.116: tmp = t_0 * math.pow(math.hypot(x_46_im, x_46_re), y_46_re) else: tmp = math.sin(t_0) * math.pow(x_46_im, y_46_re) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) tmp = 0.0 if (y_46_re <= 0.116) tmp = Float64(t_0 * (hypot(x_46_im, x_46_re) ^ y_46_re)); else tmp = Float64(sin(t_0) * (x_46_im ^ y_46_re)); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = y_46_re * atan2(x_46_im, x_46_re); tmp = 0.0; if (y_46_re <= 0.116) tmp = t_0 * (hypot(x_46_im, x_46_re) ^ y_46_re); else tmp = sin(t_0) * (x_46_im ^ y_46_re); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, 0.116], N[(t$95$0 * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], N[(N[Sin[t$95$0], $MachinePrecision] * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.re \leq 0.116:\\
\;\;\;\;t_0 \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;\sin t_0 \cdot {x.im}^{y.re}\\
\end{array}
\end{array}
if y.re < 0.116000000000000006Initial program 47.5%
Taylor expanded in y.im around 0 54.7%
Taylor expanded in y.im around 0 41.8%
unpow241.8%
unpow241.8%
hypot-def44.8%
Simplified44.8%
Taylor expanded in y.re around 0 43.2%
if 0.116000000000000006 < y.re Initial program 34.3%
Taylor expanded in y.im around 0 64.3%
Taylor expanded in y.im around 0 57.3%
unpow257.3%
unpow257.3%
hypot-def57.3%
Simplified57.3%
Taylor expanded in x.re around 0 54.6%
Final simplification46.3%
(FPCore (x.re x.im y.re y.im) :precision binary64 (let* ((t_0 (sin (* y.re (atan2 x.im x.re))))) (if (<= x.re 5.5e-57) (* t_0 (pow x.im y.re)) (* t_0 (pow 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 = sin((y_46_re * atan2(x_46_im, x_46_re)));
double tmp;
if (x_46_re <= 5.5e-57) {
tmp = t_0 * pow(x_46_im, y_46_re);
} else {
tmp = t_0 * pow(x_46_re, y_46_re);
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
real(8) :: tmp
t_0 = sin((y_46re * atan2(x_46im, x_46re)))
if (x_46re <= 5.5d-57) then
tmp = t_0 * (x_46im ** y_46re)
else
tmp = t_0 * (x_46re ** y_46re)
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
double tmp;
if (x_46_re <= 5.5e-57) {
tmp = t_0 * Math.pow(x_46_im, y_46_re);
} else {
tmp = t_0 * Math.pow(x_46_re, y_46_re);
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) tmp = 0 if x_46_re <= 5.5e-57: tmp = t_0 * math.pow(x_46_im, y_46_re) else: tmp = t_0 * math.pow(x_46_re, y_46_re) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin(Float64(y_46_re * atan(x_46_im, x_46_re))) tmp = 0.0 if (x_46_re <= 5.5e-57) tmp = Float64(t_0 * (x_46_im ^ y_46_re)); else tmp = Float64(t_0 * (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) t_0 = sin((y_46_re * atan2(x_46_im, x_46_re))); tmp = 0.0; if (x_46_re <= 5.5e-57) tmp = t_0 * (x_46_im ^ y_46_re); else tmp = t_0 * (x_46_re ^ y_46_re); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[x$46$re, 5.5e-57], N[(t$95$0 * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[Power[x$46$re, y$46$re], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{if}\;x.re \leq 5.5 \cdot 10^{-57}:\\
\;\;\;\;t_0 \cdot {x.im}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;t_0 \cdot {x.re}^{y.re}\\
\end{array}
\end{array}
if x.re < 5.50000000000000011e-57Initial program 50.7%
Taylor expanded in y.im around 0 64.1%
Taylor expanded in y.im around 0 49.9%
unpow249.9%
unpow249.9%
hypot-def50.5%
Simplified50.5%
Taylor expanded in x.re around 0 42.3%
if 5.50000000000000011e-57 < x.re Initial program 26.8%
Taylor expanded in y.im around 0 40.3%
Taylor expanded in y.im around 0 36.5%
unpow236.5%
unpow236.5%
hypot-def42.4%
Simplified42.4%
Taylor expanded in x.im around 0 41.1%
Final simplification42.0%
(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 43.9%
Taylor expanded in y.im around 0 57.3%
Taylor expanded in y.im around 0 46.0%
unpow246.0%
unpow246.0%
hypot-def48.2%
Simplified48.2%
Taylor expanded in y.re around 0 15.1%
Final simplification15.1%
herbie shell --seed 2024019
(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)))))