
(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 23 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (sqrt (+ (* x.re x.re) (* x.im x.im))))))
(*
(exp (- (* t_0 y.re) (* (atan2 x.im x.re) y.im)))
(sin (+ (* t_0 y.im) (* (atan2 x.im x.re) y.re))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
return exp(((t_0 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin(((t_0 * y_46_im) + (atan2(x_46_im, x_46_re) * y_46_re)));
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
t_0 = log(sqrt(((x_46re * x_46re) + (x_46im * x_46im))))
code = exp(((t_0 * y_46re) - (atan2(x_46im, x_46re) * y_46im))) * sin(((t_0 * y_46im) + (atan2(x_46im, x_46re) * y_46re)))
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
return Math.exp(((t_0 * y_46_re) - (Math.atan2(x_46_im, x_46_re) * y_46_im))) * Math.sin(((t_0 * y_46_im) + (Math.atan2(x_46_im, x_46_re) * y_46_re)));
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) return math.exp(((t_0 * y_46_re) - (math.atan2(x_46_im, x_46_re) * y_46_im))) * math.sin(((t_0 * y_46_im) + (math.atan2(x_46_im, x_46_re) * y_46_re)))
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) return Float64(exp(Float64(Float64(t_0 * y_46_re) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * sin(Float64(Float64(t_0 * y_46_im) + Float64(atan(x_46_im, x_46_re) * y_46_re)))) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))); tmp = exp(((t_0 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin(((t_0 * y_46_im) + (atan2(x_46_im, x_46_re) * y_46_re))); end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]}, N[(N[Exp[N[(N[(t$95$0 * y$46$re), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(N[(t$95$0 * y$46$im), $MachinePrecision] + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)\\
e^{t\_0 \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(t\_0 \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)
\end{array}
\end{array}
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re))) (t_1 (log (hypot x.re x.im))))
(if (<= x.re 3.8e+79)
(*
(exp (fma t_1 y.re (* (atan2 x.im x.re) (- y.im))))
(sin (fma t_1 y.im t_0)))
(*
(exp (- (* y.re (log x.re)) (* (atan2 x.im x.re) y.im)))
(sin (+ t_0 (* y.im (expm1 (log1p (log x.re))))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = log(hypot(x_46_re, x_46_im));
double tmp;
if (x_46_re <= 3.8e+79) {
tmp = exp(fma(t_1, y_46_re, (atan2(x_46_im, x_46_re) * -y_46_im))) * sin(fma(t_1, y_46_im, t_0));
} else {
tmp = exp(((y_46_re * log(x_46_re)) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin((t_0 + (y_46_im * expm1(log1p(log(x_46_re))))));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_1 = log(hypot(x_46_re, x_46_im)) tmp = 0.0 if (x_46_re <= 3.8e+79) tmp = Float64(exp(fma(t_1, y_46_re, Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))) * sin(fma(t_1, y_46_im, t_0))); else tmp = Float64(exp(Float64(Float64(y_46_re * log(x_46_re)) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * sin(Float64(t_0 + Float64(y_46_im * expm1(log1p(log(x_46_re))))))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, If[LessEqual[x$46$re, 3.8e+79], 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] * N[Sin[N[(t$95$1 * y$46$im + t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Exp[N[(N[(y$46$re * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(t$95$0 + N[(y$46$im * N[(Exp[N[Log[1 + N[Log[x$46$re], $MachinePrecision]], $MachinePrecision]] - 1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
\mathbf{if}\;x.re \leq 3.8 \cdot 10^{+79}:\\
\;\;\;\;e^{\mathsf{fma}\left(t\_1, y.re, \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)\right)} \cdot \sin \left(\mathsf{fma}\left(t\_1, y.im, t\_0\right)\right)\\
\mathbf{else}:\\
\;\;\;\;e^{y.re \cdot \log x.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(t\_0 + y.im \cdot \mathsf{expm1}\left(\mathsf{log1p}\left(\log x.re\right)\right)\right)\\
\end{array}
\end{array}
if x.re < 3.8000000000000002e79Initial program 45.2%
fmm-def45.2%
hypot-define45.2%
distribute-rgt-neg-out45.2%
fma-define45.3%
hypot-define78.6%
*-commutative78.6%
Simplified78.6%
if 3.8000000000000002e79 < x.re Initial program 15.0%
expm1-log1p-u15.0%
expm1-undefine8.0%
*-commutative8.0%
hypot-define33.2%
Applied egg-rr33.2%
expm1-define50.2%
*-commutative50.2%
hypot-undefine15.0%
unpow215.0%
unpow215.0%
+-commutative15.0%
unpow215.0%
unpow215.0%
hypot-undefine50.2%
Simplified50.2%
Taylor expanded in x.im around 0 75.4%
expm1-log1p-u81.3%
expm1-undefine81.3%
Applied egg-rr81.3%
expm1-define81.3%
Simplified81.3%
Final simplification79.0%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.re x.im))))
(if (<= y.re -4e+184)
(*
(sin (* y.re (cbrt (pow (atan2 x.im x.re) 3.0))))
(pow (hypot x.im x.re) y.re))
(if (or (<= y.re -1e-52) (not (<= y.re 1e-7)))
(*
(exp (fma t_0 y.re (* (atan2 x.im x.re) (- y.im))))
(sin
(*
y.re
(+ (atan2 x.im x.re) (* y.im (/ (log (hypot x.im x.re)) y.re))))))
(*
(sin (fma t_0 y.im (* y.re (atan2 x.im x.re))))
(/
(pow (hypot x.re x.im) y.re)
(pow (exp y.im) (atan2 x.im x.re))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(hypot(x_46_re, x_46_im));
double tmp;
if (y_46_re <= -4e+184) {
tmp = sin((y_46_re * cbrt(pow(atan2(x_46_im, x_46_re), 3.0)))) * pow(hypot(x_46_im, x_46_re), y_46_re);
} else if ((y_46_re <= -1e-52) || !(y_46_re <= 1e-7)) {
tmp = exp(fma(t_0, y_46_re, (atan2(x_46_im, x_46_re) * -y_46_im))) * sin((y_46_re * (atan2(x_46_im, x_46_re) + (y_46_im * (log(hypot(x_46_im, x_46_re)) / y_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) / pow(exp(y_46_im), atan2(x_46_im, x_46_re)));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_re, x_46_im)) tmp = 0.0 if (y_46_re <= -4e+184) tmp = Float64(sin(Float64(y_46_re * cbrt((atan(x_46_im, x_46_re) ^ 3.0)))) * (hypot(x_46_im, x_46_re) ^ y_46_re)); elseif ((y_46_re <= -1e-52) || !(y_46_re <= 1e-7)) 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_re * Float64(atan(x_46_im, x_46_re) + Float64(y_46_im * Float64(log(hypot(x_46_im, x_46_re)) / y_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) / (exp(y_46_im) ^ atan(x_46_im, x_46_re)))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -4e+184], N[(N[Sin[N[(y$46$re * N[Power[N[Power[N[ArcTan[x$46$im / x$46$re], $MachinePrecision], 3.0], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y$46$re, -1e-52], N[Not[LessEqual[y$46$re, 1e-7]], $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$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] + N[(y$46$im * N[(N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision] / y$46$re), $MachinePrecision]), $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[Power[N[Exp[y$46$im], $MachinePrecision], N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
\mathbf{if}\;y.re \leq -4 \cdot 10^{+184}:\\
\;\;\;\;\sin \left(y.re \cdot \sqrt[3]{{\tan^{-1}_* \frac{x.im}{x.re}}^{3}}\right) \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{elif}\;y.re \leq -1 \cdot 10^{-52} \lor \neg \left(y.re \leq 10^{-7}\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.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} + y.im \cdot \frac{\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)}{y.re}\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}}{{\left(e^{y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}}\\
\end{array}
\end{array}
if y.re < -4.00000000000000007e184Initial program 45.2%
fmm-def45.2%
hypot-define45.2%
distribute-rgt-neg-out45.2%
fma-define45.2%
hypot-define77.4%
*-commutative77.4%
Simplified77.4%
Taylor expanded in y.im around 0 80.7%
unpow280.7%
unpow280.7%
hypot-undefine80.7%
Simplified80.7%
add-cbrt-cube90.4%
pow390.4%
Applied egg-rr90.4%
if -4.00000000000000007e184 < y.re < -1e-52 or 9.9999999999999995e-8 < y.re Initial program 38.8%
fmm-def38.8%
hypot-define38.8%
distribute-rgt-neg-out38.8%
fma-define38.8%
hypot-define75.6%
*-commutative75.6%
Simplified75.6%
Taylor expanded in y.re around inf 38.0%
+-commutative38.0%
associate-/l*39.4%
unpow239.4%
unpow239.4%
hypot-undefine75.4%
Simplified75.4%
if -1e-52 < y.re < 9.9999999999999995e-8Initial program 41.3%
exp-diff41.3%
exp-to-pow41.3%
hypot-define41.3%
*-commutative41.3%
exp-prod40.9%
fma-define40.9%
hypot-define79.1%
*-commutative79.1%
Simplified79.1%
Final simplification78.7%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.im x.re))))
(if (<= y.re -5.5e+184)
(*
(sin (* y.re (cbrt (pow (atan2 x.im x.re) 3.0))))
(pow (hypot x.im x.re) y.re))
(if (or (<= y.re -7e-53) (not (<= y.re 2.5)))
(*
(exp (fma (log (hypot x.re x.im)) y.re (* (atan2 x.im x.re) (- y.im))))
(sin (* y.re (+ (atan2 x.im x.re) (* y.im (/ t_0 y.re))))))
(*
(/ (pow (hypot x.re x.im) y.re) (pow (exp y.im) (atan2 x.im x.re)))
(sin (* y.im (+ t_0 (* y.re (/ (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_im, x_46_re));
double tmp;
if (y_46_re <= -5.5e+184) {
tmp = sin((y_46_re * cbrt(pow(atan2(x_46_im, x_46_re), 3.0)))) * pow(hypot(x_46_im, x_46_re), y_46_re);
} else if ((y_46_re <= -7e-53) || !(y_46_re <= 2.5)) {
tmp = exp(fma(log(hypot(x_46_re, x_46_im)), y_46_re, (atan2(x_46_im, x_46_re) * -y_46_im))) * sin((y_46_re * (atan2(x_46_im, x_46_re) + (y_46_im * (t_0 / y_46_re)))));
} else {
tmp = (pow(hypot(x_46_re, x_46_im), y_46_re) / pow(exp(y_46_im), atan2(x_46_im, x_46_re))) * sin((y_46_im * (t_0 + (y_46_re * (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_im, x_46_re)) tmp = 0.0 if (y_46_re <= -5.5e+184) tmp = Float64(sin(Float64(y_46_re * cbrt((atan(x_46_im, x_46_re) ^ 3.0)))) * (hypot(x_46_im, x_46_re) ^ y_46_re)); elseif ((y_46_re <= -7e-53) || !(y_46_re <= 2.5)) tmp = Float64(exp(fma(log(hypot(x_46_re, x_46_im)), y_46_re, Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))) * sin(Float64(y_46_re * Float64(atan(x_46_im, x_46_re) + Float64(y_46_im * Float64(t_0 / y_46_re)))))); else tmp = Float64(Float64((hypot(x_46_re, x_46_im) ^ y_46_re) / (exp(y_46_im) ^ atan(x_46_im, x_46_re))) * sin(Float64(y_46_im * Float64(t_0 + Float64(y_46_re * 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$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -5.5e+184], N[(N[Sin[N[(y$46$re * N[Power[N[Power[N[ArcTan[x$46$im / x$46$re], $MachinePrecision], 3.0], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y$46$re, -7e-53], N[Not[LessEqual[y$46$re, 2.5]], $MachinePrecision]], N[(N[Exp[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$re + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] + N[(y$46$im * N[(t$95$0 / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] / N[Power[N[Exp[y$46$im], $MachinePrecision], N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[Sin[N[(y$46$im * N[(t$95$0 + N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] / y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
\mathbf{if}\;y.re \leq -5.5 \cdot 10^{+184}:\\
\;\;\;\;\sin \left(y.re \cdot \sqrt[3]{{\tan^{-1}_* \frac{x.im}{x.re}}^{3}}\right) \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{elif}\;y.re \leq -7 \cdot 10^{-53} \lor \neg \left(y.re \leq 2.5\right):\\
\;\;\;\;e^{\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.re, \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)\right)} \cdot \sin \left(y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} + y.im \cdot \frac{t\_0}{y.re}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{{\left(e^{y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}} \cdot \sin \left(y.im \cdot \left(t\_0 + y.re \cdot \frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.im}\right)\right)\\
\end{array}
\end{array}
if y.re < -5.5000000000000002e184Initial program 45.2%
fmm-def45.2%
hypot-define45.2%
distribute-rgt-neg-out45.2%
fma-define45.2%
hypot-define77.4%
*-commutative77.4%
Simplified77.4%
Taylor expanded in y.im around 0 80.7%
unpow280.7%
unpow280.7%
hypot-undefine80.7%
Simplified80.7%
add-cbrt-cube90.4%
pow390.4%
Applied egg-rr90.4%
if -5.5000000000000002e184 < y.re < -6.99999999999999987e-53 or 2.5 < y.re Initial program 38.8%
fmm-def38.8%
hypot-define38.8%
distribute-rgt-neg-out38.8%
fma-define38.8%
hypot-define75.6%
*-commutative75.6%
Simplified75.6%
Taylor expanded in y.re around inf 38.0%
+-commutative38.0%
associate-/l*39.4%
unpow239.4%
unpow239.4%
hypot-undefine75.4%
Simplified75.4%
if -6.99999999999999987e-53 < y.re < 2.5Initial program 41.3%
exp-diff41.3%
exp-to-pow41.3%
hypot-define41.3%
*-commutative41.3%
exp-prod40.9%
fma-define40.9%
hypot-define79.1%
*-commutative79.1%
Simplified79.1%
Taylor expanded in y.im around inf 40.9%
unpow240.9%
unpow240.9%
hypot-undefine79.1%
associate-/l*79.1%
Simplified79.1%
Final simplification78.7%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.im x.re))) (t_1 (pow (hypot x.im x.re) y.re)))
(if (<= y.re -2.7e+47)
(* (sin (* y.re (cbrt (pow (atan2 x.im x.re) 3.0)))) t_1)
(if (<= y.re 85000000.0)
(*
(/ (pow (hypot x.re x.im) y.re) (pow (exp y.im) (atan2 x.im x.re)))
(sin (* y.im (+ t_0 (* y.re (/ (atan2 x.im x.re) y.im))))))
(if (<= y.re 2e+219)
(*
(exp
(-
(* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(* (atan2 x.im x.re) y.im)))
(sin (* y.im t_0)))
(* t_1 (sin (pow (cbrt (* y.re (atan2 x.im x.re))) 3.0))))))))
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_im, x_46_re));
double t_1 = pow(hypot(x_46_im, x_46_re), y_46_re);
double tmp;
if (y_46_re <= -2.7e+47) {
tmp = sin((y_46_re * cbrt(pow(atan2(x_46_im, x_46_re), 3.0)))) * t_1;
} else if (y_46_re <= 85000000.0) {
tmp = (pow(hypot(x_46_re, x_46_im), y_46_re) / pow(exp(y_46_im), atan2(x_46_im, x_46_re))) * sin((y_46_im * (t_0 + (y_46_re * (atan2(x_46_im, x_46_re) / y_46_im)))));
} else if (y_46_re <= 2e+219) {
tmp = 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))) * sin((y_46_im * t_0));
} else {
tmp = t_1 * sin(pow(cbrt((y_46_re * atan2(x_46_im, x_46_re))), 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 = Math.log(Math.hypot(x_46_im, x_46_re));
double t_1 = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
double tmp;
if (y_46_re <= -2.7e+47) {
tmp = Math.sin((y_46_re * Math.cbrt(Math.pow(Math.atan2(x_46_im, x_46_re), 3.0)))) * t_1;
} else if (y_46_re <= 85000000.0) {
tmp = (Math.pow(Math.hypot(x_46_re, x_46_im), y_46_re) / Math.pow(Math.exp(y_46_im), Math.atan2(x_46_im, x_46_re))) * Math.sin((y_46_im * (t_0 + (y_46_re * (Math.atan2(x_46_im, x_46_re) / y_46_im)))));
} else if (y_46_re <= 2e+219) {
tmp = Math.exp(((y_46_re * Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (Math.atan2(x_46_im, x_46_re) * y_46_im))) * Math.sin((y_46_im * t_0));
} else {
tmp = t_1 * Math.sin(Math.pow(Math.cbrt((y_46_re * Math.atan2(x_46_im, x_46_re))), 3.0));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_im, x_46_re)) t_1 = hypot(x_46_im, x_46_re) ^ y_46_re tmp = 0.0 if (y_46_re <= -2.7e+47) tmp = Float64(sin(Float64(y_46_re * cbrt((atan(x_46_im, x_46_re) ^ 3.0)))) * t_1); elseif (y_46_re <= 85000000.0) tmp = Float64(Float64((hypot(x_46_re, x_46_im) ^ y_46_re) / (exp(y_46_im) ^ atan(x_46_im, x_46_re))) * sin(Float64(y_46_im * Float64(t_0 + Float64(y_46_re * Float64(atan(x_46_im, x_46_re) / y_46_im)))))); elseif (y_46_re <= 2e+219) tmp = Float64(exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * sin(Float64(y_46_im * t_0))); else tmp = Float64(t_1 * sin((cbrt(Float64(y_46_re * atan(x_46_im, x_46_re))) ^ 3.0))); 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$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, If[LessEqual[y$46$re, -2.7e+47], N[(N[Sin[N[(y$46$re * N[Power[N[Power[N[ArcTan[x$46$im / x$46$re], $MachinePrecision], 3.0], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$1), $MachinePrecision], If[LessEqual[y$46$re, 85000000.0], N[(N[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] / N[Power[N[Exp[y$46$im], $MachinePrecision], N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[Sin[N[(y$46$im * N[(t$95$0 + N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] / y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 2e+219], N[(N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(y$46$im * t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[Sin[N[Power[N[Power[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
t_1 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{if}\;y.re \leq -2.7 \cdot 10^{+47}:\\
\;\;\;\;\sin \left(y.re \cdot \sqrt[3]{{\tan^{-1}_* \frac{x.im}{x.re}}^{3}}\right) \cdot t\_1\\
\mathbf{elif}\;y.re \leq 85000000:\\
\;\;\;\;\frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{{\left(e^{y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}} \cdot \sin \left(y.im \cdot \left(t\_0 + y.re \cdot \frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.im}\right)\right)\\
\mathbf{elif}\;y.re \leq 2 \cdot 10^{+219}:\\
\;\;\;\;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} \cdot \sin \left(y.im \cdot t\_0\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot \sin \left({\left(\sqrt[3]{y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}}\right)}^{3}\right)\\
\end{array}
\end{array}
if y.re < -2.69999999999999996e47Initial program 37.3%
fmm-def37.3%
hypot-define37.3%
distribute-rgt-neg-out37.3%
fma-define37.3%
hypot-define79.7%
*-commutative79.7%
Simplified79.7%
Taylor expanded in y.im around 0 73.1%
unpow273.1%
unpow273.1%
hypot-undefine73.1%
Simplified73.1%
add-cbrt-cube78.2%
pow378.2%
Applied egg-rr78.2%
if -2.69999999999999996e47 < y.re < 8.5e7Initial program 43.4%
exp-diff43.4%
exp-to-pow43.4%
hypot-define43.4%
*-commutative43.4%
exp-prod42.8%
fma-define42.8%
hypot-define79.5%
*-commutative79.5%
Simplified79.5%
Taylor expanded in y.im around inf 42.8%
unpow242.8%
unpow242.8%
hypot-undefine79.5%
associate-/l*79.5%
Simplified79.5%
if 8.5e7 < y.re < 1.99999999999999993e219Initial program 42.0%
Taylor expanded in y.re around 0 44.0%
*-commutative44.0%
unpow244.0%
unpow244.0%
hypot-undefine74.2%
Simplified74.2%
if 1.99999999999999993e219 < y.re Initial program 28.6%
fmm-def28.6%
hypot-define28.6%
distribute-rgt-neg-out28.6%
fma-define28.6%
hypot-define61.9%
*-commutative61.9%
Simplified61.9%
Taylor expanded in y.im around 0 62.0%
unpow262.0%
unpow262.0%
hypot-undefine62.0%
Simplified62.0%
*-commutative62.0%
add-cube-cbrt76.3%
pow371.5%
*-commutative71.5%
Applied egg-rr71.5%
Final simplification77.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 (/ -1.0 x.im)))
(t_3
(exp (- (* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im))))) t_0))))
(if (<= x.im -4.3e+20)
(* (exp (- (* t_2 (- y.re)) t_0)) (sin (- t_1 (* y.im t_2))))
(if (<= x.im -4.2e-201)
(* t_3 (sin t_1))
(if (<= x.im 2.2e-68)
(* t_3 (sin (* y.im (log (hypot x.im x.re)))))
(*
(sin (fma (log (hypot x.re x.im)) y.im t_1))
(exp (- (* y.re (log x.im)) t_0))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = 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((-1.0 / x_46_im));
double t_3 = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0));
double tmp;
if (x_46_im <= -4.3e+20) {
tmp = exp(((t_2 * -y_46_re) - t_0)) * sin((t_1 - (y_46_im * t_2)));
} else if (x_46_im <= -4.2e-201) {
tmp = t_3 * sin(t_1);
} else if (x_46_im <= 2.2e-68) {
tmp = t_3 * sin((y_46_im * log(hypot(x_46_im, x_46_re))));
} else {
tmp = sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_1)) * exp(((y_46_re * 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 = log(Float64(-1.0 / x_46_im)) t_3 = exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - t_0)) tmp = 0.0 if (x_46_im <= -4.3e+20) tmp = Float64(exp(Float64(Float64(t_2 * Float64(-y_46_re)) - t_0)) * sin(Float64(t_1 - Float64(y_46_im * t_2)))); elseif (x_46_im <= -4.2e-201) tmp = Float64(t_3 * sin(t_1)); elseif (x_46_im <= 2.2e-68) tmp = Float64(t_3 * sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re))))); else tmp = Float64(sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_1)) * exp(Float64(Float64(y_46_re * log(x_46_im)) - t_0))); 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[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Log[N[(-1.0 / x$46$im), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[x$46$im, -4.3e+20], N[(N[Exp[N[(N[(t$95$2 * (-y$46$re)), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(t$95$1 - N[(y$46$im * t$95$2), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$im, -4.2e-201], N[(t$95$3 * N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$im, 2.2e-68], N[(t$95$3 * N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Sin[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im + t$95$1), $MachinePrecision]], $MachinePrecision] * 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 := \log \left(\frac{-1}{x.im}\right)\\
t_3 := e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - t\_0}\\
\mathbf{if}\;x.im \leq -4.3 \cdot 10^{+20}:\\
\;\;\;\;e^{t\_2 \cdot \left(-y.re\right) - t\_0} \cdot \sin \left(t\_1 - y.im \cdot t\_2\right)\\
\mathbf{elif}\;x.im \leq -4.2 \cdot 10^{-201}:\\
\;\;\;\;t\_3 \cdot \sin t\_1\\
\mathbf{elif}\;x.im \leq 2.2 \cdot 10^{-68}:\\
\;\;\;\;t\_3 \cdot \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, t\_1\right)\right) \cdot e^{y.re \cdot \log x.im - t\_0}\\
\end{array}
\end{array}
if x.im < -4.3e20Initial program 30.9%
fmm-def30.9%
hypot-define30.9%
distribute-rgt-neg-out30.9%
fma-define30.9%
hypot-define80.0%
*-commutative80.0%
Simplified80.0%
Taylor expanded in x.im around -inf 80.3%
distribute-lft-out80.3%
mul-1-neg80.3%
+-commutative80.3%
mul-1-neg80.3%
unsub-neg80.3%
*-commutative80.3%
Simplified80.3%
if -4.3e20 < x.im < -4.20000000000000024e-201Initial program 47.5%
Taylor expanded in y.im around 0 69.3%
if -4.20000000000000024e-201 < x.im < 2.20000000000000002e-68Initial program 48.6%
Taylor expanded in y.re around 0 47.6%
*-commutative47.6%
unpow247.6%
unpow247.6%
hypot-undefine62.8%
Simplified62.8%
if 2.20000000000000002e-68 < x.im Initial program 35.8%
fmm-def35.8%
hypot-define35.8%
distribute-rgt-neg-out35.8%
fma-define35.8%
hypot-define82.1%
*-commutative82.1%
Simplified82.1%
Taylor expanded in x.re around 0 80.9%
+-commutative80.9%
neg-mul-180.9%
unsub-neg80.9%
Simplified80.9%
Final simplification73.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 (/ -1.0 x.im)))
(t_3 (sin (fma (log (hypot x.re x.im)) y.im t_1))))
(if (<= x.im -45000000000.0)
(* (exp (- (* t_2 (- y.re)) t_0)) (sin (- t_1 (* y.im t_2))))
(if (<= x.im 6.2e-287)
(* t_3 (/ (pow (hypot x.re x.im) y.re) (+ t_0 1.0)))
(* t_3 (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 = log((-1.0 / x_46_im));
double t_3 = sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_1));
double tmp;
if (x_46_im <= -45000000000.0) {
tmp = exp(((t_2 * -y_46_re) - t_0)) * sin((t_1 - (y_46_im * t_2)));
} else if (x_46_im <= 6.2e-287) {
tmp = t_3 * (pow(hypot(x_46_re, x_46_im), y_46_re) / (t_0 + 1.0));
} else {
tmp = t_3 * exp(((y_46_re * 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 = log(Float64(-1.0 / x_46_im)) t_3 = sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_1)) tmp = 0.0 if (x_46_im <= -45000000000.0) tmp = Float64(exp(Float64(Float64(t_2 * Float64(-y_46_re)) - t_0)) * sin(Float64(t_1 - Float64(y_46_im * t_2)))); elseif (x_46_im <= 6.2e-287) tmp = Float64(t_3 * Float64((hypot(x_46_re, x_46_im) ^ y_46_re) / Float64(t_0 + 1.0))); else tmp = Float64(t_3 * exp(Float64(Float64(y_46_re * log(x_46_im)) - t_0))); 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[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Log[N[(-1.0 / x$46$im), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[Sin[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im + t$95$1), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[x$46$im, -45000000000.0], N[(N[Exp[N[(N[(t$95$2 * (-y$46$re)), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(t$95$1 - N[(y$46$im * t$95$2), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$im, 6.2e-287], N[(t$95$3 * N[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] / N[(t$95$0 + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$3 * 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 := \log \left(\frac{-1}{x.im}\right)\\
t_3 := \sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, t\_1\right)\right)\\
\mathbf{if}\;x.im \leq -45000000000:\\
\;\;\;\;e^{t\_2 \cdot \left(-y.re\right) - t\_0} \cdot \sin \left(t\_1 - y.im \cdot t\_2\right)\\
\mathbf{elif}\;x.im \leq 6.2 \cdot 10^{-287}:\\
\;\;\;\;t\_3 \cdot \frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{t\_0 + 1}\\
\mathbf{else}:\\
\;\;\;\;t\_3 \cdot e^{y.re \cdot \log x.im - t\_0}\\
\end{array}
\end{array}
if x.im < -4.5e10Initial program 31.6%
fmm-def31.6%
hypot-define31.6%
distribute-rgt-neg-out31.6%
fma-define31.6%
hypot-define78.9%
*-commutative78.9%
Simplified78.9%
Taylor expanded in x.im around -inf 81.0%
distribute-lft-out81.0%
mul-1-neg81.0%
+-commutative81.0%
mul-1-neg81.0%
unsub-neg81.0%
*-commutative81.0%
Simplified81.0%
if -4.5e10 < x.im < 6.2000000000000001e-287Initial program 40.3%
exp-diff38.9%
exp-to-pow38.9%
hypot-define38.9%
*-commutative38.9%
exp-prod38.4%
fma-define38.4%
hypot-define67.3%
*-commutative67.3%
Simplified67.3%
Taylor expanded in y.im around 0 62.8%
if 6.2000000000000001e-287 < x.im Initial program 44.7%
fmm-def44.7%
hypot-define44.7%
distribute-rgt-neg-out44.7%
fma-define44.7%
hypot-define80.5%
*-commutative80.5%
Simplified80.5%
Taylor expanded in x.re around 0 73.5%
+-commutative73.5%
neg-mul-173.5%
unsub-neg73.5%
Simplified73.5%
Final simplification72.1%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re))))
(if (<= y.im -4000.0)
(*
(exp
(-
(* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(* (atan2 x.im x.re) y.im)))
(sin t_0))
(if (<= y.im 55000000.0)
(*
(sin (fma (log (hypot x.re x.im)) y.im t_0))
(pow (hypot x.im x.re) y.re))
(*
(exp (* (atan2 x.im x.re) (- y.im)))
(sin (* y.im (log (hypot x.im x.re)))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if (y_46_im <= -4000.0) {
tmp = 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))) * sin(t_0);
} else if (y_46_im <= 55000000.0) {
tmp = sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_0)) * pow(hypot(x_46_im, x_46_re), y_46_re);
} else {
tmp = exp((atan2(x_46_im, x_46_re) * -y_46_im)) * sin((y_46_im * log(hypot(x_46_im, x_46_re))));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) tmp = 0.0 if (y_46_im <= -4000.0) tmp = Float64(exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * sin(t_0)); elseif (y_46_im <= 55000000.0) tmp = Float64(sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_0)) * (hypot(x_46_im, x_46_re) ^ y_46_re)); else tmp = Float64(exp(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))))); 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, -4000.0], N[(N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 55000000.0], N[(N[Sin[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im + t$95$0), $MachinePrecision]], $MachinePrecision] * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], N[(N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.im \leq -4000:\\
\;\;\;\;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} \cdot \sin t\_0\\
\mathbf{elif}\;y.im \leq 55000000:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, t\_0\right)\right) \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)} \cdot \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\end{array}
\end{array}
if y.im < -4e3Initial program 33.0%
Taylor expanded in y.im around 0 57.7%
if -4e3 < y.im < 5.5e7Initial program 45.9%
fmm-def45.9%
hypot-define45.9%
distribute-rgt-neg-out45.9%
fma-define46.0%
hypot-define87.7%
*-commutative87.7%
Simplified87.7%
Taylor expanded in y.im around 0 68.3%
unpow268.3%
unpow268.3%
hypot-undefine87.1%
Simplified87.1%
if 5.5e7 < y.im Initial program 40.4%
fmm-def40.4%
hypot-define40.4%
distribute-rgt-neg-out40.4%
fma-define40.4%
hypot-define72.7%
*-commutative72.7%
Simplified72.7%
Taylor expanded in y.re around 0 35.4%
neg-mul-135.4%
distribute-lft-neg-in35.4%
*-commutative35.4%
unpow235.4%
unpow235.4%
hypot-undefine61.0%
Simplified61.0%
Final simplification71.7%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.im x.re))))
(if (<= y.im -245.0)
(*
(exp
(-
(* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(* (atan2 x.im x.re) y.im)))
(sin (* y.re (atan2 x.im x.re))))
(if (<= y.im 380000000.0)
(*
(pow (hypot x.im x.re) y.re)
(sin (* y.re (+ (atan2 x.im x.re) (* y.im (/ t_0 y.re))))))
(* (exp (* (atan2 x.im x.re) (- y.im))) (sin (* y.im t_0)))))))
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_im, x_46_re));
double tmp;
if (y_46_im <= -245.0) {
tmp = 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))) * sin((y_46_re * atan2(x_46_im, x_46_re)));
} else if (y_46_im <= 380000000.0) {
tmp = pow(hypot(x_46_im, x_46_re), y_46_re) * sin((y_46_re * (atan2(x_46_im, x_46_re) + (y_46_im * (t_0 / y_46_re)))));
} else {
tmp = exp((atan2(x_46_im, x_46_re) * -y_46_im)) * sin((y_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.log(Math.hypot(x_46_im, x_46_re));
double tmp;
if (y_46_im <= -245.0) {
tmp = Math.exp(((y_46_re * Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (Math.atan2(x_46_im, x_46_re) * y_46_im))) * Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
} else if (y_46_im <= 380000000.0) {
tmp = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re) * Math.sin((y_46_re * (Math.atan2(x_46_im, x_46_re) + (y_46_im * (t_0 / y_46_re)))));
} else {
tmp = Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im)) * Math.sin((y_46_im * t_0));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.log(math.hypot(x_46_im, x_46_re)) tmp = 0 if y_46_im <= -245.0: tmp = math.exp(((y_46_re * math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (math.atan2(x_46_im, x_46_re) * y_46_im))) * math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) elif y_46_im <= 380000000.0: tmp = math.pow(math.hypot(x_46_im, x_46_re), y_46_re) * math.sin((y_46_re * (math.atan2(x_46_im, x_46_re) + (y_46_im * (t_0 / y_46_re))))) else: tmp = math.exp((math.atan2(x_46_im, x_46_re) * -y_46_im)) * math.sin((y_46_im * t_0)) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_im, x_46_re)) tmp = 0.0 if (y_46_im <= -245.0) tmp = Float64(exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * sin(Float64(y_46_re * atan(x_46_im, x_46_re)))); elseif (y_46_im <= 380000000.0) tmp = Float64((hypot(x_46_im, x_46_re) ^ y_46_re) * sin(Float64(y_46_re * Float64(atan(x_46_im, x_46_re) + Float64(y_46_im * Float64(t_0 / y_46_re)))))); else tmp = Float64(exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))) * sin(Float64(y_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 = log(hypot(x_46_im, x_46_re)); tmp = 0.0; if (y_46_im <= -245.0) tmp = 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))) * sin((y_46_re * atan2(x_46_im, x_46_re))); elseif (y_46_im <= 380000000.0) tmp = (hypot(x_46_im, x_46_re) ^ y_46_re) * sin((y_46_re * (atan2(x_46_im, x_46_re) + (y_46_im * (t_0 / y_46_re))))); else tmp = exp((atan2(x_46_im, x_46_re) * -y_46_im)) * sin((y_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[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$im, -245.0], N[(N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 380000000.0], N[(N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * N[Sin[N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] + N[(y$46$im * N[(t$95$0 / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(y$46$im * t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
\mathbf{if}\;y.im \leq -245:\\
\;\;\;\;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} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{elif}\;y.im \leq 380000000:\\
\;\;\;\;{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \cdot \sin \left(y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} + y.im \cdot \frac{t\_0}{y.re}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)} \cdot \sin \left(y.im \cdot t\_0\right)\\
\end{array}
\end{array}
if y.im < -245Initial program 33.0%
Taylor expanded in y.im around 0 57.7%
if -245 < y.im < 3.8e8Initial program 45.9%
fmm-def45.9%
hypot-define45.9%
distribute-rgt-neg-out45.9%
fma-define46.0%
hypot-define87.7%
*-commutative87.7%
Simplified87.7%
Taylor expanded in y.re around inf 45.9%
+-commutative45.9%
associate-/l*45.9%
unpow245.9%
unpow245.9%
hypot-undefine86.8%
Simplified86.8%
Taylor expanded in y.im around 0 67.4%
unpow268.3%
unpow268.3%
hypot-undefine87.1%
Simplified86.2%
if 3.8e8 < y.im Initial program 40.4%
fmm-def40.4%
hypot-define40.4%
distribute-rgt-neg-out40.4%
fma-define40.4%
hypot-define72.7%
*-commutative72.7%
Simplified72.7%
Taylor expanded in y.re around 0 35.4%
neg-mul-135.4%
distribute-lft-neg-in35.4%
*-commutative35.4%
unpow235.4%
unpow235.4%
hypot-undefine61.0%
Simplified61.0%
Final simplification71.3%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.im x.re))) (t_1 (sin (* y.im t_0))))
(if (<= y.im -6e+17)
(* (pow (exp y.im) (- (atan2 x.im x.re))) t_1)
(if (<= y.im 55000000.0)
(*
(pow (hypot x.im x.re) y.re)
(sin (* y.re (+ (atan2 x.im x.re) (* y.im (/ t_0 y.re))))))
(* (exp (* (atan2 x.im x.re) (- y.im))) t_1)))))
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_im, x_46_re));
double t_1 = sin((y_46_im * t_0));
double tmp;
if (y_46_im <= -6e+17) {
tmp = pow(exp(y_46_im), -atan2(x_46_im, x_46_re)) * t_1;
} else if (y_46_im <= 55000000.0) {
tmp = pow(hypot(x_46_im, x_46_re), y_46_re) * sin((y_46_re * (atan2(x_46_im, x_46_re) + (y_46_im * (t_0 / y_46_re)))));
} else {
tmp = exp((atan2(x_46_im, x_46_re) * -y_46_im)) * t_1;
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.log(Math.hypot(x_46_im, x_46_re));
double t_1 = Math.sin((y_46_im * t_0));
double tmp;
if (y_46_im <= -6e+17) {
tmp = Math.pow(Math.exp(y_46_im), -Math.atan2(x_46_im, x_46_re)) * t_1;
} else if (y_46_im <= 55000000.0) {
tmp = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re) * Math.sin((y_46_re * (Math.atan2(x_46_im, x_46_re) + (y_46_im * (t_0 / y_46_re)))));
} else {
tmp = Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im)) * t_1;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.log(math.hypot(x_46_im, x_46_re)) t_1 = math.sin((y_46_im * t_0)) tmp = 0 if y_46_im <= -6e+17: tmp = math.pow(math.exp(y_46_im), -math.atan2(x_46_im, x_46_re)) * t_1 elif y_46_im <= 55000000.0: tmp = math.pow(math.hypot(x_46_im, x_46_re), y_46_re) * math.sin((y_46_re * (math.atan2(x_46_im, x_46_re) + (y_46_im * (t_0 / y_46_re))))) else: tmp = math.exp((math.atan2(x_46_im, x_46_re) * -y_46_im)) * t_1 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_im, x_46_re)) t_1 = sin(Float64(y_46_im * t_0)) tmp = 0.0 if (y_46_im <= -6e+17) tmp = Float64((exp(y_46_im) ^ Float64(-atan(x_46_im, x_46_re))) * t_1); elseif (y_46_im <= 55000000.0) tmp = Float64((hypot(x_46_im, x_46_re) ^ y_46_re) * sin(Float64(y_46_re * Float64(atan(x_46_im, x_46_re) + Float64(y_46_im * Float64(t_0 / y_46_re)))))); else tmp = Float64(exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))) * t_1); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_im, x_46_re)); t_1 = sin((y_46_im * t_0)); tmp = 0.0; if (y_46_im <= -6e+17) tmp = (exp(y_46_im) ^ -atan2(x_46_im, x_46_re)) * t_1; elseif (y_46_im <= 55000000.0) tmp = (hypot(x_46_im, x_46_re) ^ y_46_re) * sin((y_46_re * (atan2(x_46_im, x_46_re) + (y_46_im * (t_0 / y_46_re))))); else tmp = exp((atan2(x_46_im, x_46_re) * -y_46_im)) * t_1; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[Sin[N[(y$46$im * t$95$0), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$im, -6e+17], N[(N[Power[N[Exp[y$46$im], $MachinePrecision], (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])], $MachinePrecision] * t$95$1), $MachinePrecision], If[LessEqual[y$46$im, 55000000.0], N[(N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * N[Sin[N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] + N[(y$46$im * N[(t$95$0 / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision] * t$95$1), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
t_1 := \sin \left(y.im \cdot t\_0\right)\\
\mathbf{if}\;y.im \leq -6 \cdot 10^{+17}:\\
\;\;\;\;{\left(e^{y.im}\right)}^{\left(-\tan^{-1}_* \frac{x.im}{x.re}\right)} \cdot t\_1\\
\mathbf{elif}\;y.im \leq 55000000:\\
\;\;\;\;{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \cdot \sin \left(y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} + y.im \cdot \frac{t\_0}{y.re}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)} \cdot t\_1\\
\end{array}
\end{array}
if y.im < -6e17Initial program 33.0%
fmm-def33.0%
hypot-define33.0%
distribute-rgt-neg-out33.0%
fma-define33.0%
hypot-define66.1%
*-commutative66.1%
Simplified66.1%
Taylor expanded in y.re around 0 30.5%
neg-mul-130.5%
distribute-rgt-neg-in30.5%
mul-1-neg30.5%
exp-prod31.8%
mul-1-neg31.8%
*-commutative31.8%
unpow231.8%
unpow231.8%
hypot-undefine57.4%
Simplified57.4%
if -6e17 < y.im < 5.5e7Initial program 45.6%
fmm-def45.6%
hypot-define45.6%
distribute-rgt-neg-out45.6%
fma-define45.6%
hypot-define87.2%
*-commutative87.2%
Simplified87.2%
Taylor expanded in y.re around inf 45.6%
+-commutative45.6%
associate-/l*45.6%
unpow245.6%
unpow245.6%
hypot-undefine86.2%
Simplified86.2%
Taylor expanded in y.im around 0 67.4%
unpow268.2%
unpow268.2%
hypot-undefine85.8%
Simplified84.9%
if 5.5e7 < y.im Initial program 40.4%
fmm-def40.4%
hypot-define40.4%
distribute-rgt-neg-out40.4%
fma-define40.4%
hypot-define72.7%
*-commutative72.7%
Simplified72.7%
Taylor expanded in y.re around 0 35.4%
neg-mul-135.4%
distribute-lft-neg-in35.4%
*-commutative35.4%
unpow235.4%
unpow235.4%
hypot-undefine61.0%
Simplified61.0%
Final simplification70.9%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (pow (hypot x.im x.re) y.re)))
(if (<= y.re -1.48e-49)
(* (sin (* y.re (cbrt (pow (atan2 x.im x.re) 3.0)))) t_0)
(if (<= y.re 7.9e+43)
(*
(exp (* (atan2 x.im x.re) (- y.im)))
(sin (* y.im (log (hypot x.im x.re)))))
(* t_0 (sin (pow (cbrt (* y.re (atan2 x.im x.re))) 3.0)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = pow(hypot(x_46_im, x_46_re), y_46_re);
double tmp;
if (y_46_re <= -1.48e-49) {
tmp = sin((y_46_re * cbrt(pow(atan2(x_46_im, x_46_re), 3.0)))) * t_0;
} else if (y_46_re <= 7.9e+43) {
tmp = exp((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_0 * sin(pow(cbrt((y_46_re * atan2(x_46_im, x_46_re))), 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 = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
double tmp;
if (y_46_re <= -1.48e-49) {
tmp = Math.sin((y_46_re * Math.cbrt(Math.pow(Math.atan2(x_46_im, x_46_re), 3.0)))) * t_0;
} else if (y_46_re <= 7.9e+43) {
tmp = Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im)) * Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re))));
} else {
tmp = t_0 * Math.sin(Math.pow(Math.cbrt((y_46_re * Math.atan2(x_46_im, x_46_re))), 3.0));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = hypot(x_46_im, x_46_re) ^ y_46_re tmp = 0.0 if (y_46_re <= -1.48e-49) tmp = Float64(sin(Float64(y_46_re * cbrt((atan(x_46_im, x_46_re) ^ 3.0)))) * t_0); elseif (y_46_re <= 7.9e+43) tmp = Float64(exp(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_0 * sin((cbrt(Float64(y_46_re * atan(x_46_im, x_46_re))) ^ 3.0))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, If[LessEqual[y$46$re, -1.48e-49], N[(N[Sin[N[(y$46$re * N[Power[N[Power[N[ArcTan[x$46$im / x$46$re], $MachinePrecision], 3.0], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$0), $MachinePrecision], If[LessEqual[y$46$re, 7.9e+43], N[(N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $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$0 * N[Sin[N[Power[N[Power[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{if}\;y.re \leq -1.48 \cdot 10^{-49}:\\
\;\;\;\;\sin \left(y.re \cdot \sqrt[3]{{\tan^{-1}_* \frac{x.im}{x.re}}^{3}}\right) \cdot t\_0\\
\mathbf{elif}\;y.re \leq 7.9 \cdot 10^{+43}:\\
\;\;\;\;e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)} \cdot \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot \sin \left({\left(\sqrt[3]{y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}}\right)}^{3}\right)\\
\end{array}
\end{array}
if y.re < -1.48e-49Initial program 42.4%
fmm-def42.4%
hypot-define42.4%
distribute-rgt-neg-out42.4%
fma-define42.4%
hypot-define81.0%
*-commutative81.0%
Simplified81.0%
Taylor expanded in y.im around 0 73.4%
unpow273.4%
unpow273.4%
hypot-undefine72.2%
Simplified72.2%
add-cbrt-cube74.6%
pow374.6%
Applied egg-rr74.6%
if -1.48e-49 < y.re < 7.89999999999999963e43Initial program 39.9%
fmm-def39.9%
hypot-define39.9%
distribute-rgt-neg-out39.9%
fma-define39.9%
hypot-define78.7%
*-commutative78.7%
Simplified78.7%
Taylor expanded in y.re around 0 34.0%
neg-mul-134.0%
distribute-lft-neg-in34.0%
*-commutative34.0%
unpow234.0%
unpow234.0%
hypot-undefine64.0%
Simplified64.0%
if 7.89999999999999963e43 < y.re Initial program 39.0%
fmm-def39.0%
hypot-define39.0%
distribute-rgt-neg-out39.0%
fma-define39.0%
hypot-define69.5%
*-commutative69.5%
Simplified69.5%
Taylor expanded in y.im around 0 59.5%
unpow259.5%
unpow259.5%
hypot-undefine59.5%
Simplified59.5%
*-commutative59.5%
add-cube-cbrt64.5%
pow362.8%
*-commutative62.8%
Applied egg-rr62.8%
Final simplification67.2%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (pow (hypot x.im x.re) y.re)))
(if (<= y.re -1.2e-49)
(* (sin (* y.re (cbrt (pow (atan2 x.im x.re) 3.0)))) t_0)
(if (<= y.re 1.5e+44)
(*
(exp (* (atan2 x.im x.re) (- y.im)))
(sin (* y.im (log (hypot x.im x.re)))))
(* t_0 (sin (* y.re (pow (cbrt (atan2 x.im x.re)) 3.0))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = pow(hypot(x_46_im, x_46_re), y_46_re);
double tmp;
if (y_46_re <= -1.2e-49) {
tmp = sin((y_46_re * cbrt(pow(atan2(x_46_im, x_46_re), 3.0)))) * t_0;
} else if (y_46_re <= 1.5e+44) {
tmp = exp((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_0 * sin((y_46_re * pow(cbrt(atan2(x_46_im, x_46_re)), 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 = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
double tmp;
if (y_46_re <= -1.2e-49) {
tmp = Math.sin((y_46_re * Math.cbrt(Math.pow(Math.atan2(x_46_im, x_46_re), 3.0)))) * t_0;
} else if (y_46_re <= 1.5e+44) {
tmp = Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im)) * Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re))));
} else {
tmp = t_0 * Math.sin((y_46_re * Math.pow(Math.cbrt(Math.atan2(x_46_im, x_46_re)), 3.0)));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = hypot(x_46_im, x_46_re) ^ y_46_re tmp = 0.0 if (y_46_re <= -1.2e-49) tmp = Float64(sin(Float64(y_46_re * cbrt((atan(x_46_im, x_46_re) ^ 3.0)))) * t_0); elseif (y_46_re <= 1.5e+44) tmp = Float64(exp(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_0 * sin(Float64(y_46_re * (cbrt(atan(x_46_im, x_46_re)) ^ 3.0)))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, If[LessEqual[y$46$re, -1.2e-49], N[(N[Sin[N[(y$46$re * N[Power[N[Power[N[ArcTan[x$46$im / x$46$re], $MachinePrecision], 3.0], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$0), $MachinePrecision], If[LessEqual[y$46$re, 1.5e+44], N[(N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $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$0 * N[Sin[N[(y$46$re * N[Power[N[Power[N[ArcTan[x$46$im / x$46$re], $MachinePrecision], 1/3], $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{if}\;y.re \leq -1.2 \cdot 10^{-49}:\\
\;\;\;\;\sin \left(y.re \cdot \sqrt[3]{{\tan^{-1}_* \frac{x.im}{x.re}}^{3}}\right) \cdot t\_0\\
\mathbf{elif}\;y.re \leq 1.5 \cdot 10^{+44}:\\
\;\;\;\;e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)} \cdot \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot \sin \left(y.re \cdot {\left(\sqrt[3]{\tan^{-1}_* \frac{x.im}{x.re}}\right)}^{3}\right)\\
\end{array}
\end{array}
if y.re < -1.19999999999999996e-49Initial program 42.4%
fmm-def42.4%
hypot-define42.4%
distribute-rgt-neg-out42.4%
fma-define42.4%
hypot-define81.0%
*-commutative81.0%
Simplified81.0%
Taylor expanded in y.im around 0 73.4%
unpow273.4%
unpow273.4%
hypot-undefine72.2%
Simplified72.2%
add-cbrt-cube74.6%
pow374.6%
Applied egg-rr74.6%
if -1.19999999999999996e-49 < y.re < 1.49999999999999993e44Initial program 39.9%
fmm-def39.9%
hypot-define39.9%
distribute-rgt-neg-out39.9%
fma-define39.9%
hypot-define78.7%
*-commutative78.7%
Simplified78.7%
Taylor expanded in y.re around 0 34.0%
neg-mul-134.0%
distribute-lft-neg-in34.0%
*-commutative34.0%
unpow234.0%
unpow234.0%
hypot-undefine64.0%
Simplified64.0%
if 1.49999999999999993e44 < y.re Initial program 39.0%
fmm-def39.0%
hypot-define39.0%
distribute-rgt-neg-out39.0%
fma-define39.0%
hypot-define69.5%
*-commutative69.5%
Simplified69.5%
Taylor expanded in y.im around 0 59.5%
unpow259.5%
unpow259.5%
hypot-undefine59.5%
Simplified59.5%
add-cube-cbrt57.8%
pow362.8%
Applied egg-rr62.8%
Final simplification67.2%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (pow (hypot x.im x.re) y.re)))
(if (<= y.re -6e-52)
(* (sin (* y.re (cbrt (pow (atan2 x.im x.re) 3.0)))) t_0)
(if (<= y.re 3.8e+48)
(*
(exp (* (atan2 x.im x.re) (- y.im)))
(sin (* y.im (log (hypot x.im x.re)))))
(* t_0 (sin (* y.re (atan2 x.im x.re))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = pow(hypot(x_46_im, x_46_re), y_46_re);
double tmp;
if (y_46_re <= -6e-52) {
tmp = sin((y_46_re * cbrt(pow(atan2(x_46_im, x_46_re), 3.0)))) * t_0;
} else if (y_46_re <= 3.8e+48) {
tmp = exp((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_0 * sin((y_46_re * atan2(x_46_im, x_46_re)));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
double tmp;
if (y_46_re <= -6e-52) {
tmp = Math.sin((y_46_re * Math.cbrt(Math.pow(Math.atan2(x_46_im, x_46_re), 3.0)))) * t_0;
} else if (y_46_re <= 3.8e+48) {
tmp = Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im)) * Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re))));
} else {
tmp = t_0 * Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = hypot(x_46_im, x_46_re) ^ y_46_re tmp = 0.0 if (y_46_re <= -6e-52) tmp = Float64(sin(Float64(y_46_re * cbrt((atan(x_46_im, x_46_re) ^ 3.0)))) * t_0); elseif (y_46_re <= 3.8e+48) tmp = Float64(exp(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_0 * sin(Float64(y_46_re * atan(x_46_im, x_46_re)))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, If[LessEqual[y$46$re, -6e-52], N[(N[Sin[N[(y$46$re * N[Power[N[Power[N[ArcTan[x$46$im / x$46$re], $MachinePrecision], 3.0], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$0), $MachinePrecision], If[LessEqual[y$46$re, 3.8e+48], N[(N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $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$0 * N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{if}\;y.re \leq -6 \cdot 10^{-52}:\\
\;\;\;\;\sin \left(y.re \cdot \sqrt[3]{{\tan^{-1}_* \frac{x.im}{x.re}}^{3}}\right) \cdot t\_0\\
\mathbf{elif}\;y.re \leq 3.8 \cdot 10^{+48}:\\
\;\;\;\;e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)} \cdot \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\end{array}
\end{array}
if y.re < -6e-52Initial program 42.4%
fmm-def42.4%
hypot-define42.4%
distribute-rgt-neg-out42.4%
fma-define42.4%
hypot-define81.0%
*-commutative81.0%
Simplified81.0%
Taylor expanded in y.im around 0 73.4%
unpow273.4%
unpow273.4%
hypot-undefine72.2%
Simplified72.2%
add-cbrt-cube74.6%
pow374.6%
Applied egg-rr74.6%
if -6e-52 < y.re < 3.8e48Initial program 39.9%
fmm-def39.9%
hypot-define39.9%
distribute-rgt-neg-out39.9%
fma-define39.9%
hypot-define78.7%
*-commutative78.7%
Simplified78.7%
Taylor expanded in y.re around 0 34.0%
neg-mul-134.0%
distribute-lft-neg-in34.0%
*-commutative34.0%
unpow234.0%
unpow234.0%
hypot-undefine64.0%
Simplified64.0%
if 3.8e48 < y.re Initial program 39.0%
fmm-def39.0%
hypot-define39.0%
distribute-rgt-neg-out39.0%
fma-define39.0%
hypot-define69.5%
*-commutative69.5%
Simplified69.5%
Taylor expanded in y.im around 0 59.5%
unpow259.5%
unpow259.5%
hypot-undefine59.5%
Simplified59.5%
Final simplification66.4%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (pow (hypot x.im x.re) y.re)))
(if (<= y.re -1.48e-49)
(* t_0 (sin (* y.re (log1p (expm1 (atan2 x.im x.re))))))
(if (<= y.re 3.8e+43)
(*
(exp (* (atan2 x.im x.re) (- y.im)))
(sin (* y.im (log (hypot x.im x.re)))))
(* t_0 (sin (* y.re (atan2 x.im x.re))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = pow(hypot(x_46_im, x_46_re), y_46_re);
double tmp;
if (y_46_re <= -1.48e-49) {
tmp = t_0 * sin((y_46_re * log1p(expm1(atan2(x_46_im, x_46_re)))));
} else if (y_46_re <= 3.8e+43) {
tmp = exp((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_0 * sin((y_46_re * atan2(x_46_im, x_46_re)));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
double tmp;
if (y_46_re <= -1.48e-49) {
tmp = t_0 * Math.sin((y_46_re * Math.log1p(Math.expm1(Math.atan2(x_46_im, x_46_re)))));
} else if (y_46_re <= 3.8e+43) {
tmp = Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im)) * Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re))));
} else {
tmp = t_0 * Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.pow(math.hypot(x_46_im, x_46_re), y_46_re) tmp = 0 if y_46_re <= -1.48e-49: tmp = t_0 * math.sin((y_46_re * math.log1p(math.expm1(math.atan2(x_46_im, x_46_re))))) elif y_46_re <= 3.8e+43: tmp = math.exp((math.atan2(x_46_im, x_46_re) * -y_46_im)) * math.sin((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) else: tmp = t_0 * math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = hypot(x_46_im, x_46_re) ^ y_46_re tmp = 0.0 if (y_46_re <= -1.48e-49) tmp = Float64(t_0 * sin(Float64(y_46_re * log1p(expm1(atan(x_46_im, x_46_re)))))); elseif (y_46_re <= 3.8e+43) tmp = Float64(exp(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_0 * sin(Float64(y_46_re * atan(x_46_im, x_46_re)))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, If[LessEqual[y$46$re, -1.48e-49], N[(t$95$0 * N[Sin[N[(y$46$re * N[Log[1 + N[(Exp[N[ArcTan[x$46$im / x$46$re], $MachinePrecision]] - 1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 3.8e+43], N[(N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $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$0 * N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{if}\;y.re \leq -1.48 \cdot 10^{-49}:\\
\;\;\;\;t\_0 \cdot \sin \left(y.re \cdot \mathsf{log1p}\left(\mathsf{expm1}\left(\tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\\
\mathbf{elif}\;y.re \leq 3.8 \cdot 10^{+43}:\\
\;\;\;\;e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)} \cdot \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\end{array}
\end{array}
if y.re < -1.48e-49Initial program 42.4%
fmm-def42.4%
hypot-define42.4%
distribute-rgt-neg-out42.4%
fma-define42.4%
hypot-define81.0%
*-commutative81.0%
Simplified81.0%
Taylor expanded in y.im around 0 73.4%
unpow273.4%
unpow273.4%
hypot-undefine72.2%
Simplified72.2%
log1p-expm1-u73.4%
Applied egg-rr73.4%
if -1.48e-49 < y.re < 3.80000000000000008e43Initial program 39.9%
fmm-def39.9%
hypot-define39.9%
distribute-rgt-neg-out39.9%
fma-define39.9%
hypot-define78.7%
*-commutative78.7%
Simplified78.7%
Taylor expanded in y.re around 0 34.0%
neg-mul-134.0%
distribute-lft-neg-in34.0%
*-commutative34.0%
unpow234.0%
unpow234.0%
hypot-undefine64.0%
Simplified64.0%
if 3.80000000000000008e43 < y.re Initial program 39.0%
fmm-def39.0%
hypot-define39.0%
distribute-rgt-neg-out39.0%
fma-define39.0%
hypot-define69.5%
*-commutative69.5%
Simplified69.5%
Taylor expanded in y.im around 0 59.5%
unpow259.5%
unpow259.5%
hypot-undefine59.5%
Simplified59.5%
Final simplification66.0%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (or (<= y.re -2.4e-50) (not (<= y.re 4.45e+43)))
(* (pow (hypot x.im x.re) y.re) (sin (* y.re (atan2 x.im x.re))))
(*
(exp (* (atan2 x.im x.re) (- y.im)))
(sin (* y.im (log (hypot x.im x.re)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_re <= -2.4e-50) || !(y_46_re <= 4.45e+43)) {
tmp = pow(hypot(x_46_im, x_46_re), y_46_re) * sin((y_46_re * atan2(x_46_im, x_46_re)));
} else {
tmp = exp((atan2(x_46_im, x_46_re) * -y_46_im)) * sin((y_46_im * log(hypot(x_46_im, x_46_re))));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_re <= -2.4e-50) || !(y_46_re <= 4.45e+43)) {
tmp = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re) * Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
} else {
tmp = Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im)) * Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re))));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if (y_46_re <= -2.4e-50) or not (y_46_re <= 4.45e+43): tmp = math.pow(math.hypot(x_46_im, x_46_re), y_46_re) * math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) else: tmp = math.exp((math.atan2(x_46_im, x_46_re) * -y_46_im)) * math.sin((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if ((y_46_re <= -2.4e-50) || !(y_46_re <= 4.45e+43)) tmp = Float64((hypot(x_46_im, x_46_re) ^ y_46_re) * sin(Float64(y_46_re * atan(x_46_im, x_46_re)))); else tmp = Float64(exp(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))))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if ((y_46_re <= -2.4e-50) || ~((y_46_re <= 4.45e+43))) tmp = (hypot(x_46_im, x_46_re) ^ y_46_re) * sin((y_46_re * atan2(x_46_im, x_46_re))); else tmp = exp((atan2(x_46_im, x_46_re) * -y_46_im)) * sin((y_46_im * log(hypot(x_46_im, x_46_re)))); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[Or[LessEqual[y$46$re, -2.4e-50], N[Not[LessEqual[y$46$re, 4.45e+43]], $MachinePrecision]], N[(N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq -2.4 \cdot 10^{-50} \lor \neg \left(y.re \leq 4.45 \cdot 10^{+43}\right):\\
\;\;\;\;{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{else}:\\
\;\;\;\;e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)} \cdot \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\end{array}
\end{array}
if y.re < -2.40000000000000002e-50 or 4.4499999999999998e43 < y.re Initial program 41.0%
fmm-def41.0%
hypot-define41.0%
distribute-rgt-neg-out41.0%
fma-define41.0%
hypot-define76.2%
*-commutative76.2%
Simplified76.2%
Taylor expanded in y.im around 0 67.6%
unpow267.6%
unpow267.6%
hypot-undefine66.9%
Simplified66.9%
if -2.40000000000000002e-50 < y.re < 4.4499999999999998e43Initial program 39.9%
fmm-def39.9%
hypot-define39.9%
distribute-rgt-neg-out39.9%
fma-define39.9%
hypot-define78.7%
*-commutative78.7%
Simplified78.7%
Taylor expanded in y.re around 0 34.0%
neg-mul-134.0%
distribute-lft-neg-in34.0%
*-commutative34.0%
unpow234.0%
unpow234.0%
hypot-undefine64.0%
Simplified64.0%
Final simplification65.6%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (or (<= y.re -6.6e-52) (not (<= y.re 3.2e-90))) (* (pow (hypot x.im x.re) y.re) (sin (* y.re (atan2 x.im x.re)))) (sin (* y.im (log (hypot x.im x.re))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_re <= -6.6e-52) || !(y_46_re <= 3.2e-90)) {
tmp = pow(hypot(x_46_im, x_46_re), y_46_re) * sin((y_46_re * atan2(x_46_im, x_46_re)));
} else {
tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re))));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_re <= -6.6e-52) || !(y_46_re <= 3.2e-90)) {
tmp = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re) * Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
} else {
tmp = Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re))));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if (y_46_re <= -6.6e-52) or not (y_46_re <= 3.2e-90): tmp = math.pow(math.hypot(x_46_im, x_46_re), y_46_re) * math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) else: tmp = math.sin((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if ((y_46_re <= -6.6e-52) || !(y_46_re <= 3.2e-90)) tmp = Float64((hypot(x_46_im, x_46_re) ^ y_46_re) * sin(Float64(y_46_re * atan(x_46_im, x_46_re)))); else tmp = sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if ((y_46_re <= -6.6e-52) || ~((y_46_re <= 3.2e-90))) tmp = (hypot(x_46_im, x_46_re) ^ y_46_re) * sin((y_46_re * atan2(x_46_im, x_46_re))); else tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[Or[LessEqual[y$46$re, -6.6e-52], N[Not[LessEqual[y$46$re, 3.2e-90]], $MachinePrecision]], N[(N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq -6.6 \cdot 10^{-52} \lor \neg \left(y.re \leq 3.2 \cdot 10^{-90}\right):\\
\;\;\;\;{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\end{array}
\end{array}
if y.re < -6.5999999999999999e-52 or 3.20000000000000007e-90 < y.re Initial program 38.7%
fmm-def38.7%
hypot-define38.7%
distribute-rgt-neg-out38.7%
fma-define38.7%
hypot-define76.2%
*-commutative76.2%
Simplified76.2%
Taylor expanded in y.im around 0 60.4%
unpow260.4%
unpow260.4%
hypot-undefine60.0%
Simplified60.0%
if -6.5999999999999999e-52 < y.re < 3.20000000000000007e-90Initial program 44.2%
expm1-log1p-u34.7%
expm1-undefine23.1%
*-commutative23.1%
hypot-define25.1%
Applied egg-rr25.1%
expm1-define36.8%
*-commutative36.8%
hypot-undefine34.7%
unpow234.7%
unpow234.7%
+-commutative34.7%
unpow234.7%
unpow234.7%
hypot-undefine36.8%
Simplified36.8%
Taylor expanded in y.re around inf 23.0%
+-commutative23.0%
unpow223.0%
unpow223.0%
hypot-undefine43.0%
Simplified43.0%
Taylor expanded in y.re around 0 14.4%
unpow214.4%
unpow214.4%
hypot-undefine31.5%
Simplified31.5%
Final simplification50.6%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re))))
(if (<= x.re 1.6e-49)
(* (pow (hypot x.im x.re) y.re) (sin t_0))
(* (sin (+ t_0 (* y.im (log x.re)))) (pow x.re y.re)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if (x_46_re <= 1.6e-49) {
tmp = pow(hypot(x_46_im, x_46_re), y_46_re) * sin(t_0);
} else {
tmp = sin((t_0 + (y_46_im * log(x_46_re)))) * pow(x_46_re, y_46_re);
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
double tmp;
if (x_46_re <= 1.6e-49) {
tmp = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re) * Math.sin(t_0);
} else {
tmp = Math.sin((t_0 + (y_46_im * Math.log(x_46_re)))) * Math.pow(x_46_re, y_46_re);
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = y_46_re * math.atan2(x_46_im, x_46_re) tmp = 0 if x_46_re <= 1.6e-49: tmp = math.pow(math.hypot(x_46_im, x_46_re), y_46_re) * math.sin(t_0) else: tmp = math.sin((t_0 + (y_46_im * math.log(x_46_re)))) * math.pow(x_46_re, y_46_re) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) tmp = 0.0 if (x_46_re <= 1.6e-49) tmp = Float64((hypot(x_46_im, x_46_re) ^ y_46_re) * sin(t_0)); else tmp = Float64(sin(Float64(t_0 + Float64(y_46_im * log(x_46_re)))) * (x_46_re ^ y_46_re)); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = y_46_re * atan2(x_46_im, x_46_re); tmp = 0.0; if (x_46_re <= 1.6e-49) tmp = (hypot(x_46_im, x_46_re) ^ y_46_re) * sin(t_0); else tmp = sin((t_0 + (y_46_im * log(x_46_re)))) * (x_46_re ^ y_46_re); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x$46$re, 1.6e-49], N[(N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision], N[(N[Sin[N[(t$95$0 + N[(y$46$im * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Power[x$46$re, y$46$re], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;x.re \leq 1.6 \cdot 10^{-49}:\\
\;\;\;\;{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \cdot \sin t\_0\\
\mathbf{else}:\\
\;\;\;\;\sin \left(t\_0 + y.im \cdot \log x.re\right) \cdot {x.re}^{y.re}\\
\end{array}
\end{array}
if x.re < 1.60000000000000001e-49Initial program 44.6%
fmm-def44.6%
hypot-define44.6%
distribute-rgt-neg-out44.6%
fma-define44.6%
hypot-define79.5%
*-commutative79.5%
Simplified79.5%
Taylor expanded in y.im around 0 48.9%
unpow248.9%
unpow248.9%
hypot-undefine49.7%
Simplified49.7%
if 1.60000000000000001e-49 < x.re Initial program 29.7%
expm1-log1p-u25.2%
expm1-undefine17.1%
*-commutative17.1%
hypot-define31.8%
Applied egg-rr31.8%
expm1-define45.6%
*-commutative45.6%
hypot-undefine25.2%
unpow225.2%
unpow225.2%
+-commutative25.2%
unpow225.2%
unpow225.2%
hypot-undefine45.6%
Simplified45.6%
Taylor expanded in y.re around inf 40.1%
+-commutative40.1%
unpow240.1%
unpow240.1%
hypot-undefine49.8%
Simplified49.8%
Taylor expanded in x.im around 0 53.7%
Final simplification50.8%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re))) (t_1 (* (sin t_0) (pow x.im y.re))))
(if (<= y.re -105000000.0)
t_1
(if (<= y.re -1.3e-195)
(* y.re (log (exp (atan2 x.im x.re))))
(if (<= y.re 9.8e+15)
(sin (* y.im (log (hypot x.im x.re))))
(if (<= y.re 2.9e+282) t_1 (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 t_1 = sin(t_0) * pow(x_46_im, y_46_re);
double tmp;
if (y_46_re <= -105000000.0) {
tmp = t_1;
} else if (y_46_re <= -1.3e-195) {
tmp = y_46_re * log(exp(atan2(x_46_im, x_46_re)));
} else if (y_46_re <= 9.8e+15) {
tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re))));
} else if (y_46_re <= 2.9e+282) {
tmp = t_1;
} 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 t_1 = Math.sin(t_0) * Math.pow(x_46_im, y_46_re);
double tmp;
if (y_46_re <= -105000000.0) {
tmp = t_1;
} else if (y_46_re <= -1.3e-195) {
tmp = y_46_re * Math.log(Math.exp(Math.atan2(x_46_im, x_46_re)));
} else if (y_46_re <= 9.8e+15) {
tmp = Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re))));
} else if (y_46_re <= 2.9e+282) {
tmp = t_1;
} 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)) t_1 = Float64(sin(t_0) * (x_46_im ^ y_46_re)) tmp = 0.0 if (y_46_re <= -105000000.0) tmp = t_1; elseif (y_46_re <= -1.3e-195) tmp = Float64(y_46_re * log(exp(atan(x_46_im, x_46_re)))); elseif (y_46_re <= 9.8e+15) tmp = sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))); elseif (y_46_re <= 2.9e+282) tmp = t_1; 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]}, Block[{t$95$1 = N[(N[Sin[t$95$0], $MachinePrecision] * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -105000000.0], t$95$1, If[LessEqual[y$46$re, -1.3e-195], N[(y$46$re * N[Log[N[Exp[N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 9.8e+15], N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[y$46$re, 2.9e+282], t$95$1, 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}\\
t_1 := \sin t\_0 \cdot {x.im}^{y.re}\\
\mathbf{if}\;y.re \leq -105000000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y.re \leq -1.3 \cdot 10^{-195}:\\
\;\;\;\;y.re \cdot \log \left(e^{\tan^{-1}_* \frac{x.im}{x.re}}\right)\\
\mathbf{elif}\;y.re \leq 9.8 \cdot 10^{+15}:\\
\;\;\;\;\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\mathbf{elif}\;y.re \leq 2.9 \cdot 10^{+282}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\sqrt[3]{{t\_0}^{3}}\\
\end{array}
\end{array}
if y.re < -1.05e8 or 9.8e15 < y.re < 2.90000000000000016e282Initial program 40.8%
fmm-def40.8%
hypot-define40.8%
distribute-rgt-neg-out40.8%
fma-define40.8%
hypot-define77.7%
*-commutative77.7%
Simplified77.7%
Taylor expanded in y.im around 0 67.9%
unpow267.9%
unpow267.9%
hypot-undefine67.9%
Simplified67.9%
Taylor expanded in x.re around 0 54.3%
if -1.05e8 < y.re < -1.3000000000000001e-195Initial program 46.3%
fmm-def46.3%
hypot-define46.3%
distribute-rgt-neg-out46.3%
fma-define46.3%
hypot-define82.7%
*-commutative82.7%
Simplified82.7%
Taylor expanded in y.im around 0 29.2%
unpow229.2%
unpow229.2%
hypot-undefine27.1%
Simplified27.1%
Taylor expanded in y.re around 0 22.7%
add-log-exp31.1%
Applied egg-rr31.1%
if -1.3000000000000001e-195 < y.re < 9.8e15Initial program 40.5%
expm1-log1p-u33.7%
expm1-undefine21.1%
*-commutative21.1%
hypot-define24.4%
Applied egg-rr24.4%
expm1-define39.6%
*-commutative39.6%
hypot-undefine33.7%
unpow233.7%
unpow233.7%
+-commutative33.7%
unpow233.7%
unpow233.7%
hypot-undefine39.6%
Simplified39.6%
Taylor expanded in y.re around inf 26.7%
+-commutative26.7%
unpow226.7%
unpow226.7%
hypot-undefine43.7%
Simplified43.7%
Taylor expanded in y.re around 0 15.8%
unpow215.8%
unpow215.8%
hypot-undefine29.1%
Simplified29.1%
if 2.90000000000000016e282 < y.re Initial program 0.0%
fmm-def0.0%
hypot-define0.0%
distribute-rgt-neg-out0.0%
fma-define0.0%
hypot-define28.6%
*-commutative28.6%
Simplified28.6%
Taylor expanded in y.im around 0 28.6%
unpow228.6%
unpow228.6%
hypot-undefine28.6%
Simplified28.6%
Taylor expanded in y.re around 0 7.4%
*-commutative7.4%
add-cbrt-cube71.4%
pow371.4%
*-commutative71.4%
Applied egg-rr71.4%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (sin (* y.im (log (hypot x.im x.re)))))
(t_1 (* y.re (atan2 x.im x.re)))
(t_2 (pow t_1 3.0)))
(if (<= y.im -1.12e-6)
(pow t_2 0.3333333333333333)
(if (<= y.im -8.8e-119)
t_0
(if (<= y.im 8.8e-128)
(log1p (expm1 t_1))
(if (<= y.im 1.15e-88) t_0 (cbrt t_2)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = sin((y_46_im * log(hypot(x_46_im, x_46_re))));
double t_1 = y_46_re * atan2(x_46_im, x_46_re);
double t_2 = pow(t_1, 3.0);
double tmp;
if (y_46_im <= -1.12e-6) {
tmp = pow(t_2, 0.3333333333333333);
} else if (y_46_im <= -8.8e-119) {
tmp = t_0;
} else if (y_46_im <= 8.8e-128) {
tmp = log1p(expm1(t_1));
} else if (y_46_im <= 1.15e-88) {
tmp = t_0;
} else {
tmp = cbrt(t_2);
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re))));
double t_1 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_2 = Math.pow(t_1, 3.0);
double tmp;
if (y_46_im <= -1.12e-6) {
tmp = Math.pow(t_2, 0.3333333333333333);
} else if (y_46_im <= -8.8e-119) {
tmp = t_0;
} else if (y_46_im <= 8.8e-128) {
tmp = Math.log1p(Math.expm1(t_1));
} else if (y_46_im <= 1.15e-88) {
tmp = t_0;
} else {
tmp = Math.cbrt(t_2);
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) t_1 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_2 = t_1 ^ 3.0 tmp = 0.0 if (y_46_im <= -1.12e-6) tmp = t_2 ^ 0.3333333333333333; elseif (y_46_im <= -8.8e-119) tmp = t_0; elseif (y_46_im <= 8.8e-128) tmp = log1p(expm1(t_1)); elseif (y_46_im <= 1.15e-88) tmp = t_0; else tmp = cbrt(t_2); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Power[t$95$1, 3.0], $MachinePrecision]}, If[LessEqual[y$46$im, -1.12e-6], N[Power[t$95$2, 0.3333333333333333], $MachinePrecision], If[LessEqual[y$46$im, -8.8e-119], t$95$0, If[LessEqual[y$46$im, 8.8e-128], N[Log[1 + N[(Exp[t$95$1] - 1), $MachinePrecision]], $MachinePrecision], If[LessEqual[y$46$im, 1.15e-88], t$95$0, N[Power[t$95$2, 1/3], $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_2 := {t\_1}^{3}\\
\mathbf{if}\;y.im \leq -1.12 \cdot 10^{-6}:\\
\;\;\;\;{t\_2}^{0.3333333333333333}\\
\mathbf{elif}\;y.im \leq -8.8 \cdot 10^{-119}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y.im \leq 8.8 \cdot 10^{-128}:\\
\;\;\;\;\mathsf{log1p}\left(\mathsf{expm1}\left(t\_1\right)\right)\\
\mathbf{elif}\;y.im \leq 1.15 \cdot 10^{-88}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\sqrt[3]{t\_2}\\
\end{array}
\end{array}
if y.im < -1.12000000000000008e-6Initial program 34.6%
fmm-def34.6%
hypot-define34.6%
distribute-rgt-neg-out34.6%
fma-define34.6%
hypot-define66.9%
*-commutative66.9%
Simplified66.9%
Taylor expanded in y.im around 0 42.6%
unpow242.6%
unpow242.6%
hypot-undefine37.1%
Simplified37.1%
Taylor expanded in y.re around 0 3.9%
*-commutative3.9%
add-cbrt-cube17.1%
pow1/317.8%
pow317.8%
*-commutative17.8%
Applied egg-rr17.8%
if -1.12000000000000008e-6 < y.im < -8.8000000000000002e-119 or 8.80000000000000037e-128 < y.im < 1.14999999999999993e-88Initial program 38.6%
expm1-log1p-u38.6%
expm1-undefine14.3%
*-commutative14.3%
hypot-define31.3%
Applied egg-rr31.3%
expm1-define58.9%
*-commutative58.9%
hypot-undefine38.6%
unpow238.6%
unpow238.6%
+-commutative38.6%
unpow238.6%
unpow238.6%
hypot-undefine58.9%
Simplified58.9%
Taylor expanded in y.re around inf 58.9%
+-commutative58.9%
unpow258.9%
unpow258.9%
hypot-undefine89.8%
Simplified89.8%
Taylor expanded in y.re around 0 29.3%
unpow229.3%
unpow229.3%
hypot-undefine60.1%
Simplified60.1%
if -8.8000000000000002e-119 < y.im < 8.80000000000000037e-128Initial program 49.9%
fmm-def49.9%
hypot-define49.9%
distribute-rgt-neg-out49.9%
fma-define49.9%
hypot-define87.0%
*-commutative87.0%
Simplified87.0%
Taylor expanded in y.im around 0 64.0%
unpow264.0%
unpow264.0%
hypot-undefine72.4%
Simplified72.4%
Taylor expanded in y.re around 0 27.4%
log1p-expm1-u39.2%
Applied egg-rr39.2%
if 1.14999999999999993e-88 < y.im Initial program 40.2%
fmm-def40.2%
hypot-define40.2%
distribute-rgt-neg-out40.2%
fma-define40.2%
hypot-define75.8%
*-commutative75.8%
Simplified75.8%
Taylor expanded in y.im around 0 39.0%
unpow239.0%
unpow239.0%
hypot-undefine38.3%
Simplified38.3%
Taylor expanded in y.re around 0 6.8%
*-commutative6.8%
add-cbrt-cube30.3%
pow330.3%
*-commutative30.3%
Applied egg-rr30.3%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (sin (* y.im (log (hypot x.im x.re)))))
(t_1 (* y.re (atan2 x.im x.re)))
(t_2 (cbrt (pow t_1 3.0))))
(if (<= y.im -8.6e-7)
t_2
(if (<= y.im -1.35e-120)
t_0
(if (<= y.im 3e-133)
(log1p (expm1 t_1))
(if (<= y.im 1.02e-88) t_0 t_2))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = sin((y_46_im * log(hypot(x_46_im, x_46_re))));
double t_1 = y_46_re * atan2(x_46_im, x_46_re);
double t_2 = cbrt(pow(t_1, 3.0));
double tmp;
if (y_46_im <= -8.6e-7) {
tmp = t_2;
} else if (y_46_im <= -1.35e-120) {
tmp = t_0;
} else if (y_46_im <= 3e-133) {
tmp = log1p(expm1(t_1));
} else if (y_46_im <= 1.02e-88) {
tmp = t_0;
} 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 = Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re))));
double t_1 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_2 = Math.cbrt(Math.pow(t_1, 3.0));
double tmp;
if (y_46_im <= -8.6e-7) {
tmp = t_2;
} else if (y_46_im <= -1.35e-120) {
tmp = t_0;
} else if (y_46_im <= 3e-133) {
tmp = Math.log1p(Math.expm1(t_1));
} else if (y_46_im <= 1.02e-88) {
tmp = t_0;
} else {
tmp = t_2;
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) t_1 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_2 = cbrt((t_1 ^ 3.0)) tmp = 0.0 if (y_46_im <= -8.6e-7) tmp = t_2; elseif (y_46_im <= -1.35e-120) tmp = t_0; elseif (y_46_im <= 3e-133) tmp = log1p(expm1(t_1)); elseif (y_46_im <= 1.02e-88) tmp = t_0; 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[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Power[N[Power[t$95$1, 3.0], $MachinePrecision], 1/3], $MachinePrecision]}, If[LessEqual[y$46$im, -8.6e-7], t$95$2, If[LessEqual[y$46$im, -1.35e-120], t$95$0, If[LessEqual[y$46$im, 3e-133], N[Log[1 + N[(Exp[t$95$1] - 1), $MachinePrecision]], $MachinePrecision], If[LessEqual[y$46$im, 1.02e-88], t$95$0, t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_2 := \sqrt[3]{{t\_1}^{3}}\\
\mathbf{if}\;y.im \leq -8.6 \cdot 10^{-7}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y.im \leq -1.35 \cdot 10^{-120}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y.im \leq 3 \cdot 10^{-133}:\\
\;\;\;\;\mathsf{log1p}\left(\mathsf{expm1}\left(t\_1\right)\right)\\
\mathbf{elif}\;y.im \leq 1.02 \cdot 10^{-88}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y.im < -8.6000000000000002e-7 or 1.02000000000000001e-88 < y.im Initial program 37.3%
fmm-def37.3%
hypot-define37.3%
distribute-rgt-neg-out37.3%
fma-define37.3%
hypot-define71.2%
*-commutative71.2%
Simplified71.2%
Taylor expanded in y.im around 0 40.8%
unpow240.8%
unpow240.8%
hypot-undefine37.7%
Simplified37.7%
Taylor expanded in y.re around 0 5.3%
*-commutative5.3%
add-cbrt-cube23.5%
pow323.5%
*-commutative23.5%
Applied egg-rr23.5%
if -8.6000000000000002e-7 < y.im < -1.3499999999999999e-120 or 3.00000000000000019e-133 < y.im < 1.02000000000000001e-88Initial program 38.6%
expm1-log1p-u38.6%
expm1-undefine14.3%
*-commutative14.3%
hypot-define31.3%
Applied egg-rr31.3%
expm1-define58.9%
*-commutative58.9%
hypot-undefine38.6%
unpow238.6%
unpow238.6%
+-commutative38.6%
unpow238.6%
unpow238.6%
hypot-undefine58.9%
Simplified58.9%
Taylor expanded in y.re around inf 58.9%
+-commutative58.9%
unpow258.9%
unpow258.9%
hypot-undefine89.8%
Simplified89.8%
Taylor expanded in y.re around 0 29.3%
unpow229.3%
unpow229.3%
hypot-undefine60.1%
Simplified60.1%
if -1.3499999999999999e-120 < y.im < 3.00000000000000019e-133Initial program 49.9%
fmm-def49.9%
hypot-define49.9%
distribute-rgt-neg-out49.9%
fma-define49.9%
hypot-define87.0%
*-commutative87.0%
Simplified87.0%
Taylor expanded in y.im around 0 64.0%
unpow264.0%
unpow264.0%
hypot-undefine72.4%
Simplified72.4%
Taylor expanded in y.re around 0 27.4%
log1p-expm1-u39.2%
Applied egg-rr39.2%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (sin (* y.re (atan2 x.im x.re)))))
(if (<= y.re -14500000.0)
(* t_0 (pow x.im y.re))
(if (<= y.re -3.3e-195)
(* y.re (log (exp (atan2 x.im x.re))))
(if (<= y.re 9.8e+15)
(sin (* y.im (log (hypot x.im x.re))))
(* t_0 (pow x.re y.re)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = sin((y_46_re * atan2(x_46_im, x_46_re)));
double tmp;
if (y_46_re <= -14500000.0) {
tmp = t_0 * pow(x_46_im, y_46_re);
} else if (y_46_re <= -3.3e-195) {
tmp = y_46_re * log(exp(atan2(x_46_im, x_46_re)));
} else if (y_46_re <= 9.8e+15) {
tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re))));
} else {
tmp = t_0 * pow(x_46_re, y_46_re);
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
double tmp;
if (y_46_re <= -14500000.0) {
tmp = t_0 * Math.pow(x_46_im, y_46_re);
} else if (y_46_re <= -3.3e-195) {
tmp = y_46_re * Math.log(Math.exp(Math.atan2(x_46_im, x_46_re)));
} else if (y_46_re <= 9.8e+15) {
tmp = Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re))));
} else {
tmp = t_0 * Math.pow(x_46_re, y_46_re);
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) tmp = 0 if y_46_re <= -14500000.0: tmp = t_0 * math.pow(x_46_im, y_46_re) elif y_46_re <= -3.3e-195: tmp = y_46_re * math.log(math.exp(math.atan2(x_46_im, x_46_re))) elif y_46_re <= 9.8e+15: tmp = math.sin((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) else: tmp = t_0 * math.pow(x_46_re, y_46_re) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin(Float64(y_46_re * atan(x_46_im, x_46_re))) tmp = 0.0 if (y_46_re <= -14500000.0) tmp = Float64(t_0 * (x_46_im ^ y_46_re)); elseif (y_46_re <= -3.3e-195) tmp = Float64(y_46_re * log(exp(atan(x_46_im, x_46_re)))); elseif (y_46_re <= 9.8e+15) tmp = sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))); else tmp = Float64(t_0 * (x_46_re ^ y_46_re)); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin((y_46_re * atan2(x_46_im, x_46_re))); tmp = 0.0; if (y_46_re <= -14500000.0) tmp = t_0 * (x_46_im ^ y_46_re); elseif (y_46_re <= -3.3e-195) tmp = y_46_re * log(exp(atan2(x_46_im, x_46_re))); elseif (y_46_re <= 9.8e+15) tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))); else tmp = t_0 * (x_46_re ^ y_46_re); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -14500000.0], N[(t$95$0 * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, -3.3e-195], N[(y$46$re * N[Log[N[Exp[N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 9.8e+15], N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(t$95$0 * N[Power[x$46$re, y$46$re], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{if}\;y.re \leq -14500000:\\
\;\;\;\;t\_0 \cdot {x.im}^{y.re}\\
\mathbf{elif}\;y.re \leq -3.3 \cdot 10^{-195}:\\
\;\;\;\;y.re \cdot \log \left(e^{\tan^{-1}_* \frac{x.im}{x.re}}\right)\\
\mathbf{elif}\;y.re \leq 9.8 \cdot 10^{+15}:\\
\;\;\;\;\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot {x.re}^{y.re}\\
\end{array}
\end{array}
if y.re < -1.45e7Initial program 40.0%
fmm-def40.0%
hypot-define40.0%
distribute-rgt-neg-out40.0%
fma-define40.0%
hypot-define81.4%
*-commutative81.4%
Simplified81.4%
Taylor expanded in y.im around 0 75.9%
unpow275.9%
unpow275.9%
hypot-undefine75.9%
Simplified75.9%
Taylor expanded in x.re around 0 57.6%
if -1.45e7 < y.re < -3.3e-195Initial program 46.3%
fmm-def46.3%
hypot-define46.3%
distribute-rgt-neg-out46.3%
fma-define46.3%
hypot-define82.7%
*-commutative82.7%
Simplified82.7%
Taylor expanded in y.im around 0 29.2%
unpow229.2%
unpow229.2%
hypot-undefine27.1%
Simplified27.1%
Taylor expanded in y.re around 0 22.7%
add-log-exp31.1%
Applied egg-rr31.1%
if -3.3e-195 < y.re < 9.8e15Initial program 40.5%
expm1-log1p-u33.7%
expm1-undefine21.1%
*-commutative21.1%
hypot-define24.4%
Applied egg-rr24.4%
expm1-define39.6%
*-commutative39.6%
hypot-undefine33.7%
unpow233.7%
unpow233.7%
+-commutative33.7%
unpow233.7%
unpow233.7%
hypot-undefine39.6%
Simplified39.6%
Taylor expanded in y.re around inf 26.7%
+-commutative26.7%
unpow226.7%
unpow226.7%
hypot-undefine43.7%
Simplified43.7%
Taylor expanded in y.re around 0 15.8%
unpow215.8%
unpow215.8%
hypot-undefine29.1%
Simplified29.1%
if 9.8e15 < y.re Initial program 37.3%
fmm-def37.3%
hypot-define37.3%
distribute-rgt-neg-out37.3%
fma-define37.3%
hypot-define68.7%
*-commutative68.7%
Simplified68.7%
Taylor expanded in y.im around 0 55.4%
unpow255.4%
unpow255.4%
hypot-undefine55.4%
Simplified55.4%
Taylor expanded in x.im around 0 51.2%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (or (<= y.re -1.2e-52) (not (<= y.re 3e-91))) (log1p (expm1 (* y.re (atan2 x.im x.re)))) (sin (* y.im (log (hypot x.im x.re))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_re <= -1.2e-52) || !(y_46_re <= 3e-91)) {
tmp = log1p(expm1((y_46_re * atan2(x_46_im, x_46_re))));
} else {
tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re))));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_re <= -1.2e-52) || !(y_46_re <= 3e-91)) {
tmp = Math.log1p(Math.expm1((y_46_re * Math.atan2(x_46_im, x_46_re))));
} else {
tmp = Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re))));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if (y_46_re <= -1.2e-52) or not (y_46_re <= 3e-91): tmp = math.log1p(math.expm1((y_46_re * math.atan2(x_46_im, x_46_re)))) else: tmp = math.sin((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if ((y_46_re <= -1.2e-52) || !(y_46_re <= 3e-91)) tmp = log1p(expm1(Float64(y_46_re * atan(x_46_im, x_46_re)))); else tmp = sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[Or[LessEqual[y$46$re, -1.2e-52], N[Not[LessEqual[y$46$re, 3e-91]], $MachinePrecision]], N[Log[1 + N[(Exp[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]] - 1), $MachinePrecision]], $MachinePrecision], N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq -1.2 \cdot 10^{-52} \lor \neg \left(y.re \leq 3 \cdot 10^{-91}\right):\\
\;\;\;\;\mathsf{log1p}\left(\mathsf{expm1}\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\end{array}
\end{array}
if y.re < -1.2000000000000001e-52 or 3.0000000000000002e-91 < y.re Initial program 38.7%
fmm-def38.7%
hypot-define38.7%
distribute-rgt-neg-out38.7%
fma-define38.7%
hypot-define76.2%
*-commutative76.2%
Simplified76.2%
Taylor expanded in y.im around 0 60.4%
unpow260.4%
unpow260.4%
hypot-undefine60.0%
Simplified60.0%
Taylor expanded in y.re around 0 8.9%
log1p-expm1-u25.0%
Applied egg-rr25.0%
if -1.2000000000000001e-52 < y.re < 3.0000000000000002e-91Initial program 44.2%
expm1-log1p-u34.7%
expm1-undefine23.1%
*-commutative23.1%
hypot-define25.1%
Applied egg-rr25.1%
expm1-define36.8%
*-commutative36.8%
hypot-undefine34.7%
unpow234.7%
unpow234.7%
+-commutative34.7%
unpow234.7%
unpow234.7%
hypot-undefine36.8%
Simplified36.8%
Taylor expanded in y.re around inf 23.0%
+-commutative23.0%
unpow223.0%
unpow223.0%
hypot-undefine43.0%
Simplified43.0%
Taylor expanded in y.re around 0 14.4%
unpow214.4%
unpow214.4%
hypot-undefine31.5%
Simplified31.5%
Final simplification27.2%
(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 40.5%
fmm-def40.5%
hypot-define40.5%
distribute-rgt-neg-out40.5%
fma-define40.5%
hypot-define77.3%
*-commutative77.3%
Simplified77.3%
Taylor expanded in y.im around 0 44.9%
unpow244.9%
unpow244.9%
hypot-undefine45.0%
Simplified45.0%
Taylor expanded in y.re around 0 10.8%
log1p-expm1-u21.6%
Applied egg-rr21.6%
(FPCore (x.re x.im y.re y.im) :precision binary64 (* y.re (atan2 x.im x.re)))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return y_46_re * atan2(x_46_im, x_46_re);
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
code = y_46re * atan2(x_46im, x_46re)
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return y_46_re * Math.atan2(x_46_im, x_46_re);
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): return y_46_re * math.atan2(x_46_im, x_46_re)
function code(x_46_re, x_46_im, y_46_re, y_46_im) return Float64(y_46_re * atan(x_46_im, x_46_re)) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = y_46_re * atan2(x_46_im, x_46_re); end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}
\end{array}
Initial program 40.5%
fmm-def40.5%
hypot-define40.5%
distribute-rgt-neg-out40.5%
fma-define40.5%
hypot-define77.3%
*-commutative77.3%
Simplified77.3%
Taylor expanded in y.im around 0 44.9%
unpow244.9%
unpow244.9%
hypot-undefine45.0%
Simplified45.0%
Taylor expanded in y.re around 0 10.8%
herbie shell --seed 2024165
(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)))))