
(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 17 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (sqrt (+ (* x.re x.re) (* x.im x.im))))))
(*
(exp (- (* t_0 y.re) (* (atan2 x.im x.re) y.im)))
(sin (+ (* t_0 y.im) (* (atan2 x.im x.re) y.re))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
return exp(((t_0 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin(((t_0 * y_46_im) + (atan2(x_46_im, x_46_re) * y_46_re)));
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
t_0 = log(sqrt(((x_46re * x_46re) + (x_46im * x_46im))))
code = exp(((t_0 * y_46re) - (atan2(x_46im, x_46re) * y_46im))) * sin(((t_0 * y_46im) + (atan2(x_46im, x_46re) * y_46re)))
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
return Math.exp(((t_0 * y_46_re) - (Math.atan2(x_46_im, x_46_re) * y_46_im))) * Math.sin(((t_0 * y_46_im) + (Math.atan2(x_46_im, x_46_re) * y_46_re)));
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) return math.exp(((t_0 * y_46_re) - (math.atan2(x_46_im, x_46_re) * y_46_im))) * math.sin(((t_0 * y_46_im) + (math.atan2(x_46_im, x_46_re) * y_46_re)))
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) return Float64(exp(Float64(Float64(t_0 * y_46_re) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * sin(Float64(Float64(t_0 * y_46_im) + Float64(atan(x_46_im, x_46_re) * y_46_re)))) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))); tmp = exp(((t_0 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin(((t_0 * y_46_im) + (atan2(x_46_im, x_46_re) * y_46_re))); end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]}, N[(N[Exp[N[(N[(t$95$0 * y$46$re), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(N[(t$95$0 * y$46$im), $MachinePrecision] + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)\\
e^{t_0 \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(t_0 \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)
\end{array}
\end{array}
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re)))
(t_1 (pow (hypot x.re x.im) y.re))
(t_2 (log (hypot x.re x.im)))
(t_3 (sin (fma t_2 y.im t_0))))
(if (<= y.re -0.00043)
(* t_3 (/ t_1 (+ 1.0 (* (atan2 x.im x.re) y.im))))
(if (<= y.re 3.15)
(* t_3 (/ t_1 (pow (exp y.im) (atan2 x.im x.re))))
(if (<= y.re 2e+232)
(* t_1 (sin (pow (cbrt (* y.im (log (hypot x.im x.re)))) 3.0)))
(* t_1 (sin (pow (cbrt (fma y.im t_2 t_0)) 3.0))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = pow(hypot(x_46_re, x_46_im), y_46_re);
double t_2 = log(hypot(x_46_re, x_46_im));
double t_3 = sin(fma(t_2, y_46_im, t_0));
double tmp;
if (y_46_re <= -0.00043) {
tmp = t_3 * (t_1 / (1.0 + (atan2(x_46_im, x_46_re) * y_46_im)));
} else if (y_46_re <= 3.15) {
tmp = t_3 * (t_1 / pow(exp(y_46_im), atan2(x_46_im, x_46_re)));
} else if (y_46_re <= 2e+232) {
tmp = t_1 * sin(pow(cbrt((y_46_im * log(hypot(x_46_im, x_46_re)))), 3.0));
} else {
tmp = t_1 * sin(pow(cbrt(fma(y_46_im, t_2, t_0)), 3.0));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_1 = hypot(x_46_re, x_46_im) ^ y_46_re t_2 = log(hypot(x_46_re, x_46_im)) t_3 = sin(fma(t_2, y_46_im, t_0)) tmp = 0.0 if (y_46_re <= -0.00043) tmp = Float64(t_3 * Float64(t_1 / Float64(1.0 + Float64(atan(x_46_im, x_46_re) * y_46_im)))); elseif (y_46_re <= 3.15) tmp = Float64(t_3 * Float64(t_1 / (exp(y_46_im) ^ atan(x_46_im, x_46_re)))); elseif (y_46_re <= 2e+232) tmp = Float64(t_1 * sin((cbrt(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) ^ 3.0))); else tmp = Float64(t_1 * sin((cbrt(fma(y_46_im, t_2, t_0)) ^ 3.0))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, Block[{t$95$2 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[Sin[N[(t$95$2 * y$46$im + t$95$0), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -0.00043], N[(t$95$3 * N[(t$95$1 / N[(1.0 + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 3.15], N[(t$95$3 * N[(t$95$1 / N[Power[N[Exp[y$46$im], $MachinePrecision], N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 2e+232], N[(t$95$1 * N[Sin[N[Power[N[Power[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[Sin[N[Power[N[Power[N[(y$46$im * t$95$2 + t$95$0), $MachinePrecision], 1/3], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\\
t_2 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
t_3 := \sin \left(\mathsf{fma}\left(t_2, y.im, t_0\right)\right)\\
\mathbf{if}\;y.re \leq -0.00043:\\
\;\;\;\;t_3 \cdot \frac{t_1}{1 + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\
\mathbf{elif}\;y.re \leq 3.15:\\
\;\;\;\;t_3 \cdot \frac{t_1}{{\left(e^{y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}}\\
\mathbf{elif}\;y.re \leq 2 \cdot 10^{+232}:\\
\;\;\;\;t_1 \cdot \sin \left({\left(\sqrt[3]{y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)}\right)}^{3}\right)\\
\mathbf{else}:\\
\;\;\;\;t_1 \cdot \sin \left({\left(\sqrt[3]{\mathsf{fma}\left(y.im, t_2, t_0\right)}\right)}^{3}\right)\\
\end{array}
\end{array}
if y.re < -4.29999999999999989e-4Initial program 37.3%
exp-diff33.9%
exp-to-pow33.9%
hypot-def33.9%
*-commutative33.9%
exp-prod33.9%
fma-def33.9%
hypot-def76.3%
*-commutative76.3%
Simplified76.3%
Taylor expanded in y.im around 0 86.6%
if -4.29999999999999989e-4 < y.re < 3.14999999999999991Initial program 46.3%
exp-diff46.3%
exp-to-pow46.3%
hypot-def46.3%
*-commutative46.3%
exp-prod46.0%
fma-def46.0%
hypot-def81.7%
*-commutative81.7%
Simplified81.7%
if 3.14999999999999991 < y.re < 2.00000000000000011e232Initial program 34.6%
exp-diff28.8%
exp-to-pow28.8%
hypot-def28.8%
*-commutative28.8%
exp-prod28.8%
fma-def28.8%
hypot-def55.8%
*-commutative55.8%
Simplified55.8%
add-cube-cbrt48.1%
pow350.0%
fma-udef50.0%
*-commutative50.0%
*-commutative50.0%
fma-def50.0%
Applied egg-rr50.0%
Taylor expanded in y.im around 0 54.0%
Taylor expanded in y.re around 0 15.4%
unpow1/334.7%
unpow234.7%
unpow234.7%
hypot-def71.3%
Simplified71.3%
if 2.00000000000000011e232 < y.re Initial program 29.4%
exp-diff23.5%
exp-to-pow23.5%
hypot-def23.5%
*-commutative23.5%
exp-prod23.5%
fma-def23.5%
hypot-def41.2%
*-commutative41.2%
Simplified41.2%
add-cube-cbrt64.7%
pow370.6%
fma-udef70.6%
*-commutative70.6%
*-commutative70.6%
fma-def70.6%
Applied egg-rr70.6%
Taylor expanded in y.im around 0 88.2%
Final simplification81.1%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(t_1 (exp (- (* y.re t_0) (* (atan2 x.im x.re) y.im))))
(t_2 (* y.re (atan2 x.im x.re)))
(t_3 (* t_1 (sin (+ t_2 (* y.im t_0))))))
(if (<= t_3 0.98)
t_3
(if (<= t_3 INFINITY)
(* t_1 (sin (fabs t_2)))
(*
(/ (pow (hypot x.re x.im) y.re) (pow (exp y.im) (atan2 x.im x.re)))
(sin (* y.im (log (hypot x.im x.re)))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
double t_1 = exp(((y_46_re * t_0) - (atan2(x_46_im, x_46_re) * y_46_im)));
double t_2 = y_46_re * atan2(x_46_im, x_46_re);
double t_3 = t_1 * sin((t_2 + (y_46_im * t_0)));
double tmp;
if (t_3 <= 0.98) {
tmp = t_3;
} else if (t_3 <= ((double) INFINITY)) {
tmp = t_1 * sin(fabs(t_2));
} else {
tmp = (pow(hypot(x_46_re, x_46_im), y_46_re) / pow(exp(y_46_im), atan2(x_46_im, x_46_re))) * sin((y_46_im * log(hypot(x_46_im, x_46_re))));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
double t_1 = Math.exp(((y_46_re * t_0) - (Math.atan2(x_46_im, x_46_re) * y_46_im)));
double t_2 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_3 = t_1 * Math.sin((t_2 + (y_46_im * t_0)));
double tmp;
if (t_3 <= 0.98) {
tmp = t_3;
} else if (t_3 <= Double.POSITIVE_INFINITY) {
tmp = t_1 * Math.sin(Math.abs(t_2));
} else {
tmp = (Math.pow(Math.hypot(x_46_re, x_46_im), y_46_re) / Math.pow(Math.exp(y_46_im), Math.atan2(x_46_im, x_46_re))) * Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re))));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) t_1 = math.exp(((y_46_re * t_0) - (math.atan2(x_46_im, x_46_re) * y_46_im))) t_2 = y_46_re * math.atan2(x_46_im, x_46_re) t_3 = t_1 * math.sin((t_2 + (y_46_im * t_0))) tmp = 0 if t_3 <= 0.98: tmp = t_3 elif t_3 <= math.inf: tmp = t_1 * math.sin(math.fabs(t_2)) else: tmp = (math.pow(math.hypot(x_46_re, x_46_im), y_46_re) / math.pow(math.exp(y_46_im), math.atan2(x_46_im, x_46_re))) * math.sin((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) t_1 = exp(Float64(Float64(y_46_re * t_0) - Float64(atan(x_46_im, x_46_re) * y_46_im))) t_2 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_3 = Float64(t_1 * sin(Float64(t_2 + Float64(y_46_im * t_0)))) tmp = 0.0 if (t_3 <= 0.98) tmp = t_3; elseif (t_3 <= Inf) tmp = Float64(t_1 * sin(abs(t_2))); else tmp = Float64(Float64((hypot(x_46_re, x_46_im) ^ y_46_re) / (exp(y_46_im) ^ atan(x_46_im, x_46_re))) * sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re))))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))); t_1 = exp(((y_46_re * t_0) - (atan2(x_46_im, x_46_re) * y_46_im))); t_2 = y_46_re * atan2(x_46_im, x_46_re); t_3 = t_1 * sin((t_2 + (y_46_im * t_0))); tmp = 0.0; if (t_3 <= 0.98) tmp = t_3; elseif (t_3 <= Inf) tmp = t_1 * sin(abs(t_2)); else tmp = ((hypot(x_46_re, x_46_im) ^ y_46_re) / (exp(y_46_im) ^ atan2(x_46_im, x_46_re))) * sin((y_46_im * log(hypot(x_46_im, x_46_re)))); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := 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]}, Block[{t$95$1 = N[Exp[N[(N[(y$46$re * t$95$0), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$1 * N[Sin[N[(t$95$2 + N[(y$46$im * t$95$0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, 0.98], t$95$3, If[LessEqual[t$95$3, Infinity], N[(t$95$1 * N[Sin[N[Abs[t$95$2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] / N[Power[N[Exp[y$46$im], $MachinePrecision], N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $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)\\
t_1 := e^{y.re \cdot t_0 - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\
t_2 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_3 := t_1 \cdot \sin \left(t_2 + y.im \cdot t_0\right)\\
\mathbf{if}\;t_3 \leq 0.98:\\
\;\;\;\;t_3\\
\mathbf{elif}\;t_3 \leq \infty:\\
\;\;\;\;t_1 \cdot \sin \left(\left|t_2\right|\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{{\left(e^{y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}} \cdot \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\end{array}
\end{array}
if (*.f64 (exp.f64 (-.f64 (*.f64 (log.f64 (sqrt.f64 (+.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)))) y.re) (*.f64 (atan2.f64 x.im x.re) y.im))) (sin.f64 (+.f64 (*.f64 (log.f64 (sqrt.f64 (+.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)))) y.im) (*.f64 (atan2.f64 x.im x.re) y.re)))) < 0.97999999999999998Initial program 89.2%
if 0.97999999999999998 < (*.f64 (exp.f64 (-.f64 (*.f64 (log.f64 (sqrt.f64 (+.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)))) y.re) (*.f64 (atan2.f64 x.im x.re) y.im))) (sin.f64 (+.f64 (*.f64 (log.f64 (sqrt.f64 (+.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)))) y.im) (*.f64 (atan2.f64 x.im x.re) y.re)))) < +inf.0Initial program 41.3%
Taylor expanded in y.im around 0 47.2%
add-sqr-sqrt29.6%
sqrt-unprod17.8%
pow217.8%
*-commutative17.8%
Applied egg-rr17.8%
*-commutative17.8%
unpow217.8%
rem-sqrt-square64.9%
Simplified64.9%
if +inf.0 < (*.f64 (exp.f64 (-.f64 (*.f64 (log.f64 (sqrt.f64 (+.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)))) y.re) (*.f64 (atan2.f64 x.im x.re) y.im))) (sin.f64 (+.f64 (*.f64 (log.f64 (sqrt.f64 (+.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)))) y.im) (*.f64 (atan2.f64 x.im x.re) y.re)))) Initial program 0.0%
exp-diff0.0%
exp-to-pow0.0%
hypot-def0.0%
*-commutative0.0%
exp-prod0.0%
fma-def0.0%
hypot-def67.4%
*-commutative67.4%
Simplified67.4%
add-cube-cbrt70.9%
pow370.8%
fma-udef70.8%
*-commutative70.8%
*-commutative70.8%
fma-def70.8%
Applied egg-rr70.8%
Taylor expanded in y.re around 0 0.0%
pow-base-10.0%
*-lft-identity0.0%
unpow20.0%
unpow20.0%
hypot-def51.2%
Simplified61.9%
Final simplification73.7%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.re x.im))))
(*
(exp (fma t_0 y.re (* (atan2 x.im x.re) (- y.im))))
(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));
return exp(fma(t_0, y_46_re, (atan2(x_46_im, x_46_re) * -y_46_im))) * sin(fma(t_0, y_46_im, (y_46_re * atan2(x_46_im, x_46_re))));
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_re, x_46_im)) return Float64(exp(fma(t_0, y_46_re, Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))) * sin(fma(t_0, y_46_im, Float64(y_46_re * atan(x_46_im, x_46_re))))) end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, N[(N[Exp[N[(t$95$0 * y$46$re + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(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)\\
e^{\mathsf{fma}\left(t_0, y.re, \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)\right)} \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}
Initial program 40.7%
cancel-sign-sub-inv40.7%
fma-def40.7%
hypot-def40.7%
distribute-lft-neg-in40.7%
distribute-rgt-neg-out40.7%
fma-def40.7%
hypot-def78.3%
*-commutative78.3%
Simplified78.3%
Final simplification78.3%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (pow (hypot x.re x.im) y.re))
(t_1 (/ t_0 (pow (exp y.im) (atan2 x.im x.re))))
(t_2 (log (hypot x.re x.im)))
(t_3 (* y.re (atan2 x.im x.re)))
(t_4 (sin (fma t_2 y.im t_3))))
(if (<= x.re -9.2e-111)
(* t_4 t_0)
(if (<= x.re -1.55e-201)
(* t_1 (sin (- t_3 (* y.im (log (/ -1.0 x.re))))))
(if (<= x.re 9.8e-303)
(* t_1 (sin (* y.im (log (hypot x.im x.re)))))
(if (<= x.re 5e-120)
(* t_4 (exp (- (* y.re (log x.re)) (* (atan2 x.im x.re) y.im))))
(*
(exp (fma t_2 y.re (* (atan2 x.im x.re) (- y.im))))
(sin (+ t_3 (* y.im (log x.re)))))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = pow(hypot(x_46_re, x_46_im), y_46_re);
double t_1 = t_0 / pow(exp(y_46_im), atan2(x_46_im, x_46_re));
double t_2 = log(hypot(x_46_re, x_46_im));
double t_3 = y_46_re * atan2(x_46_im, x_46_re);
double t_4 = sin(fma(t_2, y_46_im, t_3));
double tmp;
if (x_46_re <= -9.2e-111) {
tmp = t_4 * t_0;
} else if (x_46_re <= -1.55e-201) {
tmp = t_1 * sin((t_3 - (y_46_im * log((-1.0 / x_46_re)))));
} else if (x_46_re <= 9.8e-303) {
tmp = t_1 * sin((y_46_im * log(hypot(x_46_im, x_46_re))));
} else if (x_46_re <= 5e-120) {
tmp = t_4 * exp(((y_46_re * log(x_46_re)) - (atan2(x_46_im, x_46_re) * y_46_im)));
} else {
tmp = exp(fma(t_2, y_46_re, (atan2(x_46_im, x_46_re) * -y_46_im))) * sin((t_3 + (y_46_im * log(x_46_re))));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = hypot(x_46_re, x_46_im) ^ y_46_re t_1 = Float64(t_0 / (exp(y_46_im) ^ atan(x_46_im, x_46_re))) t_2 = log(hypot(x_46_re, x_46_im)) t_3 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_4 = sin(fma(t_2, y_46_im, t_3)) tmp = 0.0 if (x_46_re <= -9.2e-111) tmp = Float64(t_4 * t_0); elseif (x_46_re <= -1.55e-201) tmp = Float64(t_1 * sin(Float64(t_3 - Float64(y_46_im * log(Float64(-1.0 / x_46_re)))))); elseif (x_46_re <= 9.8e-303) tmp = Float64(t_1 * sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re))))); elseif (x_46_re <= 5e-120) tmp = Float64(t_4 * exp(Float64(Float64(y_46_re * log(x_46_re)) - Float64(atan(x_46_im, x_46_re) * y_46_im)))); else tmp = Float64(exp(fma(t_2, y_46_re, Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))) * sin(Float64(t_3 + Float64(y_46_im * log(x_46_re))))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, Block[{t$95$1 = N[(t$95$0 / N[Power[N[Exp[y$46$im], $MachinePrecision], N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[Sin[N[(t$95$2 * y$46$im + t$95$3), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[x$46$re, -9.2e-111], N[(t$95$4 * t$95$0), $MachinePrecision], If[LessEqual[x$46$re, -1.55e-201], N[(t$95$1 * N[Sin[N[(t$95$3 - N[(y$46$im * N[Log[N[(-1.0 / x$46$re), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, 9.8e-303], N[(t$95$1 * N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, 5e-120], N[(t$95$4 * N[Exp[N[(N[(y$46$re * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Exp[N[(t$95$2 * y$46$re + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(t$95$3 + N[(y$46$im * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\\
t_1 := \frac{t_0}{{\left(e^{y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}}\\
t_2 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
t_3 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_4 := \sin \left(\mathsf{fma}\left(t_2, y.im, t_3\right)\right)\\
\mathbf{if}\;x.re \leq -9.2 \cdot 10^{-111}:\\
\;\;\;\;t_4 \cdot t_0\\
\mathbf{elif}\;x.re \leq -1.55 \cdot 10^{-201}:\\
\;\;\;\;t_1 \cdot \sin \left(t_3 - y.im \cdot \log \left(\frac{-1}{x.re}\right)\right)\\
\mathbf{elif}\;x.re \leq 9.8 \cdot 10^{-303}:\\
\;\;\;\;t_1 \cdot \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\mathbf{elif}\;x.re \leq 5 \cdot 10^{-120}:\\
\;\;\;\;t_4 \cdot e^{y.re \cdot \log x.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\
\mathbf{else}:\\
\;\;\;\;e^{\mathsf{fma}\left(t_2, y.re, \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)\right)} \cdot \sin \left(t_3 + y.im \cdot \log x.re\right)\\
\end{array}
\end{array}
if x.re < -9.2e-111Initial program 40.6%
exp-diff36.9%
exp-to-pow36.9%
hypot-def36.9%
*-commutative36.9%
exp-prod36.9%
fma-def36.9%
hypot-def73.9%
*-commutative73.9%
Simplified73.9%
Taylor expanded in y.im around 0 67.4%
if -9.2e-111 < x.re < -1.5499999999999999e-201Initial program 60.0%
exp-diff56.0%
exp-to-pow56.0%
hypot-def56.0%
*-commutative56.0%
exp-prod56.0%
fma-def56.0%
hypot-def76.0%
*-commutative76.0%
Simplified76.0%
Taylor expanded in x.re around -inf 88.8%
+-commutative88.8%
mul-1-neg88.8%
unsub-neg88.8%
Simplified88.8%
if -1.5499999999999999e-201 < x.re < 9.8e-303Initial program 30.8%
exp-diff26.9%
exp-to-pow26.9%
hypot-def26.9%
*-commutative26.9%
exp-prod26.9%
fma-def26.9%
hypot-def73.1%
*-commutative73.1%
Simplified73.1%
add-cube-cbrt76.4%
pow380.2%
fma-udef80.2%
*-commutative80.2%
*-commutative80.2%
fma-def80.2%
Applied egg-rr80.2%
Taylor expanded in y.re around 0 29.9%
pow-base-122.5%
*-lft-identity22.5%
unpow222.5%
unpow222.5%
hypot-def68.9%
Simplified80.0%
if 9.8e-303 < x.re < 5.00000000000000007e-120Initial program 42.8%
cancel-sign-sub-inv42.8%
fma-def42.8%
hypot-def42.8%
distribute-lft-neg-in42.8%
distribute-rgt-neg-out42.8%
fma-def42.8%
hypot-def82.8%
*-commutative82.8%
Simplified82.8%
Taylor expanded in x.im around 0 80.1%
+-commutative80.1%
neg-mul-180.1%
unsub-neg80.1%
Simplified80.1%
if 5.00000000000000007e-120 < x.re Initial program 37.5%
cancel-sign-sub-inv37.5%
fma-def37.5%
hypot-def37.5%
distribute-lft-neg-in37.5%
distribute-rgt-neg-out37.5%
fma-def37.5%
hypot-def73.8%
*-commutative73.8%
Simplified73.8%
Taylor expanded in x.im around 0 76.5%
Final simplification75.6%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (pow (hypot x.re x.im) y.re))
(t_1 (* y.re (atan2 x.im x.re)))
(t_2
(exp
(-
(* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(* (atan2 x.im x.re) y.im))))
(t_3 (* y.im (log (hypot x.im x.re))))
(t_4 (* (/ t_0 (pow (exp y.im) (atan2 x.im x.re))) (sin t_3))))
(if (<= y.im -3500000.0)
(* t_2 (sin (fabs t_1)))
(if (<= y.im 7e-72)
(* (sin (fma (log (hypot x.re x.im)) y.im t_1)) t_0)
(if (<= y.im 1.35e+44)
t_4
(if (<= y.im 5.4e+64)
(* t_0 (sin (pow (cbrt t_3) 3.0)))
(if (<= y.im 1.75e+173) (* t_2 (fabs (sin t_1))) t_4)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = pow(hypot(x_46_re, x_46_im), y_46_re);
double t_1 = y_46_re * atan2(x_46_im, x_46_re);
double t_2 = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (atan2(x_46_im, x_46_re) * y_46_im)));
double t_3 = y_46_im * log(hypot(x_46_im, x_46_re));
double t_4 = (t_0 / pow(exp(y_46_im), atan2(x_46_im, x_46_re))) * sin(t_3);
double tmp;
if (y_46_im <= -3500000.0) {
tmp = t_2 * sin(fabs(t_1));
} else if (y_46_im <= 7e-72) {
tmp = sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_1)) * t_0;
} else if (y_46_im <= 1.35e+44) {
tmp = t_4;
} else if (y_46_im <= 5.4e+64) {
tmp = t_0 * sin(pow(cbrt(t_3), 3.0));
} else if (y_46_im <= 1.75e+173) {
tmp = t_2 * fabs(sin(t_1));
} else {
tmp = t_4;
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = hypot(x_46_re, x_46_im) ^ y_46_re t_1 = Float64(y_46_re * atan(x_46_im, x_46_re)) 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))))) - Float64(atan(x_46_im, x_46_re) * y_46_im))) t_3 = Float64(y_46_im * log(hypot(x_46_im, x_46_re))) t_4 = Float64(Float64(t_0 / (exp(y_46_im) ^ atan(x_46_im, x_46_re))) * sin(t_3)) tmp = 0.0 if (y_46_im <= -3500000.0) tmp = Float64(t_2 * sin(abs(t_1))); elseif (y_46_im <= 7e-72) tmp = Float64(sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_1)) * t_0); elseif (y_46_im <= 1.35e+44) tmp = t_4; elseif (y_46_im <= 5.4e+64) tmp = Float64(t_0 * sin((cbrt(t_3) ^ 3.0))); elseif (y_46_im <= 1.75e+173) tmp = Float64(t_2 * abs(sin(t_1))); else tmp = t_4; end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, Block[{t$95$1 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{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] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(t$95$0 / N[Power[N[Exp[y$46$im], $MachinePrecision], N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[Sin[t$95$3], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -3500000.0], N[(t$95$2 * N[Sin[N[Abs[t$95$1], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 7e-72], N[(N[Sin[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im + t$95$1), $MachinePrecision]], $MachinePrecision] * t$95$0), $MachinePrecision], If[LessEqual[y$46$im, 1.35e+44], t$95$4, If[LessEqual[y$46$im, 5.4e+64], N[(t$95$0 * N[Sin[N[Power[N[Power[t$95$3, 1/3], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 1.75e+173], N[(t$95$2 * N[Abs[N[Sin[t$95$1], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], t$95$4]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_2 := e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\
t_3 := y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
t_4 := \frac{t_0}{{\left(e^{y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}} \cdot \sin t_3\\
\mathbf{if}\;y.im \leq -3500000:\\
\;\;\;\;t_2 \cdot \sin \left(\left|t_1\right|\right)\\
\mathbf{elif}\;y.im \leq 7 \cdot 10^{-72}:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, t_1\right)\right) \cdot t_0\\
\mathbf{elif}\;y.im \leq 1.35 \cdot 10^{+44}:\\
\;\;\;\;t_4\\
\mathbf{elif}\;y.im \leq 5.4 \cdot 10^{+64}:\\
\;\;\;\;t_0 \cdot \sin \left({\left(\sqrt[3]{t_3}\right)}^{3}\right)\\
\mathbf{elif}\;y.im \leq 1.75 \cdot 10^{+173}:\\
\;\;\;\;t_2 \cdot \left|\sin t_1\right|\\
\mathbf{else}:\\
\;\;\;\;t_4\\
\end{array}
\end{array}
if y.im < -3.5e6Initial program 29.5%
Taylor expanded in y.im around 0 56.4%
add-sqr-sqrt34.1%
sqrt-unprod41.0%
pow241.0%
*-commutative41.0%
Applied egg-rr41.0%
*-commutative41.0%
unpow241.0%
rem-sqrt-square61.5%
Simplified61.5%
if -3.5e6 < y.im < 7.00000000000000001e-72Initial program 51.1%
exp-diff51.1%
exp-to-pow51.1%
hypot-def51.1%
*-commutative51.1%
exp-prod51.1%
fma-def51.1%
hypot-def89.1%
*-commutative89.1%
Simplified89.1%
Taylor expanded in y.im around 0 89.9%
if 7.00000000000000001e-72 < y.im < 1.35e44 or 1.75e173 < y.im Initial program 32.6%
exp-diff30.6%
exp-to-pow30.6%
hypot-def30.6%
*-commutative30.6%
exp-prod30.5%
fma-def30.6%
hypot-def69.7%
*-commutative69.7%
Simplified69.7%
add-cube-cbrt73.5%
pow375.5%
fma-udef75.5%
*-commutative75.5%
*-commutative75.5%
fma-def75.5%
Applied egg-rr75.5%
Taylor expanded in y.re around 0 34.5%
pow-base-124.6%
*-lft-identity24.6%
unpow224.6%
unpow224.6%
hypot-def52.5%
Simplified73.7%
if 1.35e44 < y.im < 5.3999999999999999e64Initial program 30.0%
exp-diff10.0%
exp-to-pow10.0%
hypot-def10.0%
*-commutative10.0%
exp-prod10.0%
fma-def10.0%
hypot-def24.8%
*-commutative24.8%
Simplified24.8%
add-cube-cbrt22.4%
pow322.4%
fma-udef22.4%
*-commutative22.4%
*-commutative22.4%
fma-def22.4%
Applied egg-rr22.4%
Taylor expanded in y.im around 0 32.9%
Taylor expanded in y.re around 0 10.3%
unpow1/320.1%
unpow220.1%
unpow220.1%
hypot-def42.9%
Simplified42.9%
if 5.3999999999999999e64 < y.im < 1.75e173Initial program 35.3%
Taylor expanded in y.im around 0 59.2%
add-sqr-sqrt29.8%
sqrt-unprod65.1%
pow265.1%
*-commutative65.1%
Applied egg-rr65.1%
unpow265.1%
rem-sqrt-square71.0%
*-commutative71.0%
Simplified71.0%
Final simplification77.1%
(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))
(t_2
(exp
(-
(* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(* (atan2 x.im x.re) y.im)))))
(if (<= y.im -3600.0)
(* t_2 t_1)
(if (<= y.im 430.0)
(*
(sin (fma (log (hypot x.re x.im)) y.im t_0))
(pow (hypot x.re x.im) y.re))
(* t_2 (fabs t_1))))))
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 t_2 = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (atan2(x_46_im, x_46_re) * y_46_im)));
double tmp;
if (y_46_im <= -3600.0) {
tmp = t_2 * t_1;
} else if (y_46_im <= 430.0) {
tmp = sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_0)) * pow(hypot(x_46_re, x_46_im), y_46_re);
} else {
tmp = t_2 * fabs(t_1);
}
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) 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))))) - Float64(atan(x_46_im, x_46_re) * y_46_im))) tmp = 0.0 if (y_46_im <= -3600.0) tmp = Float64(t_2 * t_1); elseif (y_46_im <= 430.0) tmp = Float64(sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_0)) * (hypot(x_46_re, x_46_im) ^ y_46_re)); else tmp = Float64(t_2 * abs(t_1)); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sin[t$95$0], $MachinePrecision]}, Block[{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] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$im, -3600.0], N[(t$95$2 * t$95$1), $MachinePrecision], If[LessEqual[y$46$im, 430.0], N[(N[Sin[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im + t$95$0), $MachinePrecision]], $MachinePrecision] * N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], N[(t$95$2 * N[Abs[t$95$1], $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\\
t_2 := e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\
\mathbf{if}\;y.im \leq -3600:\\
\;\;\;\;t_2 \cdot t_1\\
\mathbf{elif}\;y.im \leq 430:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, t_0\right)\right) \cdot {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;t_2 \cdot \left|t_1\right|\\
\end{array}
\end{array}
if y.im < -3600Initial program 29.5%
Taylor expanded in y.im around 0 56.4%
if -3600 < y.im < 430Initial program 48.1%
exp-diff48.1%
exp-to-pow48.1%
hypot-def48.1%
*-commutative48.1%
exp-prod48.1%
fma-def48.1%
hypot-def88.3%
*-commutative88.3%
Simplified88.3%
Taylor expanded in y.im around 0 88.2%
if 430 < y.im Initial program 34.5%
Taylor expanded in y.im around 0 52.2%
add-sqr-sqrt17.7%
sqrt-unprod50.5%
pow250.5%
*-commutative50.5%
Applied egg-rr50.5%
unpow250.5%
rem-sqrt-square53.9%
*-commutative53.9%
Simplified53.9%
Final simplification73.1%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re)))
(t_1
(exp
(-
(* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(* (atan2 x.im x.re) y.im)))))
(if (<= y.im -3200.0)
(* t_1 (sin (fabs t_0)))
(if (<= y.im 1420.0)
(*
(sin (fma (log (hypot x.re x.im)) y.im t_0))
(pow (hypot x.re x.im) y.re))
(* t_1 (fabs (sin t_0)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (atan2(x_46_im, x_46_re) * y_46_im)));
double tmp;
if (y_46_im <= -3200.0) {
tmp = t_1 * sin(fabs(t_0));
} else if (y_46_im <= 1420.0) {
tmp = sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_0)) * pow(hypot(x_46_re, x_46_im), y_46_re);
} else {
tmp = t_1 * fabs(sin(t_0));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_1 = exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - Float64(atan(x_46_im, x_46_re) * y_46_im))) tmp = 0.0 if (y_46_im <= -3200.0) tmp = Float64(t_1 * sin(abs(t_0))); elseif (y_46_im <= 1420.0) tmp = Float64(sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_0)) * (hypot(x_46_re, x_46_im) ^ y_46_re)); else tmp = Float64(t_1 * abs(sin(t_0))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$im, -3200.0], N[(t$95$1 * N[Sin[N[Abs[t$95$0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 1420.0], N[(N[Sin[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im + t$95$0), $MachinePrecision]], $MachinePrecision] * N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[Abs[N[Sin[t$95$0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\
\mathbf{if}\;y.im \leq -3200:\\
\;\;\;\;t_1 \cdot \sin \left(\left|t_0\right|\right)\\
\mathbf{elif}\;y.im \leq 1420:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, t_0\right)\right) \cdot {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;t_1 \cdot \left|\sin t_0\right|\\
\end{array}
\end{array}
if y.im < -3200Initial program 29.5%
Taylor expanded in y.im around 0 56.4%
add-sqr-sqrt34.1%
sqrt-unprod41.0%
pow241.0%
*-commutative41.0%
Applied egg-rr41.0%
*-commutative41.0%
unpow241.0%
rem-sqrt-square61.5%
Simplified61.5%
if -3200 < y.im < 1420Initial program 48.1%
exp-diff48.1%
exp-to-pow48.1%
hypot-def48.1%
*-commutative48.1%
exp-prod48.1%
fma-def48.1%
hypot-def88.3%
*-commutative88.3%
Simplified88.3%
Taylor expanded in y.im around 0 88.2%
if 1420 < y.im Initial program 34.5%
Taylor expanded in y.im around 0 52.2%
add-sqr-sqrt17.7%
sqrt-unprod50.5%
pow250.5%
*-commutative50.5%
Applied egg-rr50.5%
unpow250.5%
rem-sqrt-square53.9%
*-commutative53.9%
Simplified53.9%
Final simplification74.3%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re)))
(t_1
(exp
(-
(* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(* (atan2 x.im x.re) y.im)))))
(if (<= y.im -5800.0)
(* t_1 (sin (fabs t_0)))
(if (<= y.im 0.000176)
(*
(sin (fma (log (hypot x.re x.im)) y.im t_0))
(pow (hypot x.re x.im) y.re))
(* t_1 (sin (* y.im (log (hypot x.im x.re)))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (atan2(x_46_im, x_46_re) * y_46_im)));
double tmp;
if (y_46_im <= -5800.0) {
tmp = t_1 * sin(fabs(t_0));
} else if (y_46_im <= 0.000176) {
tmp = sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_0)) * pow(hypot(x_46_re, x_46_im), y_46_re);
} else {
tmp = t_1 * sin((y_46_im * log(hypot(x_46_im, x_46_re))));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_1 = exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - Float64(atan(x_46_im, x_46_re) * y_46_im))) tmp = 0.0 if (y_46_im <= -5800.0) tmp = Float64(t_1 * sin(abs(t_0))); elseif (y_46_im <= 0.000176) tmp = Float64(sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_0)) * (hypot(x_46_re, x_46_im) ^ y_46_re)); else tmp = Float64(t_1 * sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re))))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$im, -5800.0], N[(t$95$1 * N[Sin[N[Abs[t$95$0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 0.000176], N[(N[Sin[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im + t$95$0), $MachinePrecision]], $MachinePrecision] * N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\
\mathbf{if}\;y.im \leq -5800:\\
\;\;\;\;t_1 \cdot \sin \left(\left|t_0\right|\right)\\
\mathbf{elif}\;y.im \leq 0.000176:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, t_0\right)\right) \cdot {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;t_1 \cdot \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\end{array}
\end{array}
if y.im < -5800Initial program 29.5%
Taylor expanded in y.im around 0 56.4%
add-sqr-sqrt34.1%
sqrt-unprod41.0%
pow241.0%
*-commutative41.0%
Applied egg-rr41.0%
*-commutative41.0%
unpow241.0%
rem-sqrt-square61.5%
Simplified61.5%
if -5800 < y.im < 1.76e-4Initial program 47.7%
exp-diff47.7%
exp-to-pow47.7%
hypot-def47.7%
*-commutative47.7%
exp-prod47.7%
fma-def47.7%
hypot-def88.2%
*-commutative88.2%
Simplified88.2%
Taylor expanded in y.im around 0 88.1%
if 1.76e-4 < y.im Initial program 35.6%
Taylor expanded in y.re around 0 35.6%
unpow235.6%
unpow235.6%
hypot-def54.8%
Simplified54.8%
Final simplification74.3%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (sin (* y.re (atan2 x.im x.re))))
(t_1
(*
(exp
(-
(* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(* (atan2 x.im x.re) y.im)))
t_0))
(t_2 (pow (hypot x.re x.im) y.re))
(t_3 (* t_2 (sin (* y.im (log (hypot x.im x.re)))))))
(if (<= y.im -31000000.0)
t_1
(if (<= y.im -1.5e-194)
t_3
(if (<= y.im 3.5e-236)
(* (/ t_2 (pow (exp y.im) (atan2 x.im x.re))) t_0)
(if (<= y.im 6.5e+36) t_3 t_1))))))
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 = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (atan2(x_46_im, x_46_re) * y_46_im))) * t_0;
double t_2 = pow(hypot(x_46_re, x_46_im), y_46_re);
double t_3 = t_2 * sin((y_46_im * log(hypot(x_46_im, x_46_re))));
double tmp;
if (y_46_im <= -31000000.0) {
tmp = t_1;
} else if (y_46_im <= -1.5e-194) {
tmp = t_3;
} else if (y_46_im <= 3.5e-236) {
tmp = (t_2 / pow(exp(y_46_im), atan2(x_46_im, x_46_re))) * t_0;
} else if (y_46_im <= 6.5e+36) {
tmp = t_3;
} else {
tmp = t_1;
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
double t_1 = Math.exp(((y_46_re * Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (Math.atan2(x_46_im, x_46_re) * y_46_im))) * t_0;
double t_2 = Math.pow(Math.hypot(x_46_re, x_46_im), y_46_re);
double t_3 = t_2 * Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re))));
double tmp;
if (y_46_im <= -31000000.0) {
tmp = t_1;
} else if (y_46_im <= -1.5e-194) {
tmp = t_3;
} else if (y_46_im <= 3.5e-236) {
tmp = (t_2 / Math.pow(Math.exp(y_46_im), Math.atan2(x_46_im, x_46_re))) * t_0;
} else if (y_46_im <= 6.5e+36) {
tmp = t_3;
} else {
tmp = t_1;
}
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))) t_1 = math.exp(((y_46_re * math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (math.atan2(x_46_im, x_46_re) * y_46_im))) * t_0 t_2 = math.pow(math.hypot(x_46_re, x_46_im), y_46_re) t_3 = t_2 * math.sin((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) tmp = 0 if y_46_im <= -31000000.0: tmp = t_1 elif y_46_im <= -1.5e-194: tmp = t_3 elif y_46_im <= 3.5e-236: tmp = (t_2 / math.pow(math.exp(y_46_im), math.atan2(x_46_im, x_46_re))) * t_0 elif y_46_im <= 6.5e+36: tmp = t_3 else: tmp = t_1 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 = Float64(exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * t_0) t_2 = hypot(x_46_re, x_46_im) ^ y_46_re t_3 = Float64(t_2 * sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re))))) tmp = 0.0 if (y_46_im <= -31000000.0) tmp = t_1; elseif (y_46_im <= -1.5e-194) tmp = t_3; elseif (y_46_im <= 3.5e-236) tmp = Float64(Float64(t_2 / (exp(y_46_im) ^ atan(x_46_im, x_46_re))) * t_0); elseif (y_46_im <= 6.5e+36) tmp = t_3; else tmp = t_1; 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))); t_1 = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (atan2(x_46_im, x_46_re) * y_46_im))) * t_0; t_2 = hypot(x_46_re, x_46_im) ^ y_46_re; t_3 = t_2 * sin((y_46_im * log(hypot(x_46_im, x_46_re)))); tmp = 0.0; if (y_46_im <= -31000000.0) tmp = t_1; elseif (y_46_im <= -1.5e-194) tmp = t_3; elseif (y_46_im <= 3.5e-236) tmp = (t_2 / (exp(y_46_im) ^ atan2(x_46_im, x_46_re))) * t_0; elseif (y_46_im <= 6.5e+36) tmp = t_3; else tmp = t_1; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$0), $MachinePrecision]}, Block[{t$95$2 = N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 * N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -31000000.0], t$95$1, If[LessEqual[y$46$im, -1.5e-194], t$95$3, If[LessEqual[y$46$im, 3.5e-236], N[(N[(t$95$2 / 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, 6.5e+36], t$95$3, t$95$1]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
t_1 := e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot t_0\\
t_2 := {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\\
t_3 := t_2 \cdot \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\mathbf{if}\;y.im \leq -31000000:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y.im \leq -1.5 \cdot 10^{-194}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;y.im \leq 3.5 \cdot 10^{-236}:\\
\;\;\;\;\frac{t_2}{{\left(e^{y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}} \cdot t_0\\
\mathbf{elif}\;y.im \leq 6.5 \cdot 10^{+36}:\\
\;\;\;\;t_3\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y.im < -3.1e7 or 6.4999999999999998e36 < y.im Initial program 33.1%
Taylor expanded in y.im around 0 55.0%
if -3.1e7 < y.im < -1.5e-194 or 3.49999999999999994e-236 < y.im < 6.4999999999999998e36Initial program 45.5%
exp-diff45.5%
exp-to-pow45.5%
hypot-def45.5%
*-commutative45.5%
exp-prod45.5%
fma-def45.5%
hypot-def85.8%
*-commutative85.8%
Simplified85.8%
add-cube-cbrt84.9%
pow385.8%
fma-udef85.8%
*-commutative85.8%
*-commutative85.8%
fma-def85.8%
Applied egg-rr85.8%
Taylor expanded in y.im around 0 84.3%
Taylor expanded in y.re around 0 38.8%
pow-base-138.8%
*-lft-identity38.8%
unpow238.8%
unpow238.8%
hypot-def78.0%
Simplified78.0%
if -1.5e-194 < y.im < 3.49999999999999994e-236Initial program 49.9%
exp-diff49.9%
exp-to-pow49.9%
hypot-def49.9%
*-commutative49.9%
exp-prod49.9%
fma-def49.9%
hypot-def90.5%
*-commutative90.5%
Simplified90.5%
add-cube-cbrt89.4%
pow389.4%
fma-udef89.4%
*-commutative89.4%
*-commutative89.4%
fma-def89.4%
Applied egg-rr89.4%
Taylor expanded in y.im around 0 81.4%
pow-base-181.4%
*-lft-identity81.4%
Simplified81.4%
Final simplification68.5%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re))))
(if (or (<= y.im -3600.0) (not (<= y.im 1000000.0)))
(*
(exp
(-
(* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(* (atan2 x.im x.re) y.im)))
(sin t_0))
(*
(sin (fma (log (hypot x.re x.im)) y.im t_0))
(pow (hypot x.re x.im) y.re)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if ((y_46_im <= -3600.0) || !(y_46_im <= 1000000.0)) {
tmp = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin(t_0);
} else {
tmp = sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_0)) * pow(hypot(x_46_re, x_46_im), y_46_re);
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) tmp = 0.0 if ((y_46_im <= -3600.0) || !(y_46_im <= 1000000.0)) tmp = Float64(exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * sin(t_0)); else tmp = Float64(sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_0)) * (hypot(x_46_re, x_46_im) ^ y_46_re)); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[y$46$im, -3600.0], N[Not[LessEqual[y$46$im, 1000000.0]], $MachinePrecision]], N[(N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision], N[(N[Sin[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im + t$95$0), $MachinePrecision]], $MachinePrecision] * N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.im \leq -3600 \lor \neg \left(y.im \leq 1000000\right):\\
\;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin t_0\\
\mathbf{else}:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, t_0\right)\right) \cdot {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\\
\end{array}
\end{array}
if y.im < -3600 or 1e6 < y.im Initial program 32.0%
Taylor expanded in y.im around 0 54.3%
if -3600 < y.im < 1e6Initial program 48.1%
exp-diff48.1%
exp-to-pow48.1%
hypot-def48.1%
*-commutative48.1%
exp-prod48.1%
fma-def48.1%
hypot-def88.3%
*-commutative88.3%
Simplified88.3%
Taylor expanded in y.im around 0 88.2%
Final simplification72.7%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (sin (* y.re (atan2 x.im x.re))))
(t_1
(*
(exp
(-
(* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(* (atan2 x.im x.re) y.im)))
t_0))
(t_2 (pow (hypot x.re x.im) y.re))
(t_3 (* t_2 (sin (* y.im (log (hypot x.im x.re)))))))
(if (<= y.im -2500.0)
t_1
(if (<= y.im -6e-196)
t_3
(if (<= y.im 3.8e-235) (* t_2 t_0) (if (<= y.im 7.2e+36) t_3 t_1))))))
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 = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (atan2(x_46_im, x_46_re) * y_46_im))) * t_0;
double t_2 = pow(hypot(x_46_re, x_46_im), y_46_re);
double t_3 = t_2 * sin((y_46_im * log(hypot(x_46_im, x_46_re))));
double tmp;
if (y_46_im <= -2500.0) {
tmp = t_1;
} else if (y_46_im <= -6e-196) {
tmp = t_3;
} else if (y_46_im <= 3.8e-235) {
tmp = t_2 * t_0;
} else if (y_46_im <= 7.2e+36) {
tmp = t_3;
} else {
tmp = t_1;
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
double t_1 = Math.exp(((y_46_re * Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (Math.atan2(x_46_im, x_46_re) * y_46_im))) * t_0;
double t_2 = Math.pow(Math.hypot(x_46_re, x_46_im), y_46_re);
double t_3 = t_2 * Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re))));
double tmp;
if (y_46_im <= -2500.0) {
tmp = t_1;
} else if (y_46_im <= -6e-196) {
tmp = t_3;
} else if (y_46_im <= 3.8e-235) {
tmp = t_2 * t_0;
} else if (y_46_im <= 7.2e+36) {
tmp = t_3;
} else {
tmp = t_1;
}
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))) t_1 = math.exp(((y_46_re * math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (math.atan2(x_46_im, x_46_re) * y_46_im))) * t_0 t_2 = math.pow(math.hypot(x_46_re, x_46_im), y_46_re) t_3 = t_2 * math.sin((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) tmp = 0 if y_46_im <= -2500.0: tmp = t_1 elif y_46_im <= -6e-196: tmp = t_3 elif y_46_im <= 3.8e-235: tmp = t_2 * t_0 elif y_46_im <= 7.2e+36: tmp = t_3 else: tmp = t_1 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 = Float64(exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * t_0) t_2 = hypot(x_46_re, x_46_im) ^ y_46_re t_3 = Float64(t_2 * sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re))))) tmp = 0.0 if (y_46_im <= -2500.0) tmp = t_1; elseif (y_46_im <= -6e-196) tmp = t_3; elseif (y_46_im <= 3.8e-235) tmp = Float64(t_2 * t_0); elseif (y_46_im <= 7.2e+36) tmp = t_3; else tmp = t_1; 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))); t_1 = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (atan2(x_46_im, x_46_re) * y_46_im))) * t_0; t_2 = hypot(x_46_re, x_46_im) ^ y_46_re; t_3 = t_2 * sin((y_46_im * log(hypot(x_46_im, x_46_re)))); tmp = 0.0; if (y_46_im <= -2500.0) tmp = t_1; elseif (y_46_im <= -6e-196) tmp = t_3; elseif (y_46_im <= 3.8e-235) tmp = t_2 * t_0; elseif (y_46_im <= 7.2e+36) tmp = t_3; else tmp = t_1; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$0), $MachinePrecision]}, Block[{t$95$2 = N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 * N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -2500.0], t$95$1, If[LessEqual[y$46$im, -6e-196], t$95$3, If[LessEqual[y$46$im, 3.8e-235], N[(t$95$2 * t$95$0), $MachinePrecision], If[LessEqual[y$46$im, 7.2e+36], t$95$3, t$95$1]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
t_1 := e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot t_0\\
t_2 := {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\\
t_3 := t_2 \cdot \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\mathbf{if}\;y.im \leq -2500:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y.im \leq -6 \cdot 10^{-196}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;y.im \leq 3.8 \cdot 10^{-235}:\\
\;\;\;\;t_2 \cdot t_0\\
\mathbf{elif}\;y.im \leq 7.2 \cdot 10^{+36}:\\
\;\;\;\;t_3\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y.im < -2500 or 7.1999999999999995e36 < y.im Initial program 33.1%
Taylor expanded in y.im around 0 55.0%
if -2500 < y.im < -6e-196 or 3.80000000000000026e-235 < y.im < 7.1999999999999995e36Initial program 45.5%
exp-diff45.5%
exp-to-pow45.5%
hypot-def45.5%
*-commutative45.5%
exp-prod45.5%
fma-def45.5%
hypot-def85.8%
*-commutative85.8%
Simplified85.8%
add-cube-cbrt84.9%
pow385.8%
fma-udef85.8%
*-commutative85.8%
*-commutative85.8%
fma-def85.8%
Applied egg-rr85.8%
Taylor expanded in y.im around 0 84.3%
Taylor expanded in y.re around 0 38.8%
pow-base-138.8%
*-lft-identity38.8%
unpow238.8%
unpow238.8%
hypot-def78.0%
Simplified78.0%
if -6e-196 < y.im < 3.80000000000000026e-235Initial program 49.9%
exp-diff49.9%
exp-to-pow49.9%
hypot-def49.9%
*-commutative49.9%
exp-prod49.9%
fma-def49.9%
hypot-def90.5%
*-commutative90.5%
Simplified90.5%
add-cube-cbrt89.4%
pow389.4%
fma-udef89.4%
*-commutative89.4%
*-commutative89.4%
fma-def89.4%
Applied egg-rr89.4%
Taylor expanded in y.im around 0 89.4%
Taylor expanded in y.im around 0 81.4%
pow-base-181.4%
*-lft-identity81.4%
Simplified81.4%
Final simplification68.5%
(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))
(t_2 (* t_1 (sin (* y.im (log (hypot x.im x.re))))))
(t_3 (* (atan2 x.im x.re) y.im)))
(if (<= y.im -3e+138)
(* (exp (- (* y.re (log x.re)) t_3)) t_0)
(if (<= y.im -4e-196)
t_2
(if (<= y.im 4.1e-235)
(* t_1 t_0)
(if (<= y.im 2.7e+67)
t_2
(* t_0 (exp (- (* y.re (log x.im)) t_3)))))))))
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 t_2 = t_1 * sin((y_46_im * log(hypot(x_46_im, x_46_re))));
double t_3 = atan2(x_46_im, x_46_re) * y_46_im;
double tmp;
if (y_46_im <= -3e+138) {
tmp = exp(((y_46_re * log(x_46_re)) - t_3)) * t_0;
} else if (y_46_im <= -4e-196) {
tmp = t_2;
} else if (y_46_im <= 4.1e-235) {
tmp = t_1 * t_0;
} else if (y_46_im <= 2.7e+67) {
tmp = t_2;
} else {
tmp = t_0 * exp(((y_46_re * log(x_46_im)) - t_3));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
double t_1 = Math.pow(Math.hypot(x_46_re, x_46_im), y_46_re);
double t_2 = t_1 * Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re))));
double t_3 = Math.atan2(x_46_im, x_46_re) * y_46_im;
double tmp;
if (y_46_im <= -3e+138) {
tmp = Math.exp(((y_46_re * Math.log(x_46_re)) - t_3)) * t_0;
} else if (y_46_im <= -4e-196) {
tmp = t_2;
} else if (y_46_im <= 4.1e-235) {
tmp = t_1 * t_0;
} else if (y_46_im <= 2.7e+67) {
tmp = t_2;
} else {
tmp = t_0 * Math.exp(((y_46_re * Math.log(x_46_im)) - t_3));
}
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))) t_1 = math.pow(math.hypot(x_46_re, x_46_im), y_46_re) t_2 = t_1 * math.sin((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) t_3 = math.atan2(x_46_im, x_46_re) * y_46_im tmp = 0 if y_46_im <= -3e+138: tmp = math.exp(((y_46_re * math.log(x_46_re)) - t_3)) * t_0 elif y_46_im <= -4e-196: tmp = t_2 elif y_46_im <= 4.1e-235: tmp = t_1 * t_0 elif y_46_im <= 2.7e+67: tmp = t_2 else: tmp = t_0 * math.exp(((y_46_re * math.log(x_46_im)) - t_3)) 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 t_2 = Float64(t_1 * sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re))))) t_3 = Float64(atan(x_46_im, x_46_re) * y_46_im) tmp = 0.0 if (y_46_im <= -3e+138) tmp = Float64(exp(Float64(Float64(y_46_re * log(x_46_re)) - t_3)) * t_0); elseif (y_46_im <= -4e-196) tmp = t_2; elseif (y_46_im <= 4.1e-235) tmp = Float64(t_1 * t_0); elseif (y_46_im <= 2.7e+67) tmp = t_2; else tmp = Float64(t_0 * exp(Float64(Float64(y_46_re * log(x_46_im)) - t_3))); 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))); t_1 = hypot(x_46_re, x_46_im) ^ y_46_re; t_2 = t_1 * sin((y_46_im * log(hypot(x_46_im, x_46_re)))); t_3 = atan2(x_46_im, x_46_re) * y_46_im; tmp = 0.0; if (y_46_im <= -3e+138) tmp = exp(((y_46_re * log(x_46_re)) - t_3)) * t_0; elseif (y_46_im <= -4e-196) tmp = t_2; elseif (y_46_im <= 4.1e-235) tmp = t_1 * t_0; elseif (y_46_im <= 2.7e+67) tmp = t_2; else tmp = t_0 * exp(((y_46_re * log(x_46_im)) - t_3)); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[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]}, Block[{t$95$2 = N[(t$95$1 * N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, If[LessEqual[y$46$im, -3e+138], N[(N[Exp[N[(N[(y$46$re * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision] - t$95$3), $MachinePrecision]], $MachinePrecision] * t$95$0), $MachinePrecision], If[LessEqual[y$46$im, -4e-196], t$95$2, If[LessEqual[y$46$im, 4.1e-235], N[(t$95$1 * t$95$0), $MachinePrecision], If[LessEqual[y$46$im, 2.7e+67], t$95$2, N[(t$95$0 * N[Exp[N[(N[(y$46$re * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision] - t$95$3), $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}\\
t_2 := t_1 \cdot \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
t_3 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
\mathbf{if}\;y.im \leq -3 \cdot 10^{+138}:\\
\;\;\;\;e^{y.re \cdot \log x.re - t_3} \cdot t_0\\
\mathbf{elif}\;y.im \leq -4 \cdot 10^{-196}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y.im \leq 4.1 \cdot 10^{-235}:\\
\;\;\;\;t_1 \cdot t_0\\
\mathbf{elif}\;y.im \leq 2.7 \cdot 10^{+67}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_0 \cdot e^{y.re \cdot \log x.im - t_3}\\
\end{array}
\end{array}
if y.im < -3.0000000000000001e138Initial program 34.9%
Taylor expanded in y.im around 0 63.3%
Taylor expanded in x.re around inf 51.5%
if -3.0000000000000001e138 < y.im < -4.0000000000000002e-196 or 4.09999999999999997e-235 < y.im < 2.6999999999999999e67Initial program 40.4%
exp-diff39.1%
exp-to-pow39.1%
hypot-def39.1%
*-commutative39.1%
exp-prod39.0%
fma-def39.0%
hypot-def75.7%
*-commutative75.7%
Simplified75.7%
add-cube-cbrt76.5%
pow376.4%
fma-udef76.4%
*-commutative76.4%
*-commutative76.4%
fma-def76.4%
Applied egg-rr76.4%
Taylor expanded in y.im around 0 71.6%
Taylor expanded in y.re around 0 32.8%
pow-base-132.8%
*-lft-identity32.8%
unpow232.8%
unpow232.8%
hypot-def66.2%
Simplified66.2%
if -4.0000000000000002e-196 < y.im < 4.09999999999999997e-235Initial program 49.9%
exp-diff49.9%
exp-to-pow49.9%
hypot-def49.9%
*-commutative49.9%
exp-prod49.9%
fma-def49.9%
hypot-def90.5%
*-commutative90.5%
Simplified90.5%
add-cube-cbrt89.4%
pow389.4%
fma-udef89.4%
*-commutative89.4%
*-commutative89.4%
fma-def89.4%
Applied egg-rr89.4%
Taylor expanded in y.im around 0 89.4%
Taylor expanded in y.im around 0 81.4%
pow-base-181.4%
*-lft-identity81.4%
Simplified81.4%
if 2.6999999999999999e67 < y.im Initial program 39.5%
Taylor expanded in y.im around 0 58.2%
Taylor expanded in x.re around 0 47.5%
Final simplification63.3%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* (atan2 x.im x.re) y.im))
(t_1 (sin (* y.re (atan2 x.im x.re))))
(t_2 (* t_1 (exp (- (* y.re (log (- x.im))) t_0))))
(t_3
(*
(pow (hypot x.re x.im) y.re)
(sin (* y.im (log (hypot x.im x.re)))))))
(if (<= x.im -6.5e+55)
t_2
(if (<= x.im -4.2e-108)
t_3
(if (<= x.im -5.5e-169)
t_2
(if (<= x.im 1.7e+67)
t_3
(* t_1 (exp (- (* y.re (log x.im)) t_0)))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = sin((y_46_re * atan2(x_46_im, x_46_re)));
double t_2 = t_1 * exp(((y_46_re * log(-x_46_im)) - t_0));
double t_3 = pow(hypot(x_46_re, x_46_im), y_46_re) * sin((y_46_im * log(hypot(x_46_im, x_46_re))));
double tmp;
if (x_46_im <= -6.5e+55) {
tmp = t_2;
} else if (x_46_im <= -4.2e-108) {
tmp = t_3;
} else if (x_46_im <= -5.5e-169) {
tmp = t_2;
} else if (x_46_im <= 1.7e+67) {
tmp = t_3;
} else {
tmp = t_1 * exp(((y_46_re * log(x_46_im)) - t_0));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
double t_2 = t_1 * Math.exp(((y_46_re * Math.log(-x_46_im)) - t_0));
double t_3 = Math.pow(Math.hypot(x_46_re, x_46_im), y_46_re) * Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re))));
double tmp;
if (x_46_im <= -6.5e+55) {
tmp = t_2;
} else if (x_46_im <= -4.2e-108) {
tmp = t_3;
} else if (x_46_im <= -5.5e-169) {
tmp = t_2;
} else if (x_46_im <= 1.7e+67) {
tmp = t_3;
} else {
tmp = t_1 * Math.exp(((y_46_re * Math.log(x_46_im)) - t_0));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.atan2(x_46_im, x_46_re) * y_46_im t_1 = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) t_2 = t_1 * math.exp(((y_46_re * math.log(-x_46_im)) - t_0)) t_3 = math.pow(math.hypot(x_46_re, x_46_im), y_46_re) * math.sin((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) tmp = 0 if x_46_im <= -6.5e+55: tmp = t_2 elif x_46_im <= -4.2e-108: tmp = t_3 elif x_46_im <= -5.5e-169: tmp = t_2 elif x_46_im <= 1.7e+67: tmp = t_3 else: tmp = t_1 * math.exp(((y_46_re * math.log(x_46_im)) - t_0)) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(atan(x_46_im, x_46_re) * y_46_im) t_1 = sin(Float64(y_46_re * atan(x_46_im, x_46_re))) t_2 = Float64(t_1 * exp(Float64(Float64(y_46_re * log(Float64(-x_46_im))) - t_0))) t_3 = Float64((hypot(x_46_re, x_46_im) ^ y_46_re) * sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re))))) tmp = 0.0 if (x_46_im <= -6.5e+55) tmp = t_2; elseif (x_46_im <= -4.2e-108) tmp = t_3; elseif (x_46_im <= -5.5e-169) tmp = t_2; elseif (x_46_im <= 1.7e+67) tmp = t_3; else tmp = Float64(t_1 * exp(Float64(Float64(y_46_re * log(x_46_im)) - t_0))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = atan2(x_46_im, x_46_re) * y_46_im; t_1 = sin((y_46_re * atan2(x_46_im, x_46_re))); t_2 = t_1 * exp(((y_46_re * log(-x_46_im)) - t_0)); t_3 = (hypot(x_46_re, x_46_im) ^ y_46_re) * sin((y_46_im * log(hypot(x_46_im, x_46_re)))); tmp = 0.0; if (x_46_im <= -6.5e+55) tmp = t_2; elseif (x_46_im <= -4.2e-108) tmp = t_3; elseif (x_46_im <= -5.5e-169) tmp = t_2; elseif (x_46_im <= 1.7e+67) tmp = t_3; else tmp = t_1 * exp(((y_46_re * log(x_46_im)) - t_0)); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, Block[{t$95$1 = N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 * N[Exp[N[(N[(y$46$re * N[Log[(-x$46$im)], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x$46$im, -6.5e+55], t$95$2, If[LessEqual[x$46$im, -4.2e-108], t$95$3, If[LessEqual[x$46$im, -5.5e-169], t$95$2, If[LessEqual[x$46$im, 1.7e+67], t$95$3, N[(t$95$1 * N[Exp[N[(N[(y$46$re * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_1 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
t_2 := t_1 \cdot e^{y.re \cdot \log \left(-x.im\right) - t_0}\\
t_3 := {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re} \cdot \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\mathbf{if}\;x.im \leq -6.5 \cdot 10^{+55}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x.im \leq -4.2 \cdot 10^{-108}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;x.im \leq -5.5 \cdot 10^{-169}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x.im \leq 1.7 \cdot 10^{+67}:\\
\;\;\;\;t_3\\
\mathbf{else}:\\
\;\;\;\;t_1 \cdot e^{y.re \cdot \log x.im - t_0}\\
\end{array}
\end{array}
if x.im < -6.50000000000000027e55 or -4.1999999999999998e-108 < x.im < -5.4999999999999994e-169Initial program 38.8%
Taylor expanded in y.im around 0 60.4%
Taylor expanded in x.im around -inf 75.0%
mul-1-neg75.0%
Simplified75.0%
if -6.50000000000000027e55 < x.im < -4.1999999999999998e-108 or -5.4999999999999994e-169 < x.im < 1.7000000000000001e67Initial program 49.9%
exp-diff47.6%
exp-to-pow47.6%
hypot-def47.6%
*-commutative47.6%
exp-prod47.3%
fma-def47.3%
hypot-def72.9%
*-commutative72.9%
Simplified72.9%
add-cube-cbrt75.4%
pow376.0%
fma-udef76.0%
*-commutative76.0%
*-commutative76.0%
fma-def76.0%
Applied egg-rr76.0%
Taylor expanded in y.im around 0 68.6%
Taylor expanded in y.re around 0 35.8%
pow-base-135.8%
*-lft-identity35.8%
unpow235.8%
unpow235.8%
hypot-def60.4%
Simplified60.4%
if 1.7000000000000001e67 < x.im Initial program 22.3%
Taylor expanded in y.im around 0 40.8%
Taylor expanded in x.re around 0 60.9%
Final simplification64.3%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* (atan2 x.im x.re) y.im))
(t_1 (* y.re (atan2 x.im x.re)))
(t_2 (sin t_1))
(t_3 (* t_2 (exp (- (* y.re (log (- x.im))) t_0))))
(t_4 (pow (hypot x.re x.im) y.re)))
(if (<= x.im -7.4e-20)
t_3
(if (<= x.im -1.46e-156)
(* t_4 (sin (- t_1 (* y.im (log (/ -1.0 x.im))))))
(if (<= x.im -5.5e-169)
t_3
(if (<= x.im 1.22e+70)
(* t_4 (sin (* y.im (log (hypot x.im x.re)))))
(* t_2 (exp (- (* y.re (log x.im)) t_0)))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = y_46_re * atan2(x_46_im, x_46_re);
double t_2 = sin(t_1);
double t_3 = t_2 * exp(((y_46_re * log(-x_46_im)) - t_0));
double t_4 = pow(hypot(x_46_re, x_46_im), y_46_re);
double tmp;
if (x_46_im <= -7.4e-20) {
tmp = t_3;
} else if (x_46_im <= -1.46e-156) {
tmp = t_4 * sin((t_1 - (y_46_im * log((-1.0 / x_46_im)))));
} else if (x_46_im <= -5.5e-169) {
tmp = t_3;
} else if (x_46_im <= 1.22e+70) {
tmp = t_4 * sin((y_46_im * log(hypot(x_46_im, x_46_re))));
} else {
tmp = t_2 * exp(((y_46_re * log(x_46_im)) - t_0));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_2 = Math.sin(t_1);
double t_3 = t_2 * Math.exp(((y_46_re * Math.log(-x_46_im)) - t_0));
double t_4 = Math.pow(Math.hypot(x_46_re, x_46_im), y_46_re);
double tmp;
if (x_46_im <= -7.4e-20) {
tmp = t_3;
} else if (x_46_im <= -1.46e-156) {
tmp = t_4 * Math.sin((t_1 - (y_46_im * Math.log((-1.0 / x_46_im)))));
} else if (x_46_im <= -5.5e-169) {
tmp = t_3;
} else if (x_46_im <= 1.22e+70) {
tmp = t_4 * Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re))));
} else {
tmp = t_2 * Math.exp(((y_46_re * Math.log(x_46_im)) - t_0));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.atan2(x_46_im, x_46_re) * y_46_im t_1 = y_46_re * math.atan2(x_46_im, x_46_re) t_2 = math.sin(t_1) t_3 = t_2 * math.exp(((y_46_re * math.log(-x_46_im)) - t_0)) t_4 = math.pow(math.hypot(x_46_re, x_46_im), y_46_re) tmp = 0 if x_46_im <= -7.4e-20: tmp = t_3 elif x_46_im <= -1.46e-156: tmp = t_4 * math.sin((t_1 - (y_46_im * math.log((-1.0 / x_46_im))))) elif x_46_im <= -5.5e-169: tmp = t_3 elif x_46_im <= 1.22e+70: tmp = t_4 * math.sin((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) else: tmp = t_2 * math.exp(((y_46_re * math.log(x_46_im)) - t_0)) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(atan(x_46_im, x_46_re) * y_46_im) t_1 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_2 = sin(t_1) t_3 = Float64(t_2 * exp(Float64(Float64(y_46_re * log(Float64(-x_46_im))) - t_0))) t_4 = hypot(x_46_re, x_46_im) ^ y_46_re tmp = 0.0 if (x_46_im <= -7.4e-20) tmp = t_3; elseif (x_46_im <= -1.46e-156) tmp = Float64(t_4 * sin(Float64(t_1 - Float64(y_46_im * log(Float64(-1.0 / x_46_im)))))); elseif (x_46_im <= -5.5e-169) tmp = t_3; elseif (x_46_im <= 1.22e+70) tmp = Float64(t_4 * sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re))))); else tmp = Float64(t_2 * exp(Float64(Float64(y_46_re * log(x_46_im)) - t_0))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = atan2(x_46_im, x_46_re) * y_46_im; t_1 = y_46_re * atan2(x_46_im, x_46_re); t_2 = sin(t_1); t_3 = t_2 * exp(((y_46_re * log(-x_46_im)) - t_0)); t_4 = hypot(x_46_re, x_46_im) ^ y_46_re; tmp = 0.0; if (x_46_im <= -7.4e-20) tmp = t_3; elseif (x_46_im <= -1.46e-156) tmp = t_4 * sin((t_1 - (y_46_im * log((-1.0 / x_46_im))))); elseif (x_46_im <= -5.5e-169) tmp = t_3; elseif (x_46_im <= 1.22e+70) tmp = t_4 * sin((y_46_im * log(hypot(x_46_im, x_46_re)))); else tmp = t_2 * exp(((y_46_re * log(x_46_im)) - t_0)); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, Block[{t$95$1 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sin[t$95$1], $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 * N[Exp[N[(N[(y$46$re * N[Log[(-x$46$im)], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, If[LessEqual[x$46$im, -7.4e-20], t$95$3, If[LessEqual[x$46$im, -1.46e-156], N[(t$95$4 * N[Sin[N[(t$95$1 - N[(y$46$im * N[Log[N[(-1.0 / x$46$im), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$im, -5.5e-169], t$95$3, If[LessEqual[x$46$im, 1.22e+70], N[(t$95$4 * N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$2 * N[Exp[N[(N[(y$46$re * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_2 := \sin t_1\\
t_3 := t_2 \cdot e^{y.re \cdot \log \left(-x.im\right) - t_0}\\
t_4 := {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\\
\mathbf{if}\;x.im \leq -7.4 \cdot 10^{-20}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;x.im \leq -1.46 \cdot 10^{-156}:\\
\;\;\;\;t_4 \cdot \sin \left(t_1 - y.im \cdot \log \left(\frac{-1}{x.im}\right)\right)\\
\mathbf{elif}\;x.im \leq -5.5 \cdot 10^{-169}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;x.im \leq 1.22 \cdot 10^{+70}:\\
\;\;\;\;t_4 \cdot \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_2 \cdot e^{y.re \cdot \log x.im - t_0}\\
\end{array}
\end{array}
if x.im < -7.4000000000000001e-20 or -1.45999999999999995e-156 < x.im < -5.4999999999999994e-169Initial program 32.4%
Taylor expanded in y.im around 0 54.3%
Taylor expanded in x.im around -inf 71.0%
mul-1-neg71.0%
Simplified71.0%
if -7.4000000000000001e-20 < x.im < -1.45999999999999995e-156Initial program 78.6%
exp-diff71.4%
exp-to-pow71.4%
hypot-def71.4%
*-commutative71.4%
exp-prod71.4%
fma-def71.4%
hypot-def82.8%
*-commutative82.8%
Simplified82.8%
add-cube-cbrt82.3%
pow382.3%
fma-udef82.3%
*-commutative82.3%
*-commutative82.3%
fma-def82.3%
Applied egg-rr82.3%
Taylor expanded in y.im around 0 75.6%
Taylor expanded in x.im around -inf 68.0%
pow-base-168.0%
*-lft-identity68.0%
+-commutative68.0%
mul-1-neg68.0%
unsub-neg68.0%
Simplified68.0%
if -5.4999999999999994e-169 < x.im < 1.22e70Initial program 46.8%
exp-diff45.8%
exp-to-pow45.8%
hypot-def45.8%
*-commutative45.8%
exp-prod45.4%
fma-def45.5%
hypot-def73.3%
*-commutative73.3%
Simplified73.3%
add-cube-cbrt75.8%
pow376.7%
fma-udef76.6%
*-commutative76.6%
*-commutative76.6%
fma-def76.7%
Applied egg-rr76.7%
Taylor expanded in y.im around 0 69.7%
Taylor expanded in y.re around 0 34.3%
pow-base-134.3%
*-lft-identity34.3%
unpow234.3%
unpow234.3%
hypot-def61.2%
Simplified61.2%
if 1.22e70 < x.im Initial program 22.3%
Taylor expanded in y.im around 0 40.8%
Taylor expanded in x.re around 0 60.9%
Final simplification64.6%
(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))
(t_2 (* t_1 (sin (* y.im (log (hypot x.im x.re)))))))
(if (<= y.im -6.5e-196)
t_2
(if (<= y.im 2e-235)
(* t_1 t_0)
(if (<= y.im 3.9e+69)
t_2
(* t_0 (exp (- (* y.re (log x.im)) (* (atan2 x.im x.re) y.im)))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = 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 t_2 = t_1 * sin((y_46_im * log(hypot(x_46_im, x_46_re))));
double tmp;
if (y_46_im <= -6.5e-196) {
tmp = t_2;
} else if (y_46_im <= 2e-235) {
tmp = t_1 * t_0;
} else if (y_46_im <= 3.9e+69) {
tmp = t_2;
} else {
tmp = t_0 * exp(((y_46_re * log(x_46_im)) - (atan2(x_46_im, x_46_re) * y_46_im)));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
double t_1 = Math.pow(Math.hypot(x_46_re, x_46_im), y_46_re);
double t_2 = t_1 * Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re))));
double tmp;
if (y_46_im <= -6.5e-196) {
tmp = t_2;
} else if (y_46_im <= 2e-235) {
tmp = t_1 * t_0;
} else if (y_46_im <= 3.9e+69) {
tmp = t_2;
} else {
tmp = t_0 * Math.exp(((y_46_re * Math.log(x_46_im)) - (Math.atan2(x_46_im, x_46_re) * y_46_im)));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) t_1 = math.pow(math.hypot(x_46_re, x_46_im), y_46_re) t_2 = t_1 * math.sin((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) tmp = 0 if y_46_im <= -6.5e-196: tmp = t_2 elif y_46_im <= 2e-235: tmp = t_1 * t_0 elif y_46_im <= 3.9e+69: tmp = t_2 else: tmp = t_0 * math.exp(((y_46_re * math.log(x_46_im)) - (math.atan2(x_46_im, x_46_re) * y_46_im))) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) 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 t_2 = Float64(t_1 * sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re))))) tmp = 0.0 if (y_46_im <= -6.5e-196) tmp = t_2; elseif (y_46_im <= 2e-235) tmp = Float64(t_1 * t_0); elseif (y_46_im <= 3.9e+69) tmp = t_2; else tmp = Float64(t_0 * exp(Float64(Float64(y_46_re * log(x_46_im)) - Float64(atan(x_46_im, x_46_re) * y_46_im)))); 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))); t_1 = hypot(x_46_re, x_46_im) ^ y_46_re; t_2 = t_1 * sin((y_46_im * log(hypot(x_46_im, x_46_re)))); tmp = 0.0; if (y_46_im <= -6.5e-196) tmp = t_2; elseif (y_46_im <= 2e-235) tmp = t_1 * t_0; elseif (y_46_im <= 3.9e+69) tmp = t_2; else tmp = t_0 * exp(((y_46_re * log(x_46_im)) - (atan2(x_46_im, x_46_re) * y_46_im))); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := 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]}, Block[{t$95$2 = N[(t$95$1 * N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -6.5e-196], t$95$2, If[LessEqual[y$46$im, 2e-235], N[(t$95$1 * t$95$0), $MachinePrecision], If[LessEqual[y$46$im, 3.9e+69], t$95$2, N[(t$95$0 * N[Exp[N[(N[(y$46$re * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \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}\\
t_2 := t_1 \cdot \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\mathbf{if}\;y.im \leq -6.5 \cdot 10^{-196}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y.im \leq 2 \cdot 10^{-235}:\\
\;\;\;\;t_1 \cdot t_0\\
\mathbf{elif}\;y.im \leq 3.9 \cdot 10^{+69}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_0 \cdot e^{y.re \cdot \log x.im - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\
\end{array}
\end{array}
if y.im < -6.5000000000000004e-196 or 1.9999999999999999e-235 < y.im < 3.8999999999999999e69Initial program 39.4%
exp-diff37.8%
exp-to-pow37.8%
hypot-def37.8%
*-commutative37.8%
exp-prod37.6%
fma-def37.6%
hypot-def72.8%
*-commutative72.8%
Simplified72.8%
add-cube-cbrt73.4%
pow373.9%
fma-udef73.8%
*-commutative73.8%
*-commutative73.8%
fma-def73.9%
Applied egg-rr73.9%
Taylor expanded in y.im around 0 62.9%
Taylor expanded in y.re around 0 28.5%
pow-base-128.5%
*-lft-identity28.5%
unpow228.5%
unpow228.5%
hypot-def58.5%
Simplified58.5%
if -6.5000000000000004e-196 < y.im < 1.9999999999999999e-235Initial program 49.9%
exp-diff49.9%
exp-to-pow49.9%
hypot-def49.9%
*-commutative49.9%
exp-prod49.9%
fma-def49.9%
hypot-def90.5%
*-commutative90.5%
Simplified90.5%
add-cube-cbrt89.4%
pow389.4%
fma-udef89.4%
*-commutative89.4%
*-commutative89.4%
fma-def89.4%
Applied egg-rr89.4%
Taylor expanded in y.im around 0 89.4%
Taylor expanded in y.im around 0 81.4%
pow-base-181.4%
*-lft-identity81.4%
Simplified81.4%
if 3.8999999999999999e69 < y.im Initial program 39.5%
Taylor expanded in y.im around 0 58.2%
Taylor expanded in x.re around 0 47.5%
Final simplification59.7%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (pow (hypot x.re x.im) y.re)))
(if (<= y.re -3.95e-56)
(* t_0 (sin (* y.re (atan2 x.im x.re))))
(* t_0 (sin (* y.im (log (hypot x.im x.re))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = pow(hypot(x_46_re, x_46_im), y_46_re);
double tmp;
if (y_46_re <= -3.95e-56) {
tmp = t_0 * sin((y_46_re * atan2(x_46_im, x_46_re)));
} else {
tmp = t_0 * sin((y_46_im * log(hypot(x_46_im, x_46_re))));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.pow(Math.hypot(x_46_re, x_46_im), y_46_re);
double tmp;
if (y_46_re <= -3.95e-56) {
tmp = t_0 * Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
} else {
tmp = t_0 * Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re))));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.pow(math.hypot(x_46_re, x_46_im), y_46_re) tmp = 0 if y_46_re <= -3.95e-56: tmp = t_0 * math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) else: tmp = t_0 * math.sin((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = hypot(x_46_re, x_46_im) ^ y_46_re tmp = 0.0 if (y_46_re <= -3.95e-56) tmp = Float64(t_0 * sin(Float64(y_46_re * atan(x_46_im, x_46_re)))); else tmp = Float64(t_0 * sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re))))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = hypot(x_46_re, x_46_im) ^ y_46_re; tmp = 0.0; if (y_46_re <= -3.95e-56) tmp = t_0 * sin((y_46_re * atan2(x_46_im, x_46_re))); else tmp = t_0 * sin((y_46_im * log(hypot(x_46_im, x_46_re)))); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, If[LessEqual[y$46$re, -3.95e-56], N[(t$95$0 * N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(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]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\\
\mathbf{if}\;y.re \leq -3.95 \cdot 10^{-56}:\\
\;\;\;\;t_0 \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{else}:\\
\;\;\;\;t_0 \cdot \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\end{array}
\end{array}
if y.re < -3.95000000000000017e-56Initial program 40.8%
exp-diff38.0%
exp-to-pow38.0%
hypot-def38.0%
*-commutative38.0%
exp-prod38.0%
fma-def38.0%
hypot-def78.8%
*-commutative78.8%
Simplified78.8%
add-cube-cbrt80.0%
pow378.6%
fma-udef78.6%
*-commutative78.6%
*-commutative78.6%
fma-def78.6%
Applied egg-rr78.6%
Taylor expanded in y.im around 0 80.2%
Taylor expanded in y.im around 0 79.0%
pow-base-179.0%
*-lft-identity79.0%
Simplified79.0%
if -3.95000000000000017e-56 < y.re Initial program 40.7%
exp-diff38.5%
exp-to-pow38.5%
hypot-def38.5%
*-commutative38.5%
exp-prod38.3%
fma-def38.4%
hypot-def70.1%
*-commutative70.1%
Simplified70.1%
add-cube-cbrt71.1%
pow372.1%
fma-udef72.1%
*-commutative72.1%
*-commutative72.1%
fma-def72.1%
Applied egg-rr72.1%
Taylor expanded in y.im around 0 55.9%
Taylor expanded in y.re around 0 26.4%
pow-base-126.4%
*-lft-identity26.4%
unpow226.4%
unpow226.4%
hypot-def47.7%
Simplified47.7%
Final simplification56.4%
(FPCore (x.re x.im y.re y.im) :precision binary64 (* (pow (hypot x.re x.im) y.re) (sin (* y.re (atan2 x.im x.re)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return pow(hypot(x_46_re, x_46_im), y_46_re) * sin((y_46_re * atan2(x_46_im, x_46_re)));
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return Math.pow(Math.hypot(x_46_re, x_46_im), y_46_re) * Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): return math.pow(math.hypot(x_46_re, x_46_im), y_46_re) * math.sin((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((hypot(x_46_re, x_46_im) ^ y_46_re) * sin(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 = (hypot(x_46_re, x_46_im) ^ y_46_re) * sin((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[(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]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)
\end{array}
Initial program 40.7%
exp-diff38.4%
exp-to-pow38.4%
hypot-def38.4%
*-commutative38.4%
exp-prod38.2%
fma-def38.2%
hypot-def72.5%
*-commutative72.5%
Simplified72.5%
add-cube-cbrt73.6%
pow373.9%
fma-udef73.9%
*-commutative73.9%
*-commutative73.9%
fma-def73.9%
Applied egg-rr73.9%
Taylor expanded in y.im around 0 62.7%
Taylor expanded in y.im around 0 44.7%
pow-base-144.7%
*-lft-identity44.7%
Simplified44.7%
Final simplification44.7%
herbie shell --seed 2023334
(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)))))