
(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 (log (hypot x.re x.im)))
(t_1 (* y.re (atan2 x.im x.re)))
(t_2 (exp (- (* t_0 y.re) (* y.im (atan2 x.im x.re))))))
(if (or (<= y.im -2.5e+56) (not (<= y.im 25000.0)))
(* t_2 (fabs (sin (fma y.im (log (hypot x.im x.re)) t_1))))
(* t_2 (sin (fma t_0 y.im (pow (cbrt t_1) 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_re, x_46_im));
double t_1 = y_46_re * atan2(x_46_im, x_46_re);
double t_2 = exp(((t_0 * y_46_re) - (y_46_im * atan2(x_46_im, x_46_re))));
double tmp;
if ((y_46_im <= -2.5e+56) || !(y_46_im <= 25000.0)) {
tmp = t_2 * fabs(sin(fma(y_46_im, log(hypot(x_46_im, x_46_re)), t_1)));
} else {
tmp = t_2 * sin(fma(t_0, y_46_im, pow(cbrt(t_1), 3.0)));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_re, x_46_im)) t_1 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_2 = exp(Float64(Float64(t_0 * y_46_re) - Float64(y_46_im * atan(x_46_im, x_46_re)))) tmp = 0.0 if ((y_46_im <= -2.5e+56) || !(y_46_im <= 25000.0)) tmp = Float64(t_2 * abs(sin(fma(y_46_im, log(hypot(x_46_im, x_46_re)), t_1)))); else tmp = Float64(t_2 * sin(fma(t_0, y_46_im, (cbrt(t_1) ^ 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$re ^ 2 + x$46$im ^ 2], $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[Exp[N[(N[(t$95$0 * y$46$re), $MachinePrecision] - N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[Or[LessEqual[y$46$im, -2.5e+56], N[Not[LessEqual[y$46$im, 25000.0]], $MachinePrecision]], N[(t$95$2 * N[Abs[N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision] + t$95$1), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$2 * N[Sin[N[(t$95$0 * y$46$im + N[Power[N[Power[t$95$1, 1/3], $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_2 := e^{t_0 \cdot y.re - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\\
\mathbf{if}\;y.im \leq -2.5 \cdot 10^{+56} \lor \neg \left(y.im \leq 25000\right):\\
\;\;\;\;t_2 \cdot \left|\sin \left(\mathsf{fma}\left(y.im, \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right), t_1\right)\right)\right|\\
\mathbf{else}:\\
\;\;\;\;t_2 \cdot \sin \left(\mathsf{fma}\left(t_0, y.im, {\left(\sqrt[3]{t_1}\right)}^{3}\right)\right)\\
\end{array}
\end{array}
if y.im < -2.50000000000000012e56 or 25000 < y.im Initial program 34.6%
Simplified68.3%
*-commutative68.3%
add-cube-cbrt70.0%
pow368.3%
Applied egg-rr68.3%
rem-cube-cbrt70.0%
Applied egg-rr70.0%
fma-udef70.9%
*-commutative70.9%
rem-cbrt-cube69.1%
unpow370.9%
add-cube-cbrt69.1%
fma-udef68.3%
add-sqr-sqrt36.5%
sqrt-unprod81.3%
sqr-sin-a81.3%
fma-udef81.3%
Applied egg-rr81.3%
unpow281.3%
rem-sqrt-square81.3%
fma-udef81.3%
*-commutative81.3%
*-commutative81.3%
fma-udef81.3%
hypot-def39.9%
unpow239.9%
unpow239.9%
+-commutative39.9%
unpow239.9%
unpow239.9%
hypot-def81.3%
Simplified81.3%
if -2.50000000000000012e56 < y.im < 25000Initial program 50.7%
Simplified90.9%
*-commutative90.9%
add-cube-cbrt91.8%
pow392.5%
Applied egg-rr92.5%
Final simplification87.4%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.re x.im)))
(t_1 (* y.re (atan2 x.im x.re)))
(t_2 (exp (- (* t_0 y.re) (* y.im (atan2 x.im x.re))))))
(if (or (<= y.im -3.5e+56) (not (<= y.im 25000.0)))
(* t_2 (fabs (sin (fma y.im (log (hypot x.im x.re)) t_1))))
(* t_2 (log1p (expm1 (sin (fma t_0 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_re, x_46_im));
double t_1 = y_46_re * atan2(x_46_im, x_46_re);
double t_2 = exp(((t_0 * y_46_re) - (y_46_im * atan2(x_46_im, x_46_re))));
double tmp;
if ((y_46_im <= -3.5e+56) || !(y_46_im <= 25000.0)) {
tmp = t_2 * fabs(sin(fma(y_46_im, log(hypot(x_46_im, x_46_re)), t_1)));
} else {
tmp = t_2 * log1p(expm1(sin(fma(t_0, 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_re, x_46_im)) t_1 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_2 = exp(Float64(Float64(t_0 * y_46_re) - Float64(y_46_im * atan(x_46_im, x_46_re)))) tmp = 0.0 if ((y_46_im <= -3.5e+56) || !(y_46_im <= 25000.0)) tmp = Float64(t_2 * abs(sin(fma(y_46_im, log(hypot(x_46_im, x_46_re)), t_1)))); else tmp = Float64(t_2 * log1p(expm1(sin(fma(t_0, y_46_im, t_1))))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Exp[N[(N[(t$95$0 * y$46$re), $MachinePrecision] - N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[Or[LessEqual[y$46$im, -3.5e+56], N[Not[LessEqual[y$46$im, 25000.0]], $MachinePrecision]], N[(t$95$2 * N[Abs[N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision] + t$95$1), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$2 * N[Log[1 + N[(Exp[N[Sin[N[(t$95$0 * y$46$im + t$95$1), $MachinePrecision]], $MachinePrecision]] - 1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_2 := e^{t_0 \cdot y.re - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\\
\mathbf{if}\;y.im \leq -3.5 \cdot 10^{+56} \lor \neg \left(y.im \leq 25000\right):\\
\;\;\;\;t_2 \cdot \left|\sin \left(\mathsf{fma}\left(y.im, \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right), t_1\right)\right)\right|\\
\mathbf{else}:\\
\;\;\;\;t_2 \cdot \mathsf{log1p}\left(\mathsf{expm1}\left(\sin \left(\mathsf{fma}\left(t_0, y.im, t_1\right)\right)\right)\right)\\
\end{array}
\end{array}
if y.im < -3.49999999999999999e56 or 25000 < y.im Initial program 34.6%
Simplified68.3%
*-commutative68.3%
add-cube-cbrt70.0%
pow368.3%
Applied egg-rr68.3%
rem-cube-cbrt70.0%
Applied egg-rr70.0%
fma-udef70.9%
*-commutative70.9%
rem-cbrt-cube69.1%
unpow370.9%
add-cube-cbrt69.1%
fma-udef68.3%
add-sqr-sqrt36.5%
sqrt-unprod81.3%
sqr-sin-a81.3%
fma-udef81.3%
Applied egg-rr81.3%
unpow281.3%
rem-sqrt-square81.3%
fma-udef81.3%
*-commutative81.3%
*-commutative81.3%
fma-udef81.3%
hypot-def39.9%
unpow239.9%
unpow239.9%
+-commutative39.9%
unpow239.9%
unpow239.9%
hypot-def81.3%
Simplified81.3%
if -3.49999999999999999e56 < y.im < 25000Initial program 50.7%
Simplified90.9%
*-commutative90.9%
add-cube-cbrt91.8%
pow392.5%
Applied egg-rr92.5%
log1p-expm1-u92.5%
rem-cube-cbrt90.9%
Applied egg-rr90.9%
Final simplification86.5%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.re x.im)))
(t_1 (* y.re (atan2 x.im x.re)))
(t_2 (exp (- (* t_0 y.re) (* y.im (atan2 x.im x.re))))))
(if (or (<= y.im -1.5e+56) (not (<= y.im 20000.0)))
(* t_2 (fabs (sin (fma y.im (log (hypot x.im x.re)) t_1))))
(* t_2 (sin (fma t_0 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_re, x_46_im));
double t_1 = y_46_re * atan2(x_46_im, x_46_re);
double t_2 = exp(((t_0 * y_46_re) - (y_46_im * atan2(x_46_im, x_46_re))));
double tmp;
if ((y_46_im <= -1.5e+56) || !(y_46_im <= 20000.0)) {
tmp = t_2 * fabs(sin(fma(y_46_im, log(hypot(x_46_im, x_46_re)), t_1)));
} else {
tmp = t_2 * sin(fma(t_0, 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_re, x_46_im)) t_1 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_2 = exp(Float64(Float64(t_0 * y_46_re) - Float64(y_46_im * atan(x_46_im, x_46_re)))) tmp = 0.0 if ((y_46_im <= -1.5e+56) || !(y_46_im <= 20000.0)) tmp = Float64(t_2 * abs(sin(fma(y_46_im, log(hypot(x_46_im, x_46_re)), t_1)))); else tmp = Float64(t_2 * sin(fma(t_0, y_46_im, t_1))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Exp[N[(N[(t$95$0 * y$46$re), $MachinePrecision] - N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[Or[LessEqual[y$46$im, -1.5e+56], N[Not[LessEqual[y$46$im, 20000.0]], $MachinePrecision]], N[(t$95$2 * N[Abs[N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision] + t$95$1), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$2 * N[Sin[N[(t$95$0 * y$46$im + t$95$1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_2 := e^{t_0 \cdot y.re - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\\
\mathbf{if}\;y.im \leq -1.5 \cdot 10^{+56} \lor \neg \left(y.im \leq 20000\right):\\
\;\;\;\;t_2 \cdot \left|\sin \left(\mathsf{fma}\left(y.im, \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right), t_1\right)\right)\right|\\
\mathbf{else}:\\
\;\;\;\;t_2 \cdot \sin \left(\mathsf{fma}\left(t_0, y.im, t_1\right)\right)\\
\end{array}
\end{array}
if y.im < -1.50000000000000003e56 or 2e4 < y.im Initial program 34.6%
Simplified68.3%
*-commutative68.3%
add-cube-cbrt70.0%
pow368.3%
Applied egg-rr68.3%
rem-cube-cbrt70.0%
Applied egg-rr70.0%
fma-udef70.9%
*-commutative70.9%
rem-cbrt-cube69.1%
unpow370.9%
add-cube-cbrt69.1%
fma-udef68.3%
add-sqr-sqrt36.5%
sqrt-unprod81.3%
sqr-sin-a81.3%
fma-udef81.3%
Applied egg-rr81.3%
unpow281.3%
rem-sqrt-square81.3%
fma-udef81.3%
*-commutative81.3%
*-commutative81.3%
fma-udef81.3%
hypot-def39.9%
unpow239.9%
unpow239.9%
+-commutative39.9%
unpow239.9%
unpow239.9%
hypot-def81.3%
Simplified81.3%
if -1.50000000000000003e56 < y.im < 2e4Initial program 50.7%
Simplified90.9%
Final simplification86.5%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.re x.im)))
(t_1 (exp (- (* t_0 y.re) (* y.im (atan2 x.im x.re))))))
(if (<= y.im -2.8e-112)
(* t_1 (log1p (expm1 (sin (* y.im (log (hypot x.im x.re)))))))
(* t_1 (sin (fma t_0 y.im (* 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 = log(hypot(x_46_re, x_46_im));
double t_1 = exp(((t_0 * y_46_re) - (y_46_im * atan2(x_46_im, x_46_re))));
double tmp;
if (y_46_im <= -2.8e-112) {
tmp = t_1 * log1p(expm1(sin((y_46_im * log(hypot(x_46_im, x_46_re))))));
} else {
tmp = t_1 * sin(fma(t_0, y_46_im, (y_46_re * 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)) t_1 = exp(Float64(Float64(t_0 * y_46_re) - Float64(y_46_im * atan(x_46_im, x_46_re)))) tmp = 0.0 if (y_46_im <= -2.8e-112) tmp = Float64(t_1 * log1p(expm1(sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re))))))); else tmp = Float64(t_1 * sin(fma(t_0, y_46_im, 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[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[Exp[N[(N[(t$95$0 * y$46$re), $MachinePrecision] - N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$im, -2.8e-112], N[(t$95$1 * N[Log[1 + N[(Exp[N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]] - 1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[Sin[N[(t$95$0 * y$46$im + N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
t_1 := e^{t_0 \cdot y.re - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\\
\mathbf{if}\;y.im \leq -2.8 \cdot 10^{-112}:\\
\;\;\;\;t_1 \cdot \mathsf{log1p}\left(\mathsf{expm1}\left(\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_1 \cdot \sin \left(\mathsf{fma}\left(t_0, y.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\\
\end{array}
\end{array}
if y.im < -2.80000000000000023e-112Initial program 42.0%
Simplified74.2%
*-commutative74.2%
add-cube-cbrt76.7%
pow375.4%
Applied egg-rr75.4%
log1p-expm1-u75.5%
rem-cube-cbrt74.2%
Applied egg-rr74.2%
Taylor expanded in y.re around 0 44.4%
unpow244.4%
unpow244.4%
hypot-def79.2%
Simplified79.2%
if -2.80000000000000023e-112 < y.im Initial program 44.0%
Simplified83.5%
Final simplification82.1%
(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 (log (hypot x.re x.im)))
(t_2 (exp (- (* t_1 y.re) (* y.im (atan2 x.im x.re))))))
(if (<= y.im -4.8e-112)
(* t_2 (log1p (expm1 t_0)))
(if (<= y.im 4e-38)
(*
(pow (hypot x.re x.im) y.re)
(sin (fma y.re (atan2 x.im x.re) (* y.im t_1))))
(* t_2 t_0)))))
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 = log(hypot(x_46_re, x_46_im));
double t_2 = exp(((t_1 * y_46_re) - (y_46_im * atan2(x_46_im, x_46_re))));
double tmp;
if (y_46_im <= -4.8e-112) {
tmp = t_2 * log1p(expm1(t_0));
} else if (y_46_im <= 4e-38) {
tmp = pow(hypot(x_46_re, x_46_im), y_46_re) * sin(fma(y_46_re, atan2(x_46_im, x_46_re), (y_46_im * t_1)));
} else {
tmp = t_2 * t_0;
}
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 = log(hypot(x_46_re, x_46_im)) t_2 = exp(Float64(Float64(t_1 * y_46_re) - Float64(y_46_im * atan(x_46_im, x_46_re)))) tmp = 0.0 if (y_46_im <= -4.8e-112) tmp = Float64(t_2 * log1p(expm1(t_0))); elseif (y_46_im <= 4e-38) tmp = Float64((hypot(x_46_re, x_46_im) ^ y_46_re) * sin(fma(y_46_re, atan(x_46_im, x_46_re), Float64(y_46_im * t_1)))); else tmp = Float64(t_2 * t_0); 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[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[Exp[N[(N[(t$95$1 * y$46$re), $MachinePrecision] - N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$im, -4.8e-112], N[(t$95$2 * N[Log[1 + N[(Exp[t$95$0] - 1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 4e-38], N[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision] + N[(y$46$im * t$95$1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$2 * t$95$0), $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 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
t_2 := e^{t_1 \cdot y.re - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\\
\mathbf{if}\;y.im \leq -4.8 \cdot 10^{-112}:\\
\;\;\;\;t_2 \cdot \mathsf{log1p}\left(\mathsf{expm1}\left(t_0\right)\right)\\
\mathbf{elif}\;y.im \leq 4 \cdot 10^{-38}:\\
\;\;\;\;{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re} \cdot \sin \left(\mathsf{fma}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}, y.im \cdot t_1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_2 \cdot t_0\\
\end{array}
\end{array}
if y.im < -4.8000000000000001e-112Initial program 42.0%
Simplified74.2%
*-commutative74.2%
add-cube-cbrt76.7%
pow375.4%
Applied egg-rr75.4%
log1p-expm1-u75.5%
rem-cube-cbrt74.2%
Applied egg-rr74.2%
Taylor expanded in y.re around 0 44.4%
unpow244.4%
unpow244.4%
hypot-def79.2%
Simplified79.2%
if -4.8000000000000001e-112 < y.im < 3.9999999999999998e-38Initial program 51.2%
exp-diff51.2%
+-rgt-identity51.2%
+-rgt-identity51.2%
exp-to-pow51.2%
hypot-def51.2%
*-commutative51.2%
exp-prod51.2%
+-commutative51.2%
*-commutative51.2%
Simplified91.5%
Taylor expanded in y.im around 0 91.5%
if 3.9999999999999998e-38 < y.im Initial program 35.0%
Simplified73.5%
*-commutative73.5%
add-cube-cbrt74.8%
pow373.5%
Applied egg-rr73.5%
Taylor expanded in y.re around 0 37.6%
unpow237.6%
unpow237.6%
hypot-def77.8%
Simplified77.8%
Final simplification83.4%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.re x.im))))
(if (or (<= y.im -4.2e-112) (not (<= y.im 5e-45)))
(*
(exp (- (* t_0 y.re) (* y.im (atan2 x.im x.re))))
(sin (* y.im (log (hypot x.im x.re)))))
(*
(pow (hypot x.re x.im) y.re)
(sin (fma y.re (atan2 x.im x.re) (* 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_re, x_46_im));
double tmp;
if ((y_46_im <= -4.2e-112) || !(y_46_im <= 5e-45)) {
tmp = exp(((t_0 * y_46_re) - (y_46_im * atan2(x_46_im, x_46_re)))) * sin((y_46_im * log(hypot(x_46_im, x_46_re))));
} else {
tmp = pow(hypot(x_46_re, x_46_im), y_46_re) * sin(fma(y_46_re, atan2(x_46_im, x_46_re), (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_re, x_46_im)) tmp = 0.0 if ((y_46_im <= -4.2e-112) || !(y_46_im <= 5e-45)) tmp = Float64(exp(Float64(Float64(t_0 * y_46_re) - Float64(y_46_im * atan(x_46_im, x_46_re)))) * sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re))))); else tmp = Float64((hypot(x_46_re, x_46_im) ^ y_46_re) * sin(fma(y_46_re, atan(x_46_im, x_46_re), Float64(y_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[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, If[Or[LessEqual[y$46$im, -4.2e-112], N[Not[LessEqual[y$46$im, 5e-45]], $MachinePrecision]], N[(N[Exp[N[(N[(t$95$0 * y$46$re), $MachinePrecision] - N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision] + N[(y$46$im * t$95$0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
\mathbf{if}\;y.im \leq -4.2 \cdot 10^{-112} \lor \neg \left(y.im \leq 5 \cdot 10^{-45}\right):\\
\;\;\;\;e^{t_0 \cdot y.re - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re} \cdot \sin \left(\mathsf{fma}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}, y.im \cdot t_0\right)\right)\\
\end{array}
\end{array}
if y.im < -4.2000000000000001e-112 or 4.99999999999999976e-45 < y.im Initial program 38.6%
Simplified73.9%
*-commutative73.9%
add-cube-cbrt75.7%
pow374.5%
Applied egg-rr74.5%
Taylor expanded in y.re around 0 41.1%
unpow241.1%
unpow241.1%
hypot-def78.5%
Simplified78.5%
if -4.2000000000000001e-112 < y.im < 4.99999999999999976e-45Initial program 51.2%
exp-diff51.2%
+-rgt-identity51.2%
+-rgt-identity51.2%
exp-to-pow51.2%
hypot-def51.2%
*-commutative51.2%
exp-prod51.2%
+-commutative51.2%
*-commutative51.2%
Simplified91.5%
Taylor expanded in y.im around 0 91.5%
Final simplification83.4%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (sin (* y.re (atan2 x.im x.re))))
(t_1 (pow (hypot x.re x.im) y.re)))
(if (<= y.im -4.2e+89)
(* (/ t_1 (pow (exp y.im) (atan2 x.im x.re))) t_0)
(if (<= y.im 34000000000000.0)
(*
t_1
(sin (fma y.re (atan2 x.im x.re) (* y.im (log (hypot x.re x.im))))))
(*
t_0
(exp
(-
(* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(* y.im (atan2 x.im x.re)))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = sin((y_46_re * atan2(x_46_im, x_46_re)));
double t_1 = pow(hypot(x_46_re, x_46_im), y_46_re);
double tmp;
if (y_46_im <= -4.2e+89) {
tmp = (t_1 / pow(exp(y_46_im), atan2(x_46_im, x_46_re))) * t_0;
} else if (y_46_im <= 34000000000000.0) {
tmp = t_1 * sin(fma(y_46_re, atan2(x_46_im, x_46_re), (y_46_im * log(hypot(x_46_re, x_46_im)))));
} else {
tmp = t_0 * exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (y_46_im * atan2(x_46_im, x_46_re))));
}
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))) t_1 = hypot(x_46_re, x_46_im) ^ y_46_re tmp = 0.0 if (y_46_im <= -4.2e+89) tmp = Float64(Float64(t_1 / (exp(y_46_im) ^ atan(x_46_im, x_46_re))) * t_0); elseif (y_46_im <= 34000000000000.0) tmp = Float64(t_1 * sin(fma(y_46_re, atan(x_46_im, x_46_re), Float64(y_46_im * log(hypot(x_46_re, x_46_im)))))); else tmp = Float64(t_0 * exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - Float64(y_46_im * atan(x_46_im, x_46_re))))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, If[LessEqual[y$46$im, -4.2e+89], N[(N[(t$95$1 / N[Power[N[Exp[y$46$im], $MachinePrecision], N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision], If[LessEqual[y$46$im, 34000000000000.0], N[(t$95$1 * N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision] + N[(y$46$im * N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
t_1 := {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\\
\mathbf{if}\;y.im \leq -4.2 \cdot 10^{+89}:\\
\;\;\;\;\frac{t_1}{{\left(e^{y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}} \cdot t_0\\
\mathbf{elif}\;y.im \leq 34000000000000:\\
\;\;\;\;t_1 \cdot \sin \left(\mathsf{fma}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}, y.im \cdot \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_0 \cdot e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\\
\end{array}
\end{array}
if y.im < -4.19999999999999972e89Initial program 35.8%
exp-diff28.6%
+-rgt-identity28.6%
+-rgt-identity28.6%
exp-to-pow28.6%
hypot-def28.6%
*-commutative28.6%
exp-prod28.6%
+-commutative28.6%
*-commutative28.6%
Simplified54.8%
Taylor expanded in y.re around inf 59.6%
if -4.19999999999999972e89 < y.im < 3.4e13Initial program 49.0%
exp-diff47.0%
+-rgt-identity47.0%
+-rgt-identity47.0%
exp-to-pow47.0%
hypot-def47.0%
*-commutative47.0%
exp-prod47.0%
+-commutative47.0%
*-commutative47.0%
Simplified85.2%
Taylor expanded in y.im around 0 84.5%
if 3.4e13 < y.im Initial program 35.1%
Taylor expanded in y.im around 0 64.4%
Final simplification75.4%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.im (atan2 x.im x.re)))
(t_1 (* y.re (atan2 x.im x.re)))
(t_2 (sin t_1))
(t_3 (exp (- (* y.re (log x.re)) t_0))))
(if (<= x.re -5e-310)
(* t_2 (exp (- (* y.re (log (- x.re))) t_0)))
(if (<= x.re 3.3e-186)
(* t_2 t_3)
(if (<= x.re 3.5e+21)
(* (sin (pow (cbrt t_1) 3.0)) (pow (hypot x.im x.re) y.re))
(* (sin (+ t_1 (* y.im (log x.re)))) t_3))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_im * atan2(x_46_im, x_46_re);
double t_1 = y_46_re * atan2(x_46_im, x_46_re);
double t_2 = sin(t_1);
double t_3 = exp(((y_46_re * log(x_46_re)) - t_0));
double tmp;
if (x_46_re <= -5e-310) {
tmp = t_2 * exp(((y_46_re * log(-x_46_re)) - t_0));
} else if (x_46_re <= 3.3e-186) {
tmp = t_2 * t_3;
} else if (x_46_re <= 3.5e+21) {
tmp = sin(pow(cbrt(t_1), 3.0)) * pow(hypot(x_46_im, x_46_re), y_46_re);
} else {
tmp = sin((t_1 + (y_46_im * log(x_46_re)))) * t_3;
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_im * Math.atan2(x_46_im, x_46_re);
double t_1 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_2 = Math.sin(t_1);
double t_3 = Math.exp(((y_46_re * Math.log(x_46_re)) - t_0));
double tmp;
if (x_46_re <= -5e-310) {
tmp = t_2 * Math.exp(((y_46_re * Math.log(-x_46_re)) - t_0));
} else if (x_46_re <= 3.3e-186) {
tmp = t_2 * t_3;
} else if (x_46_re <= 3.5e+21) {
tmp = Math.sin(Math.pow(Math.cbrt(t_1), 3.0)) * Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
} else {
tmp = Math.sin((t_1 + (y_46_im * Math.log(x_46_re)))) * t_3;
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_im * atan(x_46_im, x_46_re)) t_1 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_2 = sin(t_1) t_3 = exp(Float64(Float64(y_46_re * log(x_46_re)) - t_0)) tmp = 0.0 if (x_46_re <= -5e-310) tmp = Float64(t_2 * exp(Float64(Float64(y_46_re * log(Float64(-x_46_re))) - t_0))); elseif (x_46_re <= 3.3e-186) tmp = Float64(t_2 * t_3); elseif (x_46_re <= 3.5e+21) tmp = Float64(sin((cbrt(t_1) ^ 3.0)) * (hypot(x_46_im, x_46_re) ^ y_46_re)); else tmp = Float64(sin(Float64(t_1 + Float64(y_46_im * log(x_46_re)))) * t_3); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sin[t$95$1], $MachinePrecision]}, Block[{t$95$3 = N[Exp[N[(N[(y$46$re * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[x$46$re, -5e-310], N[(t$95$2 * N[Exp[N[(N[(y$46$re * N[Log[(-x$46$re)], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, 3.3e-186], N[(t$95$2 * t$95$3), $MachinePrecision], If[LessEqual[x$46$re, 3.5e+21], N[(N[Sin[N[Power[N[Power[t$95$1, 1/3], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision] * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], N[(N[Sin[N[(t$95$1 + N[(y$46$im * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$3), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_2 := \sin t_1\\
t_3 := e^{y.re \cdot \log x.re - t_0}\\
\mathbf{if}\;x.re \leq -5 \cdot 10^{-310}:\\
\;\;\;\;t_2 \cdot e^{y.re \cdot \log \left(-x.re\right) - t_0}\\
\mathbf{elif}\;x.re \leq 3.3 \cdot 10^{-186}:\\
\;\;\;\;t_2 \cdot t_3\\
\mathbf{elif}\;x.re \leq 3.5 \cdot 10^{+21}:\\
\;\;\;\;\sin \left({\left(\sqrt[3]{t_1}\right)}^{3}\right) \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;\sin \left(t_1 + y.im \cdot \log x.re\right) \cdot t_3\\
\end{array}
\end{array}
if x.re < -4.999999999999985e-310Initial program 42.0%
Taylor expanded in y.im around 0 54.5%
Taylor expanded in x.re around -inf 66.0%
mul-1-neg44.4%
Simplified66.0%
if -4.999999999999985e-310 < x.re < 3.29999999999999999e-186Initial program 49.9%
Taylor expanded in y.im around 0 84.8%
Taylor expanded in x.re around inf 87.7%
if 3.29999999999999999e-186 < x.re < 3.5e21Initial program 65.5%
Taylor expanded in x.re around inf 34.7%
+-commutative34.7%
fma-def34.7%
Simplified37.4%
Taylor expanded in y.im around 0 58.4%
unpow258.4%
unpow258.4%
hypot-def58.4%
Simplified58.4%
*-commutative84.0%
add-cube-cbrt83.8%
pow386.1%
Applied egg-rr65.1%
if 3.5e21 < x.re Initial program 26.6%
Taylor expanded in x.re around inf 41.3%
+-commutative41.3%
fma-def41.3%
Simplified43.2%
Taylor expanded in x.im around 0 72.4%
Final simplification69.5%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.im (atan2 x.im x.re)))
(t_1 (* y.re (atan2 x.im x.re)))
(t_2 (sin t_1)))
(if (<= x.re -3e-269)
(* t_2 (exp (- (* y.re (log (- x.re))) t_0)))
(if (<= x.re 2.6e+23)
(*
t_2
(exp (- (* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im))))) t_0)))
(*
(sin (+ t_1 (* y.im (log x.re))))
(exp (- (* y.re (log x.re)) t_0)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_im * atan2(x_46_im, x_46_re);
double t_1 = y_46_re * atan2(x_46_im, x_46_re);
double t_2 = sin(t_1);
double tmp;
if (x_46_re <= -3e-269) {
tmp = t_2 * exp(((y_46_re * log(-x_46_re)) - t_0));
} else if (x_46_re <= 2.6e+23) {
tmp = t_2 * exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0));
} else {
tmp = sin((t_1 + (y_46_im * log(x_46_re)))) * exp(((y_46_re * log(x_46_re)) - t_0));
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_0 = y_46im * atan2(x_46im, x_46re)
t_1 = y_46re * atan2(x_46im, x_46re)
t_2 = sin(t_1)
if (x_46re <= (-3d-269)) then
tmp = t_2 * exp(((y_46re * log(-x_46re)) - t_0))
else if (x_46re <= 2.6d+23) then
tmp = t_2 * exp(((y_46re * log(sqrt(((x_46re * x_46re) + (x_46im * x_46im))))) - t_0))
else
tmp = sin((t_1 + (y_46im * log(x_46re)))) * exp(((y_46re * log(x_46re)) - t_0))
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_im * Math.atan2(x_46_im, x_46_re);
double t_1 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_2 = Math.sin(t_1);
double tmp;
if (x_46_re <= -3e-269) {
tmp = t_2 * Math.exp(((y_46_re * Math.log(-x_46_re)) - t_0));
} else if (x_46_re <= 2.6e+23) {
tmp = t_2 * Math.exp(((y_46_re * Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0));
} else {
tmp = Math.sin((t_1 + (y_46_im * Math.log(x_46_re)))) * Math.exp(((y_46_re * Math.log(x_46_re)) - t_0));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = y_46_im * math.atan2(x_46_im, x_46_re) t_1 = y_46_re * math.atan2(x_46_im, x_46_re) t_2 = math.sin(t_1) tmp = 0 if x_46_re <= -3e-269: tmp = t_2 * math.exp(((y_46_re * math.log(-x_46_re)) - t_0)) elif x_46_re <= 2.6e+23: tmp = t_2 * math.exp(((y_46_re * math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0)) else: tmp = math.sin((t_1 + (y_46_im * math.log(x_46_re)))) * math.exp(((y_46_re * math.log(x_46_re)) - t_0)) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_im * atan(x_46_im, x_46_re)) t_1 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_2 = sin(t_1) tmp = 0.0 if (x_46_re <= -3e-269) tmp = Float64(t_2 * exp(Float64(Float64(y_46_re * log(Float64(-x_46_re))) - t_0))); elseif (x_46_re <= 2.6e+23) tmp = Float64(t_2 * exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - t_0))); else tmp = Float64(sin(Float64(t_1 + Float64(y_46_im * log(x_46_re)))) * exp(Float64(Float64(y_46_re * log(x_46_re)) - t_0))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = y_46_im * atan2(x_46_im, x_46_re); t_1 = y_46_re * atan2(x_46_im, x_46_re); t_2 = sin(t_1); tmp = 0.0; if (x_46_re <= -3e-269) tmp = t_2 * exp(((y_46_re * log(-x_46_re)) - t_0)); elseif (x_46_re <= 2.6e+23) tmp = t_2 * exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_0)); else tmp = sin((t_1 + (y_46_im * log(x_46_re)))) * exp(((y_46_re * log(x_46_re)) - t_0)); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sin[t$95$1], $MachinePrecision]}, If[LessEqual[x$46$re, -3e-269], N[(t$95$2 * N[Exp[N[(N[(y$46$re * N[Log[(-x$46$re)], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, 2.6e+23], N[(t$95$2 * N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Sin[N[(t$95$1 + N[(y$46$im * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Exp[N[(N[(y$46$re * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_2 := \sin t_1\\
\mathbf{if}\;x.re \leq -3 \cdot 10^{-269}:\\
\;\;\;\;t_2 \cdot e^{y.re \cdot \log \left(-x.re\right) - t_0}\\
\mathbf{elif}\;x.re \leq 2.6 \cdot 10^{+23}:\\
\;\;\;\;t_2 \cdot e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - t_0}\\
\mathbf{else}:\\
\;\;\;\;\sin \left(t_1 + y.im \cdot \log x.re\right) \cdot e^{y.re \cdot \log x.re - t_0}\\
\end{array}
\end{array}
if x.re < -2.9999999999999999e-269Initial program 41.5%
Taylor expanded in y.im around 0 53.9%
Taylor expanded in x.re around -inf 67.1%
mul-1-neg45.6%
Simplified67.1%
if -2.9999999999999999e-269 < x.re < 2.59999999999999992e23Initial program 58.7%
Taylor expanded in y.im around 0 72.6%
if 2.59999999999999992e23 < x.re Initial program 26.6%
Taylor expanded in x.re around inf 41.3%
+-commutative41.3%
fma-def41.3%
Simplified43.2%
Taylor expanded in x.im around 0 72.4%
Final simplification70.0%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.im (atan2 x.im x.re)))
(t_1 (* y.re (atan2 x.im x.re)))
(t_2 (* (sin t_1) (exp (- (* y.re (log (- x.im))) t_0)))))
(if (<= x.im -1e-76)
t_2
(if (<= x.im -3e-200)
(* (sin (pow (cbrt t_1) 3.0)) (pow (hypot x.im x.re) y.re))
(if (<= x.im -2.6e-283)
t_2
(if (<= x.im 2.6e-264)
(*
(sin (fabs t_1))
(pow (sqrt (+ (* x.re x.re) (* x.im x.im))) y.re))
(*
(exp (- (* (log (hypot x.re x.im)) y.re) t_0))
(sin (* y.im (log x.im))))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_im * atan2(x_46_im, x_46_re);
double t_1 = y_46_re * atan2(x_46_im, x_46_re);
double t_2 = sin(t_1) * exp(((y_46_re * log(-x_46_im)) - t_0));
double tmp;
if (x_46_im <= -1e-76) {
tmp = t_2;
} else if (x_46_im <= -3e-200) {
tmp = sin(pow(cbrt(t_1), 3.0)) * pow(hypot(x_46_im, x_46_re), y_46_re);
} else if (x_46_im <= -2.6e-283) {
tmp = t_2;
} else if (x_46_im <= 2.6e-264) {
tmp = sin(fabs(t_1)) * pow(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))), y_46_re);
} else {
tmp = exp(((log(hypot(x_46_re, x_46_im)) * y_46_re) - t_0)) * sin((y_46_im * log(x_46_im)));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_im * Math.atan2(x_46_im, x_46_re);
double t_1 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_2 = Math.sin(t_1) * Math.exp(((y_46_re * Math.log(-x_46_im)) - t_0));
double tmp;
if (x_46_im <= -1e-76) {
tmp = t_2;
} else if (x_46_im <= -3e-200) {
tmp = Math.sin(Math.pow(Math.cbrt(t_1), 3.0)) * Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
} else if (x_46_im <= -2.6e-283) {
tmp = t_2;
} else if (x_46_im <= 2.6e-264) {
tmp = Math.sin(Math.abs(t_1)) * Math.pow(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))), y_46_re);
} else {
tmp = Math.exp(((Math.log(Math.hypot(x_46_re, x_46_im)) * y_46_re) - t_0)) * Math.sin((y_46_im * Math.log(x_46_im)));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_im * atan(x_46_im, x_46_re)) t_1 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_2 = Float64(sin(t_1) * exp(Float64(Float64(y_46_re * log(Float64(-x_46_im))) - t_0))) tmp = 0.0 if (x_46_im <= -1e-76) tmp = t_2; elseif (x_46_im <= -3e-200) tmp = Float64(sin((cbrt(t_1) ^ 3.0)) * (hypot(x_46_im, x_46_re) ^ y_46_re)); elseif (x_46_im <= -2.6e-283) tmp = t_2; elseif (x_46_im <= 2.6e-264) tmp = Float64(sin(abs(t_1)) * (sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))) ^ y_46_re)); else tmp = Float64(exp(Float64(Float64(log(hypot(x_46_re, x_46_im)) * y_46_re) - t_0)) * sin(Float64(y_46_im * log(x_46_im)))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[Sin[t$95$1], $MachinePrecision] * N[Exp[N[(N[(y$46$re * N[Log[(-x$46$im)], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x$46$im, -1e-76], t$95$2, If[LessEqual[x$46$im, -3e-200], N[(N[Sin[N[Power[N[Power[t$95$1, 1/3], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision] * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$im, -2.6e-283], t$95$2, If[LessEqual[x$46$im, 2.6e-264], N[(N[Sin[N[Abs[t$95$1], $MachinePrecision]], $MachinePrecision] * N[Power[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], N[(N[Exp[N[(N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$re), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(y$46$im * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_2 := \sin t_1 \cdot e^{y.re \cdot \log \left(-x.im\right) - t_0}\\
\mathbf{if}\;x.im \leq -1 \cdot 10^{-76}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x.im \leq -3 \cdot 10^{-200}:\\
\;\;\;\;\sin \left({\left(\sqrt[3]{t_1}\right)}^{3}\right) \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{elif}\;x.im \leq -2.6 \cdot 10^{-283}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x.im \leq 2.6 \cdot 10^{-264}:\\
\;\;\;\;\sin \left(\left|t_1\right|\right) \cdot {\left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;e^{\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.re - t_0} \cdot \sin \left(y.im \cdot \log x.im\right)\\
\end{array}
\end{array}
if x.im < -9.99999999999999927e-77 or -2.99999999999999995e-200 < x.im < -2.6000000000000001e-283Initial program 38.9%
Taylor expanded in y.im around 0 62.9%
Taylor expanded in x.im around -inf 68.3%
mul-1-neg45.1%
Simplified68.3%
if -9.99999999999999927e-77 < x.im < -2.99999999999999995e-200Initial program 59.2%
Taylor expanded in x.re around inf 26.2%
+-commutative26.2%
fma-def26.2%
Simplified26.3%
Taylor expanded in y.im around 0 47.1%
unpow247.1%
unpow247.1%
hypot-def51.2%
Simplified51.2%
*-commutative88.8%
add-cube-cbrt92.2%
pow392.2%
Applied egg-rr61.9%
if -2.6000000000000001e-283 < x.im < 2.6000000000000002e-264Initial program 28.6%
Taylor expanded in x.re around inf 43.8%
+-commutative43.8%
fma-def43.8%
Simplified43.8%
Taylor expanded in y.im around 0 44.7%
+-commutative44.7%
unpow244.7%
unpow244.7%
Simplified44.7%
*-commutative44.7%
add-sqr-sqrt23.0%
sqrt-unprod51.9%
pow251.9%
Applied egg-rr51.9%
*-commutative51.9%
unpow251.9%
rem-sqrt-square59.1%
Simplified59.1%
if 2.6000000000000002e-264 < x.im Initial program 45.0%
Simplified77.6%
Taylor expanded in x.re around 0 75.3%
Taylor expanded in y.re around 0 66.0%
*-commutative66.0%
Simplified66.0%
Final simplification66.0%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.im (atan2 x.im x.re)))
(t_1 (* y.re (atan2 x.im x.re)))
(t_2 (sin t_1)))
(if (<= x.re -5e-310)
(* t_2 (exp (- (* y.re (log (- x.re))) t_0)))
(if (<= x.re 2.5e-186)
(* t_2 (exp (- (* y.re (log x.re)) t_0)))
(* (sin (pow (cbrt t_1) 3.0)) (pow (hypot x.im x.re) y.re))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_im * atan2(x_46_im, x_46_re);
double t_1 = y_46_re * atan2(x_46_im, x_46_re);
double t_2 = sin(t_1);
double tmp;
if (x_46_re <= -5e-310) {
tmp = t_2 * exp(((y_46_re * log(-x_46_re)) - t_0));
} else if (x_46_re <= 2.5e-186) {
tmp = t_2 * exp(((y_46_re * log(x_46_re)) - t_0));
} else {
tmp = sin(pow(cbrt(t_1), 3.0)) * pow(hypot(x_46_im, x_46_re), y_46_re);
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_im * Math.atan2(x_46_im, x_46_re);
double t_1 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_2 = Math.sin(t_1);
double tmp;
if (x_46_re <= -5e-310) {
tmp = t_2 * Math.exp(((y_46_re * Math.log(-x_46_re)) - t_0));
} else if (x_46_re <= 2.5e-186) {
tmp = t_2 * Math.exp(((y_46_re * Math.log(x_46_re)) - t_0));
} else {
tmp = Math.sin(Math.pow(Math.cbrt(t_1), 3.0)) * Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_im * atan(x_46_im, x_46_re)) t_1 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_2 = sin(t_1) tmp = 0.0 if (x_46_re <= -5e-310) tmp = Float64(t_2 * exp(Float64(Float64(y_46_re * log(Float64(-x_46_re))) - t_0))); elseif (x_46_re <= 2.5e-186) tmp = Float64(t_2 * exp(Float64(Float64(y_46_re * log(x_46_re)) - t_0))); else tmp = Float64(sin((cbrt(t_1) ^ 3.0)) * (hypot(x_46_im, x_46_re) ^ y_46_re)); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sin[t$95$1], $MachinePrecision]}, If[LessEqual[x$46$re, -5e-310], N[(t$95$2 * N[Exp[N[(N[(y$46$re * N[Log[(-x$46$re)], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, 2.5e-186], N[(t$95$2 * N[Exp[N[(N[(y$46$re * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Sin[N[Power[N[Power[t$95$1, 1/3], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision] * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_2 := \sin t_1\\
\mathbf{if}\;x.re \leq -5 \cdot 10^{-310}:\\
\;\;\;\;t_2 \cdot e^{y.re \cdot \log \left(-x.re\right) - t_0}\\
\mathbf{elif}\;x.re \leq 2.5 \cdot 10^{-186}:\\
\;\;\;\;t_2 \cdot e^{y.re \cdot \log x.re - t_0}\\
\mathbf{else}:\\
\;\;\;\;\sin \left({\left(\sqrt[3]{t_1}\right)}^{3}\right) \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\end{array}
\end{array}
if x.re < -4.999999999999985e-310Initial program 42.0%
Taylor expanded in y.im around 0 54.5%
Taylor expanded in x.re around -inf 66.0%
mul-1-neg44.4%
Simplified66.0%
if -4.999999999999985e-310 < x.re < 2.5e-186Initial program 49.9%
Taylor expanded in y.im around 0 84.8%
Taylor expanded in x.re around inf 87.7%
if 2.5e-186 < x.re Initial program 43.4%
Taylor expanded in x.re around inf 38.5%
+-commutative38.5%
fma-def38.5%
Simplified40.7%
Taylor expanded in y.im around 0 46.6%
unpow246.6%
unpow246.6%
hypot-def46.9%
Simplified46.9%
*-commutative79.0%
add-cube-cbrt80.8%
pow381.8%
Applied egg-rr51.8%
Final simplification62.5%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.im (atan2 x.im x.re)))
(t_1 (sin (* y.re (atan2 x.im x.re)))))
(if (<= x.re -5e-310)
(* t_1 (exp (- (* y.re (log (- x.re))) t_0)))
(if (or (<= x.re 1.45e-185) (not (<= x.re 9.5e-6)))
(* t_1 (exp (- (* y.re (log x.re)) t_0)))
(*
t_1
(exp
(- (* y.re (log (+ x.re (* 0.5 (/ (* x.im x.im) x.re))))) t_0)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_im * atan2(x_46_im, x_46_re);
double t_1 = sin((y_46_re * atan2(x_46_im, x_46_re)));
double tmp;
if (x_46_re <= -5e-310) {
tmp = t_1 * exp(((y_46_re * log(-x_46_re)) - t_0));
} else if ((x_46_re <= 1.45e-185) || !(x_46_re <= 9.5e-6)) {
tmp = t_1 * exp(((y_46_re * log(x_46_re)) - t_0));
} else {
tmp = t_1 * exp(((y_46_re * log((x_46_re + (0.5 * ((x_46_im * x_46_im) / x_46_re))))) - t_0));
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = y_46im * atan2(x_46im, x_46re)
t_1 = sin((y_46re * atan2(x_46im, x_46re)))
if (x_46re <= (-5d-310)) then
tmp = t_1 * exp(((y_46re * log(-x_46re)) - t_0))
else if ((x_46re <= 1.45d-185) .or. (.not. (x_46re <= 9.5d-6))) then
tmp = t_1 * exp(((y_46re * log(x_46re)) - t_0))
else
tmp = t_1 * exp(((y_46re * log((x_46re + (0.5d0 * ((x_46im * x_46im) / x_46re))))) - t_0))
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_im * Math.atan2(x_46_im, x_46_re);
double t_1 = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
double tmp;
if (x_46_re <= -5e-310) {
tmp = t_1 * Math.exp(((y_46_re * Math.log(-x_46_re)) - t_0));
} else if ((x_46_re <= 1.45e-185) || !(x_46_re <= 9.5e-6)) {
tmp = t_1 * Math.exp(((y_46_re * Math.log(x_46_re)) - t_0));
} else {
tmp = t_1 * Math.exp(((y_46_re * Math.log((x_46_re + (0.5 * ((x_46_im * x_46_im) / x_46_re))))) - t_0));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = y_46_im * math.atan2(x_46_im, x_46_re) t_1 = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) tmp = 0 if x_46_re <= -5e-310: tmp = t_1 * math.exp(((y_46_re * math.log(-x_46_re)) - t_0)) elif (x_46_re <= 1.45e-185) or not (x_46_re <= 9.5e-6): tmp = t_1 * math.exp(((y_46_re * math.log(x_46_re)) - t_0)) else: tmp = t_1 * math.exp(((y_46_re * math.log((x_46_re + (0.5 * ((x_46_im * x_46_im) / x_46_re))))) - t_0)) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_im * atan(x_46_im, x_46_re)) t_1 = sin(Float64(y_46_re * atan(x_46_im, x_46_re))) tmp = 0.0 if (x_46_re <= -5e-310) tmp = Float64(t_1 * exp(Float64(Float64(y_46_re * log(Float64(-x_46_re))) - t_0))); elseif ((x_46_re <= 1.45e-185) || !(x_46_re <= 9.5e-6)) tmp = Float64(t_1 * exp(Float64(Float64(y_46_re * log(x_46_re)) - t_0))); else tmp = Float64(t_1 * exp(Float64(Float64(y_46_re * log(Float64(x_46_re + Float64(0.5 * Float64(Float64(x_46_im * x_46_im) / x_46_re))))) - t_0))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = y_46_im * atan2(x_46_im, x_46_re); t_1 = sin((y_46_re * atan2(x_46_im, x_46_re))); tmp = 0.0; if (x_46_re <= -5e-310) tmp = t_1 * exp(((y_46_re * log(-x_46_re)) - t_0)); elseif ((x_46_re <= 1.45e-185) || ~((x_46_re <= 9.5e-6))) tmp = t_1 * exp(((y_46_re * log(x_46_re)) - t_0)); else tmp = t_1 * exp(((y_46_re * log((x_46_re + (0.5 * ((x_46_im * x_46_im) / x_46_re))))) - t_0)); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[x$46$re, -5e-310], N[(t$95$1 * N[Exp[N[(N[(y$46$re * N[Log[(-x$46$re)], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[x$46$re, 1.45e-185], N[Not[LessEqual[x$46$re, 9.5e-6]], $MachinePrecision]], N[(t$95$1 * N[Exp[N[(N[(y$46$re * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[Exp[N[(N[(y$46$re * N[Log[N[(x$46$re + N[(0.5 * N[(N[(x$46$im * x$46$im), $MachinePrecision] / x$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{if}\;x.re \leq -5 \cdot 10^{-310}:\\
\;\;\;\;t_1 \cdot e^{y.re \cdot \log \left(-x.re\right) - t_0}\\
\mathbf{elif}\;x.re \leq 1.45 \cdot 10^{-185} \lor \neg \left(x.re \leq 9.5 \cdot 10^{-6}\right):\\
\;\;\;\;t_1 \cdot e^{y.re \cdot \log x.re - t_0}\\
\mathbf{else}:\\
\;\;\;\;t_1 \cdot e^{y.re \cdot \log \left(x.re + 0.5 \cdot \frac{x.im \cdot x.im}{x.re}\right) - t_0}\\
\end{array}
\end{array}
if x.re < -4.999999999999985e-310Initial program 42.0%
Taylor expanded in y.im around 0 54.5%
Taylor expanded in x.re around -inf 66.0%
mul-1-neg44.4%
Simplified66.0%
if -4.999999999999985e-310 < x.re < 1.44999999999999997e-185 or 9.5000000000000005e-6 < x.re Initial program 33.4%
Taylor expanded in y.im around 0 52.2%
Taylor expanded in x.re around inf 58.7%
if 1.44999999999999997e-185 < x.re < 9.5000000000000005e-6Initial program 69.5%
Taylor expanded in y.im around 0 68.7%
Taylor expanded in x.re around inf 63.8%
unpow263.8%
Simplified63.8%
Final simplification63.2%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.im (atan2 x.im x.re)))
(t_1 (* y.re (atan2 x.im x.re)))
(t_2 (sin t_1)))
(if (<= x.im -1.5e-281)
(* t_2 (exp (- (* y.re (log (- x.im))) t_0)))
(if (<= x.im 8.6e-270)
(* (sin (fabs t_1)) (pow (sqrt (+ (* x.re x.re) (* x.im x.im))) y.re))
(if (or (<= x.im 4.4e-194) (not (<= x.im 2.3e-46)))
(* t_2 (exp (- (* y.re (log x.im)) t_0)))
(* t_2 (pow (hypot x.im x.re) y.re)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_im * atan2(x_46_im, x_46_re);
double t_1 = y_46_re * atan2(x_46_im, x_46_re);
double t_2 = sin(t_1);
double tmp;
if (x_46_im <= -1.5e-281) {
tmp = t_2 * exp(((y_46_re * log(-x_46_im)) - t_0));
} else if (x_46_im <= 8.6e-270) {
tmp = sin(fabs(t_1)) * pow(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))), y_46_re);
} else if ((x_46_im <= 4.4e-194) || !(x_46_im <= 2.3e-46)) {
tmp = t_2 * exp(((y_46_re * log(x_46_im)) - t_0));
} else {
tmp = t_2 * pow(hypot(x_46_im, x_46_re), y_46_re);
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_im * Math.atan2(x_46_im, x_46_re);
double t_1 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_2 = Math.sin(t_1);
double tmp;
if (x_46_im <= -1.5e-281) {
tmp = t_2 * Math.exp(((y_46_re * Math.log(-x_46_im)) - t_0));
} else if (x_46_im <= 8.6e-270) {
tmp = Math.sin(Math.abs(t_1)) * Math.pow(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))), y_46_re);
} else if ((x_46_im <= 4.4e-194) || !(x_46_im <= 2.3e-46)) {
tmp = t_2 * Math.exp(((y_46_re * Math.log(x_46_im)) - t_0));
} else {
tmp = t_2 * Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = y_46_im * math.atan2(x_46_im, x_46_re) t_1 = y_46_re * math.atan2(x_46_im, x_46_re) t_2 = math.sin(t_1) tmp = 0 if x_46_im <= -1.5e-281: tmp = t_2 * math.exp(((y_46_re * math.log(-x_46_im)) - t_0)) elif x_46_im <= 8.6e-270: tmp = math.sin(math.fabs(t_1)) * math.pow(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))), y_46_re) elif (x_46_im <= 4.4e-194) or not (x_46_im <= 2.3e-46): tmp = t_2 * math.exp(((y_46_re * math.log(x_46_im)) - t_0)) else: tmp = t_2 * math.pow(math.hypot(x_46_im, x_46_re), y_46_re) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_im * atan(x_46_im, x_46_re)) t_1 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_2 = sin(t_1) tmp = 0.0 if (x_46_im <= -1.5e-281) tmp = Float64(t_2 * exp(Float64(Float64(y_46_re * log(Float64(-x_46_im))) - t_0))); elseif (x_46_im <= 8.6e-270) tmp = Float64(sin(abs(t_1)) * (sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))) ^ y_46_re)); elseif ((x_46_im <= 4.4e-194) || !(x_46_im <= 2.3e-46)) tmp = Float64(t_2 * exp(Float64(Float64(y_46_re * log(x_46_im)) - t_0))); else tmp = Float64(t_2 * (hypot(x_46_im, x_46_re) ^ y_46_re)); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = y_46_im * atan2(x_46_im, x_46_re); t_1 = y_46_re * atan2(x_46_im, x_46_re); t_2 = sin(t_1); tmp = 0.0; if (x_46_im <= -1.5e-281) tmp = t_2 * exp(((y_46_re * log(-x_46_im)) - t_0)); elseif (x_46_im <= 8.6e-270) tmp = sin(abs(t_1)) * (sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))) ^ y_46_re); elseif ((x_46_im <= 4.4e-194) || ~((x_46_im <= 2.3e-46))) tmp = t_2 * exp(((y_46_re * log(x_46_im)) - t_0)); else tmp = t_2 * (hypot(x_46_im, x_46_re) ^ y_46_re); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sin[t$95$1], $MachinePrecision]}, If[LessEqual[x$46$im, -1.5e-281], N[(t$95$2 * N[Exp[N[(N[(y$46$re * N[Log[(-x$46$im)], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$im, 8.6e-270], N[(N[Sin[N[Abs[t$95$1], $MachinePrecision]], $MachinePrecision] * N[Power[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[x$46$im, 4.4e-194], N[Not[LessEqual[x$46$im, 2.3e-46]], $MachinePrecision]], N[(t$95$2 * N[Exp[N[(N[(y$46$re * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$2 * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_2 := \sin t_1\\
\mathbf{if}\;x.im \leq -1.5 \cdot 10^{-281}:\\
\;\;\;\;t_2 \cdot e^{y.re \cdot \log \left(-x.im\right) - t_0}\\
\mathbf{elif}\;x.im \leq 8.6 \cdot 10^{-270}:\\
\;\;\;\;\sin \left(\left|t_1\right|\right) \cdot {\left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)}^{y.re}\\
\mathbf{elif}\;x.im \leq 4.4 \cdot 10^{-194} \lor \neg \left(x.im \leq 2.3 \cdot 10^{-46}\right):\\
\;\;\;\;t_2 \cdot e^{y.re \cdot \log x.im - t_0}\\
\mathbf{else}:\\
\;\;\;\;t_2 \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\end{array}
\end{array}
if x.im < -1.49999999999999987e-281Initial program 43.4%
Taylor expanded in y.im around 0 59.8%
Taylor expanded in x.im around -inf 63.3%
mul-1-neg43.3%
Simplified63.3%
if -1.49999999999999987e-281 < x.im < 8.6000000000000004e-270Initial program 23.1%
Taylor expanded in x.re around inf 39.5%
+-commutative39.5%
fma-def39.5%
Simplified39.5%
Taylor expanded in y.im around 0 47.9%
+-commutative47.9%
unpow247.9%
unpow247.9%
Simplified47.9%
*-commutative47.9%
add-sqr-sqrt24.5%
sqrt-unprod55.7%
pow255.7%
Applied egg-rr55.7%
*-commutative55.7%
unpow255.7%
rem-sqrt-square63.4%
Simplified63.4%
if 8.6000000000000004e-270 < x.im < 4.4000000000000003e-194 or 2.2999999999999999e-46 < x.im Initial program 38.0%
Taylor expanded in y.im around 0 49.1%
Taylor expanded in x.re around 0 61.5%
if 4.4000000000000003e-194 < x.im < 2.2999999999999999e-46Initial program 64.7%
Taylor expanded in x.re around inf 9.6%
+-commutative9.6%
fma-def9.6%
Simplified19.0%
Taylor expanded in y.im around 0 56.8%
unpow256.8%
unpow256.8%
hypot-def62.7%
Simplified62.7%
Final simplification62.6%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.im (atan2 x.im x.re)))
(t_1 (sin (* y.re (atan2 x.im x.re)))))
(if (<= x.re -5e-310)
(* t_1 (exp (- (* y.re (log (- x.re))) t_0)))
(if (or (<= x.re 7e-185) (not (<= x.re 0.88)))
(* t_1 (exp (- (* y.re (log x.re)) t_0)))
(* t_1 (pow (sqrt (+ (* x.re x.re) (* x.im x.im))) y.re))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_im * atan2(x_46_im, x_46_re);
double t_1 = sin((y_46_re * atan2(x_46_im, x_46_re)));
double tmp;
if (x_46_re <= -5e-310) {
tmp = t_1 * exp(((y_46_re * log(-x_46_re)) - t_0));
} else if ((x_46_re <= 7e-185) || !(x_46_re <= 0.88)) {
tmp = t_1 * exp(((y_46_re * log(x_46_re)) - t_0));
} else {
tmp = t_1 * pow(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))), y_46_re);
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = y_46im * atan2(x_46im, x_46re)
t_1 = sin((y_46re * atan2(x_46im, x_46re)))
if (x_46re <= (-5d-310)) then
tmp = t_1 * exp(((y_46re * log(-x_46re)) - t_0))
else if ((x_46re <= 7d-185) .or. (.not. (x_46re <= 0.88d0))) then
tmp = t_1 * exp(((y_46re * log(x_46re)) - t_0))
else
tmp = t_1 * (sqrt(((x_46re * x_46re) + (x_46im * x_46im))) ** y_46re)
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_im * Math.atan2(x_46_im, x_46_re);
double t_1 = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
double tmp;
if (x_46_re <= -5e-310) {
tmp = t_1 * Math.exp(((y_46_re * Math.log(-x_46_re)) - t_0));
} else if ((x_46_re <= 7e-185) || !(x_46_re <= 0.88)) {
tmp = t_1 * Math.exp(((y_46_re * Math.log(x_46_re)) - t_0));
} else {
tmp = t_1 * Math.pow(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))), y_46_re);
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = y_46_im * math.atan2(x_46_im, x_46_re) t_1 = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) tmp = 0 if x_46_re <= -5e-310: tmp = t_1 * math.exp(((y_46_re * math.log(-x_46_re)) - t_0)) elif (x_46_re <= 7e-185) or not (x_46_re <= 0.88): tmp = t_1 * math.exp(((y_46_re * math.log(x_46_re)) - t_0)) else: tmp = t_1 * math.pow(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))), y_46_re) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_im * atan(x_46_im, x_46_re)) t_1 = sin(Float64(y_46_re * atan(x_46_im, x_46_re))) tmp = 0.0 if (x_46_re <= -5e-310) tmp = Float64(t_1 * exp(Float64(Float64(y_46_re * log(Float64(-x_46_re))) - t_0))); elseif ((x_46_re <= 7e-185) || !(x_46_re <= 0.88)) tmp = Float64(t_1 * exp(Float64(Float64(y_46_re * log(x_46_re)) - t_0))); else tmp = Float64(t_1 * (sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))) ^ y_46_re)); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = y_46_im * atan2(x_46_im, x_46_re); t_1 = sin((y_46_re * atan2(x_46_im, x_46_re))); tmp = 0.0; if (x_46_re <= -5e-310) tmp = t_1 * exp(((y_46_re * log(-x_46_re)) - t_0)); elseif ((x_46_re <= 7e-185) || ~((x_46_re <= 0.88))) tmp = t_1 * exp(((y_46_re * log(x_46_re)) - t_0)); else tmp = t_1 * (sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))) ^ y_46_re); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[x$46$re, -5e-310], N[(t$95$1 * N[Exp[N[(N[(y$46$re * N[Log[(-x$46$re)], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[x$46$re, 7e-185], N[Not[LessEqual[x$46$re, 0.88]], $MachinePrecision]], N[(t$95$1 * N[Exp[N[(N[(y$46$re * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[Power[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{if}\;x.re \leq -5 \cdot 10^{-310}:\\
\;\;\;\;t_1 \cdot e^{y.re \cdot \log \left(-x.re\right) - t_0}\\
\mathbf{elif}\;x.re \leq 7 \cdot 10^{-185} \lor \neg \left(x.re \leq 0.88\right):\\
\;\;\;\;t_1 \cdot e^{y.re \cdot \log x.re - t_0}\\
\mathbf{else}:\\
\;\;\;\;t_1 \cdot {\left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)}^{y.re}\\
\end{array}
\end{array}
if x.re < -4.999999999999985e-310Initial program 42.0%
Taylor expanded in y.im around 0 54.5%
Taylor expanded in x.re around -inf 66.0%
mul-1-neg44.4%
Simplified66.0%
if -4.999999999999985e-310 < x.re < 6.9999999999999996e-185 or 0.880000000000000004 < x.re Initial program 34.0%
Taylor expanded in y.im around 0 51.6%
Taylor expanded in x.re around inf 58.1%
if 6.9999999999999996e-185 < x.re < 0.880000000000000004Initial program 69.2%
Taylor expanded in x.re around inf 36.5%
+-commutative36.5%
fma-def36.5%
Simplified39.0%
Taylor expanded in y.im around 0 63.1%
+-commutative63.1%
unpow263.1%
unpow263.1%
Simplified63.1%
Final simplification62.8%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (sin (* y.re (atan2 x.im x.re)))))
(if (<= x.im 3.6e-267)
(* t_0 (pow (sqrt (+ (* x.re x.re) (* x.im x.im))) y.re))
(* t_0 (exp (- (* y.re (log x.im)) (* y.im (atan2 x.im x.re))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = sin((y_46_re * atan2(x_46_im, x_46_re)));
double tmp;
if (x_46_im <= 3.6e-267) {
tmp = t_0 * pow(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))), y_46_re);
} else {
tmp = t_0 * exp(((y_46_re * log(x_46_im)) - (y_46_im * atan2(x_46_im, x_46_re))));
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
real(8) :: tmp
t_0 = sin((y_46re * atan2(x_46im, x_46re)))
if (x_46im <= 3.6d-267) then
tmp = t_0 * (sqrt(((x_46re * x_46re) + (x_46im * x_46im))) ** y_46re)
else
tmp = t_0 * exp(((y_46re * log(x_46im)) - (y_46im * atan2(x_46im, x_46re))))
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
double tmp;
if (x_46_im <= 3.6e-267) {
tmp = t_0 * Math.pow(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))), y_46_re);
} else {
tmp = t_0 * Math.exp(((y_46_re * Math.log(x_46_im)) - (y_46_im * Math.atan2(x_46_im, x_46_re))));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) tmp = 0 if x_46_im <= 3.6e-267: tmp = t_0 * math.pow(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))), y_46_re) else: tmp = t_0 * math.exp(((y_46_re * math.log(x_46_im)) - (y_46_im * math.atan2(x_46_im, x_46_re)))) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin(Float64(y_46_re * atan(x_46_im, x_46_re))) tmp = 0.0 if (x_46_im <= 3.6e-267) tmp = Float64(t_0 * (sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))) ^ y_46_re)); else tmp = Float64(t_0 * exp(Float64(Float64(y_46_re * log(x_46_im)) - Float64(y_46_im * atan(x_46_im, x_46_re))))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin((y_46_re * atan2(x_46_im, x_46_re))); tmp = 0.0; if (x_46_im <= 3.6e-267) tmp = t_0 * (sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))) ^ y_46_re); else tmp = t_0 * exp(((y_46_re * log(x_46_im)) - (y_46_im * atan2(x_46_im, x_46_re)))); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[x$46$im, 3.6e-267], N[(t$95$0 * N[Power[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[Exp[N[(N[(y$46$re * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision] - N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{if}\;x.im \leq 3.6 \cdot 10^{-267}:\\
\;\;\;\;t_0 \cdot {\left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;t_0 \cdot e^{y.re \cdot \log x.im - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\\
\end{array}
\end{array}
if x.im < 3.6000000000000001e-267Initial program 41.4%
Taylor expanded in x.re around inf 19.7%
+-commutative19.7%
fma-def19.7%
Simplified21.2%
Taylor expanded in y.im around 0 51.2%
+-commutative51.2%
unpow251.2%
unpow251.2%
Simplified51.2%
if 3.6000000000000001e-267 < x.im Initial program 45.5%
Taylor expanded in y.im around 0 52.9%
Taylor expanded in x.re around 0 58.4%
Final simplification54.6%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (sin (* y.re (atan2 x.im x.re)))))
(if (<= y.im 51000000000000.0)
(* t_0 (pow (hypot x.im x.re) y.re))
(* t_0 (pow (sqrt (+ (* x.re x.re) (* x.im x.im))) y.re)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = sin((y_46_re * atan2(x_46_im, x_46_re)));
double tmp;
if (y_46_im <= 51000000000000.0) {
tmp = t_0 * pow(hypot(x_46_im, x_46_re), y_46_re);
} else {
tmp = t_0 * pow(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))), y_46_re);
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
double tmp;
if (y_46_im <= 51000000000000.0) {
tmp = t_0 * Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
} else {
tmp = t_0 * Math.pow(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))), 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_im <= 51000000000000.0: tmp = t_0 * math.pow(math.hypot(x_46_im, x_46_re), y_46_re) else: tmp = t_0 * math.pow(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))), 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_im <= 51000000000000.0) tmp = Float64(t_0 * (hypot(x_46_im, x_46_re) ^ y_46_re)); else tmp = Float64(t_0 * (sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))) ^ y_46_re)); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin((y_46_re * atan2(x_46_im, x_46_re))); tmp = 0.0; if (y_46_im <= 51000000000000.0) tmp = t_0 * (hypot(x_46_im, x_46_re) ^ y_46_re); else tmp = t_0 * (sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))) ^ y_46_re); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$im, 51000000000000.0], N[(t$95$0 * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[Power[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], 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.im \leq 51000000000000:\\
\;\;\;\;t_0 \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;t_0 \cdot {\left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)}^{y.re}\\
\end{array}
\end{array}
if y.im < 5.1e13Initial program 46.1%
Taylor expanded in x.re around inf 16.6%
+-commutative16.6%
fma-def16.6%
Simplified19.4%
Taylor expanded in y.im around 0 49.4%
unpow249.4%
unpow249.4%
hypot-def53.3%
Simplified53.3%
if 5.1e13 < y.im Initial program 35.1%
Taylor expanded in x.re around inf 14.8%
+-commutative14.8%
fma-def14.8%
Simplified16.4%
Taylor expanded in y.im around 0 43.4%
+-commutative43.4%
unpow243.4%
unpow243.4%
Simplified43.4%
Final simplification50.8%
(FPCore (x.re x.im y.re y.im) :precision binary64 (* (sin (* y.re (atan2 x.im x.re))) (pow (hypot x.im x.re) y.re)))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return sin((y_46_re * atan2(x_46_im, x_46_re))) * pow(hypot(x_46_im, x_46_re), y_46_re);
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re))) * Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): return math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) * math.pow(math.hypot(x_46_im, x_46_re), y_46_re)
function code(x_46_re, x_46_im, y_46_re, y_46_im) return Float64(sin(Float64(y_46_re * atan(x_46_im, x_46_re))) * (hypot(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) tmp = sin((y_46_re * atan2(x_46_im, x_46_re))) * (hypot(x_46_im, x_46_re) ^ y_46_re); end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[(N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}
\end{array}
Initial program 43.4%
Taylor expanded in x.re around inf 16.1%
+-commutative16.1%
fma-def16.1%
Simplified18.6%
Taylor expanded in y.im around 0 47.9%
unpow247.9%
unpow247.9%
hypot-def48.3%
Simplified48.3%
Final simplification48.3%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (sin (* y.re (atan2 x.im x.re)))))
(if (<= x.im -2.6e-53)
(* t_0 (pow (- (/ (* x.re (* x.re -0.5)) x.im) x.im) y.re))
(if (<= x.im 2.2e+62)
(* t_0 (pow (- x.re) y.re))
(* t_0 (pow x.im y.re))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = sin((y_46_re * atan2(x_46_im, x_46_re)));
double tmp;
if (x_46_im <= -2.6e-53) {
tmp = t_0 * pow((((x_46_re * (x_46_re * -0.5)) / x_46_im) - x_46_im), y_46_re);
} else if (x_46_im <= 2.2e+62) {
tmp = t_0 * pow(-x_46_re, y_46_re);
} else {
tmp = t_0 * pow(x_46_im, y_46_re);
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
real(8) :: tmp
t_0 = sin((y_46re * atan2(x_46im, x_46re)))
if (x_46im <= (-2.6d-53)) then
tmp = t_0 * ((((x_46re * (x_46re * (-0.5d0))) / x_46im) - x_46im) ** y_46re)
else if (x_46im <= 2.2d+62) then
tmp = t_0 * (-x_46re ** y_46re)
else
tmp = t_0 * (x_46im ** y_46re)
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
double tmp;
if (x_46_im <= -2.6e-53) {
tmp = t_0 * Math.pow((((x_46_re * (x_46_re * -0.5)) / x_46_im) - x_46_im), y_46_re);
} else if (x_46_im <= 2.2e+62) {
tmp = t_0 * Math.pow(-x_46_re, y_46_re);
} else {
tmp = t_0 * Math.pow(x_46_im, y_46_re);
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) tmp = 0 if x_46_im <= -2.6e-53: tmp = t_0 * math.pow((((x_46_re * (x_46_re * -0.5)) / x_46_im) - x_46_im), y_46_re) elif x_46_im <= 2.2e+62: tmp = t_0 * math.pow(-x_46_re, y_46_re) else: tmp = t_0 * math.pow(x_46_im, y_46_re) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin(Float64(y_46_re * atan(x_46_im, x_46_re))) tmp = 0.0 if (x_46_im <= -2.6e-53) tmp = Float64(t_0 * (Float64(Float64(Float64(x_46_re * Float64(x_46_re * -0.5)) / x_46_im) - x_46_im) ^ y_46_re)); elseif (x_46_im <= 2.2e+62) tmp = Float64(t_0 * (Float64(-x_46_re) ^ y_46_re)); else tmp = Float64(t_0 * (x_46_im ^ y_46_re)); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin((y_46_re * atan2(x_46_im, x_46_re))); tmp = 0.0; if (x_46_im <= -2.6e-53) tmp = t_0 * ((((x_46_re * (x_46_re * -0.5)) / x_46_im) - x_46_im) ^ y_46_re); elseif (x_46_im <= 2.2e+62) tmp = t_0 * (-x_46_re ^ y_46_re); else tmp = t_0 * (x_46_im ^ y_46_re); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[x$46$im, -2.6e-53], N[(t$95$0 * N[Power[N[(N[(N[(x$46$re * N[(x$46$re * -0.5), $MachinePrecision]), $MachinePrecision] / x$46$im), $MachinePrecision] - x$46$im), $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$im, 2.2e+62], N[(t$95$0 * N[Power[(-x$46$re), y$46$re], $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{if}\;x.im \leq -2.6 \cdot 10^{-53}:\\
\;\;\;\;t_0 \cdot {\left(\frac{x.re \cdot \left(x.re \cdot -0.5\right)}{x.im} - x.im\right)}^{y.re}\\
\mathbf{elif}\;x.im \leq 2.2 \cdot 10^{+62}:\\
\;\;\;\;t_0 \cdot {\left(-x.re\right)}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;t_0 \cdot {x.im}^{y.re}\\
\end{array}
\end{array}
if x.im < -2.59999999999999996e-53Initial program 35.2%
Taylor expanded in x.re around inf 13.6%
+-commutative13.6%
fma-def13.6%
Simplified16.6%
Taylor expanded in y.im around 0 55.7%
+-commutative55.7%
unpow255.7%
unpow255.7%
Simplified55.7%
Taylor expanded in x.im around -inf 52.7%
+-commutative52.7%
mul-1-neg52.7%
unsub-neg52.7%
associate-*r/52.7%
unpow252.7%
associate-*r*52.7%
Simplified52.7%
if -2.59999999999999996e-53 < x.im < 2.20000000000000015e62Initial program 51.2%
Taylor expanded in x.re around inf 20.2%
+-commutative20.2%
fma-def20.2%
Simplified23.2%
Taylor expanded in y.im around 0 45.6%
+-commutative45.6%
unpow245.6%
unpow245.6%
Simplified45.6%
Taylor expanded in x.re around -inf 46.1%
mul-1-neg46.1%
Simplified46.1%
if 2.20000000000000015e62 < x.im Initial program 30.8%
Taylor expanded in x.re around inf 7.0%
+-commutative7.0%
fma-def7.0%
Simplified7.2%
Taylor expanded in y.im around 0 43.5%
+-commutative43.5%
unpow243.5%
unpow243.5%
Simplified43.5%
Taylor expanded in x.re around 0 46.0%
Final simplification47.9%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (sin (* y.re (atan2 x.im x.re)))))
(if (<= x.im -1.55e-29)
(* t_0 (pow (- x.im) y.re))
(if (<= x.im 2.2e+62)
(* t_0 (pow (- x.re) y.re))
(* t_0 (pow x.im y.re))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = sin((y_46_re * atan2(x_46_im, x_46_re)));
double tmp;
if (x_46_im <= -1.55e-29) {
tmp = t_0 * pow(-x_46_im, y_46_re);
} else if (x_46_im <= 2.2e+62) {
tmp = t_0 * pow(-x_46_re, y_46_re);
} else {
tmp = t_0 * pow(x_46_im, y_46_re);
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
real(8) :: tmp
t_0 = sin((y_46re * atan2(x_46im, x_46re)))
if (x_46im <= (-1.55d-29)) then
tmp = t_0 * (-x_46im ** y_46re)
else if (x_46im <= 2.2d+62) then
tmp = t_0 * (-x_46re ** y_46re)
else
tmp = t_0 * (x_46im ** y_46re)
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
double tmp;
if (x_46_im <= -1.55e-29) {
tmp = t_0 * Math.pow(-x_46_im, y_46_re);
} else if (x_46_im <= 2.2e+62) {
tmp = t_0 * Math.pow(-x_46_re, y_46_re);
} else {
tmp = t_0 * Math.pow(x_46_im, y_46_re);
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) tmp = 0 if x_46_im <= -1.55e-29: tmp = t_0 * math.pow(-x_46_im, y_46_re) elif x_46_im <= 2.2e+62: tmp = t_0 * math.pow(-x_46_re, y_46_re) else: tmp = t_0 * math.pow(x_46_im, y_46_re) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin(Float64(y_46_re * atan(x_46_im, x_46_re))) tmp = 0.0 if (x_46_im <= -1.55e-29) tmp = Float64(t_0 * (Float64(-x_46_im) ^ y_46_re)); elseif (x_46_im <= 2.2e+62) tmp = Float64(t_0 * (Float64(-x_46_re) ^ y_46_re)); else tmp = Float64(t_0 * (x_46_im ^ y_46_re)); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin((y_46_re * atan2(x_46_im, x_46_re))); tmp = 0.0; if (x_46_im <= -1.55e-29) tmp = t_0 * (-x_46_im ^ y_46_re); elseif (x_46_im <= 2.2e+62) tmp = t_0 * (-x_46_re ^ y_46_re); else tmp = t_0 * (x_46_im ^ y_46_re); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[x$46$im, -1.55e-29], N[(t$95$0 * N[Power[(-x$46$im), y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$im, 2.2e+62], N[(t$95$0 * N[Power[(-x$46$re), y$46$re], $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{if}\;x.im \leq -1.55 \cdot 10^{-29}:\\
\;\;\;\;t_0 \cdot {\left(-x.im\right)}^{y.re}\\
\mathbf{elif}\;x.im \leq 2.2 \cdot 10^{+62}:\\
\;\;\;\;t_0 \cdot {\left(-x.re\right)}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;t_0 \cdot {x.im}^{y.re}\\
\end{array}
\end{array}
if x.im < -1.55000000000000013e-29Initial program 31.2%
Taylor expanded in x.re around inf 12.9%
+-commutative12.9%
fma-def12.9%
Simplified16.0%
Taylor expanded in y.im around 0 55.9%
+-commutative55.9%
unpow255.9%
unpow255.9%
Simplified55.9%
Taylor expanded in x.im around -inf 51.7%
mul-1-neg51.7%
Simplified51.7%
if -1.55000000000000013e-29 < x.im < 2.20000000000000015e62Initial program 52.5%
Taylor expanded in x.re around inf 20.3%
+-commutative20.3%
fma-def20.3%
Simplified23.2%
Taylor expanded in y.im around 0 45.8%
+-commutative45.8%
unpow245.8%
unpow245.8%
Simplified45.8%
Taylor expanded in x.re around -inf 46.2%
mul-1-neg46.2%
Simplified46.2%
if 2.20000000000000015e62 < x.im Initial program 30.8%
Taylor expanded in x.re around inf 7.0%
+-commutative7.0%
fma-def7.0%
Simplified7.2%
Taylor expanded in y.im around 0 43.5%
+-commutative43.5%
unpow243.5%
unpow243.5%
Simplified43.5%
Taylor expanded in x.re around 0 46.0%
Final simplification47.6%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re))))
(if (or (<= y.re -2.9e+29) (not (<= y.re 1.1e-16)))
(* (sin t_0) (pow x.im y.re))
t_0)))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if ((y_46_re <= -2.9e+29) || !(y_46_re <= 1.1e-16)) {
tmp = sin(t_0) * pow(x_46_im, y_46_re);
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
real(8) :: tmp
t_0 = y_46re * atan2(x_46im, x_46re)
if ((y_46re <= (-2.9d+29)) .or. (.not. (y_46re <= 1.1d-16))) then
tmp = sin(t_0) * (x_46im ** y_46re)
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
double tmp;
if ((y_46_re <= -2.9e+29) || !(y_46_re <= 1.1e-16)) {
tmp = Math.sin(t_0) * Math.pow(x_46_im, y_46_re);
} else {
tmp = t_0;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = y_46_re * math.atan2(x_46_im, x_46_re) tmp = 0 if (y_46_re <= -2.9e+29) or not (y_46_re <= 1.1e-16): tmp = math.sin(t_0) * math.pow(x_46_im, y_46_re) else: tmp = t_0 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) tmp = 0.0 if ((y_46_re <= -2.9e+29) || !(y_46_re <= 1.1e-16)) tmp = Float64(sin(t_0) * (x_46_im ^ y_46_re)); else tmp = t_0; end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = y_46_re * atan2(x_46_im, x_46_re); tmp = 0.0; if ((y_46_re <= -2.9e+29) || ~((y_46_re <= 1.1e-16))) tmp = sin(t_0) * (x_46_im ^ y_46_re); else tmp = t_0; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[y$46$re, -2.9e+29], N[Not[LessEqual[y$46$re, 1.1e-16]], $MachinePrecision]], N[(N[Sin[t$95$0], $MachinePrecision] * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision], t$95$0]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.re \leq -2.9 \cdot 10^{+29} \lor \neg \left(y.re \leq 1.1 \cdot 10^{-16}\right):\\
\;\;\;\;\sin t_0 \cdot {x.im}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if y.re < -2.8999999999999999e29 or 1.1e-16 < y.re Initial program 46.5%
Taylor expanded in x.re around inf 24.1%
+-commutative24.1%
fma-def24.1%
Simplified27.9%
Taylor expanded in y.im around 0 71.8%
+-commutative71.8%
unpow271.8%
unpow271.8%
Simplified71.8%
Taylor expanded in x.re around 0 56.2%
if -2.8999999999999999e29 < y.re < 1.1e-16Initial program 40.1%
Taylor expanded in x.re around inf 8.1%
+-commutative8.1%
fma-def8.1%
Simplified9.1%
Taylor expanded in y.im around 0 23.6%
+-commutative23.6%
unpow223.6%
unpow223.6%
Simplified23.6%
Taylor expanded in y.re around 0 22.5%
Final simplification39.5%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re))) (t_1 (sin t_0)))
(if (<= y.re -2.9e+29)
(* t_1 (pow x.re y.re))
(if (<= y.re 1.15e-16) t_0 (* t_1 (pow x.im y.re))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = sin(t_0);
double tmp;
if (y_46_re <= -2.9e+29) {
tmp = t_1 * pow(x_46_re, y_46_re);
} else if (y_46_re <= 1.15e-16) {
tmp = t_0;
} else {
tmp = t_1 * pow(x_46_im, y_46_re);
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = y_46re * atan2(x_46im, x_46re)
t_1 = sin(t_0)
if (y_46re <= (-2.9d+29)) then
tmp = t_1 * (x_46re ** y_46re)
else if (y_46re <= 1.15d-16) then
tmp = t_0
else
tmp = t_1 * (x_46im ** y_46re)
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_1 = Math.sin(t_0);
double tmp;
if (y_46_re <= -2.9e+29) {
tmp = t_1 * Math.pow(x_46_re, y_46_re);
} else if (y_46_re <= 1.15e-16) {
tmp = t_0;
} else {
tmp = t_1 * Math.pow(x_46_im, y_46_re);
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = y_46_re * math.atan2(x_46_im, x_46_re) t_1 = math.sin(t_0) tmp = 0 if y_46_re <= -2.9e+29: tmp = t_1 * math.pow(x_46_re, y_46_re) elif y_46_re <= 1.15e-16: tmp = t_0 else: tmp = t_1 * math.pow(x_46_im, y_46_re) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_1 = sin(t_0) tmp = 0.0 if (y_46_re <= -2.9e+29) tmp = Float64(t_1 * (x_46_re ^ y_46_re)); elseif (y_46_re <= 1.15e-16) tmp = t_0; else tmp = Float64(t_1 * (x_46_im ^ y_46_re)); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = y_46_re * atan2(x_46_im, x_46_re); t_1 = sin(t_0); tmp = 0.0; if (y_46_re <= -2.9e+29) tmp = t_1 * (x_46_re ^ y_46_re); elseif (y_46_re <= 1.15e-16) tmp = t_0; else tmp = t_1 * (x_46_im ^ y_46_re); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sin[t$95$0], $MachinePrecision]}, If[LessEqual[y$46$re, -2.9e+29], N[(t$95$1 * N[Power[x$46$re, y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 1.15e-16], t$95$0, N[(t$95$1 * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := \sin t_0\\
\mathbf{if}\;y.re \leq -2.9 \cdot 10^{+29}:\\
\;\;\;\;t_1 \cdot {x.re}^{y.re}\\
\mathbf{elif}\;y.re \leq 1.15 \cdot 10^{-16}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;t_1 \cdot {x.im}^{y.re}\\
\end{array}
\end{array}
if y.re < -2.8999999999999999e29Initial program 45.8%
Taylor expanded in x.re around inf 20.3%
+-commutative20.3%
fma-def20.3%
Simplified22.0%
Taylor expanded in y.im around 0 84.9%
+-commutative84.9%
unpow284.9%
unpow284.9%
Simplified84.9%
Taylor expanded in x.im around 0 66.5%
if -2.8999999999999999e29 < y.re < 1.15e-16Initial program 40.1%
Taylor expanded in x.re around inf 8.1%
+-commutative8.1%
fma-def8.1%
Simplified9.1%
Taylor expanded in y.im around 0 23.6%
+-commutative23.6%
unpow223.6%
unpow223.6%
Simplified23.6%
Taylor expanded in y.re around 0 22.5%
if 1.15e-16 < y.re Initial program 47.1%
Taylor expanded in x.re around inf 27.2%
+-commutative27.2%
fma-def27.2%
Simplified32.9%
Taylor expanded in y.im around 0 60.8%
+-commutative60.8%
unpow260.8%
unpow260.8%
Simplified60.8%
Taylor expanded in x.re around 0 53.3%
Final simplification41.0%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (sin (* y.re (atan2 x.im x.re)))))
(if (<= x.im -5.8e-167)
(* t_0 (pow (- x.im) y.re))
(if (<= x.im 2.8e-8) (* t_0 (pow x.re y.re)) (* t_0 (pow x.im y.re))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = sin((y_46_re * atan2(x_46_im, x_46_re)));
double tmp;
if (x_46_im <= -5.8e-167) {
tmp = t_0 * pow(-x_46_im, y_46_re);
} else if (x_46_im <= 2.8e-8) {
tmp = t_0 * pow(x_46_re, y_46_re);
} else {
tmp = t_0 * pow(x_46_im, y_46_re);
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
real(8) :: tmp
t_0 = sin((y_46re * atan2(x_46im, x_46re)))
if (x_46im <= (-5.8d-167)) then
tmp = t_0 * (-x_46im ** y_46re)
else if (x_46im <= 2.8d-8) then
tmp = t_0 * (x_46re ** y_46re)
else
tmp = t_0 * (x_46im ** y_46re)
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
double tmp;
if (x_46_im <= -5.8e-167) {
tmp = t_0 * Math.pow(-x_46_im, y_46_re);
} else if (x_46_im <= 2.8e-8) {
tmp = t_0 * Math.pow(x_46_re, y_46_re);
} else {
tmp = t_0 * Math.pow(x_46_im, y_46_re);
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) tmp = 0 if x_46_im <= -5.8e-167: tmp = t_0 * math.pow(-x_46_im, y_46_re) elif x_46_im <= 2.8e-8: tmp = t_0 * math.pow(x_46_re, y_46_re) else: tmp = t_0 * math.pow(x_46_im, y_46_re) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin(Float64(y_46_re * atan(x_46_im, x_46_re))) tmp = 0.0 if (x_46_im <= -5.8e-167) tmp = Float64(t_0 * (Float64(-x_46_im) ^ y_46_re)); elseif (x_46_im <= 2.8e-8) tmp = Float64(t_0 * (x_46_re ^ y_46_re)); else tmp = Float64(t_0 * (x_46_im ^ y_46_re)); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin((y_46_re * atan2(x_46_im, x_46_re))); tmp = 0.0; if (x_46_im <= -5.8e-167) tmp = t_0 * (-x_46_im ^ y_46_re); elseif (x_46_im <= 2.8e-8) tmp = t_0 * (x_46_re ^ y_46_re); else tmp = t_0 * (x_46_im ^ y_46_re); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[x$46$im, -5.8e-167], N[(t$95$0 * N[Power[(-x$46$im), y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$im, 2.8e-8], N[(t$95$0 * N[Power[x$46$re, y$46$re], $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{if}\;x.im \leq -5.8 \cdot 10^{-167}:\\
\;\;\;\;t_0 \cdot {\left(-x.im\right)}^{y.re}\\
\mathbf{elif}\;x.im \leq 2.8 \cdot 10^{-8}:\\
\;\;\;\;t_0 \cdot {x.re}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;t_0 \cdot {x.im}^{y.re}\\
\end{array}
\end{array}
if x.im < -5.80000000000000005e-167Initial program 44.3%
Taylor expanded in x.re around inf 18.9%
+-commutative18.9%
fma-def18.9%
Simplified21.0%
Taylor expanded in y.im around 0 54.0%
+-commutative54.0%
unpow254.0%
unpow254.0%
Simplified54.0%
Taylor expanded in x.im around -inf 47.3%
mul-1-neg47.3%
Simplified47.3%
if -5.80000000000000005e-167 < x.im < 2.7999999999999999e-8Initial program 46.2%
Taylor expanded in x.re around inf 18.8%
+-commutative18.8%
fma-def18.8%
Simplified23.0%
Taylor expanded in y.im around 0 47.5%
+-commutative47.5%
unpow247.5%
unpow247.5%
Simplified47.5%
Taylor expanded in x.im around 0 43.0%
if 2.7999999999999999e-8 < x.im Initial program 37.0%
Taylor expanded in x.re around inf 7.1%
+-commutative7.1%
fma-def7.1%
Simplified7.2%
Taylor expanded in y.im around 0 38.5%
+-commutative38.5%
unpow238.5%
unpow238.5%
Simplified38.5%
Taylor expanded in x.re around 0 42.2%
Final simplification44.5%
(FPCore (x.re x.im y.re y.im) :precision binary64 (* y.re (atan2 x.im x.re)))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return y_46_re * atan2(x_46_im, x_46_re);
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
code = y_46re * atan2(x_46im, x_46re)
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return y_46_re * Math.atan2(x_46_im, x_46_re);
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): return y_46_re * math.atan2(x_46_im, x_46_re)
function code(x_46_re, x_46_im, y_46_re, y_46_im) return Float64(y_46_re * atan(x_46_im, x_46_re)) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = y_46_re * atan2(x_46_im, x_46_re); end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}
\end{array}
Initial program 43.4%
Taylor expanded in x.re around inf 16.1%
+-commutative16.1%
fma-def16.1%
Simplified18.6%
Taylor expanded in y.im around 0 47.9%
+-commutative47.9%
unpow247.9%
unpow247.9%
Simplified47.9%
Taylor expanded in y.re around 0 14.5%
Final simplification14.5%
herbie shell --seed 2023195
(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)))))