
(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 12 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.im x.re)))
(t_1 (cbrt (- (* y.re t_0) (* y.im (atan2 x.im x.re))))))
(if (<= x.re 1.28e+178)
(* (exp (* t_1 (pow (pow (cbrt t_1) 2.0) 3.0))) (cos (* t_0 y.im)))
(*
(cos (pow (cbrt (* y.re (atan2 x.im x.re))) 3.0))
(pow (hypot x.im x.re) y.re)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(hypot(x_46_im, x_46_re));
double t_1 = cbrt(((y_46_re * t_0) - (y_46_im * atan2(x_46_im, x_46_re))));
double tmp;
if (x_46_re <= 1.28e+178) {
tmp = exp((t_1 * pow(pow(cbrt(t_1), 2.0), 3.0))) * cos((t_0 * y_46_im));
} else {
tmp = cos(pow(cbrt((y_46_re * atan2(x_46_im, x_46_re))), 3.0)) * pow(hypot(x_46_im, x_46_re), y_46_re);
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.log(Math.hypot(x_46_im, x_46_re));
double t_1 = Math.cbrt(((y_46_re * t_0) - (y_46_im * Math.atan2(x_46_im, x_46_re))));
double tmp;
if (x_46_re <= 1.28e+178) {
tmp = Math.exp((t_1 * Math.pow(Math.pow(Math.cbrt(t_1), 2.0), 3.0))) * Math.cos((t_0 * y_46_im));
} else {
tmp = Math.cos(Math.pow(Math.cbrt((y_46_re * Math.atan2(x_46_im, x_46_re))), 3.0)) * Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_im, x_46_re)) t_1 = cbrt(Float64(Float64(y_46_re * t_0) - Float64(y_46_im * atan(x_46_im, x_46_re)))) tmp = 0.0 if (x_46_re <= 1.28e+178) tmp = Float64(exp(Float64(t_1 * ((cbrt(t_1) ^ 2.0) ^ 3.0))) * cos(Float64(t_0 * y_46_im))); else tmp = Float64(cos((cbrt(Float64(y_46_re * atan(x_46_im, x_46_re))) ^ 3.0)) * (hypot(x_46_im, x_46_re) ^ y_46_re)); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[Power[N[(N[(y$46$re * t$95$0), $MachinePrecision] - N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]}, If[LessEqual[x$46$re, 1.28e+178], N[(N[Exp[N[(t$95$1 * N[Power[N[Power[N[Power[t$95$1, 1/3], $MachinePrecision], 2.0], $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Cos[N[(t$95$0 * y$46$im), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Cos[N[Power[N[Power[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision] * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
t_1 := \sqrt[3]{y.re \cdot t\_0 - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\\
\mathbf{if}\;x.re \leq 1.28 \cdot 10^{+178}:\\
\;\;\;\;e^{t\_1 \cdot {\left({\left(\sqrt[3]{t\_1}\right)}^{2}\right)}^{3}} \cdot \cos \left(t\_0 \cdot y.im\right)\\
\mathbf{else}:\\
\;\;\;\;\cos \left({\left(\sqrt[3]{y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}}\right)}^{3}\right) \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\end{array}
\end{array}
if x.re < 1.28e178Initial program 45.3%
fma-define45.3%
hypot-define60.0%
*-commutative60.0%
add-cube-cbrt60.0%
pow360.0%
Applied egg-rr60.0%
add-cube-cbrt60.0%
pow360.0%
*-commutative60.0%
+-commutative60.0%
hypot-undefine82.0%
*-commutative82.0%
Applied egg-rr82.0%
Taylor expanded in y.re around 0 45.3%
*-commutative45.3%
unpow245.3%
unpow245.3%
hypot-undefine84.3%
Simplified84.3%
add-cube-cbrt84.3%
unpow-prod-down84.3%
pow284.3%
pow384.3%
add-cube-cbrt84.3%
Applied egg-rr84.3%
if 1.28e178 < x.re Initial program 0.0%
fma-neg0.0%
hypot-define0.0%
distribute-rgt-neg-out0.0%
fma-define0.0%
hypot-define75.1%
*-commutative75.1%
Simplified75.1%
Taylor expanded in y.im around 0 42.7%
unpow242.7%
unpow242.7%
hypot-undefine76.5%
Simplified76.5%
add-cube-cbrt83.4%
pow390.3%
Applied egg-rr90.3%
Final simplification85.0%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.im x.re))))
(if (<= x.re 7.8e+172)
(*
(cos (* t_0 y.im))
(exp (pow (cbrt (- (* y.re t_0) (* y.im (atan2 x.im x.re)))) 3.0)))
(*
(cos (pow (cbrt (* y.re (atan2 x.im x.re))) 3.0))
(pow (hypot x.im x.re) y.re)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(hypot(x_46_im, x_46_re));
double tmp;
if (x_46_re <= 7.8e+172) {
tmp = cos((t_0 * y_46_im)) * exp(pow(cbrt(((y_46_re * t_0) - (y_46_im * atan2(x_46_im, x_46_re)))), 3.0));
} else {
tmp = cos(pow(cbrt((y_46_re * atan2(x_46_im, x_46_re))), 3.0)) * pow(hypot(x_46_im, x_46_re), y_46_re);
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.log(Math.hypot(x_46_im, x_46_re));
double tmp;
if (x_46_re <= 7.8e+172) {
tmp = Math.cos((t_0 * y_46_im)) * Math.exp(Math.pow(Math.cbrt(((y_46_re * t_0) - (y_46_im * Math.atan2(x_46_im, x_46_re)))), 3.0));
} else {
tmp = Math.cos(Math.pow(Math.cbrt((y_46_re * Math.atan2(x_46_im, x_46_re))), 3.0)) * Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_im, x_46_re)) tmp = 0.0 if (x_46_re <= 7.8e+172) tmp = Float64(cos(Float64(t_0 * y_46_im)) * exp((cbrt(Float64(Float64(y_46_re * t_0) - Float64(y_46_im * atan(x_46_im, x_46_re)))) ^ 3.0))); else tmp = Float64(cos((cbrt(Float64(y_46_re * atan(x_46_im, x_46_re))) ^ 3.0)) * (hypot(x_46_im, x_46_re) ^ y_46_re)); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]}, If[LessEqual[x$46$re, 7.8e+172], N[(N[Cos[N[(t$95$0 * y$46$im), $MachinePrecision]], $MachinePrecision] * N[Exp[N[Power[N[Power[N[(N[(y$46$re * t$95$0), $MachinePrecision] - N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Cos[N[Power[N[Power[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision] * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
\mathbf{if}\;x.re \leq 7.8 \cdot 10^{+172}:\\
\;\;\;\;\cos \left(t\_0 \cdot y.im\right) \cdot e^{{\left(\sqrt[3]{y.re \cdot t\_0 - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\right)}^{3}}\\
\mathbf{else}:\\
\;\;\;\;\cos \left({\left(\sqrt[3]{y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}}\right)}^{3}\right) \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\end{array}
\end{array}
if x.re < 7.79999999999999934e172Initial program 45.3%
fma-define45.3%
hypot-define60.0%
*-commutative60.0%
add-cube-cbrt60.0%
pow360.0%
Applied egg-rr60.0%
add-cube-cbrt60.0%
pow360.0%
*-commutative60.0%
+-commutative60.0%
hypot-undefine82.0%
*-commutative82.0%
Applied egg-rr82.0%
Taylor expanded in y.re around 0 45.3%
*-commutative45.3%
unpow245.3%
unpow245.3%
hypot-undefine84.3%
Simplified84.3%
if 7.79999999999999934e172 < x.re Initial program 0.0%
fma-neg0.0%
hypot-define0.0%
distribute-rgt-neg-out0.0%
fma-define0.0%
hypot-define75.1%
*-commutative75.1%
Simplified75.1%
Taylor expanded in y.im around 0 42.7%
unpow242.7%
unpow242.7%
hypot-undefine76.5%
Simplified76.5%
add-cube-cbrt83.4%
pow390.3%
Applied egg-rr90.3%
Final simplification85.0%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (<= y.re -1.02e-7)
(pow
(pow (* (pow (hypot x.im x.re) y.re) (cos (* y.re (atan2 x.im x.re)))) 3.0)
0.3333333333333333)
(if (<= y.re 1.45e+38)
(exp (* (atan2 x.im x.re) (- y.im)))
(*
(cos (* (log (hypot x.im x.re)) y.im))
(exp
(-
(* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(* y.im (atan2 x.im x.re))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_re <= -1.02e-7) {
tmp = pow(pow((pow(hypot(x_46_im, x_46_re), y_46_re) * cos((y_46_re * atan2(x_46_im, x_46_re)))), 3.0), 0.3333333333333333);
} else if (y_46_re <= 1.45e+38) {
tmp = exp((atan2(x_46_im, x_46_re) * -y_46_im));
} else {
tmp = cos((log(hypot(x_46_im, x_46_re)) * y_46_im)) * exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (y_46_im * atan2(x_46_im, x_46_re))));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_re <= -1.02e-7) {
tmp = Math.pow(Math.pow((Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re) * Math.cos((y_46_re * Math.atan2(x_46_im, x_46_re)))), 3.0), 0.3333333333333333);
} else if (y_46_re <= 1.45e+38) {
tmp = Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im));
} else {
tmp = Math.cos((Math.log(Math.hypot(x_46_im, x_46_re)) * y_46_im)) * Math.exp(((y_46_re * Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (y_46_im * Math.atan2(x_46_im, x_46_re))));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if y_46_re <= -1.02e-7: tmp = math.pow(math.pow((math.pow(math.hypot(x_46_im, x_46_re), y_46_re) * math.cos((y_46_re * math.atan2(x_46_im, x_46_re)))), 3.0), 0.3333333333333333) elif y_46_re <= 1.45e+38: tmp = math.exp((math.atan2(x_46_im, x_46_re) * -y_46_im)) else: tmp = math.cos((math.log(math.hypot(x_46_im, x_46_re)) * y_46_im)) * math.exp(((y_46_re * math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (y_46_im * math.atan2(x_46_im, x_46_re)))) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if (y_46_re <= -1.02e-7) tmp = (Float64((hypot(x_46_im, x_46_re) ^ y_46_re) * cos(Float64(y_46_re * atan(x_46_im, x_46_re)))) ^ 3.0) ^ 0.3333333333333333; elseif (y_46_re <= 1.45e+38) tmp = exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))); else tmp = Float64(cos(Float64(log(hypot(x_46_im, x_46_re)) * y_46_im)) * exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - Float64(y_46_im * atan(x_46_im, x_46_re))))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if (y_46_re <= -1.02e-7) tmp = (((hypot(x_46_im, x_46_re) ^ y_46_re) * cos((y_46_re * atan2(x_46_im, x_46_re)))) ^ 3.0) ^ 0.3333333333333333; elseif (y_46_re <= 1.45e+38) tmp = exp((atan2(x_46_im, x_46_re) * -y_46_im)); else tmp = cos((log(hypot(x_46_im, x_46_re)) * y_46_im)) * exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (y_46_im * atan2(x_46_im, x_46_re)))); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[y$46$re, -1.02e-7], N[Power[N[Power[N[(N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] * N[Cos[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision], 0.3333333333333333], $MachinePrecision], If[LessEqual[y$46$re, 1.45e+38], N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision], N[(N[Cos[N[(N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im), $MachinePrecision]], $MachinePrecision] * 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[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq -1.02 \cdot 10^{-7}:\\
\;\;\;\;{\left({\left({\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re} \cdot \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)}^{3}\right)}^{0.3333333333333333}\\
\mathbf{elif}\;y.re \leq 1.45 \cdot 10^{+38}:\\
\;\;\;\;e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\
\mathbf{else}:\\
\;\;\;\;\cos \left(\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right) \cdot y.im\right) \cdot e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\\
\end{array}
\end{array}
if y.re < -1.02e-7Initial program 43.1%
fma-neg43.1%
hypot-define43.1%
distribute-rgt-neg-out43.1%
fma-define43.1%
hypot-define87.3%
*-commutative87.3%
Simplified87.3%
Taylor expanded in y.im around 0 83.3%
unpow283.3%
unpow283.3%
hypot-undefine84.2%
Simplified84.2%
add-cbrt-cube84.2%
pow1/385.7%
pow385.7%
Applied egg-rr85.7%
if -1.02e-7 < y.re < 1.45000000000000003e38Initial program 38.8%
fma-neg38.8%
hypot-define38.8%
distribute-rgt-neg-out38.8%
fma-define38.8%
hypot-define84.1%
*-commutative84.1%
Simplified84.1%
Taylor expanded in y.re around 0 37.0%
*-commutative37.0%
unpow237.0%
unpow237.0%
hypot-undefine80.9%
neg-mul-180.9%
distribute-rgt-neg-in80.9%
Simplified80.9%
Taylor expanded in y.im around 0 81.9%
if 1.45000000000000003e38 < y.re Initial program 40.4%
Taylor expanded in y.re around 0 42.6%
*-commutative42.6%
unpow242.6%
unpow242.6%
hypot-undefine78.8%
Simplified78.8%
Final simplification82.3%
(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 -1.52e-6)
(pow (pow (* t_1 (cos t_0)) 3.0) 0.3333333333333333)
(if (<= y.re 60000000000.0)
(*
(cos (* (log (hypot x.im x.re)) y.im))
(exp (pow (cbrt (* (atan2 x.im x.re) (- y.im))) 3.0)))
(if (<= y.re 4.2e+242) t_1 (* t_1 (+ 1.0 (* -0.5 (pow t_0 2.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 = pow(hypot(x_46_im, x_46_re), y_46_re);
double tmp;
if (y_46_re <= -1.52e-6) {
tmp = pow(pow((t_1 * cos(t_0)), 3.0), 0.3333333333333333);
} else if (y_46_re <= 60000000000.0) {
tmp = cos((log(hypot(x_46_im, x_46_re)) * y_46_im)) * exp(pow(cbrt((atan2(x_46_im, x_46_re) * -y_46_im)), 3.0));
} else if (y_46_re <= 4.2e+242) {
tmp = t_1;
} else {
tmp = t_1 * (1.0 + (-0.5 * pow(t_0, 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 = 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 <= -1.52e-6) {
tmp = Math.pow(Math.pow((t_1 * Math.cos(t_0)), 3.0), 0.3333333333333333);
} else if (y_46_re <= 60000000000.0) {
tmp = Math.cos((Math.log(Math.hypot(x_46_im, x_46_re)) * y_46_im)) * Math.exp(Math.pow(Math.cbrt((Math.atan2(x_46_im, x_46_re) * -y_46_im)), 3.0));
} else if (y_46_re <= 4.2e+242) {
tmp = t_1;
} else {
tmp = t_1 * (1.0 + (-0.5 * Math.pow(t_0, 2.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 = hypot(x_46_im, x_46_re) ^ y_46_re tmp = 0.0 if (y_46_re <= -1.52e-6) tmp = (Float64(t_1 * cos(t_0)) ^ 3.0) ^ 0.3333333333333333; elseif (y_46_re <= 60000000000.0) tmp = Float64(cos(Float64(log(hypot(x_46_im, x_46_re)) * y_46_im)) * exp((cbrt(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))) ^ 3.0))); elseif (y_46_re <= 4.2e+242) tmp = t_1; else tmp = Float64(t_1 * Float64(1.0 + Float64(-0.5 * (t_0 ^ 2.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[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, If[LessEqual[y$46$re, -1.52e-6], N[Power[N[Power[N[(t$95$1 * N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision], 0.3333333333333333], $MachinePrecision], If[LessEqual[y$46$re, 60000000000.0], N[(N[Cos[N[(N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im), $MachinePrecision]], $MachinePrecision] * N[Exp[N[Power[N[Power[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision], 1/3], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 4.2e+242], t$95$1, N[(t$95$1 * N[(1.0 + N[(-0.5 * N[Power[t$95$0, 2.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 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{if}\;y.re \leq -1.52 \cdot 10^{-6}:\\
\;\;\;\;{\left({\left(t\_1 \cdot \cos t\_0\right)}^{3}\right)}^{0.3333333333333333}\\
\mathbf{elif}\;y.re \leq 60000000000:\\
\;\;\;\;\cos \left(\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right) \cdot y.im\right) \cdot e^{{\left(\sqrt[3]{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\right)}^{3}}\\
\mathbf{elif}\;y.re \leq 4.2 \cdot 10^{+242}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot \left(1 + -0.5 \cdot {t\_0}^{2}\right)\\
\end{array}
\end{array}
if y.re < -1.52000000000000006e-6Initial program 43.1%
fma-neg43.1%
hypot-define43.1%
distribute-rgt-neg-out43.1%
fma-define43.1%
hypot-define87.3%
*-commutative87.3%
Simplified87.3%
Taylor expanded in y.im around 0 83.3%
unpow283.3%
unpow283.3%
hypot-undefine84.2%
Simplified84.2%
add-cbrt-cube84.2%
pow1/385.7%
pow385.7%
Applied egg-rr85.7%
if -1.52000000000000006e-6 < y.re < 6e10Initial program 39.0%
fma-neg39.0%
hypot-define39.0%
distribute-rgt-neg-out39.0%
fma-define39.0%
hypot-define85.6%
*-commutative85.6%
Simplified85.6%
Taylor expanded in y.re around 0 37.9%
*-commutative37.9%
unpow237.9%
unpow237.9%
hypot-undefine83.0%
neg-mul-183.0%
distribute-rgt-neg-in83.0%
Simplified83.0%
add-cube-cbrt83.0%
pow383.0%
Applied egg-rr83.0%
if 6e10 < y.re < 4.1999999999999999e242Initial program 39.0%
fma-define39.0%
hypot-define58.6%
*-commutative58.6%
add-cube-cbrt58.6%
pow358.6%
Applied egg-rr58.6%
add-cube-cbrt58.6%
pow358.6%
*-commutative58.6%
+-commutative58.6%
hypot-undefine63.4%
*-commutative63.4%
Applied egg-rr63.4%
Taylor expanded in y.re around 0 43.9%
*-commutative43.9%
unpow243.9%
unpow243.9%
hypot-undefine82.9%
Simplified82.9%
Taylor expanded in y.im around 0 78.2%
unpow278.2%
unpow278.2%
hypot-undefine78.2%
Simplified78.2%
if 4.1999999999999999e242 < y.re Initial program 41.7%
fma-neg41.7%
hypot-define41.7%
distribute-rgt-neg-out41.7%
fma-define41.7%
hypot-define58.3%
*-commutative58.3%
Simplified58.3%
Taylor expanded in y.im around 0 50.0%
unpow250.0%
unpow250.0%
hypot-undefine50.0%
Simplified50.0%
Taylor expanded in y.re around 0 41.7%
unpow241.7%
unpow241.7%
swap-sqr91.7%
unpow191.7%
pow-plus91.7%
metadata-eval91.7%
Simplified91.7%
Final simplification83.3%
(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 -2.55e-8)
(pow (pow (* t_1 (cos t_0)) 3.0) 0.3333333333333333)
(if (<= y.re 230000000000.0)
(*
(cos (* (log (hypot x.im x.re)) y.im))
(exp (* (atan2 x.im x.re) (- y.im))))
(if (<= y.re 6.5e+242) t_1 (* t_1 (+ 1.0 (* -0.5 (pow t_0 2.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 = pow(hypot(x_46_im, x_46_re), y_46_re);
double tmp;
if (y_46_re <= -2.55e-8) {
tmp = pow(pow((t_1 * cos(t_0)), 3.0), 0.3333333333333333);
} else if (y_46_re <= 230000000000.0) {
tmp = cos((log(hypot(x_46_im, x_46_re)) * y_46_im)) * exp((atan2(x_46_im, x_46_re) * -y_46_im));
} else if (y_46_re <= 6.5e+242) {
tmp = t_1;
} else {
tmp = t_1 * (1.0 + (-0.5 * pow(t_0, 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 = 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 <= -2.55e-8) {
tmp = Math.pow(Math.pow((t_1 * Math.cos(t_0)), 3.0), 0.3333333333333333);
} else if (y_46_re <= 230000000000.0) {
tmp = Math.cos((Math.log(Math.hypot(x_46_im, x_46_re)) * y_46_im)) * Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im));
} else if (y_46_re <= 6.5e+242) {
tmp = t_1;
} else {
tmp = t_1 * (1.0 + (-0.5 * Math.pow(t_0, 2.0)));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = y_46_re * math.atan2(x_46_im, x_46_re) t_1 = math.pow(math.hypot(x_46_im, x_46_re), y_46_re) tmp = 0 if y_46_re <= -2.55e-8: tmp = math.pow(math.pow((t_1 * math.cos(t_0)), 3.0), 0.3333333333333333) elif y_46_re <= 230000000000.0: tmp = math.cos((math.log(math.hypot(x_46_im, x_46_re)) * y_46_im)) * math.exp((math.atan2(x_46_im, x_46_re) * -y_46_im)) elif y_46_re <= 6.5e+242: tmp = t_1 else: tmp = t_1 * (1.0 + (-0.5 * math.pow(t_0, 2.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 = hypot(x_46_im, x_46_re) ^ y_46_re tmp = 0.0 if (y_46_re <= -2.55e-8) tmp = (Float64(t_1 * cos(t_0)) ^ 3.0) ^ 0.3333333333333333; elseif (y_46_re <= 230000000000.0) tmp = Float64(cos(Float64(log(hypot(x_46_im, x_46_re)) * y_46_im)) * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))); elseif (y_46_re <= 6.5e+242) tmp = t_1; else tmp = Float64(t_1 * Float64(1.0 + Float64(-0.5 * (t_0 ^ 2.0)))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = y_46_re * atan2(x_46_im, x_46_re); t_1 = hypot(x_46_im, x_46_re) ^ y_46_re; tmp = 0.0; if (y_46_re <= -2.55e-8) tmp = ((t_1 * cos(t_0)) ^ 3.0) ^ 0.3333333333333333; elseif (y_46_re <= 230000000000.0) tmp = cos((log(hypot(x_46_im, x_46_re)) * y_46_im)) * exp((atan2(x_46_im, x_46_re) * -y_46_im)); elseif (y_46_re <= 6.5e+242) tmp = t_1; else tmp = t_1 * (1.0 + (-0.5 * (t_0 ^ 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[(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, -2.55e-8], N[Power[N[Power[N[(t$95$1 * N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision], 0.3333333333333333], $MachinePrecision], If[LessEqual[y$46$re, 230000000000.0], N[(N[Cos[N[(N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im), $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, 6.5e+242], t$95$1, N[(t$95$1 * N[(1.0 + N[(-0.5 * N[Power[t$95$0, 2.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 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{if}\;y.re \leq -2.55 \cdot 10^{-8}:\\
\;\;\;\;{\left({\left(t\_1 \cdot \cos t\_0\right)}^{3}\right)}^{0.3333333333333333}\\
\mathbf{elif}\;y.re \leq 230000000000:\\
\;\;\;\;\cos \left(\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right) \cdot y.im\right) \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\
\mathbf{elif}\;y.re \leq 6.5 \cdot 10^{+242}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot \left(1 + -0.5 \cdot {t\_0}^{2}\right)\\
\end{array}
\end{array}
if y.re < -2.55e-8Initial program 43.1%
fma-neg43.1%
hypot-define43.1%
distribute-rgt-neg-out43.1%
fma-define43.1%
hypot-define87.3%
*-commutative87.3%
Simplified87.3%
Taylor expanded in y.im around 0 83.3%
unpow283.3%
unpow283.3%
hypot-undefine84.2%
Simplified84.2%
add-cbrt-cube84.2%
pow1/385.7%
pow385.7%
Applied egg-rr85.7%
if -2.55e-8 < y.re < 2.3e11Initial program 39.0%
fma-neg39.0%
hypot-define39.0%
distribute-rgt-neg-out39.0%
fma-define39.0%
hypot-define85.6%
*-commutative85.6%
Simplified85.6%
Taylor expanded in y.re around 0 37.9%
*-commutative37.9%
unpow237.9%
unpow237.9%
hypot-undefine83.0%
neg-mul-183.0%
distribute-rgt-neg-in83.0%
Simplified83.0%
if 2.3e11 < y.re < 6.49999999999999992e242Initial program 39.0%
fma-define39.0%
hypot-define58.6%
*-commutative58.6%
add-cube-cbrt58.6%
pow358.6%
Applied egg-rr58.6%
add-cube-cbrt58.6%
pow358.6%
*-commutative58.6%
+-commutative58.6%
hypot-undefine63.4%
*-commutative63.4%
Applied egg-rr63.4%
Taylor expanded in y.re around 0 43.9%
*-commutative43.9%
unpow243.9%
unpow243.9%
hypot-undefine82.9%
Simplified82.9%
Taylor expanded in y.im around 0 78.2%
unpow278.2%
unpow278.2%
hypot-undefine78.2%
Simplified78.2%
if 6.49999999999999992e242 < y.re Initial program 41.7%
fma-neg41.7%
hypot-define41.7%
distribute-rgt-neg-out41.7%
fma-define41.7%
hypot-define58.3%
*-commutative58.3%
Simplified58.3%
Taylor expanded in y.im around 0 50.0%
unpow250.0%
unpow250.0%
hypot-undefine50.0%
Simplified50.0%
Taylor expanded in y.re around 0 41.7%
unpow241.7%
unpow241.7%
swap-sqr91.7%
unpow191.7%
pow-plus91.7%
metadata-eval91.7%
Simplified91.7%
Final simplification83.3%
(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 -2.85e-8)
t_0
(if (<= y.re 650000000.0)
(*
(cos (* (log (hypot x.im x.re)) y.im))
(exp (* (atan2 x.im x.re) (- y.im))))
(if (<= y.re 6.5e+242)
t_0
(* t_0 (+ 1.0 (* -0.5 (pow (* y.re (atan2 x.im x.re)) 2.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 <= -2.85e-8) {
tmp = t_0;
} else if (y_46_re <= 650000000.0) {
tmp = cos((log(hypot(x_46_im, x_46_re)) * y_46_im)) * exp((atan2(x_46_im, x_46_re) * -y_46_im));
} else if (y_46_re <= 6.5e+242) {
tmp = t_0;
} else {
tmp = t_0 * (1.0 + (-0.5 * pow((y_46_re * atan2(x_46_im, x_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.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
double tmp;
if (y_46_re <= -2.85e-8) {
tmp = t_0;
} else if (y_46_re <= 650000000.0) {
tmp = Math.cos((Math.log(Math.hypot(x_46_im, x_46_re)) * y_46_im)) * Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im));
} else if (y_46_re <= 6.5e+242) {
tmp = t_0;
} else {
tmp = t_0 * (1.0 + (-0.5 * Math.pow((y_46_re * Math.atan2(x_46_im, x_46_re)), 2.0)));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.pow(math.hypot(x_46_im, x_46_re), y_46_re) tmp = 0 if y_46_re <= -2.85e-8: tmp = t_0 elif y_46_re <= 650000000.0: tmp = math.cos((math.log(math.hypot(x_46_im, x_46_re)) * y_46_im)) * math.exp((math.atan2(x_46_im, x_46_re) * -y_46_im)) elif y_46_re <= 6.5e+242: tmp = t_0 else: tmp = t_0 * (1.0 + (-0.5 * math.pow((y_46_re * math.atan2(x_46_im, x_46_re)), 2.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 <= -2.85e-8) tmp = t_0; elseif (y_46_re <= 650000000.0) tmp = Float64(cos(Float64(log(hypot(x_46_im, x_46_re)) * y_46_im)) * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))); elseif (y_46_re <= 6.5e+242) tmp = t_0; else tmp = Float64(t_0 * Float64(1.0 + Float64(-0.5 * (Float64(y_46_re * atan(x_46_im, x_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 = hypot(x_46_im, x_46_re) ^ y_46_re; tmp = 0.0; if (y_46_re <= -2.85e-8) tmp = t_0; elseif (y_46_re <= 650000000.0) tmp = cos((log(hypot(x_46_im, x_46_re)) * y_46_im)) * exp((atan2(x_46_im, x_46_re) * -y_46_im)); elseif (y_46_re <= 6.5e+242) tmp = t_0; else tmp = t_0 * (1.0 + (-0.5 * ((y_46_re * atan2(x_46_im, x_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[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, If[LessEqual[y$46$re, -2.85e-8], t$95$0, If[LessEqual[y$46$re, 650000000.0], N[(N[Cos[N[(N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im), $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, 6.5e+242], t$95$0, N[(t$95$0 * N[(1.0 + N[(-0.5 * N[Power[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision], 2.0], $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 -2.85 \cdot 10^{-8}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y.re \leq 650000000:\\
\;\;\;\;\cos \left(\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right) \cdot y.im\right) \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\
\mathbf{elif}\;y.re \leq 6.5 \cdot 10^{+242}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot \left(1 + -0.5 \cdot {\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}^{2}\right)\\
\end{array}
\end{array}
if y.re < -2.85000000000000004e-8 or 6.5e8 < y.re < 6.49999999999999992e242Initial program 41.5%
fma-define41.5%
hypot-define73.7%
*-commutative73.7%
add-cube-cbrt73.7%
pow373.7%
Applied egg-rr73.7%
add-cube-cbrt73.7%
pow373.7%
*-commutative73.7%
+-commutative73.7%
hypot-undefine78.0%
*-commutative78.0%
Applied egg-rr78.0%
Taylor expanded in y.re around 0 43.4%
*-commutative43.4%
unpow243.4%
unpow243.4%
hypot-undefine84.3%
Simplified84.3%
Taylor expanded in y.im around 0 82.3%
unpow282.3%
unpow282.3%
hypot-undefine82.8%
Simplified82.8%
if -2.85000000000000004e-8 < y.re < 6.5e8Initial program 39.0%
fma-neg39.0%
hypot-define39.0%
distribute-rgt-neg-out39.0%
fma-define39.0%
hypot-define85.6%
*-commutative85.6%
Simplified85.6%
Taylor expanded in y.re around 0 37.9%
*-commutative37.9%
unpow237.9%
unpow237.9%
hypot-undefine83.0%
neg-mul-183.0%
distribute-rgt-neg-in83.0%
Simplified83.0%
if 6.49999999999999992e242 < y.re Initial program 41.7%
fma-neg41.7%
hypot-define41.7%
distribute-rgt-neg-out41.7%
fma-define41.7%
hypot-define58.3%
*-commutative58.3%
Simplified58.3%
Taylor expanded in y.im around 0 50.0%
unpow250.0%
unpow250.0%
hypot-undefine50.0%
Simplified50.0%
Taylor expanded in y.re around 0 41.7%
unpow241.7%
unpow241.7%
swap-sqr91.7%
unpow191.7%
pow-plus91.7%
metadata-eval91.7%
Simplified91.7%
Final simplification83.3%
(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 -2.2e-6)
t_0
(if (<= y.re 2.3e+38)
(exp (* (atan2 x.im x.re) (- y.im)))
(* (cos (* (log (hypot 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 <= -2.2e-6) {
tmp = t_0;
} else if (y_46_re <= 2.3e+38) {
tmp = exp((atan2(x_46_im, x_46_re) * -y_46_im));
} else {
tmp = cos((log(hypot(x_46_im, x_46_re)) * y_46_im)) * t_0;
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
double tmp;
if (y_46_re <= -2.2e-6) {
tmp = t_0;
} else if (y_46_re <= 2.3e+38) {
tmp = Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im));
} else {
tmp = Math.cos((Math.log(Math.hypot(x_46_im, x_46_re)) * y_46_im)) * t_0;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.pow(math.hypot(x_46_im, x_46_re), y_46_re) tmp = 0 if y_46_re <= -2.2e-6: tmp = t_0 elif y_46_re <= 2.3e+38: tmp = math.exp((math.atan2(x_46_im, x_46_re) * -y_46_im)) else: tmp = math.cos((math.log(math.hypot(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 = hypot(x_46_im, x_46_re) ^ y_46_re tmp = 0.0 if (y_46_re <= -2.2e-6) tmp = t_0; elseif (y_46_re <= 2.3e+38) tmp = exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))); else tmp = Float64(cos(Float64(log(hypot(x_46_im, x_46_re)) * y_46_im)) * t_0); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = hypot(x_46_im, x_46_re) ^ y_46_re; tmp = 0.0; if (y_46_re <= -2.2e-6) tmp = t_0; elseif (y_46_re <= 2.3e+38) tmp = exp((atan2(x_46_im, x_46_re) * -y_46_im)); else tmp = cos((log(hypot(x_46_im, x_46_re)) * y_46_im)) * t_0; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, If[LessEqual[y$46$re, -2.2e-6], t$95$0, If[LessEqual[y$46$re, 2.3e+38], N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision], N[(N[Cos[N[(N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im), $MachinePrecision]], $MachinePrecision] * t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{if}\;y.re \leq -2.2 \cdot 10^{-6}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y.re \leq 2.3 \cdot 10^{+38}:\\
\;\;\;\;e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\
\mathbf{else}:\\
\;\;\;\;\cos \left(\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right) \cdot y.im\right) \cdot t\_0\\
\end{array}
\end{array}
if y.re < -2.2000000000000001e-6Initial program 43.1%
fma-define43.1%
hypot-define83.2%
*-commutative83.2%
add-cube-cbrt83.2%
pow383.2%
Applied egg-rr83.2%
add-cube-cbrt83.2%
pow383.2%
*-commutative83.2%
+-commutative83.2%
hypot-undefine87.3%
*-commutative87.3%
Applied egg-rr87.3%
Taylor expanded in y.re around 0 43.1%
*-commutative43.1%
unpow243.1%
unpow243.1%
hypot-undefine85.1%
Simplified85.1%
Taylor expanded in y.im around 0 84.9%
unpow284.9%
unpow284.9%
hypot-undefine85.7%
Simplified85.7%
if -2.2000000000000001e-6 < y.re < 2.3000000000000001e38Initial program 38.8%
fma-neg38.8%
hypot-define38.8%
distribute-rgt-neg-out38.8%
fma-define38.8%
hypot-define84.1%
*-commutative84.1%
Simplified84.1%
Taylor expanded in y.re around 0 37.0%
*-commutative37.0%
unpow237.0%
unpow237.0%
hypot-undefine80.9%
neg-mul-180.9%
distribute-rgt-neg-in80.9%
Simplified80.9%
Taylor expanded in y.im around 0 81.9%
if 2.3000000000000001e38 < y.re Initial program 40.4%
fma-define40.4%
hypot-define61.7%
*-commutative61.7%
add-cube-cbrt61.7%
pow361.7%
Applied egg-rr61.7%
add-cube-cbrt61.7%
pow361.7%
*-commutative61.7%
+-commutative61.7%
hypot-undefine63.8%
*-commutative63.8%
Applied egg-rr63.8%
Taylor expanded in y.re around 0 42.6%
*-commutative42.6%
unpow242.6%
unpow242.6%
hypot-undefine80.9%
Simplified80.9%
Taylor expanded in y.im around 0 74.6%
unpow274.6%
unpow274.6%
hypot-undefine74.6%
Simplified74.6%
Final simplification81.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-8)
t_0
(if (<= y.re 1.4e+33)
(exp (* (atan2 x.im x.re) (- y.im)))
(if (<= y.re 6.5e+242)
t_0
(* t_0 (+ 1.0 (* -0.5 (pow (* y.re (atan2 x.im x.re)) 2.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-8) {
tmp = t_0;
} else if (y_46_re <= 1.4e+33) {
tmp = exp((atan2(x_46_im, x_46_re) * -y_46_im));
} else if (y_46_re <= 6.5e+242) {
tmp = t_0;
} else {
tmp = t_0 * (1.0 + (-0.5 * pow((y_46_re * atan2(x_46_im, x_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.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
double tmp;
if (y_46_re <= -5e-8) {
tmp = t_0;
} else if (y_46_re <= 1.4e+33) {
tmp = Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im));
} else if (y_46_re <= 6.5e+242) {
tmp = t_0;
} else {
tmp = t_0 * (1.0 + (-0.5 * Math.pow((y_46_re * Math.atan2(x_46_im, x_46_re)), 2.0)));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.pow(math.hypot(x_46_im, x_46_re), y_46_re) tmp = 0 if y_46_re <= -5e-8: tmp = t_0 elif y_46_re <= 1.4e+33: tmp = math.exp((math.atan2(x_46_im, x_46_re) * -y_46_im)) elif y_46_re <= 6.5e+242: tmp = t_0 else: tmp = t_0 * (1.0 + (-0.5 * math.pow((y_46_re * math.atan2(x_46_im, x_46_re)), 2.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-8) tmp = t_0; elseif (y_46_re <= 1.4e+33) tmp = exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im))); elseif (y_46_re <= 6.5e+242) tmp = t_0; else tmp = Float64(t_0 * Float64(1.0 + Float64(-0.5 * (Float64(y_46_re * atan(x_46_im, x_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 = hypot(x_46_im, x_46_re) ^ y_46_re; tmp = 0.0; if (y_46_re <= -5e-8) tmp = t_0; elseif (y_46_re <= 1.4e+33) tmp = exp((atan2(x_46_im, x_46_re) * -y_46_im)); elseif (y_46_re <= 6.5e+242) tmp = t_0; else tmp = t_0 * (1.0 + (-0.5 * ((y_46_re * atan2(x_46_im, x_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[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, If[LessEqual[y$46$re, -5e-8], t$95$0, If[LessEqual[y$46$re, 1.4e+33], N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision], If[LessEqual[y$46$re, 6.5e+242], t$95$0, N[(t$95$0 * N[(1.0 + N[(-0.5 * N[Power[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision], 2.0], $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 -5 \cdot 10^{-8}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y.re \leq 1.4 \cdot 10^{+33}:\\
\;\;\;\;e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\
\mathbf{elif}\;y.re \leq 6.5 \cdot 10^{+242}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot \left(1 + -0.5 \cdot {\left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}^{2}\right)\\
\end{array}
\end{array}
if y.re < -4.9999999999999998e-8 or 1.4e33 < y.re < 6.49999999999999992e242Initial program 41.2%
fma-define41.2%
hypot-define74.6%
*-commutative74.6%
add-cube-cbrt74.6%
pow374.6%
Applied egg-rr74.6%
add-cube-cbrt74.6%
pow374.6%
*-commutative74.6%
+-commutative74.6%
hypot-undefine78.2%
*-commutative78.2%
Applied egg-rr78.2%
Taylor expanded in y.re around 0 43.1%
*-commutative43.1%
unpow243.1%
unpow243.1%
hypot-undefine84.6%
Simplified84.6%
Taylor expanded in y.im around 0 83.5%
unpow283.5%
unpow283.5%
hypot-undefine84.1%
Simplified84.1%
if -4.9999999999999998e-8 < y.re < 1.4e33Initial program 39.3%
fma-neg39.3%
hypot-define39.3%
distribute-rgt-neg-out39.3%
fma-define39.3%
hypot-define85.3%
*-commutative85.3%
Simplified85.3%
Taylor expanded in y.re around 0 37.5%
*-commutative37.5%
unpow237.5%
unpow237.5%
hypot-undefine82.1%
neg-mul-182.1%
distribute-rgt-neg-in82.1%
Simplified82.1%
Taylor expanded in y.im around 0 81.6%
if 6.49999999999999992e242 < y.re Initial program 41.7%
fma-neg41.7%
hypot-define41.7%
distribute-rgt-neg-out41.7%
fma-define41.7%
hypot-define58.3%
*-commutative58.3%
Simplified58.3%
Taylor expanded in y.im around 0 50.0%
unpow250.0%
unpow250.0%
hypot-undefine50.0%
Simplified50.0%
Taylor expanded in y.re around 0 41.7%
unpow241.7%
unpow241.7%
swap-sqr91.7%
unpow191.7%
pow-plus91.7%
metadata-eval91.7%
Simplified91.7%
Final simplification83.1%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (or (<= y.re -7.2e-8) (not (<= y.re 1.2e+32))) (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 <= -7.2e-8) || !(y_46_re <= 1.2e+32)) {
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 <= -7.2e-8) || !(y_46_re <= 1.2e+32)) {
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 <= -7.2e-8) or not (y_46_re <= 1.2e+32): 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 <= -7.2e-8) || !(y_46_re <= 1.2e+32)) 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 <= -7.2e-8) || ~((y_46_re <= 1.2e+32))) 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, -7.2e-8], N[Not[LessEqual[y$46$re, 1.2e+32]], $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 -7.2 \cdot 10^{-8} \lor \neg \left(y.re \leq 1.2 \cdot 10^{+32}\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 < -7.19999999999999962e-8 or 1.19999999999999996e32 < y.re Initial program 41.2%
fma-define41.2%
hypot-define72.9%
*-commutative72.9%
add-cube-cbrt72.9%
pow372.9%
Applied egg-rr72.9%
add-cube-cbrt72.9%
pow372.9%
*-commutative72.9%
+-commutative72.9%
hypot-undefine76.1%
*-commutative76.1%
Applied egg-rr76.1%
Taylor expanded in y.re around 0 42.1%
*-commutative42.1%
unpow242.1%
unpow242.1%
hypot-undefine81.9%
Simplified81.9%
Taylor expanded in y.im around 0 79.1%
unpow279.1%
unpow279.1%
hypot-undefine79.6%
Simplified79.6%
if -7.19999999999999962e-8 < y.re < 1.19999999999999996e32Initial program 39.3%
fma-neg39.3%
hypot-define39.3%
distribute-rgt-neg-out39.3%
fma-define39.3%
hypot-define85.3%
*-commutative85.3%
Simplified85.3%
Taylor expanded in y.re around 0 37.5%
*-commutative37.5%
unpow237.5%
unpow237.5%
hypot-undefine82.1%
neg-mul-182.1%
distribute-rgt-neg-in82.1%
Simplified82.1%
Taylor expanded in y.im around 0 81.6%
Final simplification80.7%
(FPCore (x.re x.im y.re y.im) :precision binary64 (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 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.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.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 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 = 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[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]
\begin{array}{l}
\\
{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}
\end{array}
Initial program 40.2%
fma-define40.2%
hypot-define57.6%
*-commutative57.6%
add-cube-cbrt57.6%
pow357.6%
Applied egg-rr57.6%
add-cube-cbrt57.6%
pow357.6%
*-commutative57.6%
+-commutative57.6%
hypot-undefine81.2%
*-commutative81.2%
Applied egg-rr81.2%
Taylor expanded in y.re around 0 40.2%
*-commutative40.2%
unpow240.2%
unpow240.2%
hypot-undefine82.9%
Simplified82.9%
Taylor expanded in y.im around 0 51.8%
unpow251.8%
unpow251.8%
hypot-undefine64.6%
Simplified64.6%
(FPCore (x.re x.im y.re y.im) :precision binary64 (- 1.0 (* y.im (atan2 x.im x.re))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return 1.0 - (y_46_im * atan2(x_46_im, x_46_re));
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
code = 1.0d0 - (y_46im * atan2(x_46im, x_46re))
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return 1.0 - (y_46_im * Math.atan2(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_im * math.atan2(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_im * atan(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_im * atan2(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$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
1 - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}
\end{array}
Initial program 40.2%
fma-neg40.2%
hypot-define40.2%
distribute-rgt-neg-out40.2%
fma-define40.2%
hypot-define81.2%
*-commutative81.2%
Simplified81.2%
Taylor expanded in y.re around 0 26.0%
*-commutative26.0%
unpow226.0%
unpow226.0%
hypot-undefine56.7%
neg-mul-156.7%
distribute-rgt-neg-in56.7%
Simplified56.7%
add-cube-cbrt56.7%
pow356.7%
Applied egg-rr56.7%
Taylor expanded in y.im around 0 29.5%
neg-mul-129.5%
unsub-neg29.5%
Simplified29.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 40.2%
fma-neg40.2%
hypot-define40.2%
distribute-rgt-neg-out40.2%
fma-define40.2%
hypot-define81.2%
*-commutative81.2%
Simplified81.2%
Taylor expanded in y.im around 0 49.9%
unpow249.9%
unpow249.9%
hypot-undefine62.8%
Simplified62.8%
Taylor expanded in y.re around 0 29.4%
herbie shell --seed 2024132
(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)))))