
(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 20 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (sqrt (+ (* x.re x.re) (* x.im x.im))))))
(*
(exp (- (* t_0 y.re) (* (atan2 x.im x.re) y.im)))
(sin (+ (* t_0 y.im) (* (atan2 x.im x.re) y.re))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
return exp(((t_0 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin(((t_0 * y_46_im) + (atan2(x_46_im, x_46_re) * y_46_re)));
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
t_0 = log(sqrt(((x_46re * x_46re) + (x_46im * x_46im))))
code = exp(((t_0 * y_46re) - (atan2(x_46im, x_46re) * y_46im))) * sin(((t_0 * y_46im) + (atan2(x_46im, x_46re) * y_46re)))
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
return Math.exp(((t_0 * y_46_re) - (Math.atan2(x_46_im, x_46_re) * y_46_im))) * Math.sin(((t_0 * y_46_im) + (Math.atan2(x_46_im, x_46_re) * y_46_re)));
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) return math.exp(((t_0 * y_46_re) - (math.atan2(x_46_im, x_46_re) * y_46_im))) * math.sin(((t_0 * y_46_im) + (math.atan2(x_46_im, x_46_re) * y_46_re)))
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) return Float64(exp(Float64(Float64(t_0 * y_46_re) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * sin(Float64(Float64(t_0 * y_46_im) + Float64(atan(x_46_im, x_46_re) * y_46_re)))) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))); tmp = exp(((t_0 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * sin(((t_0 * y_46_im) + (atan2(x_46_im, x_46_re) * y_46_re))); end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]}, N[(N[Exp[N[(N[(t$95$0 * y$46$re), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(N[(t$95$0 * y$46$im), $MachinePrecision] + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)\\
e^{t\_0 \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \sin \left(t\_0 \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)
\end{array}
\end{array}
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.re x.im)))
(t_1 (exp (fma t_0 y.re (* (atan2 x.im x.re) (- y.im)))))
(t_2 (* y.re (atan2 x.im x.re))))
(if (<= y.im -1000.0)
(* t_1 (sin (* y.im (log (hypot x.im x.re)))))
(if (<= y.im 5.6e+14)
(*
(sin (fma t_0 y.im t_2))
(/ (pow (hypot x.re x.im) y.re) (pow (exp y.im) (atan2 x.im x.re))))
(* t_1 (sin (pow (cbrt t_2) 3.0)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(hypot(x_46_re, x_46_im));
double t_1 = exp(fma(t_0, y_46_re, (atan2(x_46_im, x_46_re) * -y_46_im)));
double t_2 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if (y_46_im <= -1000.0) {
tmp = t_1 * sin((y_46_im * log(hypot(x_46_im, x_46_re))));
} else if (y_46_im <= 5.6e+14) {
tmp = sin(fma(t_0, y_46_im, t_2)) * (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(pow(cbrt(t_2), 3.0));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_re, x_46_im)) t_1 = exp(fma(t_0, y_46_re, Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))) t_2 = Float64(y_46_re * atan(x_46_im, x_46_re)) tmp = 0.0 if (y_46_im <= -1000.0) tmp = Float64(t_1 * sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re))))); elseif (y_46_im <= 5.6e+14) tmp = Float64(sin(fma(t_0, y_46_im, t_2)) * 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((cbrt(t_2) ^ 3.0))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = 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]}, Block[{t$95$2 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -1000.0], N[(t$95$1 * N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 5.6e+14], N[(N[Sin[N[(t$95$0 * y$46$im + t$95$2), $MachinePrecision]], $MachinePrecision] * N[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] / N[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[Power[N[Power[t$95$2, 1/3], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
t_1 := e^{\mathsf{fma}\left(t\_0, y.re, \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)\right)}\\
t_2 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.im \leq -1000:\\
\;\;\;\;t\_1 \cdot \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\mathbf{elif}\;y.im \leq 5.6 \cdot 10^{+14}:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(t\_0, y.im, t\_2\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({\left(\sqrt[3]{t\_2}\right)}^{3}\right)\\
\end{array}
\end{array}
if y.im < -1e3Initial program 35.2%
cancel-sign-sub-inv35.2%
fma-define35.2%
hypot-define35.2%
distribute-lft-neg-in35.2%
distribute-rgt-neg-out35.2%
fma-define35.2%
hypot-define71.4%
*-commutative71.4%
Simplified71.4%
Taylor expanded in y.im around inf 37.9%
unpow237.9%
unpow237.9%
hypot-undefine74.1%
Simplified74.1%
if -1e3 < y.im < 5.6e14Initial program 51.4%
exp-diff51.4%
exp-to-pow51.4%
hypot-define51.4%
*-commutative51.4%
exp-prod51.4%
fma-define51.4%
hypot-define94.5%
*-commutative94.5%
Simplified94.5%
if 5.6e14 < y.im Initial program 43.6%
cancel-sign-sub-inv43.6%
fma-define43.6%
hypot-define43.6%
distribute-lft-neg-in43.6%
distribute-rgt-neg-out43.6%
fma-define43.6%
hypot-define75.5%
*-commutative75.5%
Simplified75.5%
Taylor expanded in y.re around inf 29.8%
+-commutative29.8%
associate-/l*29.9%
unpow229.9%
unpow229.9%
hypot-undefine50.0%
Simplified50.0%
add-cube-cbrt51.5%
pow353.5%
+-commutative53.5%
fma-define53.5%
Applied egg-rr53.5%
Taylor expanded in y.re around inf 76.7%
Final simplification85.1%
(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.2%
cancel-sign-sub-inv45.2%
fma-define45.2%
hypot-define45.2%
distribute-lft-neg-in45.2%
distribute-rgt-neg-out45.2%
fma-define45.2%
hypot-define84.1%
*-commutative84.1%
Simplified84.1%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.im x.re)))
(t_1
(exp
(fma (log (hypot x.re x.im)) y.re (* (atan2 x.im x.re) (- y.im))))))
(if (<= y.im -2e+25)
(* t_1 (sin (* y.im t_0)))
(if (<= y.im 1.7e+52)
(* t_1 (sin (* y.re (+ (atan2 x.im x.re) (* y.im (/ t_0 y.re))))))
(* t_1 (sin (pow (cbrt (* y.re (atan2 x.im x.re))) 3.0)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(hypot(x_46_im, x_46_re));
double t_1 = exp(fma(log(hypot(x_46_re, x_46_im)), y_46_re, (atan2(x_46_im, x_46_re) * -y_46_im)));
double tmp;
if (y_46_im <= -2e+25) {
tmp = t_1 * sin((y_46_im * t_0));
} else if (y_46_im <= 1.7e+52) {
tmp = t_1 * sin((y_46_re * (atan2(x_46_im, x_46_re) + (y_46_im * (t_0 / y_46_re)))));
} else {
tmp = t_1 * sin(pow(cbrt((y_46_re * atan2(x_46_im, x_46_re))), 3.0));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_im, x_46_re)) t_1 = exp(fma(log(hypot(x_46_re, x_46_im)), y_46_re, Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))) tmp = 0.0 if (y_46_im <= -2e+25) tmp = Float64(t_1 * sin(Float64(y_46_im * t_0))); elseif (y_46_im <= 1.7e+52) tmp = Float64(t_1 * sin(Float64(y_46_re * Float64(atan(x_46_im, x_46_re) + Float64(y_46_im * Float64(t_0 / y_46_re)))))); else tmp = Float64(t_1 * sin((cbrt(Float64(y_46_re * atan(x_46_im, x_46_re))) ^ 3.0))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[Exp[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$re + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$im, -2e+25], N[(t$95$1 * N[Sin[N[(y$46$im * t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 1.7e+52], N[(t$95$1 * N[Sin[N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] + N[(y$46$im * N[(t$95$0 / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[Sin[N[Power[N[Power[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision], 3.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^{\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.re, \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)\right)}\\
\mathbf{if}\;y.im \leq -2 \cdot 10^{+25}:\\
\;\;\;\;t\_1 \cdot \sin \left(y.im \cdot t\_0\right)\\
\mathbf{elif}\;y.im \leq 1.7 \cdot 10^{+52}:\\
\;\;\;\;t\_1 \cdot \sin \left(y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} + y.im \cdot \frac{t\_0}{y.re}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot \sin \left({\left(\sqrt[3]{y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}}\right)}^{3}\right)\\
\end{array}
\end{array}
if y.im < -2.00000000000000018e25Initial program 36.3%
cancel-sign-sub-inv36.3%
fma-define36.3%
hypot-define36.3%
distribute-lft-neg-in36.3%
distribute-rgt-neg-out36.3%
fma-define36.3%
hypot-define71.7%
*-commutative71.7%
Simplified71.7%
Taylor expanded in y.im around inf 39.2%
unpow239.2%
unpow239.2%
hypot-undefine74.6%
Simplified74.6%
if -2.00000000000000018e25 < y.im < 1.7e52Initial program 50.7%
cancel-sign-sub-inv50.7%
fma-define50.7%
hypot-define50.7%
distribute-lft-neg-in50.7%
distribute-rgt-neg-out50.7%
fma-define50.7%
hypot-define93.8%
*-commutative93.8%
Simplified93.8%
Taylor expanded in y.re around inf 50.6%
+-commutative50.6%
associate-/l*49.9%
unpow249.9%
unpow249.9%
hypot-undefine92.9%
Simplified92.9%
if 1.7e52 < y.im Initial program 42.1%
cancel-sign-sub-inv42.1%
fma-define42.1%
hypot-define42.1%
distribute-lft-neg-in42.1%
distribute-rgt-neg-out42.1%
fma-define42.1%
hypot-define73.9%
*-commutative73.9%
Simplified73.9%
Taylor expanded in y.re around inf 27.5%
+-commutative27.5%
associate-/l*27.6%
unpow227.6%
unpow227.6%
hypot-undefine46.9%
Simplified46.9%
add-cube-cbrt50.6%
pow352.7%
+-commutative52.7%
fma-define52.7%
Applied egg-rr52.7%
Taylor expanded in y.re around inf 77.3%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.re x.im)))
(t_1 (exp (fma t_0 y.re (* (atan2 x.im x.re) (- y.im)))))
(t_2 (* y.re (atan2 x.im x.re))))
(if (<= y.im -8400000.0)
(* t_1 (sin (* y.im (log (hypot x.im x.re)))))
(if (<= y.im 1.05e+52)
(* (sin (fma t_0 y.im t_2)) (pow (hypot x.re x.im) y.re))
(* t_1 (sin (pow (cbrt t_2) 3.0)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(hypot(x_46_re, x_46_im));
double t_1 = exp(fma(t_0, y_46_re, (atan2(x_46_im, x_46_re) * -y_46_im)));
double t_2 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if (y_46_im <= -8400000.0) {
tmp = t_1 * sin((y_46_im * log(hypot(x_46_im, x_46_re))));
} else if (y_46_im <= 1.05e+52) {
tmp = sin(fma(t_0, y_46_im, t_2)) * pow(hypot(x_46_re, x_46_im), y_46_re);
} else {
tmp = t_1 * sin(pow(cbrt(t_2), 3.0));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_re, x_46_im)) t_1 = exp(fma(t_0, y_46_re, Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))) t_2 = Float64(y_46_re * atan(x_46_im, x_46_re)) tmp = 0.0 if (y_46_im <= -8400000.0) tmp = Float64(t_1 * sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re))))); elseif (y_46_im <= 1.05e+52) tmp = Float64(sin(fma(t_0, y_46_im, t_2)) * (hypot(x_46_re, x_46_im) ^ y_46_re)); else tmp = Float64(t_1 * sin((cbrt(t_2) ^ 3.0))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = 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]}, Block[{t$95$2 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -8400000.0], N[(t$95$1 * N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 1.05e+52], N[(N[Sin[N[(t$95$0 * y$46$im + t$95$2), $MachinePrecision]], $MachinePrecision] * N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[Sin[N[Power[N[Power[t$95$2, 1/3], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
t_1 := e^{\mathsf{fma}\left(t\_0, y.re, \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)\right)}\\
t_2 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.im \leq -8400000:\\
\;\;\;\;t\_1 \cdot \sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\mathbf{elif}\;y.im \leq 1.05 \cdot 10^{+52}:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(t\_0, y.im, t\_2\right)\right) \cdot {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot \sin \left({\left(\sqrt[3]{t\_2}\right)}^{3}\right)\\
\end{array}
\end{array}
if y.im < -8.4e6Initial program 34.8%
cancel-sign-sub-inv34.8%
fma-define34.8%
hypot-define34.8%
distribute-lft-neg-in34.8%
distribute-rgt-neg-out34.8%
fma-define34.8%
hypot-define71.5%
*-commutative71.5%
Simplified71.5%
Taylor expanded in y.im around inf 37.5%
unpow237.5%
unpow237.5%
hypot-undefine74.3%
Simplified74.3%
if -8.4e6 < y.im < 1.05e52Initial program 51.8%
exp-diff51.8%
exp-to-pow51.8%
hypot-define51.8%
*-commutative51.8%
exp-prod50.6%
fma-define50.6%
hypot-define93.2%
*-commutative93.2%
Simplified93.2%
Taylor expanded in y.im around 0 93.0%
if 1.05e52 < y.im Initial program 42.1%
cancel-sign-sub-inv42.1%
fma-define42.1%
hypot-define42.1%
distribute-lft-neg-in42.1%
distribute-rgt-neg-out42.1%
fma-define42.1%
hypot-define73.9%
*-commutative73.9%
Simplified73.9%
Taylor expanded in y.re around inf 27.5%
+-commutative27.5%
associate-/l*27.6%
unpow227.6%
unpow227.6%
hypot-undefine46.9%
Simplified46.9%
add-cube-cbrt50.6%
pow352.7%
+-commutative52.7%
fma-define52.7%
Applied egg-rr52.7%
Taylor expanded in y.re around inf 77.3%
Final simplification84.8%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.re x.im))))
(if (or (<= y.im -4e+17) (not (<= y.im 2e+71)))
(*
(exp (fma t_0 y.re (* (atan2 x.im x.re) (- y.im))))
(sin (* y.im (log (hypot x.im x.re)))))
(*
(sin (fma t_0 y.im (* y.re (atan2 x.im x.re))))
(/ (pow (hypot x.re x.im) y.re) (+ 1.0 (* (atan2 x.im x.re) y.im)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(hypot(x_46_re, x_46_im));
double tmp;
if ((y_46_im <= -4e+17) || !(y_46_im <= 2e+71)) {
tmp = exp(fma(t_0, y_46_re, (atan2(x_46_im, x_46_re) * -y_46_im))) * sin((y_46_im * log(hypot(x_46_im, x_46_re))));
} else {
tmp = sin(fma(t_0, y_46_im, (y_46_re * atan2(x_46_im, x_46_re)))) * (pow(hypot(x_46_re, x_46_im), y_46_re) / (1.0 + (atan2(x_46_im, x_46_re) * y_46_im)));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_re, x_46_im)) tmp = 0.0 if ((y_46_im <= -4e+17) || !(y_46_im <= 2e+71)) tmp = Float64(exp(fma(t_0, y_46_re, Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))) * sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re))))); else tmp = Float64(sin(fma(t_0, y_46_im, Float64(y_46_re * atan(x_46_im, x_46_re)))) * Float64((hypot(x_46_re, x_46_im) ^ y_46_re) / Float64(1.0 + Float64(atan(x_46_im, x_46_re) * y_46_im)))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, If[Or[LessEqual[y$46$im, -4e+17], N[Not[LessEqual[y$46$im, 2e+71]], $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[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(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] * N[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] / N[(1.0 + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
\mathbf{if}\;y.im \leq -4 \cdot 10^{+17} \lor \neg \left(y.im \leq 2 \cdot 10^{+71}\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(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(t\_0, y.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \cdot \frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{1 + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\
\end{array}
\end{array}
if y.im < -4e17 or 2.0000000000000001e71 < y.im Initial program 39.2%
cancel-sign-sub-inv39.2%
fma-define39.2%
hypot-define39.2%
distribute-lft-neg-in39.2%
distribute-rgt-neg-out39.2%
fma-define39.2%
hypot-define76.0%
*-commutative76.0%
Simplified76.0%
Taylor expanded in y.im around inf 40.0%
unpow240.0%
unpow240.0%
hypot-undefine76.9%
Simplified76.9%
if -4e17 < y.im < 2.0000000000000001e71Initial program 50.0%
exp-diff49.3%
exp-to-pow49.3%
hypot-define49.3%
*-commutative49.3%
exp-prod48.1%
fma-define48.1%
hypot-define88.7%
*-commutative88.7%
Simplified88.7%
Taylor expanded in y.im around 0 90.5%
Final simplification84.5%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.re x.im))))
(if (or (<= y.im -8400000.0) (not (<= y.im 2.65e-98)))
(*
(exp (fma t_0 y.re (* (atan2 x.im x.re) (- y.im))))
(sin (* y.im (log (hypot x.im x.re)))))
(*
(sin (fma t_0 y.im (* y.re (atan2 x.im x.re))))
(pow (hypot x.re x.im) y.re)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(hypot(x_46_re, x_46_im));
double tmp;
if ((y_46_im <= -8400000.0) || !(y_46_im <= 2.65e-98)) {
tmp = exp(fma(t_0, y_46_re, (atan2(x_46_im, x_46_re) * -y_46_im))) * sin((y_46_im * log(hypot(x_46_im, x_46_re))));
} else {
tmp = sin(fma(t_0, y_46_im, (y_46_re * atan2(x_46_im, x_46_re)))) * pow(hypot(x_46_re, x_46_im), y_46_re);
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_re, x_46_im)) tmp = 0.0 if ((y_46_im <= -8400000.0) || !(y_46_im <= 2.65e-98)) tmp = Float64(exp(fma(t_0, y_46_re, Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))) * sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re))))); else tmp = Float64(sin(fma(t_0, y_46_im, Float64(y_46_re * atan(x_46_im, x_46_re)))) * (hypot(x_46_re, x_46_im) ^ y_46_re)); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, If[Or[LessEqual[y$46$im, -8400000.0], N[Not[LessEqual[y$46$im, 2.65e-98]], $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[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(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] * N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
\mathbf{if}\;y.im \leq -8400000 \lor \neg \left(y.im \leq 2.65 \cdot 10^{-98}\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(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(t\_0, y.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \cdot {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\\
\end{array}
\end{array}
if y.im < -8.4e6 or 2.65000000000000015e-98 < y.im Initial program 40.8%
cancel-sign-sub-inv40.8%
fma-define40.8%
hypot-define40.8%
distribute-lft-neg-in40.8%
distribute-rgt-neg-out40.8%
fma-define40.8%
hypot-define76.5%
*-commutative76.5%
Simplified76.5%
Taylor expanded in y.im around inf 40.8%
unpow240.8%
unpow240.8%
hypot-undefine77.2%
Simplified77.2%
if -8.4e6 < y.im < 2.65000000000000015e-98Initial program 50.9%
exp-diff50.9%
exp-to-pow50.9%
hypot-define50.9%
*-commutative50.9%
exp-prod50.3%
fma-define50.3%
hypot-define93.5%
*-commutative93.5%
Simplified93.5%
Taylor expanded in y.im around 0 94.1%
Final simplification84.5%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (pow (hypot x.re x.im) y.re))
(t_1 (* (atan2 x.im x.re) y.im))
(t_2 (* y.re (atan2 x.im x.re))))
(if (<= y.im -8.2e+226)
(*
(exp (- (* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im))))) t_1))
(sin t_2))
(if (<= y.im -5e+17)
(* (sin (* y.im (log (hypot x.im x.re)))) (/ t_0 (exp t_1)))
(if (<= y.im 3.8e+62)
(* (sin (fma (log (hypot x.re x.im)) y.im t_2)) t_0)
(*
y.re
(* (atan2 x.im x.re) (pow (exp y.im) (- (atan2 x.im x.re))))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = pow(hypot(x_46_re, x_46_im), y_46_re);
double t_1 = atan2(x_46_im, x_46_re) * y_46_im;
double t_2 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if (y_46_im <= -8.2e+226) {
tmp = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - t_1)) * sin(t_2);
} else if (y_46_im <= -5e+17) {
tmp = sin((y_46_im * log(hypot(x_46_im, x_46_re)))) * (t_0 / exp(t_1));
} else if (y_46_im <= 3.8e+62) {
tmp = sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_2)) * t_0;
} else {
tmp = y_46_re * (atan2(x_46_im, x_46_re) * pow(exp(y_46_im), -atan2(x_46_im, x_46_re)));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = hypot(x_46_re, x_46_im) ^ y_46_re t_1 = Float64(atan(x_46_im, x_46_re) * y_46_im) t_2 = Float64(y_46_re * atan(x_46_im, x_46_re)) tmp = 0.0 if (y_46_im <= -8.2e+226) tmp = Float64(exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - t_1)) * sin(t_2)); elseif (y_46_im <= -5e+17) tmp = Float64(sin(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) * Float64(t_0 / exp(t_1))); elseif (y_46_im <= 3.8e+62) tmp = Float64(sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_2)) * t_0); else tmp = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * (exp(y_46_im) ^ Float64(-atan(x_46_im, x_46_re))))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, Block[{t$95$1 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, Block[{t$95$2 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -8.2e+226], N[(N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]], $MachinePrecision] * N[Sin[t$95$2], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, -5e+17], N[(N[Sin[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(t$95$0 / N[Exp[t$95$1], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 3.8e+62], N[(N[Sin[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im + t$95$2), $MachinePrecision]], $MachinePrecision] * t$95$0), $MachinePrecision], N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Power[N[Exp[y$46$im], $MachinePrecision], (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\\
t_1 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_2 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.im \leq -8.2 \cdot 10^{+226}:\\
\;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - t\_1} \cdot \sin t\_2\\
\mathbf{elif}\;y.im \leq -5 \cdot 10^{+17}:\\
\;\;\;\;\sin \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \cdot \frac{t\_0}{e^{t\_1}}\\
\mathbf{elif}\;y.im \leq 3.8 \cdot 10^{+62}:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, t\_2\right)\right) \cdot t\_0\\
\mathbf{else}:\\
\;\;\;\;y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot {\left(e^{y.im}\right)}^{\left(-\tan^{-1}_* \frac{x.im}{x.re}\right)}\right)\\
\end{array}
\end{array}
if y.im < -8.19999999999999971e226Initial program 37.5%
Taylor expanded in y.im around 0 67.1%
if -8.19999999999999971e226 < y.im < -5e17Initial program 34.1%
exp-diff29.9%
exp-to-pow29.9%
hypot-define29.9%
*-commutative29.9%
exp-prod25.6%
fma-define25.6%
hypot-define60.1%
*-commutative60.1%
Simplified60.1%
Taylor expanded in y.im around inf 25.6%
unpow236.2%
unpow236.2%
hypot-undefine75.5%
Simplified60.1%
Taylor expanded in y.im around inf 64.8%
if -5e17 < y.im < 3.79999999999999984e62Initial program 51.4%
exp-diff50.7%
exp-to-pow50.7%
hypot-define50.7%
*-commutative50.7%
exp-prod49.5%
fma-define49.5%
hypot-define91.2%
*-commutative91.2%
Simplified91.2%
Taylor expanded in y.im around 0 91.7%
if 3.79999999999999984e62 < y.im Initial program 41.8%
Taylor expanded in y.im around 0 50.6%
Taylor expanded in y.re around 0 61.3%
*-commutative61.3%
distribute-rgt-neg-in61.3%
mul-1-neg61.3%
exp-prod63.3%
mul-1-neg63.3%
Simplified63.3%
Final simplification79.4%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (or (<= y.im -11500000.0) (not (<= y.im 3.1e+62)))
(* y.re (* (atan2 x.im x.re) (pow (exp y.im) (- (atan2 x.im x.re)))))
(*
(sin (fma (log (hypot x.re x.im)) y.im (* y.re (atan2 x.im x.re))))
(pow (hypot x.re x.im) y.re))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_im <= -11500000.0) || !(y_46_im <= 3.1e+62)) {
tmp = y_46_re * (atan2(x_46_im, x_46_re) * pow(exp(y_46_im), -atan2(x_46_im, x_46_re)));
} else {
tmp = sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, (y_46_re * atan2(x_46_im, x_46_re)))) * pow(hypot(x_46_re, x_46_im), y_46_re);
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if ((y_46_im <= -11500000.0) || !(y_46_im <= 3.1e+62)) tmp = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * (exp(y_46_im) ^ Float64(-atan(x_46_im, x_46_re))))); else tmp = Float64(sin(fma(log(hypot(x_46_re, x_46_im)), y_46_im, Float64(y_46_re * atan(x_46_im, x_46_re)))) * (hypot(x_46_re, x_46_im) ^ y_46_re)); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[Or[LessEqual[y$46$im, -11500000.0], N[Not[LessEqual[y$46$im, 3.1e+62]], $MachinePrecision]], N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Power[N[Exp[y$46$im], $MachinePrecision], (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sin[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im + N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.im \leq -11500000 \lor \neg \left(y.im \leq 3.1 \cdot 10^{+62}\right):\\
\;\;\;\;y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot {\left(e^{y.im}\right)}^{\left(-\tan^{-1}_* \frac{x.im}{x.re}\right)}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right) \cdot {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\\
\end{array}
\end{array}
if y.im < -1.15e7 or 3.10000000000000014e62 < y.im Initial program 37.5%
Taylor expanded in y.im around 0 54.0%
Taylor expanded in y.re around 0 58.1%
*-commutative58.1%
distribute-rgt-neg-in58.1%
mul-1-neg58.1%
exp-prod59.8%
mul-1-neg59.8%
Simplified59.8%
if -1.15e7 < y.im < 3.10000000000000014e62Initial program 51.8%
exp-diff51.0%
exp-to-pow51.0%
hypot-define51.0%
*-commutative51.0%
exp-prod49.9%
fma-define49.9%
hypot-define91.9%
*-commutative91.9%
Simplified91.9%
Taylor expanded in y.im around 0 92.4%
Final simplification77.3%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (or (<= y.im -3000000000000.0) (not (<= y.im 3.1e+62)))
(* y.re (* (atan2 x.im x.re) (pow (exp y.im) (- (atan2 x.im x.re)))))
(*
(sin
(* y.re (+ (atan2 x.im x.re) (* y.im (/ (log (hypot x.im x.re)) y.re)))))
(pow (hypot x.re x.im) y.re))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_im <= -3000000000000.0) || !(y_46_im <= 3.1e+62)) {
tmp = y_46_re * (atan2(x_46_im, x_46_re) * pow(exp(y_46_im), -atan2(x_46_im, x_46_re)));
} else {
tmp = sin((y_46_re * (atan2(x_46_im, x_46_re) + (y_46_im * (log(hypot(x_46_im, x_46_re)) / y_46_re))))) * pow(hypot(x_46_re, 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 tmp;
if ((y_46_im <= -3000000000000.0) || !(y_46_im <= 3.1e+62)) {
tmp = y_46_re * (Math.atan2(x_46_im, x_46_re) * Math.pow(Math.exp(y_46_im), -Math.atan2(x_46_im, x_46_re)));
} else {
tmp = Math.sin((y_46_re * (Math.atan2(x_46_im, x_46_re) + (y_46_im * (Math.log(Math.hypot(x_46_im, x_46_re)) / y_46_re))))) * Math.pow(Math.hypot(x_46_re, x_46_im), y_46_re);
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if (y_46_im <= -3000000000000.0) or not (y_46_im <= 3.1e+62): tmp = y_46_re * (math.atan2(x_46_im, x_46_re) * math.pow(math.exp(y_46_im), -math.atan2(x_46_im, x_46_re))) else: tmp = math.sin((y_46_re * (math.atan2(x_46_im, x_46_re) + (y_46_im * (math.log(math.hypot(x_46_im, x_46_re)) / y_46_re))))) * math.pow(math.hypot(x_46_re, x_46_im), y_46_re) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if ((y_46_im <= -3000000000000.0) || !(y_46_im <= 3.1e+62)) tmp = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * (exp(y_46_im) ^ Float64(-atan(x_46_im, x_46_re))))); else tmp = Float64(sin(Float64(y_46_re * Float64(atan(x_46_im, x_46_re) + Float64(y_46_im * Float64(log(hypot(x_46_im, x_46_re)) / y_46_re))))) * (hypot(x_46_re, 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) tmp = 0.0; if ((y_46_im <= -3000000000000.0) || ~((y_46_im <= 3.1e+62))) tmp = y_46_re * (atan2(x_46_im, x_46_re) * (exp(y_46_im) ^ -atan2(x_46_im, x_46_re))); else tmp = sin((y_46_re * (atan2(x_46_im, x_46_re) + (y_46_im * (log(hypot(x_46_im, x_46_re)) / y_46_re))))) * (hypot(x_46_re, x_46_im) ^ y_46_re); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[Or[LessEqual[y$46$im, -3000000000000.0], N[Not[LessEqual[y$46$im, 3.1e+62]], $MachinePrecision]], N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Power[N[Exp[y$46$im], $MachinePrecision], (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sin[N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] + N[(y$46$im * N[(N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision] / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.im \leq -3000000000000 \lor \neg \left(y.im \leq 3.1 \cdot 10^{+62}\right):\\
\;\;\;\;y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot {\left(e^{y.im}\right)}^{\left(-\tan^{-1}_* \frac{x.im}{x.re}\right)}\right)\\
\mathbf{else}:\\
\;\;\;\;\sin \left(y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} + y.im \cdot \frac{\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)}{y.re}\right)\right) \cdot {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\\
\end{array}
\end{array}
if y.im < -3e12 or 3.10000000000000014e62 < y.im Initial program 37.5%
Taylor expanded in y.im around 0 54.0%
Taylor expanded in y.re around 0 58.1%
*-commutative58.1%
distribute-rgt-neg-in58.1%
mul-1-neg58.1%
exp-prod59.8%
mul-1-neg59.8%
Simplified59.8%
if -3e12 < y.im < 3.10000000000000014e62Initial program 51.8%
exp-diff51.0%
exp-to-pow51.0%
hypot-define51.0%
*-commutative51.0%
exp-prod49.9%
fma-define49.9%
hypot-define91.9%
*-commutative91.9%
Simplified91.9%
Taylor expanded in y.im around 0 92.4%
Taylor expanded in y.re around inf 51.0%
+-commutative51.7%
associate-/l*51.0%
unpow251.0%
unpow251.0%
hypot-undefine92.9%
Simplified91.5%
Final simplification76.9%
(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) (pow (exp y.im) (- (atan2 x.im x.re))))))
(t_2 (log (hypot x.im x.re))))
(if (<= y.im -88000000.0)
t_1
(if (<= y.im -4.5e-195)
(*
(pow (hypot x.re x.im) y.re)
(sin (* y.im (+ t_2 (* y.re (/ (atan2 x.im x.re) y.im))))))
(if (<= y.im 7.4e-188)
(* (sin (* y.re (atan2 x.im x.re))) t_0)
(if (<= y.im 7.5e+67) (* (* y.im t_2) 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 = pow(hypot(x_46_im, x_46_re), y_46_re);
double t_1 = y_46_re * (atan2(x_46_im, x_46_re) * pow(exp(y_46_im), -atan2(x_46_im, x_46_re)));
double t_2 = log(hypot(x_46_im, x_46_re));
double tmp;
if (y_46_im <= -88000000.0) {
tmp = t_1;
} else if (y_46_im <= -4.5e-195) {
tmp = pow(hypot(x_46_re, x_46_im), y_46_re) * sin((y_46_im * (t_2 + (y_46_re * (atan2(x_46_im, x_46_re) / y_46_im)))));
} else if (y_46_im <= 7.4e-188) {
tmp = sin((y_46_re * atan2(x_46_im, x_46_re))) * t_0;
} else if (y_46_im <= 7.5e+67) {
tmp = (y_46_im * t_2) * t_0;
} else {
tmp = t_1;
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = 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) * Math.pow(Math.exp(y_46_im), -Math.atan2(x_46_im, x_46_re)));
double t_2 = Math.log(Math.hypot(x_46_im, x_46_re));
double tmp;
if (y_46_im <= -88000000.0) {
tmp = t_1;
} else if (y_46_im <= -4.5e-195) {
tmp = Math.pow(Math.hypot(x_46_re, x_46_im), y_46_re) * Math.sin((y_46_im * (t_2 + (y_46_re * (Math.atan2(x_46_im, x_46_re) / y_46_im)))));
} else if (y_46_im <= 7.4e-188) {
tmp = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re))) * t_0;
} else if (y_46_im <= 7.5e+67) {
tmp = (y_46_im * t_2) * t_0;
} else {
tmp = t_1;
}
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) * math.pow(math.exp(y_46_im), -math.atan2(x_46_im, x_46_re))) t_2 = math.log(math.hypot(x_46_im, x_46_re)) tmp = 0 if y_46_im <= -88000000.0: tmp = t_1 elif y_46_im <= -4.5e-195: tmp = math.pow(math.hypot(x_46_re, x_46_im), y_46_re) * math.sin((y_46_im * (t_2 + (y_46_re * (math.atan2(x_46_im, x_46_re) / y_46_im))))) elif y_46_im <= 7.4e-188: tmp = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) * t_0 elif y_46_im <= 7.5e+67: tmp = (y_46_im * t_2) * t_0 else: tmp = t_1 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 * Float64(atan(x_46_im, x_46_re) * (exp(y_46_im) ^ Float64(-atan(x_46_im, x_46_re))))) t_2 = log(hypot(x_46_im, x_46_re)) tmp = 0.0 if (y_46_im <= -88000000.0) tmp = t_1; elseif (y_46_im <= -4.5e-195) tmp = Float64((hypot(x_46_re, x_46_im) ^ y_46_re) * sin(Float64(y_46_im * Float64(t_2 + Float64(y_46_re * Float64(atan(x_46_im, x_46_re) / y_46_im)))))); elseif (y_46_im <= 7.4e-188) tmp = Float64(sin(Float64(y_46_re * atan(x_46_im, x_46_re))) * t_0); elseif (y_46_im <= 7.5e+67) tmp = Float64(Float64(y_46_im * t_2) * t_0); else tmp = t_1; end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = hypot(x_46_im, x_46_re) ^ y_46_re; t_1 = y_46_re * (atan2(x_46_im, x_46_re) * (exp(y_46_im) ^ -atan2(x_46_im, x_46_re))); t_2 = log(hypot(x_46_im, x_46_re)); tmp = 0.0; if (y_46_im <= -88000000.0) tmp = t_1; elseif (y_46_im <= -4.5e-195) tmp = (hypot(x_46_re, x_46_im) ^ y_46_re) * sin((y_46_im * (t_2 + (y_46_re * (atan2(x_46_im, x_46_re) / y_46_im))))); elseif (y_46_im <= 7.4e-188) tmp = sin((y_46_re * atan2(x_46_im, x_46_re))) * t_0; elseif (y_46_im <= 7.5e+67) tmp = (y_46_im * t_2) * t_0; else tmp = t_1; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[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[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Power[N[Exp[y$46$im], $MachinePrecision], (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$im, -88000000.0], t$95$1, If[LessEqual[y$46$im, -4.5e-195], N[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * N[Sin[N[(y$46$im * N[(t$95$2 + N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] / y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 7.4e-188], N[(N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$0), $MachinePrecision], If[LessEqual[y$46$im, 7.5e+67], N[(N[(y$46$im * t$95$2), $MachinePrecision] * t$95$0), $MachinePrecision], t$95$1]]]]]]]
\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 \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot {\left(e^{y.im}\right)}^{\left(-\tan^{-1}_* \frac{x.im}{x.re}\right)}\right)\\
t_2 := \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
\mathbf{if}\;y.im \leq -88000000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y.im \leq -4.5 \cdot 10^{-195}:\\
\;\;\;\;{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re} \cdot \sin \left(y.im \cdot \left(t\_2 + y.re \cdot \frac{\tan^{-1}_* \frac{x.im}{x.re}}{y.im}\right)\right)\\
\mathbf{elif}\;y.im \leq 7.4 \cdot 10^{-188}:\\
\;\;\;\;\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot t\_0\\
\mathbf{elif}\;y.im \leq 7.5 \cdot 10^{+67}:\\
\;\;\;\;\left(y.im \cdot t\_2\right) \cdot t\_0\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y.im < -8.8e7 or 7.5000000000000005e67 < y.im Initial program 38.5%
Taylor expanded in y.im around 0 55.3%
Taylor expanded in y.re around 0 59.6%
*-commutative59.6%
distribute-rgt-neg-in59.6%
mul-1-neg59.6%
exp-prod61.3%
mul-1-neg61.3%
Simplified61.3%
if -8.8e7 < y.im < -4.5e-195Initial program 53.9%
exp-diff53.9%
exp-to-pow53.9%
hypot-define53.9%
*-commutative53.9%
exp-prod52.4%
fma-define52.4%
hypot-define97.4%
*-commutative97.4%
Simplified97.4%
Taylor expanded in y.im around inf 52.4%
unpow252.4%
unpow252.4%
hypot-undefine94.8%
associate-/l*94.8%
Simplified94.8%
Taylor expanded in y.im around 0 96.4%
if -4.5e-195 < y.im < 7.39999999999999943e-188Initial program 55.9%
Taylor expanded in y.im around 0 65.1%
Taylor expanded in y.im around 0 65.1%
unpow265.1%
unpow265.1%
hypot-undefine76.4%
Simplified76.4%
if 7.39999999999999943e-188 < y.im < 7.5000000000000005e67Initial program 43.0%
exp-diff41.1%
exp-to-pow41.1%
hypot-define41.1%
*-commutative41.1%
exp-prod39.1%
fma-define39.1%
hypot-define84.2%
*-commutative84.2%
Simplified84.2%
Taylor expanded in y.im around inf 37.5%
unpow239.5%
unpow239.5%
hypot-undefine78.6%
Simplified76.7%
Taylor expanded in y.im around 0 78.7%
Taylor expanded in y.im around 0 55.4%
associate-*r*55.4%
unpow255.4%
unpow255.4%
hypot-undefine71.6%
unpow271.6%
unpow271.6%
hypot-undefine79.6%
Simplified79.6%
Final simplification73.4%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (pow (hypot x.im x.re) y.re))
(t_1 (* y.im (log (hypot x.im x.re))))
(t_2
(*
y.re
(* (atan2 x.im x.re) (pow (exp y.im) (- (atan2 x.im x.re)))))))
(if (<= y.im -4e+38)
t_2
(if (<= y.im -2.6e-244)
(* (sin t_1) (pow (hypot x.re x.im) y.re))
(if (<= y.im 1.8e-187)
(* (sin (* y.re (atan2 x.im x.re))) t_0)
(if (<= y.im 1.9e+67) (* t_1 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 = y_46_im * log(hypot(x_46_im, x_46_re));
double t_2 = y_46_re * (atan2(x_46_im, x_46_re) * pow(exp(y_46_im), -atan2(x_46_im, x_46_re)));
double tmp;
if (y_46_im <= -4e+38) {
tmp = t_2;
} else if (y_46_im <= -2.6e-244) {
tmp = sin(t_1) * pow(hypot(x_46_re, x_46_im), y_46_re);
} else if (y_46_im <= 1.8e-187) {
tmp = sin((y_46_re * atan2(x_46_im, x_46_re))) * t_0;
} else if (y_46_im <= 1.9e+67) {
tmp = t_1 * 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 = y_46_im * Math.log(Math.hypot(x_46_im, x_46_re));
double t_2 = y_46_re * (Math.atan2(x_46_im, x_46_re) * Math.pow(Math.exp(y_46_im), -Math.atan2(x_46_im, x_46_re)));
double tmp;
if (y_46_im <= -4e+38) {
tmp = t_2;
} else if (y_46_im <= -2.6e-244) {
tmp = Math.sin(t_1) * Math.pow(Math.hypot(x_46_re, x_46_im), y_46_re);
} else if (y_46_im <= 1.8e-187) {
tmp = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re))) * t_0;
} else if (y_46_im <= 1.9e+67) {
tmp = t_1 * 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 = y_46_im * math.log(math.hypot(x_46_im, x_46_re)) t_2 = y_46_re * (math.atan2(x_46_im, x_46_re) * math.pow(math.exp(y_46_im), -math.atan2(x_46_im, x_46_re))) tmp = 0 if y_46_im <= -4e+38: tmp = t_2 elif y_46_im <= -2.6e-244: tmp = math.sin(t_1) * math.pow(math.hypot(x_46_re, x_46_im), y_46_re) elif y_46_im <= 1.8e-187: tmp = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) * t_0 elif y_46_im <= 1.9e+67: tmp = t_1 * 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(y_46_im * log(hypot(x_46_im, x_46_re))) t_2 = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * (exp(y_46_im) ^ Float64(-atan(x_46_im, x_46_re))))) tmp = 0.0 if (y_46_im <= -4e+38) tmp = t_2; elseif (y_46_im <= -2.6e-244) tmp = Float64(sin(t_1) * (hypot(x_46_re, x_46_im) ^ y_46_re)); elseif (y_46_im <= 1.8e-187) tmp = Float64(sin(Float64(y_46_re * atan(x_46_im, x_46_re))) * t_0); elseif (y_46_im <= 1.9e+67) tmp = Float64(t_1 * t_0); else tmp = t_2; end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = hypot(x_46_im, x_46_re) ^ y_46_re; t_1 = y_46_im * log(hypot(x_46_im, x_46_re)); t_2 = y_46_re * (atan2(x_46_im, x_46_re) * (exp(y_46_im) ^ -atan2(x_46_im, x_46_re))); tmp = 0.0; if (y_46_im <= -4e+38) tmp = t_2; elseif (y_46_im <= -2.6e-244) tmp = sin(t_1) * (hypot(x_46_re, x_46_im) ^ y_46_re); elseif (y_46_im <= 1.8e-187) tmp = sin((y_46_re * atan2(x_46_im, x_46_re))) * t_0; elseif (y_46_im <= 1.9e+67) tmp = t_1 * t_0; else tmp = t_2; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, Block[{t$95$1 = N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Power[N[Exp[y$46$im], $MachinePrecision], (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -4e+38], t$95$2, If[LessEqual[y$46$im, -2.6e-244], N[(N[Sin[t$95$1], $MachinePrecision] * N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 1.8e-187], N[(N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$0), $MachinePrecision], If[LessEqual[y$46$im, 1.9e+67], N[(t$95$1 * 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 := y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
t_2 := y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot {\left(e^{y.im}\right)}^{\left(-\tan^{-1}_* \frac{x.im}{x.re}\right)}\right)\\
\mathbf{if}\;y.im \leq -4 \cdot 10^{+38}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y.im \leq -2.6 \cdot 10^{-244}:\\
\;\;\;\;\sin t\_1 \cdot {\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}\\
\mathbf{elif}\;y.im \leq 1.8 \cdot 10^{-187}:\\
\;\;\;\;\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot t\_0\\
\mathbf{elif}\;y.im \leq 1.9 \cdot 10^{+67}:\\
\;\;\;\;t\_1 \cdot t\_0\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y.im < -3.99999999999999991e38 or 1.9000000000000001e67 < y.im Initial program 40.6%
Taylor expanded in y.im around 0 57.4%
Taylor expanded in y.re around 0 61.0%
*-commutative61.0%
distribute-rgt-neg-in61.0%
mul-1-neg61.0%
exp-prod62.8%
mul-1-neg62.8%
Simplified62.8%
if -3.99999999999999991e38 < y.im < -2.6000000000000001e-244Initial program 44.5%
exp-diff44.5%
exp-to-pow44.5%
hypot-define44.5%
*-commutative44.5%
exp-prod43.3%
fma-define43.3%
hypot-define86.7%
*-commutative86.7%
Simplified86.7%
Taylor expanded in y.im around inf 30.7%
unpow233.8%
unpow233.8%
hypot-undefine77.2%
Simplified74.2%
Taylor expanded in y.im around 0 73.5%
if -2.6000000000000001e-244 < y.im < 1.79999999999999997e-187Initial program 60.3%
Taylor expanded in y.im around 0 68.6%
Taylor expanded in y.im around 0 68.6%
unpow268.6%
unpow268.6%
hypot-undefine81.8%
Simplified81.8%
if 1.79999999999999997e-187 < y.im < 1.9000000000000001e67Initial program 43.0%
exp-diff41.1%
exp-to-pow41.1%
hypot-define41.1%
*-commutative41.1%
exp-prod39.1%
fma-define39.1%
hypot-define84.2%
*-commutative84.2%
Simplified84.2%
Taylor expanded in y.im around inf 37.5%
unpow239.5%
unpow239.5%
hypot-undefine78.6%
Simplified76.7%
Taylor expanded in y.im around 0 78.7%
Taylor expanded in y.im around 0 55.4%
associate-*r*55.4%
unpow255.4%
unpow255.4%
hypot-undefine71.6%
unpow271.6%
unpow271.6%
hypot-undefine79.6%
Simplified79.6%
Final simplification71.6%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0
(* y.re (* (atan2 x.im x.re) (pow (exp y.im) (- (atan2 x.im x.re))))))
(t_1 (pow (hypot x.im x.re) y.re))
(t_2 (* (* y.im (log (hypot x.im x.re))) t_1)))
(if (<= y.im -3.3e+38)
t_0
(if (<= y.im -4.6e-244)
t_2
(if (<= y.im 5e-188)
(* (sin (* y.re (atan2 x.im x.re))) t_1)
(if (<= y.im 1.85e+67) 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 = y_46_re * (atan2(x_46_im, x_46_re) * pow(exp(y_46_im), -atan2(x_46_im, x_46_re)));
double t_1 = pow(hypot(x_46_im, x_46_re), y_46_re);
double t_2 = (y_46_im * log(hypot(x_46_im, x_46_re))) * t_1;
double tmp;
if (y_46_im <= -3.3e+38) {
tmp = t_0;
} else if (y_46_im <= -4.6e-244) {
tmp = t_2;
} else if (y_46_im <= 5e-188) {
tmp = sin((y_46_re * atan2(x_46_im, x_46_re))) * t_1;
} else if (y_46_im <= 1.85e+67) {
tmp = t_2;
} else {
tmp = t_0;
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * (Math.atan2(x_46_im, x_46_re) * Math.pow(Math.exp(y_46_im), -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 = (y_46_im * Math.log(Math.hypot(x_46_im, x_46_re))) * t_1;
double tmp;
if (y_46_im <= -3.3e+38) {
tmp = t_0;
} else if (y_46_im <= -4.6e-244) {
tmp = t_2;
} else if (y_46_im <= 5e-188) {
tmp = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re))) * t_1;
} else if (y_46_im <= 1.85e+67) {
tmp = t_2;
} else {
tmp = t_0;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = y_46_re * (math.atan2(x_46_im, x_46_re) * math.pow(math.exp(y_46_im), -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 = (y_46_im * math.log(math.hypot(x_46_im, x_46_re))) * t_1 tmp = 0 if y_46_im <= -3.3e+38: tmp = t_0 elif y_46_im <= -4.6e-244: tmp = t_2 elif y_46_im <= 5e-188: tmp = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) * t_1 elif y_46_im <= 1.85e+67: tmp = t_2 else: tmp = t_0 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * (exp(y_46_im) ^ Float64(-atan(x_46_im, x_46_re))))) t_1 = hypot(x_46_im, x_46_re) ^ y_46_re t_2 = Float64(Float64(y_46_im * log(hypot(x_46_im, x_46_re))) * t_1) tmp = 0.0 if (y_46_im <= -3.3e+38) tmp = t_0; elseif (y_46_im <= -4.6e-244) tmp = t_2; elseif (y_46_im <= 5e-188) tmp = Float64(sin(Float64(y_46_re * atan(x_46_im, x_46_re))) * t_1); elseif (y_46_im <= 1.85e+67) tmp = t_2; else tmp = t_0; end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = y_46_re * (atan2(x_46_im, x_46_re) * (exp(y_46_im) ^ -atan2(x_46_im, x_46_re))); t_1 = hypot(x_46_im, x_46_re) ^ y_46_re; t_2 = (y_46_im * log(hypot(x_46_im, x_46_re))) * t_1; tmp = 0.0; if (y_46_im <= -3.3e+38) tmp = t_0; elseif (y_46_im <= -4.6e-244) tmp = t_2; elseif (y_46_im <= 5e-188) tmp = sin((y_46_re * atan2(x_46_im, x_46_re))) * t_1; elseif (y_46_im <= 1.85e+67) tmp = t_2; else tmp = t_0; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Power[N[Exp[y$46$im], $MachinePrecision], (-N[ArcTan[x$46$im / x$46$re], $MachinePrecision])], $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[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision]}, If[LessEqual[y$46$im, -3.3e+38], t$95$0, If[LessEqual[y$46$im, -4.6e-244], t$95$2, If[LessEqual[y$46$im, 5e-188], 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$im, 1.85e+67], t$95$2, t$95$0]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot {\left(e^{y.im}\right)}^{\left(-\tan^{-1}_* \frac{x.im}{x.re}\right)}\right)\\
t_1 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
t_2 := \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \cdot t\_1\\
\mathbf{if}\;y.im \leq -3.3 \cdot 10^{+38}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y.im \leq -4.6 \cdot 10^{-244}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y.im \leq 5 \cdot 10^{-188}:\\
\;\;\;\;\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot t\_1\\
\mathbf{elif}\;y.im \leq 1.85 \cdot 10^{+67}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if y.im < -3.2999999999999999e38 or 1.8499999999999999e67 < y.im Initial program 40.6%
Taylor expanded in y.im around 0 57.4%
Taylor expanded in y.re around 0 61.0%
*-commutative61.0%
distribute-rgt-neg-in61.0%
mul-1-neg61.0%
exp-prod62.8%
mul-1-neg62.8%
Simplified62.8%
if -3.2999999999999999e38 < y.im < -4.6e-244 or 5.0000000000000001e-188 < y.im < 1.8499999999999999e67Initial program 43.7%
exp-diff42.8%
exp-to-pow42.8%
hypot-define42.8%
*-commutative42.8%
exp-prod41.2%
fma-define41.2%
hypot-define85.5%
*-commutative85.5%
Simplified85.5%
Taylor expanded in y.im around inf 34.1%
unpow236.6%
unpow236.6%
hypot-undefine77.9%
Simplified75.4%
Taylor expanded in y.im around 0 76.1%
Taylor expanded in y.im around 0 48.7%
associate-*r*48.7%
unpow248.7%
unpow248.7%
hypot-undefine64.5%
unpow264.5%
unpow264.5%
hypot-undefine75.9%
Simplified75.9%
if -4.6e-244 < y.im < 5.0000000000000001e-188Initial program 60.3%
Taylor expanded in y.im around 0 68.6%
Taylor expanded in y.im around 0 68.6%
unpow268.6%
unpow268.6%
hypot-undefine81.8%
Simplified81.8%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0
(* y.re (* (atan2 x.im x.re) (exp (* (atan2 x.im x.re) (- y.im))))))
(t_1 (pow (hypot x.im x.re) y.re))
(t_2 (* (* y.im (log (hypot x.im x.re))) t_1)))
(if (<= y.im -5e+39)
t_0
(if (<= y.im -8e-244)
t_2
(if (<= y.im 8.5e-188)
(* (sin (* y.re (atan2 x.im x.re))) t_1)
(if (<= y.im 3.2e+68) 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 = y_46_re * (atan2(x_46_im, x_46_re) * exp((atan2(x_46_im, x_46_re) * -y_46_im)));
double t_1 = pow(hypot(x_46_im, x_46_re), y_46_re);
double t_2 = (y_46_im * log(hypot(x_46_im, x_46_re))) * t_1;
double tmp;
if (y_46_im <= -5e+39) {
tmp = t_0;
} else if (y_46_im <= -8e-244) {
tmp = t_2;
} else if (y_46_im <= 8.5e-188) {
tmp = sin((y_46_re * atan2(x_46_im, x_46_re))) * t_1;
} else if (y_46_im <= 3.2e+68) {
tmp = t_2;
} else {
tmp = t_0;
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * (Math.atan2(x_46_im, x_46_re) * Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im)));
double t_1 = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
double t_2 = (y_46_im * Math.log(Math.hypot(x_46_im, x_46_re))) * t_1;
double tmp;
if (y_46_im <= -5e+39) {
tmp = t_0;
} else if (y_46_im <= -8e-244) {
tmp = t_2;
} else if (y_46_im <= 8.5e-188) {
tmp = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re))) * t_1;
} else if (y_46_im <= 3.2e+68) {
tmp = t_2;
} else {
tmp = t_0;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = y_46_re * (math.atan2(x_46_im, x_46_re) * math.exp((math.atan2(x_46_im, x_46_re) * -y_46_im))) t_1 = math.pow(math.hypot(x_46_im, x_46_re), y_46_re) t_2 = (y_46_im * math.log(math.hypot(x_46_im, x_46_re))) * t_1 tmp = 0 if y_46_im <= -5e+39: tmp = t_0 elif y_46_im <= -8e-244: tmp = t_2 elif y_46_im <= 8.5e-188: tmp = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) * t_1 elif y_46_im <= 3.2e+68: tmp = t_2 else: tmp = t_0 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))))) t_1 = hypot(x_46_im, x_46_re) ^ y_46_re t_2 = Float64(Float64(y_46_im * log(hypot(x_46_im, x_46_re))) * t_1) tmp = 0.0 if (y_46_im <= -5e+39) tmp = t_0; elseif (y_46_im <= -8e-244) tmp = t_2; elseif (y_46_im <= 8.5e-188) tmp = Float64(sin(Float64(y_46_re * atan(x_46_im, x_46_re))) * t_1); elseif (y_46_im <= 3.2e+68) tmp = t_2; else tmp = t_0; end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = y_46_re * (atan2(x_46_im, x_46_re) * exp((atan2(x_46_im, x_46_re) * -y_46_im))); t_1 = hypot(x_46_im, x_46_re) ^ y_46_re; t_2 = (y_46_im * log(hypot(x_46_im, x_46_re))) * t_1; tmp = 0.0; if (y_46_im <= -5e+39) tmp = t_0; elseif (y_46_im <= -8e-244) tmp = t_2; elseif (y_46_im <= 8.5e-188) tmp = sin((y_46_re * atan2(x_46_im, x_46_re))) * t_1; elseif (y_46_im <= 3.2e+68) tmp = t_2; else tmp = t_0; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $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[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision]}, If[LessEqual[y$46$im, -5e+39], t$95$0, If[LessEqual[y$46$im, -8e-244], t$95$2, If[LessEqual[y$46$im, 8.5e-188], 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$im, 3.2e+68], t$95$2, t$95$0]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\right)\\
t_1 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
t_2 := \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \cdot t\_1\\
\mathbf{if}\;y.im \leq -5 \cdot 10^{+39}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y.im \leq -8 \cdot 10^{-244}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y.im \leq 8.5 \cdot 10^{-188}:\\
\;\;\;\;\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot t\_1\\
\mathbf{elif}\;y.im \leq 3.2 \cdot 10^{+68}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if y.im < -5.00000000000000015e39 or 3.19999999999999994e68 < y.im Initial program 40.6%
Taylor expanded in y.im around 0 57.4%
Taylor expanded in y.re around 0 61.0%
*-commutative61.0%
distribute-rgt-neg-in61.0%
Simplified61.0%
if -5.00000000000000015e39 < y.im < -7.9999999999999994e-244 or 8.5000000000000004e-188 < y.im < 3.19999999999999994e68Initial program 43.7%
exp-diff42.8%
exp-to-pow42.8%
hypot-define42.8%
*-commutative42.8%
exp-prod41.2%
fma-define41.2%
hypot-define85.5%
*-commutative85.5%
Simplified85.5%
Taylor expanded in y.im around inf 34.1%
unpow236.6%
unpow236.6%
hypot-undefine77.9%
Simplified75.4%
Taylor expanded in y.im around 0 76.1%
Taylor expanded in y.im around 0 48.7%
associate-*r*48.7%
unpow248.7%
unpow248.7%
hypot-undefine64.5%
unpow264.5%
unpow264.5%
hypot-undefine75.9%
Simplified75.9%
if -7.9999999999999994e-244 < y.im < 8.5000000000000004e-188Initial program 60.3%
Taylor expanded in y.im around 0 68.6%
Taylor expanded in y.im around 0 68.6%
unpow268.6%
unpow268.6%
hypot-undefine81.8%
Simplified81.8%
Final simplification70.6%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (or (<= y.re -0.28) (not (<= y.re 5.4e+82))) (* (sin (* y.re (atan2 x.im x.re))) (pow (hypot x.im x.re) y.re)) (* y.re (* (atan2 x.im x.re) (exp (* (atan2 x.im x.re) (- y.im)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_re <= -0.28) || !(y_46_re <= 5.4e+82)) {
tmp = sin((y_46_re * atan2(x_46_im, x_46_re))) * pow(hypot(x_46_im, x_46_re), y_46_re);
} else {
tmp = y_46_re * (atan2(x_46_im, x_46_re) * exp((atan2(x_46_im, x_46_re) * -y_46_im)));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_re <= -0.28) || !(y_46_re <= 5.4e+82)) {
tmp = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re))) * Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
} else {
tmp = y_46_re * (Math.atan2(x_46_im, x_46_re) * Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im)));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if (y_46_re <= -0.28) or not (y_46_re <= 5.4e+82): tmp = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) * math.pow(math.hypot(x_46_im, x_46_re), y_46_re) else: tmp = y_46_re * (math.atan2(x_46_im, x_46_re) * math.exp((math.atan2(x_46_im, x_46_re) * -y_46_im))) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if ((y_46_re <= -0.28) || !(y_46_re <= 5.4e+82)) tmp = Float64(sin(Float64(y_46_re * atan(x_46_im, x_46_re))) * (hypot(x_46_im, x_46_re) ^ y_46_re)); else tmp = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if ((y_46_re <= -0.28) || ~((y_46_re <= 5.4e+82))) tmp = sin((y_46_re * atan2(x_46_im, x_46_re))) * (hypot(x_46_im, x_46_re) ^ y_46_re); else tmp = y_46_re * (atan2(x_46_im, x_46_re) * exp((atan2(x_46_im, x_46_re) * -y_46_im))); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[Or[LessEqual[y$46$re, -0.28], N[Not[LessEqual[y$46$re, 5.4e+82]], $MachinePrecision]], N[(N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq -0.28 \lor \neg \left(y.re \leq 5.4 \cdot 10^{+82}\right):\\
\;\;\;\;\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\right)\\
\end{array}
\end{array}
if y.re < -0.28000000000000003 or 5.3999999999999999e82 < y.re Initial program 46.2%
Taylor expanded in y.im around 0 79.0%
Taylor expanded in y.im around 0 74.2%
unpow274.2%
unpow274.2%
hypot-undefine74.2%
Simplified74.2%
if -0.28000000000000003 < y.re < 5.3999999999999999e82Initial program 44.5%
Taylor expanded in y.im around 0 36.2%
Taylor expanded in y.re around 0 53.3%
*-commutative53.3%
distribute-rgt-neg-in53.3%
Simplified53.3%
Final simplification61.8%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (or (<= y.re -2.55) (not (<= y.re 3.8e+80))) (* (sin (* y.re (atan2 x.im x.re))) (pow (- x.re) y.re)) (* y.re (* (atan2 x.im x.re) (exp (* (atan2 x.im x.re) (- y.im)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_re <= -2.55) || !(y_46_re <= 3.8e+80)) {
tmp = sin((y_46_re * atan2(x_46_im, x_46_re))) * pow(-x_46_re, y_46_re);
} else {
tmp = y_46_re * (atan2(x_46_im, x_46_re) * exp((atan2(x_46_im, x_46_re) * -y_46_im)));
}
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) :: tmp
if ((y_46re <= (-2.55d0)) .or. (.not. (y_46re <= 3.8d+80))) then
tmp = sin((y_46re * atan2(x_46im, x_46re))) * (-x_46re ** y_46re)
else
tmp = y_46re * (atan2(x_46im, x_46re) * exp((atan2(x_46im, x_46re) * -y_46im)))
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 tmp;
if ((y_46_re <= -2.55) || !(y_46_re <= 3.8e+80)) {
tmp = Math.sin((y_46_re * Math.atan2(x_46_im, x_46_re))) * Math.pow(-x_46_re, y_46_re);
} else {
tmp = y_46_re * (Math.atan2(x_46_im, x_46_re) * Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im)));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if (y_46_re <= -2.55) or not (y_46_re <= 3.8e+80): tmp = math.sin((y_46_re * math.atan2(x_46_im, x_46_re))) * math.pow(-x_46_re, y_46_re) else: tmp = y_46_re * (math.atan2(x_46_im, x_46_re) * math.exp((math.atan2(x_46_im, x_46_re) * -y_46_im))) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if ((y_46_re <= -2.55) || !(y_46_re <= 3.8e+80)) tmp = Float64(sin(Float64(y_46_re * atan(x_46_im, x_46_re))) * (Float64(-x_46_re) ^ y_46_re)); else tmp = Float64(y_46_re * Float64(atan(x_46_im, x_46_re) * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if ((y_46_re <= -2.55) || ~((y_46_re <= 3.8e+80))) tmp = sin((y_46_re * atan2(x_46_im, x_46_re))) * (-x_46_re ^ y_46_re); else tmp = y_46_re * (atan2(x_46_im, x_46_re) * exp((atan2(x_46_im, x_46_re) * -y_46_im))); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[Or[LessEqual[y$46$re, -2.55], N[Not[LessEqual[y$46$re, 3.8e+80]], $MachinePrecision]], N[(N[Sin[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Power[(-x$46$re), y$46$re], $MachinePrecision]), $MachinePrecision], N[(y$46$re * N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq -2.55 \lor \neg \left(y.re \leq 3.8 \cdot 10^{+80}\right):\\
\;\;\;\;\sin \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {\left(-x.re\right)}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\right)\\
\end{array}
\end{array}
if y.re < -2.5499999999999998 or 3.79999999999999997e80 < y.re Initial program 46.7%
Taylor expanded in y.im around 0 79.2%
Taylor expanded in x.re around -inf 40.1%
mul-1-neg40.1%
Simplified40.1%
Taylor expanded in y.im around 0 63.3%
if -2.5499999999999998 < y.re < 3.79999999999999997e80Initial program 44.2%
Taylor expanded in y.im around 0 35.8%
Taylor expanded in y.re around 0 52.9%
*-commutative52.9%
distribute-rgt-neg-in52.9%
Simplified52.9%
Final simplification57.2%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re))))
(if (or (<= y.re -1.55e-128) (not (<= y.re 1.85e+29)))
(* (sin t_0) (pow (- x.re) y.re))
(log (+ 1.0 (expm1 t_0))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if ((y_46_re <= -1.55e-128) || !(y_46_re <= 1.85e+29)) {
tmp = sin(t_0) * pow(-x_46_re, y_46_re);
} else {
tmp = log((1.0 + expm1(t_0)));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
double tmp;
if ((y_46_re <= -1.55e-128) || !(y_46_re <= 1.85e+29)) {
tmp = Math.sin(t_0) * Math.pow(-x_46_re, y_46_re);
} else {
tmp = Math.log((1.0 + Math.expm1(t_0)));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = y_46_re * math.atan2(x_46_im, x_46_re) tmp = 0 if (y_46_re <= -1.55e-128) or not (y_46_re <= 1.85e+29): tmp = math.sin(t_0) * math.pow(-x_46_re, y_46_re) else: tmp = math.log((1.0 + math.expm1(t_0))) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) tmp = 0.0 if ((y_46_re <= -1.55e-128) || !(y_46_re <= 1.85e+29)) tmp = Float64(sin(t_0) * (Float64(-x_46_re) ^ y_46_re)); else tmp = log(Float64(1.0 + expm1(t_0))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[y$46$re, -1.55e-128], N[Not[LessEqual[y$46$re, 1.85e+29]], $MachinePrecision]], N[(N[Sin[t$95$0], $MachinePrecision] * N[Power[(-x$46$re), y$46$re], $MachinePrecision]), $MachinePrecision], N[Log[N[(1.0 + N[(Exp[t$95$0] - 1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.re \leq -1.55 \cdot 10^{-128} \lor \neg \left(y.re \leq 1.85 \cdot 10^{+29}\right):\\
\;\;\;\;\sin t\_0 \cdot {\left(-x.re\right)}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;\log \left(1 + \mathsf{expm1}\left(t\_0\right)\right)\\
\end{array}
\end{array}
if y.re < -1.55000000000000001e-128 or 1.84999999999999987e29 < y.re Initial program 48.1%
Taylor expanded in y.im around 0 70.9%
Taylor expanded in x.re around -inf 36.7%
mul-1-neg36.7%
Simplified36.7%
Taylor expanded in y.im around 0 53.3%
if -1.55000000000000001e-128 < y.re < 1.84999999999999987e29Initial program 42.0%
Taylor expanded in y.im around 0 34.2%
Taylor expanded in y.re around 0 53.1%
*-commutative53.1%
distribute-rgt-neg-in53.1%
Simplified53.1%
Taylor expanded in y.im around 0 18.7%
*-commutative18.7%
log1p-expm1-u19.5%
log1p-undefine34.0%
*-commutative34.0%
Applied egg-rr34.0%
Final simplification44.2%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (expm1 (* y.re (atan2 x.im x.re)))))
(if (or (<= y.im -1.7e-55) (not (<= y.im 2e-82)))
(log (+ 1.0 t_0))
(log1p t_0))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = expm1((y_46_re * atan2(x_46_im, x_46_re)));
double tmp;
if ((y_46_im <= -1.7e-55) || !(y_46_im <= 2e-82)) {
tmp = log((1.0 + t_0));
} else {
tmp = log1p(t_0);
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.expm1((y_46_re * Math.atan2(x_46_im, x_46_re)));
double tmp;
if ((y_46_im <= -1.7e-55) || !(y_46_im <= 2e-82)) {
tmp = Math.log((1.0 + t_0));
} else {
tmp = Math.log1p(t_0);
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.expm1((y_46_re * math.atan2(x_46_im, x_46_re))) tmp = 0 if (y_46_im <= -1.7e-55) or not (y_46_im <= 2e-82): tmp = math.log((1.0 + t_0)) else: tmp = math.log1p(t_0) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = expm1(Float64(y_46_re * atan(x_46_im, x_46_re))) tmp = 0.0 if ((y_46_im <= -1.7e-55) || !(y_46_im <= 2e-82)) tmp = log(Float64(1.0 + t_0)); else tmp = log1p(t_0); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(Exp[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]] - 1), $MachinePrecision]}, If[Or[LessEqual[y$46$im, -1.7e-55], N[Not[LessEqual[y$46$im, 2e-82]], $MachinePrecision]], N[Log[N[(1.0 + t$95$0), $MachinePrecision]], $MachinePrecision], N[Log[1 + t$95$0], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \mathsf{expm1}\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{if}\;y.im \leq -1.7 \cdot 10^{-55} \lor \neg \left(y.im \leq 2 \cdot 10^{-82}\right):\\
\;\;\;\;\log \left(1 + t\_0\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{log1p}\left(t\_0\right)\\
\end{array}
\end{array}
if y.im < -1.69999999999999986e-55 or 2e-82 < y.im Initial program 43.4%
Taylor expanded in y.im around 0 50.9%
Taylor expanded in y.re around 0 45.9%
*-commutative45.9%
distribute-rgt-neg-in45.9%
Simplified45.9%
Taylor expanded in y.im around 0 4.5%
*-commutative4.5%
log1p-expm1-u11.1%
log1p-undefine34.4%
*-commutative34.4%
Applied egg-rr34.4%
if -1.69999999999999986e-55 < y.im < 2e-82Initial program 47.9%
Taylor expanded in y.im around 0 57.6%
Taylor expanded in y.re around 0 27.5%
*-commutative27.5%
distribute-rgt-neg-in27.5%
Simplified27.5%
Taylor expanded in y.im around 0 27.5%
log1p-expm1-u37.6%
Applied egg-rr37.6%
Final simplification35.6%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re))))
(if (or (<= y.im -4.2e-79) (not (<= y.im 8.5e-48)))
(cbrt (pow t_0 3.0))
(log1p (expm1 t_0)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if ((y_46_im <= -4.2e-79) || !(y_46_im <= 8.5e-48)) {
tmp = cbrt(pow(t_0, 3.0));
} else {
tmp = log1p(expm1(t_0));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
double tmp;
if ((y_46_im <= -4.2e-79) || !(y_46_im <= 8.5e-48)) {
tmp = Math.cbrt(Math.pow(t_0, 3.0));
} else {
tmp = Math.log1p(Math.expm1(t_0));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) tmp = 0.0 if ((y_46_im <= -4.2e-79) || !(y_46_im <= 8.5e-48)) tmp = cbrt((t_0 ^ 3.0)); else tmp = log1p(expm1(t_0)); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[y$46$im, -4.2e-79], N[Not[LessEqual[y$46$im, 8.5e-48]], $MachinePrecision]], N[Power[N[Power[t$95$0, 3.0], $MachinePrecision], 1/3], $MachinePrecision], N[Log[1 + N[(Exp[t$95$0] - 1), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.im \leq -4.2 \cdot 10^{-79} \lor \neg \left(y.im \leq 8.5 \cdot 10^{-48}\right):\\
\;\;\;\;\sqrt[3]{{t\_0}^{3}}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{log1p}\left(\mathsf{expm1}\left(t\_0\right)\right)\\
\end{array}
\end{array}
if y.im < -4.1999999999999999e-79 or 8.5000000000000004e-48 < y.im Initial program 42.7%
Taylor expanded in y.im around 0 52.5%
Taylor expanded in y.re around 0 47.9%
*-commutative47.9%
distribute-rgt-neg-in47.9%
Simplified47.9%
Taylor expanded in y.im around 0 4.6%
*-commutative4.6%
add-cbrt-cube28.2%
pow328.2%
*-commutative28.2%
Applied egg-rr28.2%
if -4.1999999999999999e-79 < y.im < 8.5000000000000004e-48Initial program 48.5%
Taylor expanded in y.im around 0 55.0%
Taylor expanded in y.re around 0 25.9%
*-commutative25.9%
distribute-rgt-neg-in25.9%
Simplified25.9%
Taylor expanded in y.im around 0 25.9%
log1p-expm1-u36.2%
Applied egg-rr36.2%
Final simplification31.6%
(FPCore (x.re x.im y.re y.im) :precision binary64 (log1p (expm1 (* y.re (atan2 x.im x.re)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return log1p(expm1((y_46_re * atan2(x_46_im, x_46_re))));
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return Math.log1p(Math.expm1((y_46_re * Math.atan2(x_46_im, x_46_re))));
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): return math.log1p(math.expm1((y_46_re * math.atan2(x_46_im, x_46_re))))
function code(x_46_re, x_46_im, y_46_re, y_46_im) return log1p(expm1(Float64(y_46_re * atan(x_46_im, x_46_re)))) end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[Log[1 + N[(Exp[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]] - 1), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\mathsf{log1p}\left(\mathsf{expm1}\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)
\end{array}
Initial program 45.2%
Taylor expanded in y.im around 0 53.6%
Taylor expanded in y.re around 0 38.6%
*-commutative38.6%
distribute-rgt-neg-in38.6%
Simplified38.6%
Taylor expanded in y.im around 0 13.7%
log1p-expm1-u21.7%
Applied egg-rr21.7%
(FPCore (x.re x.im y.re y.im) :precision binary64 (* y.re (atan2 x.im x.re)))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return y_46_re * atan2(x_46_im, x_46_re);
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
code = y_46re * atan2(x_46im, x_46re)
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return y_46_re * Math.atan2(x_46_im, x_46_re);
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): return y_46_re * math.atan2(x_46_im, x_46_re)
function code(x_46_re, x_46_im, y_46_re, y_46_im) return Float64(y_46_re * atan(x_46_im, x_46_re)) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = y_46_re * atan2(x_46_im, x_46_re); end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}
\end{array}
Initial program 45.2%
Taylor expanded in y.im around 0 53.6%
Taylor expanded in y.re around 0 38.6%
*-commutative38.6%
distribute-rgt-neg-in38.6%
Simplified38.6%
Taylor expanded in y.im around 0 13.7%
herbie shell --seed 2024108
(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)))))