
(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 24 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%
fma-neg46.8%
hypot-def46.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%
fma-neg34.8%
hypot-def34.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%
fma-neg34.8%
hypot-def34.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%
fma-neg40.7%
hypot-def40.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%
fma-neg41.2%
hypot-def41.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%
fma-neg40.8%
hypot-def40.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%
fma-neg41.6%
hypot-def41.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
(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_0)))
(if (<= y.im -5.8e-15)
t_2
(if (<= y.im 2.25e-97)
(*
(sin (fma t_1 y.im (* y.re (atan2 x.im x.re))))
(pow (hypot x.re x.im) y.re))
(if (<= y.im 2.6e+201)
t_2
(*
(sin t_0)
(exp
(-
(* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(* (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))) * t_0;
double tmp;
if (y_46_im <= -5.8e-15) {
tmp = t_2;
} else if (y_46_im <= 2.25e-97) {
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);
} else if (y_46_im <= 2.6e+201) {
tmp = t_2;
} else {
tmp = sin(t_0) * 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)));
}
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 = Float64(exp(fma(t_1, y_46_re, Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))) * t_0) tmp = 0.0 if (y_46_im <= -5.8e-15) tmp = t_2; elseif (y_46_im <= 2.25e-97) tmp = Float64(sin(fma(t_1, y_46_im, Float64(y_46_re * atan(x_46_im, x_46_re)))) * (hypot(x_46_re, x_46_im) ^ y_46_re)); elseif (y_46_im <= 2.6e+201) tmp = t_2; else tmp = Float64(sin(t_0) * exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - 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[(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] * t$95$0), $MachinePrecision]}, If[LessEqual[y$46$im, -5.8e-15], t$95$2, If[LessEqual[y$46$im, 2.25e-97], 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[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 2.6e+201], t$95$2, N[(N[Sin[t$95$0], $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]]]]]]]
\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)} \cdot t_0\\
\mathbf{if}\;y.im \leq -5.8 \cdot 10^{-15}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y.im \leq 2.25 \cdot 10^{-97}:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(t_1, 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}\\
\mathbf{elif}\;y.im \leq 2.6 \cdot 10^{+201}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;\sin t_0 \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}\\
\end{array}
\end{array}
if y.im < -5.80000000000000037e-15 or 2.25000000000000005e-97 < y.im < 2.59999999999999985e201Initial program 39.8%
fma-neg39.8%
hypot-def39.8%
distribute-rgt-neg-out39.8%
fma-def39.8%
hypot-def74.9%
*-commutative74.9%
Simplified74.9%
add-cube-cbrt70.1%
pow373.1%
fma-udef73.1%
*-commutative73.1%
*-commutative73.1%
fma-def73.1%
Applied egg-rr73.1%
Taylor expanded in y.re around 0 39.7%
pow-base-139.7%
*-lft-identity39.7%
unpow239.7%
unpow239.7%
hypot-def75.6%
Simplified75.6%
Taylor expanded in y.im around 0 51.3%
+-commutative51.3%
unpow251.3%
unpow251.3%
hypot-def72.2%
hypot-def51.3%
unpow251.3%
unpow251.3%
+-commutative51.3%
unpow251.3%
unpow251.3%
hypot-def72.2%
Simplified72.2%
if -5.80000000000000037e-15 < y.im < 2.25000000000000005e-97Initial 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%
if 2.59999999999999985e201 < y.im Initial program 52.2%
Taylor expanded in y.re around 0 56.5%
unpow256.5%
unpow256.5%
hypot-def82.8%
Simplified82.8%
Final simplification82.1%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* (atan2 x.im x.re) y.im))
(t_1 (* (atan2 x.im x.re) (- y.im)))
(t_2 (* y.re (atan2 x.im x.re)))
(t_3 (sin t_2))
(t_4 (* y.im (log (hypot x.im x.re)))))
(if (<= x.re -7.5e+60)
(* t_3 (exp (- (* y.re (log (- x.re))) t_0)))
(if (<= x.re -2.45e-64)
(* (sin t_4) (exp (- t_1 (* y.re (log (/ -1.0 x.re))))))
(if (<= x.re -1.4e-277)
(*
(exp (- (* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im))))) t_0))
t_3)
(if (<= x.re 6.8e-44)
(* (exp (fma (log (hypot x.re x.im)) y.re t_1)) t_4)
(*
(exp (- (* y.re (log x.re)) t_0))
(sin (+ t_2 (* 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 = 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 = sin(t_2);
double t_4 = y_46_im * log(hypot(x_46_im, x_46_re));
double tmp;
if (x_46_re <= -7.5e+60) {
tmp = t_3 * exp(((y_46_re * log(-x_46_re)) - t_0));
} else if (x_46_re <= -2.45e-64) {
tmp = sin(t_4) * exp((t_1 - (y_46_re * log((-1.0 / x_46_re)))));
} else if (x_46_re <= -1.4e-277) {
tmp = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0)) * t_3;
} else if (x_46_re <= 6.8e-44) {
tmp = exp(fma(log(hypot(x_46_re, x_46_im)), y_46_re, t_1)) * t_4;
} else {
tmp = exp(((y_46_re * log(x_46_re)) - t_0)) * sin((t_2 + (y_46_im * log(x_46_re))));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(atan(x_46_im, x_46_re) * y_46_im) t_1 = Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)) t_2 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_3 = sin(t_2) t_4 = Float64(y_46_im * log(hypot(x_46_im, x_46_re))) tmp = 0.0 if (x_46_re <= -7.5e+60) tmp = Float64(t_3 * exp(Float64(Float64(y_46_re * log(Float64(-x_46_re))) - t_0))); elseif (x_46_re <= -2.45e-64) tmp = Float64(sin(t_4) * exp(Float64(t_1 - Float64(y_46_re * log(Float64(-1.0 / x_46_re)))))); elseif (x_46_re <= -1.4e-277) tmp = Float64(exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - t_0)) * t_3); elseif (x_46_re <= 6.8e-44) tmp = Float64(exp(fma(log(hypot(x_46_re, x_46_im)), y_46_re, t_1)) * t_4); else tmp = Float64(exp(Float64(Float64(y_46_re * log(x_46_re)) - t_0)) * sin(Float64(t_2 + Float64(y_46_im * log(x_46_re))))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $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[Sin[t$95$2], $MachinePrecision]}, Block[{t$95$4 = N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x$46$re, -7.5e+60], 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, -2.45e-64], N[(N[Sin[t$95$4], $MachinePrecision] * N[Exp[N[(t$95$1 - N[(y$46$re * N[Log[N[(-1.0 / x$46$re), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, -1.4e-277], 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], If[LessEqual[x$46$re, 6.8e-44], N[(N[Exp[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$re + t$95$1), $MachinePrecision]], $MachinePrecision] * t$95$4), $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$2 + 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 := \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)\\
t_2 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_3 := \sin t_2\\
t_4 := y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
\mathbf{if}\;x.re \leq -7.5 \cdot 10^{+60}:\\
\;\;\;\;t_3 \cdot e^{y.re \cdot \log \left(-x.re\right) - t_0}\\
\mathbf{elif}\;x.re \leq -2.45 \cdot 10^{-64}:\\
\;\;\;\;\sin t_4 \cdot e^{t_1 - y.re \cdot \log \left(\frac{-1}{x.re}\right)}\\
\mathbf{elif}\;x.re \leq -1.4 \cdot 10^{-277}:\\
\;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - t_0} \cdot t_3\\
\mathbf{elif}\;x.re \leq 6.8 \cdot 10^{-44}:\\
\;\;\;\;e^{\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.re, t_1\right)} \cdot t_4\\
\mathbf{else}:\\
\;\;\;\;e^{y.re \cdot \log x.re - t_0} \cdot \sin \left(t_2 + y.im \cdot \log x.re\right)\\
\end{array}
\end{array}
if x.re < -7.5e60Initial 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 -7.5e60 < x.re < -2.4500000000000001e-64Initial program 59.8%
fma-neg59.8%
hypot-def59.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%
distribute-rgt-neg-in83.4%
Simplified83.4%
if -2.4500000000000001e-64 < x.re < -1.39999999999999988e-277Initial program 61.6%
Taylor expanded in y.im around 0 79.1%
if -1.39999999999999988e-277 < x.re < 6.80000000000000033e-44Initial program 57.1%
fma-neg57.1%
hypot-def57.1%
distribute-rgt-neg-out57.1%
fma-def57.2%
hypot-def86.4%
*-commutative86.4%
Simplified86.4%
add-cube-cbrt75.3%
pow381.3%
fma-udef81.3%
*-commutative81.3%
*-commutative81.3%
fma-def81.3%
Applied egg-rr81.3%
Taylor expanded in y.re around 0 49.8%
pow-base-149.8%
*-lft-identity49.8%
unpow249.8%
unpow249.8%
hypot-def76.1%
Simplified76.1%
Taylor expanded in y.im around 0 63.1%
+-commutative63.1%
unpow263.1%
unpow263.1%
hypot-def74.9%
hypot-def63.1%
unpow263.1%
unpow263.1%
+-commutative63.1%
unpow263.1%
unpow263.1%
hypot-def74.9%
Simplified74.9%
if 6.80000000000000033e-44 < x.re Initial program 24.0%
fma-neg24.0%
hypot-def24.0%
distribute-rgt-neg-out24.0%
fma-def24.0%
hypot-def83.3%
*-commutative83.3%
Simplified83.3%
Taylor expanded in x.im around 0 83.3%
+-commutative66.8%
neg-mul-166.8%
unsub-neg66.8%
Simplified83.3%
Taylor expanded in x.im around 0 81.0%
Final simplification78.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.2e-16) (not (<= y.im 1.9e-98)))
(*
(exp (fma t_0 y.re (* (atan2 x.im x.re) (- y.im))))
(* 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 <= -1.2e-16) || !(y_46_im <= 1.9e-98)) {
tmp = exp(fma(t_0, y_46_re, (atan2(x_46_im, x_46_re) * -y_46_im))) * (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 <= -1.2e-16) || !(y_46_im <= 1.9e-98)) tmp = Float64(exp(fma(t_0, y_46_re, Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))) * 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, -1.2e-16], N[Not[LessEqual[y$46$im, 1.9e-98]], $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[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sin[N[(t$95$0 * y$46$im + N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Power[N[Sqrt[x$46$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 -1.2 \cdot 10^{-16} \lor \neg \left(y.im \leq 1.9 \cdot 10^{-98}\right):\\
\;\;\;\;e^{\mathsf{fma}\left(t_0, y.re, \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)\right)} \cdot \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(t_0, y.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \cdot {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\\
\end{array}
\end{array}
if y.im < -1.20000000000000002e-16 or 1.9000000000000002e-98 < y.im Initial program 41.6%
fma-neg41.6%
hypot-def41.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%
Taylor expanded in y.im around 0 52.8%
+-commutative52.8%
unpow252.8%
unpow252.8%
hypot-def71.2%
hypot-def52.8%
unpow252.8%
unpow252.8%
+-commutative52.8%
unpow252.8%
unpow252.8%
hypot-def71.2%
Simplified71.2%
if -1.20000000000000002e-16 < y.im < 1.9000000000000002e-98Initial 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 simplification80.5%
(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.75e+59)
(* t_3 (exp (- (* y.re (log (- x.re))) t_0)))
(if (<= x.re -6.2e-64)
(*
t_5
(exp (- (* (atan2 x.im x.re) (- y.im)) (* y.re (log (/ -1.0 x.re))))))
(if (<= x.re -9.6e-303)
t_4
(if (<= x.re 8.5e-230)
(* t_5 (exp (* y.re t_2)))
(if (<= x.re 2.6e-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.75e+59) {
tmp = t_3 * exp(((y_46_re * log(-x_46_re)) - t_0));
} else if (x_46_re <= -6.2e-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.6e-303) {
tmp = t_4;
} else if (x_46_re <= 8.5e-230) {
tmp = t_5 * exp((y_46_re * t_2));
} else if (x_46_re <= 2.6e-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.75e+59) {
tmp = t_3 * Math.exp(((y_46_re * Math.log(-x_46_re)) - t_0));
} else if (x_46_re <= -6.2e-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.6e-303) {
tmp = t_4;
} else if (x_46_re <= 8.5e-230) {
tmp = t_5 * Math.exp((y_46_re * t_2));
} else if (x_46_re <= 2.6e-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.75e+59: tmp = t_3 * math.exp(((y_46_re * math.log(-x_46_re)) - t_0)) elif x_46_re <= -6.2e-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.6e-303: tmp = t_4 elif x_46_re <= 8.5e-230: tmp = t_5 * math.exp((y_46_re * t_2)) elif x_46_re <= 2.6e-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.75e+59) tmp = Float64(t_3 * exp(Float64(Float64(y_46_re * log(Float64(-x_46_re))) - t_0))); elseif (x_46_re <= -6.2e-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.6e-303) tmp = t_4; elseif (x_46_re <= 8.5e-230) tmp = Float64(t_5 * exp(Float64(y_46_re * t_2))); elseif (x_46_re <= 2.6e-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.75e+59) tmp = t_3 * exp(((y_46_re * log(-x_46_re)) - t_0)); elseif (x_46_re <= -6.2e-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.6e-303) tmp = t_4; elseif (x_46_re <= 8.5e-230) tmp = t_5 * exp((y_46_re * t_2)); elseif (x_46_re <= 2.6e-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.75e+59], 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, -6.2e-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.6e-303], t$95$4, If[LessEqual[x$46$re, 8.5e-230], N[(t$95$5 * N[Exp[N[(y$46$re * t$95$2), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, 2.6e-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.75 \cdot 10^{+59}:\\
\;\;\;\;t_3 \cdot e^{y.re \cdot \log \left(-x.re\right) - t_0}\\
\mathbf{elif}\;x.re \leq -6.2 \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.6 \cdot 10^{-303}:\\
\;\;\;\;t_4\\
\mathbf{elif}\;x.re \leq 8.5 \cdot 10^{-230}:\\
\;\;\;\;t_5 \cdot e^{y.re \cdot t_2}\\
\mathbf{elif}\;x.re \leq 2.6 \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.75e59Initial 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.75e59 < x.re < -6.20000000000000049e-64Initial program 59.8%
fma-neg59.8%
hypot-def59.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%
distribute-rgt-neg-in83.4%
Simplified83.4%
if -6.20000000000000049e-64 < x.re < -9.6000000000000004e-303 or 8.4999999999999998e-230 < x.re < 2.59999999999999997e-56Initial program 60.4%
Taylor expanded in y.im around 0 74.2%
if -9.6000000000000004e-303 < x.re < 8.4999999999999998e-230Initial program 52.8%
fma-neg52.8%
hypot-def52.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 2.59999999999999997e-56 < x.re Initial program 25.7%
fma-neg25.7%
hypot-def25.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.22e+64)
(* t_2 (exp (- (* y.re (log (- x.re))) t_0)))
(if (<= x.re -3.1e-67)
(*
t_4
(exp (- (* (atan2 x.im x.re) (- y.im)) (* y.re (log (/ -1.0 x.re))))))
(if (<= x.re 1.2e-59)
(*
t_1
(exp (- (* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im))))) t_0)))
(if (<= x.re 5.5e+18)
(* t_4 (exp (* y.re t_3)))
(if (<= x.re 2.55e+122) (* 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.22e+64) {
tmp = t_2 * exp(((y_46_re * log(-x_46_re)) - t_0));
} else if (x_46_re <= -3.1e-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 <= 1.2e-59) {
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 <= 5.5e+18) {
tmp = t_4 * exp((y_46_re * t_3));
} else if (x_46_re <= 2.55e+122) {
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.22e+64) {
tmp = t_2 * Math.exp(((y_46_re * Math.log(-x_46_re)) - t_0));
} else if (x_46_re <= -3.1e-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 <= 1.2e-59) {
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 <= 5.5e+18) {
tmp = t_4 * Math.exp((y_46_re * t_3));
} else if (x_46_re <= 2.55e+122) {
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.22e+64: tmp = t_2 * math.exp(((y_46_re * math.log(-x_46_re)) - t_0)) elif x_46_re <= -3.1e-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 <= 1.2e-59: 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 <= 5.5e+18: tmp = t_4 * math.exp((y_46_re * t_3)) elif x_46_re <= 2.55e+122: 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.22e+64) tmp = Float64(t_2 * exp(Float64(Float64(y_46_re * log(Float64(-x_46_re))) - t_0))); elseif (x_46_re <= -3.1e-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 <= 1.2e-59) 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 <= 5.5e+18) tmp = Float64(t_4 * exp(Float64(y_46_re * t_3))); elseif (x_46_re <= 2.55e+122) 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.22e+64) tmp = t_2 * exp(((y_46_re * log(-x_46_re)) - t_0)); elseif (x_46_re <= -3.1e-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 <= 1.2e-59) 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 <= 5.5e+18) tmp = t_4 * exp((y_46_re * t_3)); elseif (x_46_re <= 2.55e+122) 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.22e+64], 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, -3.1e-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, 1.2e-59], 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, 5.5e+18], N[(t$95$4 * N[Exp[N[(y$46$re * t$95$3), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, 2.55e+122], 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.22 \cdot 10^{+64}:\\
\;\;\;\;t_2 \cdot e^{y.re \cdot \log \left(-x.re\right) - t_0}\\
\mathbf{elif}\;x.re \leq -3.1 \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 1.2 \cdot 10^{-59}:\\
\;\;\;\;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 5.5 \cdot 10^{+18}:\\
\;\;\;\;t_4 \cdot e^{y.re \cdot t_3}\\
\mathbf{elif}\;x.re \leq 2.55 \cdot 10^{+122}:\\
\;\;\;\;t_2 \cdot t_5\\
\mathbf{else}:\\
\;\;\;\;t_4 \cdot t_5\\
\end{array}
\end{array}
if x.re < -1.21999999999999994e64Initial 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.21999999999999994e64 < x.re < -3.1000000000000003e-67Initial program 59.2%
fma-neg59.2%
hypot-def59.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%
distribute-rgt-neg-in78.3%
Simplified78.3%
if -3.1000000000000003e-67 < x.re < 1.20000000000000008e-59Initial program 58.8%
Taylor expanded in y.im around 0 69.2%
Taylor expanded in y.re around 0 68.3%
if 1.20000000000000008e-59 < x.re < 5.5e18Initial program 68.1%
fma-neg68.1%
hypot-def68.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 5.5e18 < x.re < 2.55e122Initial program 61.4%
Taylor expanded in y.im around 0 78.0%
Taylor expanded in x.im around 0 85.6%
*-commutative85.6%
*-commutative85.6%
Simplified85.6%
if 2.55e122 < x.re Initial program 8.2%
fma-neg8.2%
hypot-def8.2%
distribute-rgt-neg-out8.2%
fma-def8.2%
hypot-def86.4%
*-commutative86.4%
Simplified86.4%
add-cube-cbrt79.5%
pow379.5%
fma-udef79.5%
*-commutative79.5%
*-commutative79.5%
fma-def79.5%
Applied egg-rr79.5%
Taylor expanded in y.re around 0 8.2%
pow-base-18.2%
*-lft-identity8.2%
unpow28.2%
unpow28.2%
hypot-def70.6%
Simplified70.6%
Taylor expanded in x.im around 0 70.6%
+-commutative70.6%
neg-mul-170.6%
unsub-neg70.6%
Simplified70.6%
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 (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 -3.4e-67)
(* t_4 (exp (- (* y.re (log (- x.re))) t_0)))
(if (<= x.re 1.1e-59)
(*
t_3
(exp (- (* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im))))) t_0)))
(if (<= x.re 2.8e+20)
(* t_2 (exp (* y.re t_1)))
(if (<= x.re 2.6e+122) (* 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 <= -3.4e-67) {
tmp = t_4 * exp(((y_46_re * log(-x_46_re)) - t_0));
} else if (x_46_re <= 1.1e-59) {
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 <= 2.8e+20) {
tmp = t_2 * exp((y_46_re * t_1));
} else if (x_46_re <= 2.6e+122) {
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 <= -3.4e-67) {
tmp = t_4 * Math.exp(((y_46_re * Math.log(-x_46_re)) - t_0));
} else if (x_46_re <= 1.1e-59) {
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 <= 2.8e+20) {
tmp = t_2 * Math.exp((y_46_re * t_1));
} else if (x_46_re <= 2.6e+122) {
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 <= -3.4e-67: tmp = t_4 * math.exp(((y_46_re * math.log(-x_46_re)) - t_0)) elif x_46_re <= 1.1e-59: 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 <= 2.8e+20: tmp = t_2 * math.exp((y_46_re * t_1)) elif x_46_re <= 2.6e+122: 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 <= -3.4e-67) tmp = Float64(t_4 * exp(Float64(Float64(y_46_re * log(Float64(-x_46_re))) - t_0))); elseif (x_46_re <= 1.1e-59) 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 <= 2.8e+20) tmp = Float64(t_2 * exp(Float64(y_46_re * t_1))); elseif (x_46_re <= 2.6e+122) 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 <= -3.4e-67) tmp = t_4 * exp(((y_46_re * log(-x_46_re)) - t_0)); elseif (x_46_re <= 1.1e-59) 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 <= 2.8e+20) tmp = t_2 * exp((y_46_re * t_1)); elseif (x_46_re <= 2.6e+122) 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, -3.4e-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, 1.1e-59], 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, 2.8e+20], N[(t$95$2 * N[Exp[N[(y$46$re * t$95$1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, 2.6e+122], 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 -3.4 \cdot 10^{-67}:\\
\;\;\;\;t_4 \cdot e^{y.re \cdot \log \left(-x.re\right) - t_0}\\
\mathbf{elif}\;x.re \leq 1.1 \cdot 10^{-59}:\\
\;\;\;\;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 2.8 \cdot 10^{+20}:\\
\;\;\;\;t_2 \cdot e^{y.re \cdot t_1}\\
\mathbf{elif}\;x.re \leq 2.6 \cdot 10^{+122}:\\
\;\;\;\;t_4 \cdot t_5\\
\mathbf{else}:\\
\;\;\;\;t_2 \cdot t_5\\
\end{array}
\end{array}
if x.re < -3.4000000000000001e-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 -3.4000000000000001e-67 < x.re < 1.0999999999999999e-59Initial program 58.8%
Taylor expanded in y.im around 0 69.2%
Taylor expanded in y.re around 0 68.3%
if 1.0999999999999999e-59 < x.re < 2.8e20Initial program 68.1%
fma-neg68.1%
hypot-def68.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.8e20 < x.re < 2.60000000000000007e122Initial program 61.4%
Taylor expanded in y.im around 0 78.0%
Taylor expanded in x.im around 0 85.6%
*-commutative85.6%
*-commutative85.6%
Simplified85.6%
if 2.60000000000000007e122 < x.re Initial program 8.2%
fma-neg8.2%
hypot-def8.2%
distribute-rgt-neg-out8.2%
fma-def8.2%
hypot-def86.4%
*-commutative86.4%
Simplified86.4%
add-cube-cbrt79.5%
pow379.5%
fma-udef79.5%
*-commutative79.5%
*-commutative79.5%
fma-def79.5%
Applied egg-rr79.5%
Taylor expanded in y.re around 0 8.2%
pow-base-18.2%
*-lft-identity8.2%
unpow28.2%
unpow28.2%
hypot-def70.6%
Simplified70.6%
Taylor expanded in x.im around 0 70.6%
+-commutative70.6%
neg-mul-170.6%
unsub-neg70.6%
Simplified70.6%
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 -4e-127)
(* t_4 (exp (- (* y.re (log (- x.im))) t_0)))
(if (<= x.im 3.6e-190)
(* t_5 (exp (* y.re t_2)))
(if (<= x.im 9.8e-73)
(*
t_1
(exp (- (* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im))))) t_0)))
(if (<= x.im 4.2e+23) (* 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 <= -4e-127) {
tmp = t_4 * exp(((y_46_re * log(-x_46_im)) - t_0));
} else if (x_46_im <= 3.6e-190) {
tmp = t_5 * exp((y_46_re * t_2));
} else if (x_46_im <= 9.8e-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 <= 4.2e+23) {
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 <= -4e-127) {
tmp = t_4 * Math.exp(((y_46_re * Math.log(-x_46_im)) - t_0));
} else if (x_46_im <= 3.6e-190) {
tmp = t_5 * Math.exp((y_46_re * t_2));
} else if (x_46_im <= 9.8e-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 <= 4.2e+23) {
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 <= -4e-127: tmp = t_4 * math.exp(((y_46_re * math.log(-x_46_im)) - t_0)) elif x_46_im <= 3.6e-190: tmp = t_5 * math.exp((y_46_re * t_2)) elif x_46_im <= 9.8e-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 <= 4.2e+23: 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 <= -4e-127) tmp = Float64(t_4 * exp(Float64(Float64(y_46_re * log(Float64(-x_46_im))) - t_0))); elseif (x_46_im <= 3.6e-190) tmp = Float64(t_5 * exp(Float64(y_46_re * t_2))); elseif (x_46_im <= 9.8e-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 <= 4.2e+23) 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 <= -4e-127) tmp = t_4 * exp(((y_46_re * log(-x_46_im)) - t_0)); elseif (x_46_im <= 3.6e-190) tmp = t_5 * exp((y_46_re * t_2)); elseif (x_46_im <= 9.8e-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 <= 4.2e+23) 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, -4e-127], N[(t$95$4 * N[Exp[N[(N[(y$46$re * N[Log[(-x$46$im)], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$im, 3.6e-190], N[(t$95$5 * N[Exp[N[(y$46$re * t$95$2), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$im, 9.8e-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, 4.2e+23], 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 -4 \cdot 10^{-127}:\\
\;\;\;\;t_4 \cdot e^{y.re \cdot \log \left(-x.im\right) - t_0}\\
\mathbf{elif}\;x.im \leq 3.6 \cdot 10^{-190}:\\
\;\;\;\;t_5 \cdot e^{y.re \cdot t_2}\\
\mathbf{elif}\;x.im \leq 9.8 \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 4.2 \cdot 10^{+23}:\\
\;\;\;\;t_5 \cdot t_3\\
\mathbf{else}:\\
\;\;\;\;t_4 \cdot t_3\\
\end{array}
\end{array}
if x.im < -4.0000000000000001e-127Initial 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.0000000000000001e-127 < x.im < 3.60000000000000007e-190Initial program 45.3%
fma-neg45.3%
hypot-def45.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 3.60000000000000007e-190 < x.im < 9.80000000000000057e-73Initial program 58.5%
Taylor expanded in y.im around 0 73.7%
Taylor expanded in y.re around 0 70.3%
if 9.80000000000000057e-73 < x.im < 4.2000000000000003e23Initial program 73.7%
fma-neg73.7%
hypot-def73.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 4.2000000000000003e23 < 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))))
(if (<= x.re -1.45e+66)
(* (sin t_1) (exp (- (* y.re (log (- x.re))) t_0)))
(if (<= x.re -2.5e-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 3.8e-258)
(*
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 <= -1.45e+66) {
tmp = sin(t_1) * exp(((y_46_re * log(-x_46_re)) - t_0));
} else if (x_46_re <= -2.5e-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 <= 3.8e-258) {
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 <= -1.45e+66) {
tmp = Math.sin(t_1) * Math.exp(((y_46_re * Math.log(-x_46_re)) - t_0));
} else if (x_46_re <= -2.5e-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 <= 3.8e-258) {
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 <= -1.45e+66: tmp = math.sin(t_1) * math.exp(((y_46_re * math.log(-x_46_re)) - t_0)) elif x_46_re <= -2.5e-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 <= 3.8e-258: 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 <= -1.45e+66) tmp = Float64(sin(t_1) * exp(Float64(Float64(y_46_re * log(Float64(-x_46_re))) - t_0))); elseif (x_46_re <= -2.5e-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 <= 3.8e-258) 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 <= -1.45e+66) tmp = sin(t_1) * exp(((y_46_re * log(-x_46_re)) - t_0)); elseif (x_46_re <= -2.5e-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 <= 3.8e-258) 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, -1.45e+66], 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, -2.5e-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, 3.8e-258], 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 -1.45 \cdot 10^{+66}:\\
\;\;\;\;\sin t_1 \cdot e^{y.re \cdot \log \left(-x.re\right) - t_0}\\
\mathbf{elif}\;x.re \leq -2.5 \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 3.8 \cdot 10^{-258}:\\
\;\;\;\;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 < -1.44999999999999993e66Initial 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.44999999999999993e66 < x.re < -2.4999999999999999e-67Initial program 59.2%
fma-neg59.2%
hypot-def59.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%
distribute-rgt-neg-in78.3%
Simplified78.3%
if -2.4999999999999999e-67 < x.re < 3.7999999999999998e-258Initial program 60.5%
Taylor expanded in y.im around 0 73.3%
Taylor expanded in y.re around 0 73.3%
if 3.7999999999999998e-258 < x.re Initial program 37.1%
fma-neg37.1%
hypot-def37.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 (* 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 -1.25e-125)
(* t_2 (exp (- (* y.re (log (- x.im))) t_0)))
(if (<= x.im 8.2e-189)
t_4
(if (<= x.im 9.2e+57)
(*
t_1
(exp (- (* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im))))) t_0)))
(if (<= x.im 7.8e+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 <= -1.25e-125) {
tmp = t_2 * exp(((y_46_re * log(-x_46_im)) - t_0));
} else if (x_46_im <= 8.2e-189) {
tmp = t_4;
} else if (x_46_im <= 9.2e+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.8e+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 <= -1.25e-125) {
tmp = t_2 * Math.exp(((y_46_re * Math.log(-x_46_im)) - t_0));
} else if (x_46_im <= 8.2e-189) {
tmp = t_4;
} else if (x_46_im <= 9.2e+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.8e+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 <= -1.25e-125: tmp = t_2 * math.exp(((y_46_re * math.log(-x_46_im)) - t_0)) elif x_46_im <= 8.2e-189: tmp = t_4 elif x_46_im <= 9.2e+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.8e+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 <= -1.25e-125) tmp = Float64(t_2 * exp(Float64(Float64(y_46_re * log(Float64(-x_46_im))) - t_0))); elseif (x_46_im <= 8.2e-189) tmp = t_4; elseif (x_46_im <= 9.2e+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.8e+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 <= -1.25e-125) tmp = t_2 * exp(((y_46_re * log(-x_46_im)) - t_0)); elseif (x_46_im <= 8.2e-189) tmp = t_4; elseif (x_46_im <= 9.2e+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.8e+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, -1.25e-125], 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, 8.2e-189], t$95$4, If[LessEqual[x$46$im, 9.2e+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.8e+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 -1.25 \cdot 10^{-125}:\\
\;\;\;\;t_2 \cdot e^{y.re \cdot \log \left(-x.im\right) - t_0}\\
\mathbf{elif}\;x.im \leq 8.2 \cdot 10^{-189}:\\
\;\;\;\;t_4\\
\mathbf{elif}\;x.im \leq 9.2 \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.8 \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 < -1.24999999999999992e-125Initial 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.24999999999999992e-125 < x.im < 8.2000000000000006e-189 or 9.1999999999999995e57 < x.im < 7.8e63Initial program 48.3%
fma-neg48.3%
hypot-def48.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 8.2000000000000006e-189 < x.im < 9.1999999999999995e57Initial program 63.4%
Taylor expanded in y.im around 0 64.9%
Taylor expanded in y.re around 0 66.5%
if 7.8e63 < 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 -4.7e-250)
(* t_2 (exp (- (* y.re (log (- x.im))) t_0)))
(if (<= x.im 1.55e+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 <= -4.7e-250) {
tmp = t_2 * exp(((y_46_re * log(-x_46_im)) - t_0));
} else if (x_46_im <= 1.55e+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 <= (-4.7d-250)) then
tmp = t_2 * exp(((y_46re * log(-x_46im)) - t_0))
else if (x_46im <= 1.55d+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 <= -4.7e-250) {
tmp = t_2 * Math.exp(((y_46_re * Math.log(-x_46_im)) - t_0));
} else if (x_46_im <= 1.55e+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 <= -4.7e-250: tmp = t_2 * math.exp(((y_46_re * math.log(-x_46_im)) - t_0)) elif x_46_im <= 1.55e+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 <= -4.7e-250) tmp = Float64(t_2 * exp(Float64(Float64(y_46_re * log(Float64(-x_46_im))) - t_0))); elseif (x_46_im <= 1.55e+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 <= -4.7e-250) tmp = t_2 * exp(((y_46_re * log(-x_46_im)) - t_0)); elseif (x_46_im <= 1.55e+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, -4.7e-250], 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.55e+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 -4.7 \cdot 10^{-250}:\\
\;\;\;\;t_2 \cdot e^{y.re \cdot \log \left(-x.im\right) - t_0}\\
\mathbf{elif}\;x.im \leq 1.55 \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 < -4.69999999999999982e-250Initial 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 -4.69999999999999982e-250 < x.im < 1.55000000000000001e50Initial program 58.6%
Taylor expanded in y.im around 0 61.9%
Taylor expanded in y.re around 0 63.0%
if 1.55000000000000001e50 < 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 -3.65e-249)
(* t_1 (exp (- (* y.re (log (- x.im))) t_0)))
(if (<= x.im 7.8e-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 <= -3.65e-249) {
tmp = t_1 * exp(((y_46_re * log(-x_46_im)) - t_0));
} else if (x_46_im <= 7.8e-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 <= -3.65e-249) {
tmp = t_1 * Math.exp(((y_46_re * Math.log(-x_46_im)) - t_0));
} else if (x_46_im <= 7.8e-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 <= -3.65e-249: tmp = t_1 * math.exp(((y_46_re * math.log(-x_46_im)) - t_0)) elif x_46_im <= 7.8e-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 <= -3.65e-249) tmp = Float64(t_1 * exp(Float64(Float64(y_46_re * log(Float64(-x_46_im))) - t_0))); elseif (x_46_im <= 7.8e-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 <= -3.65e-249) tmp = t_1 * exp(((y_46_re * log(-x_46_im)) - t_0)); elseif (x_46_im <= 7.8e-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, -3.65e-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, 7.8e-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 -3.65 \cdot 10^{-249}:\\
\;\;\;\;t_1 \cdot e^{y.re \cdot \log \left(-x.im\right) - t_0}\\
\mathbf{elif}\;x.im \leq 7.8 \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 < -3.6499999999999999e-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 -3.6499999999999999e-249 < x.im < 7.79999999999999977e-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 7.79999999999999977e-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 -3.2e-9) (not (<= y.re 1.75))) (* (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 <= -3.2e-9) || !(y_46_re <= 1.75)) {
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 <= -3.2e-9) || !(y_46_re <= 1.75)) {
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 <= -3.2e-9) or not (y_46_re <= 1.75): 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 <= -3.2e-9) || !(y_46_re <= 1.75)) 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 <= -3.2e-9) || ~((y_46_re <= 1.75))) 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, -3.2e-9], N[Not[LessEqual[y$46$re, 1.75]], $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 -3.2 \cdot 10^{-9} \lor \neg \left(y.re \leq 1.75\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 < -3.20000000000000012e-9 or 1.75 < 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 -3.20000000000000012e-9 < y.re < 1.75Initial program 44.6%
Taylor expanded in y.im around 0 37.4%
Taylor expanded in y.re around 0 53.1%
*-commutative53.1%
distribute-rgt-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)))
(t_1 (expm1 t_0))
(t_2 (log (+ 1.0 t_1))))
(if (<= y.im -1.05e-7)
t_2
(if (<= y.im 3.5e-130)
(log1p t_1)
(if (<= y.im 4.8e+131) (pow (pow t_0 3.0) 0.3333333333333333) t_2)))))
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 = expm1(t_0);
double t_2 = log((1.0 + t_1));
double tmp;
if (y_46_im <= -1.05e-7) {
tmp = t_2;
} else if (y_46_im <= 3.5e-130) {
tmp = log1p(t_1);
} else if (y_46_im <= 4.8e+131) {
tmp = pow(pow(t_0, 3.0), 0.3333333333333333);
} else {
tmp = t_2;
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_1 = Math.expm1(t_0);
double t_2 = Math.log((1.0 + t_1));
double tmp;
if (y_46_im <= -1.05e-7) {
tmp = t_2;
} else if (y_46_im <= 3.5e-130) {
tmp = Math.log1p(t_1);
} else if (y_46_im <= 4.8e+131) {
tmp = Math.pow(Math.pow(t_0, 3.0), 0.3333333333333333);
} else {
tmp = t_2;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = y_46_re * math.atan2(x_46_im, x_46_re) t_1 = math.expm1(t_0) t_2 = math.log((1.0 + t_1)) tmp = 0 if y_46_im <= -1.05e-7: tmp = t_2 elif y_46_im <= 3.5e-130: tmp = math.log1p(t_1) elif y_46_im <= 4.8e+131: tmp = math.pow(math.pow(t_0, 3.0), 0.3333333333333333) else: tmp = t_2 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 = expm1(t_0) t_2 = log(Float64(1.0 + t_1)) tmp = 0.0 if (y_46_im <= -1.05e-7) tmp = t_2; elseif (y_46_im <= 3.5e-130) tmp = log1p(t_1); elseif (y_46_im <= 4.8e+131) tmp = (t_0 ^ 3.0) ^ 0.3333333333333333; else tmp = t_2; 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[t$95$0] - 1), $MachinePrecision]}, Block[{t$95$2 = N[Log[N[(1.0 + t$95$1), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$im, -1.05e-7], t$95$2, If[LessEqual[y$46$im, 3.5e-130], N[Log[1 + t$95$1], $MachinePrecision], If[LessEqual[y$46$im, 4.8e+131], N[Power[N[Power[t$95$0, 3.0], $MachinePrecision], 0.3333333333333333], $MachinePrecision], t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := \mathsf{expm1}\left(t_0\right)\\
t_2 := \log \left(1 + t_1\right)\\
\mathbf{if}\;y.im \leq -1.05 \cdot 10^{-7}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y.im \leq 3.5 \cdot 10^{-130}:\\
\;\;\;\;\mathsf{log1p}\left(t_1\right)\\
\mathbf{elif}\;y.im \leq 4.8 \cdot 10^{+131}:\\
\;\;\;\;{\left({t_0}^{3}\right)}^{0.3333333333333333}\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if y.im < -1.05e-7 or 4.7999999999999999e131 < y.im Initial program 41.4%
Taylor expanded in y.im around 0 62.5%
Taylor expanded in y.re around 0 55.9%
*-commutative55.9%
distribute-rgt-neg-in55.9%
Simplified55.9%
Taylor expanded in y.im around 0 3.9%
*-commutative3.9%
log1p-expm1-u16.7%
log1p-udef38.8%
Applied egg-rr38.8%
if -1.05e-7 < y.im < 3.4999999999999999e-130Initial program 47.8%
Taylor expanded in y.im around 0 58.7%
Taylor expanded in y.re around 0 30.8%
*-commutative30.8%
distribute-rgt-neg-in30.8%
Simplified30.8%
Taylor expanded in y.im around 0 30.8%
*-commutative30.8%
log1p-expm1-u37.1%
Applied egg-rr37.1%
if 3.4999999999999999e-130 < y.im < 4.7999999999999999e131Initial program 41.1%
Taylor expanded in y.im around 0 44.1%
Taylor expanded in y.re around 0 23.0%
*-commutative23.0%
distribute-rgt-neg-in23.0%
Simplified23.0%
Taylor expanded in y.im around 0 6.2%
*-commutative6.2%
rem-cube-cbrt6.2%
add-cbrt-cube15.3%
pow-prod-down15.3%
unpow-prod-down15.3%
add-cube-cbrt15.4%
pow1/324.9%
Applied egg-rr24.9%
Final simplification35.3%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (expm1 (* y.re (atan2 x.im x.re)))))
(if (or (<= y.im -1.75e-7) (not (<= y.im 1.25e-32)))
(log (+ 1.0 t_0))
(log1p t_0))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = expm1((y_46_re * atan2(x_46_im, x_46_re)));
double tmp;
if ((y_46_im <= -1.75e-7) || !(y_46_im <= 1.25e-32)) {
tmp = log((1.0 + t_0));
} else {
tmp = log1p(t_0);
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.expm1((y_46_re * Math.atan2(x_46_im, x_46_re)));
double tmp;
if ((y_46_im <= -1.75e-7) || !(y_46_im <= 1.25e-32)) {
tmp = Math.log((1.0 + t_0));
} else {
tmp = Math.log1p(t_0);
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.expm1((y_46_re * math.atan2(x_46_im, x_46_re))) tmp = 0 if (y_46_im <= -1.75e-7) or not (y_46_im <= 1.25e-32): tmp = math.log((1.0 + t_0)) else: tmp = math.log1p(t_0) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = expm1(Float64(y_46_re * atan(x_46_im, x_46_re))) tmp = 0.0 if ((y_46_im <= -1.75e-7) || !(y_46_im <= 1.25e-32)) tmp = log(Float64(1.0 + t_0)); else tmp = log1p(t_0); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(Exp[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]] - 1), $MachinePrecision]}, If[Or[LessEqual[y$46$im, -1.75e-7], N[Not[LessEqual[y$46$im, 1.25e-32]], $MachinePrecision]], N[Log[N[(1.0 + t$95$0), $MachinePrecision]], $MachinePrecision], N[Log[1 + t$95$0], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \mathsf{expm1}\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{if}\;y.im \leq -1.75 \cdot 10^{-7} \lor \neg \left(y.im \leq 1.25 \cdot 10^{-32}\right):\\
\;\;\;\;\log \left(1 + t_0\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{log1p}\left(t_0\right)\\
\end{array}
\end{array}
if y.im < -1.74999999999999992e-7 or 1.25e-32 < y.im Initial program 42.5%
Taylor expanded in y.im around 0 59.8%
Taylor expanded in y.re around 0 50.3%
*-commutative50.3%
distribute-rgt-neg-in50.3%
Simplified50.3%
Taylor expanded in y.im around 0 3.6%
*-commutative3.6%
log1p-expm1-u14.2%
log1p-udef34.1%
Applied egg-rr34.1%
if -1.74999999999999992e-7 < y.im < 1.25e-32Initial program 45.4%
Taylor expanded in y.im around 0 54.6%
Taylor expanded in y.re around 0 27.5%
*-commutative27.5%
distribute-rgt-neg-in27.5%
Simplified27.5%
Taylor expanded in y.im around 0 27.5%
*-commutative27.5%
log1p-expm1-u32.7%
Applied egg-rr32.7%
Final simplification33.4%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (<= y.re 1.92e+130) (* y.re (* (atan2 x.im x.re) (exp (* (atan2 x.im x.re) (- y.im))))) (pow (pow (* y.re (atan2 x.im x.re)) 3.0) 0.3333333333333333)))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_re <= 1.92e+130) {
tmp = y_46_re * (atan2(x_46_im, x_46_re) * exp((atan2(x_46_im, x_46_re) * -y_46_im)));
} else {
tmp = pow(pow((y_46_re * atan2(x_46_im, x_46_re)), 3.0), 0.3333333333333333);
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: tmp
if (y_46re <= 1.92d+130) then
tmp = y_46re * (atan2(x_46im, x_46re) * exp((atan2(x_46im, x_46re) * -y_46im)))
else
tmp = ((y_46re * atan2(x_46im, x_46re)) ** 3.0d0) ** 0.3333333333333333d0
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_re <= 1.92e+130) {
tmp = y_46_re * (Math.atan2(x_46_im, x_46_re) * Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im)));
} else {
tmp = Math.pow(Math.pow((y_46_re * Math.atan2(x_46_im, x_46_re)), 3.0), 0.3333333333333333);
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if y_46_re <= 1.92e+130: tmp = y_46_re * (math.atan2(x_46_im, x_46_re) * math.exp((math.atan2(x_46_im, x_46_re) * -y_46_im))) else: tmp = math.pow(math.pow((y_46_re * math.atan2(x_46_im, x_46_re)), 3.0), 0.3333333333333333) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if (y_46_re <= 1.92e+130) tmp = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))))); else tmp = (Float64(y_46_re * atan(x_46_im, x_46_re)) ^ 3.0) ^ 0.3333333333333333; end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if (y_46_re <= 1.92e+130) tmp = y_46_re * (atan2(x_46_im, x_46_re) * exp((atan2(x_46_im, x_46_re) * -y_46_im))); else tmp = ((y_46_re * atan2(x_46_im, x_46_re)) ^ 3.0) ^ 0.3333333333333333; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[y$46$re, 1.92e+130], N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Power[N[Power[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision], 0.3333333333333333], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq 1.92 \cdot 10^{+130}:\\
\;\;\;\;y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\right)\\
\mathbf{else}:\\
\;\;\;\;{\left({\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}^{3}\right)}^{0.3333333333333333}\\
\end{array}
\end{array}
if y.re < 1.9199999999999999e130Initial program 46.0%
Taylor expanded in y.im around 0 55.9%
Taylor expanded in y.re around 0 44.4%
*-commutative44.4%
distribute-rgt-neg-in44.4%
Simplified44.4%
if 1.9199999999999999e130 < y.re Initial program 33.3%
Taylor expanded in y.im around 0 64.3%
Taylor expanded in y.re around 0 13.5%
*-commutative13.5%
distribute-rgt-neg-in13.5%
Simplified13.5%
Taylor expanded in y.im around 0 2.1%
*-commutative2.1%
rem-cube-cbrt2.1%
add-cbrt-cube17.4%
pow-prod-down17.4%
unpow-prod-down17.4%
add-cube-cbrt17.4%
pow1/333.9%
Applied egg-rr33.9%
Final simplification42.7%
(FPCore (x.re x.im y.re y.im) :precision binary64 (let* ((t_0 (* y.re (atan2 x.im x.re)))) (if (<= y.im 3.6e-142) (log1p (expm1 t_0)) (cbrt (pow t_0 3.0)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if (y_46_im <= 3.6e-142) {
tmp = log1p(expm1(t_0));
} else {
tmp = cbrt(pow(t_0, 3.0));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
double tmp;
if (y_46_im <= 3.6e-142) {
tmp = Math.log1p(Math.expm1(t_0));
} else {
tmp = Math.cbrt(Math.pow(t_0, 3.0));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) tmp = 0.0 if (y_46_im <= 3.6e-142) tmp = log1p(expm1(t_0)); else tmp = cbrt((t_0 ^ 3.0)); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, 3.6e-142], N[Log[1 + N[(Exp[t$95$0] - 1), $MachinePrecision]], $MachinePrecision], N[Power[N[Power[t$95$0, 3.0], $MachinePrecision], 1/3], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.im \leq 3.6 \cdot 10^{-142}:\\
\;\;\;\;\mathsf{log1p}\left(\mathsf{expm1}\left(t_0\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\sqrt[3]{{t_0}^{3}}\\
\end{array}
\end{array}
if y.im < 3.6e-142Initial program 44.3%
Taylor expanded in y.im around 0 59.5%
Taylor expanded in y.re around 0 40.9%
*-commutative40.9%
distribute-rgt-neg-in40.9%
Simplified40.9%
Taylor expanded in y.im around 0 21.0%
*-commutative21.0%
log1p-expm1-u31.9%
Applied egg-rr31.9%
if 3.6e-142 < y.im Initial program 43.2%
Taylor expanded in y.im around 0 53.4%
Taylor expanded in y.re around 0 36.5%
*-commutative36.5%
distribute-rgt-neg-in36.5%
Simplified36.5%
Taylor expanded in y.im around 0 4.7%
*-commutative4.7%
rem-cube-cbrt4.7%
add-cbrt-cube15.7%
pow-prod-down15.7%
unpow-prod-down15.7%
add-cube-cbrt15.7%
Applied egg-rr15.7%
Final simplification26.0%
(FPCore (x.re x.im y.re y.im) :precision binary64 (let* ((t_0 (* y.re (atan2 x.im x.re)))) (if (<= y.im 4.8e-207) (log1p (expm1 t_0)) (sqrt (pow t_0 2.0)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if (y_46_im <= 4.8e-207) {
tmp = log1p(expm1(t_0));
} else {
tmp = sqrt(pow(t_0, 2.0));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
double tmp;
if (y_46_im <= 4.8e-207) {
tmp = Math.log1p(Math.expm1(t_0));
} else {
tmp = Math.sqrt(Math.pow(t_0, 2.0));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = y_46_re * math.atan2(x_46_im, x_46_re) tmp = 0 if y_46_im <= 4.8e-207: tmp = math.log1p(math.expm1(t_0)) else: tmp = math.sqrt(math.pow(t_0, 2.0)) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) tmp = 0.0 if (y_46_im <= 4.8e-207) tmp = log1p(expm1(t_0)); else tmp = sqrt((t_0 ^ 2.0)); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, 4.8e-207], N[Log[1 + N[(Exp[t$95$0] - 1), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[Power[t$95$0, 2.0], $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.im \leq 4.8 \cdot 10^{-207}:\\
\;\;\;\;\mathsf{log1p}\left(\mathsf{expm1}\left(t_0\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\sqrt{{t_0}^{2}}\\
\end{array}
\end{array}
if y.im < 4.79999999999999978e-207Initial program 44.9%
Taylor expanded in y.im around 0 59.7%
Taylor expanded in y.re around 0 41.1%
*-commutative41.1%
distribute-rgt-neg-in41.1%
Simplified41.1%
Taylor expanded in y.im around 0 19.7%
*-commutative19.7%
log1p-expm1-u31.4%
Applied egg-rr31.4%
if 4.79999999999999978e-207 < y.im Initial program 42.4%
Taylor expanded in y.im around 0 53.7%
Taylor expanded in y.re around 0 36.8%
*-commutative36.8%
distribute-rgt-neg-in36.8%
Simplified36.8%
Taylor expanded in y.im around 0 8.3%
*-commutative8.3%
add-sqr-sqrt6.0%
sqrt-unprod19.3%
pow219.3%
Applied egg-rr19.3%
Final simplification26.5%
(FPCore (x.re x.im y.re y.im) :precision binary64 (log1p (expm1 (* y.re (atan2 x.im x.re)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return log1p(expm1((y_46_re * atan2(x_46_im, x_46_re))));
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return Math.log1p(Math.expm1((y_46_re * Math.atan2(x_46_im, x_46_re))));
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): return math.log1p(math.expm1((y_46_re * math.atan2(x_46_im, x_46_re))))
function code(x_46_re, x_46_im, y_46_re, y_46_im) return log1p(expm1(Float64(y_46_re * atan(x_46_im, x_46_re)))) end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[Log[1 + N[(Exp[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]] - 1), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\mathsf{log1p}\left(\mathsf{expm1}\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)
\end{array}
Initial program 43.9%
Taylor expanded in y.im around 0 57.3%
Taylor expanded in y.re around 0 39.3%
*-commutative39.3%
distribute-rgt-neg-in39.3%
Simplified39.3%
Taylor expanded in y.im around 0 15.1%
*-commutative15.1%
log1p-expm1-u23.1%
Applied egg-rr23.1%
Final simplification23.1%
(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.re around 0 39.3%
*-commutative39.3%
distribute-rgt-neg-in39.3%
Simplified39.3%
Taylor expanded in y.im 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)))))