
(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 19 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 (* y.re (atan2 x.im x.re))) (t_1 (log (hypot x.re x.im))))
(if (<= y.re 2050000000000.0)
(*
(exp (fma t_1 y.re (* (atan2 x.im x.re) (- y.im))))
(cos (fma t_1 y.im t_0)))
(*
(exp
(-
(* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(* (atan2 x.im x.re) y.im)))
(fabs (cos (fma y.im (log (hypot x.im x.re)) t_0)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = log(hypot(x_46_re, x_46_im));
double tmp;
if (y_46_re <= 2050000000000.0) {
tmp = exp(fma(t_1, y_46_re, (atan2(x_46_im, x_46_re) * -y_46_im))) * cos(fma(t_1, y_46_im, t_0));
} 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))) * fabs(cos(fma(y_46_im, log(hypot(x_46_im, x_46_re)), t_0)));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_1 = log(hypot(x_46_re, x_46_im)) tmp = 0.0 if (y_46_re <= 2050000000000.0) tmp = Float64(exp(fma(t_1, y_46_re, Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))) * cos(fma(t_1, y_46_im, t_0))); 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))) * abs(cos(fma(y_46_im, log(hypot(x_46_im, x_46_re)), t_0)))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, 2050000000000.0], N[(N[Exp[N[(t$95$1 * y$46$re + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Cos[N[(t$95$1 * y$46$im + t$95$0), $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[Abs[N[Cos[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision] + t$95$0), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
\mathbf{if}\;y.re \leq 2050000000000:\\
\;\;\;\;e^{\mathsf{fma}\left(t\_1, y.re, \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)\right)} \cdot \cos \left(\mathsf{fma}\left(t\_1, y.im, t\_0\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 \left|\cos \left(\mathsf{fma}\left(y.im, \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right), t\_0\right)\right)\right|\\
\end{array}
\end{array}
if y.re < 2.05e12Initial program 43.2%
cancel-sign-sub-inv43.2%
fma-define43.2%
hypot-define43.2%
distribute-lft-neg-in43.2%
distribute-rgt-neg-out43.2%
fma-define43.2%
hypot-define87.4%
*-commutative87.4%
Simplified87.4%
if 2.05e12 < y.re Initial program 34.9%
fma-define34.9%
hypot-define69.9%
*-commutative69.9%
add-sqr-sqrt50.8%
sqrt-unprod88.9%
pow288.9%
Applied egg-rr88.9%
unpow288.9%
rem-sqrt-square88.9%
fma-define88.9%
hypot-undefine41.3%
unpow241.3%
unpow241.3%
+-commutative41.3%
+-commutative41.3%
fma-define41.3%
Simplified88.9%
Final simplification87.7%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re))) (t_1 (log (hypot x.re x.im))))
(if (<= y.re 2.0)
(*
(exp (fma t_1 y.re (* (atan2 x.im x.re) (- y.im))))
(cos (fma t_1 y.im t_0)))
(*
(exp
(-
(* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(* (atan2 x.im x.re) y.im)))
(cos t_0)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = log(hypot(x_46_re, x_46_im));
double tmp;
if (y_46_re <= 2.0) {
tmp = exp(fma(t_1, y_46_re, (atan2(x_46_im, x_46_re) * -y_46_im))) * cos(fma(t_1, y_46_im, t_0));
} 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(t_0);
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_1 = log(hypot(x_46_re, x_46_im)) tmp = 0.0 if (y_46_re <= 2.0) tmp = Float64(exp(fma(t_1, y_46_re, Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))) * cos(fma(t_1, y_46_im, t_0))); 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(t_0)); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, 2.0], N[(N[Exp[N[(t$95$1 * y$46$re + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Cos[N[(t$95$1 * y$46$im + t$95$0), $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[t$95$0], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
\mathbf{if}\;y.re \leq 2:\\
\;\;\;\;e^{\mathsf{fma}\left(t\_1, y.re, \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)\right)} \cdot \cos \left(\mathsf{fma}\left(t\_1, y.im, t\_0\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 t\_0\\
\end{array}
\end{array}
if y.re < 2Initial program 43.1%
cancel-sign-sub-inv43.1%
fma-define43.1%
hypot-define43.1%
distribute-lft-neg-in43.1%
distribute-rgt-neg-out43.1%
fma-define43.1%
hypot-define87.2%
*-commutative87.2%
Simplified87.2%
if 2 < y.re Initial program 35.4%
Taylor expanded in y.im around 0 78.5%
Final simplification85.0%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (cos (* y.re (atan2 x.im x.re))))
(t_1 (* (atan2 x.im x.re) (- y.im))))
(if (<= y.re -1.4e-47)
(*
(exp (fma (log (hypot x.re x.im)) y.re t_1))
(cos
(*
y.re
(+ (atan2 x.im x.re) (* y.im (/ (log (hypot x.im x.re)) y.re))))))
(if (<= y.re 5.2e-11)
(* t_0 (exp t_1))
(*
(exp
(-
(* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(* (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 = cos((y_46_re * atan2(x_46_im, x_46_re)));
double t_1 = atan2(x_46_im, x_46_re) * -y_46_im;
double tmp;
if (y_46_re <= -1.4e-47) {
tmp = exp(fma(log(hypot(x_46_re, x_46_im)), y_46_re, t_1)) * cos((y_46_re * (atan2(x_46_im, x_46_re) + (y_46_im * (log(hypot(x_46_im, x_46_re)) / y_46_re)))));
} else if (y_46_re <= 5.2e-11) {
tmp = t_0 * exp(t_1);
} 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))) * t_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))) t_1 = Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)) tmp = 0.0 if (y_46_re <= -1.4e-47) tmp = Float64(exp(fma(log(hypot(x_46_re, x_46_im)), y_46_re, t_1)) * cos(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)))))); elseif (y_46_re <= 5.2e-11) tmp = Float64(t_0 * exp(t_1)); 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))) * t_0); end return 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]}, Block[{t$95$1 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]}, If[LessEqual[y$46$re, -1.4e-47], N[(N[Exp[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$re + t$95$1), $MachinePrecision]], $MachinePrecision] * N[Cos[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]), $MachinePrecision], If[LessEqual[y$46$re, 5.2e-11], N[(t$95$0 * N[Exp[t$95$1], $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] * t$95$0), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
t_1 := \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)\\
\mathbf{if}\;y.re \leq -1.4 \cdot 10^{-47}:\\
\;\;\;\;e^{\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.re, t\_1\right)} \cdot \cos \left(y.re \cdot \left(\tan^{-1}_* \frac{x.im}{x.re} + y.im \cdot \frac{\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)}{y.re}\right)\right)\\
\mathbf{elif}\;y.re \leq 5.2 \cdot 10^{-11}:\\
\;\;\;\;t\_0 \cdot e^{t\_1}\\
\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 t\_0\\
\end{array}
\end{array}
if y.re < -1.39999999999999996e-47Initial program 44.0%
cancel-sign-sub-inv44.0%
fma-define44.0%
hypot-define44.0%
distribute-lft-neg-in44.0%
distribute-rgt-neg-out44.0%
fma-define44.0%
hypot-define90.6%
*-commutative90.6%
Simplified90.6%
Taylor expanded in y.re around inf 45.3%
+-commutative45.3%
associate-/l*48.0%
unpow248.0%
unpow248.0%
hypot-undefine94.6%
Simplified94.6%
if -1.39999999999999996e-47 < y.re < 5.2000000000000001e-11Initial 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-define85.0%
*-commutative85.0%
Simplified85.0%
Taylor expanded in y.re around inf 33.1%
+-commutative33.1%
associate-/l*32.2%
unpow232.2%
unpow232.2%
hypot-undefine63.2%
Simplified63.2%
Taylor expanded in y.re around 0 63.2%
neg-mul-163.2%
distribute-rgt-neg-in63.2%
Simplified63.2%
Taylor expanded in y.im around 0 85.4%
if 5.2000000000000001e-11 < y.re Initial program 35.4%
Taylor expanded in y.im around 0 78.5%
Final simplification86.4%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re))))
(if (or (<= y.re -0.025) (not (<= y.re 8.2e-7)))
(*
(exp
(-
(* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(* (atan2 x.im x.re) y.im)))
(cos t_0))
(*
(cos (fma (log (hypot x.re x.im)) y.im t_0))
(expm1 (log1p (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 t_0 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if ((y_46_re <= -0.025) || !(y_46_re <= 8.2e-7)) {
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(t_0);
} else {
tmp = cos(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_0)) * expm1(log1p(exp((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 = Float64(y_46_re * atan(x_46_im, x_46_re)) tmp = 0.0 if ((y_46_re <= -0.025) || !(y_46_re <= 8.2e-7)) 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(t_0)); else tmp = Float64(cos(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_0)) * expm1(log1p(exp(Float64(atan(x_46_im, x_46_re) * Float64(-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[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[y$46$re, -0.025], N[Not[LessEqual[y$46$re, 8.2e-7]], $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[t$95$0], $MachinePrecision]), $MachinePrecision], N[(N[Cos[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im + t$95$0), $MachinePrecision]], $MachinePrecision] * N[(Exp[N[Log[1 + N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]] - 1), $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 -0.025 \lor \neg \left(y.re \leq 8.2 \cdot 10^{-7}\right):\\
\;\;\;\;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 t\_0\\
\mathbf{else}:\\
\;\;\;\;\cos \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, t\_0\right)\right) \cdot \mathsf{expm1}\left(\mathsf{log1p}\left(e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\right)\right)\\
\end{array}
\end{array}
if y.re < -0.025000000000000001 or 8.1999999999999998e-7 < y.re Initial program 40.2%
Taylor expanded in y.im around 0 83.4%
if -0.025000000000000001 < y.re < 8.1999999999999998e-7Initial program 42.2%
exp-diff42.2%
exp-to-pow42.2%
hypot-define42.2%
*-commutative42.2%
exp-prod42.0%
fma-define42.0%
hypot-define84.7%
*-commutative84.7%
Simplified84.7%
add-log-exp84.7%
Applied egg-rr84.7%
expm1-log1p-u84.8%
expm1-undefine84.7%
rem-log-exp84.7%
Applied egg-rr84.7%
expm1-define84.8%
hypot-undefine51.8%
unpow251.8%
unpow251.8%
+-commutative51.8%
unpow251.8%
unpow251.8%
hypot-undefine84.8%
exp-prod85.2%
*-commutative85.2%
rem-log-exp82.8%
exp-to-pow82.8%
Simplified82.8%
Taylor expanded in y.re around 0 84.7%
log1p-define84.7%
rec-exp84.7%
distribute-rgt-neg-in84.7%
Simplified84.7%
Final simplification84.0%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re))))
(if (or (<= y.re -2.75e-8) (not (<= y.re 0.00015)))
(*
(exp
(-
(* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(* (atan2 x.im x.re) y.im)))
(cos t_0))
(*
(cos (fma (log (hypot x.re x.im)) y.im t_0))
(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 t_0 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if ((y_46_re <= -2.75e-8) || !(y_46_re <= 0.00015)) {
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(t_0);
} else {
tmp = cos(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_0)) * exp((atan2(x_46_im, x_46_re) * -y_46_im));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) tmp = 0.0 if ((y_46_re <= -2.75e-8) || !(y_46_re <= 0.00015)) 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(t_0)); else tmp = Float64(cos(fma(log(hypot(x_46_re, x_46_im)), y_46_im, t_0)) * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))); 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, -2.75e-8], N[Not[LessEqual[y$46$re, 0.00015]], $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[t$95$0], $MachinePrecision]), $MachinePrecision], N[(N[Cos[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im + t$95$0), $MachinePrecision]], $MachinePrecision] * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.re \leq -2.75 \cdot 10^{-8} \lor \neg \left(y.re \leq 0.00015\right):\\
\;\;\;\;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 t\_0\\
\mathbf{else}:\\
\;\;\;\;\cos \left(\mathsf{fma}\left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right), y.im, t\_0\right)\right) \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\
\end{array}
\end{array}
if y.re < -2.7500000000000001e-8 or 1.49999999999999987e-4 < y.re Initial program 40.2%
Taylor expanded in y.im around 0 83.4%
if -2.7500000000000001e-8 < y.re < 1.49999999999999987e-4Initial program 42.2%
cancel-sign-sub-inv42.2%
fma-define42.2%
hypot-define42.2%
distribute-lft-neg-in42.2%
distribute-rgt-neg-out42.2%
fma-define42.2%
hypot-define85.2%
*-commutative85.2%
Simplified85.2%
Taylor expanded in y.re around 0 84.7%
neg-mul-184.7%
distribute-rgt-neg-in84.7%
Simplified84.7%
Final simplification84.0%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (or (<= y.re -300.0) (not (<= y.re 1e-5)))
(*
(exp
(-
(* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(* (atan2 x.im x.re) y.im)))
(cos (* y.re (atan2 x.im x.re))))
(*
(exp (* (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 tmp;
if ((y_46_re <= -300.0) || !(y_46_re <= 1e-5)) {
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_re * atan2(x_46_im, x_46_re)));
} else {
tmp = exp((atan2(x_46_im, x_46_re) * -y_46_im)) * cos((y_46_im * log(hypot(x_46_im, x_46_re))));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_re <= -300.0) || !(y_46_re <= 1e-5)) {
tmp = Math.exp(((y_46_re * Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (Math.atan2(x_46_im, x_46_re) * y_46_im))) * Math.cos((y_46_re * Math.atan2(x_46_im, x_46_re)));
} else {
tmp = Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im)) * Math.cos((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re))));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if (y_46_re <= -300.0) or not (y_46_re <= 1e-5): tmp = math.exp(((y_46_re * math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (math.atan2(x_46_im, x_46_re) * y_46_im))) * math.cos((y_46_re * math.atan2(x_46_im, x_46_re))) else: tmp = math.exp((math.atan2(x_46_im, x_46_re) * -y_46_im)) * math.cos((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if ((y_46_re <= -300.0) || !(y_46_re <= 1e-5)) 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_re * atan(x_46_im, x_46_re)))); else tmp = Float64(exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))) * cos(Float64(y_46_im * log(hypot(x_46_im, x_46_re))))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if ((y_46_re <= -300.0) || ~((y_46_re <= 1e-5))) 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_re * atan2(x_46_im, x_46_re))); else tmp = exp((atan2(x_46_im, x_46_re) * -y_46_im)) * cos((y_46_im * log(hypot(x_46_im, x_46_re)))); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[Or[LessEqual[y$46$re, -300.0], N[Not[LessEqual[y$46$re, 1e-5]], $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$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision] * N[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}
\mathbf{if}\;y.re \leq -300 \lor \neg \left(y.re \leq 10^{-5}\right):\\
\;\;\;\;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.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{else}:\\
\;\;\;\;e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)} \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 < -300 or 1.00000000000000008e-5 < y.re Initial program 40.5%
Taylor expanded in y.im around 0 83.3%
if -300 < y.re < 1.00000000000000008e-5Initial 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-define84.5%
*-commutative84.5%
Simplified84.5%
Taylor expanded in y.re around 0 42.7%
*-commutative42.7%
unpow242.7%
unpow242.7%
hypot-undefine84.8%
neg-mul-184.8%
distribute-rgt-neg-in84.8%
Simplified84.8%
Final simplification84.0%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (pow (hypot x.im x.re) y.re)))
(if (<= y.re -3.1e+27)
(* (cos (* y.re (atan2 x.im x.re))) t_0)
(if (<= y.re 8.5)
(*
(exp (* (atan2 x.im x.re) (- y.im)))
(cos (* y.im (log (hypot x.im x.re)))))
(* t_0 (cos (* y.re (log1p (expm1 (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_im, x_46_re), y_46_re);
double tmp;
if (y_46_re <= -3.1e+27) {
tmp = cos((y_46_re * atan2(x_46_im, x_46_re))) * t_0;
} else if (y_46_re <= 8.5) {
tmp = exp((atan2(x_46_im, x_46_re) * -y_46_im)) * cos((y_46_im * log(hypot(x_46_im, x_46_re))));
} else {
tmp = t_0 * cos((y_46_re * log1p(expm1(atan2(x_46_im, x_46_re)))));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
double tmp;
if (y_46_re <= -3.1e+27) {
tmp = Math.cos((y_46_re * Math.atan2(x_46_im, x_46_re))) * t_0;
} else if (y_46_re <= 8.5) {
tmp = Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im)) * Math.cos((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re))));
} else {
tmp = t_0 * Math.cos((y_46_re * Math.log1p(Math.expm1(Math.atan2(x_46_im, x_46_re)))));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.pow(math.hypot(x_46_im, x_46_re), y_46_re) tmp = 0 if y_46_re <= -3.1e+27: tmp = math.cos((y_46_re * math.atan2(x_46_im, x_46_re))) * t_0 elif y_46_re <= 8.5: tmp = math.exp((math.atan2(x_46_im, x_46_re) * -y_46_im)) * math.cos((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) else: tmp = t_0 * math.cos((y_46_re * math.log1p(math.expm1(math.atan2(x_46_im, x_46_re))))) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = hypot(x_46_im, x_46_re) ^ y_46_re tmp = 0.0 if (y_46_re <= -3.1e+27) tmp = Float64(cos(Float64(y_46_re * atan(x_46_im, x_46_re))) * t_0); elseif (y_46_re <= 8.5) tmp = Float64(exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))) * cos(Float64(y_46_im * log(hypot(x_46_im, x_46_re))))); else tmp = Float64(t_0 * cos(Float64(y_46_re * log1p(expm1(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$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, If[LessEqual[y$46$re, -3.1e+27], 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, 8.5], N[(N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $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], N[(t$95$0 * N[Cos[N[(y$46$re * N[Log[1 + N[(Exp[N[ArcTan[x$46$im / x$46$re], $MachinePrecision]] - 1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{if}\;y.re \leq -3.1 \cdot 10^{+27}:\\
\;\;\;\;\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot t\_0\\
\mathbf{elif}\;y.re \leq 8.5:\\
\;\;\;\;e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)} \cdot \cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot \cos \left(y.re \cdot \mathsf{log1p}\left(\mathsf{expm1}\left(\tan^{-1}_* \frac{x.im}{x.re}\right)\right)\right)\\
\end{array}
\end{array}
if y.re < -3.09999999999999996e27Initial 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-define91.8%
*-commutative91.8%
Simplified91.8%
Taylor expanded in y.im around 0 85.4%
unpow285.4%
unpow285.4%
hypot-undefine85.4%
Simplified85.4%
if -3.09999999999999996e27 < y.re < 8.5Initial program 43.8%
cancel-sign-sub-inv43.8%
fma-define43.8%
hypot-define43.8%
distribute-lft-neg-in43.8%
distribute-rgt-neg-out43.8%
fma-define43.8%
hypot-define85.2%
*-commutative85.2%
Simplified85.2%
Taylor expanded in y.re around 0 43.1%
*-commutative43.1%
unpow243.1%
unpow243.1%
hypot-undefine84.0%
neg-mul-184.0%
distribute-rgt-neg-in84.0%
Simplified84.0%
if 8.5 < y.re Initial program 34.4%
cancel-sign-sub-inv34.4%
fma-define34.4%
hypot-define34.4%
distribute-lft-neg-in34.4%
distribute-rgt-neg-out34.4%
fma-define34.4%
hypot-define70.3%
*-commutative70.3%
Simplified70.3%
Taylor expanded in y.im around 0 68.9%
unpow268.9%
unpow268.9%
hypot-undefine68.9%
Simplified68.9%
log1p-expm1-u70.5%
Applied egg-rr70.5%
Final simplification81.0%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (or (<= y.re -3.1e+27) (not (<= y.re 6.8)))
(* (cos (* y.re (atan2 x.im x.re))) (pow (hypot x.im x.re) y.re))
(*
(exp (* (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 tmp;
if ((y_46_re <= -3.1e+27) || !(y_46_re <= 6.8)) {
tmp = cos((y_46_re * atan2(x_46_im, x_46_re))) * pow(hypot(x_46_im, x_46_re), y_46_re);
} else {
tmp = exp((atan2(x_46_im, x_46_re) * -y_46_im)) * cos((y_46_im * log(hypot(x_46_im, x_46_re))));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_re <= -3.1e+27) || !(y_46_re <= 6.8)) {
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 {
tmp = Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im)) * Math.cos((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re))));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if (y_46_re <= -3.1e+27) or not (y_46_re <= 6.8): 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: tmp = math.exp((math.atan2(x_46_im, x_46_re) * -y_46_im)) * math.cos((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if ((y_46_re <= -3.1e+27) || !(y_46_re <= 6.8)) tmp = Float64(cos(Float64(y_46_re * atan(x_46_im, x_46_re))) * (hypot(x_46_im, x_46_re) ^ y_46_re)); else tmp = Float64(exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))) * cos(Float64(y_46_im * log(hypot(x_46_im, x_46_re))))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if ((y_46_re <= -3.1e+27) || ~((y_46_re <= 6.8))) tmp = cos((y_46_re * atan2(x_46_im, x_46_re))) * (hypot(x_46_im, x_46_re) ^ y_46_re); else tmp = exp((atan2(x_46_im, x_46_re) * -y_46_im)) * cos((y_46_im * log(hypot(x_46_im, x_46_re)))); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[Or[LessEqual[y$46$re, -3.1e+27], N[Not[LessEqual[y$46$re, 6.8]], $MachinePrecision]], 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], N[(N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $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}
\mathbf{if}\;y.re \leq -3.1 \cdot 10^{+27} \lor \neg \left(y.re \leq 6.8\right):\\
\;\;\;\;\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{else}:\\
\;\;\;\;e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)} \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 < -3.09999999999999996e27 or 6.79999999999999982 < y.re Initial program 38.4%
cancel-sign-sub-inv38.4%
fma-define38.4%
hypot-define38.4%
distribute-lft-neg-in38.4%
distribute-rgt-neg-out38.4%
fma-define38.4%
hypot-define80.8%
*-commutative80.8%
Simplified80.8%
Taylor expanded in y.im around 0 77.0%
unpow277.0%
unpow277.0%
hypot-undefine77.0%
Simplified77.0%
if -3.09999999999999996e27 < y.re < 6.79999999999999982Initial program 43.8%
cancel-sign-sub-inv43.8%
fma-define43.8%
hypot-define43.8%
distribute-lft-neg-in43.8%
distribute-rgt-neg-out43.8%
fma-define43.8%
hypot-define85.2%
*-commutative85.2%
Simplified85.2%
Taylor expanded in y.re around 0 43.1%
*-commutative43.1%
unpow243.1%
unpow243.1%
hypot-undefine84.0%
neg-mul-184.0%
distribute-rgt-neg-in84.0%
Simplified84.0%
Final simplification80.6%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (cos (* y.re (atan2 x.im x.re)))))
(if (or (<= y.re -3.1e+27) (not (<= y.re 6.8)))
(* t_0 (pow (hypot x.im x.re) y.re))
(* t_0 (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 t_0 = cos((y_46_re * atan2(x_46_im, x_46_re)));
double tmp;
if ((y_46_re <= -3.1e+27) || !(y_46_re <= 6.8)) {
tmp = t_0 * pow(hypot(x_46_im, x_46_re), y_46_re);
} else {
tmp = t_0 * 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 t_0 = Math.cos((y_46_re * Math.atan2(x_46_im, x_46_re)));
double tmp;
if ((y_46_re <= -3.1e+27) || !(y_46_re <= 6.8)) {
tmp = t_0 * Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
} else {
tmp = t_0 * 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): t_0 = math.cos((y_46_re * math.atan2(x_46_im, x_46_re))) tmp = 0 if (y_46_re <= -3.1e+27) or not (y_46_re <= 6.8): tmp = t_0 * math.pow(math.hypot(x_46_im, x_46_re), y_46_re) else: tmp = t_0 * 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) t_0 = cos(Float64(y_46_re * atan(x_46_im, x_46_re))) tmp = 0.0 if ((y_46_re <= -3.1e+27) || !(y_46_re <= 6.8)) tmp = Float64(t_0 * (hypot(x_46_im, x_46_re) ^ y_46_re)); else tmp = Float64(t_0 * 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) t_0 = cos((y_46_re * atan2(x_46_im, x_46_re))); tmp = 0.0; if ((y_46_re <= -3.1e+27) || ~((y_46_re <= 6.8))) tmp = t_0 * (hypot(x_46_im, x_46_re) ^ y_46_re); else tmp = t_0 * 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_] := Block[{t$95$0 = N[Cos[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[Or[LessEqual[y$46$re, -3.1e+27], N[Not[LessEqual[y$46$re, 6.8]], $MachinePrecision]], N[(t$95$0 * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $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 -3.1 \cdot 10^{+27} \lor \neg \left(y.re \leq 6.8\right):\\
\;\;\;\;t\_0 \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\
\end{array}
\end{array}
if y.re < -3.09999999999999996e27 or 6.79999999999999982 < y.re Initial program 38.4%
cancel-sign-sub-inv38.4%
fma-define38.4%
hypot-define38.4%
distribute-lft-neg-in38.4%
distribute-rgt-neg-out38.4%
fma-define38.4%
hypot-define80.8%
*-commutative80.8%
Simplified80.8%
Taylor expanded in y.im around 0 77.0%
unpow277.0%
unpow277.0%
hypot-undefine77.0%
Simplified77.0%
if -3.09999999999999996e27 < y.re < 6.79999999999999982Initial program 43.8%
cancel-sign-sub-inv43.8%
fma-define43.8%
hypot-define43.8%
distribute-lft-neg-in43.8%
distribute-rgt-neg-out43.8%
fma-define43.8%
hypot-define85.2%
*-commutative85.2%
Simplified85.2%
Taylor expanded in y.re around inf 36.2%
+-commutative36.2%
associate-/l*36.1%
unpow236.1%
unpow236.1%
hypot-undefine67.4%
Simplified67.4%
Taylor expanded in y.re around 0 65.5%
neg-mul-165.5%
distribute-rgt-neg-in65.5%
Simplified65.5%
Taylor expanded in y.im around 0 83.9%
Final simplification80.5%
(FPCore (x.re x.im y.re y.im) :precision binary64 (* (cos (* y.re (atan2 x.im x.re))) (pow (hypot x.im x.re) y.re)))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return cos((y_46_re * atan2(x_46_im, x_46_re))) * pow(hypot(x_46_im, x_46_re), y_46_re);
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return Math.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);
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): return 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)
function code(x_46_re, x_46_im, y_46_re, y_46_im) return Float64(cos(Float64(y_46_re * atan(x_46_im, x_46_re))) * (hypot(x_46_im, x_46_re) ^ y_46_re)) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = cos((y_46_re * atan2(x_46_im, x_46_re))) * (hypot(x_46_im, x_46_re) ^ y_46_re); end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[(N[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]
\begin{array}{l}
\\
\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}
\end{array}
Initial 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-define83.0%
*-commutative83.0%
Simplified83.0%
Taylor expanded in y.im around 0 56.3%
unpow256.3%
unpow256.3%
hypot-undefine64.5%
Simplified64.5%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (<= y.re -3.1e+27) (* (cos (* y.re (atan2 x.im x.re))) (pow x.re y.re)) (+ 1.0 (* 2.0 (log (pow (hypot x.im x.re) (/ 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 <= -3.1e+27) {
tmp = cos((y_46_re * atan2(x_46_im, x_46_re))) * pow(x_46_re, y_46_re);
} else {
tmp = 1.0 + (2.0 * log(pow(hypot(x_46_im, x_46_re), (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 <= -3.1e+27) {
tmp = Math.cos((y_46_re * Math.atan2(x_46_im, x_46_re))) * Math.pow(x_46_re, y_46_re);
} else {
tmp = 1.0 + (2.0 * Math.log(Math.pow(Math.hypot(x_46_im, x_46_re), (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 <= -3.1e+27: tmp = math.cos((y_46_re * math.atan2(x_46_im, x_46_re))) * math.pow(x_46_re, y_46_re) else: tmp = 1.0 + (2.0 * math.log(math.pow(math.hypot(x_46_im, x_46_re), (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 <= -3.1e+27) tmp = Float64(cos(Float64(y_46_re * atan(x_46_im, x_46_re))) * (x_46_re ^ y_46_re)); else tmp = Float64(1.0 + Float64(2.0 * log((hypot(x_46_im, x_46_re) ^ 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 <= -3.1e+27) tmp = cos((y_46_re * atan2(x_46_im, x_46_re))) * (x_46_re ^ y_46_re); else tmp = 1.0 + (2.0 * log((hypot(x_46_im, x_46_re) ^ (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, -3.1e+27], N[(N[Cos[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[(1.0 + N[(2.0 * N[Log[N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], N[(y$46$re / 2.0), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq -3.1 \cdot 10^{+27}:\\
\;\;\;\;\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {x.re}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;1 + 2 \cdot \log \left({\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{\left(\frac{y.re}{2}\right)}\right)\\
\end{array}
\end{array}
if y.re < -3.09999999999999996e27Initial 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-define91.8%
*-commutative91.8%
Simplified91.8%
Taylor expanded in y.im around 0 85.4%
unpow285.4%
unpow285.4%
hypot-undefine85.4%
Simplified85.4%
Taylor expanded in x.im around 0 69.2%
if -3.09999999999999996e27 < y.re Initial program 40.7%
cancel-sign-sub-inv40.7%
fma-define40.7%
hypot-define40.7%
distribute-lft-neg-in40.7%
distribute-rgt-neg-out40.7%
fma-define40.7%
hypot-define80.3%
*-commutative80.3%
Simplified80.3%
Taylor expanded in y.im around 0 47.2%
unpow247.2%
unpow247.2%
hypot-undefine57.9%
Simplified57.9%
Taylor expanded in y.re around 0 35.2%
unpow235.2%
unpow235.2%
hypot-undefine35.0%
Simplified35.0%
log-pow53.3%
sqr-pow53.3%
log-prod53.3%
Applied egg-rr53.3%
count-253.3%
Simplified53.3%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (<= y.re -3.1e+27) (* (cos (* y.re (atan2 x.im x.re))) (pow x.re y.re)) (+ 1.0 (log (pow (hypot x.im x.re) y.re)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_re <= -3.1e+27) {
tmp = cos((y_46_re * atan2(x_46_im, x_46_re))) * pow(x_46_re, y_46_re);
} else {
tmp = 1.0 + log(pow(hypot(x_46_im, x_46_re), y_46_re));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_re <= -3.1e+27) {
tmp = Math.cos((y_46_re * Math.atan2(x_46_im, x_46_re))) * Math.pow(x_46_re, y_46_re);
} else {
tmp = 1.0 + Math.log(Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if y_46_re <= -3.1e+27: tmp = math.cos((y_46_re * math.atan2(x_46_im, x_46_re))) * math.pow(x_46_re, y_46_re) else: tmp = 1.0 + math.log(math.pow(math.hypot(x_46_im, x_46_re), y_46_re)) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if (y_46_re <= -3.1e+27) tmp = Float64(cos(Float64(y_46_re * atan(x_46_im, x_46_re))) * (x_46_re ^ y_46_re)); else tmp = Float64(1.0 + log((hypot(x_46_im, x_46_re) ^ y_46_re))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if (y_46_re <= -3.1e+27) tmp = cos((y_46_re * atan2(x_46_im, x_46_re))) * (x_46_re ^ y_46_re); else tmp = 1.0 + log((hypot(x_46_im, x_46_re) ^ y_46_re)); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[y$46$re, -3.1e+27], N[(N[Cos[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[(1.0 + N[Log[N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq -3.1 \cdot 10^{+27}:\\
\;\;\;\;\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {x.re}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;1 + \log \left({\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\right)\\
\end{array}
\end{array}
if y.re < -3.09999999999999996e27Initial 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-define91.8%
*-commutative91.8%
Simplified91.8%
Taylor expanded in y.im around 0 85.4%
unpow285.4%
unpow285.4%
hypot-undefine85.4%
Simplified85.4%
Taylor expanded in x.im around 0 69.2%
if -3.09999999999999996e27 < y.re Initial program 40.7%
cancel-sign-sub-inv40.7%
fma-define40.7%
hypot-define40.7%
distribute-lft-neg-in40.7%
distribute-rgt-neg-out40.7%
fma-define40.7%
hypot-define80.3%
*-commutative80.3%
Simplified80.3%
Taylor expanded in y.im around 0 47.2%
unpow247.2%
unpow247.2%
hypot-undefine57.9%
Simplified57.9%
Taylor expanded in y.re around 0 35.2%
unpow235.2%
unpow235.2%
hypot-undefine35.0%
Simplified35.0%
log-pow53.3%
Applied egg-rr53.3%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (<= y.re -15500000000000.0) (* (cos (* y.re (atan2 x.im x.re))) (pow x.im y.re)) (+ 1.0 (log (pow (hypot x.im x.re) y.re)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_re <= -15500000000000.0) {
tmp = cos((y_46_re * atan2(x_46_im, x_46_re))) * pow(x_46_im, y_46_re);
} else {
tmp = 1.0 + log(pow(hypot(x_46_im, x_46_re), y_46_re));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_re <= -15500000000000.0) {
tmp = Math.cos((y_46_re * Math.atan2(x_46_im, x_46_re))) * Math.pow(x_46_im, y_46_re);
} else {
tmp = 1.0 + Math.log(Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if y_46_re <= -15500000000000.0: tmp = math.cos((y_46_re * math.atan2(x_46_im, x_46_re))) * math.pow(x_46_im, y_46_re) else: tmp = 1.0 + math.log(math.pow(math.hypot(x_46_im, x_46_re), y_46_re)) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if (y_46_re <= -15500000000000.0) tmp = Float64(cos(Float64(y_46_re * atan(x_46_im, x_46_re))) * (x_46_im ^ y_46_re)); else tmp = Float64(1.0 + log((hypot(x_46_im, x_46_re) ^ y_46_re))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if (y_46_re <= -15500000000000.0) tmp = cos((y_46_re * atan2(x_46_im, x_46_re))) * (x_46_im ^ y_46_re); else tmp = 1.0 + log((hypot(x_46_im, x_46_re) ^ y_46_re)); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[y$46$re, -15500000000000.0], N[(N[Cos[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Power[x$46$im, y$46$re], $MachinePrecision]), $MachinePrecision], N[(1.0 + N[Log[N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq -15500000000000:\\
\;\;\;\;\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot {x.im}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;1 + \log \left({\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\right)\\
\end{array}
\end{array}
if y.re < -1.55e13Initial program 44.4%
cancel-sign-sub-inv44.4%
fma-define44.4%
hypot-define44.4%
distribute-lft-neg-in44.4%
distribute-rgt-neg-out44.4%
fma-define44.4%
hypot-define92.1%
*-commutative92.1%
Simplified92.1%
Taylor expanded in y.im around 0 84.3%
unpow284.3%
unpow284.3%
hypot-undefine84.3%
Simplified84.3%
Taylor expanded in x.re around 0 64.0%
if -1.55e13 < y.re Initial program 40.1%
cancel-sign-sub-inv40.1%
fma-define40.1%
hypot-define40.1%
distribute-lft-neg-in40.1%
distribute-rgt-neg-out40.1%
fma-define40.1%
hypot-define80.1%
*-commutative80.1%
Simplified80.1%
Taylor expanded in y.im around 0 47.1%
unpow247.1%
unpow247.1%
hypot-undefine58.0%
Simplified58.0%
Taylor expanded in y.re around 0 35.5%
unpow235.5%
unpow235.5%
hypot-undefine35.3%
Simplified35.3%
log-pow53.9%
Applied egg-rr53.9%
(FPCore (x.re x.im y.re y.im) :precision binary64 (+ 1.0 (log (pow (hypot x.im x.re) y.re))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return 1.0 + log(pow(hypot(x_46_im, x_46_re), y_46_re));
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return 1.0 + Math.log(Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re));
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): return 1.0 + math.log(math.pow(math.hypot(x_46_im, x_46_re), y_46_re))
function code(x_46_re, x_46_im, y_46_re, y_46_im) return Float64(1.0 + log((hypot(x_46_im, x_46_re) ^ y_46_re))) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 1.0 + log((hypot(x_46_im, x_46_re) ^ y_46_re)); end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[(1.0 + N[Log[N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
1 + \log \left({\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\right)
\end{array}
Initial 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-define83.0%
*-commutative83.0%
Simplified83.0%
Taylor expanded in y.im around 0 56.3%
unpow256.3%
unpow256.3%
hypot-undefine64.5%
Simplified64.5%
Taylor expanded in y.re around 0 29.6%
unpow229.6%
unpow229.6%
hypot-undefine27.3%
Simplified27.3%
log-pow46.0%
Applied egg-rr46.0%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (<= y.re -4.9e+27)
(+ 1.0 (* y.re (log1p (+ (hypot x.im x.re) -1.0))))
(if (<= y.re 7e+32)
(+ 1.0 (* y.re (log (hypot x.im x.re))))
(+ 1.0 (* y.re (log (+ x.re (* 0.5 (/ (pow x.im 2.0) x.re)))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_re <= -4.9e+27) {
tmp = 1.0 + (y_46_re * log1p((hypot(x_46_im, x_46_re) + -1.0)));
} else if (y_46_re <= 7e+32) {
tmp = 1.0 + (y_46_re * log(hypot(x_46_im, x_46_re)));
} else {
tmp = 1.0 + (y_46_re * log((x_46_re + (0.5 * (pow(x_46_im, 2.0) / x_46_re)))));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_re <= -4.9e+27) {
tmp = 1.0 + (y_46_re * Math.log1p((Math.hypot(x_46_im, x_46_re) + -1.0)));
} else if (y_46_re <= 7e+32) {
tmp = 1.0 + (y_46_re * Math.log(Math.hypot(x_46_im, x_46_re)));
} else {
tmp = 1.0 + (y_46_re * Math.log((x_46_re + (0.5 * (Math.pow(x_46_im, 2.0) / x_46_re)))));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if y_46_re <= -4.9e+27: tmp = 1.0 + (y_46_re * math.log1p((math.hypot(x_46_im, x_46_re) + -1.0))) elif y_46_re <= 7e+32: tmp = 1.0 + (y_46_re * math.log(math.hypot(x_46_im, x_46_re))) else: tmp = 1.0 + (y_46_re * math.log((x_46_re + (0.5 * (math.pow(x_46_im, 2.0) / x_46_re))))) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if (y_46_re <= -4.9e+27) tmp = Float64(1.0 + Float64(y_46_re * log1p(Float64(hypot(x_46_im, x_46_re) + -1.0)))); elseif (y_46_re <= 7e+32) tmp = Float64(1.0 + Float64(y_46_re * log(hypot(x_46_im, x_46_re)))); else tmp = Float64(1.0 + Float64(y_46_re * log(Float64(x_46_re + Float64(0.5 * Float64((x_46_im ^ 2.0) / x_46_re)))))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[y$46$re, -4.9e+27], N[(1.0 + N[(y$46$re * N[Log[1 + N[(N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision] + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 7e+32], N[(1.0 + N[(y$46$re * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(y$46$re * N[Log[N[(x$46$re + N[(0.5 * N[(N[Power[x$46$im, 2.0], $MachinePrecision] / x$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq -4.9 \cdot 10^{+27}:\\
\;\;\;\;1 + y.re \cdot \mathsf{log1p}\left(\mathsf{hypot}\left(x.im, x.re\right) + -1\right)\\
\mathbf{elif}\;y.re \leq 7 \cdot 10^{+32}:\\
\;\;\;\;1 + y.re \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
\mathbf{else}:\\
\;\;\;\;1 + y.re \cdot \log \left(x.re + 0.5 \cdot \frac{{x.im}^{2}}{x.re}\right)\\
\end{array}
\end{array}
if y.re < -4.90000000000000015e27Initial 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-define91.8%
*-commutative91.8%
Simplified91.8%
Taylor expanded in y.im around 0 85.4%
unpow285.4%
unpow285.4%
hypot-undefine85.4%
Simplified85.4%
Taylor expanded in y.re around 0 11.6%
unpow211.6%
unpow211.6%
hypot-undefine2.6%
Simplified2.6%
log1p-expm1-u16.5%
expm1-undefine16.5%
add-exp-log16.5%
Applied egg-rr16.5%
if -4.90000000000000015e27 < y.re < 7.0000000000000002e32Initial program 43.5%
cancel-sign-sub-inv43.5%
fma-define43.5%
hypot-define43.5%
distribute-lft-neg-in43.5%
distribute-rgt-neg-out43.5%
fma-define43.5%
hypot-define84.1%
*-commutative84.1%
Simplified84.1%
Taylor expanded in y.im around 0 39.7%
unpow239.7%
unpow239.7%
hypot-undefine54.5%
Simplified54.5%
Taylor expanded in y.re around 0 33.1%
unpow233.1%
unpow233.1%
hypot-undefine46.9%
Simplified46.9%
if 7.0000000000000002e32 < y.re Initial program 33.3%
cancel-sign-sub-inv33.3%
fma-define33.3%
hypot-define33.3%
distribute-lft-neg-in33.3%
distribute-rgt-neg-out33.3%
fma-define33.3%
hypot-define70.4%
*-commutative70.4%
Simplified70.4%
Taylor expanded in y.im around 0 66.8%
unpow266.8%
unpow266.8%
hypot-undefine66.8%
Simplified66.8%
Taylor expanded in y.re around 0 40.6%
unpow240.6%
unpow240.6%
hypot-undefine4.0%
Simplified4.0%
Taylor expanded in x.im around 0 18.5%
Final simplification33.7%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (<= y.re -4e+27)
(+ 1.0 (* y.re (log1p (+ (hypot x.im x.re) -1.0))))
(if (<= y.re 2.7e+31)
(+ 1.0 (* y.re (log (hypot x.im x.re))))
(+ 1.0 (* y.re (log (+ x.im (* 0.5 (/ (pow x.re 2.0) x.im)))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_re <= -4e+27) {
tmp = 1.0 + (y_46_re * log1p((hypot(x_46_im, x_46_re) + -1.0)));
} else if (y_46_re <= 2.7e+31) {
tmp = 1.0 + (y_46_re * log(hypot(x_46_im, x_46_re)));
} else {
tmp = 1.0 + (y_46_re * log((x_46_im + (0.5 * (pow(x_46_re, 2.0) / x_46_im)))));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_re <= -4e+27) {
tmp = 1.0 + (y_46_re * Math.log1p((Math.hypot(x_46_im, x_46_re) + -1.0)));
} else if (y_46_re <= 2.7e+31) {
tmp = 1.0 + (y_46_re * Math.log(Math.hypot(x_46_im, x_46_re)));
} else {
tmp = 1.0 + (y_46_re * Math.log((x_46_im + (0.5 * (Math.pow(x_46_re, 2.0) / x_46_im)))));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if y_46_re <= -4e+27: tmp = 1.0 + (y_46_re * math.log1p((math.hypot(x_46_im, x_46_re) + -1.0))) elif y_46_re <= 2.7e+31: tmp = 1.0 + (y_46_re * math.log(math.hypot(x_46_im, x_46_re))) else: tmp = 1.0 + (y_46_re * math.log((x_46_im + (0.5 * (math.pow(x_46_re, 2.0) / x_46_im))))) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if (y_46_re <= -4e+27) tmp = Float64(1.0 + Float64(y_46_re * log1p(Float64(hypot(x_46_im, x_46_re) + -1.0)))); elseif (y_46_re <= 2.7e+31) tmp = Float64(1.0 + Float64(y_46_re * log(hypot(x_46_im, x_46_re)))); else tmp = Float64(1.0 + Float64(y_46_re * log(Float64(x_46_im + Float64(0.5 * Float64((x_46_re ^ 2.0) / x_46_im)))))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[y$46$re, -4e+27], N[(1.0 + N[(y$46$re * N[Log[1 + N[(N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision] + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 2.7e+31], N[(1.0 + N[(y$46$re * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(y$46$re * N[Log[N[(x$46$im + N[(0.5 * N[(N[Power[x$46$re, 2.0], $MachinePrecision] / x$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq -4 \cdot 10^{+27}:\\
\;\;\;\;1 + y.re \cdot \mathsf{log1p}\left(\mathsf{hypot}\left(x.im, x.re\right) + -1\right)\\
\mathbf{elif}\;y.re \leq 2.7 \cdot 10^{+31}:\\
\;\;\;\;1 + y.re \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
\mathbf{else}:\\
\;\;\;\;1 + y.re \cdot \log \left(x.im + 0.5 \cdot \frac{{x.re}^{2}}{x.im}\right)\\
\end{array}
\end{array}
if y.re < -4.0000000000000001e27Initial 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-define91.8%
*-commutative91.8%
Simplified91.8%
Taylor expanded in y.im around 0 85.4%
unpow285.4%
unpow285.4%
hypot-undefine85.4%
Simplified85.4%
Taylor expanded in y.re around 0 11.6%
unpow211.6%
unpow211.6%
hypot-undefine2.6%
Simplified2.6%
log1p-expm1-u16.5%
expm1-undefine16.5%
add-exp-log16.5%
Applied egg-rr16.5%
if -4.0000000000000001e27 < y.re < 2.69999999999999986e31Initial program 43.8%
cancel-sign-sub-inv43.8%
fma-define43.8%
hypot-define43.8%
distribute-lft-neg-in43.8%
distribute-rgt-neg-out43.8%
fma-define43.8%
hypot-define84.0%
*-commutative84.0%
Simplified84.0%
Taylor expanded in y.im around 0 39.2%
unpow239.2%
unpow239.2%
hypot-undefine54.2%
Simplified54.2%
Taylor expanded in y.re around 0 32.6%
unpow232.6%
unpow232.6%
hypot-undefine47.2%
Simplified47.2%
if 2.69999999999999986e31 < y.re Initial program 32.7%
cancel-sign-sub-inv32.7%
fma-define32.7%
hypot-define32.7%
distribute-lft-neg-in32.7%
distribute-rgt-neg-out32.7%
fma-define32.7%
hypot-define70.9%
*-commutative70.9%
Simplified70.9%
Taylor expanded in y.im around 0 67.4%
unpow267.4%
unpow267.4%
hypot-undefine67.4%
Simplified67.4%
Taylor expanded in y.re around 0 41.6%
unpow241.6%
unpow241.6%
hypot-undefine4.0%
Simplified4.0%
Taylor expanded in x.re around 0 17.4%
Final simplification33.5%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (<= y.re -4e+27) (+ 1.0 (* y.re (log1p (+ (hypot x.im x.re) -1.0)))) (+ 1.0 (* y.re (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 tmp;
if (y_46_re <= -4e+27) {
tmp = 1.0 + (y_46_re * log1p((hypot(x_46_im, x_46_re) + -1.0)));
} else {
tmp = 1.0 + (y_46_re * log(hypot(x_46_im, x_46_re)));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_re <= -4e+27) {
tmp = 1.0 + (y_46_re * Math.log1p((Math.hypot(x_46_im, x_46_re) + -1.0)));
} else {
tmp = 1.0 + (y_46_re * Math.log(Math.hypot(x_46_im, x_46_re)));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if y_46_re <= -4e+27: tmp = 1.0 + (y_46_re * math.log1p((math.hypot(x_46_im, x_46_re) + -1.0))) else: tmp = 1.0 + (y_46_re * math.log(math.hypot(x_46_im, x_46_re))) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if (y_46_re <= -4e+27) tmp = Float64(1.0 + Float64(y_46_re * log1p(Float64(hypot(x_46_im, x_46_re) + -1.0)))); else tmp = Float64(1.0 + Float64(y_46_re * 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_] := If[LessEqual[y$46$re, -4e+27], N[(1.0 + N[(y$46$re * N[Log[1 + N[(N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision] + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(y$46$re * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq -4 \cdot 10^{+27}:\\
\;\;\;\;1 + y.re \cdot \mathsf{log1p}\left(\mathsf{hypot}\left(x.im, x.re\right) + -1\right)\\
\mathbf{else}:\\
\;\;\;\;1 + y.re \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
\end{array}
\end{array}
if y.re < -4.0000000000000001e27Initial 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-define91.8%
*-commutative91.8%
Simplified91.8%
Taylor expanded in y.im around 0 85.4%
unpow285.4%
unpow285.4%
hypot-undefine85.4%
Simplified85.4%
Taylor expanded in y.re around 0 11.6%
unpow211.6%
unpow211.6%
hypot-undefine2.6%
Simplified2.6%
log1p-expm1-u16.5%
expm1-undefine16.5%
add-exp-log16.5%
Applied egg-rr16.5%
if -4.0000000000000001e27 < y.re Initial program 40.7%
cancel-sign-sub-inv40.7%
fma-define40.7%
hypot-define40.7%
distribute-lft-neg-in40.7%
distribute-rgt-neg-out40.7%
fma-define40.7%
hypot-define80.3%
*-commutative80.3%
Simplified80.3%
Taylor expanded in y.im around 0 47.2%
unpow247.2%
unpow247.2%
hypot-undefine57.9%
Simplified57.9%
Taylor expanded in y.re around 0 35.2%
unpow235.2%
unpow235.2%
hypot-undefine35.0%
Simplified35.0%
Final simplification30.6%
(FPCore (x.re x.im y.re y.im) :precision binary64 (+ 1.0 (* y.re (log (hypot x.im x.re)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return 1.0 + (y_46_re * log(hypot(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 1.0 + (y_46_re * Math.log(Math.hypot(x_46_im, x_46_re)));
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): return 1.0 + (y_46_re * math.log(math.hypot(x_46_im, x_46_re)))
function code(x_46_re, x_46_im, y_46_re, y_46_im) return Float64(1.0 + Float64(y_46_re * log(hypot(x_46_im, x_46_re)))) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 1.0 + (y_46_re * log(hypot(x_46_im, x_46_re))); end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[(1.0 + N[(y$46$re * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
1 + y.re \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)
\end{array}
Initial 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-define83.0%
*-commutative83.0%
Simplified83.0%
Taylor expanded in y.im around 0 56.3%
unpow256.3%
unpow256.3%
hypot-undefine64.5%
Simplified64.5%
Taylor expanded in y.re around 0 29.6%
unpow229.6%
unpow229.6%
hypot-undefine27.3%
Simplified27.3%
(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 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-define83.0%
*-commutative83.0%
Simplified83.0%
Taylor expanded in y.im around 0 56.3%
unpow256.3%
unpow256.3%
hypot-undefine64.5%
Simplified64.5%
Taylor expanded in y.re around 0 26.9%
herbie shell --seed 2024145
(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)))))