
(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 (* (atan2 x.im x.re) (- y.im))) (t_1 (log (hypot x.re x.im))))
(if (<= y.im 9.2e+109)
(*
(exp (fma t_1 y.re t_0))
(sin (fma t_1 y.im (* y.re (atan2 x.im x.re)))))
(*
(exp t_0)
(sqrt (pow (sin (fma y.re (atan2 x.im x.re) (* y.im t_1))) 2.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 = log(hypot(x_46_re, x_46_im));
double tmp;
if (y_46_im <= 9.2e+109) {
tmp = exp(fma(t_1, y_46_re, t_0)) * sin(fma(t_1, y_46_im, (y_46_re * atan2(x_46_im, x_46_re))));
} else {
tmp = exp(t_0) * sqrt(pow(sin(fma(y_46_re, atan2(x_46_im, x_46_re), (y_46_im * t_1))), 2.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) * Float64(-y_46_im)) t_1 = log(hypot(x_46_re, x_46_im)) tmp = 0.0 if (y_46_im <= 9.2e+109) tmp = Float64(exp(fma(t_1, y_46_re, t_0)) * sin(fma(t_1, y_46_im, Float64(y_46_re * atan(x_46_im, x_46_re))))); else tmp = Float64(exp(t_0) * sqrt((sin(fma(y_46_re, atan(x_46_im, x_46_re), Float64(y_46_im * t_1))) ^ 2.0))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]}, Block[{t$95$1 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$im, 9.2e+109], N[(N[Exp[N[(t$95$1 * y$46$re + t$95$0), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(t$95$1 * y$46$im + N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Exp[t$95$0], $MachinePrecision] * N[Sqrt[N[Power[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], 2.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)\\
t_1 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
\mathbf{if}\;y.im \leq 9.2 \cdot 10^{+109}:\\
\;\;\;\;e^{\mathsf{fma}\left(t\_1, y.re, t\_0\right)} \cdot \sin \left(\mathsf{fma}\left(t\_1, y.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;e^{t\_0} \cdot \sqrt{{\sin \left(\mathsf{fma}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}, y.im \cdot t\_1\right)\right)}^{2}}\\
\end{array}
\end{array}
if y.im < 9.20000000000000042e109Initial program 44.9%
fmm-def44.9%
hypot-define44.9%
distribute-rgt-neg-out44.9%
fma-define45.9%
hypot-define79.4%
*-commutative79.4%
Simplified79.4%
if 9.20000000000000042e109 < y.im Initial program 28.3%
fma-define28.3%
hypot-define43.9%
*-commutative43.9%
add-sqr-sqrt21.0%
sqrt-unprod57.1%
pow257.1%
Applied egg-rr57.1%
Taylor expanded in y.re around 0 74.5%
neg-mul-174.5%
Simplified74.5%
Final simplification78.4%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re))) (t_1 (log (hypot x.re x.im))))
(if (<= y.im -1.26e+56)
(*
(exp
(-
(* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(* y.im (atan2 x.im x.re))))
(sin t_0))
(if (<= y.im 1350000000000.0)
(*
(sin (fma t_1 y.im t_0))
(/ (pow (hypot x.re x.im) y.re) (pow (exp y.im) (atan2 x.im x.re))))
(*
(exp (* (atan2 x.im x.re) (- y.im)))
(sqrt (pow (sin (fma y.re (atan2 x.im x.re) (* y.im t_1))) 2.0)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = log(hypot(x_46_re, x_46_im));
double tmp;
if (y_46_im <= -1.26e+56) {
tmp = 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)))) * sin(t_0);
} else if (y_46_im <= 1350000000000.0) {
tmp = sin(fma(t_1, y_46_im, t_0)) * (pow(hypot(x_46_re, x_46_im), y_46_re) / pow(exp(y_46_im), atan2(x_46_im, x_46_re)));
} else {
tmp = exp((atan2(x_46_im, x_46_re) * -y_46_im)) * sqrt(pow(sin(fma(y_46_re, atan2(x_46_im, x_46_re), (y_46_im * t_1))), 2.0));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_1 = log(hypot(x_46_re, x_46_im)) tmp = 0.0 if (y_46_im <= -1.26e+56) 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(y_46_im * atan(x_46_im, x_46_re)))) * sin(t_0)); elseif (y_46_im <= 1350000000000.0) tmp = Float64(sin(fma(t_1, y_46_im, t_0)) * Float64((hypot(x_46_re, x_46_im) ^ y_46_re) / (exp(y_46_im) ^ atan(x_46_im, x_46_re)))); else tmp = Float64(exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))) * sqrt((sin(fma(y_46_re, atan(x_46_im, x_46_re), Float64(y_46_im * t_1))) ^ 2.0))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$im, -1.26e+56], 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[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 1350000000000.0], N[(N[Sin[N[(t$95$1 * y$46$im + t$95$0), $MachinePrecision]], $MachinePrecision] * N[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] / N[Power[N[Exp[y$46$im], $MachinePrecision], N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[Power[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], 2.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
\mathbf{if}\;y.im \leq -1.26 \cdot 10^{+56}:\\
\;\;\;\;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}} \cdot \sin t\_0\\
\mathbf{elif}\;y.im \leq 1350000000000:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(t\_1, y.im, t\_0\right)\right) \cdot \frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{{\left(e^{y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}}\\
\mathbf{else}:\\
\;\;\;\;e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)} \cdot \sqrt{{\sin \left(\mathsf{fma}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}, y.im \cdot t\_1\right)\right)}^{2}}\\
\end{array}
\end{array}
if y.im < -1.2599999999999999e56Initial program 45.3%
Taylor expanded in y.im around 0 67.6%
if -1.2599999999999999e56 < y.im < 1.35e12Initial program 48.8%
exp-diff48.8%
exp-to-pow48.8%
hypot-define48.8%
*-commutative48.8%
exp-prod48.2%
fma-define48.2%
hypot-define83.5%
*-commutative83.5%
Simplified83.5%
if 1.35e12 < y.im Initial program 25.0%
fma-define26.4%
hypot-define45.0%
*-commutative45.0%
add-sqr-sqrt19.7%
sqrt-unprod53.3%
pow253.3%
Applied egg-rr53.3%
Taylor expanded in y.re around 0 70.4%
neg-mul-170.4%
Simplified70.4%
Final simplification76.8%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re)))
(t_1 (* y.im (atan2 x.im x.re)))
(t_2 (exp (* (atan2 x.im x.re) (- y.im))))
(t_3 (log (hypot x.re x.im))))
(if (<= y.im -4e+217)
(* t_2 (sin t_0))
(if (<= y.im -11500.0)
(*
(exp (- (* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im))))) t_1))
(sin (* y.im (log (hypot x.im x.re)))))
(if (<= y.im 9.0)
(*
(sin (fma t_3 y.im t_0))
(/ (pow (hypot x.re x.im) y.re) (+ t_1 1.0)))
(*
t_2
(sqrt
(pow (sin (fma y.re (atan2 x.im x.re) (* y.im t_3))) 2.0))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = y_46_im * atan2(x_46_im, x_46_re);
double t_2 = exp((atan2(x_46_im, x_46_re) * -y_46_im));
double t_3 = log(hypot(x_46_re, x_46_im));
double tmp;
if (y_46_im <= -4e+217) {
tmp = t_2 * sin(t_0);
} else if (y_46_im <= -11500.0) {
tmp = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_1)) * sin((y_46_im * log(hypot(x_46_im, x_46_re))));
} else if (y_46_im <= 9.0) {
tmp = sin(fma(t_3, y_46_im, t_0)) * (pow(hypot(x_46_re, x_46_im), y_46_re) / (t_1 + 1.0));
} else {
tmp = t_2 * sqrt(pow(sin(fma(y_46_re, atan2(x_46_im, x_46_re), (y_46_im * t_3))), 2.0));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_1 = Float64(y_46_im * atan(x_46_im, x_46_re)) t_2 = exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))) t_3 = log(hypot(x_46_re, x_46_im)) tmp = 0.0 if (y_46_im <= -4e+217) tmp = Float64(t_2 * sin(t_0)); elseif (y_46_im <= -11500.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))))) - t_1)) * sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re))))); elseif (y_46_im <= 9.0) tmp = Float64(sin(fma(t_3, y_46_im, t_0)) * Float64((hypot(x_46_re, x_46_im) ^ y_46_re) / Float64(t_1 + 1.0))); else tmp = Float64(t_2 * sqrt((sin(fma(y_46_re, atan(x_46_im, x_46_re), Float64(y_46_im * t_3))) ^ 2.0))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$im, -4e+217], N[(t$95$2 * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, -11500.0], N[(N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 9.0], N[(N[Sin[N[(t$95$3 * y$46$im + t$95$0), $MachinePrecision]], $MachinePrecision] * N[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] / N[(t$95$1 + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$2 * N[Sqrt[N[Power[N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision] + N[(y$46$im * t$95$3), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], 2.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_2 := e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\
t_3 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
\mathbf{if}\;y.im \leq -4 \cdot 10^{+217}:\\
\;\;\;\;t\_2 \cdot \sin t\_0\\
\mathbf{elif}\;y.im \leq -11500:\\
\;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - t\_1} \cdot \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\mathbf{elif}\;y.im \leq 9:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(t\_3, y.im, t\_0\right)\right) \cdot \frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{t\_1 + 1}\\
\mathbf{else}:\\
\;\;\;\;t\_2 \cdot \sqrt{{\sin \left(\mathsf{fma}\left(y.re, \tan^{-1}_* \frac{x.im}{x.re}, y.im \cdot t\_3\right)\right)}^{2}}\\
\end{array}
\end{array}
if y.im < -3.99999999999999984e217Initial program 45.5%
fma-define45.5%
hypot-define56.8%
*-commutative56.8%
add-sqr-sqrt51.1%
sqrt-unprod67.9%
pow267.9%
Applied egg-rr67.9%
Taylor expanded in y.re around 0 73.3%
neg-mul-173.3%
Simplified73.3%
Taylor expanded in y.im around 0 83.5%
*-commutative83.5%
Simplified83.5%
if -3.99999999999999984e217 < y.im < -11500Initial program 43.9%
Taylor expanded in y.re around 0 48.2%
unpow248.2%
unpow248.2%
hypot-undefine63.8%
Simplified63.8%
if -11500 < y.im < 9Initial program 50.2%
exp-diff50.2%
exp-to-pow50.2%
hypot-define50.2%
*-commutative50.2%
exp-prod49.6%
fma-define49.6%
hypot-define86.4%
*-commutative86.4%
Simplified86.4%
Taylor expanded in y.im around 0 86.7%
if 9 < y.im Initial program 24.7%
fma-define26.0%
hypot-define44.4%
*-commutative44.4%
add-sqr-sqrt19.5%
sqrt-unprod52.6%
pow252.6%
Applied egg-rr52.6%
Taylor expanded in y.re around 0 70.5%
neg-mul-170.5%
Simplified70.5%
Final simplification77.7%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (pow (hypot x.im x.re) y.re))
(t_1 (log (hypot x.re x.im)))
(t_2 (* y.re (atan2 x.im x.re)))
(t_3 (sin t_2)))
(if (<= y.re -1.2)
(* (sqrt (pow t_3 2.0)) t_0)
(if (<= y.re 4.4e+16)
(* (sin (fma t_1 y.im t_2)) (exp (* (atan2 x.im x.re) (- y.im))))
(if (<= y.re 2.05e+174)
(*
(exp
(-
(* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(* y.im (atan2 x.im x.re))))
t_3)
(if (<= y.re 3.3e+245)
(* t_0 (fabs (sin (fma y.im t_1 t_2))))
(* t_0 (sin (* y.re (cbrt (pow (atan2 x.im x.re) 3.0)))))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = pow(hypot(x_46_im, x_46_re), y_46_re);
double t_1 = log(hypot(x_46_re, x_46_im));
double t_2 = y_46_re * atan2(x_46_im, x_46_re);
double t_3 = sin(t_2);
double tmp;
if (y_46_re <= -1.2) {
tmp = sqrt(pow(t_3, 2.0)) * t_0;
} else if (y_46_re <= 4.4e+16) {
tmp = sin(fma(t_1, y_46_im, t_2)) * exp((atan2(x_46_im, x_46_re) * -y_46_im));
} else if (y_46_re <= 2.05e+174) {
tmp = 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)))) * t_3;
} else if (y_46_re <= 3.3e+245) {
tmp = t_0 * fabs(sin(fma(y_46_im, t_1, t_2)));
} else {
tmp = t_0 * sin((y_46_re * cbrt(pow(atan2(x_46_im, x_46_re), 3.0))));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = hypot(x_46_im, x_46_re) ^ y_46_re t_1 = log(hypot(x_46_re, x_46_im)) t_2 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_3 = sin(t_2) tmp = 0.0 if (y_46_re <= -1.2) tmp = Float64(sqrt((t_3 ^ 2.0)) * t_0); elseif (y_46_re <= 4.4e+16) tmp = Float64(sin(fma(t_1, y_46_im, t_2)) * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))); elseif (y_46_re <= 2.05e+174) 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(y_46_im * atan(x_46_im, x_46_re)))) * t_3); elseif (y_46_re <= 3.3e+245) tmp = Float64(t_0 * abs(sin(fma(y_46_im, t_1, t_2)))); else tmp = Float64(t_0 * sin(Float64(y_46_re * cbrt((atan(x_46_im, x_46_re) ^ 3.0))))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, Block[{t$95$1 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $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[Sin[t$95$2], $MachinePrecision]}, If[LessEqual[y$46$re, -1.2], N[(N[Sqrt[N[Power[t$95$3, 2.0], $MachinePrecision]], $MachinePrecision] * t$95$0), $MachinePrecision], If[LessEqual[y$46$re, 4.4e+16], N[(N[Sin[N[(t$95$1 * y$46$im + t$95$2), $MachinePrecision]], $MachinePrecision] * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 2.05e+174], 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[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$3), $MachinePrecision], If[LessEqual[y$46$re, 3.3e+245], N[(t$95$0 * N[Abs[N[Sin[N[(y$46$im * t$95$1 + t$95$2), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[Sin[N[(y$46$re * N[Power[N[Power[N[ArcTan[x$46$im / x$46$re], $MachinePrecision], 3.0], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
t_1 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
t_2 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_3 := \sin t\_2\\
\mathbf{if}\;y.re \leq -1.2:\\
\;\;\;\;\sqrt{{t\_3}^{2}} \cdot t\_0\\
\mathbf{elif}\;y.re \leq 4.4 \cdot 10^{+16}:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(t\_1, y.im, t\_2\right)\right) \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\
\mathbf{elif}\;y.re \leq 2.05 \cdot 10^{+174}:\\
\;\;\;\;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}} \cdot t\_3\\
\mathbf{elif}\;y.re \leq 3.3 \cdot 10^{+245}:\\
\;\;\;\;t\_0 \cdot \left|\sin \left(\mathsf{fma}\left(y.im, t\_1, t\_2\right)\right)\right|\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot \sin \left(y.re \cdot \sqrt[3]{{\tan^{-1}_* \frac{x.im}{x.re}}^{3}}\right)\\
\end{array}
\end{array}
if y.re < -1.19999999999999996Initial program 41.5%
fmm-def41.5%
hypot-define41.5%
distribute-rgt-neg-out41.5%
fma-define43.4%
hypot-define79.2%
*-commutative79.2%
Simplified79.2%
Taylor expanded in y.im around 0 73.9%
unpow273.9%
unpow273.9%
hypot-undefine73.9%
Simplified73.9%
add-sqr-sqrt36.0%
sqrt-unprod79.5%
pow279.5%
Applied egg-rr79.5%
if -1.19999999999999996 < y.re < 4.4e16Initial program 43.1%
fmm-def43.1%
hypot-define43.1%
distribute-rgt-neg-out43.1%
fma-define43.1%
hypot-define79.7%
*-commutative79.7%
Simplified79.7%
Taylor expanded in y.re around 0 78.8%
neg-mul-178.8%
distribute-rgt-neg-in78.8%
Simplified78.8%
if 4.4e16 < y.re < 2.05000000000000015e174Initial program 42.1%
Taylor expanded in y.im around 0 65.8%
if 2.05000000000000015e174 < y.re < 3.30000000000000011e245Initial program 31.6%
fmm-def31.6%
hypot-define31.6%
distribute-rgt-neg-out31.6%
fma-define31.6%
hypot-define63.2%
*-commutative63.2%
Simplified63.2%
Taylor expanded in y.im around 0 58.0%
unpow258.0%
unpow258.0%
hypot-undefine58.0%
Simplified58.0%
fma-undefine58.0%
*-commutative58.0%
*-commutative58.0%
+-commutative58.0%
*-commutative58.0%
fma-undefine58.0%
pow158.0%
metadata-eval58.0%
sqrt-pow179.0%
add-sqr-sqrt79.0%
sqrt-prod79.0%
rem-sqrt-square79.0%
sqrt-pow179.0%
metadata-eval79.0%
pow179.0%
fma-undefine79.0%
Applied egg-rr79.0%
if 3.30000000000000011e245 < y.re Initial program 36.4%
fmm-def36.4%
hypot-define36.4%
distribute-rgt-neg-out36.4%
fma-define36.4%
hypot-define54.5%
*-commutative54.5%
Simplified54.5%
Taylor expanded in y.im around 0 54.5%
unpow254.5%
unpow254.5%
hypot-undefine54.5%
Simplified54.5%
add-cbrt-cube100.0%
pow3100.0%
Applied egg-rr100.0%
Final simplification78.0%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re))))
(if (<= y.re -2.0)
(* (sqrt (pow (sin t_0) 2.0)) (pow (hypot x.im x.re) y.re))
(if (<= y.re 4.4e+16)
(*
(sin (fma (log (hypot x.re x.im)) y.im t_0))
(exp (* (atan2 x.im x.re) (- y.im))))
(*
(exp
(-
(* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(* 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 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if (y_46_re <= -2.0) {
tmp = sqrt(pow(sin(t_0), 2.0)) * pow(hypot(x_46_im, x_46_re), y_46_re);
} else if (y_46_re <= 4.4e+16) {
tmp = sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_0)) * exp((atan2(x_46_im, x_46_re) * -y_46_im));
} else {
tmp = 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)))) * sin((y_46_im * log(hypot(x_46_im, x_46_re))));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) tmp = 0.0 if (y_46_re <= -2.0) tmp = Float64(sqrt((sin(t_0) ^ 2.0)) * (hypot(x_46_im, x_46_re) ^ y_46_re)); elseif (y_46_re <= 4.4e+16) tmp = Float64(sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_0)) * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))); else 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(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
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -2.0], N[(N[Sqrt[N[Power[N[Sin[t$95$0], $MachinePrecision], 2.0], $MachinePrecision]], $MachinePrecision] * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 4.4e+16], 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[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $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[(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]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.re \leq -2:\\
\;\;\;\;\sqrt{{\sin t\_0}^{2}} \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{elif}\;y.re \leq 4.4 \cdot 10^{+16}:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, t\_0\right)\right) \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\
\mathbf{else}:\\
\;\;\;\;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}} \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 < -2Initial program 41.5%
fmm-def41.5%
hypot-define41.5%
distribute-rgt-neg-out41.5%
fma-define43.4%
hypot-define79.2%
*-commutative79.2%
Simplified79.2%
Taylor expanded in y.im around 0 73.9%
unpow273.9%
unpow273.9%
hypot-undefine73.9%
Simplified73.9%
add-sqr-sqrt36.0%
sqrt-unprod79.5%
pow279.5%
Applied egg-rr79.5%
if -2 < y.re < 4.4e16Initial program 43.1%
fmm-def43.1%
hypot-define43.1%
distribute-rgt-neg-out43.1%
fma-define43.1%
hypot-define79.7%
*-commutative79.7%
Simplified79.7%
Taylor expanded in y.re around 0 78.8%
neg-mul-178.8%
distribute-rgt-neg-in78.8%
Simplified78.8%
if 4.4e16 < y.re Initial program 38.2%
Taylor expanded in y.re around 0 36.8%
unpow236.8%
unpow236.8%
hypot-undefine61.8%
Simplified61.8%
Final simplification74.4%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (pow (hypot x.im x.re) y.re))
(t_1 (* y.re (atan2 x.im x.re)))
(t_2 (sin t_1)))
(if (<= y.re -1.5)
(* (sqrt (pow t_2 2.0)) t_0)
(if (<= y.re 5.2e+16)
(*
(sin (fma (log (hypot x.re x.im)) y.im t_1))
(exp (* (atan2 x.im x.re) (- y.im))))
(if (<= y.re 2.1e+190)
(*
(exp
(-
(* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(* y.im (atan2 x.im x.re))))
t_2)
(* t_0 (sin (* y.re (cbrt (pow (atan2 x.im x.re) 3.0))))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = pow(hypot(x_46_im, x_46_re), y_46_re);
double t_1 = y_46_re * atan2(x_46_im, x_46_re);
double t_2 = sin(t_1);
double tmp;
if (y_46_re <= -1.5) {
tmp = sqrt(pow(t_2, 2.0)) * t_0;
} else if (y_46_re <= 5.2e+16) {
tmp = sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_1)) * exp((atan2(x_46_im, x_46_re) * -y_46_im));
} else if (y_46_re <= 2.1e+190) {
tmp = 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)))) * t_2;
} else {
tmp = t_0 * sin((y_46_re * cbrt(pow(atan2(x_46_im, x_46_re), 3.0))));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = hypot(x_46_im, x_46_re) ^ y_46_re t_1 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_2 = sin(t_1) tmp = 0.0 if (y_46_re <= -1.5) tmp = Float64(sqrt((t_2 ^ 2.0)) * t_0); elseif (y_46_re <= 5.2e+16) tmp = Float64(sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_1)) * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))); elseif (y_46_re <= 2.1e+190) 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(y_46_im * atan(x_46_im, x_46_re)))) * t_2); else tmp = Float64(t_0 * sin(Float64(y_46_re * cbrt((atan(x_46_im, x_46_re) ^ 3.0))))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, 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[y$46$re, -1.5], N[(N[Sqrt[N[Power[t$95$2, 2.0], $MachinePrecision]], $MachinePrecision] * t$95$0), $MachinePrecision], If[LessEqual[y$46$re, 5.2e+16], N[(N[Sin[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im + t$95$1), $MachinePrecision]], $MachinePrecision] * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 2.1e+190], 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[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$2), $MachinePrecision], N[(t$95$0 * N[Sin[N[(y$46$re * N[Power[N[Power[N[ArcTan[x$46$im / x$46$re], $MachinePrecision], 3.0], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_2 := \sin t\_1\\
\mathbf{if}\;y.re \leq -1.5:\\
\;\;\;\;\sqrt{{t\_2}^{2}} \cdot t\_0\\
\mathbf{elif}\;y.re \leq 5.2 \cdot 10^{+16}:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, t\_1\right)\right) \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\
\mathbf{elif}\;y.re \leq 2.1 \cdot 10^{+190}:\\
\;\;\;\;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}} \cdot t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot \sin \left(y.re \cdot \sqrt[3]{{\tan^{-1}_* \frac{x.im}{x.re}}^{3}}\right)\\
\end{array}
\end{array}
if y.re < -1.5Initial program 41.5%
fmm-def41.5%
hypot-define41.5%
distribute-rgt-neg-out41.5%
fma-define43.4%
hypot-define79.2%
*-commutative79.2%
Simplified79.2%
Taylor expanded in y.im around 0 73.9%
unpow273.9%
unpow273.9%
hypot-undefine73.9%
Simplified73.9%
add-sqr-sqrt36.0%
sqrt-unprod79.5%
pow279.5%
Applied egg-rr79.5%
if -1.5 < y.re < 5.2e16Initial program 43.1%
fmm-def43.1%
hypot-define43.1%
distribute-rgt-neg-out43.1%
fma-define43.1%
hypot-define79.7%
*-commutative79.7%
Simplified79.7%
Taylor expanded in y.re around 0 78.8%
neg-mul-178.8%
distribute-rgt-neg-in78.8%
Simplified78.8%
if 5.2e16 < y.re < 2.1000000000000001e190Initial program 40.5%
Taylor expanded in y.im around 0 64.4%
if 2.1000000000000001e190 < y.re Initial program 34.6%
fmm-def34.6%
hypot-define34.6%
distribute-rgt-neg-out34.6%
fma-define34.6%
hypot-define53.8%
*-commutative53.8%
Simplified53.8%
Taylor expanded in y.im around 0 50.0%
unpow250.0%
unpow250.0%
hypot-undefine50.0%
Simplified50.0%
add-cbrt-cube73.1%
pow373.1%
Applied egg-rr73.1%
Final simplification76.0%
(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 -29000.0) (not (<= y.im 1.1e+15)))
(* (exp (* (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.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_re * atan2(x_46_im, x_46_re);
double tmp;
if ((y_46_im <= -29000.0) || !(y_46_im <= 1.1e+15)) {
tmp = exp((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_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_re * atan(x_46_im, x_46_re)) tmp = 0.0 if ((y_46_im <= -29000.0) || !(y_46_im <= 1.1e+15)) tmp = Float64(exp(Float64(atan(x_46_im, x_46_re) * Float64(-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_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$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[y$46$im, -29000.0], N[Not[LessEqual[y$46$im, 1.1e+15]], $MachinePrecision]], N[(N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $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$im ^ 2 + x$46$re ^ 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 -29000 \lor \neg \left(y.im \leq 1.1 \cdot 10^{+15}\right):\\
\;\;\;\;e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)} \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.im, x.re\right)\right)}^{y.re}\\
\end{array}
\end{array}
if y.im < -29000 or 1.1e15 < y.im Initial program 34.1%
fma-define35.6%
hypot-define51.4%
*-commutative51.4%
add-sqr-sqrt28.3%
sqrt-unprod58.0%
pow258.0%
Applied egg-rr58.0%
Taylor expanded in y.re around 0 65.2%
neg-mul-165.2%
Simplified65.2%
Taylor expanded in y.im around 0 60.7%
*-commutative60.7%
Simplified60.7%
if -29000 < y.im < 1.1e15Initial program 49.8%
fmm-def49.8%
hypot-define49.8%
distribute-rgt-neg-out49.8%
fma-define49.8%
hypot-define87.0%
*-commutative87.0%
Simplified87.0%
Taylor expanded in y.im around 0 68.8%
unpow268.8%
unpow268.8%
hypot-undefine85.7%
Simplified85.7%
Final simplification72.4%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (pow (hypot x.im x.re) y.re))
(t_1 (sin (* y.re (atan2 x.im x.re))))
(t_2 (* (sqrt (pow t_1 2.0)) t_0)))
(if (<= y.re -2.85)
t_2
(if (<= y.re -1.5e-133)
(* (exp (* (atan2 x.im x.re) (- y.im))) t_1)
(if (<= y.re 2e-12)
(/
(sin (* y.im (log (hypot x.im x.re))))
(exp (* y.im (atan2 x.im x.re))))
(if (<= y.re 5e+239)
t_2
(* t_0 (sin (* y.re (cbrt (pow (atan2 x.im x.re) 3.0)))))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = pow(hypot(x_46_im, x_46_re), y_46_re);
double t_1 = sin((y_46_re * atan2(x_46_im, x_46_re)));
double t_2 = sqrt(pow(t_1, 2.0)) * t_0;
double tmp;
if (y_46_re <= -2.85) {
tmp = t_2;
} else if (y_46_re <= -1.5e-133) {
tmp = exp((atan2(x_46_im, x_46_re) * -y_46_im)) * t_1;
} else if (y_46_re <= 2e-12) {
tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) / exp((y_46_im * atan2(x_46_im, x_46_re)));
} else if (y_46_re <= 5e+239) {
tmp = t_2;
} else {
tmp = t_0 * sin((y_46_re * cbrt(pow(atan2(x_46_im, x_46_re), 3.0))));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
double t_1 = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
double t_2 = Math.sqrt(Math.pow(t_1, 2.0)) * t_0;
double tmp;
if (y_46_re <= -2.85) {
tmp = t_2;
} else if (y_46_re <= -1.5e-133) {
tmp = Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im)) * t_1;
} else if (y_46_re <= 2e-12) {
tmp = Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re)))) / Math.exp((y_46_im * Math.atan2(x_46_im, x_46_re)));
} else if (y_46_re <= 5e+239) {
tmp = t_2;
} else {
tmp = t_0 * Math.sin((y_46_re * Math.cbrt(Math.pow(Math.atan2(x_46_im, x_46_re), 3.0))));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = hypot(x_46_im, x_46_re) ^ y_46_re t_1 = sin(Float64(y_46_re * atan(x_46_im, x_46_re))) t_2 = Float64(sqrt((t_1 ^ 2.0)) * t_0) tmp = 0.0 if (y_46_re <= -2.85) tmp = t_2; elseif (y_46_re <= -1.5e-133) tmp = Float64(exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))) * t_1); elseif (y_46_re <= 2e-12) tmp = Float64(sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) / exp(Float64(y_46_im * atan(x_46_im, x_46_re)))); elseif (y_46_re <= 5e+239) tmp = t_2; else tmp = Float64(t_0 * sin(Float64(y_46_re * cbrt((atan(x_46_im, x_46_re) ^ 3.0))))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, 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[(N[Sqrt[N[Power[t$95$1, 2.0], $MachinePrecision]], $MachinePrecision] * t$95$0), $MachinePrecision]}, If[LessEqual[y$46$re, -2.85], t$95$2, If[LessEqual[y$46$re, -1.5e-133], N[(N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision] * t$95$1), $MachinePrecision], If[LessEqual[y$46$re, 2e-12], N[(N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Exp[N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 5e+239], t$95$2, N[(t$95$0 * N[Sin[N[(y$46$re * N[Power[N[Power[N[ArcTan[x$46$im / x$46$re], $MachinePrecision], 3.0], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
t_1 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
t_2 := \sqrt{{t\_1}^{2}} \cdot t\_0\\
\mathbf{if}\;y.re \leq -2.85:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y.re \leq -1.5 \cdot 10^{-133}:\\
\;\;\;\;e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)} \cdot t\_1\\
\mathbf{elif}\;y.re \leq 2 \cdot 10^{-12}:\\
\;\;\;\;\frac{\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)}{e^{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}}\\
\mathbf{elif}\;y.re \leq 5 \cdot 10^{+239}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot \sin \left(y.re \cdot \sqrt[3]{{\tan^{-1}_* \frac{x.im}{x.re}}^{3}}\right)\\
\end{array}
\end{array}
if y.re < -2.85000000000000009 or 1.99999999999999996e-12 < y.re < 5.00000000000000007e239Initial program 39.9%
fmm-def39.9%
hypot-define39.9%
distribute-rgt-neg-out39.9%
fma-define41.7%
hypot-define70.9%
*-commutative70.9%
Simplified70.9%
Taylor expanded in y.im around 0 63.1%
unpow263.1%
unpow263.1%
hypot-undefine64.0%
Simplified64.0%
add-sqr-sqrt32.8%
sqrt-unprod69.3%
pow269.3%
Applied egg-rr69.3%
if -2.85000000000000009 < y.re < -1.5000000000000001e-133Initial program 26.7%
fma-define26.7%
hypot-define34.8%
*-commutative34.8%
add-sqr-sqrt13.7%
sqrt-unprod35.0%
pow235.0%
Applied egg-rr35.0%
Taylor expanded in y.re around 0 52.9%
neg-mul-152.9%
Simplified52.9%
Taylor expanded in y.im around 0 64.4%
*-commutative64.4%
Simplified64.4%
if -1.5000000000000001e-133 < y.re < 1.99999999999999996e-12Initial program 49.0%
exp-diff49.0%
exp-to-pow49.0%
hypot-define49.0%
*-commutative49.0%
exp-prod48.0%
fma-define48.0%
hypot-define82.1%
*-commutative82.1%
Simplified82.1%
Taylor expanded in y.re around 0 45.8%
unpow245.8%
unpow245.8%
hypot-undefine74.4%
Simplified74.4%
if 5.00000000000000007e239 < y.re Initial program 30.8%
fmm-def30.8%
hypot-define30.8%
distribute-rgt-neg-out30.8%
fma-define30.8%
hypot-define53.8%
*-commutative53.8%
Simplified53.8%
Taylor expanded in y.im around 0 46.2%
unpow246.2%
unpow246.2%
hypot-undefine46.2%
Simplified46.2%
add-cbrt-cube84.6%
pow384.6%
Applied egg-rr84.6%
Final simplification71.5%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (pow (hypot x.im x.re) y.re))
(t_1 (sin (* y.re (atan2 x.im x.re)))))
(if (<= y.re -11.8)
(* t_0 (sin (* y.re (sqrt (pow (atan2 x.im x.re) 2.0)))))
(if (<= y.re -1.5e-134)
(* (exp (* (atan2 x.im x.re) (- y.im))) t_1)
(if (<= y.re 6e-13)
(/
(sin (* y.im (log (hypot x.im x.re))))
(exp (* y.im (atan2 x.im x.re))))
(if (<= y.re 8e+189)
(* t_1 t_0)
(* t_0 (sin (* y.re (cbrt (pow (atan2 x.im x.re) 3.0)))))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = pow(hypot(x_46_im, x_46_re), y_46_re);
double t_1 = sin((y_46_re * atan2(x_46_im, x_46_re)));
double tmp;
if (y_46_re <= -11.8) {
tmp = t_0 * sin((y_46_re * sqrt(pow(atan2(x_46_im, x_46_re), 2.0))));
} else if (y_46_re <= -1.5e-134) {
tmp = exp((atan2(x_46_im, x_46_re) * -y_46_im)) * t_1;
} else if (y_46_re <= 6e-13) {
tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) / exp((y_46_im * atan2(x_46_im, x_46_re)));
} else if (y_46_re <= 8e+189) {
tmp = t_1 * t_0;
} else {
tmp = t_0 * sin((y_46_re * cbrt(pow(atan2(x_46_im, x_46_re), 3.0))));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
double t_1 = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
double tmp;
if (y_46_re <= -11.8) {
tmp = t_0 * Math.sin((y_46_re * Math.sqrt(Math.pow(Math.atan2(x_46_im, x_46_re), 2.0))));
} else if (y_46_re <= -1.5e-134) {
tmp = Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im)) * t_1;
} else if (y_46_re <= 6e-13) {
tmp = Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re)))) / Math.exp((y_46_im * Math.atan2(x_46_im, x_46_re)));
} else if (y_46_re <= 8e+189) {
tmp = t_1 * t_0;
} else {
tmp = t_0 * Math.sin((y_46_re * Math.cbrt(Math.pow(Math.atan2(x_46_im, x_46_re), 3.0))));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = hypot(x_46_im, x_46_re) ^ y_46_re t_1 = sin(Float64(y_46_re * atan(x_46_im, x_46_re))) tmp = 0.0 if (y_46_re <= -11.8) tmp = Float64(t_0 * sin(Float64(y_46_re * sqrt((atan(x_46_im, x_46_re) ^ 2.0))))); elseif (y_46_re <= -1.5e-134) tmp = Float64(exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))) * t_1); elseif (y_46_re <= 6e-13) tmp = Float64(sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) / exp(Float64(y_46_im * atan(x_46_im, x_46_re)))); elseif (y_46_re <= 8e+189) tmp = Float64(t_1 * t_0); else tmp = Float64(t_0 * sin(Float64(y_46_re * cbrt((atan(x_46_im, x_46_re) ^ 3.0))))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, Block[{t$95$1 = N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -11.8], N[(t$95$0 * N[Sin[N[(y$46$re * N[Sqrt[N[Power[N[ArcTan[x$46$im / x$46$re], $MachinePrecision], 2.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, -1.5e-134], N[(N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision] * t$95$1), $MachinePrecision], If[LessEqual[y$46$re, 6e-13], N[(N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Exp[N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 8e+189], N[(t$95$1 * t$95$0), $MachinePrecision], N[(t$95$0 * N[Sin[N[(y$46$re * N[Power[N[Power[N[ArcTan[x$46$im / x$46$re], $MachinePrecision], 3.0], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
t_1 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{if}\;y.re \leq -11.8:\\
\;\;\;\;t\_0 \cdot \sin \left(y.re \cdot \sqrt{{\tan^{-1}_* \frac{x.im}{x.re}}^{2}}\right)\\
\mathbf{elif}\;y.re \leq -1.5 \cdot 10^{-134}:\\
\;\;\;\;e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)} \cdot t\_1\\
\mathbf{elif}\;y.re \leq 6 \cdot 10^{-13}:\\
\;\;\;\;\frac{\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)}{e^{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}}\\
\mathbf{elif}\;y.re \leq 8 \cdot 10^{+189}:\\
\;\;\;\;t\_1 \cdot t\_0\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot \sin \left(y.re \cdot \sqrt[3]{{\tan^{-1}_* \frac{x.im}{x.re}}^{3}}\right)\\
\end{array}
\end{array}
if y.re < -11.800000000000001Initial program 41.5%
fmm-def41.5%
hypot-define41.5%
distribute-rgt-neg-out41.5%
fma-define43.4%
hypot-define79.2%
*-commutative79.2%
Simplified79.2%
Taylor expanded in y.im around 0 73.9%
unpow273.9%
unpow273.9%
hypot-undefine73.9%
Simplified73.9%
add-sqr-sqrt34.1%
sqrt-unprod75.7%
pow275.7%
Applied egg-rr75.7%
if -11.800000000000001 < y.re < -1.5e-134Initial program 26.7%
fma-define26.7%
hypot-define34.8%
*-commutative34.8%
add-sqr-sqrt13.7%
sqrt-unprod35.0%
pow235.0%
Applied egg-rr35.0%
Taylor expanded in y.re around 0 52.9%
neg-mul-152.9%
Simplified52.9%
Taylor expanded in y.im around 0 64.4%
*-commutative64.4%
Simplified64.4%
if -1.5e-134 < y.re < 5.99999999999999968e-13Initial program 49.0%
exp-diff49.0%
exp-to-pow49.0%
hypot-define49.0%
*-commutative49.0%
exp-prod48.0%
fma-define48.0%
hypot-define82.1%
*-commutative82.1%
Simplified82.1%
Taylor expanded in y.re around 0 45.8%
unpow245.8%
unpow245.8%
hypot-undefine74.4%
Simplified74.4%
if 5.99999999999999968e-13 < y.re < 8.0000000000000002e189Initial program 38.5%
fmm-def38.5%
hypot-define38.5%
distribute-rgt-neg-out38.5%
fma-define40.6%
hypot-define66.1%
*-commutative66.1%
Simplified66.1%
Taylor expanded in y.im around 0 53.5%
unpow253.5%
unpow253.5%
hypot-undefine55.6%
Simplified55.6%
if 8.0000000000000002e189 < y.re Initial program 34.6%
fmm-def34.6%
hypot-define34.6%
distribute-rgt-neg-out34.6%
fma-define34.6%
hypot-define53.8%
*-commutative53.8%
Simplified53.8%
Taylor expanded in y.im around 0 50.0%
unpow250.0%
unpow250.0%
hypot-undefine50.0%
Simplified50.0%
add-cbrt-cube73.1%
pow373.1%
Applied egg-rr73.1%
Final simplification69.9%
(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.im x.re) y.re))
(t_2 (* t_0 t_1)))
(if (<= y.re -2.55)
t_2
(if (<= y.re -2.8e-135)
(* (exp (* (atan2 x.im x.re) (- y.im))) t_0)
(if (<= y.re 6.5e-13)
(/
(sin (* y.im (log (hypot x.im x.re))))
(exp (* y.im (atan2 x.im x.re))))
(if (<= y.re 6.2e+190)
t_2
(* t_1 (sin (* y.re (cbrt (pow (atan2 x.im x.re) 3.0)))))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = sin((y_46_re * atan2(x_46_im, x_46_re)));
double t_1 = pow(hypot(x_46_im, x_46_re), y_46_re);
double t_2 = t_0 * t_1;
double tmp;
if (y_46_re <= -2.55) {
tmp = t_2;
} else if (y_46_re <= -2.8e-135) {
tmp = exp((atan2(x_46_im, x_46_re) * -y_46_im)) * t_0;
} else if (y_46_re <= 6.5e-13) {
tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) / exp((y_46_im * atan2(x_46_im, x_46_re)));
} else if (y_46_re <= 6.2e+190) {
tmp = t_2;
} else {
tmp = t_1 * sin((y_46_re * cbrt(pow(atan2(x_46_im, x_46_re), 3.0))));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
double t_1 = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
double t_2 = t_0 * t_1;
double tmp;
if (y_46_re <= -2.55) {
tmp = t_2;
} else if (y_46_re <= -2.8e-135) {
tmp = Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im)) * t_0;
} else if (y_46_re <= 6.5e-13) {
tmp = Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re)))) / Math.exp((y_46_im * Math.atan2(x_46_im, x_46_re)));
} else if (y_46_re <= 6.2e+190) {
tmp = t_2;
} else {
tmp = t_1 * Math.sin((y_46_re * Math.cbrt(Math.pow(Math.atan2(x_46_im, x_46_re), 3.0))));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin(Float64(y_46_re * atan(x_46_im, x_46_re))) t_1 = hypot(x_46_im, x_46_re) ^ y_46_re t_2 = Float64(t_0 * t_1) tmp = 0.0 if (y_46_re <= -2.55) tmp = t_2; elseif (y_46_re <= -2.8e-135) tmp = Float64(exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))) * t_0); elseif (y_46_re <= 6.5e-13) tmp = Float64(sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) / exp(Float64(y_46_im * atan(x_46_im, x_46_re)))); elseif (y_46_re <= 6.2e+190) tmp = t_2; else tmp = Float64(t_1 * sin(Float64(y_46_re * cbrt((atan(x_46_im, x_46_re) ^ 3.0))))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[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$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, Block[{t$95$2 = N[(t$95$0 * t$95$1), $MachinePrecision]}, If[LessEqual[y$46$re, -2.55], t$95$2, If[LessEqual[y$46$re, -2.8e-135], N[(N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision] * t$95$0), $MachinePrecision], If[LessEqual[y$46$re, 6.5e-13], N[(N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Exp[N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 6.2e+190], t$95$2, N[(t$95$1 * N[Sin[N[(y$46$re * N[Power[N[Power[N[ArcTan[x$46$im / x$46$re], $MachinePrecision], 3.0], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $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.im, x.re\right)\right)}^{y.re}\\
t_2 := t\_0 \cdot t\_1\\
\mathbf{if}\;y.re \leq -2.55:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y.re \leq -2.8 \cdot 10^{-135}:\\
\;\;\;\;e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)} \cdot t\_0\\
\mathbf{elif}\;y.re \leq 6.5 \cdot 10^{-13}:\\
\;\;\;\;\frac{\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)}{e^{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}}\\
\mathbf{elif}\;y.re \leq 6.2 \cdot 10^{+190}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot \sin \left(y.re \cdot \sqrt[3]{{\tan^{-1}_* \frac{x.im}{x.re}}^{3}}\right)\\
\end{array}
\end{array}
if y.re < -2.5499999999999998 or 6.49999999999999957e-13 < y.re < 6.2000000000000003e190Initial program 40.1%
fmm-def40.1%
hypot-define40.1%
distribute-rgt-neg-out40.1%
fma-define42.1%
hypot-define73.1%
*-commutative73.1%
Simplified73.1%
Taylor expanded in y.im around 0 64.3%
unpow264.3%
unpow264.3%
hypot-undefine65.3%
Simplified65.3%
if -2.5499999999999998 < y.re < -2.80000000000000023e-135Initial program 26.7%
fma-define26.7%
hypot-define34.8%
*-commutative34.8%
add-sqr-sqrt13.7%
sqrt-unprod35.0%
pow235.0%
Applied egg-rr35.0%
Taylor expanded in y.re around 0 52.9%
neg-mul-152.9%
Simplified52.9%
Taylor expanded in y.im around 0 64.4%
*-commutative64.4%
Simplified64.4%
if -2.80000000000000023e-135 < y.re < 6.49999999999999957e-13Initial program 49.0%
exp-diff49.0%
exp-to-pow49.0%
hypot-define49.0%
*-commutative49.0%
exp-prod48.0%
fma-define48.0%
hypot-define82.1%
*-commutative82.1%
Simplified82.1%
Taylor expanded in y.re around 0 45.8%
unpow245.8%
unpow245.8%
hypot-undefine74.4%
Simplified74.4%
if 6.2000000000000003e190 < y.re Initial program 34.6%
fmm-def34.6%
hypot-define34.6%
distribute-rgt-neg-out34.6%
fma-define34.6%
hypot-define53.8%
*-commutative53.8%
Simplified53.8%
Taylor expanded in y.im around 0 50.0%
unpow250.0%
unpow250.0%
hypot-undefine50.0%
Simplified50.0%
add-cbrt-cube73.1%
pow373.1%
Applied egg-rr73.1%
Final simplification69.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 (* t_0 (pow (hypot x.im x.re) y.re))))
(if (<= y.re -0.12)
t_1
(if (<= y.re -1.8e-135)
(* (exp (* (atan2 x.im x.re) (- y.im))) t_0)
(if (<= y.re 7.8e-13)
(/
(sin (* y.im (log (hypot x.im x.re))))
(exp (* y.im (atan2 x.im x.re))))
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 = t_0 * pow(hypot(x_46_im, x_46_re), y_46_re);
double tmp;
if (y_46_re <= -0.12) {
tmp = t_1;
} else if (y_46_re <= -1.8e-135) {
tmp = exp((atan2(x_46_im, x_46_re) * -y_46_im)) * t_0;
} else if (y_46_re <= 7.8e-13) {
tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) / exp((y_46_im * atan2(x_46_im, x_46_re)));
} 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 = t_0 * Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
double tmp;
if (y_46_re <= -0.12) {
tmp = t_1;
} else if (y_46_re <= -1.8e-135) {
tmp = Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im)) * t_0;
} else if (y_46_re <= 7.8e-13) {
tmp = Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re)))) / Math.exp((y_46_im * Math.atan2(x_46_im, x_46_re)));
} 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 = t_0 * math.pow(math.hypot(x_46_im, x_46_re), y_46_re) tmp = 0 if y_46_re <= -0.12: tmp = t_1 elif y_46_re <= -1.8e-135: tmp = math.exp((math.atan2(x_46_im, x_46_re) * -y_46_im)) * t_0 elif y_46_re <= 7.8e-13: tmp = math.sin((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) / math.exp((y_46_im * math.atan2(x_46_im, x_46_re))) 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(t_0 * (hypot(x_46_im, x_46_re) ^ y_46_re)) tmp = 0.0 if (y_46_re <= -0.12) tmp = t_1; elseif (y_46_re <= -1.8e-135) tmp = Float64(exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))) * t_0); elseif (y_46_re <= 7.8e-13) tmp = Float64(sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) / exp(Float64(y_46_im * atan(x_46_im, x_46_re)))); 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 = t_0 * (hypot(x_46_im, x_46_re) ^ y_46_re); tmp = 0.0; if (y_46_re <= -0.12) tmp = t_1; elseif (y_46_re <= -1.8e-135) tmp = exp((atan2(x_46_im, x_46_re) * -y_46_im)) * t_0; elseif (y_46_re <= 7.8e-13) tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) / exp((y_46_im * atan2(x_46_im, x_46_re))); 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[(t$95$0 * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -0.12], t$95$1, If[LessEqual[y$46$re, -1.8e-135], N[(N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision] * t$95$0), $MachinePrecision], If[LessEqual[y$46$re, 7.8e-13], N[(N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Exp[N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 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 := t\_0 \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{if}\;y.re \leq -0.12:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y.re \leq -1.8 \cdot 10^{-135}:\\
\;\;\;\;e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)} \cdot t\_0\\
\mathbf{elif}\;y.re \leq 7.8 \cdot 10^{-13}:\\
\;\;\;\;\frac{\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)}{e^{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y.re < -0.12 or 7.80000000000000009e-13 < y.re Initial program 38.9%
fmm-def38.9%
hypot-define38.9%
distribute-rgt-neg-out38.9%
fma-define40.5%
hypot-define69.1%
*-commutative69.1%
Simplified69.1%
Taylor expanded in y.im around 0 61.3%
unpow261.3%
unpow261.3%
hypot-undefine62.1%
Simplified62.1%
if -0.12 < y.re < -1.79999999999999989e-135Initial program 26.7%
fma-define26.7%
hypot-define34.8%
*-commutative34.8%
add-sqr-sqrt13.7%
sqrt-unprod35.0%
pow235.0%
Applied egg-rr35.0%
Taylor expanded in y.re around 0 52.9%
neg-mul-152.9%
Simplified52.9%
Taylor expanded in y.im around 0 64.4%
*-commutative64.4%
Simplified64.4%
if -1.79999999999999989e-135 < y.re < 7.80000000000000009e-13Initial program 49.0%
exp-diff49.0%
exp-to-pow49.0%
hypot-define49.0%
*-commutative49.0%
exp-prod48.0%
fma-define48.0%
hypot-define82.1%
*-commutative82.1%
Simplified82.1%
Taylor expanded in y.re around 0 45.8%
unpow245.8%
unpow245.8%
hypot-undefine74.4%
Simplified74.4%
Final simplification67.2%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (sin (* y.re (atan2 x.im x.re)))))
(if (or (<= y.im -0.00048) (not (<= y.im 22000000000000.0)))
(* (exp (* (atan2 x.im x.re) (- y.im))) t_0)
(* t_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 = sin((y_46_re * atan2(x_46_im, x_46_re)));
double tmp;
if ((y_46_im <= -0.00048) || !(y_46_im <= 22000000000000.0)) {
tmp = exp((atan2(x_46_im, x_46_re) * -y_46_im)) * t_0;
} else {
tmp = t_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 = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
double tmp;
if ((y_46_im <= -0.00048) || !(y_46_im <= 22000000000000.0)) {
tmp = Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im)) * t_0;
} else {
tmp = t_0 * 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 = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) tmp = 0 if (y_46_im <= -0.00048) or not (y_46_im <= 22000000000000.0): tmp = math.exp((math.atan2(x_46_im, x_46_re) * -y_46_im)) * t_0 else: tmp = t_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 = sin(Float64(y_46_re * atan(x_46_im, x_46_re))) tmp = 0.0 if ((y_46_im <= -0.00048) || !(y_46_im <= 22000000000000.0)) tmp = Float64(exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))) * t_0); else tmp = Float64(t_0 * (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 = sin((y_46_re * atan2(x_46_im, x_46_re))); tmp = 0.0; if ((y_46_im <= -0.00048) || ~((y_46_im <= 22000000000000.0))) tmp = exp((atan2(x_46_im, x_46_re) * -y_46_im)) * t_0; else tmp = t_0 * (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[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[Or[LessEqual[y$46$im, -0.00048], N[Not[LessEqual[y$46$im, 22000000000000.0]], $MachinePrecision]], N[(N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision] * t$95$0), $MachinePrecision], N[(t$95$0 * 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 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{if}\;y.im \leq -0.00048 \lor \neg \left(y.im \leq 22000000000000\right):\\
\;\;\;\;e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)} \cdot t\_0\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\end{array}
\end{array}
if y.im < -4.80000000000000012e-4 or 2.2e13 < y.im Initial program 34.2%
fma-define35.6%
hypot-define51.3%
*-commutative51.3%
add-sqr-sqrt27.9%
sqrt-unprod57.2%
pow257.2%
Applied egg-rr57.2%
Taylor expanded in y.re around 0 64.3%
neg-mul-164.3%
Simplified64.3%
Taylor expanded in y.im around 0 59.8%
*-commutative59.8%
Simplified59.8%
if -4.80000000000000012e-4 < y.im < 2.2e13Initial program 50.0%
fmm-def50.0%
hypot-define50.0%
distribute-rgt-neg-out50.0%
fma-define50.0%
hypot-define87.0%
*-commutative87.0%
Simplified87.0%
Taylor expanded in y.im around 0 48.1%
unpow248.1%
unpow248.1%
hypot-undefine57.3%
Simplified57.3%
Final simplification58.7%
(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 -115000.0) (not (<= y.im 8.0)))
(log (+ 1.0 (expm1 t_0)))
(* (sin t_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_re * atan2(x_46_im, x_46_re);
double tmp;
if ((y_46_im <= -115000.0) || !(y_46_im <= 8.0)) {
tmp = log((1.0 + expm1(t_0)));
} else {
tmp = sin(t_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_re * Math.atan2(x_46_im, x_46_re);
double tmp;
if ((y_46_im <= -115000.0) || !(y_46_im <= 8.0)) {
tmp = Math.log((1.0 + Math.expm1(t_0)));
} else {
tmp = Math.sin(t_0) * 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_re * math.atan2(x_46_im, x_46_re) tmp = 0 if (y_46_im <= -115000.0) or not (y_46_im <= 8.0): tmp = math.log((1.0 + math.expm1(t_0))) else: tmp = math.sin(t_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_re * atan(x_46_im, x_46_re)) tmp = 0.0 if ((y_46_im <= -115000.0) || !(y_46_im <= 8.0)) tmp = log(Float64(1.0 + expm1(t_0))); else tmp = Float64(sin(t_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$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[y$46$im, -115000.0], N[Not[LessEqual[y$46$im, 8.0]], $MachinePrecision]], N[Log[N[(1.0 + N[(Exp[t$95$0] - 1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[Sin[t$95$0], $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.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.im \leq -115000 \lor \neg \left(y.im \leq 8\right):\\
\;\;\;\;\log \left(1 + \mathsf{expm1}\left(t\_0\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\sin t\_0 \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\end{array}
\end{array}
if y.im < -115000 or 8 < y.im Initial program 33.4%
fmm-def33.4%
hypot-define33.4%
distribute-rgt-neg-out33.4%
fma-define34.8%
hypot-define64.0%
*-commutative64.0%
Simplified64.0%
Taylor expanded in y.im around 0 29.5%
unpow229.5%
unpow229.5%
hypot-undefine23.5%
Simplified23.5%
Taylor expanded in y.re around 0 5.3%
*-commutative5.3%
log1p-expm1-u17.0%
log1p-undefine38.5%
*-commutative38.5%
Applied egg-rr38.5%
if -115000 < y.im < 8Initial program 50.6%
fmm-def50.6%
hypot-define50.6%
distribute-rgt-neg-out50.6%
fma-define50.6%
hypot-define87.2%
*-commutative87.2%
Simplified87.2%
Taylor expanded in y.im around 0 47.4%
unpow247.4%
unpow247.4%
hypot-undefine56.4%
Simplified56.4%
Final simplification46.9%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re))))
(if (<= y.im -35000000000.0)
(log (+ 1.0 (expm1 t_0)))
(if (<= y.im 1020000000000.0)
(* (sin t_0) (pow (hypot x.im x.re) y.re))
(/ (sin (* y.im (log x.im))) (exp (* y.im (atan2 x.im x.re))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if (y_46_im <= -35000000000.0) {
tmp = log((1.0 + expm1(t_0)));
} else if (y_46_im <= 1020000000000.0) {
tmp = sin(t_0) * pow(hypot(x_46_im, x_46_re), y_46_re);
} else {
tmp = sin((y_46_im * log(x_46_im))) / exp((y_46_im * atan2(x_46_im, x_46_re)));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
double tmp;
if (y_46_im <= -35000000000.0) {
tmp = Math.log((1.0 + Math.expm1(t_0)));
} else if (y_46_im <= 1020000000000.0) {
tmp = Math.sin(t_0) * Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
} else {
tmp = Math.sin((y_46_im * Math.log(x_46_im))) / Math.exp((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 = y_46_re * math.atan2(x_46_im, x_46_re) tmp = 0 if y_46_im <= -35000000000.0: tmp = math.log((1.0 + math.expm1(t_0))) elif y_46_im <= 1020000000000.0: tmp = math.sin(t_0) * math.pow(math.hypot(x_46_im, x_46_re), y_46_re) else: tmp = math.sin((y_46_im * math.log(x_46_im))) / math.exp((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 = Float64(y_46_re * atan(x_46_im, x_46_re)) tmp = 0.0 if (y_46_im <= -35000000000.0) tmp = log(Float64(1.0 + expm1(t_0))); elseif (y_46_im <= 1020000000000.0) tmp = Float64(sin(t_0) * (hypot(x_46_im, x_46_re) ^ y_46_re)); else tmp = Float64(sin(Float64(y_46_im * log(x_46_im))) / exp(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[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -35000000000.0], N[Log[N[(1.0 + N[(Exp[t$95$0] - 1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[y$46$im, 1020000000000.0], N[(N[Sin[t$95$0], $MachinePrecision] * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], N[(N[Sin[N[(y$46$im * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Exp[N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.im \leq -35000000000:\\
\;\;\;\;\log \left(1 + \mathsf{expm1}\left(t\_0\right)\right)\\
\mathbf{elif}\;y.im \leq 1020000000000:\\
\;\;\;\;\sin t\_0 \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sin \left(y.im \cdot \log x.im\right)}{e^{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}}\\
\end{array}
\end{array}
if y.im < -3.5e10Initial program 43.5%
fmm-def43.5%
hypot-define43.5%
distribute-rgt-neg-out43.5%
fma-define45.0%
hypot-define66.0%
*-commutative66.0%
Simplified66.0%
Taylor expanded in y.im around 0 30.6%
unpow230.6%
unpow230.6%
hypot-undefine24.5%
Simplified24.5%
Taylor expanded in y.re around 0 6.2%
*-commutative6.2%
log1p-expm1-u16.7%
log1p-undefine42.3%
*-commutative42.3%
Applied egg-rr42.3%
if -3.5e10 < y.im < 1.02e12Initial program 50.2%
fmm-def50.2%
hypot-define50.2%
distribute-rgt-neg-out50.2%
fma-define50.2%
hypot-define87.1%
*-commutative87.1%
Simplified87.1%
Taylor expanded in y.im around 0 47.0%
unpow247.0%
unpow247.0%
hypot-undefine56.0%
Simplified56.0%
if 1.02e12 < y.im Initial program 25.0%
exp-diff20.9%
exp-to-pow20.9%
hypot-define20.9%
*-commutative20.9%
exp-prod20.9%
fma-define20.9%
hypot-define49.4%
*-commutative49.4%
Simplified49.4%
Taylor expanded in x.re around 0 32.8%
add-exp-log17.4%
Applied egg-rr17.4%
Taylor expanded in y.re around 0 38.4%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re))))
(if (or (<= y.re -5.8e+16) (not (<= y.re 5.5e+37)))
(*
(sin t_0)
(pow (* x.im (+ 1.0 (* 0.5 (* (/ x.re x.im) (/ x.re x.im))))) y.re))
(log (+ 1.0 (expm1 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 <= -5.8e+16) || !(y_46_re <= 5.5e+37)) {
tmp = sin(t_0) * pow((x_46_im * (1.0 + (0.5 * ((x_46_re / x_46_im) * (x_46_re / x_46_im))))), y_46_re);
} else {
tmp = log((1.0 + expm1(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 = y_46_re * Math.atan2(x_46_im, x_46_re);
double tmp;
if ((y_46_re <= -5.8e+16) || !(y_46_re <= 5.5e+37)) {
tmp = Math.sin(t_0) * Math.pow((x_46_im * (1.0 + (0.5 * ((x_46_re / x_46_im) * (x_46_re / x_46_im))))), y_46_re);
} else {
tmp = Math.log((1.0 + Math.expm1(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 <= -5.8e+16) or not (y_46_re <= 5.5e+37): tmp = math.sin(t_0) * math.pow((x_46_im * (1.0 + (0.5 * ((x_46_re / x_46_im) * (x_46_re / x_46_im))))), y_46_re) else: tmp = math.log((1.0 + math.expm1(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 <= -5.8e+16) || !(y_46_re <= 5.5e+37)) tmp = Float64(sin(t_0) * (Float64(x_46_im * Float64(1.0 + Float64(0.5 * Float64(Float64(x_46_re / x_46_im) * Float64(x_46_re / x_46_im))))) ^ y_46_re)); else tmp = log(Float64(1.0 + expm1(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]}, If[Or[LessEqual[y$46$re, -5.8e+16], N[Not[LessEqual[y$46$re, 5.5e+37]], $MachinePrecision]], N[(N[Sin[t$95$0], $MachinePrecision] * N[Power[N[(x$46$im * N[(1.0 + N[(0.5 * N[(N[(x$46$re / x$46$im), $MachinePrecision] * N[(x$46$re / x$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], N[Log[N[(1.0 + N[(Exp[t$95$0] - 1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.re \leq -5.8 \cdot 10^{+16} \lor \neg \left(y.re \leq 5.5 \cdot 10^{+37}\right):\\
\;\;\;\;\sin t\_0 \cdot {\left(x.im \cdot \left(1 + 0.5 \cdot \left(\frac{x.re}{x.im} \cdot \frac{x.re}{x.im}\right)\right)\right)}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;\log \left(1 + \mathsf{expm1}\left(t\_0\right)\right)\\
\end{array}
\end{array}
if y.re < -5.8e16 or 5.50000000000000016e37 < y.re Initial program 37.6%
fmm-def37.6%
hypot-define37.6%
distribute-rgt-neg-out37.6%
fma-define39.4%
hypot-define70.6%
*-commutative70.6%
Simplified70.6%
Taylor expanded in y.im around 0 66.2%
unpow266.2%
unpow266.2%
hypot-undefine66.2%
Simplified66.2%
Taylor expanded in x.im around inf 50.7%
add-sqr-sqrt50.7%
sqrt-div50.7%
sqrt-pow150.7%
metadata-eval50.7%
pow150.7%
sqrt-pow150.7%
metadata-eval50.7%
pow150.7%
sqrt-div50.7%
sqrt-pow156.3%
metadata-eval56.3%
pow156.3%
sqrt-pow160.8%
metadata-eval60.8%
pow160.8%
Applied egg-rr60.8%
if -5.8e16 < y.re < 5.50000000000000016e37Initial program 44.3%
fmm-def44.3%
hypot-define44.3%
distribute-rgt-neg-out44.3%
fma-define44.3%
hypot-define78.0%
*-commutative78.0%
Simplified78.0%
Taylor expanded in y.im around 0 16.9%
unpow216.9%
unpow216.9%
hypot-undefine18.7%
Simplified18.7%
Taylor expanded in y.re around 0 15.4%
*-commutative15.4%
log1p-expm1-u18.7%
log1p-undefine29.2%
*-commutative29.2%
Applied egg-rr29.2%
Final simplification42.7%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re))))
(if (or (<= y.im -3e-24) (not (<= y.im 2.7e-18)))
(log (+ 1.0 (expm1 t_0)))
(* (sin t_0) (pow x.im y.re)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if ((y_46_im <= -3e-24) || !(y_46_im <= 2.7e-18)) {
tmp = log((1.0 + expm1(t_0)));
} else {
tmp = sin(t_0) * pow(x_46_im, y_46_re);
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
double tmp;
if ((y_46_im <= -3e-24) || !(y_46_im <= 2.7e-18)) {
tmp = Math.log((1.0 + Math.expm1(t_0)));
} else {
tmp = Math.sin(t_0) * Math.pow(x_46_im, y_46_re);
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = y_46_re * math.atan2(x_46_im, x_46_re) tmp = 0 if (y_46_im <= -3e-24) or not (y_46_im <= 2.7e-18): tmp = math.log((1.0 + math.expm1(t_0))) else: tmp = math.sin(t_0) * math.pow(x_46_im, y_46_re) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) tmp = 0.0 if ((y_46_im <= -3e-24) || !(y_46_im <= 2.7e-18)) tmp = log(Float64(1.0 + expm1(t_0))); else tmp = Float64(sin(t_0) * (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, -3e-24], N[Not[LessEqual[y$46$im, 2.7e-18]], $MachinePrecision]], N[Log[N[(1.0 + N[(Exp[t$95$0] - 1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[Sin[t$95$0], $MachinePrecision] * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.im \leq -3 \cdot 10^{-24} \lor \neg \left(y.im \leq 2.7 \cdot 10^{-18}\right):\\
\;\;\;\;\log \left(1 + \mathsf{expm1}\left(t\_0\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\sin t\_0 \cdot {x.im}^{y.re}\\
\end{array}
\end{array}
if y.im < -2.99999999999999995e-24 or 2.69999999999999989e-18 < y.im Initial program 35.2%
fmm-def35.2%
hypot-define35.2%
distribute-rgt-neg-out35.2%
fma-define36.6%
hypot-define66.1%
*-commutative66.1%
Simplified66.1%
Taylor expanded in y.im around 0 28.6%
unpow228.6%
unpow228.6%
hypot-undefine23.2%
Simplified23.2%
Taylor expanded in y.re around 0 5.1%
*-commutative5.1%
log1p-expm1-u15.9%
log1p-undefine36.3%
*-commutative36.3%
Applied egg-rr36.3%
if -2.99999999999999995e-24 < y.im < 2.69999999999999989e-18Initial program 50.0%
fmm-def50.0%
hypot-define50.0%
distribute-rgt-neg-out50.0%
fma-define50.0%
hypot-define86.9%
*-commutative86.9%
Simplified86.9%
Taylor expanded in y.im around 0 50.6%
unpow250.6%
unpow250.6%
hypot-undefine60.5%
Simplified60.5%
Taylor expanded in x.re around 0 44.9%
Final simplification39.9%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (expm1 (* y.re (atan2 x.im x.re)))))
(if (or (<= y.im -5.6e-29) (not (<= y.im 5.2e-50)))
(log (+ 1.0 t_0))
(log1p t_0))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = expm1((y_46_re * atan2(x_46_im, x_46_re)));
double tmp;
if ((y_46_im <= -5.6e-29) || !(y_46_im <= 5.2e-50)) {
tmp = log((1.0 + t_0));
} else {
tmp = log1p(t_0);
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.expm1((y_46_re * Math.atan2(x_46_im, x_46_re)));
double tmp;
if ((y_46_im <= -5.6e-29) || !(y_46_im <= 5.2e-50)) {
tmp = Math.log((1.0 + t_0));
} else {
tmp = Math.log1p(t_0);
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.expm1((y_46_re * math.atan2(x_46_im, x_46_re))) tmp = 0 if (y_46_im <= -5.6e-29) or not (y_46_im <= 5.2e-50): tmp = math.log((1.0 + t_0)) else: tmp = math.log1p(t_0) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = expm1(Float64(y_46_re * atan(x_46_im, x_46_re))) tmp = 0.0 if ((y_46_im <= -5.6e-29) || !(y_46_im <= 5.2e-50)) tmp = log(Float64(1.0 + t_0)); else tmp = log1p(t_0); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(Exp[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]] - 1), $MachinePrecision]}, If[Or[LessEqual[y$46$im, -5.6e-29], N[Not[LessEqual[y$46$im, 5.2e-50]], $MachinePrecision]], N[Log[N[(1.0 + t$95$0), $MachinePrecision]], $MachinePrecision], N[Log[1 + t$95$0], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \mathsf{expm1}\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{if}\;y.im \leq -5.6 \cdot 10^{-29} \lor \neg \left(y.im \leq 5.2 \cdot 10^{-50}\right):\\
\;\;\;\;\log \left(1 + t\_0\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{log1p}\left(t\_0\right)\\
\end{array}
\end{array}
if y.im < -5.6000000000000005e-29 or 5.2000000000000003e-50 < y.im Initial program 37.5%
fmm-def37.5%
hypot-define37.5%
distribute-rgt-neg-out37.5%
fma-define38.8%
hypot-define67.6%
*-commutative67.6%
Simplified67.6%
Taylor expanded in y.im around 0 30.6%
unpow230.6%
unpow230.6%
hypot-undefine25.4%
Simplified25.4%
Taylor expanded in y.re around 0 5.1%
*-commutative5.1%
log1p-expm1-u15.4%
log1p-undefine36.6%
*-commutative36.6%
Applied egg-rr36.6%
if -5.6000000000000005e-29 < y.im < 5.2000000000000003e-50Initial program 47.5%
fmm-def47.5%
hypot-define47.5%
distribute-rgt-neg-out47.5%
fma-define47.5%
hypot-define86.0%
*-commutative86.0%
Simplified86.0%
Taylor expanded in y.im around 0 49.0%
unpow249.0%
unpow249.0%
hypot-undefine59.7%
Simplified59.7%
Taylor expanded in y.re around 0 20.1%
log1p-expm1-u29.3%
Applied egg-rr29.3%
Final simplification33.7%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re))))
(if (<= y.im -6.5e-28)
(+ (+ t_0 1.0) -1.0)
(if (<= y.im 6.5e-86) (log1p (expm1 t_0)) (cbrt (pow t_0 3.0))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if (y_46_im <= -6.5e-28) {
tmp = (t_0 + 1.0) + -1.0;
} else if (y_46_im <= 6.5e-86) {
tmp = log1p(expm1(t_0));
} else {
tmp = cbrt(pow(t_0, 3.0));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
double tmp;
if (y_46_im <= -6.5e-28) {
tmp = (t_0 + 1.0) + -1.0;
} else if (y_46_im <= 6.5e-86) {
tmp = Math.log1p(Math.expm1(t_0));
} else {
tmp = Math.cbrt(Math.pow(t_0, 3.0));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) tmp = 0.0 if (y_46_im <= -6.5e-28) tmp = Float64(Float64(t_0 + 1.0) + -1.0); elseif (y_46_im <= 6.5e-86) tmp = log1p(expm1(t_0)); else tmp = cbrt((t_0 ^ 3.0)); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -6.5e-28], N[(N[(t$95$0 + 1.0), $MachinePrecision] + -1.0), $MachinePrecision], If[LessEqual[y$46$im, 6.5e-86], N[Log[1 + N[(Exp[t$95$0] - 1), $MachinePrecision]], $MachinePrecision], N[Power[N[Power[t$95$0, 3.0], $MachinePrecision], 1/3], $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.im \leq -6.5 \cdot 10^{-28}:\\
\;\;\;\;\left(t\_0 + 1\right) + -1\\
\mathbf{elif}\;y.im \leq 6.5 \cdot 10^{-86}:\\
\;\;\;\;\mathsf{log1p}\left(\mathsf{expm1}\left(t\_0\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\sqrt[3]{{t\_0}^{3}}\\
\end{array}
\end{array}
if y.im < -6.50000000000000043e-28Initial program 45.4%
fmm-def45.4%
hypot-define45.4%
distribute-rgt-neg-out45.4%
fma-define46.8%
hypot-define70.3%
*-commutative70.3%
Simplified70.3%
Taylor expanded in y.im around 0 30.8%
unpow230.8%
unpow230.8%
hypot-undefine25.7%
Simplified25.7%
Taylor expanded in y.re around 0 5.9%
*-commutative5.9%
expm1-log1p-u5.6%
expm1-undefine30.1%
*-commutative30.1%
Applied egg-rr30.1%
Taylor expanded in y.re around 0 30.4%
*-commutative30.4%
Simplified30.4%
if -6.50000000000000043e-28 < y.im < 6.50000000000000028e-86Initial program 46.9%
fmm-def46.9%
hypot-define46.9%
distribute-rgt-neg-out46.9%
fma-define46.9%
hypot-define86.6%
*-commutative86.6%
Simplified86.6%
Taylor expanded in y.im around 0 50.4%
unpow250.4%
unpow250.4%
hypot-undefine61.4%
Simplified61.4%
Taylor expanded in y.re around 0 20.5%
log1p-expm1-u30.1%
Applied egg-rr30.1%
if 6.50000000000000028e-86 < y.im Initial program 31.7%
fmm-def31.7%
hypot-define31.7%
distribute-rgt-neg-out31.7%
fma-define32.9%
hypot-define65.2%
*-commutative65.2%
Simplified65.2%
Taylor expanded in y.im around 0 29.5%
unpow229.5%
unpow229.5%
hypot-undefine24.4%
Simplified24.4%
Taylor expanded in y.re around 0 4.3%
*-commutative4.3%
add-cbrt-cube22.9%
pow322.9%
*-commutative22.9%
Applied egg-rr22.9%
Final simplification27.8%
(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 -1.18e-27) (not (<= y.im 1.95e-50)))
(+ (+ t_0 1.0) -1.0)
(log1p (expm1 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_im <= -1.18e-27) || !(y_46_im <= 1.95e-50)) {
tmp = (t_0 + 1.0) + -1.0;
} else {
tmp = log1p(expm1(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 = y_46_re * Math.atan2(x_46_im, x_46_re);
double tmp;
if ((y_46_im <= -1.18e-27) || !(y_46_im <= 1.95e-50)) {
tmp = (t_0 + 1.0) + -1.0;
} else {
tmp = Math.log1p(Math.expm1(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_im <= -1.18e-27) or not (y_46_im <= 1.95e-50): tmp = (t_0 + 1.0) + -1.0 else: tmp = math.log1p(math.expm1(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_im <= -1.18e-27) || !(y_46_im <= 1.95e-50)) tmp = Float64(Float64(t_0 + 1.0) + -1.0); else tmp = log1p(expm1(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]}, If[Or[LessEqual[y$46$im, -1.18e-27], N[Not[LessEqual[y$46$im, 1.95e-50]], $MachinePrecision]], N[(N[(t$95$0 + 1.0), $MachinePrecision] + -1.0), $MachinePrecision], N[Log[1 + N[(Exp[t$95$0] - 1), $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 -1.18 \cdot 10^{-27} \lor \neg \left(y.im \leq 1.95 \cdot 10^{-50}\right):\\
\;\;\;\;\left(t\_0 + 1\right) + -1\\
\mathbf{else}:\\
\;\;\;\;\mathsf{log1p}\left(\mathsf{expm1}\left(t\_0\right)\right)\\
\end{array}
\end{array}
if y.im < -1.18e-27 or 1.9500000000000001e-50 < y.im Initial program 37.5%
fmm-def37.5%
hypot-define37.5%
distribute-rgt-neg-out37.5%
fma-define38.8%
hypot-define67.6%
*-commutative67.6%
Simplified67.6%
Taylor expanded in y.im around 0 30.6%
unpow230.6%
unpow230.6%
hypot-undefine25.4%
Simplified25.4%
Taylor expanded in y.re around 0 5.1%
*-commutative5.1%
expm1-log1p-u4.7%
expm1-undefine26.0%
*-commutative26.0%
Applied egg-rr26.0%
Taylor expanded in y.re around 0 26.3%
*-commutative26.3%
Simplified26.3%
if -1.18e-27 < y.im < 1.9500000000000001e-50Initial program 47.5%
fmm-def47.5%
hypot-define47.5%
distribute-rgt-neg-out47.5%
fma-define47.5%
hypot-define86.0%
*-commutative86.0%
Simplified86.0%
Taylor expanded in y.im around 0 49.0%
unpow249.0%
unpow249.0%
hypot-undefine59.7%
Simplified59.7%
Taylor expanded in y.re around 0 20.1%
log1p-expm1-u29.3%
Applied egg-rr29.3%
Final simplification27.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 -9.5e-28) (not (<= y.im 9e-51)))
(+ (+ t_0 1.0) -1.0)
(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 tmp;
if ((y_46_im <= -9.5e-28) || !(y_46_im <= 9e-51)) {
tmp = (t_0 + 1.0) + -1.0;
} else {
tmp = sin(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_46im <= (-9.5d-28)) .or. (.not. (y_46im <= 9d-51))) then
tmp = (t_0 + 1.0d0) + (-1.0d0)
else
tmp = sin(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_im <= -9.5e-28) || !(y_46_im <= 9e-51)) {
tmp = (t_0 + 1.0) + -1.0;
} else {
tmp = Math.sin(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_im <= -9.5e-28) or not (y_46_im <= 9e-51): tmp = (t_0 + 1.0) + -1.0 else: tmp = math.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)) tmp = 0.0 if ((y_46_im <= -9.5e-28) || !(y_46_im <= 9e-51)) tmp = Float64(Float64(t_0 + 1.0) + -1.0); else tmp = sin(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_im <= -9.5e-28) || ~((y_46_im <= 9e-51))) tmp = (t_0 + 1.0) + -1.0; else tmp = sin(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$im, -9.5e-28], N[Not[LessEqual[y$46$im, 9e-51]], $MachinePrecision]], N[(N[(t$95$0 + 1.0), $MachinePrecision] + -1.0), $MachinePrecision], N[Sin[t$95$0], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.im \leq -9.5 \cdot 10^{-28} \lor \neg \left(y.im \leq 9 \cdot 10^{-51}\right):\\
\;\;\;\;\left(t\_0 + 1\right) + -1\\
\mathbf{else}:\\
\;\;\;\;\sin t\_0\\
\end{array}
\end{array}
if y.im < -9.50000000000000001e-28 or 8.99999999999999948e-51 < y.im Initial program 37.5%
fmm-def37.5%
hypot-define37.5%
distribute-rgt-neg-out37.5%
fma-define38.8%
hypot-define67.6%
*-commutative67.6%
Simplified67.6%
Taylor expanded in y.im around 0 30.6%
unpow230.6%
unpow230.6%
hypot-undefine25.4%
Simplified25.4%
Taylor expanded in y.re around 0 5.1%
*-commutative5.1%
expm1-log1p-u4.7%
expm1-undefine26.0%
*-commutative26.0%
Applied egg-rr26.0%
Taylor expanded in y.re around 0 26.3%
*-commutative26.3%
Simplified26.3%
if -9.50000000000000001e-28 < y.im < 8.99999999999999948e-51Initial program 47.5%
fmm-def47.5%
hypot-define47.5%
distribute-rgt-neg-out47.5%
fma-define47.5%
hypot-define86.0%
*-commutative86.0%
Simplified86.0%
Taylor expanded in y.im around 0 49.0%
unpow249.0%
unpow249.0%
hypot-undefine59.7%
Simplified59.7%
Taylor expanded in x.im around inf 36.6%
Taylor expanded in y.re around 0 20.3%
Taylor expanded in y.re around inf 20.3%
*-commutative20.3%
Simplified20.3%
Final simplification23.9%
(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 -7e-28) (not (<= y.im 1.75e-59)))
(+ (+ t_0 1.0) -1.0)
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_im <= -7e-28) || !(y_46_im <= 1.75e-59)) {
tmp = (t_0 + 1.0) + -1.0;
} 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_46im <= (-7d-28)) .or. (.not. (y_46im <= 1.75d-59))) then
tmp = (t_0 + 1.0d0) + (-1.0d0)
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_im <= -7e-28) || !(y_46_im <= 1.75e-59)) {
tmp = (t_0 + 1.0) + -1.0;
} 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_im <= -7e-28) or not (y_46_im <= 1.75e-59): tmp = (t_0 + 1.0) + -1.0 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_im <= -7e-28) || !(y_46_im <= 1.75e-59)) tmp = Float64(Float64(t_0 + 1.0) + -1.0); 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_im <= -7e-28) || ~((y_46_im <= 1.75e-59))) tmp = (t_0 + 1.0) + -1.0; 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$im, -7e-28], N[Not[LessEqual[y$46$im, 1.75e-59]], $MachinePrecision]], N[(N[(t$95$0 + 1.0), $MachinePrecision] + -1.0), $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.im \leq -7 \cdot 10^{-28} \lor \neg \left(y.im \leq 1.75 \cdot 10^{-59}\right):\\
\;\;\;\;\left(t\_0 + 1\right) + -1\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if y.im < -6.9999999999999999e-28 or 1.75e-59 < y.im Initial program 37.5%
fmm-def37.5%
hypot-define37.5%
distribute-rgt-neg-out37.5%
fma-define38.8%
hypot-define67.6%
*-commutative67.6%
Simplified67.6%
Taylor expanded in y.im around 0 30.6%
unpow230.6%
unpow230.6%
hypot-undefine25.4%
Simplified25.4%
Taylor expanded in y.re around 0 5.1%
*-commutative5.1%
expm1-log1p-u4.7%
expm1-undefine26.0%
*-commutative26.0%
Applied egg-rr26.0%
Taylor expanded in y.re around 0 26.3%
*-commutative26.3%
Simplified26.3%
if -6.9999999999999999e-28 < y.im < 1.75e-59Initial program 47.5%
fmm-def47.5%
hypot-define47.5%
distribute-rgt-neg-out47.5%
fma-define47.5%
hypot-define86.0%
*-commutative86.0%
Simplified86.0%
Taylor expanded in y.im around 0 49.0%
unpow249.0%
unpow249.0%
hypot-undefine59.7%
Simplified59.7%
Taylor expanded in y.re around 0 20.1%
Final simplification23.8%
(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 -7e-29) (not (<= y.im 1.1e-52)))
(+ 1.0 (+ t_0 -1.0))
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_im <= -7e-29) || !(y_46_im <= 1.1e-52)) {
tmp = 1.0 + (t_0 + -1.0);
} 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_46im <= (-7d-29)) .or. (.not. (y_46im <= 1.1d-52))) then
tmp = 1.0d0 + (t_0 + (-1.0d0))
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_im <= -7e-29) || !(y_46_im <= 1.1e-52)) {
tmp = 1.0 + (t_0 + -1.0);
} 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_im <= -7e-29) or not (y_46_im <= 1.1e-52): tmp = 1.0 + (t_0 + -1.0) 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_im <= -7e-29) || !(y_46_im <= 1.1e-52)) tmp = Float64(1.0 + Float64(t_0 + -1.0)); 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_im <= -7e-29) || ~((y_46_im <= 1.1e-52))) tmp = 1.0 + (t_0 + -1.0); 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$im, -7e-29], N[Not[LessEqual[y$46$im, 1.1e-52]], $MachinePrecision]], N[(1.0 + N[(t$95$0 + -1.0), $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.im \leq -7 \cdot 10^{-29} \lor \neg \left(y.im \leq 1.1 \cdot 10^{-52}\right):\\
\;\;\;\;1 + \left(t\_0 + -1\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if y.im < -6.9999999999999995e-29 or 1.10000000000000005e-52 < y.im Initial program 37.5%
fmm-def37.5%
hypot-define37.5%
distribute-rgt-neg-out37.5%
fma-define38.8%
hypot-define67.6%
*-commutative67.6%
Simplified67.6%
Taylor expanded in y.im around 0 30.6%
unpow230.6%
unpow230.6%
hypot-undefine25.4%
Simplified25.4%
Taylor expanded in y.re around 0 5.1%
*-commutative5.1%
expm1-log1p-u4.7%
expm1-undefine26.0%
*-commutative26.0%
Applied egg-rr26.0%
sub-neg26.0%
log1p-undefine26.0%
rem-exp-log26.3%
metadata-eval26.3%
Applied egg-rr26.3%
associate-+l+26.3%
*-commutative26.3%
Simplified26.3%
if -6.9999999999999995e-29 < y.im < 1.10000000000000005e-52Initial program 47.5%
fmm-def47.5%
hypot-define47.5%
distribute-rgt-neg-out47.5%
fma-define47.5%
hypot-define86.0%
*-commutative86.0%
Simplified86.0%
Taylor expanded in y.im around 0 49.0%
unpow249.0%
unpow249.0%
hypot-undefine59.7%
Simplified59.7%
Taylor expanded in y.re around 0 20.1%
Final simplification23.8%
(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 41.5%
fmm-def41.5%
hypot-define41.5%
distribute-rgt-neg-out41.5%
fma-define42.2%
hypot-define74.9%
*-commutative74.9%
Simplified74.9%
Taylor expanded in y.im around 0 37.9%
unpow237.9%
unpow237.9%
hypot-undefine38.9%
Simplified38.9%
Taylor expanded in y.re around 0 11.0%
herbie shell --seed 2024175
(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)))))