
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (sqrt (+ (* x.re x.re) (* x.im x.im))))))
(*
(exp (- (* t_0 y.re) (* (atan2 x.im x.re) y.im)))
(sin (+ (* t_0 y.im) (* (atan2 x.im x.re) y.re))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
return exp(((t_0 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin(((t_0 * y_46_im) + (atan2(x_46_im, x_46_re) * y_46_re)));
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
t_0 = log(sqrt(((x_46re * x_46re) + (x_46im * x_46im))))
code = exp(((t_0 * y_46re) - (atan2(x_46im, x_46re) * y_46im))) * sin(((t_0 * y_46im) + (atan2(x_46im, x_46re) * y_46re)))
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
return Math.exp(((t_0 * y_46_re) - (Math.atan2(x_46_im, x_46_re) * y_46_im))) * Math.sin(((t_0 * y_46_im) + (Math.atan2(x_46_im, x_46_re) * y_46_re)));
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) return math.exp(((t_0 * y_46_re) - (math.atan2(x_46_im, x_46_re) * y_46_im))) * math.sin(((t_0 * y_46_im) + (math.atan2(x_46_im, x_46_re) * y_46_re)))
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) return Float64(exp(Float64(Float64(t_0 * y_46_re) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * sin(Float64(Float64(t_0 * y_46_im) + Float64(atan(x_46_im, x_46_re) * y_46_re)))) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))); tmp = exp(((t_0 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin(((t_0 * y_46_im) + (atan2(x_46_im, x_46_re) * y_46_re))); end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]}, N[(N[Exp[N[(N[(t$95$0 * y$46$re), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(N[(t$95$0 * y$46$im), $MachinePrecision] + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)\\
e^{t\_0 \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(t\_0 \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)
\end{array}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 23 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (sqrt (+ (* x.re x.re) (* x.im x.im))))))
(*
(exp (- (* t_0 y.re) (* (atan2 x.im x.re) y.im)))
(sin (+ (* t_0 y.im) (* (atan2 x.im x.re) y.re))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
return exp(((t_0 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin(((t_0 * y_46_im) + (atan2(x_46_im, x_46_re) * y_46_re)));
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
t_0 = log(sqrt(((x_46re * x_46re) + (x_46im * x_46im))))
code = exp(((t_0 * y_46re) - (atan2(x_46im, x_46re) * y_46im))) * sin(((t_0 * y_46im) + (atan2(x_46im, x_46re) * y_46re)))
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
return Math.exp(((t_0 * y_46_re) - (Math.atan2(x_46_im, x_46_re) * y_46_im))) * Math.sin(((t_0 * y_46_im) + (Math.atan2(x_46_im, x_46_re) * y_46_re)));
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) return math.exp(((t_0 * y_46_re) - (math.atan2(x_46_im, x_46_re) * y_46_im))) * math.sin(((t_0 * y_46_im) + (math.atan2(x_46_im, x_46_re) * y_46_re)))
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) return Float64(exp(Float64(Float64(t_0 * y_46_re) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * sin(Float64(Float64(t_0 * y_46_im) + Float64(atan(x_46_im, x_46_re) * y_46_re)))) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))); tmp = exp(((t_0 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin(((t_0 * y_46_im) + (atan2(x_46_im, x_46_re) * y_46_re))); end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]}, N[(N[Exp[N[(N[(t$95$0 * y$46$re), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(N[(t$95$0 * y$46$im), $MachinePrecision] + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)\\
e^{t\_0 \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(t\_0 \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)
\end{array}
\end{array}
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re)))
(t_1
(exp
(-
(* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(* (atan2 x.im x.re) y.im)))))
(if (<= y.re -1.15e-11)
(* t_1 (sin t_0))
(if (<= y.re 2.55e-8)
(*
(sin (fma (log (hypot x.re x.im)) y.im t_0))
(/ (pow (hypot x.re x.im) y.re) (pow (exp y.im) (atan2 x.im x.re))))
(* t_1 (sin (* y.im (log (hypot x.im x.re)))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (atan2(x_46_im, x_46_re) * y_46_im)));
double tmp;
if (y_46_re <= -1.15e-11) {
tmp = t_1 * sin(t_0);
} else if (y_46_re <= 2.55e-8) {
tmp = sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_0)) * (pow(hypot(x_46_re, x_46_im), y_46_re) / pow(exp(y_46_im), atan2(x_46_im, x_46_re)));
} else {
tmp = t_1 * sin((y_46_im * log(hypot(x_46_im, x_46_re))));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_1 = exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - Float64(atan(x_46_im, x_46_re) * y_46_im))) tmp = 0.0 if (y_46_re <= -1.15e-11) tmp = Float64(t_1 * sin(t_0)); elseif (y_46_re <= 2.55e-8) tmp = Float64(sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_0)) * Float64((hypot(x_46_re, x_46_im) ^ y_46_re) / (exp(y_46_im) ^ atan(x_46_im, x_46_re)))); else tmp = Float64(t_1 * sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re))))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -1.15e-11], N[(t$95$1 * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 2.55e-8], 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[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] / N[Power[N[Exp[y$46$im], $MachinePrecision], N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\
\mathbf{if}\;y.re \leq -1.15 \cdot 10^{-11}:\\
\;\;\;\;t\_1 \cdot \sin t\_0\\
\mathbf{elif}\;y.re \leq 2.55 \cdot 10^{-8}:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, t\_0\right)\right) \cdot \frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{{\left(e^{y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}}\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\end{array}
\end{array}
if y.re < -1.15000000000000007e-11Initial program 50.0%
Taylor expanded in y.im around 0 76.5%
if -1.15000000000000007e-11 < y.re < 2.55e-8Initial program 41.1%
exp-diff41.1%
exp-to-pow41.1%
hypot-define41.1%
*-commutative41.1%
exp-prod41.1%
fma-define41.1%
hypot-define84.0%
*-commutative84.0%
Simplified84.0%
if 2.55e-8 < y.re Initial program 50.0%
Taylor expanded in y.re around 0 51.7%
unpow251.7%
unpow251.7%
hypot-undefine80.0%
Simplified80.0%
Final simplification81.0%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.re x.im))))
(*
(exp (fma t_0 y.re (* (atan2 x.im x.re) (- y.im))))
(sin (fma t_0 y.im (* y.re (atan2 x.im x.re)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(hypot(x_46_re, x_46_im));
return exp(fma(t_0, y_46_re, (atan2(x_46_im, x_46_re) * -y_46_im))) * sin(fma(t_0, y_46_im, (y_46_re * atan2(x_46_im, x_46_re))));
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_re, x_46_im)) return Float64(exp(fma(t_0, y_46_re, Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))) * sin(fma(t_0, y_46_im, Float64(y_46_re * atan(x_46_im, x_46_re))))) end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, N[(N[Exp[N[(t$95$0 * y$46$re + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(t$95$0 * y$46$im + N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
e^{\mathsf{fma}\left(t\_0, y.re, \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)\right)} \cdot \sin \left(\mathsf{fma}\left(t\_0, y.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)
\end{array}
\end{array}
Initial program 45.7%
fma-neg45.7%
hypot-define45.7%
distribute-rgt-neg-out45.7%
fma-define45.7%
hypot-define80.5%
*-commutative80.5%
Simplified80.5%
Final simplification80.5%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.im x.re)))
(t_1
(exp
(-
(* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(* (atan2 x.im x.re) y.im)))))
(if (<= y.re -1.15e-11)
(* t_1 (sin (* y.re (atan2 x.im x.re))))
(if (<= y.re 2.55e-8)
(*
(/ (pow (hypot x.re x.im) y.re) (pow (exp y.im) (atan2 x.im x.re)))
(sin (* y.im (+ t_0 (* y.re (/ (atan2 x.im x.re) y.im))))))
(* t_1 (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 t_1 = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (atan2(x_46_im, x_46_re) * y_46_im)));
double tmp;
if (y_46_re <= -1.15e-11) {
tmp = t_1 * sin((y_46_re * atan2(x_46_im, x_46_re)));
} else if (y_46_re <= 2.55e-8) {
tmp = (pow(hypot(x_46_re, x_46_im), y_46_re) / pow(exp(y_46_im), atan2(x_46_im, x_46_re))) * sin((y_46_im * (t_0 + (y_46_re * (atan2(x_46_im, x_46_re) / y_46_im)))));
} else {
tmp = t_1 * 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 t_1 = Math.exp(((y_46_re * Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (Math.atan2(x_46_im, x_46_re) * y_46_im)));
double tmp;
if (y_46_re <= -1.15e-11) {
tmp = t_1 * Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
} else if (y_46_re <= 2.55e-8) {
tmp = (Math.pow(Math.hypot(x_46_re, x_46_im), y_46_re) / Math.pow(Math.exp(y_46_im), Math.atan2(x_46_im, x_46_re))) * Math.sin((y_46_im * (t_0 + (y_46_re * (Math.atan2(x_46_im, x_46_re) / y_46_im)))));
} else {
tmp = t_1 * 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)) t_1 = math.exp(((y_46_re * math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (math.atan2(x_46_im, x_46_re) * y_46_im))) tmp = 0 if y_46_re <= -1.15e-11: tmp = t_1 * math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) elif y_46_re <= 2.55e-8: tmp = (math.pow(math.hypot(x_46_re, x_46_im), y_46_re) / math.pow(math.exp(y_46_im), math.atan2(x_46_im, x_46_re))) * math.sin((y_46_im * (t_0 + (y_46_re * (math.atan2(x_46_im, x_46_re) / y_46_im))))) else: tmp = t_1 * 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)) t_1 = exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - Float64(atan(x_46_im, x_46_re) * y_46_im))) tmp = 0.0 if (y_46_re <= -1.15e-11) tmp = Float64(t_1 * sin(Float64(y_46_re * atan(x_46_im, x_46_re)))); elseif (y_46_re <= 2.55e-8) tmp = Float64(Float64((hypot(x_46_re, x_46_im) ^ y_46_re) / (exp(y_46_im) ^ atan(x_46_im, x_46_re))) * sin(Float64(y_46_im * Float64(t_0 + Float64(y_46_re * Float64(atan(x_46_im, x_46_re) / y_46_im)))))); else tmp = Float64(t_1 * 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)); t_1 = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (atan2(x_46_im, x_46_re) * y_46_im))); tmp = 0.0; if (y_46_re <= -1.15e-11) tmp = t_1 * sin((y_46_re * atan2(x_46_im, x_46_re))); elseif (y_46_re <= 2.55e-8) tmp = ((hypot(x_46_re, x_46_im) ^ y_46_re) / (exp(y_46_im) ^ atan2(x_46_im, x_46_re))) * sin((y_46_im * (t_0 + (y_46_re * (atan2(x_46_im, x_46_re) / y_46_im))))); else tmp = t_1 * 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]}, Block[{t$95$1 = N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -1.15e-11], N[(t$95$1 * N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 2.55e-8], N[(N[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] / N[Power[N[Exp[y$46$im], $MachinePrecision], N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[Sin[N[(y$46$im * N[(t$95$0 + N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] / y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[Sin[N[(y$46$im * t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
t_1 := e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\
\mathbf{if}\;y.re \leq -1.15 \cdot 10^{-11}:\\
\;\;\;\;t\_1 \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{elif}\;y.re \leq 2.55 \cdot 10^{-8}:\\
\;\;\;\;\frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{{\left(e^{y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}} \cdot \sin \left(y.im \cdot \left(t\_0 + y.re \cdot \frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.im}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot \sin \left(y.im \cdot t\_0\right)\\
\end{array}
\end{array}
if y.re < -1.15000000000000007e-11Initial program 50.0%
Taylor expanded in y.im around 0 76.5%
if -1.15000000000000007e-11 < y.re < 2.55e-8Initial program 41.1%
exp-diff41.1%
exp-to-pow41.1%
hypot-define41.1%
*-commutative41.1%
exp-prod41.1%
fma-define41.1%
hypot-define84.0%
*-commutative84.0%
Simplified84.0%
Taylor expanded in y.im around inf 41.0%
unpow226.2%
unpow226.2%
hypot-undefine57.3%
associate-/l*57.3%
Simplified83.9%
if 2.55e-8 < y.re Initial program 50.0%
Taylor expanded in y.re around 0 51.7%
unpow251.7%
unpow251.7%
hypot-undefine80.0%
Simplified80.0%
Final simplification80.9%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.im x.re)))
(t_1
(exp
(-
(* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(* (atan2 x.im x.re) y.im)))))
(if (<= y.re -1.15e-11)
(* t_1 (sin (* y.re (atan2 x.im x.re))))
(if (<= y.re 2.55e-8)
(*
(/ (pow (hypot x.re x.im) y.re) (pow (exp y.im) (atan2 x.im x.re)))
(sin (* y.im (+ t_0 (* (atan2 x.im x.re) (/ y.re y.im))))))
(* t_1 (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 t_1 = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (atan2(x_46_im, x_46_re) * y_46_im)));
double tmp;
if (y_46_re <= -1.15e-11) {
tmp = t_1 * sin((y_46_re * atan2(x_46_im, x_46_re)));
} else if (y_46_re <= 2.55e-8) {
tmp = (pow(hypot(x_46_re, x_46_im), y_46_re) / pow(exp(y_46_im), atan2(x_46_im, x_46_re))) * sin((y_46_im * (t_0 + (atan2(x_46_im, x_46_re) * (y_46_re / y_46_im)))));
} else {
tmp = t_1 * 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 t_1 = Math.exp(((y_46_re * Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (Math.atan2(x_46_im, x_46_re) * y_46_im)));
double tmp;
if (y_46_re <= -1.15e-11) {
tmp = t_1 * Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
} else if (y_46_re <= 2.55e-8) {
tmp = (Math.pow(Math.hypot(x_46_re, x_46_im), y_46_re) / Math.pow(Math.exp(y_46_im), Math.atan2(x_46_im, x_46_re))) * Math.sin((y_46_im * (t_0 + (Math.atan2(x_46_im, x_46_re) * (y_46_re / y_46_im)))));
} else {
tmp = t_1 * 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)) t_1 = math.exp(((y_46_re * math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (math.atan2(x_46_im, x_46_re) * y_46_im))) tmp = 0 if y_46_re <= -1.15e-11: tmp = t_1 * math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) elif y_46_re <= 2.55e-8: tmp = (math.pow(math.hypot(x_46_re, x_46_im), y_46_re) / math.pow(math.exp(y_46_im), math.atan2(x_46_im, x_46_re))) * math.sin((y_46_im * (t_0 + (math.atan2(x_46_im, x_46_re) * (y_46_re / y_46_im))))) else: tmp = t_1 * 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)) t_1 = exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - Float64(atan(x_46_im, x_46_re) * y_46_im))) tmp = 0.0 if (y_46_re <= -1.15e-11) tmp = Float64(t_1 * sin(Float64(y_46_re * atan(x_46_im, x_46_re)))); elseif (y_46_re <= 2.55e-8) tmp = Float64(Float64((hypot(x_46_re, x_46_im) ^ y_46_re) / (exp(y_46_im) ^ atan(x_46_im, x_46_re))) * sin(Float64(y_46_im * Float64(t_0 + Float64(atan(x_46_im, x_46_re) * Float64(y_46_re / y_46_im)))))); else tmp = Float64(t_1 * 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)); t_1 = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (atan2(x_46_im, x_46_re) * y_46_im))); tmp = 0.0; if (y_46_re <= -1.15e-11) tmp = t_1 * sin((y_46_re * atan2(x_46_im, x_46_re))); elseif (y_46_re <= 2.55e-8) tmp = ((hypot(x_46_re, x_46_im) ^ y_46_re) / (exp(y_46_im) ^ atan2(x_46_im, x_46_re))) * sin((y_46_im * (t_0 + (atan2(x_46_im, x_46_re) * (y_46_re / y_46_im))))); else tmp = t_1 * 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]}, Block[{t$95$1 = N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -1.15e-11], N[(t$95$1 * N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 2.55e-8], N[(N[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] / N[Power[N[Exp[y$46$im], $MachinePrecision], N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[Sin[N[(y$46$im * N[(t$95$0 + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[(y$46$re / y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[Sin[N[(y$46$im * t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
t_1 := e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\
\mathbf{if}\;y.re \leq -1.15 \cdot 10^{-11}:\\
\;\;\;\;t\_1 \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{elif}\;y.re \leq 2.55 \cdot 10^{-8}:\\
\;\;\;\;\frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{{\left(e^{y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}} \cdot \sin \left(y.im \cdot \left(t\_0 + \tan^{-1}_* \frac{x.im}{x.re} \cdot \frac{y.re}{y.im}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot \sin \left(y.im \cdot t\_0\right)\\
\end{array}
\end{array}
if y.re < -1.15000000000000007e-11Initial program 50.0%
Taylor expanded in y.im around 0 76.5%
if -1.15000000000000007e-11 < y.re < 2.55e-8Initial program 41.1%
exp-diff41.1%
exp-to-pow41.1%
hypot-define41.1%
*-commutative41.1%
exp-prod41.1%
fma-define41.1%
hypot-define84.0%
*-commutative84.0%
Simplified84.0%
Taylor expanded in y.im around inf 41.0%
unpow226.2%
unpow226.2%
hypot-undefine57.3%
associate-/l*57.3%
Simplified83.9%
clear-num83.8%
un-div-inv83.9%
Applied egg-rr83.9%
associate-/r/83.9%
Simplified83.9%
if 2.55e-8 < y.re Initial program 50.0%
Taylor expanded in y.re around 0 51.7%
unpow251.7%
unpow251.7%
hypot-undefine80.0%
Simplified80.0%
Final simplification80.9%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re)))
(t_1
(exp
(-
(* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(* (atan2 x.im x.re) y.im)))))
(if (<= y.re -1.1e-11)
(* t_1 (sin t_0))
(if (<= y.re 2.55e-8)
(*
(sin (fma (log (hypot x.re x.im)) y.im t_0))
(exp (* (atan2 x.im x.re) (- y.im))))
(* t_1 (sin (* y.im (log (hypot x.im x.re)))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (atan2(x_46_im, x_46_re) * y_46_im)));
double tmp;
if (y_46_re <= -1.1e-11) {
tmp = t_1 * sin(t_0);
} else if (y_46_re <= 2.55e-8) {
tmp = sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_0)) * exp((atan2(x_46_im, x_46_re) * -y_46_im));
} else {
tmp = t_1 * sin((y_46_im * log(hypot(x_46_im, x_46_re))));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_1 = exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - Float64(atan(x_46_im, x_46_re) * y_46_im))) tmp = 0.0 if (y_46_re <= -1.1e-11) tmp = Float64(t_1 * sin(t_0)); elseif (y_46_re <= 2.55e-8) tmp = Float64(sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_0)) * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))); else tmp = Float64(t_1 * sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re))))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -1.1e-11], N[(t$95$1 * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 2.55e-8], N[(N[Sin[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im + t$95$0), $MachinePrecision]], $MachinePrecision] * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\
\mathbf{if}\;y.re \leq -1.1 \cdot 10^{-11}:\\
\;\;\;\;t\_1 \cdot \sin t\_0\\
\mathbf{elif}\;y.re \leq 2.55 \cdot 10^{-8}:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, t\_0\right)\right) \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\end{array}
\end{array}
if y.re < -1.1000000000000001e-11Initial program 50.0%
Taylor expanded in y.im around 0 76.5%
if -1.1000000000000001e-11 < y.re < 2.55e-8Initial program 41.1%
exp-diff41.1%
exp-to-pow41.1%
hypot-define41.1%
*-commutative41.1%
exp-prod41.1%
fma-define41.1%
hypot-define84.0%
*-commutative84.0%
Simplified84.0%
Taylor expanded in y.re around 0 83.6%
rec-exp36.7%
distribute-lft-neg-in36.7%
Simplified83.6%
if 2.55e-8 < y.re Initial program 50.0%
Taylor expanded in y.re around 0 51.7%
unpow251.7%
unpow251.7%
hypot-undefine80.0%
Simplified80.0%
Final simplification80.8%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re))))
(if (<= y.re -6.2e-12)
(*
(exp
(-
(* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(* (atan2 x.im x.re) y.im)))
(sin t_0))
(if (<= y.re 1.05)
(*
(sin (fma (log (hypot x.re x.im)) y.im t_0))
(exp (* (atan2 x.im x.re) (- y.im))))
(*
(sin (* y.im (log (hypot x.im x.re))))
(pow (hypot x.im x.re) y.re))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if (y_46_re <= -6.2e-12) {
tmp = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin(t_0);
} else if (y_46_re <= 1.05) {
tmp = sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_0)) * exp((atan2(x_46_im, x_46_re) * -y_46_im));
} else {
tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) * pow(hypot(x_46_im, x_46_re), y_46_re);
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) tmp = 0.0 if (y_46_re <= -6.2e-12) tmp = Float64(exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * sin(t_0)); elseif (y_46_re <= 1.05) tmp = Float64(sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_0)) * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))); else tmp = Float64(sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) * (hypot(x_46_im, x_46_re) ^ y_46_re)); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -6.2e-12], N[(N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 1.05], N[(N[Sin[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im + t$95$0), $MachinePrecision]], $MachinePrecision] * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.re \leq -6.2 \cdot 10^{-12}:\\
\;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin t\_0\\
\mathbf{elif}\;y.re \leq 1.05:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, t\_0\right)\right) \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\
\mathbf{else}:\\
\;\;\;\;\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\end{array}
\end{array}
if y.re < -6.2000000000000002e-12Initial program 50.0%
Taylor expanded in y.im around 0 76.5%
if -6.2000000000000002e-12 < y.re < 1.05000000000000004Initial program 41.5%
exp-diff41.5%
exp-to-pow41.5%
hypot-define41.5%
*-commutative41.5%
exp-prod41.5%
fma-define41.5%
hypot-define84.1%
*-commutative84.1%
Simplified84.1%
Taylor expanded in y.re around 0 83.7%
rec-exp37.2%
distribute-lft-neg-in37.2%
Simplified83.7%
if 1.05000000000000004 < y.re Initial program 49.2%
exp-diff37.3%
exp-to-pow37.3%
hypot-define37.3%
*-commutative37.3%
exp-prod37.3%
fma-define37.3%
hypot-define61.0%
*-commutative61.0%
Simplified61.0%
Taylor expanded in y.im around 0 69.6%
unpow269.6%
unpow269.6%
hypot-undefine69.6%
Simplified69.6%
Taylor expanded in y.im around inf 47.5%
unpow247.5%
unpow247.5%
hypot-undefine76.4%
Simplified76.4%
Final simplification80.0%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (pow (hypot x.im x.re) y.re))
(t_1 (* (sin (* y.re (atan2 x.im x.re))) t_0))
(t_2 (log (+ 1.0 (expm1 t_1))))
(t_3 (* (sin (* y.im (log (hypot x.im x.re)))) t_0)))
(if (<= y.im -4800000000.0)
t_2
(if (<= y.im -3.45e-181)
t_3
(if (<= y.im 7.9e-146) t_1 (if (<= y.im 106000.0) t_3 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 = sin((y_46_re * atan2(x_46_im, x_46_re))) * t_0;
double t_2 = log((1.0 + expm1(t_1)));
double t_3 = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) * t_0;
double tmp;
if (y_46_im <= -4800000000.0) {
tmp = t_2;
} else if (y_46_im <= -3.45e-181) {
tmp = t_3;
} else if (y_46_im <= 7.9e-146) {
tmp = t_1;
} else if (y_46_im <= 106000.0) {
tmp = t_3;
} 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.sin((y_46_re * Math.atan2(x_46_im, x_46_re))) * t_0;
double t_2 = Math.log((1.0 + Math.expm1(t_1)));
double t_3 = Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re)))) * t_0;
double tmp;
if (y_46_im <= -4800000000.0) {
tmp = t_2;
} else if (y_46_im <= -3.45e-181) {
tmp = t_3;
} else if (y_46_im <= 7.9e-146) {
tmp = t_1;
} else if (y_46_im <= 106000.0) {
tmp = t_3;
} 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.sin((y_46_re * math.atan2(x_46_im, x_46_re))) * t_0 t_2 = math.log((1.0 + math.expm1(t_1))) t_3 = math.sin((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) * t_0 tmp = 0 if y_46_im <= -4800000000.0: tmp = t_2 elif y_46_im <= -3.45e-181: tmp = t_3 elif y_46_im <= 7.9e-146: tmp = t_1 elif y_46_im <= 106000.0: tmp = t_3 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 = Float64(sin(Float64(y_46_re * atan(x_46_im, x_46_re))) * t_0) t_2 = log(Float64(1.0 + expm1(t_1))) t_3 = Float64(sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) * t_0) tmp = 0.0 if (y_46_im <= -4800000000.0) tmp = t_2; elseif (y_46_im <= -3.45e-181) tmp = t_3; elseif (y_46_im <= 7.9e-146) tmp = t_1; elseif (y_46_im <= 106000.0) tmp = t_3; 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[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, Block[{t$95$1 = N[(N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$0), $MachinePrecision]}, Block[{t$95$2 = N[Log[N[(1.0 + N[(Exp[t$95$1] - 1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[(N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$0), $MachinePrecision]}, If[LessEqual[y$46$im, -4800000000.0], t$95$2, If[LessEqual[y$46$im, -3.45e-181], t$95$3, If[LessEqual[y$46$im, 7.9e-146], t$95$1, If[LessEqual[y$46$im, 106000.0], t$95$3, 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 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot t\_0\\
t_2 := \log \left(1 + \mathsf{expm1}\left(t\_1\right)\right)\\
t_3 := \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \cdot t\_0\\
\mathbf{if}\;y.im \leq -4800000000:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y.im \leq -3.45 \cdot 10^{-181}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;y.im \leq 7.9 \cdot 10^{-146}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y.im \leq 106000:\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y.im < -4.8e9 or 106000 < y.im Initial program 40.7%
exp-diff29.2%
exp-to-pow29.2%
hypot-define29.2%
*-commutative29.2%
exp-prod27.4%
fma-define27.4%
hypot-define51.8%
*-commutative51.8%
Simplified51.8%
Taylor expanded in y.im around 0 40.9%
unpow240.9%
unpow240.9%
hypot-undefine33.5%
Simplified33.5%
Taylor expanded in y.im around 0 40.2%
unpow240.2%
unpow240.2%
hypot-undefine34.6%
Simplified34.6%
log1p-expm1-u34.6%
log1p-undefine53.8%
Applied egg-rr53.8%
if -4.8e9 < y.im < -3.45000000000000026e-181 or 7.90000000000000013e-146 < y.im < 106000Initial program 47.6%
exp-diff46.4%
exp-to-pow46.4%
hypot-define46.4%
*-commutative46.4%
exp-prod46.4%
fma-define46.4%
hypot-define89.3%
*-commutative89.3%
Simplified89.3%
Taylor expanded in y.im around 0 64.8%
unpow264.8%
unpow264.8%
hypot-undefine89.1%
Simplified89.1%
Taylor expanded in y.im around inf 42.5%
unpow242.5%
unpow242.5%
hypot-undefine82.9%
Simplified82.9%
if -3.45000000000000026e-181 < y.im < 7.90000000000000013e-146Initial program 52.6%
exp-diff52.6%
exp-to-pow52.6%
hypot-define52.6%
*-commutative52.6%
exp-prod52.6%
fma-define52.6%
hypot-define87.5%
*-commutative87.5%
Simplified87.5%
Taylor expanded in y.im around 0 60.7%
unpow260.7%
unpow260.7%
hypot-undefine87.5%
Simplified87.5%
Taylor expanded in y.im around 0 57.3%
unpow257.3%
unpow257.3%
hypot-undefine79.9%
Simplified79.9%
Final simplification69.4%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (pow (hypot x.im x.re) y.re))
(t_1 (* (sin (* y.re (atan2 x.im x.re))) t_0))
(t_2 (log (+ 1.0 (expm1 t_1))))
(t_3 (log (hypot x.im x.re))))
(if (<= y.im -240000000.0)
t_2
(if (<= y.im -3e-186)
(* (sin (* y.im (+ t_3 (* y.re (/ (atan2 x.im x.re) y.im))))) t_0)
(if (<= y.im 4.6e-150)
t_1
(if (<= y.im 600000000.0) (* (sin (* y.im t_3)) 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 = sin((y_46_re * atan2(x_46_im, x_46_re))) * t_0;
double t_2 = log((1.0 + expm1(t_1)));
double t_3 = log(hypot(x_46_im, x_46_re));
double tmp;
if (y_46_im <= -240000000.0) {
tmp = t_2;
} else if (y_46_im <= -3e-186) {
tmp = sin((y_46_im * (t_3 + (y_46_re * (atan2(x_46_im, x_46_re) / y_46_im))))) * t_0;
} else if (y_46_im <= 4.6e-150) {
tmp = t_1;
} else if (y_46_im <= 600000000.0) {
tmp = sin((y_46_im * t_3)) * 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.sin((y_46_re * Math.atan2(x_46_im, x_46_re))) * t_0;
double t_2 = Math.log((1.0 + Math.expm1(t_1)));
double t_3 = Math.log(Math.hypot(x_46_im, x_46_re));
double tmp;
if (y_46_im <= -240000000.0) {
tmp = t_2;
} else if (y_46_im <= -3e-186) {
tmp = Math.sin((y_46_im * (t_3 + (y_46_re * (Math.atan2(x_46_im, x_46_re) / y_46_im))))) * t_0;
} else if (y_46_im <= 4.6e-150) {
tmp = t_1;
} else if (y_46_im <= 600000000.0) {
tmp = Math.sin((y_46_im * t_3)) * 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.sin((y_46_re * math.atan2(x_46_im, x_46_re))) * t_0 t_2 = math.log((1.0 + math.expm1(t_1))) t_3 = math.log(math.hypot(x_46_im, x_46_re)) tmp = 0 if y_46_im <= -240000000.0: tmp = t_2 elif y_46_im <= -3e-186: tmp = math.sin((y_46_im * (t_3 + (y_46_re * (math.atan2(x_46_im, x_46_re) / y_46_im))))) * t_0 elif y_46_im <= 4.6e-150: tmp = t_1 elif y_46_im <= 600000000.0: tmp = math.sin((y_46_im * t_3)) * 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 = Float64(sin(Float64(y_46_re * atan(x_46_im, x_46_re))) * t_0) t_2 = log(Float64(1.0 + expm1(t_1))) t_3 = log(hypot(x_46_im, x_46_re)) tmp = 0.0 if (y_46_im <= -240000000.0) tmp = t_2; elseif (y_46_im <= -3e-186) tmp = Float64(sin(Float64(y_46_im * Float64(t_3 + Float64(y_46_re * Float64(atan(x_46_im, x_46_re) / y_46_im))))) * t_0); elseif (y_46_im <= 4.6e-150) tmp = t_1; elseif (y_46_im <= 600000000.0) tmp = Float64(sin(Float64(y_46_im * t_3)) * t_0); else tmp = t_2; end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, Block[{t$95$1 = N[(N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$0), $MachinePrecision]}, Block[{t$95$2 = N[Log[N[(1.0 + N[(Exp[t$95$1] - 1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$im, -240000000.0], t$95$2, If[LessEqual[y$46$im, -3e-186], N[(N[Sin[N[(y$46$im * N[(t$95$3 + N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] / y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$0), $MachinePrecision], If[LessEqual[y$46$im, 4.6e-150], t$95$1, If[LessEqual[y$46$im, 600000000.0], N[(N[Sin[N[(y$46$im * t$95$3), $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 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot t\_0\\
t_2 := \log \left(1 + \mathsf{expm1}\left(t\_1\right)\right)\\
t_3 := \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
\mathbf{if}\;y.im \leq -240000000:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y.im \leq -3 \cdot 10^{-186}:\\
\;\;\;\;\sin \left(y.im \cdot \left(t\_3 + y.re \cdot \frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.im}\right)\right) \cdot t\_0\\
\mathbf{elif}\;y.im \leq 4.6 \cdot 10^{-150}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y.im \leq 600000000:\\
\;\;\;\;\sin \left(y.im \cdot t\_3\right) \cdot t\_0\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y.im < -2.4e8 or 6e8 < y.im Initial program 40.7%
exp-diff29.2%
exp-to-pow29.2%
hypot-define29.2%
*-commutative29.2%
exp-prod27.4%
fma-define27.4%
hypot-define51.8%
*-commutative51.8%
Simplified51.8%
Taylor expanded in y.im around 0 40.9%
unpow240.9%
unpow240.9%
hypot-undefine33.5%
Simplified33.5%
Taylor expanded in y.im around 0 40.2%
unpow240.2%
unpow240.2%
hypot-undefine34.6%
Simplified34.6%
log1p-expm1-u34.6%
log1p-undefine53.8%
Applied egg-rr53.8%
if -2.4e8 < y.im < -3.0000000000000001e-186Initial program 43.1%
exp-diff41.1%
exp-to-pow41.1%
hypot-define41.1%
*-commutative41.1%
exp-prod41.1%
fma-define41.1%
hypot-define88.0%
*-commutative88.0%
Simplified88.0%
Taylor expanded in y.im around 0 59.8%
unpow259.8%
unpow259.8%
hypot-undefine88.7%
Simplified88.7%
Taylor expanded in y.im around inf 39.1%
unpow239.1%
unpow239.1%
hypot-undefine84.8%
associate-/l*84.8%
Simplified84.8%
if -3.0000000000000001e-186 < y.im < 4.60000000000000006e-150Initial program 52.6%
exp-diff52.6%
exp-to-pow52.6%
hypot-define52.6%
*-commutative52.6%
exp-prod52.6%
fma-define52.6%
hypot-define87.5%
*-commutative87.5%
Simplified87.5%
Taylor expanded in y.im around 0 60.7%
unpow260.7%
unpow260.7%
hypot-undefine87.5%
Simplified87.5%
Taylor expanded in y.im around 0 57.3%
unpow257.3%
unpow257.3%
hypot-undefine79.9%
Simplified79.9%
if 4.60000000000000006e-150 < y.im < 6e8Initial program 54.2%
exp-diff54.2%
exp-to-pow54.2%
hypot-define54.2%
*-commutative54.2%
exp-prod54.2%
fma-define54.2%
hypot-define91.3%
*-commutative91.3%
Simplified91.3%
Taylor expanded in y.im around 0 72.0%
unpow272.0%
unpow272.0%
hypot-undefine89.7%
Simplified89.7%
Taylor expanded in y.im around inf 49.2%
unpow249.2%
unpow249.2%
hypot-undefine90.4%
Simplified90.4%
Final simplification70.8%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (sin (* y.re (atan2 x.im x.re))))
(t_1 (pow (hypot x.im x.re) y.re))
(t_2 (* (sin (* y.im (log (hypot x.im x.re)))) t_1))
(t_3 (* t_1 (log (exp t_0)))))
(if (<= y.im -4000000000.0)
t_3
(if (<= y.im -2.65e-182)
t_2
(if (<= y.im 3.45e-149)
(* t_0 t_1)
(if (<= y.im 21000000.0) t_2 t_3))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = sin((y_46_re * atan2(x_46_im, x_46_re)));
double t_1 = pow(hypot(x_46_im, x_46_re), y_46_re);
double t_2 = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) * t_1;
double t_3 = t_1 * log(exp(t_0));
double tmp;
if (y_46_im <= -4000000000.0) {
tmp = t_3;
} else if (y_46_im <= -2.65e-182) {
tmp = t_2;
} else if (y_46_im <= 3.45e-149) {
tmp = t_0 * t_1;
} else if (y_46_im <= 21000000.0) {
tmp = t_2;
} else {
tmp = t_3;
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
double t_1 = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
double t_2 = Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re)))) * t_1;
double t_3 = t_1 * Math.log(Math.exp(t_0));
double tmp;
if (y_46_im <= -4000000000.0) {
tmp = t_3;
} else if (y_46_im <= -2.65e-182) {
tmp = t_2;
} else if (y_46_im <= 3.45e-149) {
tmp = t_0 * t_1;
} else if (y_46_im <= 21000000.0) {
tmp = t_2;
} else {
tmp = t_3;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) t_1 = math.pow(math.hypot(x_46_im, x_46_re), y_46_re) t_2 = math.sin((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) * t_1 t_3 = t_1 * math.log(math.exp(t_0)) tmp = 0 if y_46_im <= -4000000000.0: tmp = t_3 elif y_46_im <= -2.65e-182: tmp = t_2 elif y_46_im <= 3.45e-149: tmp = t_0 * t_1 elif y_46_im <= 21000000.0: tmp = t_2 else: tmp = t_3 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin(Float64(y_46_re * atan(x_46_im, x_46_re))) t_1 = hypot(x_46_im, x_46_re) ^ y_46_re t_2 = Float64(sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) * t_1) t_3 = Float64(t_1 * log(exp(t_0))) tmp = 0.0 if (y_46_im <= -4000000000.0) tmp = t_3; elseif (y_46_im <= -2.65e-182) tmp = t_2; elseif (y_46_im <= 3.45e-149) tmp = Float64(t_0 * t_1); elseif (y_46_im <= 21000000.0) tmp = t_2; else tmp = t_3; end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin((y_46_re * atan2(x_46_im, x_46_re))); t_1 = hypot(x_46_im, x_46_re) ^ y_46_re; t_2 = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) * t_1; t_3 = t_1 * log(exp(t_0)); tmp = 0.0; if (y_46_im <= -4000000000.0) tmp = t_3; elseif (y_46_im <= -2.65e-182) tmp = t_2; elseif (y_46_im <= 3.45e-149) tmp = t_0 * t_1; elseif (y_46_im <= 21000000.0) tmp = t_2; else tmp = t_3; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, Block[{t$95$2 = N[(N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$1 * N[Log[N[Exp[t$95$0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -4000000000.0], t$95$3, If[LessEqual[y$46$im, -2.65e-182], t$95$2, If[LessEqual[y$46$im, 3.45e-149], N[(t$95$0 * t$95$1), $MachinePrecision], If[LessEqual[y$46$im, 21000000.0], t$95$2, t$95$3]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
t_1 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
t_2 := \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \cdot t\_1\\
t_3 := t\_1 \cdot \log \left(e^{t\_0}\right)\\
\mathbf{if}\;y.im \leq -4000000000:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;y.im \leq -2.65 \cdot 10^{-182}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y.im \leq 3.45 \cdot 10^{-149}:\\
\;\;\;\;t\_0 \cdot t\_1\\
\mathbf{elif}\;y.im \leq 21000000:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if y.im < -4e9 or 2.1e7 < y.im Initial program 40.7%
exp-diff29.2%
exp-to-pow29.2%
hypot-define29.2%
*-commutative29.2%
exp-prod27.4%
fma-define27.4%
hypot-define51.8%
*-commutative51.8%
Simplified51.8%
Taylor expanded in y.im around 0 40.9%
unpow240.9%
unpow240.9%
hypot-undefine33.5%
Simplified33.5%
Taylor expanded in y.im around 0 40.2%
unpow240.2%
unpow240.2%
hypot-undefine34.6%
Simplified34.6%
add-log-exp52.9%
Applied egg-rr52.9%
if -4e9 < y.im < -2.65000000000000003e-182 or 3.45e-149 < y.im < 2.1e7Initial program 47.6%
exp-diff46.4%
exp-to-pow46.4%
hypot-define46.4%
*-commutative46.4%
exp-prod46.4%
fma-define46.4%
hypot-define89.3%
*-commutative89.3%
Simplified89.3%
Taylor expanded in y.im around 0 64.8%
unpow264.8%
unpow264.8%
hypot-undefine89.1%
Simplified89.1%
Taylor expanded in y.im around inf 42.5%
unpow242.5%
unpow242.5%
hypot-undefine82.9%
Simplified82.9%
if -2.65000000000000003e-182 < y.im < 3.45e-149Initial program 52.6%
exp-diff52.6%
exp-to-pow52.6%
hypot-define52.6%
*-commutative52.6%
exp-prod52.6%
fma-define52.6%
hypot-define87.5%
*-commutative87.5%
Simplified87.5%
Taylor expanded in y.im around 0 60.7%
unpow260.7%
unpow260.7%
hypot-undefine87.5%
Simplified87.5%
Taylor expanded in y.im around 0 57.3%
unpow257.3%
unpow257.3%
hypot-undefine79.9%
Simplified79.9%
Final simplification69.0%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.im x.re))) (t_1 (pow (hypot x.im x.re) y.re)))
(if (<= y.re -0.62)
(* (sin (* y.re (atan2 x.im x.re))) t_1)
(if (<= y.re 1.85)
(*
(sin (* y.im (+ t_0 (* y.re (/ (atan2 x.im x.re) y.im)))))
(exp (* (atan2 x.im x.re) (- y.im))))
(* (sin (* y.im 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 = log(hypot(x_46_im, x_46_re));
double t_1 = pow(hypot(x_46_im, x_46_re), y_46_re);
double tmp;
if (y_46_re <= -0.62) {
tmp = sin((y_46_re * atan2(x_46_im, x_46_re))) * t_1;
} else if (y_46_re <= 1.85) {
tmp = sin((y_46_im * (t_0 + (y_46_re * (atan2(x_46_im, x_46_re) / y_46_im))))) * exp((atan2(x_46_im, x_46_re) * -y_46_im));
} else {
tmp = sin((y_46_im * t_0)) * 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.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
double tmp;
if (y_46_re <= -0.62) {
tmp = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re))) * t_1;
} else if (y_46_re <= 1.85) {
tmp = Math.sin((y_46_im * (t_0 + (y_46_re * (Math.atan2(x_46_im, x_46_re) / y_46_im))))) * Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im));
} else {
tmp = Math.sin((y_46_im * t_0)) * 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.pow(math.hypot(x_46_im, x_46_re), y_46_re) tmp = 0 if y_46_re <= -0.62: tmp = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) * t_1 elif y_46_re <= 1.85: tmp = math.sin((y_46_im * (t_0 + (y_46_re * (math.atan2(x_46_im, x_46_re) / y_46_im))))) * math.exp((math.atan2(x_46_im, x_46_re) * -y_46_im)) else: tmp = math.sin((y_46_im * t_0)) * 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 = hypot(x_46_im, x_46_re) ^ y_46_re tmp = 0.0 if (y_46_re <= -0.62) tmp = Float64(sin(Float64(y_46_re * atan(x_46_im, x_46_re))) * t_1); elseif (y_46_re <= 1.85) tmp = Float64(sin(Float64(y_46_im * Float64(t_0 + Float64(y_46_re * Float64(atan(x_46_im, x_46_re) / y_46_im))))) * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))); else tmp = Float64(sin(Float64(y_46_im * t_0)) * 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 = hypot(x_46_im, x_46_re) ^ y_46_re; tmp = 0.0; if (y_46_re <= -0.62) tmp = sin((y_46_re * atan2(x_46_im, x_46_re))) * t_1; elseif (y_46_re <= 1.85) tmp = sin((y_46_im * (t_0 + (y_46_re * (atan2(x_46_im, x_46_re) / y_46_im))))) * exp((atan2(x_46_im, x_46_re) * -y_46_im)); else tmp = sin((y_46_im * t_0)) * 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[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, If[LessEqual[y$46$re, -0.62], N[(N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$1), $MachinePrecision], If[LessEqual[y$46$re, 1.85], N[(N[Sin[N[(y$46$im * N[(t$95$0 + N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] / y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Sin[N[(y$46$im * t$95$0), $MachinePrecision]], $MachinePrecision] * t$95$1), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
t_1 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{if}\;y.re \leq -0.62:\\
\;\;\;\;\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot t\_1\\
\mathbf{elif}\;y.re \leq 1.85:\\
\;\;\;\;\sin \left(y.im \cdot \left(t\_0 + y.re \cdot \frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.im}\right)\right) \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\
\mathbf{else}:\\
\;\;\;\;\sin \left(y.im \cdot t\_0\right) \cdot t\_1\\
\end{array}
\end{array}
if y.re < -0.619999999999999996Initial program 50.0%
exp-diff40.0%
exp-to-pow40.0%
hypot-define40.0%
*-commutative40.0%
exp-prod37.1%
fma-define37.1%
hypot-define61.4%
*-commutative61.4%
Simplified61.4%
Taylor expanded in y.im around 0 74.5%
unpow274.5%
unpow274.5%
hypot-undefine74.5%
Simplified74.5%
Taylor expanded in y.im around 0 74.5%
unpow274.5%
unpow274.5%
hypot-undefine74.5%
Simplified74.5%
if -0.619999999999999996 < y.re < 1.8500000000000001Initial program 41.7%
exp-diff41.7%
exp-to-pow41.7%
hypot-define41.7%
*-commutative41.7%
exp-prod41.7%
fma-define41.7%
hypot-define83.6%
*-commutative83.6%
Simplified83.6%
Taylor expanded in y.im around inf 41.6%
unpow225.7%
unpow225.7%
hypot-undefine56.0%
associate-/l*56.0%
Simplified83.5%
Taylor expanded in y.re around 0 83.1%
rec-exp36.6%
distribute-lft-neg-in36.6%
Simplified83.1%
if 1.8500000000000001 < y.re Initial program 49.2%
exp-diff37.3%
exp-to-pow37.3%
hypot-define37.3%
*-commutative37.3%
exp-prod37.3%
fma-define37.3%
hypot-define61.0%
*-commutative61.0%
Simplified61.0%
Taylor expanded in y.im around 0 69.6%
unpow269.6%
unpow269.6%
hypot-undefine69.6%
Simplified69.6%
Taylor expanded in y.im around inf 47.5%
unpow247.5%
unpow247.5%
hypot-undefine76.4%
Simplified76.4%
Final simplification79.2%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.im x.re))))
(if (<= y.re -2e-14)
(*
(exp
(-
(* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(* (atan2 x.im x.re) y.im)))
(sin (* y.re (atan2 x.im x.re))))
(if (<= y.re 2.7)
(*
(sin (* y.im (+ t_0 (* y.re (/ (atan2 x.im x.re) y.im)))))
(exp (* (atan2 x.im x.re) (- y.im))))
(* (sin (* y.im t_0)) (pow (hypot x.im x.re) y.re))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(hypot(x_46_im, x_46_re));
double tmp;
if (y_46_re <= -2e-14) {
tmp = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin((y_46_re * atan2(x_46_im, x_46_re)));
} else if (y_46_re <= 2.7) {
tmp = sin((y_46_im * (t_0 + (y_46_re * (atan2(x_46_im, x_46_re) / y_46_im))))) * exp((atan2(x_46_im, x_46_re) * -y_46_im));
} else {
tmp = sin((y_46_im * t_0)) * pow(hypot(x_46_im, x_46_re), y_46_re);
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.log(Math.hypot(x_46_im, x_46_re));
double tmp;
if (y_46_re <= -2e-14) {
tmp = Math.exp(((y_46_re * Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (Math.atan2(x_46_im, x_46_re) * y_46_im))) * Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
} else if (y_46_re <= 2.7) {
tmp = Math.sin((y_46_im * (t_0 + (y_46_re * (Math.atan2(x_46_im, x_46_re) / y_46_im))))) * Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im));
} else {
tmp = Math.sin((y_46_im * t_0)) * Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.log(math.hypot(x_46_im, x_46_re)) tmp = 0 if y_46_re <= -2e-14: tmp = math.exp(((y_46_re * math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (math.atan2(x_46_im, x_46_re) * y_46_im))) * math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) elif y_46_re <= 2.7: tmp = math.sin((y_46_im * (t_0 + (y_46_re * (math.atan2(x_46_im, x_46_re) / y_46_im))))) * math.exp((math.atan2(x_46_im, x_46_re) * -y_46_im)) else: tmp = math.sin((y_46_im * t_0)) * math.pow(math.hypot(x_46_im, x_46_re), y_46_re) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_im, x_46_re)) tmp = 0.0 if (y_46_re <= -2e-14) tmp = Float64(exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * sin(Float64(y_46_re * atan(x_46_im, x_46_re)))); elseif (y_46_re <= 2.7) tmp = Float64(sin(Float64(y_46_im * Float64(t_0 + Float64(y_46_re * Float64(atan(x_46_im, x_46_re) / y_46_im))))) * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))); else tmp = Float64(sin(Float64(y_46_im * t_0)) * (hypot(x_46_im, x_46_re) ^ y_46_re)); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_im, x_46_re)); tmp = 0.0; if (y_46_re <= -2e-14) tmp = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin((y_46_re * atan2(x_46_im, x_46_re))); elseif (y_46_re <= 2.7) tmp = sin((y_46_im * (t_0 + (y_46_re * (atan2(x_46_im, x_46_re) / y_46_im))))) * exp((atan2(x_46_im, x_46_re) * -y_46_im)); else tmp = sin((y_46_im * t_0)) * (hypot(x_46_im, x_46_re) ^ y_46_re); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -2e-14], N[(N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 2.7], N[(N[Sin[N[(y$46$im * N[(t$95$0 + N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] / y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 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]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
\mathbf{if}\;y.re \leq -2 \cdot 10^{-14}:\\
\;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{elif}\;y.re \leq 2.7:\\
\;\;\;\;\sin \left(y.im \cdot \left(t\_0 + y.re \cdot \frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.im}\right)\right) \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\
\mathbf{else}:\\
\;\;\;\;\sin \left(y.im \cdot t\_0\right) \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\end{array}
\end{array}
if y.re < -2e-14Initial program 50.0%
Taylor expanded in y.im around 0 76.5%
if -2e-14 < y.re < 2.7000000000000002Initial program 41.5%
exp-diff41.5%
exp-to-pow41.5%
hypot-define41.5%
*-commutative41.5%
exp-prod41.5%
fma-define41.5%
hypot-define84.1%
*-commutative84.1%
Simplified84.1%
Taylor expanded in y.im around inf 41.5%
unpow226.1%
unpow226.1%
hypot-undefine56.8%
associate-/l*56.8%
Simplified84.1%
Taylor expanded in y.re around 0 83.7%
rec-exp37.2%
distribute-lft-neg-in37.2%
Simplified83.7%
if 2.7000000000000002 < y.re Initial program 49.2%
exp-diff37.3%
exp-to-pow37.3%
hypot-define37.3%
*-commutative37.3%
exp-prod37.3%
fma-define37.3%
hypot-define61.0%
*-commutative61.0%
Simplified61.0%
Taylor expanded in y.im around 0 69.6%
unpow269.6%
unpow269.6%
hypot-undefine69.6%
Simplified69.6%
Taylor expanded in y.im around inf 47.5%
unpow247.5%
unpow247.5%
hypot-undefine76.4%
Simplified76.4%
Final simplification80.0%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (pow (hypot x.im x.re) y.re)))
(if (<= y.im -600000000.0)
(log (+ 1.0 (expm1 (* (sin (* y.re (atan2 x.im x.re))) t_0))))
(*
t_0
(sin
(*
y.re
(+ (atan2 x.im x.re) (/ (* y.im (log (hypot x.im x.re))) y.re))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = pow(hypot(x_46_im, x_46_re), y_46_re);
double tmp;
if (y_46_im <= -600000000.0) {
tmp = log((1.0 + expm1((sin((y_46_re * atan2(x_46_im, x_46_re))) * t_0))));
} else {
tmp = t_0 * 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))));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
double tmp;
if (y_46_im <= -600000000.0) {
tmp = Math.log((1.0 + Math.expm1((Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re))) * t_0))));
} else {
tmp = t_0 * 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))));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.pow(math.hypot(x_46_im, x_46_re), y_46_re) tmp = 0 if y_46_im <= -600000000.0: tmp = math.log((1.0 + math.expm1((math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) * t_0)))) else: tmp = t_0 * 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)))) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = hypot(x_46_im, x_46_re) ^ y_46_re tmp = 0.0 if (y_46_im <= -600000000.0) tmp = log(Float64(1.0 + expm1(Float64(sin(Float64(y_46_re * atan(x_46_im, x_46_re))) * t_0)))); else tmp = Float64(t_0 * sin(Float64(y_46_re * Float64(atan(x_46_im, x_46_re) + Float64(Float64(y_46_im * log(hypot(x_46_im, x_46_re))) / y_46_re))))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, If[LessEqual[y$46$im, -600000000.0], N[Log[N[(1.0 + N[(Exp[N[(N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$0), $MachinePrecision]] - 1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(t$95$0 * N[Sin[N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] + N[(N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{if}\;y.im \leq -600000000:\\
\;\;\;\;\log \left(1 + \mathsf{expm1}\left(\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot t\_0\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot \sin \left(y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} + \frac{y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)}{y.re}\right)\right)\\
\end{array}
\end{array}
if y.im < -6e8Initial program 36.9%
exp-diff27.7%
exp-to-pow27.7%
hypot-define27.7%
*-commutative27.7%
exp-prod27.7%
fma-define27.7%
hypot-define56.1%
*-commutative56.1%
Simplified56.1%
Taylor expanded in y.im around 0 38.0%
unpow238.0%
unpow238.0%
hypot-undefine29.7%
Simplified29.7%
Taylor expanded in y.im around 0 38.4%
unpow238.4%
unpow238.4%
hypot-undefine30.0%
Simplified30.0%
log1p-expm1-u30.0%
log1p-undefine57.6%
Applied egg-rr57.6%
if -6e8 < y.im Initial program 48.6%
exp-diff44.5%
exp-to-pow44.5%
hypot-define44.5%
*-commutative44.5%
exp-prod43.4%
fma-define43.4%
hypot-define77.9%
*-commutative77.9%
Simplified77.9%
Taylor expanded in y.im around 0 58.5%
unpow258.5%
unpow258.5%
hypot-undefine75.9%
Simplified75.9%
Taylor expanded in y.re around inf 44.5%
+-commutative44.5%
unpow244.5%
unpow244.5%
hypot-undefine75.8%
Simplified75.8%
Final simplification71.2%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (pow (hypot x.im x.re) y.re))
(t_1 (* y.re (atan2 x.im x.re)))
(t_2 (sin t_1)))
(if (<= y.im -4.5e+246)
(* t_2 (pow (+ x.im (* 0.5 (/ (pow x.re 2.0) x.im))) y.re))
(if (<= y.im -2.45e+197)
(*
(exp (* (atan2 x.im x.re) (- y.im)))
(sin (+ t_1 (* y.im (log x.re)))))
(if (<= y.im -5.4e+101)
(* t_2 (pow (+ x.re (* 0.5 (/ (pow x.im 2.0) x.re))) y.re))
(if (or (<= y.im -4.5e-184) (not (<= y.im 2.8e-149)))
(* (sin (* y.im (log (hypot x.im x.re)))) t_0)
(* t_2 t_0)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = pow(hypot(x_46_im, x_46_re), y_46_re);
double t_1 = y_46_re * atan2(x_46_im, x_46_re);
double t_2 = sin(t_1);
double tmp;
if (y_46_im <= -4.5e+246) {
tmp = t_2 * pow((x_46_im + (0.5 * (pow(x_46_re, 2.0) / x_46_im))), y_46_re);
} else if (y_46_im <= -2.45e+197) {
tmp = exp((atan2(x_46_im, x_46_re) * -y_46_im)) * sin((t_1 + (y_46_im * log(x_46_re))));
} else if (y_46_im <= -5.4e+101) {
tmp = t_2 * pow((x_46_re + (0.5 * (pow(x_46_im, 2.0) / x_46_re))), y_46_re);
} else if ((y_46_im <= -4.5e-184) || !(y_46_im <= 2.8e-149)) {
tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) * t_0;
} else {
tmp = t_2 * 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.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
double t_1 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_2 = Math.sin(t_1);
double tmp;
if (y_46_im <= -4.5e+246) {
tmp = t_2 * Math.pow((x_46_im + (0.5 * (Math.pow(x_46_re, 2.0) / x_46_im))), y_46_re);
} else if (y_46_im <= -2.45e+197) {
tmp = Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im)) * Math.sin((t_1 + (y_46_im * Math.log(x_46_re))));
} else if (y_46_im <= -5.4e+101) {
tmp = t_2 * Math.pow((x_46_re + (0.5 * (Math.pow(x_46_im, 2.0) / x_46_re))), y_46_re);
} else if ((y_46_im <= -4.5e-184) || !(y_46_im <= 2.8e-149)) {
tmp = Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re)))) * t_0;
} else {
tmp = t_2 * t_0;
}
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 = y_46_re * math.atan2(x_46_im, x_46_re) t_2 = math.sin(t_1) tmp = 0 if y_46_im <= -4.5e+246: tmp = t_2 * math.pow((x_46_im + (0.5 * (math.pow(x_46_re, 2.0) / x_46_im))), y_46_re) elif y_46_im <= -2.45e+197: tmp = math.exp((math.atan2(x_46_im, x_46_re) * -y_46_im)) * math.sin((t_1 + (y_46_im * math.log(x_46_re)))) elif y_46_im <= -5.4e+101: tmp = t_2 * math.pow((x_46_re + (0.5 * (math.pow(x_46_im, 2.0) / x_46_re))), y_46_re) elif (y_46_im <= -4.5e-184) or not (y_46_im <= 2.8e-149): tmp = math.sin((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) * t_0 else: tmp = t_2 * t_0 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = hypot(x_46_im, x_46_re) ^ y_46_re t_1 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_2 = sin(t_1) tmp = 0.0 if (y_46_im <= -4.5e+246) tmp = Float64(t_2 * (Float64(x_46_im + Float64(0.5 * Float64((x_46_re ^ 2.0) / x_46_im))) ^ y_46_re)); elseif (y_46_im <= -2.45e+197) tmp = Float64(exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))) * sin(Float64(t_1 + Float64(y_46_im * log(x_46_re))))); elseif (y_46_im <= -5.4e+101) tmp = Float64(t_2 * (Float64(x_46_re + Float64(0.5 * Float64((x_46_im ^ 2.0) / x_46_re))) ^ y_46_re)); elseif ((y_46_im <= -4.5e-184) || !(y_46_im <= 2.8e-149)) tmp = Float64(sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) * t_0); else tmp = Float64(t_2 * t_0); 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 = y_46_re * atan2(x_46_im, x_46_re); t_2 = sin(t_1); tmp = 0.0; if (y_46_im <= -4.5e+246) tmp = t_2 * ((x_46_im + (0.5 * ((x_46_re ^ 2.0) / x_46_im))) ^ y_46_re); elseif (y_46_im <= -2.45e+197) tmp = exp((atan2(x_46_im, x_46_re) * -y_46_im)) * sin((t_1 + (y_46_im * log(x_46_re)))); elseif (y_46_im <= -5.4e+101) tmp = t_2 * ((x_46_re + (0.5 * ((x_46_im ^ 2.0) / x_46_re))) ^ y_46_re); elseif ((y_46_im <= -4.5e-184) || ~((y_46_im <= 2.8e-149))) tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) * t_0; else tmp = t_2 * 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[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, Block[{t$95$1 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sin[t$95$1], $MachinePrecision]}, If[LessEqual[y$46$im, -4.5e+246], N[(t$95$2 * N[Power[N[(x$46$im + N[(0.5 * N[(N[Power[x$46$re, 2.0], $MachinePrecision] / x$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, -2.45e+197], N[(N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(t$95$1 + N[(y$46$im * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, -5.4e+101], N[(t$95$2 * N[Power[N[(x$46$re + N[(0.5 * N[(N[Power[x$46$im, 2.0], $MachinePrecision] / x$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y$46$im, -4.5e-184], N[Not[LessEqual[y$46$im, 2.8e-149]], $MachinePrecision]], N[(N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$0), $MachinePrecision], N[(t$95$2 * t$95$0), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_2 := \sin t\_1\\
\mathbf{if}\;y.im \leq -4.5 \cdot 10^{+246}:\\
\;\;\;\;t\_2 \cdot {\left(x.im + 0.5 \cdot \frac{{x.re}^{2}}{x.im}\right)}^{y.re}\\
\mathbf{elif}\;y.im \leq -2.45 \cdot 10^{+197}:\\
\;\;\;\;e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)} \cdot \sin \left(t\_1 + y.im \cdot \log x.re\right)\\
\mathbf{elif}\;y.im \leq -5.4 \cdot 10^{+101}:\\
\;\;\;\;t\_2 \cdot {\left(x.re + 0.5 \cdot \frac{{x.im}^{2}}{x.re}\right)}^{y.re}\\
\mathbf{elif}\;y.im \leq -4.5 \cdot 10^{-184} \lor \neg \left(y.im \leq 2.8 \cdot 10^{-149}\right):\\
\;\;\;\;\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \cdot t\_0\\
\mathbf{else}:\\
\;\;\;\;t\_2 \cdot t\_0\\
\end{array}
\end{array}
if y.im < -4.5e246Initial program 35.7%
exp-diff14.3%
exp-to-pow14.3%
hypot-define14.3%
*-commutative14.3%
exp-prod14.3%
fma-define14.3%
hypot-define50.0%
*-commutative50.0%
Simplified50.0%
Taylor expanded in y.im around 0 57.6%
unpow257.6%
unpow257.6%
hypot-undefine43.8%
Simplified43.8%
Taylor expanded in y.im around 0 58.8%
Taylor expanded in x.re around 0 50.7%
if -4.5e246 < y.im < -2.45000000000000013e197Initial program 35.7%
exp-diff28.6%
exp-to-pow28.6%
hypot-define28.6%
*-commutative28.6%
exp-prod28.6%
fma-define28.6%
hypot-define51.5%
*-commutative51.5%
Simplified51.5%
Taylor expanded in x.im around 0 44.3%
Taylor expanded in y.re around 0 51.5%
rec-exp51.5%
distribute-lft-neg-in51.5%
Simplified51.5%
if -2.45000000000000013e197 < y.im < -5.40000000000000012e101Initial program 33.3%
exp-diff33.3%
exp-to-pow33.3%
hypot-define33.3%
*-commutative33.3%
exp-prod33.3%
fma-define33.3%
hypot-define72.3%
*-commutative72.3%
Simplified72.3%
Taylor expanded in y.im around 0 34.7%
unpow234.7%
unpow234.7%
hypot-undefine18.7%
Simplified18.7%
Taylor expanded in y.im around 0 35.1%
Taylor expanded in x.im around 0 50.4%
if -5.40000000000000012e101 < y.im < -4.5000000000000001e-184 or 2.7999999999999999e-149 < y.im Initial program 46.4%
exp-diff39.8%
exp-to-pow39.8%
hypot-define39.8%
*-commutative39.8%
exp-prod38.5%
fma-define38.5%
hypot-define70.7%
*-commutative70.7%
Simplified70.7%
Taylor expanded in y.im around 0 54.5%
unpow254.5%
unpow254.5%
hypot-undefine66.4%
Simplified66.4%
Taylor expanded in y.im around inf 34.7%
unpow234.7%
unpow234.7%
hypot-undefine64.3%
Simplified64.3%
if -4.5000000000000001e-184 < y.im < 2.7999999999999999e-149Initial program 52.6%
exp-diff52.6%
exp-to-pow52.6%
hypot-define52.6%
*-commutative52.6%
exp-prod52.6%
fma-define52.6%
hypot-define87.5%
*-commutative87.5%
Simplified87.5%
Taylor expanded in y.im around 0 60.7%
unpow260.7%
unpow260.7%
hypot-undefine87.5%
Simplified87.5%
Taylor expanded in y.im around 0 57.3%
unpow257.3%
unpow257.3%
hypot-undefine79.9%
Simplified79.9%
Final simplification65.3%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (pow (hypot x.im x.re) y.re))
(t_1 (* y.re (atan2 x.im x.re)))
(t_2 (sin t_1)))
(if (<= y.im -3.8e+244)
(*
t_2
(pow (* x.im (+ 1.0 (* 0.5 (/ (pow x.re 2.0) (pow x.im 2.0))))) y.re))
(if (<= y.im -3e+196)
(*
(exp (* (atan2 x.im x.re) (- y.im)))
(sin (+ t_1 (* y.im (log x.re)))))
(if (<= y.im -3.4e+105)
(* t_2 (pow (+ x.re (* 0.5 (/ (pow x.im 2.0) x.re))) y.re))
(if (or (<= y.im -1.86e-177) (not (<= y.im 4.8e-150)))
(* (sin (* y.im (log (hypot x.im x.re)))) t_0)
(* t_2 t_0)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = pow(hypot(x_46_im, x_46_re), y_46_re);
double t_1 = y_46_re * atan2(x_46_im, x_46_re);
double t_2 = sin(t_1);
double tmp;
if (y_46_im <= -3.8e+244) {
tmp = t_2 * pow((x_46_im * (1.0 + (0.5 * (pow(x_46_re, 2.0) / pow(x_46_im, 2.0))))), y_46_re);
} else if (y_46_im <= -3e+196) {
tmp = exp((atan2(x_46_im, x_46_re) * -y_46_im)) * sin((t_1 + (y_46_im * log(x_46_re))));
} else if (y_46_im <= -3.4e+105) {
tmp = t_2 * pow((x_46_re + (0.5 * (pow(x_46_im, 2.0) / x_46_re))), y_46_re);
} else if ((y_46_im <= -1.86e-177) || !(y_46_im <= 4.8e-150)) {
tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) * t_0;
} else {
tmp = t_2 * 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.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
double t_1 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_2 = Math.sin(t_1);
double tmp;
if (y_46_im <= -3.8e+244) {
tmp = t_2 * Math.pow((x_46_im * (1.0 + (0.5 * (Math.pow(x_46_re, 2.0) / Math.pow(x_46_im, 2.0))))), y_46_re);
} else if (y_46_im <= -3e+196) {
tmp = Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im)) * Math.sin((t_1 + (y_46_im * Math.log(x_46_re))));
} else if (y_46_im <= -3.4e+105) {
tmp = t_2 * Math.pow((x_46_re + (0.5 * (Math.pow(x_46_im, 2.0) / x_46_re))), y_46_re);
} else if ((y_46_im <= -1.86e-177) || !(y_46_im <= 4.8e-150)) {
tmp = Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re)))) * t_0;
} else {
tmp = t_2 * t_0;
}
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 = y_46_re * math.atan2(x_46_im, x_46_re) t_2 = math.sin(t_1) tmp = 0 if y_46_im <= -3.8e+244: tmp = t_2 * math.pow((x_46_im * (1.0 + (0.5 * (math.pow(x_46_re, 2.0) / math.pow(x_46_im, 2.0))))), y_46_re) elif y_46_im <= -3e+196: tmp = math.exp((math.atan2(x_46_im, x_46_re) * -y_46_im)) * math.sin((t_1 + (y_46_im * math.log(x_46_re)))) elif y_46_im <= -3.4e+105: tmp = t_2 * math.pow((x_46_re + (0.5 * (math.pow(x_46_im, 2.0) / x_46_re))), y_46_re) elif (y_46_im <= -1.86e-177) or not (y_46_im <= 4.8e-150): tmp = math.sin((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) * t_0 else: tmp = t_2 * t_0 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = hypot(x_46_im, x_46_re) ^ y_46_re t_1 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_2 = sin(t_1) tmp = 0.0 if (y_46_im <= -3.8e+244) tmp = Float64(t_2 * (Float64(x_46_im * Float64(1.0 + Float64(0.5 * Float64((x_46_re ^ 2.0) / (x_46_im ^ 2.0))))) ^ y_46_re)); elseif (y_46_im <= -3e+196) tmp = Float64(exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))) * sin(Float64(t_1 + Float64(y_46_im * log(x_46_re))))); elseif (y_46_im <= -3.4e+105) tmp = Float64(t_2 * (Float64(x_46_re + Float64(0.5 * Float64((x_46_im ^ 2.0) / x_46_re))) ^ y_46_re)); elseif ((y_46_im <= -1.86e-177) || !(y_46_im <= 4.8e-150)) tmp = Float64(sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) * t_0); else tmp = Float64(t_2 * t_0); 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 = y_46_re * atan2(x_46_im, x_46_re); t_2 = sin(t_1); tmp = 0.0; if (y_46_im <= -3.8e+244) tmp = t_2 * ((x_46_im * (1.0 + (0.5 * ((x_46_re ^ 2.0) / (x_46_im ^ 2.0))))) ^ y_46_re); elseif (y_46_im <= -3e+196) tmp = exp((atan2(x_46_im, x_46_re) * -y_46_im)) * sin((t_1 + (y_46_im * log(x_46_re)))); elseif (y_46_im <= -3.4e+105) tmp = t_2 * ((x_46_re + (0.5 * ((x_46_im ^ 2.0) / x_46_re))) ^ y_46_re); elseif ((y_46_im <= -1.86e-177) || ~((y_46_im <= 4.8e-150))) tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) * t_0; else tmp = t_2 * 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[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, Block[{t$95$1 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sin[t$95$1], $MachinePrecision]}, If[LessEqual[y$46$im, -3.8e+244], N[(t$95$2 * N[Power[N[(x$46$im * N[(1.0 + N[(0.5 * N[(N[Power[x$46$re, 2.0], $MachinePrecision] / N[Power[x$46$im, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, -3e+196], N[(N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(t$95$1 + N[(y$46$im * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, -3.4e+105], N[(t$95$2 * N[Power[N[(x$46$re + N[(0.5 * N[(N[Power[x$46$im, 2.0], $MachinePrecision] / x$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y$46$im, -1.86e-177], N[Not[LessEqual[y$46$im, 4.8e-150]], $MachinePrecision]], N[(N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$0), $MachinePrecision], N[(t$95$2 * t$95$0), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_2 := \sin t\_1\\
\mathbf{if}\;y.im \leq -3.8 \cdot 10^{+244}:\\
\;\;\;\;t\_2 \cdot {\left(x.im \cdot \left(1 + 0.5 \cdot \frac{{x.re}^{2}}{{x.im}^{2}}\right)\right)}^{y.re}\\
\mathbf{elif}\;y.im \leq -3 \cdot 10^{+196}:\\
\;\;\;\;e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)} \cdot \sin \left(t\_1 + y.im \cdot \log x.re\right)\\
\mathbf{elif}\;y.im \leq -3.4 \cdot 10^{+105}:\\
\;\;\;\;t\_2 \cdot {\left(x.re + 0.5 \cdot \frac{{x.im}^{2}}{x.re}\right)}^{y.re}\\
\mathbf{elif}\;y.im \leq -1.86 \cdot 10^{-177} \lor \neg \left(y.im \leq 4.8 \cdot 10^{-150}\right):\\
\;\;\;\;\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \cdot t\_0\\
\mathbf{else}:\\
\;\;\;\;t\_2 \cdot t\_0\\
\end{array}
\end{array}
if y.im < -3.79999999999999983e244Initial program 35.7%
exp-diff14.3%
exp-to-pow14.3%
hypot-define14.3%
*-commutative14.3%
exp-prod14.3%
fma-define14.3%
hypot-define50.0%
*-commutative50.0%
Simplified50.0%
Taylor expanded in y.im around 0 57.6%
unpow257.6%
unpow257.6%
hypot-undefine43.8%
Simplified43.8%
Taylor expanded in y.im around 0 58.8%
Taylor expanded in x.im around inf 57.7%
if -3.79999999999999983e244 < y.im < -2.9999999999999999e196Initial program 35.7%
exp-diff28.6%
exp-to-pow28.6%
hypot-define28.6%
*-commutative28.6%
exp-prod28.6%
fma-define28.6%
hypot-define51.5%
*-commutative51.5%
Simplified51.5%
Taylor expanded in x.im around 0 44.3%
Taylor expanded in y.re around 0 51.5%
rec-exp51.5%
distribute-lft-neg-in51.5%
Simplified51.5%
if -2.9999999999999999e196 < y.im < -3.3999999999999999e105Initial program 33.3%
exp-diff33.3%
exp-to-pow33.3%
hypot-define33.3%
*-commutative33.3%
exp-prod33.3%
fma-define33.3%
hypot-define72.3%
*-commutative72.3%
Simplified72.3%
Taylor expanded in y.im around 0 34.7%
unpow234.7%
unpow234.7%
hypot-undefine18.7%
Simplified18.7%
Taylor expanded in y.im around 0 35.1%
Taylor expanded in x.im around 0 50.4%
if -3.3999999999999999e105 < y.im < -1.85999999999999998e-177 or 4.8e-150 < y.im Initial program 46.4%
exp-diff39.8%
exp-to-pow39.8%
hypot-define39.8%
*-commutative39.8%
exp-prod38.5%
fma-define38.5%
hypot-define70.7%
*-commutative70.7%
Simplified70.7%
Taylor expanded in y.im around 0 54.5%
unpow254.5%
unpow254.5%
hypot-undefine66.4%
Simplified66.4%
Taylor expanded in y.im around inf 34.7%
unpow234.7%
unpow234.7%
hypot-undefine64.3%
Simplified64.3%
if -1.85999999999999998e-177 < y.im < 4.8e-150Initial program 52.6%
exp-diff52.6%
exp-to-pow52.6%
hypot-define52.6%
*-commutative52.6%
exp-prod52.6%
fma-define52.6%
hypot-define87.5%
*-commutative87.5%
Simplified87.5%
Taylor expanded in y.im around 0 60.7%
unpow260.7%
unpow260.7%
hypot-undefine87.5%
Simplified87.5%
Taylor expanded in y.im around 0 57.3%
unpow257.3%
unpow257.3%
hypot-undefine79.9%
Simplified79.9%
Final simplification65.7%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (pow (hypot x.im x.re) y.re)))
(if (or (<= y.im -7.8e-182) (not (<= y.im 1e-137)))
(* (sin (* y.im (log (hypot x.im x.re)))) t_0)
(* (sin (* 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 = pow(hypot(x_46_im, x_46_re), y_46_re);
double tmp;
if ((y_46_im <= -7.8e-182) || !(y_46_im <= 1e-137)) {
tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) * t_0;
} else {
tmp = sin((y_46_re * atan2(x_46_im, x_46_re))) * 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.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
double tmp;
if ((y_46_im <= -7.8e-182) || !(y_46_im <= 1e-137)) {
tmp = Math.sin((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re)))) * t_0;
} else {
tmp = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re))) * t_0;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.pow(math.hypot(x_46_im, x_46_re), y_46_re) tmp = 0 if (y_46_im <= -7.8e-182) or not (y_46_im <= 1e-137): tmp = math.sin((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) * t_0 else: tmp = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) * t_0 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = hypot(x_46_im, x_46_re) ^ y_46_re tmp = 0.0 if ((y_46_im <= -7.8e-182) || !(y_46_im <= 1e-137)) tmp = Float64(sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) * t_0); else tmp = Float64(sin(Float64(y_46_re * atan(x_46_im, x_46_re))) * t_0); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = hypot(x_46_im, x_46_re) ^ y_46_re; tmp = 0.0; if ((y_46_im <= -7.8e-182) || ~((y_46_im <= 1e-137))) tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) * t_0; else tmp = sin((y_46_re * atan2(x_46_im, x_46_re))) * t_0; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, If[Or[LessEqual[y$46$im, -7.8e-182], N[Not[LessEqual[y$46$im, 1e-137]], $MachinePrecision]], N[(N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$0), $MachinePrecision], N[(N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{if}\;y.im \leq -7.8 \cdot 10^{-182} \lor \neg \left(y.im \leq 10^{-137}\right):\\
\;\;\;\;\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \cdot t\_0\\
\mathbf{else}:\\
\;\;\;\;\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot t\_0\\
\end{array}
\end{array}
if y.im < -7.8e-182 or 9.99999999999999978e-138 < y.im Initial program 43.7%
exp-diff36.7%
exp-to-pow36.7%
hypot-define36.7%
*-commutative36.7%
exp-prod35.6%
fma-define35.6%
hypot-define68.0%
*-commutative68.0%
Simplified68.0%
Taylor expanded in y.im around 0 51.2%
unpow251.2%
unpow251.2%
hypot-undefine57.5%
Simplified57.5%
Taylor expanded in y.im around inf 29.8%
unpow229.8%
unpow229.8%
hypot-undefine56.4%
Simplified56.4%
if -7.8e-182 < y.im < 9.99999999999999978e-138Initial program 52.6%
exp-diff52.6%
exp-to-pow52.6%
hypot-define52.6%
*-commutative52.6%
exp-prod52.6%
fma-define52.6%
hypot-define87.5%
*-commutative87.5%
Simplified87.5%
Taylor expanded in y.im around 0 60.7%
unpow260.7%
unpow260.7%
hypot-undefine87.5%
Simplified87.5%
Taylor expanded in y.im around 0 57.3%
unpow257.3%
unpow257.3%
hypot-undefine79.9%
Simplified79.9%
Final simplification61.6%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re)))
(t_1 (sin t_0))
(t_2 (pow (hypot x.im x.re) y.re))
(t_3 (* t_1 t_2)))
(if (<= x.re -1.7e-159)
t_3
(if (<= x.re -2e-237)
(* t_2 (fabs t_1))
(if (<= x.re 6.2e-170)
t_3
(* (sin (+ t_0 (* y.im (log x.re)))) (pow x.re y.re)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = sin(t_0);
double t_2 = pow(hypot(x_46_im, x_46_re), y_46_re);
double t_3 = t_1 * t_2;
double tmp;
if (x_46_re <= -1.7e-159) {
tmp = t_3;
} else if (x_46_re <= -2e-237) {
tmp = t_2 * fabs(t_1);
} else if (x_46_re <= 6.2e-170) {
tmp = t_3;
} else {
tmp = sin((t_0 + (y_46_im * log(x_46_re)))) * pow(x_46_re, y_46_re);
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_1 = Math.sin(t_0);
double t_2 = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
double t_3 = t_1 * t_2;
double tmp;
if (x_46_re <= -1.7e-159) {
tmp = t_3;
} else if (x_46_re <= -2e-237) {
tmp = t_2 * Math.abs(t_1);
} else if (x_46_re <= 6.2e-170) {
tmp = t_3;
} else {
tmp = Math.sin((t_0 + (y_46_im * Math.log(x_46_re)))) * Math.pow(x_46_re, y_46_re);
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = y_46_re * math.atan2(x_46_im, x_46_re) t_1 = math.sin(t_0) t_2 = math.pow(math.hypot(x_46_im, x_46_re), y_46_re) t_3 = t_1 * t_2 tmp = 0 if x_46_re <= -1.7e-159: tmp = t_3 elif x_46_re <= -2e-237: tmp = t_2 * math.fabs(t_1) elif x_46_re <= 6.2e-170: tmp = t_3 else: tmp = math.sin((t_0 + (y_46_im * math.log(x_46_re)))) * math.pow(x_46_re, y_46_re) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_1 = sin(t_0) t_2 = hypot(x_46_im, x_46_re) ^ y_46_re t_3 = Float64(t_1 * t_2) tmp = 0.0 if (x_46_re <= -1.7e-159) tmp = t_3; elseif (x_46_re <= -2e-237) tmp = Float64(t_2 * abs(t_1)); elseif (x_46_re <= 6.2e-170) tmp = t_3; else tmp = Float64(sin(Float64(t_0 + Float64(y_46_im * log(x_46_re)))) * (x_46_re ^ y_46_re)); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = y_46_re * atan2(x_46_im, x_46_re); t_1 = sin(t_0); t_2 = hypot(x_46_im, x_46_re) ^ y_46_re; t_3 = t_1 * t_2; tmp = 0.0; if (x_46_re <= -1.7e-159) tmp = t_3; elseif (x_46_re <= -2e-237) tmp = t_2 * abs(t_1); elseif (x_46_re <= 6.2e-170) tmp = t_3; else tmp = sin((t_0 + (y_46_im * log(x_46_re)))) * (x_46_re ^ y_46_re); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sin[t$95$0], $MachinePrecision]}, Block[{t$95$2 = N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, Block[{t$95$3 = N[(t$95$1 * t$95$2), $MachinePrecision]}, If[LessEqual[x$46$re, -1.7e-159], t$95$3, If[LessEqual[x$46$re, -2e-237], N[(t$95$2 * N[Abs[t$95$1], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, 6.2e-170], t$95$3, N[(N[Sin[N[(t$95$0 + N[(y$46$im * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Power[x$46$re, y$46$re], $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := \sin t\_0\\
t_2 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
t_3 := t\_1 \cdot t\_2\\
\mathbf{if}\;x.re \leq -1.7 \cdot 10^{-159}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;x.re \leq -2 \cdot 10^{-237}:\\
\;\;\;\;t\_2 \cdot \left|t\_1\right|\\
\mathbf{elif}\;x.re \leq 6.2 \cdot 10^{-170}:\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;\sin \left(t\_0 + y.im \cdot \log x.re\right) \cdot {x.re}^{y.re}\\
\end{array}
\end{array}
if x.re < -1.69999999999999992e-159 or -2e-237 < x.re < 6.19999999999999971e-170Initial program 45.1%
exp-diff40.5%
exp-to-pow40.5%
hypot-define40.5%
*-commutative40.5%
exp-prod40.5%
fma-define40.5%
hypot-define73.1%
*-commutative73.1%
Simplified73.1%
Taylor expanded in y.im around 0 49.4%
unpow249.4%
unpow249.4%
hypot-undefine60.5%
Simplified60.5%
Taylor expanded in y.im around 0 45.2%
unpow245.2%
unpow245.2%
hypot-undefine49.4%
Simplified49.4%
if -1.69999999999999992e-159 < x.re < -2e-237Initial program 46.2%
exp-diff30.8%
exp-to-pow30.8%
hypot-define30.8%
*-commutative30.8%
exp-prod30.8%
fma-define30.8%
hypot-define53.8%
*-commutative53.8%
Simplified53.8%
Taylor expanded in y.im around 0 54.2%
unpow254.2%
unpow254.2%
hypot-undefine61.8%
Simplified61.8%
Taylor expanded in y.im around 0 39.1%
unpow239.1%
unpow239.1%
hypot-undefine46.7%
Simplified46.7%
add-sqr-sqrt38.7%
sqrt-unprod70.5%
pow270.5%
Applied egg-rr70.5%
unpow270.5%
rem-sqrt-square77.7%
Simplified77.7%
if 6.19999999999999971e-170 < x.re Initial program 46.6%
exp-diff41.0%
exp-to-pow41.0%
hypot-define41.0%
*-commutative41.0%
exp-prod38.8%
fma-define38.8%
hypot-define73.7%
*-commutative73.7%
Simplified73.7%
Taylor expanded in y.im around 0 59.8%
unpow259.8%
unpow259.8%
hypot-undefine70.8%
Simplified70.8%
Taylor expanded in x.im around 0 65.0%
Final simplification56.3%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re))))
(if (<= x.im 1.2e-149)
(* (sin t_0) (pow (hypot x.im x.re) y.re))
(* (sin (+ t_0 (* y.im (log x.im)))) (pow x.im y.re)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if (x_46_im <= 1.2e-149) {
tmp = sin(t_0) * pow(hypot(x_46_im, x_46_re), y_46_re);
} else {
tmp = sin((t_0 + (y_46_im * log(x_46_im)))) * pow(x_46_im, y_46_re);
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
double tmp;
if (x_46_im <= 1.2e-149) {
tmp = Math.sin(t_0) * Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
} else {
tmp = Math.sin((t_0 + (y_46_im * Math.log(x_46_im)))) * Math.pow(x_46_im, y_46_re);
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = y_46_re * math.atan2(x_46_im, x_46_re) tmp = 0 if x_46_im <= 1.2e-149: tmp = math.sin(t_0) * math.pow(math.hypot(x_46_im, x_46_re), y_46_re) else: tmp = math.sin((t_0 + (y_46_im * math.log(x_46_im)))) * math.pow(x_46_im, y_46_re) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) tmp = 0.0 if (x_46_im <= 1.2e-149) tmp = Float64(sin(t_0) * (hypot(x_46_im, x_46_re) ^ y_46_re)); else tmp = Float64(sin(Float64(t_0 + Float64(y_46_im * log(x_46_im)))) * (x_46_im ^ y_46_re)); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = y_46_re * atan2(x_46_im, x_46_re); tmp = 0.0; if (x_46_im <= 1.2e-149) tmp = sin(t_0) * (hypot(x_46_im, x_46_re) ^ y_46_re); else tmp = sin((t_0 + (y_46_im * log(x_46_im)))) * (x_46_im ^ y_46_re); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x$46$im, 1.2e-149], N[(N[Sin[t$95$0], $MachinePrecision] * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], N[(N[Sin[N[(t$95$0 + N[(y$46$im * N[Log[x$46$im], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;x.im \leq 1.2 \cdot 10^{-149}:\\
\;\;\;\;\sin t\_0 \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;\sin \left(t\_0 + y.im \cdot \log x.im\right) \cdot {x.im}^{y.re}\\
\end{array}
\end{array}
if x.im < 1.2000000000000001e-149Initial program 43.3%
exp-diff39.3%
exp-to-pow39.3%
hypot-define39.3%
*-commutative39.3%
exp-prod38.1%
fma-define38.1%
hypot-define74.7%
*-commutative74.7%
Simplified74.7%
Taylor expanded in y.im around 0 54.7%
unpow254.7%
unpow254.7%
hypot-undefine63.5%
Simplified63.5%
Taylor expanded in y.im around 0 47.6%
unpow247.6%
unpow247.6%
hypot-undefine48.8%
Simplified48.8%
if 1.2000000000000001e-149 < x.im Initial program 50.6%
exp-diff42.1%
exp-to-pow42.1%
hypot-define42.1%
*-commutative42.1%
exp-prod42.1%
fma-define42.1%
hypot-define67.4%
*-commutative67.4%
Simplified67.4%
Taylor expanded in y.im around 0 50.4%
unpow250.4%
unpow250.4%
hypot-undefine65.7%
Simplified65.7%
Taylor expanded in x.re around 0 60.1%
Final simplification52.5%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re))))
(if (<= x.re 8e-171)
(* (sin t_0) (pow (hypot x.im x.re) y.re))
(* (sin (+ t_0 (* y.im (log x.re)))) (pow x.re y.re)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if (x_46_re <= 8e-171) {
tmp = sin(t_0) * pow(hypot(x_46_im, x_46_re), y_46_re);
} else {
tmp = sin((t_0 + (y_46_im * log(x_46_re)))) * pow(x_46_re, y_46_re);
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
double tmp;
if (x_46_re <= 8e-171) {
tmp = Math.sin(t_0) * Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
} else {
tmp = Math.sin((t_0 + (y_46_im * Math.log(x_46_re)))) * Math.pow(x_46_re, y_46_re);
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = y_46_re * math.atan2(x_46_im, x_46_re) tmp = 0 if x_46_re <= 8e-171: tmp = math.sin(t_0) * math.pow(math.hypot(x_46_im, x_46_re), y_46_re) else: tmp = math.sin((t_0 + (y_46_im * math.log(x_46_re)))) * math.pow(x_46_re, y_46_re) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) tmp = 0.0 if (x_46_re <= 8e-171) tmp = Float64(sin(t_0) * (hypot(x_46_im, x_46_re) ^ y_46_re)); else tmp = Float64(sin(Float64(t_0 + Float64(y_46_im * log(x_46_re)))) * (x_46_re ^ y_46_re)); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = y_46_re * atan2(x_46_im, x_46_re); tmp = 0.0; if (x_46_re <= 8e-171) tmp = sin(t_0) * (hypot(x_46_im, x_46_re) ^ y_46_re); else tmp = sin((t_0 + (y_46_im * log(x_46_re)))) * (x_46_re ^ y_46_re); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x$46$re, 8e-171], N[(N[Sin[t$95$0], $MachinePrecision] * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], N[(N[Sin[N[(t$95$0 + N[(y$46$im * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Power[x$46$re, y$46$re], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;x.re \leq 8 \cdot 10^{-171}:\\
\;\;\;\;\sin t\_0 \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;\sin \left(t\_0 + y.im \cdot \log x.re\right) \cdot {x.re}^{y.re}\\
\end{array}
\end{array}
if x.re < 7.9999999999999999e-171Initial program 45.2%
exp-diff39.7%
exp-to-pow39.7%
hypot-define39.7%
*-commutative39.7%
exp-prod39.7%
fma-define39.7%
hypot-define71.6%
*-commutative71.6%
Simplified71.6%
Taylor expanded in y.im around 0 49.8%
unpow249.8%
unpow249.8%
hypot-undefine60.6%
Simplified60.6%
Taylor expanded in y.im around 0 44.8%
unpow244.8%
unpow244.8%
hypot-undefine49.2%
Simplified49.2%
if 7.9999999999999999e-171 < x.re Initial program 46.6%
exp-diff41.0%
exp-to-pow41.0%
hypot-define41.0%
*-commutative41.0%
exp-prod38.8%
fma-define38.8%
hypot-define73.7%
*-commutative73.7%
Simplified73.7%
Taylor expanded in y.im around 0 59.8%
unpow259.8%
unpow259.8%
hypot-undefine70.8%
Simplified70.8%
Taylor expanded in x.im around 0 65.0%
Final simplification54.7%
(FPCore (x.re x.im y.re y.im) :precision binary64 (* (sin (* y.re (atan2 x.im x.re))) (pow (hypot x.im x.re) y.re)))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return sin((y_46_re * atan2(x_46_im, x_46_re))) * pow(hypot(x_46_im, x_46_re), y_46_re);
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re))) * Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): return math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) * math.pow(math.hypot(x_46_im, x_46_re), y_46_re)
function code(x_46_re, x_46_im, y_46_re, y_46_im) return Float64(sin(Float64(y_46_re * atan(x_46_im, x_46_re))) * (hypot(x_46_im, x_46_re) ^ y_46_re)) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = sin((y_46_re * atan2(x_46_im, x_46_re))) * (hypot(x_46_im, x_46_re) ^ y_46_re); end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[(N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}
\end{array}
Initial program 45.7%
exp-diff40.2%
exp-to-pow40.2%
hypot-define40.2%
*-commutative40.2%
exp-prod39.4%
fma-define39.4%
hypot-define72.3%
*-commutative72.3%
Simplified72.3%
Taylor expanded in y.im around 0 53.3%
unpow253.3%
unpow253.3%
hypot-undefine64.2%
Simplified64.2%
Taylor expanded in y.im around 0 44.0%
unpow244.0%
unpow244.0%
hypot-undefine47.2%
Simplified47.2%
Final simplification47.2%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (sin (* y.re (atan2 x.im x.re)))))
(if (<= x.im -12.0)
(* t_0 (pow (- x.im) y.re))
(if (<= x.im 2.4e-151)
(* t_0 (pow (- x.re) y.re))
(* t_0 (pow x.im y.re))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = sin((y_46_re * atan2(x_46_im, x_46_re)));
double tmp;
if (x_46_im <= -12.0) {
tmp = t_0 * pow(-x_46_im, y_46_re);
} else if (x_46_im <= 2.4e-151) {
tmp = t_0 * pow(-x_46_re, y_46_re);
} else {
tmp = t_0 * pow(x_46_im, y_46_re);
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
real(8) :: tmp
t_0 = sin((y_46re * atan2(x_46im, x_46re)))
if (x_46im <= (-12.0d0)) then
tmp = t_0 * (-x_46im ** y_46re)
else if (x_46im <= 2.4d-151) then
tmp = t_0 * (-x_46re ** y_46re)
else
tmp = t_0 * (x_46im ** y_46re)
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
double tmp;
if (x_46_im <= -12.0) {
tmp = t_0 * Math.pow(-x_46_im, y_46_re);
} else if (x_46_im <= 2.4e-151) {
tmp = t_0 * Math.pow(-x_46_re, y_46_re);
} else {
tmp = t_0 * Math.pow(x_46_im, y_46_re);
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) tmp = 0 if x_46_im <= -12.0: tmp = t_0 * math.pow(-x_46_im, y_46_re) elif x_46_im <= 2.4e-151: tmp = t_0 * math.pow(-x_46_re, y_46_re) else: tmp = t_0 * math.pow(x_46_im, y_46_re) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin(Float64(y_46_re * atan(x_46_im, x_46_re))) tmp = 0.0 if (x_46_im <= -12.0) tmp = Float64(t_0 * (Float64(-x_46_im) ^ y_46_re)); elseif (x_46_im <= 2.4e-151) tmp = Float64(t_0 * (Float64(-x_46_re) ^ y_46_re)); else tmp = Float64(t_0 * (x_46_im ^ y_46_re)); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin((y_46_re * atan2(x_46_im, x_46_re))); tmp = 0.0; if (x_46_im <= -12.0) tmp = t_0 * (-x_46_im ^ y_46_re); elseif (x_46_im <= 2.4e-151) tmp = t_0 * (-x_46_re ^ y_46_re); else tmp = t_0 * (x_46_im ^ y_46_re); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[x$46$im, -12.0], N[(t$95$0 * N[Power[(-x$46$im), y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$im, 2.4e-151], N[(t$95$0 * N[Power[(-x$46$re), y$46$re], $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{if}\;x.im \leq -12:\\
\;\;\;\;t\_0 \cdot {\left(-x.im\right)}^{y.re}\\
\mathbf{elif}\;x.im \leq 2.4 \cdot 10^{-151}:\\
\;\;\;\;t\_0 \cdot {\left(-x.re\right)}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot {x.im}^{y.re}\\
\end{array}
\end{array}
if x.im < -12Initial program 41.4%
exp-diff38.5%
exp-to-pow38.5%
hypot-define38.5%
*-commutative38.5%
exp-prod38.5%
fma-define38.5%
hypot-define77.0%
*-commutative77.0%
Simplified77.0%
Taylor expanded in y.im around 0 48.3%
unpow248.3%
unpow248.3%
hypot-undefine57.9%
Simplified57.9%
Taylor expanded in y.im around 0 43.0%
Taylor expanded in x.im around -inf 44.3%
mul-1-neg44.3%
Simplified44.3%
if -12 < x.im < 2.4e-151Initial program 45.1%
exp-diff40.2%
exp-to-pow40.2%
hypot-define40.2%
*-commutative40.2%
exp-prod38.2%
fma-define38.2%
hypot-define72.9%
*-commutative72.9%
Simplified72.9%
Taylor expanded in y.im around 0 59.6%
unpow259.6%
unpow259.6%
hypot-undefine66.9%
Simplified66.9%
Taylor expanded in y.im around 0 51.1%
Taylor expanded in x.re around -inf 48.9%
mul-1-neg48.9%
Simplified48.9%
if 2.4e-151 < x.im Initial program 50.0%
exp-diff41.6%
exp-to-pow41.6%
hypot-define41.6%
*-commutative41.6%
exp-prod41.6%
fma-define41.6%
hypot-define67.8%
*-commutative67.8%
Simplified67.8%
Taylor expanded in y.im around 0 49.9%
unpow249.9%
unpow249.9%
hypot-undefine66.1%
Simplified66.1%
Taylor expanded in y.im around 0 36.1%
unpow236.1%
unpow236.1%
hypot-undefine43.4%
Simplified43.4%
Taylor expanded in x.re around 0 41.9%
Final simplification45.3%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (sin (* y.re (atan2 x.im x.re)))))
(if (<= x.im -0.46)
(* t_0 (pow (- x.im) y.re))
(if (<= x.im 5.2e-151) (* t_0 (pow x.re y.re)) (* t_0 (pow x.im y.re))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = sin((y_46_re * atan2(x_46_im, x_46_re)));
double tmp;
if (x_46_im <= -0.46) {
tmp = t_0 * pow(-x_46_im, y_46_re);
} else if (x_46_im <= 5.2e-151) {
tmp = t_0 * pow(x_46_re, y_46_re);
} else {
tmp = t_0 * pow(x_46_im, y_46_re);
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
real(8) :: tmp
t_0 = sin((y_46re * atan2(x_46im, x_46re)))
if (x_46im <= (-0.46d0)) then
tmp = t_0 * (-x_46im ** y_46re)
else if (x_46im <= 5.2d-151) then
tmp = t_0 * (x_46re ** y_46re)
else
tmp = t_0 * (x_46im ** y_46re)
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
double tmp;
if (x_46_im <= -0.46) {
tmp = t_0 * Math.pow(-x_46_im, y_46_re);
} else if (x_46_im <= 5.2e-151) {
tmp = t_0 * Math.pow(x_46_re, y_46_re);
} else {
tmp = t_0 * Math.pow(x_46_im, y_46_re);
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) tmp = 0 if x_46_im <= -0.46: tmp = t_0 * math.pow(-x_46_im, y_46_re) elif x_46_im <= 5.2e-151: tmp = t_0 * math.pow(x_46_re, y_46_re) else: tmp = t_0 * math.pow(x_46_im, y_46_re) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin(Float64(y_46_re * atan(x_46_im, x_46_re))) tmp = 0.0 if (x_46_im <= -0.46) tmp = Float64(t_0 * (Float64(-x_46_im) ^ y_46_re)); elseif (x_46_im <= 5.2e-151) tmp = Float64(t_0 * (x_46_re ^ y_46_re)); else tmp = Float64(t_0 * (x_46_im ^ y_46_re)); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin((y_46_re * atan2(x_46_im, x_46_re))); tmp = 0.0; if (x_46_im <= -0.46) tmp = t_0 * (-x_46_im ^ y_46_re); elseif (x_46_im <= 5.2e-151) tmp = t_0 * (x_46_re ^ y_46_re); else tmp = t_0 * (x_46_im ^ y_46_re); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[x$46$im, -0.46], N[(t$95$0 * N[Power[(-x$46$im), y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$im, 5.2e-151], N[(t$95$0 * N[Power[x$46$re, y$46$re], $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{if}\;x.im \leq -0.46:\\
\;\;\;\;t\_0 \cdot {\left(-x.im\right)}^{y.re}\\
\mathbf{elif}\;x.im \leq 5.2 \cdot 10^{-151}:\\
\;\;\;\;t\_0 \cdot {x.re}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot {x.im}^{y.re}\\
\end{array}
\end{array}
if x.im < -0.46000000000000002Initial program 42.2%
exp-diff39.4%
exp-to-pow39.4%
hypot-define39.4%
*-commutative39.4%
exp-prod39.4%
fma-define39.4%
hypot-define77.3%
*-commutative77.3%
Simplified77.3%
Taylor expanded in y.im around 0 47.7%
unpow247.7%
unpow247.7%
hypot-undefine57.1%
Simplified57.1%
Taylor expanded in y.im around 0 42.4%
Taylor expanded in x.im around -inf 43.7%
mul-1-neg43.7%
Simplified43.7%
if -0.46000000000000002 < x.im < 5.2000000000000001e-151Initial program 44.5%
exp-diff39.6%
exp-to-pow39.6%
hypot-define39.6%
*-commutative39.6%
exp-prod37.6%
fma-define37.6%
hypot-define72.6%
*-commutative72.6%
Simplified72.6%
Taylor expanded in y.im around 0 60.2%
unpow260.2%
unpow260.2%
hypot-undefine67.6%
Simplified67.6%
Taylor expanded in y.im around 0 51.6%
unpow251.6%
unpow251.6%
hypot-undefine52.8%
Simplified52.8%
Taylor expanded in x.im around 0 47.1%
if 5.2000000000000001e-151 < x.im Initial program 50.0%
exp-diff41.6%
exp-to-pow41.6%
hypot-define41.6%
*-commutative41.6%
exp-prod41.6%
fma-define41.6%
hypot-define67.8%
*-commutative67.8%
Simplified67.8%
Taylor expanded in y.im around 0 49.9%
unpow249.9%
unpow249.9%
hypot-undefine66.1%
Simplified66.1%
Taylor expanded in y.im around 0 36.1%
unpow236.1%
unpow236.1%
hypot-undefine43.4%
Simplified43.4%
Taylor expanded in x.re around 0 41.9%
Final simplification44.4%
(FPCore (x.re x.im y.re y.im) :precision binary64 (let* ((t_0 (sin (* y.re (atan2 x.im x.re))))) (if (<= x.im 2.45e-148) (* t_0 (pow x.re y.re)) (* t_0 (pow x.im y.re)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = sin((y_46_re * atan2(x_46_im, x_46_re)));
double tmp;
if (x_46_im <= 2.45e-148) {
tmp = t_0 * pow(x_46_re, y_46_re);
} else {
tmp = t_0 * pow(x_46_im, y_46_re);
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
real(8) :: tmp
t_0 = sin((y_46re * atan2(x_46im, x_46re)))
if (x_46im <= 2.45d-148) then
tmp = t_0 * (x_46re ** y_46re)
else
tmp = t_0 * (x_46im ** y_46re)
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re)));
double tmp;
if (x_46_im <= 2.45e-148) {
tmp = t_0 * Math.pow(x_46_re, y_46_re);
} else {
tmp = t_0 * Math.pow(x_46_im, y_46_re);
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) tmp = 0 if x_46_im <= 2.45e-148: tmp = t_0 * math.pow(x_46_re, y_46_re) else: tmp = t_0 * math.pow(x_46_im, y_46_re) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin(Float64(y_46_re * atan(x_46_im, x_46_re))) tmp = 0.0 if (x_46_im <= 2.45e-148) tmp = Float64(t_0 * (x_46_re ^ y_46_re)); else tmp = Float64(t_0 * (x_46_im ^ y_46_re)); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = sin((y_46_re * atan2(x_46_im, x_46_re))); tmp = 0.0; if (x_46_im <= 2.45e-148) tmp = t_0 * (x_46_re ^ y_46_re); else tmp = t_0 * (x_46_im ^ y_46_re); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[x$46$im, 2.45e-148], N[(t$95$0 * N[Power[x$46$re, y$46$re], $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{if}\;x.im \leq 2.45 \cdot 10^{-148}:\\
\;\;\;\;t\_0 \cdot {x.re}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot {x.im}^{y.re}\\
\end{array}
\end{array}
if x.im < 2.45e-148Initial program 43.3%
exp-diff39.3%
exp-to-pow39.3%
hypot-define39.3%
*-commutative39.3%
exp-prod38.1%
fma-define38.1%
hypot-define74.7%
*-commutative74.7%
Simplified74.7%
Taylor expanded in y.im around 0 54.7%
unpow254.7%
unpow254.7%
hypot-undefine63.5%
Simplified63.5%
Taylor expanded in y.im around 0 47.6%
unpow247.6%
unpow247.6%
hypot-undefine48.8%
Simplified48.8%
Taylor expanded in x.im around 0 39.5%
if 2.45e-148 < x.im Initial program 50.6%
exp-diff42.1%
exp-to-pow42.1%
hypot-define42.1%
*-commutative42.1%
exp-prod42.1%
fma-define42.1%
hypot-define67.4%
*-commutative67.4%
Simplified67.4%
Taylor expanded in y.im around 0 50.4%
unpow250.4%
unpow250.4%
hypot-undefine65.7%
Simplified65.7%
Taylor expanded in y.im around 0 36.5%
unpow236.5%
unpow236.5%
hypot-undefine43.9%
Simplified43.9%
Taylor expanded in x.re around 0 42.3%
Final simplification40.4%
(FPCore (x.re x.im y.re y.im) :precision binary64 (* (sin (* y.re (atan2 x.im x.re))) (pow x.im y.re)))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return sin((y_46_re * atan2(x_46_im, x_46_re))) * pow(x_46_im, 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
code = sin((y_46re * atan2(x_46im, x_46re))) * (x_46im ** y_46re)
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re))) * Math.pow(x_46_im, y_46_re);
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): return math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) * math.pow(x_46_im, y_46_re)
function code(x_46_re, x_46_im, y_46_re, y_46_im) return Float64(sin(Float64(y_46_re * atan(x_46_im, x_46_re))) * (x_46_im ^ y_46_re)) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = sin((y_46_re * atan2(x_46_im, x_46_re))) * (x_46_im ^ y_46_re); end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[(N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {x.im}^{y.re}
\end{array}
Initial program 45.7%
exp-diff40.2%
exp-to-pow40.2%
hypot-define40.2%
*-commutative40.2%
exp-prod39.4%
fma-define39.4%
hypot-define72.3%
*-commutative72.3%
Simplified72.3%
Taylor expanded in y.im around 0 53.3%
unpow253.3%
unpow253.3%
hypot-undefine64.2%
Simplified64.2%
Taylor expanded in y.im around 0 44.0%
unpow244.0%
unpow244.0%
hypot-undefine47.2%
Simplified47.2%
Taylor expanded in x.re around 0 30.9%
Final simplification30.9%
herbie shell --seed 2024096
(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)))))