
(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)))
(cos (+ (* 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))) * cos(((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))) * cos(((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.cos(((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.cos(((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))) * cos(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))) * cos(((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[Cos[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 \cos \left(t\_0 \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)
\end{array}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 17 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (sqrt (+ (* x.re x.re) (* x.im x.im))))))
(*
(exp (- (* t_0 y.re) (* (atan2 x.im x.re) y.im)))
(cos (+ (* 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))) * cos(((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))) * cos(((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.cos(((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.cos(((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))) * cos(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))) * cos(((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[Cos[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 \cos \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
(fma y.im (/ (log (hypot x.im x.re)) y.re) (atan2 x.im x.re)))))
(if (<= y.re 1.35e-46)
(* t_1 (cos (fma t_0 y.im (* y.re (atan2 x.im x.re)))))
(*
t_1
(* (cbrt (pow (cos t_2) 2.0)) (cbrt (cos (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 * fma(y_46_im, (log(hypot(x_46_im, x_46_re)) / y_46_re), atan2(x_46_im, x_46_re));
double tmp;
if (y_46_re <= 1.35e-46) {
tmp = t_1 * cos(fma(t_0, y_46_im, (y_46_re * atan2(x_46_im, x_46_re))));
} else {
tmp = t_1 * (cbrt(pow(cos(t_2), 2.0)) * cbrt(cos(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 * fma(y_46_im, Float64(log(hypot(x_46_im, x_46_re)) / y_46_re), atan(x_46_im, x_46_re))) tmp = 0.0 if (y_46_re <= 1.35e-46) tmp = Float64(t_1 * cos(fma(t_0, y_46_im, Float64(y_46_re * atan(x_46_im, x_46_re))))); else tmp = Float64(t_1 * Float64(cbrt((cos(t_2) ^ 2.0)) * cbrt(cos((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[(y$46$im * N[(N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision] / y$46$re), $MachinePrecision] + N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, 1.35e-46], N[(t$95$1 * N[Cos[N[(t$95$0 * y$46$im + N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[(N[Power[N[Power[N[Cos[t$95$2], $MachinePrecision], 2.0], $MachinePrecision], 1/3], $MachinePrecision] * N[Power[N[Cos[N[Power[N[Power[t$95$2, 1/3], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision], 1/3], $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 \mathsf{fma}\left(y.im, \frac{\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)}{y.re}, \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{if}\;y.re \leq 1.35 \cdot 10^{-46}:\\
\;\;\;\;t\_1 \cdot \cos \left(\mathsf{fma}\left(t\_0, y.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot \left(\sqrt[3]{{\cos t\_2}^{2}} \cdot \sqrt[3]{\cos \left({\left(\sqrt[3]{t\_2}\right)}^{3}\right)}\right)\\
\end{array}
\end{array}
if y.re < 1.35e-46Initial program 40.3%
cancel-sign-sub-inv40.3%
fma-define40.3%
hypot-define40.3%
distribute-lft-neg-in40.3%
distribute-rgt-neg-out40.3%
fma-define40.3%
hypot-define84.2%
*-commutative84.2%
Simplified84.2%
if 1.35e-46 < y.re Initial program 46.0%
cancel-sign-sub-inv46.0%
fma-define46.0%
hypot-define46.0%
distribute-lft-neg-in46.0%
distribute-rgt-neg-out46.0%
fma-define47.3%
hypot-define68.9%
*-commutative68.9%
Simplified68.9%
Taylor expanded in y.re around inf 48.7%
+-commutative48.7%
associate-/l*48.7%
unpow248.7%
unpow248.7%
hypot-undefine73.0%
Simplified73.0%
add-cube-cbrt73.0%
cbrt-unprod73.0%
pow273.0%
+-commutative73.0%
fma-define73.0%
+-commutative73.0%
Applied egg-rr71.6%
add-cube-cbrt74.3%
pow378.4%
Applied egg-rr78.4%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(t_1 (exp (- (* y.re t_0) (* (atan2 x.im x.re) y.im))))
(t_2 (* y.re (atan2 x.im x.re))))
(if (<= (* t_1 (cos (+ t_2 (* y.im t_0)))) INFINITY)
(* t_1 (cos (* y.im (log (hypot x.im x.re)))))
(*
(exp (fma (log (hypot x.re x.im)) y.re (* (atan2 x.im x.re) (- y.im))))
(cos t_2)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
double t_1 = exp(((y_46_re * t_0) - (atan2(x_46_im, x_46_re) * y_46_im)));
double t_2 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if ((t_1 * cos((t_2 + (y_46_im * t_0)))) <= ((double) INFINITY)) {
tmp = t_1 * cos((y_46_im * log(hypot(x_46_im, x_46_re))));
} else {
tmp = exp(fma(log(hypot(x_46_re, x_46_im)), y_46_re, (atan2(x_46_im, x_46_re) * -y_46_im))) * cos(t_2);
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) t_1 = exp(Float64(Float64(y_46_re * t_0) - Float64(atan(x_46_im, x_46_re) * y_46_im))) t_2 = Float64(y_46_re * atan(x_46_im, x_46_re)) tmp = 0.0 if (Float64(t_1 * cos(Float64(t_2 + Float64(y_46_im * t_0)))) <= Inf) tmp = Float64(t_1 * cos(Float64(y_46_im * log(hypot(x_46_im, x_46_re))))); else tmp = Float64(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)))) * cos(t_2)); 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[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[Exp[N[(N[(y$46$re * t$95$0), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(t$95$1 * N[Cos[N[(t$95$2 + N[(y$46$im * t$95$0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], Infinity], N[(t$95$1 * N[Cos[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(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] * N[Cos[t$95$2], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)\\
t_1 := e^{y.re \cdot t\_0 - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\
t_2 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;t\_1 \cdot \cos \left(t\_2 + y.im \cdot t\_0\right) \leq \infty:\\
\;\;\;\;t\_1 \cdot \cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;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)} \cdot \cos t\_2\\
\end{array}
\end{array}
if (*.f64 (exp.f64 (-.f64 (*.f64 (log.f64 (sqrt.f64 (+.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)))) y.re) (*.f64 (atan2.f64 x.im x.re) y.im))) (cos.f64 (+.f64 (*.f64 (log.f64 (sqrt.f64 (+.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)))) y.im) (*.f64 (atan2.f64 x.im x.re) y.re)))) < +inf.0Initial program 82.0%
Taylor expanded in y.re around 0 83.5%
unpow283.5%
unpow283.5%
hypot-undefine83.5%
Simplified83.5%
if +inf.0 < (*.f64 (exp.f64 (-.f64 (*.f64 (log.f64 (sqrt.f64 (+.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)))) y.re) (*.f64 (atan2.f64 x.im x.re) y.im))) (cos.f64 (+.f64 (*.f64 (log.f64 (sqrt.f64 (+.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)))) y.im) (*.f64 (atan2.f64 x.im x.re) y.re)))) Initial program 0.0%
cancel-sign-sub-inv0.0%
fma-define0.0%
hypot-define0.0%
distribute-lft-neg-in0.0%
distribute-rgt-neg-out0.0%
fma-define0.0%
hypot-define76.7%
*-commutative76.7%
Simplified76.7%
Taylor expanded in y.re around inf 0.0%
+-commutative0.0%
associate-/l*0.0%
unpow20.0%
unpow20.0%
hypot-undefine68.7%
Simplified68.7%
Taylor expanded in y.im around 0 73.4%
Final simplification78.6%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.re x.im))))
(if (<= y.re 1.28e+14)
(*
(exp (fma t_0 y.re (* (atan2 x.im x.re) (- y.im))))
(cos (fma t_0 y.im (* y.re (atan2 x.im x.re)))))
(*
(exp
(-
(* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(* (atan2 x.im x.re) y.im)))
(cos (* y.im (log (hypot x.im x.re))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(hypot(x_46_re, x_46_im));
double tmp;
if (y_46_re <= 1.28e+14) {
tmp = exp(fma(t_0, y_46_re, (atan2(x_46_im, x_46_re) * -y_46_im))) * cos(fma(t_0, y_46_im, (y_46_re * atan2(x_46_im, x_46_re))));
} else {
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))) * cos((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 = log(hypot(x_46_re, x_46_im)) tmp = 0.0 if (y_46_re <= 1.28e+14) tmp = Float64(exp(fma(t_0, y_46_re, Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))) * cos(fma(t_0, y_46_im, Float64(y_46_re * atan(x_46_im, x_46_re))))); else tmp = Float64(exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * cos(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[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, 1.28e+14], 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[Cos[N[(t$95$0 * y$46$im + N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Cos[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
\mathbf{if}\;y.re \leq 1.28 \cdot 10^{+14}:\\
\;\;\;\;e^{\mathsf{fma}\left(t\_0, y.re, \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)\right)} \cdot \cos \left(\mathsf{fma}\left(t\_0, y.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;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 \cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\end{array}
\end{array}
if y.re < 1.28e14Initial program 40.9%
cancel-sign-sub-inv40.9%
fma-define40.9%
hypot-define40.9%
distribute-lft-neg-in40.9%
distribute-rgt-neg-out40.9%
fma-define40.9%
hypot-define83.6%
*-commutative83.6%
Simplified83.6%
if 1.28e14 < y.re Initial program 45.2%
Taylor expanded in y.re around 0 50.0%
unpow250.0%
unpow250.0%
hypot-undefine77.5%
Simplified77.5%
Final simplification82.2%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re)))
(t_1 (pow (hypot x.im x.re) y.re))
(t_2 (* (atan2 x.im x.re) (- y.im)))
(t_3 (* (exp (fma (log (hypot x.re x.im)) y.re t_2)) (cos t_0))))
(if (<= y.re -7.7e-19)
t_3
(if (<= y.re 2.7e-139)
(* (cos (* y.im (log (hypot x.im x.re)))) (exp t_2))
(if (<= y.re 2.7e+39)
t_3
(if (<= y.re 1e+46) (* (+ 1.0 (* -0.5 (pow t_0 2.0))) t_1) t_1))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = pow(hypot(x_46_im, x_46_re), y_46_re);
double t_2 = atan2(x_46_im, x_46_re) * -y_46_im;
double t_3 = exp(fma(log(hypot(x_46_re, x_46_im)), y_46_re, t_2)) * cos(t_0);
double tmp;
if (y_46_re <= -7.7e-19) {
tmp = t_3;
} else if (y_46_re <= 2.7e-139) {
tmp = cos((y_46_im * log(hypot(x_46_im, x_46_re)))) * exp(t_2);
} else if (y_46_re <= 2.7e+39) {
tmp = t_3;
} else if (y_46_re <= 1e+46) {
tmp = (1.0 + (-0.5 * pow(t_0, 2.0))) * t_1;
} else {
tmp = t_1;
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_1 = hypot(x_46_im, x_46_re) ^ y_46_re t_2 = Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)) t_3 = Float64(exp(fma(log(hypot(x_46_re, x_46_im)), y_46_re, t_2)) * cos(t_0)) tmp = 0.0 if (y_46_re <= -7.7e-19) tmp = t_3; elseif (y_46_re <= 2.7e-139) tmp = Float64(cos(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) * exp(t_2)); elseif (y_46_re <= 2.7e+39) tmp = t_3; elseif (y_46_re <= 1e+46) tmp = Float64(Float64(1.0 + Float64(-0.5 * (t_0 ^ 2.0))) * t_1); else tmp = t_1; end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, Block[{t$95$2 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]}, Block[{t$95$3 = N[(N[Exp[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$re + t$95$2), $MachinePrecision]], $MachinePrecision] * N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -7.7e-19], t$95$3, If[LessEqual[y$46$re, 2.7e-139], N[(N[Cos[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Exp[t$95$2], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 2.7e+39], t$95$3, If[LessEqual[y$46$re, 1e+46], N[(N[(1.0 + N[(-0.5 * N[Power[t$95$0, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision], t$95$1]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
t_2 := \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)\\
t_3 := e^{\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.re, t\_2\right)} \cdot \cos t\_0\\
\mathbf{if}\;y.re \leq -7.7 \cdot 10^{-19}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;y.re \leq 2.7 \cdot 10^{-139}:\\
\;\;\;\;\cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \cdot e^{t\_2}\\
\mathbf{elif}\;y.re \leq 2.7 \cdot 10^{+39}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;y.re \leq 10^{+46}:\\
\;\;\;\;\left(1 + -0.5 \cdot {t\_0}^{2}\right) \cdot t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y.re < -7.70000000000000044e-19 or 2.6999999999999998e-139 < y.re < 2.70000000000000003e39Initial program 40.9%
cancel-sign-sub-inv40.9%
fma-define40.9%
hypot-define40.9%
distribute-lft-neg-in40.9%
distribute-rgt-neg-out40.9%
fma-define40.9%
hypot-define80.7%
*-commutative80.7%
Simplified80.7%
Taylor expanded in y.re around inf 39.1%
+-commutative39.1%
associate-/l*39.1%
unpow239.1%
unpow239.1%
hypot-undefine79.8%
Simplified79.8%
Taylor expanded in y.im around 0 81.6%
if -7.70000000000000044e-19 < y.re < 2.6999999999999998e-139Initial 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-define87.3%
*-commutative87.3%
Simplified87.3%
Taylor expanded in y.re around 0 42.1%
unpow242.1%
unpow242.1%
hypot-undefine87.3%
neg-mul-187.3%
Simplified87.3%
if 2.70000000000000003e39 < y.re < 9.9999999999999999e45Initial program 50.0%
cancel-sign-sub-inv50.0%
fma-define50.0%
hypot-define50.0%
distribute-lft-neg-in50.0%
distribute-rgt-neg-out50.0%
fma-define50.0%
hypot-define50.0%
*-commutative50.0%
Simplified50.0%
Taylor expanded in y.im around 0 0.0%
unpow20.0%
unpow20.0%
hypot-undefine0.0%
Simplified0.0%
Taylor expanded in y.re around 0 100.0%
unpow2100.0%
unpow2100.0%
swap-sqr100.0%
unpow2100.0%
Simplified100.0%
if 9.9999999999999999e45 < y.re 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-define45.5%
hypot-define67.3%
*-commutative67.3%
Simplified67.3%
Taylor expanded in y.im around 0 58.3%
unpow258.3%
unpow258.3%
hypot-undefine58.3%
Simplified58.3%
Taylor expanded in y.re around 0 74.7%
Final simplification82.2%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (pow (hypot x.im x.re) y.re)))
(if (<= y.re -9e-45)
(*
(cos (fma (log (hypot x.re x.im)) y.im (* y.re (atan2 x.im x.re))))
t_0)
(if (<= y.re 9.5e+45)
(*
(cos (* y.im (pow (cbrt (log (hypot x.im x.re))) 3.0)))
(exp (* (atan2 x.im x.re) (- 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 = pow(hypot(x_46_im, x_46_re), y_46_re);
double tmp;
if (y_46_re <= -9e-45) {
tmp = cos(fma(log(hypot(x_46_re, x_46_im)), y_46_im, (y_46_re * atan2(x_46_im, x_46_re)))) * t_0;
} else if (y_46_re <= 9.5e+45) {
tmp = cos((y_46_im * pow(cbrt(log(hypot(x_46_im, x_46_re))), 3.0))) * exp((atan2(x_46_im, x_46_re) * -y_46_im));
} else {
tmp = 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_re <= -9e-45) tmp = Float64(cos(fma(log(hypot(x_46_re, x_46_im)), y_46_im, Float64(y_46_re * atan(x_46_im, x_46_re)))) * t_0); elseif (y_46_re <= 9.5e+45) tmp = Float64(cos(Float64(y_46_im * (cbrt(log(hypot(x_46_im, x_46_re))) ^ 3.0))) * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))); else tmp = t_0; end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, If[LessEqual[y$46$re, -9e-45], N[(N[Cos[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] * t$95$0), $MachinePrecision], If[LessEqual[y$46$re, 9.5e+45], N[(N[Cos[N[(y$46$im * N[Power[N[Power[N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision], 1/3], $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{if}\;y.re \leq -9 \cdot 10^{-45}:\\
\;\;\;\;\cos \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 t\_0\\
\mathbf{elif}\;y.re \leq 9.5 \cdot 10^{+45}:\\
\;\;\;\;\cos \left(y.im \cdot {\left(\sqrt[3]{\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)}\right)}^{3}\right) \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if y.re < -8.9999999999999997e-45Initial program 40.0%
exp-diff36.0%
exp-to-pow36.0%
hypot-define36.0%
*-commutative36.0%
exp-prod36.0%
fma-define36.0%
hypot-define73.6%
*-commutative73.6%
Simplified73.6%
Taylor expanded in y.im around 0 80.3%
unpow280.3%
unpow280.3%
hypot-undefine83.1%
Simplified83.1%
if -8.9999999999999997e-45 < y.re < 9.4999999999999998e45Initial program 42.4%
cancel-sign-sub-inv42.4%
fma-define42.4%
hypot-define42.4%
distribute-lft-neg-in42.4%
distribute-rgt-neg-out42.4%
fma-define42.4%
hypot-define81.0%
*-commutative81.0%
Simplified81.0%
Taylor expanded in y.re around 0 40.9%
unpow240.9%
unpow240.9%
hypot-undefine78.7%
neg-mul-178.7%
Simplified78.7%
add-cube-cbrt78.1%
pow379.5%
Applied egg-rr79.5%
if 9.4999999999999998e45 < y.re 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-define45.5%
hypot-define67.3%
*-commutative67.3%
Simplified67.3%
Taylor expanded in y.im around 0 58.3%
unpow258.3%
unpow258.3%
hypot-undefine58.3%
Simplified58.3%
Taylor expanded in y.re around 0 74.7%
Final simplification79.5%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (pow (hypot x.im x.re) y.re)))
(if (<= y.re -5e-14)
(* (cos (* y.re (atan2 x.im x.re))) t_0)
(if (<= y.re 9.5e+45)
(*
(cos (* y.im (pow (cbrt (log (hypot x.im x.re))) 3.0)))
(exp (* (atan2 x.im x.re) (- 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 = pow(hypot(x_46_im, x_46_re), y_46_re);
double tmp;
if (y_46_re <= -5e-14) {
tmp = cos((y_46_re * atan2(x_46_im, x_46_re))) * t_0;
} else if (y_46_re <= 9.5e+45) {
tmp = cos((y_46_im * pow(cbrt(log(hypot(x_46_im, x_46_re))), 3.0))) * exp((atan2(x_46_im, x_46_re) * -y_46_im));
} else {
tmp = t_0;
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
double tmp;
if (y_46_re <= -5e-14) {
tmp = Math.cos((y_46_re * Math.atan2(x_46_im, x_46_re))) * t_0;
} else if (y_46_re <= 9.5e+45) {
tmp = Math.cos((y_46_im * Math.pow(Math.cbrt(Math.log(Math.hypot(x_46_im, x_46_re))), 3.0))) * Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im));
} else {
tmp = 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_re <= -5e-14) tmp = Float64(cos(Float64(y_46_re * atan(x_46_im, x_46_re))) * t_0); elseif (y_46_re <= 9.5e+45) tmp = Float64(cos(Float64(y_46_im * (cbrt(log(hypot(x_46_im, x_46_re))) ^ 3.0))) * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))); else tmp = t_0; end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, If[LessEqual[y$46$re, -5e-14], N[(N[Cos[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$0), $MachinePrecision], If[LessEqual[y$46$re, 9.5e+45], N[(N[Cos[N[(y$46$im * N[Power[N[Power[N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision], 1/3], $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{if}\;y.re \leq -5 \cdot 10^{-14}:\\
\;\;\;\;\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot t\_0\\
\mathbf{elif}\;y.re \leq 9.5 \cdot 10^{+45}:\\
\;\;\;\;\cos \left(y.im \cdot {\left(\sqrt[3]{\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)}\right)}^{3}\right) \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if y.re < -5.0000000000000002e-14Initial program 39.4%
cancel-sign-sub-inv39.4%
fma-define39.4%
hypot-define39.4%
distribute-lft-neg-in39.4%
distribute-rgt-neg-out39.4%
fma-define39.4%
hypot-define87.3%
*-commutative87.3%
Simplified87.3%
Taylor expanded in y.im around 0 81.9%
unpow281.9%
unpow281.9%
hypot-undefine83.2%
Simplified83.2%
if -5.0000000000000002e-14 < y.re < 9.4999999999999998e45Initial program 42.6%
cancel-sign-sub-inv42.6%
fma-define42.6%
hypot-define42.6%
distribute-lft-neg-in42.6%
distribute-rgt-neg-out42.6%
fma-define42.6%
hypot-define81.0%
*-commutative81.0%
Simplified81.0%
Taylor expanded in y.re around 0 41.1%
unpow241.1%
unpow241.1%
hypot-undefine78.7%
neg-mul-178.7%
Simplified78.7%
add-cube-cbrt78.2%
pow379.5%
Applied egg-rr79.5%
if 9.4999999999999998e45 < y.re 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-define45.5%
hypot-define67.3%
*-commutative67.3%
Simplified67.3%
Taylor expanded in y.im around 0 58.3%
unpow258.3%
unpow258.3%
hypot-undefine58.3%
Simplified58.3%
Taylor expanded in y.re around 0 74.7%
Final simplification79.5%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re))) (t_1 (pow (hypot x.im x.re) y.re)))
(if (<= y.re -4.6e-14)
(* (cos t_0) t_1)
(if (<= y.re 9500000.0)
(*
(cos (* y.im (log (hypot x.im x.re))))
(exp (* (atan2 x.im x.re) (- y.im))))
(if (<= y.re 1.05e+50)
(* (+ 1.0 (* -0.5 (pow t_0 2.0))) t_1)
(if (<= y.re 4e+67) (pow x.re y.re) t_1))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = 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 tmp;
if (y_46_re <= -4.6e-14) {
tmp = cos(t_0) * t_1;
} else if (y_46_re <= 9500000.0) {
tmp = cos((y_46_im * log(hypot(x_46_im, x_46_re)))) * exp((atan2(x_46_im, x_46_re) * -y_46_im));
} else if (y_46_re <= 1.05e+50) {
tmp = (1.0 + (-0.5 * pow(t_0, 2.0))) * t_1;
} else if (y_46_re <= 4e+67) {
tmp = pow(x_46_re, y_46_re);
} else {
tmp = t_1;
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = 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 tmp;
if (y_46_re <= -4.6e-14) {
tmp = Math.cos(t_0) * t_1;
} else if (y_46_re <= 9500000.0) {
tmp = Math.cos((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re)))) * Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im));
} else if (y_46_re <= 1.05e+50) {
tmp = (1.0 + (-0.5 * Math.pow(t_0, 2.0))) * t_1;
} else if (y_46_re <= 4e+67) {
tmp = Math.pow(x_46_re, y_46_re);
} else {
tmp = t_1;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = 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) tmp = 0 if y_46_re <= -4.6e-14: tmp = math.cos(t_0) * t_1 elif y_46_re <= 9500000.0: tmp = math.cos((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) * math.exp((math.atan2(x_46_im, x_46_re) * -y_46_im)) elif y_46_re <= 1.05e+50: tmp = (1.0 + (-0.5 * math.pow(t_0, 2.0))) * t_1 elif y_46_re <= 4e+67: tmp = math.pow(x_46_re, y_46_re) else: tmp = t_1 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(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 <= -4.6e-14) tmp = Float64(cos(t_0) * t_1); elseif (y_46_re <= 9500000.0) tmp = Float64(cos(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))); elseif (y_46_re <= 1.05e+50) tmp = Float64(Float64(1.0 + Float64(-0.5 * (t_0 ^ 2.0))) * t_1); elseif (y_46_re <= 4e+67) tmp = x_46_re ^ y_46_re; else tmp = t_1; end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = y_46_re * atan2(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 <= -4.6e-14) tmp = cos(t_0) * t_1; elseif (y_46_re <= 9500000.0) tmp = cos((y_46_im * log(hypot(x_46_im, x_46_re)))) * exp((atan2(x_46_im, x_46_re) * -y_46_im)); elseif (y_46_re <= 1.05e+50) tmp = (1.0 + (-0.5 * (t_0 ^ 2.0))) * t_1; elseif (y_46_re <= 4e+67) tmp = x_46_re ^ y_46_re; else tmp = t_1; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $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, -4.6e-14], N[(N[Cos[t$95$0], $MachinePrecision] * t$95$1), $MachinePrecision], If[LessEqual[y$46$re, 9500000.0], N[(N[Cos[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 1.05e+50], N[(N[(1.0 + N[(-0.5 * N[Power[t$95$0, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision], If[LessEqual[y$46$re, 4e+67], N[Power[x$46$re, y$46$re], $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{if}\;y.re \leq -4.6 \cdot 10^{-14}:\\
\;\;\;\;\cos t\_0 \cdot t\_1\\
\mathbf{elif}\;y.re \leq 9500000:\\
\;\;\;\;\cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\
\mathbf{elif}\;y.re \leq 1.05 \cdot 10^{+50}:\\
\;\;\;\;\left(1 + -0.5 \cdot {t\_0}^{2}\right) \cdot t\_1\\
\mathbf{elif}\;y.re \leq 4 \cdot 10^{+67}:\\
\;\;\;\;{x.re}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y.re < -4.59999999999999996e-14Initial program 39.4%
cancel-sign-sub-inv39.4%
fma-define39.4%
hypot-define39.4%
distribute-lft-neg-in39.4%
distribute-rgt-neg-out39.4%
fma-define39.4%
hypot-define87.3%
*-commutative87.3%
Simplified87.3%
Taylor expanded in y.im around 0 81.9%
unpow281.9%
unpow281.9%
hypot-undefine83.2%
Simplified83.2%
if -4.59999999999999996e-14 < y.re < 9.5e6Initial program 41.2%
cancel-sign-sub-inv41.2%
fma-define41.2%
hypot-define41.2%
distribute-lft-neg-in41.2%
distribute-rgt-neg-out41.2%
fma-define41.2%
hypot-define81.1%
*-commutative81.1%
Simplified81.1%
Taylor expanded in y.re around 0 41.2%
unpow241.2%
unpow241.2%
hypot-undefine81.1%
neg-mul-181.1%
Simplified81.1%
if 9.5e6 < y.re < 1.05e50Initial program 63.6%
cancel-sign-sub-inv63.6%
fma-define63.6%
hypot-define63.6%
distribute-lft-neg-in63.6%
distribute-rgt-neg-out63.6%
fma-define63.6%
hypot-define81.8%
*-commutative81.8%
Simplified81.8%
Taylor expanded in y.im around 0 72.9%
unpow272.9%
unpow272.9%
hypot-undefine72.9%
Simplified72.9%
Taylor expanded in y.re around 0 91.1%
unpow291.1%
unpow291.1%
swap-sqr91.1%
unpow291.1%
Simplified91.1%
if 1.05e50 < y.re < 3.99999999999999993e67Initial program 50.0%
cancel-sign-sub-inv50.0%
fma-define50.0%
hypot-define50.0%
distribute-lft-neg-in50.0%
distribute-rgt-neg-out50.0%
fma-define50.0%
hypot-define75.0%
*-commutative75.0%
Simplified75.0%
Taylor expanded in y.im around 0 50.4%
unpow250.4%
unpow250.4%
hypot-undefine50.4%
Simplified50.4%
Taylor expanded in y.re around 0 75.4%
Taylor expanded in x.im around 0 100.0%
if 3.99999999999999993e67 < y.re Initial program 42.0%
cancel-sign-sub-inv42.0%
fma-define42.0%
hypot-define42.0%
distribute-lft-neg-in42.0%
distribute-rgt-neg-out42.0%
fma-define44.0%
hypot-define66.0%
*-commutative66.0%
Simplified66.0%
Taylor expanded in y.im around 0 58.1%
unpow258.1%
unpow258.1%
hypot-undefine58.1%
Simplified58.1%
Taylor expanded in y.re around 0 74.1%
Final simplification81.0%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (cos (* y.re (atan2 x.im x.re)))))
(if (<= y.re -5e-14)
(* t_0 (pow (hypot x.im x.re) y.re))
(if (<= y.re 3e+20)
(* t_0 (exp (* (atan2 x.im x.re) (- y.im))))
(pow (pow (hypot x.re x.im) 2.0) (/ y.re 2.0))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = cos((y_46_re * atan2(x_46_im, x_46_re)));
double tmp;
if (y_46_re <= -5e-14) {
tmp = t_0 * pow(hypot(x_46_im, x_46_re), y_46_re);
} else if (y_46_re <= 3e+20) {
tmp = t_0 * exp((atan2(x_46_im, x_46_re) * -y_46_im));
} else {
tmp = pow(pow(hypot(x_46_re, x_46_im), 2.0), (y_46_re / 2.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.cos((y_46_re * Math.atan2(x_46_im, x_46_re)));
double tmp;
if (y_46_re <= -5e-14) {
tmp = t_0 * Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
} else if (y_46_re <= 3e+20) {
tmp = t_0 * Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im));
} else {
tmp = Math.pow(Math.pow(Math.hypot(x_46_re, x_46_im), 2.0), (y_46_re / 2.0));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.cos((y_46_re * math.atan2(x_46_im, x_46_re))) tmp = 0 if y_46_re <= -5e-14: tmp = t_0 * math.pow(math.hypot(x_46_im, x_46_re), y_46_re) elif y_46_re <= 3e+20: tmp = t_0 * math.exp((math.atan2(x_46_im, x_46_re) * -y_46_im)) else: tmp = math.pow(math.pow(math.hypot(x_46_re, x_46_im), 2.0), (y_46_re / 2.0)) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = cos(Float64(y_46_re * atan(x_46_im, x_46_re))) tmp = 0.0 if (y_46_re <= -5e-14) tmp = Float64(t_0 * (hypot(x_46_im, x_46_re) ^ y_46_re)); elseif (y_46_re <= 3e+20) tmp = Float64(t_0 * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))); else tmp = (hypot(x_46_re, x_46_im) ^ 2.0) ^ Float64(y_46_re / 2.0); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = cos((y_46_re * atan2(x_46_im, x_46_re))); tmp = 0.0; if (y_46_re <= -5e-14) tmp = t_0 * (hypot(x_46_im, x_46_re) ^ y_46_re); elseif (y_46_re <= 3e+20) tmp = t_0 * exp((atan2(x_46_im, x_46_re) * -y_46_im)); else tmp = (hypot(x_46_re, x_46_im) ^ 2.0) ^ (y_46_re / 2.0); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Cos[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -5e-14], N[(t$95$0 * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 3e+20], N[(t$95$0 * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[Power[N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], 2.0], $MachinePrecision], N[(y$46$re / 2.0), $MachinePrecision]], $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{if}\;y.re \leq -5 \cdot 10^{-14}:\\
\;\;\;\;t\_0 \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{elif}\;y.re \leq 3 \cdot 10^{+20}:\\
\;\;\;\;t\_0 \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\
\mathbf{else}:\\
\;\;\;\;{\left({\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{2}\right)}^{\left(\frac{y.re}{2}\right)}\\
\end{array}
\end{array}
if y.re < -5.0000000000000002e-14Initial program 39.4%
cancel-sign-sub-inv39.4%
fma-define39.4%
hypot-define39.4%
distribute-lft-neg-in39.4%
distribute-rgt-neg-out39.4%
fma-define39.4%
hypot-define87.3%
*-commutative87.3%
Simplified87.3%
Taylor expanded in y.im around 0 81.9%
unpow281.9%
unpow281.9%
hypot-undefine83.2%
Simplified83.2%
if -5.0000000000000002e-14 < y.re < 3e20Initial program 41.9%
cancel-sign-sub-inv41.9%
fma-define41.9%
hypot-define41.9%
distribute-lft-neg-in41.9%
distribute-rgt-neg-out41.9%
fma-define41.9%
hypot-define81.0%
*-commutative81.0%
Simplified81.0%
Taylor expanded in y.re around inf 33.8%
+-commutative33.8%
associate-/l*33.8%
unpow233.8%
unpow233.8%
hypot-undefine64.9%
Simplified64.9%
Taylor expanded in y.im around 0 76.0%
Taylor expanded in y.re around 0 74.4%
if 3e20 < y.re Initial program 45.0%
cancel-sign-sub-inv45.0%
fma-define45.0%
hypot-define45.0%
distribute-lft-neg-in45.0%
distribute-rgt-neg-out45.0%
fma-define46.7%
hypot-define68.3%
*-commutative68.3%
Simplified68.3%
Taylor expanded in y.im around 0 58.4%
unpow258.4%
unpow258.4%
hypot-undefine58.4%
Simplified58.4%
Taylor expanded in y.re around 0 73.4%
*-un-lft-identity73.4%
sqr-pow73.4%
pow-prod-down73.4%
pow273.4%
Applied egg-rr73.4%
hypot-undefine73.4%
unpow273.4%
unpow273.4%
+-commutative73.4%
unpow273.4%
unpow273.4%
hypot-undefine73.4%
Simplified73.4%
Final simplification76.6%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (<= y.re -9e-45)
(* (cos (* y.re (atan2 x.im x.re))) (pow (hypot x.im x.re) y.re))
(if (<= y.re 3.9e+20)
(exp (* (atan2 x.im x.re) (- y.im)))
(pow (pow (hypot x.re x.im) 2.0) (/ y.re 2.0)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_re <= -9e-45) {
tmp = cos((y_46_re * atan2(x_46_im, x_46_re))) * pow(hypot(x_46_im, x_46_re), y_46_re);
} else if (y_46_re <= 3.9e+20) {
tmp = exp((atan2(x_46_im, x_46_re) * -y_46_im));
} else {
tmp = pow(pow(hypot(x_46_re, x_46_im), 2.0), (y_46_re / 2.0));
}
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 <= -9e-45) {
tmp = Math.cos((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 if (y_46_re <= 3.9e+20) {
tmp = Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im));
} else {
tmp = Math.pow(Math.pow(Math.hypot(x_46_re, x_46_im), 2.0), (y_46_re / 2.0));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if y_46_re <= -9e-45: tmp = math.cos((y_46_re * math.atan2(x_46_im, x_46_re))) * math.pow(math.hypot(x_46_im, x_46_re), y_46_re) elif y_46_re <= 3.9e+20: tmp = math.exp((math.atan2(x_46_im, x_46_re) * -y_46_im)) else: tmp = math.pow(math.pow(math.hypot(x_46_re, x_46_im), 2.0), (y_46_re / 2.0)) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if (y_46_re <= -9e-45) tmp = Float64(cos(Float64(y_46_re * atan(x_46_im, x_46_re))) * (hypot(x_46_im, x_46_re) ^ y_46_re)); elseif (y_46_re <= 3.9e+20) tmp = exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))); else tmp = (hypot(x_46_re, x_46_im) ^ 2.0) ^ Float64(y_46_re / 2.0); 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 <= -9e-45) tmp = cos((y_46_re * atan2(x_46_im, x_46_re))) * (hypot(x_46_im, x_46_re) ^ y_46_re); elseif (y_46_re <= 3.9e+20) tmp = exp((atan2(x_46_im, x_46_re) * -y_46_im)); else tmp = (hypot(x_46_re, x_46_im) ^ 2.0) ^ (y_46_re / 2.0); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[y$46$re, -9e-45], N[(N[Cos[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 3.9e+20], N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision], N[Power[N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], 2.0], $MachinePrecision], N[(y$46$re / 2.0), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq -9 \cdot 10^{-45}:\\
\;\;\;\;\cos \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{elif}\;y.re \leq 3.9 \cdot 10^{+20}:\\
\;\;\;\;e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\
\mathbf{else}:\\
\;\;\;\;{\left({\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{2}\right)}^{\left(\frac{y.re}{2}\right)}\\
\end{array}
\end{array}
if y.re < -8.9999999999999997e-45Initial program 40.0%
cancel-sign-sub-inv40.0%
fma-define40.0%
hypot-define40.0%
distribute-lft-neg-in40.0%
distribute-rgt-neg-out40.0%
fma-define40.0%
hypot-define86.9%
*-commutative86.9%
Simplified86.9%
Taylor expanded in y.im around 0 80.3%
unpow280.3%
unpow280.3%
hypot-undefine83.0%
Simplified83.0%
if -8.9999999999999997e-45 < y.re < 3.9e20Initial program 41.7%
cancel-sign-sub-inv41.7%
fma-define41.7%
hypot-define41.7%
distribute-lft-neg-in41.7%
distribute-rgt-neg-out41.7%
fma-define41.7%
hypot-define81.0%
*-commutative81.0%
Simplified81.0%
Taylor expanded in y.re around inf 33.2%
+-commutative33.2%
associate-/l*33.2%
unpow233.2%
unpow233.2%
hypot-undefine64.4%
Simplified64.4%
Taylor expanded in y.im around 0 75.8%
Taylor expanded in y.re around 0 73.4%
neg-mul-173.4%
distribute-rgt-neg-in73.4%
Simplified73.4%
if 3.9e20 < y.re Initial program 45.0%
cancel-sign-sub-inv45.0%
fma-define45.0%
hypot-define45.0%
distribute-lft-neg-in45.0%
distribute-rgt-neg-out45.0%
fma-define46.7%
hypot-define68.3%
*-commutative68.3%
Simplified68.3%
Taylor expanded in y.im around 0 58.4%
unpow258.4%
unpow258.4%
hypot-undefine58.4%
Simplified58.4%
Taylor expanded in y.re around 0 73.4%
*-un-lft-identity73.4%
sqr-pow73.4%
pow-prod-down73.4%
pow273.4%
Applied egg-rr73.4%
hypot-undefine73.4%
unpow273.4%
unpow273.4%
+-commutative73.4%
unpow273.4%
unpow273.4%
hypot-undefine73.4%
Simplified73.4%
Final simplification76.2%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (<= y.re -9.6e-15)
(pow (hypot x.im x.re) y.re)
(if (<= y.re 3e+20)
(exp (* (atan2 x.im x.re) (- y.im)))
(pow (pow (hypot x.re x.im) 2.0) (/ y.re 2.0)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_re <= -9.6e-15) {
tmp = pow(hypot(x_46_im, x_46_re), y_46_re);
} else if (y_46_re <= 3e+20) {
tmp = exp((atan2(x_46_im, x_46_re) * -y_46_im));
} else {
tmp = pow(pow(hypot(x_46_re, x_46_im), 2.0), (y_46_re / 2.0));
}
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 <= -9.6e-15) {
tmp = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
} else if (y_46_re <= 3e+20) {
tmp = Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im));
} else {
tmp = Math.pow(Math.pow(Math.hypot(x_46_re, x_46_im), 2.0), (y_46_re / 2.0));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if y_46_re <= -9.6e-15: tmp = math.pow(math.hypot(x_46_im, x_46_re), y_46_re) elif y_46_re <= 3e+20: tmp = math.exp((math.atan2(x_46_im, x_46_re) * -y_46_im)) else: tmp = math.pow(math.pow(math.hypot(x_46_re, x_46_im), 2.0), (y_46_re / 2.0)) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if (y_46_re <= -9.6e-15) tmp = hypot(x_46_im, x_46_re) ^ y_46_re; elseif (y_46_re <= 3e+20) tmp = exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))); else tmp = (hypot(x_46_re, x_46_im) ^ 2.0) ^ Float64(y_46_re / 2.0); 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 <= -9.6e-15) tmp = hypot(x_46_im, x_46_re) ^ y_46_re; elseif (y_46_re <= 3e+20) tmp = exp((atan2(x_46_im, x_46_re) * -y_46_im)); else tmp = (hypot(x_46_re, x_46_im) ^ 2.0) ^ (y_46_re / 2.0); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[y$46$re, -9.6e-15], N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision], If[LessEqual[y$46$re, 3e+20], N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision], N[Power[N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], 2.0], $MachinePrecision], N[(y$46$re / 2.0), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq -9.6 \cdot 10^{-15}:\\
\;\;\;\;{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{elif}\;y.re \leq 3 \cdot 10^{+20}:\\
\;\;\;\;e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\
\mathbf{else}:\\
\;\;\;\;{\left({\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{2}\right)}^{\left(\frac{y.re}{2}\right)}\\
\end{array}
\end{array}
if y.re < -9.5999999999999998e-15Initial program 39.4%
cancel-sign-sub-inv39.4%
fma-define39.4%
hypot-define39.4%
distribute-lft-neg-in39.4%
distribute-rgt-neg-out39.4%
fma-define39.4%
hypot-define87.3%
*-commutative87.3%
Simplified87.3%
Taylor expanded in y.im around 0 81.9%
unpow281.9%
unpow281.9%
hypot-undefine83.2%
Simplified83.2%
Taylor expanded in y.re around 0 81.8%
if -9.5999999999999998e-15 < y.re < 3e20Initial program 41.9%
cancel-sign-sub-inv41.9%
fma-define41.9%
hypot-define41.9%
distribute-lft-neg-in41.9%
distribute-rgt-neg-out41.9%
fma-define41.9%
hypot-define81.0%
*-commutative81.0%
Simplified81.0%
Taylor expanded in y.re around inf 33.8%
+-commutative33.8%
associate-/l*33.8%
unpow233.8%
unpow233.8%
hypot-undefine64.9%
Simplified64.9%
Taylor expanded in y.im around 0 76.0%
Taylor expanded in y.re around 0 73.6%
neg-mul-173.6%
distribute-rgt-neg-in73.6%
Simplified73.6%
if 3e20 < y.re Initial program 45.0%
cancel-sign-sub-inv45.0%
fma-define45.0%
hypot-define45.0%
distribute-lft-neg-in45.0%
distribute-rgt-neg-out45.0%
fma-define46.7%
hypot-define68.3%
*-commutative68.3%
Simplified68.3%
Taylor expanded in y.im around 0 58.4%
unpow258.4%
unpow258.4%
hypot-undefine58.4%
Simplified58.4%
Taylor expanded in y.re around 0 73.4%
*-un-lft-identity73.4%
sqr-pow73.4%
pow-prod-down73.4%
pow273.4%
Applied egg-rr73.4%
hypot-undefine73.4%
unpow273.4%
unpow273.4%
+-commutative73.4%
unpow273.4%
unpow273.4%
hypot-undefine73.4%
Simplified73.4%
Final simplification75.8%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (or (<= y.re -3.9e-14) (not (<= y.re 2.5e+20))) (pow (hypot x.im x.re) y.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 <= -3.9e-14) || !(y_46_re <= 2.5e+20)) {
tmp = pow(hypot(x_46_im, x_46_re), y_46_re);
} else {
tmp = 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 <= -3.9e-14) || !(y_46_re <= 2.5e+20)) {
tmp = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
} else {
tmp = 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 <= -3.9e-14) or not (y_46_re <= 2.5e+20): tmp = math.pow(math.hypot(x_46_im, x_46_re), y_46_re) else: tmp = 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 <= -3.9e-14) || !(y_46_re <= 2.5e+20)) tmp = hypot(x_46_im, x_46_re) ^ y_46_re; else tmp = 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 <= -3.9e-14) || ~((y_46_re <= 2.5e+20))) tmp = hypot(x_46_im, x_46_re) ^ y_46_re; else tmp = 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, -3.9e-14], N[Not[LessEqual[y$46$re, 2.5e+20]], $MachinePrecision]], N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision], N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq -3.9 \cdot 10^{-14} \lor \neg \left(y.re \leq 2.5 \cdot 10^{+20}\right):\\
\;\;\;\;{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\
\end{array}
\end{array}
if y.re < -3.8999999999999998e-14 or 2.5e20 < y.re Initial program 42.0%
cancel-sign-sub-inv42.0%
fma-define42.0%
hypot-define42.0%
distribute-lft-neg-in42.0%
distribute-rgt-neg-out42.0%
fma-define42.7%
hypot-define78.6%
*-commutative78.6%
Simplified78.6%
Taylor expanded in y.im around 0 71.1%
unpow271.1%
unpow271.1%
hypot-undefine71.9%
Simplified71.9%
Taylor expanded in y.re around 0 78.0%
if -3.8999999999999998e-14 < y.re < 2.5e20Initial program 41.9%
cancel-sign-sub-inv41.9%
fma-define41.9%
hypot-define41.9%
distribute-lft-neg-in41.9%
distribute-rgt-neg-out41.9%
fma-define41.9%
hypot-define81.0%
*-commutative81.0%
Simplified81.0%
Taylor expanded in y.re around inf 33.8%
+-commutative33.8%
associate-/l*33.8%
unpow233.8%
unpow233.8%
hypot-undefine64.9%
Simplified64.9%
Taylor expanded in y.im around 0 76.0%
Taylor expanded in y.re around 0 73.6%
neg-mul-173.6%
distribute-rgt-neg-in73.6%
Simplified73.6%
Final simplification75.8%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (<= y.re -4.2e+15)
(pow x.re y.re)
(if (<= y.re 3.3e+20)
(exp (* (atan2 x.im x.re) (- y.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 tmp;
if (y_46_re <= -4.2e+15) {
tmp = pow(x_46_re, y_46_re);
} else if (y_46_re <= 3.3e+20) {
tmp = exp((atan2(x_46_im, x_46_re) * -y_46_im));
} else {
tmp = 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) :: tmp
if (y_46re <= (-4.2d+15)) then
tmp = x_46re ** y_46re
else if (y_46re <= 3.3d+20) then
tmp = exp((atan2(x_46im, x_46re) * -y_46im))
else
tmp = -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 tmp;
if (y_46_re <= -4.2e+15) {
tmp = Math.pow(x_46_re, y_46_re);
} else if (y_46_re <= 3.3e+20) {
tmp = Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im));
} else {
tmp = Math.pow(-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_re <= -4.2e+15: tmp = math.pow(x_46_re, y_46_re) elif y_46_re <= 3.3e+20: tmp = math.exp((math.atan2(x_46_im, x_46_re) * -y_46_im)) else: tmp = math.pow(-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_re <= -4.2e+15) tmp = x_46_re ^ y_46_re; elseif (y_46_re <= 3.3e+20) tmp = exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))); else tmp = Float64(-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_re <= -4.2e+15) tmp = x_46_re ^ y_46_re; elseif (y_46_re <= 3.3e+20) tmp = exp((atan2(x_46_im, x_46_re) * -y_46_im)); else tmp = -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[LessEqual[y$46$re, -4.2e+15], N[Power[x$46$re, y$46$re], $MachinePrecision], If[LessEqual[y$46$re, 3.3e+20], N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision], N[Power[(-x$46$im), y$46$re], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq -4.2 \cdot 10^{+15}:\\
\;\;\;\;{x.re}^{y.re}\\
\mathbf{elif}\;y.re \leq 3.3 \cdot 10^{+20}:\\
\;\;\;\;e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\
\mathbf{else}:\\
\;\;\;\;{\left(-x.im\right)}^{y.re}\\
\end{array}
\end{array}
if y.re < -4.2e15Initial program 37.9%
cancel-sign-sub-inv37.9%
fma-define37.9%
hypot-define37.9%
distribute-lft-neg-in37.9%
distribute-rgt-neg-out37.9%
fma-define37.9%
hypot-define87.9%
*-commutative87.9%
Simplified87.9%
Taylor expanded in y.im around 0 83.5%
unpow283.5%
unpow283.5%
hypot-undefine83.5%
Simplified83.5%
Taylor expanded in y.re around 0 81.9%
Taylor expanded in x.im around 0 68.5%
if -4.2e15 < y.re < 3.3e20Initial program 42.6%
cancel-sign-sub-inv42.6%
fma-define42.6%
hypot-define42.6%
distribute-lft-neg-in42.6%
distribute-rgt-neg-out42.6%
fma-define42.6%
hypot-define81.0%
*-commutative81.0%
Simplified81.0%
Taylor expanded in y.re around inf 34.8%
+-commutative34.8%
associate-/l*34.8%
unpow234.8%
unpow234.8%
hypot-undefine65.5%
Simplified65.5%
Taylor expanded in y.im around 0 76.1%
Taylor expanded in y.re around 0 73.2%
neg-mul-173.2%
distribute-rgt-neg-in73.2%
Simplified73.2%
if 3.3e20 < y.re Initial program 45.0%
cancel-sign-sub-inv45.0%
fma-define45.0%
hypot-define45.0%
distribute-lft-neg-in45.0%
distribute-rgt-neg-out45.0%
fma-define46.7%
hypot-define68.3%
*-commutative68.3%
Simplified68.3%
Taylor expanded in y.im around 0 58.4%
unpow258.4%
unpow258.4%
hypot-undefine58.4%
Simplified58.4%
Taylor expanded in y.re around 0 73.4%
Taylor expanded in x.im around -inf 65.3%
mul-1-neg65.3%
Simplified65.3%
Final simplification70.1%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (<= y.re -1.48e-5)
(pow x.re y.re)
(if (<= y.re 0.0126)
1.0
(if (<= y.re 5.6e+70) (pow x.re y.re) (pow 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_re <= -1.48e-5) {
tmp = pow(x_46_re, y_46_re);
} else if (y_46_re <= 0.0126) {
tmp = 1.0;
} else if (y_46_re <= 5.6e+70) {
tmp = pow(x_46_re, y_46_re);
} else {
tmp = 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) :: tmp
if (y_46re <= (-1.48d-5)) then
tmp = x_46re ** y_46re
else if (y_46re <= 0.0126d0) then
tmp = 1.0d0
else if (y_46re <= 5.6d+70) then
tmp = x_46re ** y_46re
else
tmp = 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 tmp;
if (y_46_re <= -1.48e-5) {
tmp = Math.pow(x_46_re, y_46_re);
} else if (y_46_re <= 0.0126) {
tmp = 1.0;
} else if (y_46_re <= 5.6e+70) {
tmp = Math.pow(x_46_re, y_46_re);
} else {
tmp = Math.pow(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_re <= -1.48e-5: tmp = math.pow(x_46_re, y_46_re) elif y_46_re <= 0.0126: tmp = 1.0 elif y_46_re <= 5.6e+70: tmp = math.pow(x_46_re, y_46_re) else: tmp = math.pow(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_re <= -1.48e-5) tmp = x_46_re ^ y_46_re; elseif (y_46_re <= 0.0126) tmp = 1.0; elseif (y_46_re <= 5.6e+70) tmp = x_46_re ^ y_46_re; else tmp = 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_re <= -1.48e-5) tmp = x_46_re ^ y_46_re; elseif (y_46_re <= 0.0126) tmp = 1.0; elseif (y_46_re <= 5.6e+70) tmp = x_46_re ^ y_46_re; else tmp = 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[LessEqual[y$46$re, -1.48e-5], N[Power[x$46$re, y$46$re], $MachinePrecision], If[LessEqual[y$46$re, 0.0126], 1.0, If[LessEqual[y$46$re, 5.6e+70], N[Power[x$46$re, y$46$re], $MachinePrecision], N[Power[x$46$im, y$46$re], $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq -1.48 \cdot 10^{-5}:\\
\;\;\;\;{x.re}^{y.re}\\
\mathbf{elif}\;y.re \leq 0.0126:\\
\;\;\;\;1\\
\mathbf{elif}\;y.re \leq 5.6 \cdot 10^{+70}:\\
\;\;\;\;{x.re}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;{x.im}^{y.re}\\
\end{array}
\end{array}
if y.re < -1.4800000000000001e-5 or 0.0126 < y.re < 5.59999999999999979e70Initial program 43.7%
cancel-sign-sub-inv43.7%
fma-define43.7%
hypot-define43.7%
distribute-lft-neg-in43.7%
distribute-rgt-neg-out43.7%
fma-define43.7%
hypot-define86.2%
*-commutative86.2%
Simplified86.2%
Taylor expanded in y.im around 0 78.4%
unpow278.4%
unpow278.4%
hypot-undefine78.4%
Simplified78.4%
Taylor expanded in y.re around 0 74.9%
Taylor expanded in x.im around 0 68.1%
if -1.4800000000000001e-5 < y.re < 0.0126Initial program 40.4%
cancel-sign-sub-inv40.4%
fma-define40.4%
hypot-define40.4%
distribute-lft-neg-in40.4%
distribute-rgt-neg-out40.4%
fma-define40.4%
hypot-define81.1%
*-commutative81.1%
Simplified81.1%
Taylor expanded in y.im around 0 30.1%
unpow230.1%
unpow230.1%
hypot-undefine46.0%
Simplified46.0%
Taylor expanded in y.re around 0 46.0%
Taylor expanded in y.re around 0 45.3%
if 5.59999999999999979e70 < y.re Initial program 42.9%
cancel-sign-sub-inv42.9%
fma-define42.9%
hypot-define42.9%
distribute-lft-neg-in42.9%
distribute-rgt-neg-out42.9%
fma-define44.9%
hypot-define65.3%
*-commutative65.3%
Simplified65.3%
Taylor expanded in y.im around 0 57.2%
unpow257.2%
unpow257.2%
hypot-undefine57.2%
Simplified57.2%
Taylor expanded in y.re around 0 73.6%
Taylor expanded in x.re around 0 67.5%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (or (<= y.re -1650000000.0) (not (<= y.re 1700000.0))) (pow x.im y.re) 1.0))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_re <= -1650000000.0) || !(y_46_re <= 1700000.0)) {
tmp = pow(x_46_im, y_46_re);
} else {
tmp = 1.0;
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: tmp
if ((y_46re <= (-1650000000.0d0)) .or. (.not. (y_46re <= 1700000.0d0))) then
tmp = x_46im ** y_46re
else
tmp = 1.0d0
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 <= -1650000000.0) || !(y_46_re <= 1700000.0)) {
tmp = Math.pow(x_46_im, y_46_re);
} else {
tmp = 1.0;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if (y_46_re <= -1650000000.0) or not (y_46_re <= 1700000.0): tmp = math.pow(x_46_im, y_46_re) else: tmp = 1.0 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if ((y_46_re <= -1650000000.0) || !(y_46_re <= 1700000.0)) tmp = x_46_im ^ y_46_re; else tmp = 1.0; 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 <= -1650000000.0) || ~((y_46_re <= 1700000.0))) tmp = x_46_im ^ y_46_re; else tmp = 1.0; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[Or[LessEqual[y$46$re, -1650000000.0], N[Not[LessEqual[y$46$re, 1700000.0]], $MachinePrecision]], N[Power[x$46$im, y$46$re], $MachinePrecision], 1.0]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq -1650000000 \lor \neg \left(y.re \leq 1700000\right):\\
\;\;\;\;{x.im}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if y.re < -1.65e9 or 1.7e6 < y.re Initial program 42.0%
cancel-sign-sub-inv42.0%
fma-define42.0%
hypot-define42.0%
distribute-lft-neg-in42.0%
distribute-rgt-neg-out42.0%
fma-define42.7%
hypot-define78.6%
*-commutative78.6%
Simplified78.6%
Taylor expanded in y.im around 0 71.9%
unpow271.9%
unpow271.9%
hypot-undefine71.9%
Simplified71.9%
Taylor expanded in y.re around 0 75.7%
Taylor expanded in x.re around 0 60.7%
if -1.65e9 < y.re < 1.7e6Initial program 41.9%
cancel-sign-sub-inv41.9%
fma-define41.9%
hypot-define41.9%
distribute-lft-neg-in41.9%
distribute-rgt-neg-out41.9%
fma-define41.9%
hypot-define81.0%
*-commutative81.0%
Simplified81.0%
Taylor expanded in y.im around 0 30.5%
unpow230.5%
unpow230.5%
hypot-undefine45.8%
Simplified45.8%
Taylor expanded in y.re around 0 45.8%
Taylor expanded in y.re around 0 43.6%
Final simplification52.4%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (<= x.re -0.59) (pow (- x.re) y.re) (if (<= x.re 8.5e-161) (pow x.im y.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 tmp;
if (x_46_re <= -0.59) {
tmp = pow(-x_46_re, y_46_re);
} else if (x_46_re <= 8.5e-161) {
tmp = pow(x_46_im, y_46_re);
} else {
tmp = pow(x_46_re, 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) :: tmp
if (x_46re <= (-0.59d0)) then
tmp = -x_46re ** y_46re
else if (x_46re <= 8.5d-161) then
tmp = x_46im ** y_46re
else
tmp = x_46re ** 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 tmp;
if (x_46_re <= -0.59) {
tmp = Math.pow(-x_46_re, y_46_re);
} else if (x_46_re <= 8.5e-161) {
tmp = Math.pow(x_46_im, y_46_re);
} else {
tmp = Math.pow(x_46_re, y_46_re);
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if x_46_re <= -0.59: tmp = math.pow(-x_46_re, y_46_re) elif x_46_re <= 8.5e-161: tmp = math.pow(x_46_im, y_46_re) else: tmp = math.pow(x_46_re, y_46_re) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if (x_46_re <= -0.59) tmp = Float64(-x_46_re) ^ y_46_re; elseif (x_46_re <= 8.5e-161) tmp = x_46_im ^ y_46_re; else tmp = 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) tmp = 0.0; if (x_46_re <= -0.59) tmp = -x_46_re ^ y_46_re; elseif (x_46_re <= 8.5e-161) tmp = x_46_im ^ y_46_re; else tmp = x_46_re ^ y_46_re; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[x$46$re, -0.59], N[Power[(-x$46$re), y$46$re], $MachinePrecision], If[LessEqual[x$46$re, 8.5e-161], N[Power[x$46$im, y$46$re], $MachinePrecision], N[Power[x$46$re, y$46$re], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x.re \leq -0.59:\\
\;\;\;\;{\left(-x.re\right)}^{y.re}\\
\mathbf{elif}\;x.re \leq 8.5 \cdot 10^{-161}:\\
\;\;\;\;{x.im}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;{x.re}^{y.re}\\
\end{array}
\end{array}
if x.re < -0.589999999999999969Initial program 28.3%
cancel-sign-sub-inv28.3%
fma-define28.3%
hypot-define28.3%
distribute-lft-neg-in28.3%
distribute-rgt-neg-out28.3%
fma-define28.3%
hypot-define81.7%
*-commutative81.7%
Simplified81.7%
Taylor expanded in y.im around 0 44.3%
unpow244.3%
unpow244.3%
hypot-undefine55.7%
Simplified55.7%
Taylor expanded in y.re around 0 54.0%
Taylor expanded in x.re around -inf 54.0%
mul-1-neg54.0%
Simplified54.0%
if -0.589999999999999969 < x.re < 8.50000000000000054e-161Initial program 52.7%
cancel-sign-sub-inv52.7%
fma-define52.7%
hypot-define52.7%
distribute-lft-neg-in52.7%
distribute-rgt-neg-out52.7%
fma-define53.8%
hypot-define80.2%
*-commutative80.2%
Simplified80.2%
Taylor expanded in y.im around 0 50.3%
unpow250.3%
unpow250.3%
hypot-undefine53.6%
Simplified53.6%
Taylor expanded in y.re around 0 56.9%
Taylor expanded in x.re around 0 51.1%
if 8.50000000000000054e-161 < x.re Initial program 40.4%
cancel-sign-sub-inv40.4%
fma-define40.4%
hypot-define40.4%
distribute-lft-neg-in40.4%
distribute-rgt-neg-out40.4%
fma-define40.4%
hypot-define78.4%
*-commutative78.4%
Simplified78.4%
Taylor expanded in y.im around 0 57.1%
unpow257.1%
unpow257.1%
hypot-undefine65.9%
Simplified65.9%
Taylor expanded in y.re around 0 68.8%
Taylor expanded in x.im around 0 65.5%
Final simplification57.7%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (<= x.im -1.75e-51) (pow (- x.im) y.re) (if (<= x.im 1.25e-8) (pow x.re y.re) (pow 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 (x_46_im <= -1.75e-51) {
tmp = pow(-x_46_im, y_46_re);
} else if (x_46_im <= 1.25e-8) {
tmp = pow(x_46_re, y_46_re);
} else {
tmp = 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) :: tmp
if (x_46im <= (-1.75d-51)) then
tmp = -x_46im ** y_46re
else if (x_46im <= 1.25d-8) then
tmp = x_46re ** y_46re
else
tmp = 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 tmp;
if (x_46_im <= -1.75e-51) {
tmp = Math.pow(-x_46_im, y_46_re);
} else if (x_46_im <= 1.25e-8) {
tmp = Math.pow(x_46_re, y_46_re);
} else {
tmp = Math.pow(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 x_46_im <= -1.75e-51: tmp = math.pow(-x_46_im, y_46_re) elif x_46_im <= 1.25e-8: tmp = math.pow(x_46_re, y_46_re) else: tmp = math.pow(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 (x_46_im <= -1.75e-51) tmp = Float64(-x_46_im) ^ y_46_re; elseif (x_46_im <= 1.25e-8) tmp = x_46_re ^ y_46_re; else tmp = 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 (x_46_im <= -1.75e-51) tmp = -x_46_im ^ y_46_re; elseif (x_46_im <= 1.25e-8) tmp = x_46_re ^ y_46_re; else tmp = 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[LessEqual[x$46$im, -1.75e-51], N[Power[(-x$46$im), y$46$re], $MachinePrecision], If[LessEqual[x$46$im, 1.25e-8], N[Power[x$46$re, y$46$re], $MachinePrecision], N[Power[x$46$im, y$46$re], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x.im \leq -1.75 \cdot 10^{-51}:\\
\;\;\;\;{\left(-x.im\right)}^{y.re}\\
\mathbf{elif}\;x.im \leq 1.25 \cdot 10^{-8}:\\
\;\;\;\;{x.re}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;{x.im}^{y.re}\\
\end{array}
\end{array}
if x.im < -1.7499999999999999e-51Initial program 35.8%
cancel-sign-sub-inv35.8%
fma-define35.8%
hypot-define35.8%
distribute-lft-neg-in35.8%
distribute-rgt-neg-out35.8%
fma-define35.8%
hypot-define79.2%
*-commutative79.2%
Simplified79.2%
Taylor expanded in y.im around 0 46.6%
unpow246.6%
unpow246.6%
hypot-undefine52.9%
Simplified52.9%
Taylor expanded in y.re around 0 56.6%
Taylor expanded in x.im around -inf 55.4%
mul-1-neg55.4%
Simplified55.4%
if -1.7499999999999999e-51 < x.im < 1.2499999999999999e-8Initial program 53.6%
cancel-sign-sub-inv53.6%
fma-define53.6%
hypot-define53.6%
distribute-lft-neg-in53.6%
distribute-rgt-neg-out53.6%
fma-define53.6%
hypot-define82.4%
*-commutative82.4%
Simplified82.4%
Taylor expanded in y.im around 0 63.4%
unpow263.4%
unpow263.4%
hypot-undefine67.7%
Simplified67.7%
Taylor expanded in y.re around 0 65.7%
Taylor expanded in x.im around 0 56.1%
if 1.2499999999999999e-8 < x.im Initial program 34.2%
cancel-sign-sub-inv34.2%
fma-define34.2%
hypot-define34.2%
distribute-lft-neg-in34.2%
distribute-rgt-neg-out34.2%
fma-define35.5%
hypot-define77.2%
*-commutative77.2%
Simplified77.2%
Taylor expanded in y.im around 0 42.8%
unpow242.8%
unpow242.8%
hypot-undefine55.1%
Simplified55.1%
Taylor expanded in y.re around 0 60.2%
Taylor expanded in x.re around 0 61.4%
Final simplification57.5%
(FPCore (x.re x.im y.re y.im) :precision binary64 1.0)
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return 1.0;
}
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 = 1.0d0
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return 1.0;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): return 1.0
function code(x_46_re, x_46_im, y_46_re, y_46_im) return 1.0 end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 1.0; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := 1.0
\begin{array}{l}
\\
1
\end{array}
Initial program 42.0%
cancel-sign-sub-inv42.0%
fma-define42.0%
hypot-define42.0%
distribute-lft-neg-in42.0%
distribute-rgt-neg-out42.0%
fma-define42.4%
hypot-define79.8%
*-commutative79.8%
Simplified79.8%
Taylor expanded in y.im around 0 51.7%
unpow251.7%
unpow251.7%
hypot-undefine59.1%
Simplified59.1%
Taylor expanded in y.re around 0 61.1%
Taylor expanded in y.re around 0 22.7%
herbie shell --seed 2024110
(FPCore (x.re x.im y.re y.im)
:name "powComplex, real part"
:precision binary64
(* (exp (- (* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.re) (* (atan2 x.im x.re) y.im))) (cos (+ (* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.im) (* (atan2 x.im x.re) y.re)))))