
(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 25 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (sqrt (+ (* x.re x.re) (* x.im x.im))))))
(*
(exp (- (* t_0 y.re) (* (atan2 x.im x.re) y.im)))
(sin (+ (* t_0 y.im) (* (atan2 x.im x.re) y.re))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
return exp(((t_0 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin(((t_0 * y_46_im) + (atan2(x_46_im, x_46_re) * y_46_re)));
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
t_0 = log(sqrt(((x_46re * x_46re) + (x_46im * x_46im))))
code = exp(((t_0 * y_46re) - (atan2(x_46im, x_46re) * y_46im))) * sin(((t_0 * y_46im) + (atan2(x_46im, x_46re) * y_46re)))
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
return Math.exp(((t_0 * y_46_re) - (Math.atan2(x_46_im, x_46_re) * y_46_im))) * Math.sin(((t_0 * y_46_im) + (Math.atan2(x_46_im, x_46_re) * y_46_re)));
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) return math.exp(((t_0 * y_46_re) - (math.atan2(x_46_im, x_46_re) * y_46_im))) * math.sin(((t_0 * y_46_im) + (math.atan2(x_46_im, x_46_re) * y_46_re)))
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) return Float64(exp(Float64(Float64(t_0 * y_46_re) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * sin(Float64(Float64(t_0 * y_46_im) + Float64(atan(x_46_im, x_46_re) * y_46_re)))) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))); tmp = exp(((t_0 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin(((t_0 * y_46_im) + (atan2(x_46_im, x_46_re) * y_46_re))); end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]}, N[(N[Exp[N[(N[(t$95$0 * y$46$re), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(N[(t$95$0 * y$46$im), $MachinePrecision] + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)\\
e^{t\_0 \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(t\_0 \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)
\end{array}
\end{array}
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re))) (t_1 (log (hypot x.re x.im))))
(if (<= y.im -2.15e+30)
(*
(exp
(-
(* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.re)
(* y.im (atan2 x.im x.re))))
(fabs (sin (fma y.im (log (hypot x.im x.re)) t_0))))
(*
(exp (fma t_1 y.re (* y.im (- (atan2 x.im x.re)))))
(sin (fma t_1 y.im t_0))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = 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 <= -2.15e+30) {
tmp = exp(((log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - (y_46_im * atan2(x_46_im, x_46_re)))) * fabs(sin(fma(y_46_im, log(hypot(x_46_im, x_46_re)), t_0)));
} else {
tmp = exp(fma(t_1, y_46_re, (y_46_im * -atan2(x_46_im, x_46_re)))) * sin(fma(t_1, y_46_im, t_0));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_1 = log(hypot(x_46_re, x_46_im)) tmp = 0.0 if (y_46_im <= -2.15e+30) tmp = Float64(exp(Float64(Float64(log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) * y_46_re) - Float64(y_46_im * atan(x_46_im, x_46_re)))) * abs(sin(fma(y_46_im, log(hypot(x_46_im, x_46_re)), t_0)))); else tmp = Float64(exp(fma(t_1, y_46_re, Float64(y_46_im * Float64(-atan(x_46_im, x_46_re))))) * sin(fma(t_1, y_46_im, t_0))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(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, -2.15e+30], N[(N[Exp[N[(N[(N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * y$46$re), $MachinePrecision] - N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Abs[N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision] + t$95$0), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Exp[N[(t$95$1 * y$46$re + N[(y$46$im * (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(t$95$1 * y$46$im + t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
\mathbf{if}\;y.im \leq -2.15 \cdot 10^{+30}:\\
\;\;\;\;e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \left|\sin \left(\mathsf{fma}\left(y.im, \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right), t\_0\right)\right)\right|\\
\mathbf{else}:\\
\;\;\;\;e^{\mathsf{fma}\left(t\_1, y.re, y.im \cdot \left(-\tan^{-1}_* \frac{x.im}{x.re}\right)\right)} \cdot \sin \left(\mathsf{fma}\left(t\_1, y.im, t\_0\right)\right)\\
\end{array}
\end{array}
if y.im < -2.15e30Initial program 48.1%
fma-define48.1%
hypot-define66.8%
*-commutative66.8%
add-sqr-sqrt33.4%
sqrt-unprod83.4%
pow283.4%
Applied egg-rr83.4%
unpow283.4%
rem-sqrt-square83.4%
fma-define83.4%
+-commutative83.4%
fma-define83.4%
hypot-undefine59.3%
unpow259.3%
unpow259.3%
+-commutative59.3%
unpow259.3%
unpow259.3%
hypot-undefine83.4%
*-commutative83.4%
Simplified83.4%
if -2.15e30 < y.im Initial program 35.5%
fmm-def35.5%
hypot-define35.5%
distribute-rgt-neg-out35.5%
fma-define35.5%
hypot-define88.0%
*-commutative88.0%
Simplified88.0%
Final simplification87.0%
(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 -5.5e+30)
(*
(exp
(-
(* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.re)
(* y.im (atan2 x.im x.re))))
(sin t_0))
(*
(exp (fma t_1 y.re (* y.im (- (atan2 x.im x.re)))))
(sin (fma t_1 y.im t_0))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = 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 <= -5.5e+30) {
tmp = exp(((log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - (y_46_im * atan2(x_46_im, x_46_re)))) * sin(t_0);
} else {
tmp = exp(fma(t_1, y_46_re, (y_46_im * -atan2(x_46_im, x_46_re)))) * sin(fma(t_1, y_46_im, t_0));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_1 = log(hypot(x_46_re, x_46_im)) tmp = 0.0 if (y_46_im <= -5.5e+30) tmp = Float64(exp(Float64(Float64(log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) * y_46_re) - Float64(y_46_im * atan(x_46_im, x_46_re)))) * sin(t_0)); else tmp = Float64(exp(fma(t_1, y_46_re, Float64(y_46_im * Float64(-atan(x_46_im, x_46_re))))) * sin(fma(t_1, y_46_im, t_0))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(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, -5.5e+30], N[(N[Exp[N[(N[(N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * y$46$re), $MachinePrecision] - N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision], N[(N[Exp[N[(t$95$1 * y$46$re + N[(y$46$im * (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(t$95$1 * y$46$im + t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
\mathbf{if}\;y.im \leq -5.5 \cdot 10^{+30}:\\
\;\;\;\;e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \sin t\_0\\
\mathbf{else}:\\
\;\;\;\;e^{\mathsf{fma}\left(t\_1, y.re, y.im \cdot \left(-\tan^{-1}_* \frac{x.im}{x.re}\right)\right)} \cdot \sin \left(\mathsf{fma}\left(t\_1, y.im, t\_0\right)\right)\\
\end{array}
\end{array}
if y.im < -5.50000000000000025e30Initial program 48.1%
Taylor expanded in y.im around 0 81.6%
if -5.50000000000000025e30 < y.im Initial program 35.5%
fmm-def35.5%
hypot-define35.5%
distribute-rgt-neg-out35.5%
fma-define35.5%
hypot-define88.0%
*-commutative88.0%
Simplified88.0%
Final simplification86.7%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.im x.re))))
(if (<= y.im -1.22e+20)
(*
(exp
(-
(* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.re)
(* y.im (atan2 x.im x.re))))
(sin (* y.re (atan2 x.im x.re))))
(if (<= y.im 5.2e+190)
(*
(exp (fma (log (hypot x.re x.im)) y.re (* y.im (- (atan2 x.im x.re)))))
(sin (* y.re (+ (atan2 x.im x.re) (* y.im (/ t_0 y.re))))))
(cbrt
(pow
(* (pow (exp (- y.im)) (atan2 x.im x.re)) (sin (* y.im 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 = log(hypot(x_46_im, x_46_re));
double tmp;
if (y_46_im <= -1.22e+20) {
tmp = exp(((log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - (y_46_im * atan2(x_46_im, x_46_re)))) * sin((y_46_re * atan2(x_46_im, x_46_re)));
} else if (y_46_im <= 5.2e+190) {
tmp = exp(fma(log(hypot(x_46_re, x_46_im)), y_46_re, (y_46_im * -atan2(x_46_im, x_46_re)))) * sin((y_46_re * (atan2(x_46_im, x_46_re) + (y_46_im * (t_0 / y_46_re)))));
} else {
tmp = cbrt(pow((pow(exp(-y_46_im), atan2(x_46_im, x_46_re)) * sin((y_46_im * t_0))), 3.0));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_im, x_46_re)) tmp = 0.0 if (y_46_im <= -1.22e+20) tmp = Float64(exp(Float64(Float64(log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) * y_46_re) - Float64(y_46_im * atan(x_46_im, x_46_re)))) * sin(Float64(y_46_re * atan(x_46_im, x_46_re)))); elseif (y_46_im <= 5.2e+190) tmp = Float64(exp(fma(log(hypot(x_46_re, x_46_im)), y_46_re, Float64(y_46_im * Float64(-atan(x_46_im, x_46_re))))) * sin(Float64(y_46_re * Float64(atan(x_46_im, x_46_re) + Float64(y_46_im * Float64(t_0 / y_46_re)))))); else tmp = cbrt((Float64((exp(Float64(-y_46_im)) ^ atan(x_46_im, x_46_re)) * sin(Float64(y_46_im * 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[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$im, -1.22e+20], N[(N[Exp[N[(N[(N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * y$46$re), $MachinePrecision] - N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 5.2e+190], N[(N[Exp[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$re + N[(y$46$im * (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] + N[(y$46$im * N[(t$95$0 / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[Power[N[Power[N[(N[Power[N[Exp[(-y$46$im)], $MachinePrecision], N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision] * N[Sin[N[(y$46$im * t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision], 1/3], $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
\mathbf{if}\;y.im \leq -1.22 \cdot 10^{+20}:\\
\;\;\;\;e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{elif}\;y.im \leq 5.2 \cdot 10^{+190}:\\
\;\;\;\;e^{\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.re, y.im \cdot \left(-\tan^{-1}_* \frac{x.im}{x.re}\right)\right)} \cdot \sin \left(y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} + y.im \cdot \frac{t\_0}{y.re}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\sqrt[3]{{\left({\left(e^{-y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}} \cdot \sin \left(y.im \cdot t\_0\right)\right)}^{3}}\\
\end{array}
\end{array}
if y.im < -1.22e20Initial program 45.6%
Taylor expanded in y.im around 0 82.6%
if -1.22e20 < y.im < 5.20000000000000022e190Initial program 37.3%
fmm-def37.3%
hypot-define37.3%
distribute-rgt-neg-out37.3%
fma-define37.3%
hypot-define86.9%
*-commutative86.9%
Simplified86.9%
Taylor expanded in y.re around inf 37.3%
+-commutative37.3%
associate-/l*37.3%
unpow237.3%
unpow237.3%
hypot-undefine86.9%
Simplified86.9%
if 5.20000000000000022e190 < y.im Initial program 25.0%
fmm-def25.0%
hypot-define25.0%
distribute-rgt-neg-out25.0%
fma-define25.0%
hypot-define95.9%
*-commutative95.9%
Simplified95.9%
Taylor expanded in y.re around 0 25.0%
add-cbrt-cube0.0%
pow1/30.0%
pow30.0%
pow20.0%
pow20.0%
hypot-undefine0.0%
Applied egg-rr0.0%
add-cbrt-cube0.0%
pow30.0%
associate-*r*0.0%
neg-mul-10.0%
exp-prod0.0%
unpow1/30.0%
rem-cbrt-cube90.2%
Applied egg-rr90.2%
Final simplification86.2%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.im (atan2 x.im x.re)))
(t_1
(exp (- (* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.re) t_0)))
(t_2 (* y.re (atan2 x.im x.re)))
(t_3 (sin (* y.im (log (hypot x.im x.re))))))
(if (<= y.im -15500000.0)
(* t_1 (sin t_2))
(if (<= y.im 3.4e-10)
(*
(sin (fma (log (hypot x.re x.im)) y.im t_2))
(/ (pow (hypot x.re x.im) y.re) (exp t_0)))
(if (<= y.im 2.5e+178)
(* t_1 t_3)
(cbrt (pow (* (pow (exp (- y.im)) (atan2 x.im x.re)) t_3) 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_im * atan2(x_46_im, x_46_re);
double t_1 = exp(((log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - t_0));
double t_2 = y_46_re * atan2(x_46_im, x_46_re);
double t_3 = sin((y_46_im * log(hypot(x_46_im, x_46_re))));
double tmp;
if (y_46_im <= -15500000.0) {
tmp = t_1 * sin(t_2);
} else if (y_46_im <= 3.4e-10) {
tmp = sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_2)) * (pow(hypot(x_46_re, x_46_im), y_46_re) / exp(t_0));
} else if (y_46_im <= 2.5e+178) {
tmp = t_1 * t_3;
} else {
tmp = cbrt(pow((pow(exp(-y_46_im), atan2(x_46_im, x_46_re)) * t_3), 3.0));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_im * atan(x_46_im, x_46_re)) t_1 = exp(Float64(Float64(log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) * y_46_re) - t_0)) t_2 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_3 = sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) tmp = 0.0 if (y_46_im <= -15500000.0) tmp = Float64(t_1 * sin(t_2)); elseif (y_46_im <= 3.4e-10) tmp = Float64(sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_2)) * Float64((hypot(x_46_re, x_46_im) ^ y_46_re) / exp(t_0))); elseif (y_46_im <= 2.5e+178) tmp = Float64(t_1 * t_3); else tmp = cbrt((Float64((exp(Float64(-y_46_im)) ^ atan(x_46_im, x_46_re)) * t_3) ^ 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$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Exp[N[(N[(N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * y$46$re), $MachinePrecision] - t$95$0), $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[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$im, -15500000.0], N[(t$95$1 * N[Sin[t$95$2], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 3.4e-10], N[(N[Sin[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im + t$95$2), $MachinePrecision]], $MachinePrecision] * N[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] / N[Exp[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 2.5e+178], N[(t$95$1 * t$95$3), $MachinePrecision], N[Power[N[Power[N[(N[Power[N[Exp[(-y$46$im)], $MachinePrecision], N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision] * t$95$3), $MachinePrecision], 3.0], $MachinePrecision], 1/3], $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - t\_0}\\
t_2 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_3 := \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\mathbf{if}\;y.im \leq -15500000:\\
\;\;\;\;t\_1 \cdot \sin t\_2\\
\mathbf{elif}\;y.im \leq 3.4 \cdot 10^{-10}:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, t\_2\right)\right) \cdot \frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{e^{t\_0}}\\
\mathbf{elif}\;y.im \leq 2.5 \cdot 10^{+178}:\\
\;\;\;\;t\_1 \cdot t\_3\\
\mathbf{else}:\\
\;\;\;\;\sqrt[3]{{\left({\left(e^{-y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}} \cdot t\_3\right)}^{3}}\\
\end{array}
\end{array}
if y.im < -1.55e7Initial program 44.8%
Taylor expanded in y.im around 0 82.9%
if -1.55e7 < y.im < 3.40000000000000015e-10Initial program 35.2%
exp-diff35.2%
exp-to-pow35.2%
hypot-define35.2%
*-commutative35.2%
exp-prod35.2%
fma-define35.2%
hypot-define90.5%
*-commutative90.5%
Simplified90.5%
add-exp-log90.5%
log-pow90.5%
add-log-exp90.5%
Applied egg-rr90.5%
if 3.40000000000000015e-10 < y.im < 2.49999999999999995e178Initial program 43.4%
Taylor expanded in y.re around 0 47.8%
unpow247.8%
unpow247.8%
hypot-undefine69.8%
Simplified69.8%
if 2.49999999999999995e178 < y.im Initial program 27.3%
fmm-def27.3%
hypot-define27.3%
distribute-rgt-neg-out27.3%
fma-define27.3%
hypot-define91.7%
*-commutative91.7%
Simplified91.7%
Taylor expanded in y.re around 0 27.3%
add-cbrt-cube0.0%
pow1/30.0%
pow30.0%
pow20.0%
pow20.0%
hypot-undefine0.0%
Applied egg-rr0.0%
add-cbrt-cube0.0%
pow30.0%
associate-*r*0.0%
neg-mul-10.0%
exp-prod0.0%
unpow1/30.0%
rem-cbrt-cube86.6%
Applied egg-rr86.6%
Final simplification84.7%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.im (atan2 x.im x.re)))
(t_1 (* y.re (atan2 x.im x.re)))
(t_2 (sin (* y.im (log (hypot x.im x.re)))))
(t_3
(exp (- (* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.re) t_0))))
(if (<= y.im -3500000000000.0)
(* t_3 (sin t_1))
(if (<= y.im 45000000000000.0)
(*
(sin (fma (log (hypot x.re x.im)) y.im t_1))
(/ (pow (hypot x.re x.im) y.re) (+ t_0 1.0)))
(if (<= y.im 1.15e+179)
(* t_3 t_2)
(cbrt (pow (* (pow (exp (- y.im)) (atan2 x.im x.re)) t_2) 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_im * atan2(x_46_im, x_46_re);
double t_1 = y_46_re * atan2(x_46_im, x_46_re);
double t_2 = sin((y_46_im * log(hypot(x_46_im, x_46_re))));
double t_3 = exp(((log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - t_0));
double tmp;
if (y_46_im <= -3500000000000.0) {
tmp = t_3 * sin(t_1);
} else if (y_46_im <= 45000000000000.0) {
tmp = sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_1)) * (pow(hypot(x_46_re, x_46_im), y_46_re) / (t_0 + 1.0));
} else if (y_46_im <= 1.15e+179) {
tmp = t_3 * t_2;
} else {
tmp = cbrt(pow((pow(exp(-y_46_im), atan2(x_46_im, x_46_re)) * t_2), 3.0));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_im * atan(x_46_im, x_46_re)) t_1 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_2 = sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) t_3 = exp(Float64(Float64(log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) * y_46_re) - t_0)) tmp = 0.0 if (y_46_im <= -3500000000000.0) tmp = Float64(t_3 * sin(t_1)); elseif (y_46_im <= 45000000000000.0) tmp = Float64(sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_1)) * Float64((hypot(x_46_re, x_46_im) ^ y_46_re) / Float64(t_0 + 1.0))); elseif (y_46_im <= 1.15e+179) tmp = Float64(t_3 * t_2); else tmp = cbrt((Float64((exp(Float64(-y_46_im)) ^ atan(x_46_im, x_46_re)) * t_2) ^ 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$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[Exp[N[(N[(N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * y$46$re), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$im, -3500000000000.0], N[(t$95$3 * N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 45000000000000.0], 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[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] / N[(t$95$0 + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 1.15e+179], N[(t$95$3 * t$95$2), $MachinePrecision], N[Power[N[Power[N[(N[Power[N[Exp[(-y$46$im)], $MachinePrecision], N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision] * t$95$2), $MachinePrecision], 3.0], $MachinePrecision], 1/3], $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_2 := \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
t_3 := e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - t\_0}\\
\mathbf{if}\;y.im \leq -3500000000000:\\
\;\;\;\;t\_3 \cdot \sin t\_1\\
\mathbf{elif}\;y.im \leq 45000000000000:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, t\_1\right)\right) \cdot \frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{t\_0 + 1}\\
\mathbf{elif}\;y.im \leq 1.15 \cdot 10^{+179}:\\
\;\;\;\;t\_3 \cdot t\_2\\
\mathbf{else}:\\
\;\;\;\;\sqrt[3]{{\left({\left(e^{-y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}} \cdot t\_2\right)}^{3}}\\
\end{array}
\end{array}
if y.im < -3.5e12Initial program 45.6%
Taylor expanded in y.im around 0 82.6%
if -3.5e12 < y.im < 4.5e13Initial program 36.1%
exp-diff35.4%
exp-to-pow35.4%
hypot-define35.4%
*-commutative35.4%
exp-prod34.8%
fma-define34.9%
hypot-define87.6%
*-commutative87.6%
Simplified87.6%
Taylor expanded in y.im around 0 89.1%
*-commutative89.1%
Simplified89.1%
if 4.5e13 < y.im < 1.14999999999999997e179Initial program 41.1%
Taylor expanded in y.re around 0 43.8%
unpow243.8%
unpow243.8%
hypot-undefine68.4%
Simplified68.4%
if 1.14999999999999997e179 < y.im Initial program 27.3%
fmm-def27.3%
hypot-define27.3%
distribute-rgt-neg-out27.3%
fma-define27.3%
hypot-define91.7%
*-commutative91.7%
Simplified91.7%
Taylor expanded in y.re around 0 27.3%
add-cbrt-cube0.0%
pow1/30.0%
pow30.0%
pow20.0%
pow20.0%
hypot-undefine0.0%
Applied egg-rr0.0%
add-cbrt-cube0.0%
pow30.0%
associate-*r*0.0%
neg-mul-10.0%
exp-prod0.0%
unpow1/30.0%
rem-cbrt-cube86.6%
Applied egg-rr86.6%
Final simplification84.5%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (sin (* y.im (log (hypot x.im x.re)))))
(t_1 (* y.re (atan2 x.im x.re)))
(t_2
(exp
(-
(* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.re)
(* y.im (atan2 x.im x.re))))))
(if (<= y.im -660000000000.0)
(* t_2 (sin t_1))
(if (<= y.im 1.3e-10)
(*
(sin (fma (log (hypot x.re x.im)) y.im t_1))
(pow (hypot x.im x.re) y.re))
(if (<= y.im 9.2e+179)
(* t_2 t_0)
(cbrt (pow (* (pow (exp (- y.im)) (atan2 x.im x.re)) 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 = sin((y_46_im * log(hypot(x_46_im, x_46_re))));
double t_1 = y_46_re * atan2(x_46_im, x_46_re);
double t_2 = exp(((log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - (y_46_im * atan2(x_46_im, x_46_re))));
double tmp;
if (y_46_im <= -660000000000.0) {
tmp = t_2 * sin(t_1);
} else if (y_46_im <= 1.3e-10) {
tmp = sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_1)) * pow(hypot(x_46_im, x_46_re), y_46_re);
} else if (y_46_im <= 9.2e+179) {
tmp = t_2 * t_0;
} else {
tmp = cbrt(pow((pow(exp(-y_46_im), atan2(x_46_im, x_46_re)) * t_0), 3.0));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) t_1 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_2 = exp(Float64(Float64(log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) * y_46_re) - Float64(y_46_im * atan(x_46_im, x_46_re)))) tmp = 0.0 if (y_46_im <= -660000000000.0) tmp = Float64(t_2 * sin(t_1)); elseif (y_46_im <= 1.3e-10) tmp = Float64(sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_1)) * (hypot(x_46_im, x_46_re) ^ y_46_re)); elseif (y_46_im <= 9.2e+179) tmp = Float64(t_2 * t_0); else tmp = cbrt((Float64((exp(Float64(-y_46_im)) ^ atan(x_46_im, x_46_re)) * 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[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Exp[N[(N[(N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * y$46$re), $MachinePrecision] - N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$im, -660000000000.0], N[(t$95$2 * N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 1.3e-10], 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[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 9.2e+179], N[(t$95$2 * t$95$0), $MachinePrecision], N[Power[N[Power[N[(N[Power[N[Exp[(-y$46$im)], $MachinePrecision], N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision] * t$95$0), $MachinePrecision], 3.0], $MachinePrecision], 1/3], $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_2 := e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\\
\mathbf{if}\;y.im \leq -660000000000:\\
\;\;\;\;t\_2 \cdot \sin t\_1\\
\mathbf{elif}\;y.im \leq 1.3 \cdot 10^{-10}:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, t\_1\right)\right) \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{elif}\;y.im \leq 9.2 \cdot 10^{+179}:\\
\;\;\;\;t\_2 \cdot t\_0\\
\mathbf{else}:\\
\;\;\;\;\sqrt[3]{{\left({\left(e^{-y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}} \cdot t\_0\right)}^{3}}\\
\end{array}
\end{array}
if y.im < -6.6e11Initial program 45.6%
Taylor expanded in y.im around 0 82.6%
if -6.6e11 < y.im < 1.29999999999999991e-10Initial program 34.9%
fmm-def34.9%
hypot-define34.9%
distribute-rgt-neg-out34.9%
fma-define34.9%
hypot-define90.6%
*-commutative90.6%
Simplified90.6%
Taylor expanded in y.im around 0 61.4%
unpow261.4%
unpow261.4%
hypot-undefine89.5%
Simplified89.5%
if 1.29999999999999991e-10 < y.im < 9.19999999999999976e179Initial program 43.4%
Taylor expanded in y.re around 0 47.8%
unpow247.8%
unpow247.8%
hypot-undefine69.8%
Simplified69.8%
if 9.19999999999999976e179 < y.im Initial program 27.3%
fmm-def27.3%
hypot-define27.3%
distribute-rgt-neg-out27.3%
fma-define27.3%
hypot-define91.7%
*-commutative91.7%
Simplified91.7%
Taylor expanded in y.re around 0 27.3%
add-cbrt-cube0.0%
pow1/30.0%
pow30.0%
pow20.0%
pow20.0%
hypot-undefine0.0%
Applied egg-rr0.0%
add-cbrt-cube0.0%
pow30.0%
associate-*r*0.0%
neg-mul-10.0%
exp-prod0.0%
unpow1/30.0%
rem-cbrt-cube86.6%
Applied egg-rr86.6%
Final simplification84.1%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (sin (* y.im (log (hypot x.im x.re)))))
(t_1 (* y.re (atan2 x.im x.re)))
(t_2
(exp
(-
(* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.re)
(* y.im (atan2 x.im x.re))))))
(if (<= y.im -3800000000000.0)
(* t_2 (sin t_1))
(if (<= y.im 1.9e-10)
(*
(sin (fma (log (hypot x.re x.im)) y.im t_1))
(pow (hypot x.im x.re) y.re))
(if (<= y.im 4.4e+129)
(* t_2 t_0)
(* (exp (* y.im (- (atan2 x.im x.re)))) (log (exp t_0))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = sin((y_46_im * log(hypot(x_46_im, x_46_re))));
double t_1 = y_46_re * atan2(x_46_im, x_46_re);
double t_2 = exp(((log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - (y_46_im * atan2(x_46_im, x_46_re))));
double tmp;
if (y_46_im <= -3800000000000.0) {
tmp = t_2 * sin(t_1);
} else if (y_46_im <= 1.9e-10) {
tmp = sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_1)) * pow(hypot(x_46_im, x_46_re), y_46_re);
} else if (y_46_im <= 4.4e+129) {
tmp = t_2 * t_0;
} else {
tmp = exp((y_46_im * -atan2(x_46_im, x_46_re))) * log(exp(t_0));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) t_1 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_2 = exp(Float64(Float64(log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) * y_46_re) - Float64(y_46_im * atan(x_46_im, x_46_re)))) tmp = 0.0 if (y_46_im <= -3800000000000.0) tmp = Float64(t_2 * sin(t_1)); elseif (y_46_im <= 1.9e-10) tmp = Float64(sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_1)) * (hypot(x_46_im, x_46_re) ^ y_46_re)); elseif (y_46_im <= 4.4e+129) tmp = Float64(t_2 * t_0); else tmp = Float64(exp(Float64(y_46_im * Float64(-atan(x_46_im, x_46_re)))) * log(exp(t_0))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Exp[N[(N[(N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * y$46$re), $MachinePrecision] - N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$im, -3800000000000.0], N[(t$95$2 * N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 1.9e-10], 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[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 4.4e+129], N[(t$95$2 * t$95$0), $MachinePrecision], N[(N[Exp[N[(y$46$im * (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])), $MachinePrecision]], $MachinePrecision] * N[Log[N[Exp[t$95$0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_2 := e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\\
\mathbf{if}\;y.im \leq -3800000000000:\\
\;\;\;\;t\_2 \cdot \sin t\_1\\
\mathbf{elif}\;y.im \leq 1.9 \cdot 10^{-10}:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, t\_1\right)\right) \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{elif}\;y.im \leq 4.4 \cdot 10^{+129}:\\
\;\;\;\;t\_2 \cdot t\_0\\
\mathbf{else}:\\
\;\;\;\;e^{y.im \cdot \left(-\tan^{-1}_* \frac{x.im}{x.re}\right)} \cdot \log \left(e^{t\_0}\right)\\
\end{array}
\end{array}
if y.im < -3.8e12Initial program 45.6%
Taylor expanded in y.im around 0 82.6%
if -3.8e12 < y.im < 1.8999999999999999e-10Initial program 34.9%
fmm-def34.9%
hypot-define34.9%
distribute-rgt-neg-out34.9%
fma-define34.9%
hypot-define90.6%
*-commutative90.6%
Simplified90.6%
Taylor expanded in y.im around 0 61.4%
unpow261.4%
unpow261.4%
hypot-undefine89.5%
Simplified89.5%
if 1.8999999999999999e-10 < y.im < 4.3999999999999999e129Initial program 44.7%
Taylor expanded in y.re around 0 49.9%
unpow249.9%
unpow249.9%
hypot-undefine71.2%
Simplified71.2%
if 4.3999999999999999e129 < y.im Initial program 30.0%
fmm-def30.0%
hypot-define30.0%
distribute-rgt-neg-out30.0%
fma-define30.0%
hypot-define90.6%
*-commutative90.6%
Simplified90.6%
Taylor expanded in y.re around 0 30.0%
add-log-exp30.0%
pow230.0%
pow230.0%
hypot-undefine77.6%
Applied egg-rr77.6%
Final simplification83.8%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re))))
(if (<= y.im -1.12e+15)
(*
(exp
(-
(* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.re)
(* y.im (atan2 x.im x.re))))
(sin t_0))
(if (<= y.im 4.5e+127)
(*
(sin (fma (log (hypot x.re x.im)) y.im t_0))
(pow (hypot x.im x.re) y.re))
(*
(exp (* y.im (- (atan2 x.im x.re))))
(log (exp (sin (* y.im (log (hypot x.im x.re)))))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if (y_46_im <= -1.12e+15) {
tmp = exp(((log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - (y_46_im * atan2(x_46_im, x_46_re)))) * sin(t_0);
} else if (y_46_im <= 4.5e+127) {
tmp = sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_0)) * pow(hypot(x_46_im, x_46_re), y_46_re);
} else {
tmp = exp((y_46_im * -atan2(x_46_im, x_46_re))) * log(exp(sin((y_46_im * log(hypot(x_46_im, x_46_re))))));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) tmp = 0.0 if (y_46_im <= -1.12e+15) tmp = Float64(exp(Float64(Float64(log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) * y_46_re) - Float64(y_46_im * atan(x_46_im, x_46_re)))) * sin(t_0)); elseif (y_46_im <= 4.5e+127) tmp = Float64(sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_0)) * (hypot(x_46_im, x_46_re) ^ y_46_re)); else tmp = Float64(exp(Float64(y_46_im * Float64(-atan(x_46_im, x_46_re)))) * log(exp(sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re))))))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -1.12e+15], N[(N[Exp[N[(N[(N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * y$46$re), $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, 4.5e+127], N[(N[Sin[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im + t$95$0), $MachinePrecision]], $MachinePrecision] * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], N[(N[Exp[N[(y$46$im * (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])), $MachinePrecision]], $MachinePrecision] * N[Log[N[Exp[N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.im \leq -1.12 \cdot 10^{+15}:\\
\;\;\;\;e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \sin t\_0\\
\mathbf{elif}\;y.im \leq 4.5 \cdot 10^{+127}:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, t\_0\right)\right) \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;e^{y.im \cdot \left(-\tan^{-1}_* \frac{x.im}{x.re}\right)} \cdot \log \left(e^{\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)}\right)\\
\end{array}
\end{array}
if y.im < -1.12e15Initial program 45.6%
Taylor expanded in y.im around 0 82.6%
if -1.12e15 < y.im < 4.50000000000000034e127Initial program 37.1%
fmm-def37.1%
hypot-define37.1%
distribute-rgt-neg-out37.1%
fma-define37.1%
hypot-define87.3%
*-commutative87.3%
Simplified87.3%
Taylor expanded in y.im around 0 60.5%
unpow260.5%
unpow260.5%
hypot-undefine82.7%
Simplified82.7%
if 4.50000000000000034e127 < y.im Initial program 30.0%
fmm-def30.0%
hypot-define30.0%
distribute-rgt-neg-out30.0%
fma-define30.0%
hypot-define90.6%
*-commutative90.6%
Simplified90.6%
Taylor expanded in y.re around 0 30.0%
add-log-exp30.0%
pow230.0%
pow230.0%
hypot-undefine77.6%
Applied egg-rr77.6%
Final simplification82.0%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.im x.re))))
(if (<= y.im -24000000000000.0)
(*
(exp
(-
(* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.re)
(* y.im (atan2 x.im x.re))))
(sin (* y.re (atan2 x.im x.re))))
(if (<= y.im 3.8e+115)
(*
(sin (* y.re (+ (atan2 x.im x.re) (* y.im (/ t_0 y.re)))))
(pow (hypot x.im x.re) y.re))
(*
(exp (* y.im (- (atan2 x.im x.re))))
(log (exp (sin (* y.im t_0)))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(hypot(x_46_im, x_46_re));
double tmp;
if (y_46_im <= -24000000000000.0) {
tmp = exp(((log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - (y_46_im * atan2(x_46_im, x_46_re)))) * sin((y_46_re * atan2(x_46_im, x_46_re)));
} else if (y_46_im <= 3.8e+115) {
tmp = sin((y_46_re * (atan2(x_46_im, x_46_re) + (y_46_im * (t_0 / y_46_re))))) * pow(hypot(x_46_im, x_46_re), y_46_re);
} else {
tmp = exp((y_46_im * -atan2(x_46_im, x_46_re))) * log(exp(sin((y_46_im * t_0))));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.log(Math.hypot(x_46_im, x_46_re));
double tmp;
if (y_46_im <= -24000000000000.0) {
tmp = Math.exp(((Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - (y_46_im * Math.atan2(x_46_im, x_46_re)))) * Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
} else if (y_46_im <= 3.8e+115) {
tmp = Math.sin((y_46_re * (Math.atan2(x_46_im, x_46_re) + (y_46_im * (t_0 / y_46_re))))) * Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
} else {
tmp = Math.exp((y_46_im * -Math.atan2(x_46_im, x_46_re))) * Math.log(Math.exp(Math.sin((y_46_im * t_0))));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.log(math.hypot(x_46_im, x_46_re)) tmp = 0 if y_46_im <= -24000000000000.0: tmp = math.exp(((math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - (y_46_im * math.atan2(x_46_im, x_46_re)))) * math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) elif y_46_im <= 3.8e+115: tmp = math.sin((y_46_re * (math.atan2(x_46_im, x_46_re) + (y_46_im * (t_0 / y_46_re))))) * math.pow(math.hypot(x_46_im, x_46_re), y_46_re) else: tmp = math.exp((y_46_im * -math.atan2(x_46_im, x_46_re))) * math.log(math.exp(math.sin((y_46_im * t_0)))) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_im, x_46_re)) tmp = 0.0 if (y_46_im <= -24000000000000.0) tmp = Float64(exp(Float64(Float64(log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) * y_46_re) - Float64(y_46_im * atan(x_46_im, x_46_re)))) * sin(Float64(y_46_re * atan(x_46_im, x_46_re)))); elseif (y_46_im <= 3.8e+115) tmp = Float64(sin(Float64(y_46_re * Float64(atan(x_46_im, x_46_re) + Float64(y_46_im * Float64(t_0 / y_46_re))))) * (hypot(x_46_im, x_46_re) ^ y_46_re)); else tmp = Float64(exp(Float64(y_46_im * Float64(-atan(x_46_im, x_46_re)))) * log(exp(sin(Float64(y_46_im * t_0))))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_im, x_46_re)); tmp = 0.0; if (y_46_im <= -24000000000000.0) tmp = exp(((log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - (y_46_im * atan2(x_46_im, x_46_re)))) * sin((y_46_re * atan2(x_46_im, x_46_re))); elseif (y_46_im <= 3.8e+115) tmp = sin((y_46_re * (atan2(x_46_im, x_46_re) + (y_46_im * (t_0 / y_46_re))))) * (hypot(x_46_im, x_46_re) ^ y_46_re); else tmp = exp((y_46_im * -atan2(x_46_im, x_46_re))) * log(exp(sin((y_46_im * t_0)))); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$im, -24000000000000.0], N[(N[Exp[N[(N[(N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * y$46$re), $MachinePrecision] - N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 3.8e+115], N[(N[Sin[N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] + N[(y$46$im * N[(t$95$0 / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], N[(N[Exp[N[(y$46$im * (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])), $MachinePrecision]], $MachinePrecision] * N[Log[N[Exp[N[Sin[N[(y$46$im * t$95$0), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
\mathbf{if}\;y.im \leq -24000000000000:\\
\;\;\;\;e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{elif}\;y.im \leq 3.8 \cdot 10^{+115}:\\
\;\;\;\;\sin \left(y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} + y.im \cdot \frac{t\_0}{y.re}\right)\right) \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;e^{y.im \cdot \left(-\tan^{-1}_* \frac{x.im}{x.re}\right)} \cdot \log \left(e^{\sin \left(y.im \cdot t\_0\right)}\right)\\
\end{array}
\end{array}
if y.im < -2.4e13Initial program 45.6%
Taylor expanded in y.im around 0 82.6%
if -2.4e13 < y.im < 3.8000000000000001e115Initial program 37.4%
fmm-def37.4%
hypot-define37.4%
distribute-rgt-neg-out37.4%
fma-define37.4%
hypot-define87.0%
*-commutative87.0%
Simplified87.0%
Taylor expanded in y.re around inf 37.4%
+-commutative37.4%
associate-/l*37.5%
unpow237.5%
unpow237.5%
hypot-undefine87.0%
Simplified87.0%
Taylor expanded in y.im around 0 60.8%
unpow260.2%
unpow260.2%
hypot-undefine82.8%
Simplified82.9%
if 3.8000000000000001e115 < y.im Initial program 29.4%
fmm-def29.4%
hypot-define29.4%
distribute-rgt-neg-out29.4%
fma-define29.4%
hypot-define91.7%
*-commutative91.7%
Simplified91.7%
Taylor expanded in y.re around 0 26.6%
add-log-exp26.6%
pow226.6%
pow226.6%
hypot-undefine74.5%
Applied egg-rr74.5%
Final simplification81.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.im x.re)))
(t_2 (* (sin (* y.im t_1)) (exp (* y.im (- (atan2 x.im x.re)))))))
(if (<= y.im -3.05e+240)
t_2
(if (<= y.im -6e+27)
(* t_0 (sqrt (pow (sin (* y.re (atan2 x.im x.re))) 2.0)))
(if (<= y.im 2.6e+114)
(* (sin (* y.re (+ (atan2 x.im x.re) (* y.im (/ t_1 y.re))))) t_0)
t_2)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = pow(hypot(x_46_im, x_46_re), y_46_re);
double t_1 = log(hypot(x_46_im, x_46_re));
double t_2 = sin((y_46_im * t_1)) * exp((y_46_im * -atan2(x_46_im, x_46_re)));
double tmp;
if (y_46_im <= -3.05e+240) {
tmp = t_2;
} else if (y_46_im <= -6e+27) {
tmp = t_0 * sqrt(pow(sin((y_46_re * atan2(x_46_im, x_46_re))), 2.0));
} else if (y_46_im <= 2.6e+114) {
tmp = sin((y_46_re * (atan2(x_46_im, x_46_re) + (y_46_im * (t_1 / y_46_re))))) * t_0;
} else {
tmp = t_2;
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
double t_1 = Math.log(Math.hypot(x_46_im, x_46_re));
double t_2 = Math.sin((y_46_im * t_1)) * Math.exp((y_46_im * -Math.atan2(x_46_im, x_46_re)));
double tmp;
if (y_46_im <= -3.05e+240) {
tmp = t_2;
} else if (y_46_im <= -6e+27) {
tmp = t_0 * Math.sqrt(Math.pow(Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re))), 2.0));
} else if (y_46_im <= 2.6e+114) {
tmp = Math.sin((y_46_re * (Math.atan2(x_46_im, x_46_re) + (y_46_im * (t_1 / y_46_re))))) * t_0;
} else {
tmp = t_2;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.pow(math.hypot(x_46_im, x_46_re), y_46_re) t_1 = math.log(math.hypot(x_46_im, x_46_re)) t_2 = math.sin((y_46_im * t_1)) * math.exp((y_46_im * -math.atan2(x_46_im, x_46_re))) tmp = 0 if y_46_im <= -3.05e+240: tmp = t_2 elif y_46_im <= -6e+27: tmp = t_0 * math.sqrt(math.pow(math.sin((y_46_re * math.atan2(x_46_im, x_46_re))), 2.0)) elif y_46_im <= 2.6e+114: tmp = math.sin((y_46_re * (math.atan2(x_46_im, x_46_re) + (y_46_im * (t_1 / y_46_re))))) * t_0 else: tmp = t_2 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_im, x_46_re)) t_2 = Float64(sin(Float64(y_46_im * t_1)) * exp(Float64(y_46_im * Float64(-atan(x_46_im, x_46_re))))) tmp = 0.0 if (y_46_im <= -3.05e+240) tmp = t_2; elseif (y_46_im <= -6e+27) tmp = Float64(t_0 * sqrt((sin(Float64(y_46_re * atan(x_46_im, x_46_re))) ^ 2.0))); elseif (y_46_im <= 2.6e+114) tmp = Float64(sin(Float64(y_46_re * Float64(atan(x_46_im, x_46_re) + Float64(y_46_im * Float64(t_1 / y_46_re))))) * t_0); else tmp = t_2; end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = hypot(x_46_im, x_46_re) ^ y_46_re; t_1 = log(hypot(x_46_im, x_46_re)); t_2 = sin((y_46_im * t_1)) * exp((y_46_im * -atan2(x_46_im, x_46_re))); tmp = 0.0; if (y_46_im <= -3.05e+240) tmp = t_2; elseif (y_46_im <= -6e+27) tmp = t_0 * sqrt((sin((y_46_re * atan2(x_46_im, x_46_re))) ^ 2.0)); elseif (y_46_im <= 2.6e+114) tmp = sin((y_46_re * (atan2(x_46_im, x_46_re) + (y_46_im * (t_1 / y_46_re))))) * t_0; else tmp = t_2; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, Block[{t$95$1 = N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(N[Sin[N[(y$46$im * t$95$1), $MachinePrecision]], $MachinePrecision] * N[Exp[N[(y$46$im * (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -3.05e+240], t$95$2, If[LessEqual[y$46$im, -6e+27], N[(t$95$0 * N[Sqrt[N[Power[N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], 2.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 2.6e+114], N[(N[Sin[N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] + N[(y$46$im * N[(t$95$1 / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$0), $MachinePrecision], t$95$2]]]]]]
\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.im, x.re\right)\right)\\
t_2 := \sin \left(y.im \cdot t\_1\right) \cdot e^{y.im \cdot \left(-\tan^{-1}_* \frac{x.im}{x.re}\right)}\\
\mathbf{if}\;y.im \leq -3.05 \cdot 10^{+240}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y.im \leq -6 \cdot 10^{+27}:\\
\;\;\;\;t\_0 \cdot \sqrt{{\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}^{2}}\\
\mathbf{elif}\;y.im \leq 2.6 \cdot 10^{+114}:\\
\;\;\;\;\sin \left(y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} + y.im \cdot \frac{t\_1}{y.re}\right)\right) \cdot t\_0\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y.im < -3.05e240 or 2.6e114 < y.im Initial program 37.0%
fmm-def37.0%
hypot-define37.0%
distribute-rgt-neg-out37.0%
fma-define37.0%
hypot-define80.0%
*-commutative80.0%
Simplified80.0%
Taylor expanded in y.re around 0 35.2%
*-commutative35.2%
unpow235.2%
unpow235.2%
hypot-undefine69.2%
*-commutative69.2%
neg-mul-169.2%
distribute-rgt-neg-in69.2%
Simplified69.2%
if -3.05e240 < y.im < -5.99999999999999953e27Initial program 45.7%
fmm-def45.7%
hypot-define45.7%
distribute-rgt-neg-out45.7%
fma-define45.7%
hypot-define77.2%
*-commutative77.2%
Simplified77.2%
Taylor expanded in y.im around 0 53.2%
unpow253.2%
unpow253.2%
hypot-undefine39.8%
Simplified39.8%
add-sqr-sqrt21.5%
sqrt-unprod69.2%
pow269.2%
Applied egg-rr69.2%
if -5.99999999999999953e27 < y.im < 2.6e114Initial program 37.0%
fmm-def37.0%
hypot-define37.0%
distribute-rgt-neg-out37.0%
fma-define37.0%
hypot-define87.2%
*-commutative87.2%
Simplified87.2%
Taylor expanded in y.re around inf 37.0%
+-commutative37.0%
associate-/l*37.0%
unpow237.0%
unpow237.0%
hypot-undefine86.6%
Simplified86.6%
Taylor expanded in y.im around 0 60.7%
unpow260.7%
unpow260.7%
hypot-undefine82.5%
Simplified82.5%
Final simplification77.9%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.im x.re))))
(if (<= y.im -2.7e+18)
(*
(exp
(-
(* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.re)
(* y.im (atan2 x.im x.re))))
(sin (* y.re (atan2 x.im x.re))))
(if (<= y.im 2.4e+114)
(*
(sin (* y.re (+ (atan2 x.im x.re) (* y.im (/ t_0 y.re)))))
(pow (hypot x.im x.re) y.re))
(* (sin (* y.im t_0)) (exp (* y.im (- (atan2 x.im x.re)))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(hypot(x_46_im, x_46_re));
double tmp;
if (y_46_im <= -2.7e+18) {
tmp = exp(((log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - (y_46_im * atan2(x_46_im, x_46_re)))) * sin((y_46_re * atan2(x_46_im, x_46_re)));
} else if (y_46_im <= 2.4e+114) {
tmp = sin((y_46_re * (atan2(x_46_im, x_46_re) + (y_46_im * (t_0 / y_46_re))))) * pow(hypot(x_46_im, x_46_re), y_46_re);
} else {
tmp = sin((y_46_im * t_0)) * 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 = Math.log(Math.hypot(x_46_im, x_46_re));
double tmp;
if (y_46_im <= -2.7e+18) {
tmp = Math.exp(((Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - (y_46_im * Math.atan2(x_46_im, x_46_re)))) * Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
} else if (y_46_im <= 2.4e+114) {
tmp = Math.sin((y_46_re * (Math.atan2(x_46_im, x_46_re) + (y_46_im * (t_0 / y_46_re))))) * Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
} else {
tmp = Math.sin((y_46_im * t_0)) * 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 = math.log(math.hypot(x_46_im, x_46_re)) tmp = 0 if y_46_im <= -2.7e+18: tmp = math.exp(((math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - (y_46_im * math.atan2(x_46_im, x_46_re)))) * math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) elif y_46_im <= 2.4e+114: tmp = math.sin((y_46_re * (math.atan2(x_46_im, x_46_re) + (y_46_im * (t_0 / y_46_re))))) * math.pow(math.hypot(x_46_im, x_46_re), y_46_re) else: tmp = math.sin((y_46_im * t_0)) * 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 = log(hypot(x_46_im, x_46_re)) tmp = 0.0 if (y_46_im <= -2.7e+18) tmp = Float64(exp(Float64(Float64(log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) * y_46_re) - Float64(y_46_im * atan(x_46_im, x_46_re)))) * sin(Float64(y_46_re * atan(x_46_im, x_46_re)))); elseif (y_46_im <= 2.4e+114) tmp = Float64(sin(Float64(y_46_re * Float64(atan(x_46_im, x_46_re) + Float64(y_46_im * Float64(t_0 / y_46_re))))) * (hypot(x_46_im, x_46_re) ^ y_46_re)); else tmp = Float64(sin(Float64(y_46_im * t_0)) * exp(Float64(y_46_im * Float64(-atan(x_46_im, x_46_re))))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_im, x_46_re)); tmp = 0.0; if (y_46_im <= -2.7e+18) tmp = exp(((log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - (y_46_im * atan2(x_46_im, x_46_re)))) * sin((y_46_re * atan2(x_46_im, x_46_re))); elseif (y_46_im <= 2.4e+114) tmp = sin((y_46_re * (atan2(x_46_im, x_46_re) + (y_46_im * (t_0 / y_46_re))))) * (hypot(x_46_im, x_46_re) ^ y_46_re); else tmp = sin((y_46_im * t_0)) * exp((y_46_im * -atan2(x_46_im, x_46_re))); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$im, -2.7e+18], N[(N[Exp[N[(N[(N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * y$46$re), $MachinePrecision] - N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 2.4e+114], N[(N[Sin[N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] + N[(y$46$im * N[(t$95$0 / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * 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 * t$95$0), $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 := \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
\mathbf{if}\;y.im \leq -2.7 \cdot 10^{+18}:\\
\;\;\;\;e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{elif}\;y.im \leq 2.4 \cdot 10^{+114}:\\
\;\;\;\;\sin \left(y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} + y.im \cdot \frac{t\_0}{y.re}\right)\right) \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;\sin \left(y.im \cdot t\_0\right) \cdot e^{y.im \cdot \left(-\tan^{-1}_* \frac{x.im}{x.re}\right)}\\
\end{array}
\end{array}
if y.im < -2.7e18Initial program 45.6%
Taylor expanded in y.im around 0 82.6%
if -2.7e18 < y.im < 2.4e114Initial program 37.4%
fmm-def37.4%
hypot-define37.4%
distribute-rgt-neg-out37.4%
fma-define37.4%
hypot-define87.0%
*-commutative87.0%
Simplified87.0%
Taylor expanded in y.re around inf 37.4%
+-commutative37.4%
associate-/l*37.5%
unpow237.5%
unpow237.5%
hypot-undefine87.0%
Simplified87.0%
Taylor expanded in y.im around 0 60.8%
unpow260.2%
unpow260.2%
hypot-undefine82.8%
Simplified82.9%
if 2.4e114 < y.im Initial program 29.4%
fmm-def29.4%
hypot-define29.4%
distribute-rgt-neg-out29.4%
fma-define29.4%
hypot-define91.7%
*-commutative91.7%
Simplified91.7%
Taylor expanded in y.re around 0 26.6%
*-commutative26.6%
unpow226.6%
unpow226.6%
hypot-undefine74.5%
*-commutative74.5%
neg-mul-174.5%
distribute-rgt-neg-in74.5%
Simplified74.5%
Final simplification81.7%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.im x.re)))
(t_1 (* (sin (* y.im t_0)) (pow (hypot x.im x.re) y.re))))
(if (<= y.re -0.15)
t_1
(if (<= y.re -2.9e-30)
(* (exp (* y.im (- (atan2 x.im x.re)))) (sin (* y.im (log (- x.re)))))
(if (<= y.re 1500000000000.0)
(sin (* y.re (+ (atan2 x.im x.re) (* y.im (/ t_0 y.re)))))
t_1)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(hypot(x_46_im, x_46_re));
double t_1 = sin((y_46_im * t_0)) * pow(hypot(x_46_im, x_46_re), y_46_re);
double tmp;
if (y_46_re <= -0.15) {
tmp = t_1;
} else if (y_46_re <= -2.9e-30) {
tmp = exp((y_46_im * -atan2(x_46_im, x_46_re))) * sin((y_46_im * log(-x_46_re)));
} else if (y_46_re <= 1500000000000.0) {
tmp = sin((y_46_re * (atan2(x_46_im, x_46_re) + (y_46_im * (t_0 / y_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.log(Math.hypot(x_46_im, x_46_re));
double t_1 = Math.sin((y_46_im * t_0)) * Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
double tmp;
if (y_46_re <= -0.15) {
tmp = t_1;
} else if (y_46_re <= -2.9e-30) {
tmp = Math.exp((y_46_im * -Math.atan2(x_46_im, x_46_re))) * Math.sin((y_46_im * Math.log(-x_46_re)));
} else if (y_46_re <= 1500000000000.0) {
tmp = Math.sin((y_46_re * (Math.atan2(x_46_im, x_46_re) + (y_46_im * (t_0 / y_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.log(math.hypot(x_46_im, x_46_re)) t_1 = math.sin((y_46_im * t_0)) * math.pow(math.hypot(x_46_im, x_46_re), y_46_re) tmp = 0 if y_46_re <= -0.15: tmp = t_1 elif y_46_re <= -2.9e-30: tmp = math.exp((y_46_im * -math.atan2(x_46_im, x_46_re))) * math.sin((y_46_im * math.log(-x_46_re))) elif y_46_re <= 1500000000000.0: tmp = math.sin((y_46_re * (math.atan2(x_46_im, x_46_re) + (y_46_im * (t_0 / y_46_re))))) else: tmp = t_1 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_im, x_46_re)) t_1 = Float64(sin(Float64(y_46_im * t_0)) * (hypot(x_46_im, x_46_re) ^ y_46_re)) tmp = 0.0 if (y_46_re <= -0.15) tmp = t_1; elseif (y_46_re <= -2.9e-30) tmp = Float64(exp(Float64(y_46_im * Float64(-atan(x_46_im, x_46_re)))) * sin(Float64(y_46_im * log(Float64(-x_46_re))))); elseif (y_46_re <= 1500000000000.0) tmp = sin(Float64(y_46_re * Float64(atan(x_46_im, x_46_re) + Float64(y_46_im * Float64(t_0 / y_46_re))))); else tmp = t_1; end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_im, x_46_re)); t_1 = sin((y_46_im * t_0)) * (hypot(x_46_im, x_46_re) ^ y_46_re); tmp = 0.0; if (y_46_re <= -0.15) tmp = t_1; elseif (y_46_re <= -2.9e-30) tmp = exp((y_46_im * -atan2(x_46_im, x_46_re))) * sin((y_46_im * log(-x_46_re))); elseif (y_46_re <= 1500000000000.0) tmp = sin((y_46_re * (atan2(x_46_im, x_46_re) + (y_46_im * (t_0 / y_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[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(N[Sin[N[(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]}, If[LessEqual[y$46$re, -0.15], t$95$1, If[LessEqual[y$46$re, -2.9e-30], N[(N[Exp[N[(y$46$im * (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(y$46$im * N[Log[(-x$46$re)], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 1500000000000.0], N[Sin[N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] + N[(y$46$im * N[(t$95$0 / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
t_1 := \sin \left(y.im \cdot t\_0\right) \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{if}\;y.re \leq -0.15:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y.re \leq -2.9 \cdot 10^{-30}:\\
\;\;\;\;e^{y.im \cdot \left(-\tan^{-1}_* \frac{x.im}{x.re}\right)} \cdot \sin \left(y.im \cdot \log \left(-x.re\right)\right)\\
\mathbf{elif}\;y.re \leq 1500000000000:\\
\;\;\;\;\sin \left(y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} + y.im \cdot \frac{t\_0}{y.re}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y.re < -0.149999999999999994 or 1.5e12 < y.re Initial program 36.0%
fmm-def36.0%
hypot-define36.0%
distribute-rgt-neg-out36.0%
fma-define36.0%
hypot-define80.9%
*-commutative80.9%
Simplified80.9%
Taylor expanded in y.re around inf 36.8%
+-commutative36.8%
associate-/l*36.0%
unpow236.0%
unpow236.0%
hypot-undefine79.4%
Simplified79.4%
Taylor expanded in y.im around 0 72.9%
unpow272.9%
unpow272.9%
hypot-undefine72.9%
Simplified72.9%
Taylor expanded in y.re around 0 35.4%
unpow235.4%
unpow235.4%
hypot-undefine72.9%
Simplified72.9%
if -0.149999999999999994 < y.re < -2.89999999999999989e-30Initial program 66.7%
fmm-def66.7%
hypot-define66.7%
distribute-rgt-neg-out66.7%
fma-define66.7%
hypot-define83.3%
*-commutative83.3%
Simplified83.3%
Taylor expanded in y.re around 0 66.7%
Taylor expanded in x.re around -inf 83.3%
mul-1-neg83.3%
Simplified83.3%
if -2.89999999999999989e-30 < y.re < 1.5e12Initial program 39.2%
fmm-def39.2%
hypot-define39.2%
distribute-rgt-neg-out39.2%
fma-define39.3%
hypot-define88.4%
*-commutative88.4%
Simplified88.4%
Taylor expanded in y.re around inf 28.7%
+-commutative28.7%
associate-/l*28.8%
unpow228.8%
unpow228.8%
hypot-undefine70.7%
Simplified70.7%
Taylor expanded in y.im around 0 30.2%
unpow233.2%
unpow233.2%
hypot-undefine59.5%
Simplified57.9%
Taylor expanded in y.re around 0 57.0%
Final simplification66.1%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (sin (* y.im (log (hypot x.im x.re))))))
(if (or (<= y.re -1.42) (not (<= y.re 1500000000000.0)))
(* t_0 (pow (hypot x.im x.re) y.re))
(* t_0 (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 = sin((y_46_im * log(hypot(x_46_im, x_46_re))));
double tmp;
if ((y_46_re <= -1.42) || !(y_46_re <= 1500000000000.0)) {
tmp = t_0 * pow(hypot(x_46_im, x_46_re), y_46_re);
} else {
tmp = t_0 * 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 = Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re))));
double tmp;
if ((y_46_re <= -1.42) || !(y_46_re <= 1500000000000.0)) {
tmp = t_0 * Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
} else {
tmp = t_0 * 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 = math.sin((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) tmp = 0 if (y_46_re <= -1.42) or not (y_46_re <= 1500000000000.0): tmp = t_0 * math.pow(math.hypot(x_46_im, x_46_re), y_46_re) else: tmp = t_0 * 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 = sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) tmp = 0.0 if ((y_46_re <= -1.42) || !(y_46_re <= 1500000000000.0)) tmp = Float64(t_0 * (hypot(x_46_im, x_46_re) ^ y_46_re)); else tmp = Float64(t_0 * exp(Float64(y_46_im * Float64(-atan(x_46_im, x_46_re))))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin((y_46_im * log(hypot(x_46_im, x_46_re)))); tmp = 0.0; if ((y_46_re <= -1.42) || ~((y_46_re <= 1500000000000.0))) tmp = t_0 * (hypot(x_46_im, x_46_re) ^ y_46_re); else tmp = t_0 * exp((y_46_im * -atan2(x_46_im, x_46_re))); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[Or[LessEqual[y$46$re, -1.42], N[Not[LessEqual[y$46$re, 1500000000000.0]], $MachinePrecision]], N[(t$95$0 * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[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 := \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\mathbf{if}\;y.re \leq -1.42 \lor \neg \left(y.re \leq 1500000000000\right):\\
\;\;\;\;t\_0 \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot e^{y.im \cdot \left(-\tan^{-1}_* \frac{x.im}{x.re}\right)}\\
\end{array}
\end{array}
if y.re < -1.4199999999999999 or 1.5e12 < y.re Initial program 36.0%
fmm-def36.0%
hypot-define36.0%
distribute-rgt-neg-out36.0%
fma-define36.0%
hypot-define80.9%
*-commutative80.9%
Simplified80.9%
Taylor expanded in y.re around inf 36.8%
+-commutative36.8%
associate-/l*36.0%
unpow236.0%
unpow236.0%
hypot-undefine79.4%
Simplified79.4%
Taylor expanded in y.im around 0 72.9%
unpow272.9%
unpow272.9%
hypot-undefine72.9%
Simplified72.9%
Taylor expanded in y.re around 0 35.4%
unpow235.4%
unpow235.4%
hypot-undefine72.9%
Simplified72.9%
if -1.4199999999999999 < y.re < 1.5e12Initial program 40.6%
fmm-def40.6%
hypot-define40.6%
distribute-rgt-neg-out40.6%
fma-define40.6%
hypot-define88.2%
*-commutative88.2%
Simplified88.2%
Taylor expanded in y.re around 0 33.2%
*-commutative33.2%
unpow233.2%
unpow233.2%
hypot-undefine66.4%
*-commutative66.4%
neg-mul-166.4%
distribute-rgt-neg-in66.4%
Simplified66.4%
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))) (pow (hypot x.im x.re) y.re))))
(if (<= y.re -3e-5)
t_0
(if (<= y.re -2.9e-30)
(* (exp (* y.im (- (atan2 x.im x.re)))) (sin (* y.im (log (- x.re)))))
(if (<= y.re 1.5e-40)
(sin
(*
y.re
(+ (atan2 x.im x.re) (* y.im (/ (log (hypot x.im x.re)) y.re)))))
t_0)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = sin((y_46_re * atan2(x_46_im, x_46_re))) * pow(hypot(x_46_im, x_46_re), y_46_re);
double tmp;
if (y_46_re <= -3e-5) {
tmp = t_0;
} else if (y_46_re <= -2.9e-30) {
tmp = exp((y_46_im * -atan2(x_46_im, x_46_re))) * sin((y_46_im * log(-x_46_re)));
} else if (y_46_re <= 1.5e-40) {
tmp = sin((y_46_re * (atan2(x_46_im, x_46_re) + (y_46_im * (log(hypot(x_46_im, x_46_re)) / y_46_re)))));
} else {
tmp = 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.sin((y_46_re * Math.atan2(x_46_im, x_46_re))) * Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
double tmp;
if (y_46_re <= -3e-5) {
tmp = t_0;
} else if (y_46_re <= -2.9e-30) {
tmp = Math.exp((y_46_im * -Math.atan2(x_46_im, x_46_re))) * Math.sin((y_46_im * Math.log(-x_46_re)));
} else if (y_46_re <= 1.5e-40) {
tmp = Math.sin((y_46_re * (Math.atan2(x_46_im, x_46_re) + (y_46_im * (Math.log(Math.hypot(x_46_im, x_46_re)) / y_46_re)))));
} else {
tmp = t_0;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) * math.pow(math.hypot(x_46_im, x_46_re), y_46_re) tmp = 0 if y_46_re <= -3e-5: tmp = t_0 elif y_46_re <= -2.9e-30: tmp = math.exp((y_46_im * -math.atan2(x_46_im, x_46_re))) * math.sin((y_46_im * math.log(-x_46_re))) elif y_46_re <= 1.5e-40: tmp = math.sin((y_46_re * (math.atan2(x_46_im, x_46_re) + (y_46_im * (math.log(math.hypot(x_46_im, x_46_re)) / y_46_re))))) else: tmp = t_0 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(sin(Float64(y_46_re * atan(x_46_im, x_46_re))) * (hypot(x_46_im, x_46_re) ^ y_46_re)) tmp = 0.0 if (y_46_re <= -3e-5) tmp = t_0; elseif (y_46_re <= -2.9e-30) tmp = Float64(exp(Float64(y_46_im * Float64(-atan(x_46_im, x_46_re)))) * sin(Float64(y_46_im * log(Float64(-x_46_re))))); elseif (y_46_re <= 1.5e-40) tmp = sin(Float64(y_46_re * Float64(atan(x_46_im, x_46_re) + Float64(y_46_im * Float64(log(hypot(x_46_im, x_46_re)) / y_46_re))))); else tmp = t_0; 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))) * (hypot(x_46_im, x_46_re) ^ y_46_re); tmp = 0.0; if (y_46_re <= -3e-5) tmp = t_0; elseif (y_46_re <= -2.9e-30) tmp = exp((y_46_im * -atan2(x_46_im, x_46_re))) * sin((y_46_im * log(-x_46_re))); elseif (y_46_re <= 1.5e-40) tmp = sin((y_46_re * (atan2(x_46_im, x_46_re) + (y_46_im * (log(hypot(x_46_im, x_46_re)) / y_46_re))))); else tmp = t_0; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -3e-5], t$95$0, If[LessEqual[y$46$re, -2.9e-30], N[(N[Exp[N[(y$46$im * (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(y$46$im * N[Log[(-x$46$re)], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 1.5e-40], N[Sin[N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] + N[(y$46$im * N[(N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision] / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], t$95$0]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{if}\;y.re \leq -3 \cdot 10^{-5}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y.re \leq -2.9 \cdot 10^{-30}:\\
\;\;\;\;e^{y.im \cdot \left(-\tan^{-1}_* \frac{x.im}{x.re}\right)} \cdot \sin \left(y.im \cdot \log \left(-x.re\right)\right)\\
\mathbf{elif}\;y.re \leq 1.5 \cdot 10^{-40}:\\
\;\;\;\;\sin \left(y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} + y.im \cdot \frac{\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)}{y.re}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if y.re < -3.00000000000000008e-5 or 1.5000000000000001e-40 < y.re Initial program 37.1%
fmm-def37.1%
hypot-define37.1%
distribute-rgt-neg-out37.1%
fma-define37.1%
hypot-define81.4%
*-commutative81.4%
Simplified81.4%
Taylor expanded in y.im around 0 68.8%
unpow268.8%
unpow268.8%
hypot-undefine68.8%
Simplified68.8%
if -3.00000000000000008e-5 < y.re < -2.89999999999999989e-30Initial program 66.7%
fmm-def66.7%
hypot-define66.7%
distribute-rgt-neg-out66.7%
fma-define66.7%
hypot-define83.3%
*-commutative83.3%
Simplified83.3%
Taylor expanded in y.re around 0 66.7%
Taylor expanded in x.re around -inf 83.3%
mul-1-neg83.3%
Simplified83.3%
if -2.89999999999999989e-30 < y.re < 1.5000000000000001e-40Initial program 37.9%
fmm-def37.9%
hypot-define37.9%
distribute-rgt-neg-out37.9%
fma-define38.0%
hypot-define88.0%
*-commutative88.0%
Simplified88.0%
Taylor expanded in y.re around inf 27.0%
+-commutative27.0%
associate-/l*27.1%
unpow227.1%
unpow227.1%
hypot-undefine69.7%
Simplified69.7%
Taylor expanded in y.im around 0 30.3%
unpow233.4%
unpow233.4%
hypot-undefine60.6%
Simplified59.0%
Taylor expanded in y.re around 0 59.0%
Final simplification64.9%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (or (<= y.re -7.8e-168) (not (<= y.re 1.45e-12))) (* (sin (* y.re (atan2 x.im x.re))) (pow (hypot x.im x.re) y.re)) (* (exp (* y.im (- (atan2 x.im x.re)))) (sin (* y.im (log x.re))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_re <= -7.8e-168) || !(y_46_re <= 1.45e-12)) {
tmp = sin((y_46_re * atan2(x_46_im, x_46_re))) * pow(hypot(x_46_im, x_46_re), y_46_re);
} else {
tmp = exp((y_46_im * -atan2(x_46_im, x_46_re))) * sin((y_46_im * log(x_46_re)));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_re <= -7.8e-168) || !(y_46_re <= 1.45e-12)) {
tmp = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re))) * Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
} else {
tmp = Math.exp((y_46_im * -Math.atan2(x_46_im, x_46_re))) * Math.sin((y_46_im * Math.log(x_46_re)));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if (y_46_re <= -7.8e-168) or not (y_46_re <= 1.45e-12): tmp = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) * math.pow(math.hypot(x_46_im, x_46_re), y_46_re) else: tmp = math.exp((y_46_im * -math.atan2(x_46_im, x_46_re))) * math.sin((y_46_im * math.log(x_46_re))) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if ((y_46_re <= -7.8e-168) || !(y_46_re <= 1.45e-12)) tmp = Float64(sin(Float64(y_46_re * atan(x_46_im, x_46_re))) * (hypot(x_46_im, x_46_re) ^ y_46_re)); else tmp = Float64(exp(Float64(y_46_im * Float64(-atan(x_46_im, x_46_re)))) * sin(Float64(y_46_im * log(x_46_re)))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if ((y_46_re <= -7.8e-168) || ~((y_46_re <= 1.45e-12))) tmp = sin((y_46_re * atan2(x_46_im, x_46_re))) * (hypot(x_46_im, x_46_re) ^ y_46_re); else tmp = exp((y_46_im * -atan2(x_46_im, x_46_re))) * sin((y_46_im * log(x_46_re))); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[Or[LessEqual[y$46$re, -7.8e-168], N[Not[LessEqual[y$46$re, 1.45e-12]], $MachinePrecision]], N[(N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], N[(N[Exp[N[(y$46$im * (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(y$46$im * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq -7.8 \cdot 10^{-168} \lor \neg \left(y.re \leq 1.45 \cdot 10^{-12}\right):\\
\;\;\;\;\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;e^{y.im \cdot \left(-\tan^{-1}_* \frac{x.im}{x.re}\right)} \cdot \sin \left(y.im \cdot \log x.re\right)\\
\end{array}
\end{array}
if y.re < -7.80000000000000025e-168 or 1.4500000000000001e-12 < y.re Initial program 37.1%
fmm-def37.1%
hypot-define37.1%
distribute-rgt-neg-out37.1%
fma-define37.1%
hypot-define82.0%
*-commutative82.0%
Simplified82.0%
Taylor expanded in y.im around 0 62.8%
unpow262.8%
unpow262.8%
hypot-undefine64.1%
Simplified64.1%
if -7.80000000000000025e-168 < y.re < 1.4500000000000001e-12Initial program 40.2%
fmm-def40.2%
hypot-define40.2%
distribute-rgt-neg-out40.2%
fma-define40.2%
hypot-define88.6%
*-commutative88.6%
Simplified88.6%
Taylor expanded in y.re around 0 35.4%
Taylor expanded in x.im around 0 34.2%
mul-1-neg34.2%
*-commutative34.2%
distribute-lft-neg-in34.2%
*-commutative34.2%
Simplified34.2%
Final simplification53.7%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (exp (* y.im (- (atan2 x.im x.re))))))
(if (<= y.im -8.5e+40)
(* t_0 (sin (* y.im (log (- x.im)))))
(if (<= y.im 1.76e+180)
(* (sin (* y.re (atan2 x.im x.re))) (pow (hypot x.im x.re) y.re))
(* t_0 (sin (* y.im (log x.im))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = exp((y_46_im * -atan2(x_46_im, x_46_re)));
double tmp;
if (y_46_im <= -8.5e+40) {
tmp = t_0 * sin((y_46_im * log(-x_46_im)));
} else if (y_46_im <= 1.76e+180) {
tmp = sin((y_46_re * atan2(x_46_im, x_46_re))) * pow(hypot(x_46_im, x_46_re), y_46_re);
} else {
tmp = t_0 * sin((y_46_im * log(x_46_im)));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.exp((y_46_im * -Math.atan2(x_46_im, x_46_re)));
double tmp;
if (y_46_im <= -8.5e+40) {
tmp = t_0 * Math.sin((y_46_im * Math.log(-x_46_im)));
} else if (y_46_im <= 1.76e+180) {
tmp = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re))) * Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
} else {
tmp = t_0 * Math.sin((y_46_im * Math.log(x_46_im)));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.exp((y_46_im * -math.atan2(x_46_im, x_46_re))) tmp = 0 if y_46_im <= -8.5e+40: tmp = t_0 * math.sin((y_46_im * math.log(-x_46_im))) elif y_46_im <= 1.76e+180: tmp = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) * math.pow(math.hypot(x_46_im, x_46_re), y_46_re) else: tmp = t_0 * math.sin((y_46_im * math.log(x_46_im))) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = exp(Float64(y_46_im * Float64(-atan(x_46_im, x_46_re)))) tmp = 0.0 if (y_46_im <= -8.5e+40) tmp = Float64(t_0 * sin(Float64(y_46_im * log(Float64(-x_46_im))))); elseif (y_46_im <= 1.76e+180) tmp = Float64(sin(Float64(y_46_re * atan(x_46_im, x_46_re))) * (hypot(x_46_im, x_46_re) ^ y_46_re)); else tmp = Float64(t_0 * sin(Float64(y_46_im * log(x_46_im)))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = exp((y_46_im * -atan2(x_46_im, x_46_re))); tmp = 0.0; if (y_46_im <= -8.5e+40) tmp = t_0 * sin((y_46_im * log(-x_46_im))); elseif (y_46_im <= 1.76e+180) tmp = sin((y_46_re * atan2(x_46_im, x_46_re))) * (hypot(x_46_im, x_46_re) ^ y_46_re); else tmp = t_0 * sin((y_46_im * log(x_46_im))); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Exp[N[(y$46$im * (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$im, -8.5e+40], N[(t$95$0 * N[Sin[N[(y$46$im * N[Log[(-x$46$im)], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 1.76e+180], N[(N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[Sin[N[(y$46$im * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := e^{y.im \cdot \left(-\tan^{-1}_* \frac{x.im}{x.re}\right)}\\
\mathbf{if}\;y.im \leq -8.5 \cdot 10^{+40}:\\
\;\;\;\;t\_0 \cdot \sin \left(y.im \cdot \log \left(-x.im\right)\right)\\
\mathbf{elif}\;y.im \leq 1.76 \cdot 10^{+180}:\\
\;\;\;\;\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot \sin \left(y.im \cdot \log x.im\right)\\
\end{array}
\end{array}
if y.im < -8.49999999999999996e40Initial program 50.0%
fmm-def50.0%
hypot-define50.0%
distribute-rgt-neg-out50.0%
fma-define50.0%
hypot-define71.2%
*-commutative71.2%
Simplified71.2%
Taylor expanded in y.re around 0 42.5%
Taylor expanded in x.im around -inf 52.0%
mul-1-neg52.0%
Simplified52.0%
if -8.49999999999999996e40 < y.im < 1.76e180Initial program 36.1%
fmm-def36.1%
hypot-define36.1%
distribute-rgt-neg-out36.1%
fma-define36.1%
hypot-define87.1%
*-commutative87.1%
Simplified87.1%
Taylor expanded in y.im around 0 47.1%
unpow247.1%
unpow247.1%
hypot-undefine54.6%
Simplified54.6%
if 1.76e180 < y.im Initial program 27.3%
fmm-def27.3%
hypot-define27.3%
distribute-rgt-neg-out27.3%
fma-define27.3%
hypot-define91.7%
*-commutative91.7%
Simplified91.7%
Taylor expanded in y.re around 0 27.3%
Taylor expanded in x.re around 0 60.1%
mul-1-neg60.1%
*-commutative60.1%
distribute-lft-neg-in60.1%
*-commutative60.1%
Simplified60.1%
Final simplification54.6%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* (sin (* y.re (atan2 x.im x.re))) (pow x.re y.re))))
(if (<= y.re -0.13)
t_0
(if (<= y.re -1.85e-209)
(* y.re (cbrt (pow (atan2 x.im x.re) 3.0)))
(if (<= y.re 3.1e+117) (log (pow (exp y.re) (atan2 x.im x.re))) t_0)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = sin((y_46_re * atan2(x_46_im, x_46_re))) * pow(x_46_re, y_46_re);
double tmp;
if (y_46_re <= -0.13) {
tmp = t_0;
} else if (y_46_re <= -1.85e-209) {
tmp = y_46_re * cbrt(pow(atan2(x_46_im, x_46_re), 3.0));
} else if (y_46_re <= 3.1e+117) {
tmp = log(pow(exp(y_46_re), atan2(x_46_im, x_46_re)));
} else {
tmp = 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.sin((y_46_re * Math.atan2(x_46_im, x_46_re))) * Math.pow(x_46_re, y_46_re);
double tmp;
if (y_46_re <= -0.13) {
tmp = t_0;
} else if (y_46_re <= -1.85e-209) {
tmp = y_46_re * Math.cbrt(Math.pow(Math.atan2(x_46_im, x_46_re), 3.0));
} else if (y_46_re <= 3.1e+117) {
tmp = Math.log(Math.pow(Math.exp(y_46_re), Math.atan2(x_46_im, x_46_re)));
} else {
tmp = t_0;
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(sin(Float64(y_46_re * atan(x_46_im, x_46_re))) * (x_46_re ^ y_46_re)) tmp = 0.0 if (y_46_re <= -0.13) tmp = t_0; elseif (y_46_re <= -1.85e-209) tmp = Float64(y_46_re * cbrt((atan(x_46_im, x_46_re) ^ 3.0))); elseif (y_46_re <= 3.1e+117) tmp = log((exp(y_46_re) ^ atan(x_46_im, x_46_re))); else tmp = t_0; end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Power[x$46$re, y$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -0.13], t$95$0, If[LessEqual[y$46$re, -1.85e-209], N[(y$46$re * N[Power[N[Power[N[ArcTan[x$46$im / x$46$re], $MachinePrecision], 3.0], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 3.1e+117], N[Log[N[Power[N[Exp[y$46$re], $MachinePrecision], N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision]], $MachinePrecision], t$95$0]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {x.re}^{y.re}\\
\mathbf{if}\;y.re \leq -0.13:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y.re \leq -1.85 \cdot 10^{-209}:\\
\;\;\;\;y.re \cdot \sqrt[3]{{\tan^{-1}_* \frac{x.im}{x.re}}^{3}}\\
\mathbf{elif}\;y.re \leq 3.1 \cdot 10^{+117}:\\
\;\;\;\;\log \left({\left(e^{y.re}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if y.re < -0.13 or 3.09999999999999975e117 < y.re Initial program 36.4%
fmm-def36.4%
hypot-define36.4%
distribute-rgt-neg-out36.4%
fma-define36.4%
hypot-define83.9%
*-commutative83.9%
Simplified83.9%
Taylor expanded in y.im around 0 74.7%
unpow274.7%
unpow274.7%
hypot-undefine74.7%
Simplified74.7%
Taylor expanded in x.im around 0 61.4%
if -0.13 < y.re < -1.8499999999999999e-209Initial program 45.1%
fmm-def45.1%
hypot-define45.1%
distribute-rgt-neg-out45.1%
fma-define45.1%
hypot-define82.5%
*-commutative82.5%
Simplified82.5%
Taylor expanded in y.im around 0 25.0%
unpow225.0%
unpow225.0%
hypot-undefine30.6%
Simplified30.6%
Taylor expanded in x.re around 0 21.2%
Taylor expanded in y.re around 0 30.6%
add-cbrt-cube32.8%
pow332.8%
Applied egg-rr32.8%
if -1.8499999999999999e-209 < y.re < 3.09999999999999975e117Initial program 37.5%
fmm-def37.5%
hypot-define37.5%
distribute-rgt-neg-out37.5%
fma-define37.5%
hypot-define85.5%
*-commutative85.5%
Simplified85.5%
Taylor expanded in y.im around 0 19.3%
unpow219.3%
unpow219.3%
hypot-undefine24.2%
Simplified24.2%
Taylor expanded in x.re around 0 13.0%
Taylor expanded in y.re around 0 16.5%
add-log-exp31.3%
exp-prod32.3%
Applied egg-rr32.3%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (<= y.im 1.02e+181) (* (sin (* y.re (atan2 x.im x.re))) (pow (hypot x.im x.re) y.re)) (* (exp (* y.im (- (atan2 x.im x.re)))) (sin (* y.im (log x.im))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_im <= 1.02e+181) {
tmp = sin((y_46_re * atan2(x_46_im, x_46_re))) * pow(hypot(x_46_im, x_46_re), y_46_re);
} else {
tmp = exp((y_46_im * -atan2(x_46_im, x_46_re))) * sin((y_46_im * log(x_46_im)));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_im <= 1.02e+181) {
tmp = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re))) * Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
} else {
tmp = Math.exp((y_46_im * -Math.atan2(x_46_im, x_46_re))) * Math.sin((y_46_im * Math.log(x_46_im)));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if y_46_im <= 1.02e+181: tmp = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) * math.pow(math.hypot(x_46_im, x_46_re), y_46_re) else: tmp = math.exp((y_46_im * -math.atan2(x_46_im, x_46_re))) * math.sin((y_46_im * math.log(x_46_im))) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if (y_46_im <= 1.02e+181) tmp = Float64(sin(Float64(y_46_re * atan(x_46_im, x_46_re))) * (hypot(x_46_im, x_46_re) ^ y_46_re)); else tmp = Float64(exp(Float64(y_46_im * Float64(-atan(x_46_im, x_46_re)))) * sin(Float64(y_46_im * log(x_46_im)))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if (y_46_im <= 1.02e+181) tmp = sin((y_46_re * atan2(x_46_im, x_46_re))) * (hypot(x_46_im, x_46_re) ^ y_46_re); else tmp = exp((y_46_im * -atan2(x_46_im, x_46_re))) * sin((y_46_im * log(x_46_im))); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[y$46$im, 1.02e+181], N[(N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], N[(N[Exp[N[(y$46$im * (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(y$46$im * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.im \leq 1.02 \cdot 10^{+181}:\\
\;\;\;\;\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;e^{y.im \cdot \left(-\tan^{-1}_* \frac{x.im}{x.re}\right)} \cdot \sin \left(y.im \cdot \log x.im\right)\\
\end{array}
\end{array}
if y.im < 1.01999999999999991e181Initial program 39.2%
fmm-def39.2%
hypot-define39.2%
distribute-rgt-neg-out39.2%
fma-define39.2%
hypot-define83.6%
*-commutative83.6%
Simplified83.6%
Taylor expanded in y.im around 0 47.7%
unpow247.7%
unpow247.7%
hypot-undefine51.1%
Simplified51.1%
if 1.01999999999999991e181 < y.im Initial program 27.3%
fmm-def27.3%
hypot-define27.3%
distribute-rgt-neg-out27.3%
fma-define27.3%
hypot-define91.7%
*-commutative91.7%
Simplified91.7%
Taylor expanded in y.re around 0 27.3%
Taylor expanded in x.re around 0 60.1%
mul-1-neg60.1%
*-commutative60.1%
distribute-lft-neg-in60.1%
*-commutative60.1%
Simplified60.1%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (<= y.im 2.7e+209) (* (sin (* y.re (atan2 x.im x.re))) (pow (hypot x.im x.re) y.re)) (log (pow (exp y.re) (atan2 x.im x.re)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_im <= 2.7e+209) {
tmp = sin((y_46_re * atan2(x_46_im, x_46_re))) * pow(hypot(x_46_im, x_46_re), y_46_re);
} else {
tmp = log(pow(exp(y_46_re), atan2(x_46_im, x_46_re)));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_im <= 2.7e+209) {
tmp = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re))) * Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
} else {
tmp = Math.log(Math.pow(Math.exp(y_46_re), Math.atan2(x_46_im, x_46_re)));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if y_46_im <= 2.7e+209: tmp = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) * math.pow(math.hypot(x_46_im, x_46_re), y_46_re) else: tmp = math.log(math.pow(math.exp(y_46_re), math.atan2(x_46_im, x_46_re))) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if (y_46_im <= 2.7e+209) tmp = Float64(sin(Float64(y_46_re * atan(x_46_im, x_46_re))) * (hypot(x_46_im, x_46_re) ^ y_46_re)); else tmp = log((exp(y_46_re) ^ atan(x_46_im, x_46_re))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if (y_46_im <= 2.7e+209) tmp = sin((y_46_re * atan2(x_46_im, x_46_re))) * (hypot(x_46_im, x_46_re) ^ y_46_re); else tmp = log((exp(y_46_re) ^ atan2(x_46_im, x_46_re))); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[y$46$im, 2.7e+209], N[(N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], N[Log[N[Power[N[Exp[y$46$re], $MachinePrecision], N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.im \leq 2.7 \cdot 10^{+209}:\\
\;\;\;\;\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;\log \left({\left(e^{y.re}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}\right)\\
\end{array}
\end{array}
if y.im < 2.7e209Initial program 39.2%
fmm-def39.2%
hypot-define39.2%
distribute-rgt-neg-out39.2%
fma-define39.2%
hypot-define83.2%
*-commutative83.2%
Simplified83.2%
Taylor expanded in y.im around 0 47.2%
unpow247.2%
unpow247.2%
hypot-undefine50.5%
Simplified50.5%
if 2.7e209 < y.im Initial program 23.5%
fmm-def23.5%
hypot-define23.5%
distribute-rgt-neg-out23.5%
fma-define23.5%
hypot-define100.0%
*-commutative100.0%
Simplified100.0%
Taylor expanded in y.im around 0 25.3%
unpow225.3%
unpow225.3%
hypot-undefine20.5%
Simplified20.5%
Taylor expanded in x.re around 0 3.0%
Taylor expanded in y.re around 0 3.3%
add-log-exp47.8%
exp-prod53.5%
Applied egg-rr53.5%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re))) (t_1 (* (sin t_0) (pow x.re y.re))))
(if (<= y.re -0.08)
t_1
(if (<= y.re -5.5e-209)
(* y.re (cbrt (pow (atan2 x.im x.re) 3.0)))
(if (<= y.re 2.6e+142) (log (+ 1.0 (expm1 t_0))) t_1)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = sin(t_0) * pow(x_46_re, y_46_re);
double tmp;
if (y_46_re <= -0.08) {
tmp = t_1;
} else if (y_46_re <= -5.5e-209) {
tmp = y_46_re * cbrt(pow(atan2(x_46_im, x_46_re), 3.0));
} else if (y_46_re <= 2.6e+142) {
tmp = log((1.0 + expm1(t_0)));
} 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 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_1 = Math.sin(t_0) * Math.pow(x_46_re, y_46_re);
double tmp;
if (y_46_re <= -0.08) {
tmp = t_1;
} else if (y_46_re <= -5.5e-209) {
tmp = y_46_re * Math.cbrt(Math.pow(Math.atan2(x_46_im, x_46_re), 3.0));
} else if (y_46_re <= 2.6e+142) {
tmp = Math.log((1.0 + Math.expm1(t_0)));
} else {
tmp = t_1;
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_1 = Float64(sin(t_0) * (x_46_re ^ y_46_re)) tmp = 0.0 if (y_46_re <= -0.08) tmp = t_1; elseif (y_46_re <= -5.5e-209) tmp = Float64(y_46_re * cbrt((atan(x_46_im, x_46_re) ^ 3.0))); elseif (y_46_re <= 2.6e+142) tmp = log(Float64(1.0 + expm1(t_0))); else tmp = t_1; end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[Sin[t$95$0], $MachinePrecision] * N[Power[x$46$re, y$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -0.08], t$95$1, If[LessEqual[y$46$re, -5.5e-209], N[(y$46$re * N[Power[N[Power[N[ArcTan[x$46$im / x$46$re], $MachinePrecision], 3.0], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 2.6e+142], N[Log[N[(1.0 + N[(Exp[t$95$0] - 1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := \sin t\_0 \cdot {x.re}^{y.re}\\
\mathbf{if}\;y.re \leq -0.08:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y.re \leq -5.5 \cdot 10^{-209}:\\
\;\;\;\;y.re \cdot \sqrt[3]{{\tan^{-1}_* \frac{x.im}{x.re}}^{3}}\\
\mathbf{elif}\;y.re \leq 2.6 \cdot 10^{+142}:\\
\;\;\;\;\log \left(1 + \mathsf{expm1}\left(t\_0\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y.re < -0.0800000000000000017 or 2.60000000000000021e142 < y.re Initial program 36.3%
fmm-def36.3%
hypot-define36.3%
distribute-rgt-neg-out36.3%
fma-define36.3%
hypot-define83.2%
*-commutative83.2%
Simplified83.2%
Taylor expanded in y.im around 0 75.3%
unpow275.3%
unpow275.3%
hypot-undefine75.3%
Simplified75.3%
Taylor expanded in x.im around 0 61.4%
if -0.0800000000000000017 < y.re < -5.5000000000000001e-209Initial program 45.1%
fmm-def45.1%
hypot-define45.1%
distribute-rgt-neg-out45.1%
fma-define45.1%
hypot-define82.5%
*-commutative82.5%
Simplified82.5%
Taylor expanded in y.im around 0 25.0%
unpow225.0%
unpow225.0%
hypot-undefine30.6%
Simplified30.6%
Taylor expanded in x.re around 0 21.2%
Taylor expanded in y.re around 0 30.6%
add-cbrt-cube32.8%
pow332.8%
Applied egg-rr32.8%
if -5.5000000000000001e-209 < y.re < 2.60000000000000021e142Initial program 37.6%
fmm-def37.6%
hypot-define37.6%
distribute-rgt-neg-out37.6%
fma-define37.6%
hypot-define86.2%
*-commutative86.2%
Simplified86.2%
Taylor expanded in y.im around 0 21.3%
unpow221.3%
unpow221.3%
hypot-undefine26.0%
Simplified26.0%
Taylor expanded in x.re around 0 14.4%
Taylor expanded in y.re around 0 15.9%
log1p-expm1-u27.0%
log1p-undefine32.7%
Applied egg-rr32.7%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re)))
(t_1 (expm1 t_0))
(t_2 (* (sin t_0) (pow x.im y.re))))
(if (<= y.re -6.5e+33)
t_2
(if (<= y.re -3.8e-210)
(log1p t_1)
(if (<= y.re 1.9e+136) (log (+ 1.0 t_1)) t_2)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = expm1(t_0);
double t_2 = sin(t_0) * pow(x_46_im, y_46_re);
double tmp;
if (y_46_re <= -6.5e+33) {
tmp = t_2;
} else if (y_46_re <= -3.8e-210) {
tmp = log1p(t_1);
} else if (y_46_re <= 1.9e+136) {
tmp = log((1.0 + t_1));
} else {
tmp = t_2;
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_1 = Math.expm1(t_0);
double t_2 = Math.sin(t_0) * Math.pow(x_46_im, y_46_re);
double tmp;
if (y_46_re <= -6.5e+33) {
tmp = t_2;
} else if (y_46_re <= -3.8e-210) {
tmp = Math.log1p(t_1);
} else if (y_46_re <= 1.9e+136) {
tmp = Math.log((1.0 + t_1));
} else {
tmp = t_2;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = y_46_re * math.atan2(x_46_im, x_46_re) t_1 = math.expm1(t_0) t_2 = math.sin(t_0) * math.pow(x_46_im, y_46_re) tmp = 0 if y_46_re <= -6.5e+33: tmp = t_2 elif y_46_re <= -3.8e-210: tmp = math.log1p(t_1) elif y_46_re <= 1.9e+136: tmp = math.log((1.0 + t_1)) else: tmp = t_2 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_1 = expm1(t_0) t_2 = Float64(sin(t_0) * (x_46_im ^ y_46_re)) tmp = 0.0 if (y_46_re <= -6.5e+33) tmp = t_2; elseif (y_46_re <= -3.8e-210) tmp = log1p(t_1); elseif (y_46_re <= 1.9e+136) tmp = log(Float64(1.0 + t_1)); else tmp = t_2; end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(Exp[t$95$0] - 1), $MachinePrecision]}, Block[{t$95$2 = N[(N[Sin[t$95$0], $MachinePrecision] * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -6.5e+33], t$95$2, If[LessEqual[y$46$re, -3.8e-210], N[Log[1 + t$95$1], $MachinePrecision], If[LessEqual[y$46$re, 1.9e+136], N[Log[N[(1.0 + t$95$1), $MachinePrecision]], $MachinePrecision], t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := \mathsf{expm1}\left(t\_0\right)\\
t_2 := \sin t\_0 \cdot {x.im}^{y.re}\\
\mathbf{if}\;y.re \leq -6.5 \cdot 10^{+33}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y.re \leq -3.8 \cdot 10^{-210}:\\
\;\;\;\;\mathsf{log1p}\left(t\_1\right)\\
\mathbf{elif}\;y.re \leq 1.9 \cdot 10^{+136}:\\
\;\;\;\;\log \left(1 + t\_1\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y.re < -6.49999999999999993e33 or 1.90000000000000007e136 < y.re Initial program 37.3%
fmm-def37.3%
hypot-define37.3%
distribute-rgt-neg-out37.3%
fma-define37.3%
hypot-define83.6%
*-commutative83.6%
Simplified83.6%
Taylor expanded in y.im around 0 75.6%
unpow275.6%
unpow275.6%
hypot-undefine75.6%
Simplified75.6%
Taylor expanded in x.re around 0 56.8%
if -6.49999999999999993e33 < y.re < -3.80000000000000003e-210Initial program 43.3%
fmm-def43.3%
hypot-define43.3%
distribute-rgt-neg-out43.3%
fma-define43.3%
hypot-define81.8%
*-commutative81.8%
Simplified81.8%
Taylor expanded in y.im around 0 27.3%
unpow227.3%
unpow227.3%
hypot-undefine32.4%
Simplified32.4%
Taylor expanded in x.re around 0 19.3%
Taylor expanded in y.re around 0 30.2%
log1p-expm1-u32.4%
Applied egg-rr32.4%
if -3.80000000000000003e-210 < y.re < 1.90000000000000007e136Initial program 37.0%
fmm-def37.0%
hypot-define37.0%
distribute-rgt-neg-out37.0%
fma-define37.0%
hypot-define86.1%
*-commutative86.1%
Simplified86.1%
Taylor expanded in y.im around 0 21.5%
unpow221.5%
unpow221.5%
hypot-undefine26.2%
Simplified26.2%
Taylor expanded in x.re around 0 14.5%
Taylor expanded in y.re around 0 16.0%
log1p-expm1-u27.3%
log1p-undefine33.0%
Applied egg-rr33.0%
(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 -2.15e-15) (not (<= y.im 4.6e-110)))
(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 <= -2.15e-15) || !(y_46_im <= 4.6e-110)) {
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 <= -2.15e-15) || !(y_46_im <= 4.6e-110)) {
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 <= -2.15e-15) or not (y_46_im <= 4.6e-110): 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 <= -2.15e-15) || !(y_46_im <= 4.6e-110)) 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, -2.15e-15], N[Not[LessEqual[y$46$im, 4.6e-110]], $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 -2.15 \cdot 10^{-15} \lor \neg \left(y.im \leq 4.6 \cdot 10^{-110}\right):\\
\;\;\;\;\log \left(1 + t\_0\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{log1p}\left(t\_0\right)\\
\end{array}
\end{array}
if y.im < -2.1499999999999998e-15 or 4.6000000000000003e-110 < y.im Initial program 39.1%
fmm-def39.1%
hypot-define39.1%
distribute-rgt-neg-out39.1%
fma-define39.1%
hypot-define80.4%
*-commutative80.4%
Simplified80.4%
Taylor expanded in y.im around 0 43.2%
unpow243.2%
unpow243.2%
hypot-undefine37.8%
Simplified37.8%
Taylor expanded in x.re around 0 29.9%
Taylor expanded in y.re around 0 4.5%
log1p-expm1-u18.7%
log1p-undefine36.5%
Applied egg-rr36.5%
if -2.1499999999999998e-15 < y.im < 4.6000000000000003e-110Initial program 36.8%
fmm-def36.8%
hypot-define36.8%
distribute-rgt-neg-out36.8%
fma-define36.8%
hypot-define90.1%
*-commutative90.1%
Simplified90.1%
Taylor expanded in y.im around 0 49.5%
unpow249.5%
unpow249.5%
hypot-undefine64.3%
Simplified64.3%
Taylor expanded in x.re around 0 38.9%
Taylor expanded in y.re around 0 27.6%
log1p-expm1-u33.8%
Applied egg-rr33.8%
Final simplification35.4%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (<= x.re 8.6e-101) (log1p (expm1 (* y.re (atan2 x.im x.re)))) (* y.re (log (exp (atan2 x.im x.re))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (x_46_re <= 8.6e-101) {
tmp = log1p(expm1((y_46_re * atan2(x_46_im, x_46_re))));
} else {
tmp = y_46_re * log(exp(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 tmp;
if (x_46_re <= 8.6e-101) {
tmp = Math.log1p(Math.expm1((y_46_re * Math.atan2(x_46_im, x_46_re))));
} else {
tmp = y_46_re * Math.log(Math.exp(Math.atan2(x_46_im, x_46_re)));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if x_46_re <= 8.6e-101: tmp = math.log1p(math.expm1((y_46_re * math.atan2(x_46_im, x_46_re)))) else: tmp = y_46_re * math.log(math.exp(math.atan2(x_46_im, x_46_re))) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if (x_46_re <= 8.6e-101) tmp = log1p(expm1(Float64(y_46_re * atan(x_46_im, x_46_re)))); else tmp = Float64(y_46_re * log(exp(atan(x_46_im, x_46_re)))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[x$46$re, 8.6e-101], N[Log[1 + N[(Exp[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]] - 1), $MachinePrecision]], $MachinePrecision], N[(y$46$re * N[Log[N[Exp[N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x.re \leq 8.6 \cdot 10^{-101}:\\
\;\;\;\;\mathsf{log1p}\left(\mathsf{expm1}\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y.re \cdot \log \left(e^{\tan^{-1}_* \frac{x.im}{x.re}}\right)\\
\end{array}
\end{array}
if x.re < 8.5999999999999995e-101Initial program 38.0%
fmm-def38.0%
hypot-define38.0%
distribute-rgt-neg-out38.0%
fma-define38.0%
hypot-define83.6%
*-commutative83.6%
Simplified83.6%
Taylor expanded in y.im around 0 46.0%
unpow246.0%
unpow246.0%
hypot-undefine50.1%
Simplified50.1%
Taylor expanded in x.re around 0 37.3%
Taylor expanded in y.re around 0 14.7%
log1p-expm1-u31.7%
Applied egg-rr31.7%
if 8.5999999999999995e-101 < x.re Initial program 38.5%
fmm-def38.5%
hypot-define38.5%
distribute-rgt-neg-out38.5%
fma-define38.5%
hypot-define85.5%
*-commutative85.5%
Simplified85.5%
Taylor expanded in y.im around 0 45.2%
unpow245.2%
unpow245.2%
hypot-undefine45.7%
Simplified45.7%
Taylor expanded in x.re around 0 27.1%
Taylor expanded in y.re around 0 12.5%
add-log-exp31.2%
Applied egg-rr31.2%
(FPCore (x.re x.im y.re y.im) :precision binary64 (log1p (expm1 (* y.re (atan2 x.im x.re)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return log1p(expm1((y_46_re * atan2(x_46_im, x_46_re))));
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return Math.log1p(Math.expm1((y_46_re * Math.atan2(x_46_im, x_46_re))));
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): return math.log1p(math.expm1((y_46_re * math.atan2(x_46_im, x_46_re))))
function code(x_46_re, x_46_im, y_46_re, y_46_im) return log1p(expm1(Float64(y_46_re * atan(x_46_im, x_46_re)))) end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[Log[1 + N[(Exp[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]] - 1), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\mathsf{log1p}\left(\mathsf{expm1}\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)
\end{array}
Initial program 38.2%
fmm-def38.2%
hypot-define38.2%
distribute-rgt-neg-out38.2%
fma-define38.2%
hypot-define84.3%
*-commutative84.3%
Simplified84.3%
Taylor expanded in y.im around 0 45.7%
unpow245.7%
unpow245.7%
hypot-undefine48.5%
Simplified48.5%
Taylor expanded in x.re around 0 33.5%
Taylor expanded in y.re around 0 13.8%
log1p-expm1-u24.8%
Applied egg-rr24.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 38.2%
fmm-def38.2%
hypot-define38.2%
distribute-rgt-neg-out38.2%
fma-define38.2%
hypot-define84.3%
*-commutative84.3%
Simplified84.3%
Taylor expanded in y.im around 0 45.7%
unpow245.7%
unpow245.7%
hypot-undefine48.5%
Simplified48.5%
Taylor expanded in x.re around 0 33.5%
Taylor expanded in y.re around 0 13.8%
herbie shell --seed 2024131
(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)))))