
(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 18 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (sqrt (+ (* x.re x.re) (* x.im x.im))))))
(*
(exp (- (* t_0 y.re) (* (atan2 x.im x.re) y.im)))
(cos (+ (* t_0 y.im) (* (atan2 x.im x.re) y.re))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
return exp(((t_0 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * cos(((t_0 * y_46_im) + (atan2(x_46_im, x_46_re) * y_46_re)));
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
t_0 = log(sqrt(((x_46re * x_46re) + (x_46im * x_46im))))
code = exp(((t_0 * y_46re) - (atan2(x_46im, x_46re) * y_46im))) * cos(((t_0 * y_46im) + (atan2(x_46im, x_46re) * y_46re)))
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
return Math.exp(((t_0 * y_46_re) - (Math.atan2(x_46_im, x_46_re) * y_46_im))) * Math.cos(((t_0 * y_46_im) + (Math.atan2(x_46_im, x_46_re) * y_46_re)));
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) return math.exp(((t_0 * y_46_re) - (math.atan2(x_46_im, x_46_re) * y_46_im))) * math.cos(((t_0 * y_46_im) + (math.atan2(x_46_im, x_46_re) * y_46_re)))
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) return Float64(exp(Float64(Float64(t_0 * y_46_re) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * cos(Float64(Float64(t_0 * y_46_im) + Float64(atan(x_46_im, x_46_re) * y_46_re)))) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))); tmp = exp(((t_0 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * cos(((t_0 * y_46_im) + (atan2(x_46_im, x_46_re) * y_46_re))); end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]}, N[(N[Exp[N[(N[(t$95$0 * y$46$re), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Cos[N[(N[(t$95$0 * y$46$im), $MachinePrecision] + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)\\
e^{t\_0 \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \cos \left(t\_0 \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)
\end{array}
\end{array}
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.re x.im))))
(if (<= y.re 2000000.0)
(*
(exp (fma t_0 y.re (* (atan2 x.im x.re) (- y.im))))
(cos (fma t_0 y.im (* y.re (atan2 x.im x.re)))))
(*
(exp
(-
(* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(* (atan2 x.im x.re) y.im)))
(cos (* y.im (log (hypot x.im x.re))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(hypot(x_46_re, x_46_im));
double tmp;
if (y_46_re <= 2000000.0) {
tmp = exp(fma(t_0, y_46_re, (atan2(x_46_im, x_46_re) * -y_46_im))) * cos(fma(t_0, y_46_im, (y_46_re * atan2(x_46_im, x_46_re))));
} else {
tmp = exp(((y_46_re * log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))))) - (atan2(x_46_im, x_46_re) * y_46_im))) * cos((y_46_im * log(hypot(x_46_im, x_46_re))));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_re, x_46_im)) tmp = 0.0 if (y_46_re <= 2000000.0) tmp = Float64(exp(fma(t_0, y_46_re, Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))) * cos(fma(t_0, y_46_im, Float64(y_46_re * atan(x_46_im, x_46_re))))); else tmp = Float64(exp(Float64(Float64(y_46_re * log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im))))) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * cos(Float64(y_46_im * log(hypot(x_46_im, x_46_re))))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, 2000000.0], N[(N[Exp[N[(t$95$0 * y$46$re + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Cos[N[(t$95$0 * y$46$im + N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Exp[N[(N[(y$46$re * N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Cos[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\\
\mathbf{if}\;y.re \leq 2000000:\\
\;\;\;\;e^{\mathsf{fma}\left(t\_0, y.re, \tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)\right)} \cdot \cos \left(\mathsf{fma}\left(t\_0, y.im, y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;e^{y.re \cdot \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\end{array}
\end{array}
if y.re < 2e6Initial program 44.5%
cancel-sign-sub-inv44.5%
fma-define44.5%
hypot-define44.5%
distribute-lft-neg-in44.5%
distribute-rgt-neg-out44.5%
fma-define44.5%
hypot-define84.0%
*-commutative84.0%
Simplified84.0%
if 2e6 < y.re Initial program 32.3%
Taylor expanded in y.re around 0 36.9%
unpow236.9%
unpow236.9%
hypot-undefine75.5%
Simplified75.5%
Final simplification81.8%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(t_1 (exp (- (* y.re t_0) (* (atan2 x.im x.re) y.im)))))
(if (<= (* t_1 (cos (+ (* y.re (atan2 x.im x.re)) (* y.im t_0)))) INFINITY)
(* t_1 (cos (* y.im (log (hypot x.im x.re)))))
(/ (pow (hypot x.im x.re) y.re) (pow (exp y.im) (atan2 x.im x.re))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
double t_1 = exp(((y_46_re * t_0) - (atan2(x_46_im, x_46_re) * y_46_im)));
double tmp;
if ((t_1 * cos(((y_46_re * atan2(x_46_im, x_46_re)) + (y_46_im * t_0)))) <= ((double) INFINITY)) {
tmp = t_1 * cos((y_46_im * log(hypot(x_46_im, x_46_re))));
} else {
tmp = pow(hypot(x_46_im, x_46_re), y_46_re) / pow(exp(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 t_0 = Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
double t_1 = Math.exp(((y_46_re * t_0) - (Math.atan2(x_46_im, x_46_re) * y_46_im)));
double tmp;
if ((t_1 * Math.cos(((y_46_re * Math.atan2(x_46_im, x_46_re)) + (y_46_im * t_0)))) <= Double.POSITIVE_INFINITY) {
tmp = t_1 * Math.cos((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re))));
} else {
tmp = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re) / Math.pow(Math.exp(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): t_0 = math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) t_1 = math.exp(((y_46_re * t_0) - (math.atan2(x_46_im, x_46_re) * y_46_im))) tmp = 0 if (t_1 * math.cos(((y_46_re * math.atan2(x_46_im, x_46_re)) + (y_46_im * t_0)))) <= math.inf: tmp = t_1 * math.cos((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) else: tmp = math.pow(math.hypot(x_46_im, x_46_re), y_46_re) / math.pow(math.exp(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) t_0 = log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) t_1 = exp(Float64(Float64(y_46_re * t_0) - Float64(atan(x_46_im, x_46_re) * y_46_im))) tmp = 0.0 if (Float64(t_1 * cos(Float64(Float64(y_46_re * atan(x_46_im, x_46_re)) + Float64(y_46_im * t_0)))) <= Inf) tmp = Float64(t_1 * cos(Float64(y_46_im * log(hypot(x_46_im, x_46_re))))); else tmp = Float64((hypot(x_46_im, x_46_re) ^ y_46_re) / (exp(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) t_0 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))); t_1 = exp(((y_46_re * t_0) - (atan2(x_46_im, x_46_re) * y_46_im))); tmp = 0.0; if ((t_1 * cos(((y_46_re * atan2(x_46_im, x_46_re)) + (y_46_im * t_0)))) <= Inf) tmp = t_1 * cos((y_46_im * log(hypot(x_46_im, x_46_re)))); else tmp = (hypot(x_46_im, x_46_re) ^ y_46_re) / (exp(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_] := Block[{t$95$0 = N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[Exp[N[(N[(y$46$re * t$95$0), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[N[(t$95$1 * N[Cos[N[(N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision] + N[(y$46$im * t$95$0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], Infinity], N[(t$95$1 * N[Cos[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] / N[Power[N[Exp[y$46$im], $MachinePrecision], N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)\\
t_1 := e^{y.re \cdot t\_0 - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\
\mathbf{if}\;t\_1 \cdot \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re} + y.im \cdot t\_0\right) \leq \infty:\\
\;\;\;\;t\_1 \cdot \cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}}{{\left(e^{y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}}\\
\end{array}
\end{array}
if (*.f64 (exp.f64 (-.f64 (*.f64 (log.f64 (sqrt.f64 (+.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)))) y.re) (*.f64 (atan2.f64 x.im x.re) y.im))) (cos.f64 (+.f64 (*.f64 (log.f64 (sqrt.f64 (+.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)))) y.im) (*.f64 (atan2.f64 x.im x.re) y.re)))) < +inf.0Initial program 86.2%
Taylor expanded in y.re around 0 89.1%
unpow289.1%
unpow289.1%
hypot-undefine89.1%
Simplified89.1%
if +inf.0 < (*.f64 (exp.f64 (-.f64 (*.f64 (log.f64 (sqrt.f64 (+.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)))) y.re) (*.f64 (atan2.f64 x.im x.re) y.im))) (cos.f64 (+.f64 (*.f64 (log.f64 (sqrt.f64 (+.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)))) y.im) (*.f64 (atan2.f64 x.im x.re) y.re)))) Initial program 0.0%
exp-diff0.0%
exp-to-pow0.0%
hypot-define0.0%
*-commutative0.0%
exp-prod0.0%
fma-define0.0%
hypot-define65.0%
*-commutative65.0%
Simplified65.0%
add-cube-cbrt65.0%
exp-prod65.0%
pow265.0%
Applied egg-rr65.0%
Taylor expanded in y.re around 0 0.0%
+-commutative0.0%
unpow20.0%
unpow20.0%
hypot-undefine69.4%
Simplified69.4%
Taylor expanded in y.im around 0 47.4%
unpow247.4%
unpow247.4%
hypot-undefine71.7%
exp-prod71.6%
Simplified71.6%
Final simplification80.0%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (cos (* y.re (atan2 x.im x.re)))))
(if (<= y.re -1900.0)
(*
(exp
(-
(* y.re (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(* (atan2 x.im x.re) y.im)))
t_0)
(if (<= y.re 5400000.0)
(*
t_0
(/ (pow (hypot x.re x.im) y.re) (pow (exp y.im) (atan2 x.im x.re))))
(pow
(cbrt
(*
(cos (* (log (hypot x.re x.im)) y.im))
(pow (hypot x.im x.re) y.re)))
3.0)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = cos((y_46_re * atan2(x_46_im, x_46_re)));
double tmp;
if (y_46_re <= -1900.0) {
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;
} else if (y_46_re <= 5400000.0) {
tmp = t_0 * (pow(hypot(x_46_re, x_46_im), y_46_re) / pow(exp(y_46_im), atan2(x_46_im, x_46_re)));
} else {
tmp = pow(cbrt((cos((log(hypot(x_46_re, x_46_im)) * y_46_im)) * pow(hypot(x_46_im, x_46_re), y_46_re))), 3.0);
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.cos((y_46_re * Math.atan2(x_46_im, x_46_re)));
double tmp;
if (y_46_re <= -1900.0) {
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))) * t_0;
} else if (y_46_re <= 5400000.0) {
tmp = t_0 * (Math.pow(Math.hypot(x_46_re, x_46_im), y_46_re) / Math.pow(Math.exp(y_46_im), Math.atan2(x_46_im, x_46_re)));
} else {
tmp = Math.pow(Math.cbrt((Math.cos((Math.log(Math.hypot(x_46_re, x_46_im)) * y_46_im)) * Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re))), 3.0);
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = cos(Float64(y_46_re * atan(x_46_im, x_46_re))) tmp = 0.0 if (y_46_re <= -1900.0) 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); elseif (y_46_re <= 5400000.0) tmp = Float64(t_0 * Float64((hypot(x_46_re, x_46_im) ^ y_46_re) / (exp(y_46_im) ^ atan(x_46_im, x_46_re)))); else tmp = cbrt(Float64(cos(Float64(log(hypot(x_46_re, x_46_im)) * y_46_im)) * (hypot(x_46_im, x_46_re) ^ y_46_re))) ^ 3.0; end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Cos[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -1900.0], 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], If[LessEqual[y$46$re, 5400000.0], N[(t$95$0 * N[(N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] / N[Power[N[Exp[y$46$im], $MachinePrecision], N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Power[N[Power[N[(N[Cos[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im), $MachinePrecision]], $MachinePrecision] * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision], 3.0], $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 -1900:\\
\;\;\;\;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\\
\mathbf{elif}\;y.re \leq 5400000:\\
\;\;\;\;t\_0 \cdot \frac{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}{{\left(e^{y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}}\\
\mathbf{else}:\\
\;\;\;\;{\left(\sqrt[3]{\cos \left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im\right) \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}}\right)}^{3}\\
\end{array}
\end{array}
if y.re < -1900Initial program 33.9%
Taylor expanded in y.im around 0 84.8%
if -1900 < y.re < 5.4e6Initial program 49.3%
exp-diff49.3%
exp-to-pow49.3%
hypot-define49.3%
*-commutative49.3%
exp-prod49.1%
fma-define49.1%
hypot-define82.1%
*-commutative82.1%
Simplified82.1%
add-cube-cbrt82.1%
exp-prod82.1%
pow282.1%
Applied egg-rr82.1%
Taylor expanded in y.im around 0 57.1%
associate-/l*57.1%
+-commutative57.1%
unpow257.1%
unpow257.1%
hypot-undefine81.8%
exp-prod81.4%
Simplified81.4%
if 5.4e6 < y.re Initial program 32.3%
exp-diff30.8%
exp-to-pow30.8%
hypot-define30.8%
*-commutative30.8%
exp-prod27.7%
fma-define27.7%
hypot-define50.8%
*-commutative50.8%
Simplified50.8%
Taylor expanded in y.im around 0 57.0%
unpow257.0%
unpow257.0%
hypot-undefine57.0%
Simplified57.0%
Taylor expanded in y.re around 0 35.4%
+-commutative32.3%
unpow232.3%
unpow232.3%
hypot-undefine67.7%
Simplified73.9%
add-cube-cbrt73.9%
pow373.9%
*-commutative73.9%
Applied egg-rr73.9%
Final simplification80.3%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (<= 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))))
(if (<= y.re 2.15e-16)
(*
(cos (* y.im (log (hypot x.im x.re))))
(exp (* (atan2 x.im x.re) (- y.im))))
(* (cos (* (log (hypot x.re x.im)) y.im)) (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 <= -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 if (y_46_re <= 2.15e-16) {
tmp = cos((y_46_im * log(hypot(x_46_im, x_46_re)))) * exp((atan2(x_46_im, x_46_re) * -y_46_im));
} else {
tmp = cos((log(hypot(x_46_re, x_46_im)) * y_46_im)) * 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 <= -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 if (y_46_re <= 2.15e-16) {
tmp = Math.cos((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re)))) * Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im));
} else {
tmp = Math.cos((Math.log(Math.hypot(x_46_re, x_46_im)) * y_46_im)) * 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 <= -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))) elif y_46_re <= 2.15e-16: tmp = math.cos((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) * math.exp((math.atan2(x_46_im, x_46_re) * -y_46_im)) else: tmp = math.cos((math.log(math.hypot(x_46_re, x_46_im)) * y_46_im)) * 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 <= -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)))); elseif (y_46_re <= 2.15e-16) tmp = Float64(cos(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))); else tmp = Float64(cos(Float64(log(hypot(x_46_re, x_46_im)) * y_46_im)) * (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 <= -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))); elseif (y_46_re <= 2.15e-16) tmp = cos((y_46_im * log(hypot(x_46_im, x_46_re)))) * exp((atan2(x_46_im, x_46_re) * -y_46_im)); else tmp = cos((log(hypot(x_46_re, x_46_im)) * y_46_im)) * (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, -1e-5], 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], If[LessEqual[y$46$re, 2.15e-16], N[(N[Cos[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Cos[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision] * y$46$im), $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}
\mathbf{if}\;y.re \leq -1 \cdot 10^{-5}:\\
\;\;\;\;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{elif}\;y.re \leq 2.15 \cdot 10^{-16}:\\
\;\;\;\;\cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\
\mathbf{else}:\\
\;\;\;\;\cos \left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im\right) \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\end{array}
\end{array}
if y.re < -1.00000000000000008e-5Initial program 35.5%
Taylor expanded in y.im around 0 85.6%
if -1.00000000000000008e-5 < y.re < 2.1499999999999999e-16Initial program 49.5%
cancel-sign-sub-inv49.5%
fma-define49.5%
hypot-define49.5%
distribute-lft-neg-in49.5%
distribute-rgt-neg-out49.5%
fma-define49.5%
hypot-define83.2%
*-commutative83.2%
Simplified83.2%
Taylor expanded in y.re around 0 49.5%
unpow249.5%
unpow249.5%
hypot-undefine82.6%
neg-mul-182.6%
distribute-lft-neg-in82.6%
Simplified82.6%
if 2.1499999999999999e-16 < y.re Initial program 32.2%
exp-diff30.7%
exp-to-pow30.7%
hypot-define30.7%
*-commutative30.7%
exp-prod27.6%
fma-define27.6%
hypot-define51.0%
*-commutative51.0%
Simplified51.0%
Taylor expanded in y.im around 0 56.4%
unpow256.4%
unpow256.4%
hypot-undefine56.6%
Simplified56.6%
Taylor expanded in y.re around 0 34.5%
+-commutative31.4%
unpow231.4%
unpow231.4%
hypot-undefine65.0%
Simplified71.1%
Final simplification80.2%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (pow (hypot x.im x.re) y.re)))
(if (<= y.re -3e-7)
(* (cos (* y.re (atan2 x.im x.re))) t_0)
(if (<= y.re 2.3e-16)
(*
(cos (* y.im (log (hypot x.im x.re))))
(exp (* (atan2 x.im x.re) (- y.im))))
(* (cos (* (log (hypot x.re x.im)) 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 <= -3e-7) {
tmp = cos((y_46_re * atan2(x_46_im, x_46_re))) * t_0;
} else if (y_46_re <= 2.3e-16) {
tmp = cos((y_46_im * log(hypot(x_46_im, x_46_re)))) * exp((atan2(x_46_im, x_46_re) * -y_46_im));
} else {
tmp = cos((log(hypot(x_46_re, x_46_im)) * 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 <= -3e-7) {
tmp = Math.cos((y_46_re * Math.atan2(x_46_im, x_46_re))) * t_0;
} else if (y_46_re <= 2.3e-16) {
tmp = Math.cos((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re)))) * Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im));
} else {
tmp = Math.cos((Math.log(Math.hypot(x_46_re, x_46_im)) * 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 <= -3e-7: tmp = math.cos((y_46_re * math.atan2(x_46_im, x_46_re))) * t_0 elif y_46_re <= 2.3e-16: tmp = math.cos((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) * math.exp((math.atan2(x_46_im, x_46_re) * -y_46_im)) else: tmp = math.cos((math.log(math.hypot(x_46_re, x_46_im)) * 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 <= -3e-7) tmp = Float64(cos(Float64(y_46_re * atan(x_46_im, x_46_re))) * t_0); elseif (y_46_re <= 2.3e-16) tmp = Float64(cos(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))); else tmp = Float64(cos(Float64(log(hypot(x_46_re, x_46_im)) * 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 <= -3e-7) tmp = cos((y_46_re * atan2(x_46_im, x_46_re))) * t_0; elseif (y_46_re <= 2.3e-16) tmp = cos((y_46_im * log(hypot(x_46_im, x_46_re)))) * exp((atan2(x_46_im, x_46_re) * -y_46_im)); else tmp = cos((log(hypot(x_46_re, x_46_im)) * 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, -3e-7], 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, 2.3e-16], N[(N[Cos[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Cos[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 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 -3 \cdot 10^{-7}:\\
\;\;\;\;\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot t\_0\\
\mathbf{elif}\;y.re \leq 2.3 \cdot 10^{-16}:\\
\;\;\;\;\cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\
\mathbf{else}:\\
\;\;\;\;\cos \left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im\right) \cdot t\_0\\
\end{array}
\end{array}
if y.re < -2.9999999999999999e-7Initial program 34.9%
cancel-sign-sub-inv34.9%
fma-define34.9%
hypot-define34.9%
distribute-lft-neg-in34.9%
distribute-rgt-neg-out34.9%
fma-define34.9%
hypot-define87.3%
*-commutative87.3%
Simplified87.3%
Taylor expanded in y.im around 0 79.6%
unpow279.6%
unpow279.6%
hypot-undefine81.1%
Simplified81.1%
if -2.9999999999999999e-7 < y.re < 2.2999999999999999e-16Initial program 49.9%
cancel-sign-sub-inv49.9%
fma-define49.9%
hypot-define49.9%
distribute-lft-neg-in49.9%
distribute-rgt-neg-out49.9%
fma-define49.9%
hypot-define83.1%
*-commutative83.1%
Simplified83.1%
Taylor expanded in y.re around 0 49.9%
unpow249.9%
unpow249.9%
hypot-undefine83.1%
neg-mul-183.1%
distribute-lft-neg-in83.1%
Simplified83.1%
if 2.2999999999999999e-16 < y.re Initial program 32.2%
exp-diff30.7%
exp-to-pow30.7%
hypot-define30.7%
*-commutative30.7%
exp-prod27.6%
fma-define27.6%
hypot-define51.0%
*-commutative51.0%
Simplified51.0%
Taylor expanded in y.im around 0 56.4%
unpow256.4%
unpow256.4%
hypot-undefine56.6%
Simplified56.6%
Taylor expanded in y.re around 0 34.5%
+-commutative31.4%
unpow231.4%
unpow231.4%
hypot-undefine65.0%
Simplified71.1%
Final simplification79.4%
(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.5e-6)
(* (cos (* y.re (atan2 x.im x.re))) t_0)
(if (<= y.re 4.8e+22)
(/ t_0 (pow (exp y.im) (atan2 x.im x.re)))
(* (cos (* (log (hypot x.re x.im)) 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.5e-6) {
tmp = cos((y_46_re * atan2(x_46_im, x_46_re))) * t_0;
} else if (y_46_re <= 4.8e+22) {
tmp = t_0 / pow(exp(y_46_im), atan2(x_46_im, x_46_re));
} else {
tmp = cos((log(hypot(x_46_re, x_46_im)) * 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.5e-6) {
tmp = Math.cos((y_46_re * Math.atan2(x_46_im, x_46_re))) * t_0;
} else if (y_46_re <= 4.8e+22) {
tmp = t_0 / Math.pow(Math.exp(y_46_im), Math.atan2(x_46_im, x_46_re));
} else {
tmp = Math.cos((Math.log(Math.hypot(x_46_re, x_46_im)) * 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.5e-6: tmp = math.cos((y_46_re * math.atan2(x_46_im, x_46_re))) * t_0 elif y_46_re <= 4.8e+22: tmp = t_0 / math.pow(math.exp(y_46_im), math.atan2(x_46_im, x_46_re)) else: tmp = math.cos((math.log(math.hypot(x_46_re, x_46_im)) * 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.5e-6) tmp = Float64(cos(Float64(y_46_re * atan(x_46_im, x_46_re))) * t_0); elseif (y_46_re <= 4.8e+22) tmp = Float64(t_0 / (exp(y_46_im) ^ atan(x_46_im, x_46_re))); else tmp = Float64(cos(Float64(log(hypot(x_46_re, x_46_im)) * 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.5e-6) tmp = cos((y_46_re * atan2(x_46_im, x_46_re))) * t_0; elseif (y_46_re <= 4.8e+22) tmp = t_0 / (exp(y_46_im) ^ atan2(x_46_im, x_46_re)); else tmp = cos((log(hypot(x_46_re, x_46_im)) * 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.5e-6], 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, 4.8e+22], N[(t$95$0 / N[Power[N[Exp[y$46$im], $MachinePrecision], N[ArcTan[x$46$im / x$46$re], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Cos[N[(N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 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.5 \cdot 10^{-6}:\\
\;\;\;\;\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot t\_0\\
\mathbf{elif}\;y.re \leq 4.8 \cdot 10^{+22}:\\
\;\;\;\;\frac{t\_0}{{\left(e^{y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}}\\
\mathbf{else}:\\
\;\;\;\;\cos \left(\log \left(\mathsf{hypot}\left(x.re, x.im\right)\right) \cdot y.im\right) \cdot t\_0\\
\end{array}
\end{array}
if y.re < -2.5000000000000002e-6Initial program 34.9%
cancel-sign-sub-inv34.9%
fma-define34.9%
hypot-define34.9%
distribute-lft-neg-in34.9%
distribute-rgt-neg-out34.9%
fma-define34.9%
hypot-define87.3%
*-commutative87.3%
Simplified87.3%
Taylor expanded in y.im around 0 79.6%
unpow279.6%
unpow279.6%
hypot-undefine81.1%
Simplified81.1%
if -2.5000000000000002e-6 < y.re < 4.8e22Initial program 48.5%
exp-diff48.5%
exp-to-pow48.5%
hypot-define48.5%
*-commutative48.5%
exp-prod48.4%
fma-define48.4%
hypot-define81.6%
*-commutative81.6%
Simplified81.6%
add-cube-cbrt81.6%
exp-prod81.6%
pow281.6%
Applied egg-rr81.6%
Taylor expanded in y.re around 0 48.1%
+-commutative48.1%
unpow248.1%
unpow248.1%
hypot-undefine80.5%
Simplified80.5%
Taylor expanded in y.im around 0 57.6%
unpow257.6%
unpow257.6%
hypot-undefine81.3%
exp-prod80.9%
Simplified80.9%
if 4.8e22 < y.re Initial program 32.2%
exp-diff30.5%
exp-to-pow30.5%
hypot-define30.5%
*-commutative30.5%
exp-prod27.1%
fma-define27.1%
hypot-define47.5%
*-commutative47.5%
Simplified47.5%
Taylor expanded in y.im around 0 54.3%
unpow254.3%
unpow254.3%
hypot-undefine54.3%
Simplified54.3%
Taylor expanded in y.re around 0 35.6%
+-commutative32.2%
unpow232.2%
unpow232.2%
hypot-undefine66.1%
Simplified73.0%
Final simplification79.1%
(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 -4.2e-7)
(* (cos (* y.re (atan2 x.im x.re))) t_0)
(/ t_0 (pow (exp y.im) (atan2 x.im x.re))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = pow(hypot(x_46_im, x_46_re), y_46_re);
double tmp;
if (y_46_re <= -4.2e-7) {
tmp = cos((y_46_re * atan2(x_46_im, x_46_re))) * t_0;
} else {
tmp = t_0 / pow(exp(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 t_0 = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
double tmp;
if (y_46_re <= -4.2e-7) {
tmp = Math.cos((y_46_re * Math.atan2(x_46_im, x_46_re))) * t_0;
} else {
tmp = t_0 / Math.pow(Math.exp(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): t_0 = math.pow(math.hypot(x_46_im, x_46_re), y_46_re) tmp = 0 if y_46_re <= -4.2e-7: tmp = math.cos((y_46_re * math.atan2(x_46_im, x_46_re))) * t_0 else: tmp = t_0 / math.pow(math.exp(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) t_0 = hypot(x_46_im, x_46_re) ^ y_46_re tmp = 0.0 if (y_46_re <= -4.2e-7) tmp = Float64(cos(Float64(y_46_re * atan(x_46_im, x_46_re))) * t_0); else tmp = Float64(t_0 / (exp(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) t_0 = hypot(x_46_im, x_46_re) ^ y_46_re; tmp = 0.0; if (y_46_re <= -4.2e-7) tmp = cos((y_46_re * atan2(x_46_im, x_46_re))) * t_0; else tmp = t_0 / (exp(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_] := 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, -4.2e-7], N[(N[Cos[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$0), $MachinePrecision], N[(t$95$0 / N[Power[N[Exp[y$46$im], $MachinePrecision], N[ArcTan[x$46$im / x$46$re], $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 -4.2 \cdot 10^{-7}:\\
\;\;\;\;\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{t\_0}{{\left(e^{y.im}\right)}^{\tan^{-1}_* \frac{x.im}{x.re}}}\\
\end{array}
\end{array}
if y.re < -4.2e-7Initial program 34.9%
cancel-sign-sub-inv34.9%
fma-define34.9%
hypot-define34.9%
distribute-lft-neg-in34.9%
distribute-rgt-neg-out34.9%
fma-define34.9%
hypot-define87.3%
*-commutative87.3%
Simplified87.3%
Taylor expanded in y.im around 0 79.6%
unpow279.6%
unpow279.6%
hypot-undefine81.1%
Simplified81.1%
if -4.2e-7 < y.re Initial program 43.5%
exp-diff43.0%
exp-to-pow43.0%
hypot-define43.0%
*-commutative43.0%
exp-prod41.9%
fma-define41.9%
hypot-define71.1%
*-commutative71.1%
Simplified71.1%
add-cube-cbrt71.2%
exp-prod71.2%
pow271.2%
Applied egg-rr71.2%
Taylor expanded in y.re around 0 43.2%
+-commutative43.2%
unpow243.2%
unpow243.2%
hypot-undefine76.1%
Simplified76.1%
Taylor expanded in y.im around 0 58.1%
unpow258.1%
unpow258.1%
hypot-undefine74.6%
exp-prod73.8%
Simplified73.8%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (cos (* y.re (atan2 x.im x.re)))))
(if (<= y.re -4.8e-9)
(* t_0 (pow (hypot x.im x.re) y.re))
(if (<= y.re 4.3e-5)
(* t_0 (exp (* (atan2 x.im x.re) (- y.im))))
(pow (pow (hypot x.im x.re) 2.0) (/ y.re 2.0))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = cos((y_46_re * atan2(x_46_im, x_46_re)));
double tmp;
if (y_46_re <= -4.8e-9) {
tmp = t_0 * pow(hypot(x_46_im, x_46_re), y_46_re);
} else if (y_46_re <= 4.3e-5) {
tmp = t_0 * exp((atan2(x_46_im, x_46_re) * -y_46_im));
} else {
tmp = pow(pow(hypot(x_46_im, x_46_re), 2.0), (y_46_re / 2.0));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.cos((y_46_re * Math.atan2(x_46_im, x_46_re)));
double tmp;
if (y_46_re <= -4.8e-9) {
tmp = t_0 * Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
} else if (y_46_re <= 4.3e-5) {
tmp = t_0 * Math.exp((Math.atan2(x_46_im, x_46_re) * -y_46_im));
} else {
tmp = Math.pow(Math.pow(Math.hypot(x_46_im, x_46_re), 2.0), (y_46_re / 2.0));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.cos((y_46_re * math.atan2(x_46_im, x_46_re))) tmp = 0 if y_46_re <= -4.8e-9: tmp = t_0 * math.pow(math.hypot(x_46_im, x_46_re), y_46_re) elif y_46_re <= 4.3e-5: tmp = t_0 * math.exp((math.atan2(x_46_im, x_46_re) * -y_46_im)) else: tmp = math.pow(math.pow(math.hypot(x_46_im, x_46_re), 2.0), (y_46_re / 2.0)) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = cos(Float64(y_46_re * atan(x_46_im, x_46_re))) tmp = 0.0 if (y_46_re <= -4.8e-9) tmp = Float64(t_0 * (hypot(x_46_im, x_46_re) ^ y_46_re)); elseif (y_46_re <= 4.3e-5) tmp = Float64(t_0 * exp(Float64(atan(x_46_im, x_46_re) * Float64(-y_46_im)))); else tmp = (hypot(x_46_im, x_46_re) ^ 2.0) ^ Float64(y_46_re / 2.0); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = cos((y_46_re * atan2(x_46_im, x_46_re))); tmp = 0.0; if (y_46_re <= -4.8e-9) tmp = t_0 * (hypot(x_46_im, x_46_re) ^ y_46_re); elseif (y_46_re <= 4.3e-5) tmp = t_0 * exp((atan2(x_46_im, x_46_re) * -y_46_im)); else tmp = (hypot(x_46_im, x_46_re) ^ 2.0) ^ (y_46_re / 2.0); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Cos[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -4.8e-9], N[(t$95$0 * N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 4.3e-5], N[(t$95$0 * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * (-y$46$im)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[Power[N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], 2.0], $MachinePrecision], N[(y$46$re / 2.0), $MachinePrecision]], $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{if}\;y.re \leq -4.8 \cdot 10^{-9}:\\
\;\;\;\;t\_0 \cdot {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{elif}\;y.re \leq 4.3 \cdot 10^{-5}:\\
\;\;\;\;t\_0 \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(-y.im\right)}\\
\mathbf{else}:\\
\;\;\;\;{\left({\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{2}\right)}^{\left(\frac{y.re}{2}\right)}\\
\end{array}
\end{array}
if y.re < -4.8e-9Initial program 34.9%
cancel-sign-sub-inv34.9%
fma-define34.9%
hypot-define34.9%
distribute-lft-neg-in34.9%
distribute-rgt-neg-out34.9%
fma-define34.9%
hypot-define87.3%
*-commutative87.3%
Simplified87.3%
Taylor expanded in y.im around 0 79.6%
unpow279.6%
unpow279.6%
hypot-undefine81.1%
Simplified81.1%
if -4.8e-9 < y.re < 4.3000000000000002e-5Initial program 49.2%
Taylor expanded in x.re around 0 25.6%
associate-*r/25.6%
Simplified25.6%
Taylor expanded in x.re around inf 16.4%
log-rec16.4%
Simplified16.4%
Taylor expanded in y.re around 0 20.7%
neg-mul-120.7%
distribute-rgt-neg-in20.7%
Simplified20.7%
Taylor expanded in y.im around 0 81.2%
if 4.3000000000000002e-5 < y.re Initial program 32.8%
cancel-sign-sub-inv32.8%
fma-define32.8%
hypot-define32.8%
distribute-lft-neg-in32.8%
distribute-rgt-neg-out32.8%
fma-define32.8%
hypot-define62.7%
*-commutative62.7%
Simplified62.7%
Taylor expanded in y.im around 0 53.3%
unpow253.3%
unpow253.3%
hypot-undefine53.3%
Simplified53.3%
Taylor expanded in y.re around 0 63.7%
*-un-lft-identity63.7%
sqr-pow63.7%
pow-prod-down63.7%
pow263.7%
Applied egg-rr63.7%
Final simplification76.6%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (or (<= y.im -1.65e+35) (not (<= y.im 650000.0))) (pow (log (exp (hypot x.re x.im))) y.re) (pow (hypot x.im x.re) y.re)))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_im <= -1.65e+35) || !(y_46_im <= 650000.0)) {
tmp = pow(log(exp(hypot(x_46_re, x_46_im))), y_46_re);
} else {
tmp = 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_im <= -1.65e+35) || !(y_46_im <= 650000.0)) {
tmp = Math.pow(Math.log(Math.exp(Math.hypot(x_46_re, x_46_im))), y_46_re);
} else {
tmp = 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_im <= -1.65e+35) or not (y_46_im <= 650000.0): tmp = math.pow(math.log(math.exp(math.hypot(x_46_re, x_46_im))), y_46_re) else: tmp = 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_im <= -1.65e+35) || !(y_46_im <= 650000.0)) tmp = log(exp(hypot(x_46_re, x_46_im))) ^ y_46_re; else tmp = 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_im <= -1.65e+35) || ~((y_46_im <= 650000.0))) tmp = log(exp(hypot(x_46_re, x_46_im))) ^ y_46_re; else tmp = 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[Or[LessEqual[y$46$im, -1.65e+35], N[Not[LessEqual[y$46$im, 650000.0]], $MachinePrecision]], N[Power[N[Log[N[Exp[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]], $MachinePrecision], y$46$re], $MachinePrecision], N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.im \leq -1.65 \cdot 10^{+35} \lor \neg \left(y.im \leq 650000\right):\\
\;\;\;\;{\log \left(e^{\mathsf{hypot}\left(x.re, x.im\right)}\right)}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\end{array}
\end{array}
if y.im < -1.6500000000000001e35 or 6.5e5 < y.im Initial program 37.2%
cancel-sign-sub-inv37.2%
fma-define37.2%
hypot-define37.2%
distribute-lft-neg-in37.2%
distribute-rgt-neg-out37.2%
fma-define37.2%
hypot-define68.0%
*-commutative68.0%
Simplified68.0%
Taylor expanded in y.im around 0 35.0%
unpow235.0%
unpow235.0%
hypot-undefine26.4%
Simplified26.4%
Taylor expanded in y.re around 0 24.7%
hypot-undefine33.4%
+-commutative33.4%
add-log-exp41.9%
hypot-define41.9%
Applied egg-rr41.9%
if -1.6500000000000001e35 < y.im < 6.5e5Initial program 45.1%
cancel-sign-sub-inv45.1%
fma-define45.1%
hypot-define45.1%
distribute-lft-neg-in45.1%
distribute-rgt-neg-out45.1%
fma-define45.1%
hypot-define87.2%
*-commutative87.2%
Simplified87.2%
Taylor expanded in y.im around 0 66.8%
unpow266.8%
unpow266.8%
hypot-undefine84.5%
Simplified84.5%
Taylor expanded in y.re around 0 89.4%
Final simplification67.3%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (<= y.im 700000.0) (pow (hypot x.im x.re) y.re) (pow (pow (hypot x.im x.re) 2.0) (/ y.re 2.0))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_im <= 700000.0) {
tmp = pow(hypot(x_46_im, x_46_re), y_46_re);
} else {
tmp = pow(pow(hypot(x_46_im, x_46_re), 2.0), (y_46_re / 2.0));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_im <= 700000.0) {
tmp = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
} else {
tmp = Math.pow(Math.pow(Math.hypot(x_46_im, x_46_re), 2.0), (y_46_re / 2.0));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if y_46_im <= 700000.0: tmp = math.pow(math.hypot(x_46_im, x_46_re), y_46_re) else: tmp = math.pow(math.pow(math.hypot(x_46_im, x_46_re), 2.0), (y_46_re / 2.0)) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if (y_46_im <= 700000.0) tmp = hypot(x_46_im, x_46_re) ^ y_46_re; else tmp = (hypot(x_46_im, x_46_re) ^ 2.0) ^ Float64(y_46_re / 2.0); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if (y_46_im <= 700000.0) tmp = hypot(x_46_im, x_46_re) ^ y_46_re; else tmp = (hypot(x_46_im, x_46_re) ^ 2.0) ^ (y_46_re / 2.0); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[y$46$im, 700000.0], N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision], N[Power[N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], 2.0], $MachinePrecision], N[(y$46$re / 2.0), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.im \leq 700000:\\
\;\;\;\;{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;{\left({\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{2}\right)}^{\left(\frac{y.re}{2}\right)}\\
\end{array}
\end{array}
if y.im < 7e5Initial program 41.6%
cancel-sign-sub-inv41.6%
fma-define41.6%
hypot-define41.6%
distribute-lft-neg-in41.6%
distribute-rgt-neg-out41.6%
fma-define41.6%
hypot-define81.4%
*-commutative81.4%
Simplified81.4%
Taylor expanded in y.im around 0 55.9%
unpow255.9%
unpow255.9%
hypot-undefine66.3%
Simplified66.3%
Taylor expanded in y.re around 0 70.7%
if 7e5 < y.im 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-define67.4%
*-commutative67.4%
Simplified67.4%
Taylor expanded in y.im around 0 38.4%
unpow238.4%
unpow238.4%
hypot-undefine26.7%
Simplified26.7%
Taylor expanded in y.re around 0 19.7%
*-un-lft-identity19.7%
sqr-pow19.7%
pow-prod-down31.4%
pow231.4%
Applied egg-rr31.4%
Final simplification62.0%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (<= y.im 4.5e+86) (pow (hypot x.im x.re) y.re) (sqrt (pow (pow x.im 2.0) y.re))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_im <= 4.5e+86) {
tmp = pow(hypot(x_46_im, x_46_re), y_46_re);
} else {
tmp = sqrt(pow(pow(x_46_im, 2.0), y_46_re));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_im <= 4.5e+86) {
tmp = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
} else {
tmp = Math.sqrt(Math.pow(Math.pow(x_46_im, 2.0), y_46_re));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if y_46_im <= 4.5e+86: tmp = math.pow(math.hypot(x_46_im, x_46_re), y_46_re) else: tmp = math.sqrt(math.pow(math.pow(x_46_im, 2.0), y_46_re)) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if (y_46_im <= 4.5e+86) tmp = hypot(x_46_im, x_46_re) ^ y_46_re; else tmp = sqrt(((x_46_im ^ 2.0) ^ y_46_re)); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if (y_46_im <= 4.5e+86) tmp = hypot(x_46_im, x_46_re) ^ y_46_re; else tmp = sqrt(((x_46_im ^ 2.0) ^ 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$im, 4.5e+86], N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision], N[Sqrt[N[Power[N[Power[x$46$im, 2.0], $MachinePrecision], y$46$re], $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.im \leq 4.5 \cdot 10^{+86}:\\
\;\;\;\;{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{{\left({x.im}^{2}\right)}^{y.re}}\\
\end{array}
\end{array}
if y.im < 4.49999999999999993e86Initial 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-define79.7%
*-commutative79.7%
Simplified79.7%
Taylor expanded in y.im around 0 55.0%
unpow255.0%
unpow255.0%
hypot-undefine64.2%
Simplified64.2%
Taylor expanded in y.re around 0 67.3%
if 4.49999999999999993e86 < y.im Initial program 42.5%
cancel-sign-sub-inv42.5%
fma-define42.5%
hypot-define42.5%
distribute-lft-neg-in42.5%
distribute-rgt-neg-out42.5%
fma-define42.5%
hypot-define70.5%
*-commutative70.5%
Simplified70.5%
Taylor expanded in y.im around 0 36.1%
unpow236.1%
unpow236.1%
hypot-undefine21.7%
Simplified21.7%
Taylor expanded in y.re around 0 16.7%
Taylor expanded in x.re around 0 11.3%
add-sqr-sqrt11.3%
sqrt-unprod11.3%
pow-prod-down31.3%
pow231.3%
Applied egg-rr31.3%
Final simplification61.6%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (<= y.im 1.1e+82) (pow (hypot x.im x.re) y.re) (pow (+ x.re (* 0.5 (/ (pow x.im 2.0) 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_im <= 1.1e+82) {
tmp = pow(hypot(x_46_im, x_46_re), y_46_re);
} else {
tmp = pow((x_46_re + (0.5 * (pow(x_46_im, 2.0) / 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_im <= 1.1e+82) {
tmp = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
} else {
tmp = Math.pow((x_46_re + (0.5 * (Math.pow(x_46_im, 2.0) / 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_im <= 1.1e+82: tmp = math.pow(math.hypot(x_46_im, x_46_re), y_46_re) else: tmp = math.pow((x_46_re + (0.5 * (math.pow(x_46_im, 2.0) / 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_im <= 1.1e+82) tmp = hypot(x_46_im, x_46_re) ^ y_46_re; else tmp = Float64(x_46_re + Float64(0.5 * Float64((x_46_im ^ 2.0) / 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_im <= 1.1e+82) tmp = hypot(x_46_im, x_46_re) ^ y_46_re; else tmp = (x_46_re + (0.5 * ((x_46_im ^ 2.0) / 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$im, 1.1e+82], N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision], N[Power[N[(x$46$re + N[(0.5 * N[(N[Power[x$46$im, 2.0], $MachinePrecision] / x$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], y$46$re], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.im \leq 1.1 \cdot 10^{+82}:\\
\;\;\;\;{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;{\left(x.re + 0.5 \cdot \frac{{x.im}^{2}}{x.re}\right)}^{y.re}\\
\end{array}
\end{array}
if y.im < 1.1000000000000001e82Initial program 41.4%
cancel-sign-sub-inv41.4%
fma-define41.4%
hypot-define41.4%
distribute-lft-neg-in41.4%
distribute-rgt-neg-out41.4%
fma-define41.4%
hypot-define80.1%
*-commutative80.1%
Simplified80.1%
Taylor expanded in y.im around 0 54.8%
unpow254.8%
unpow254.8%
hypot-undefine64.0%
Simplified64.0%
Taylor expanded in y.re around 0 67.1%
if 1.1000000000000001e82 < y.im Initial program 41.5%
cancel-sign-sub-inv41.5%
fma-define41.5%
hypot-define41.5%
distribute-lft-neg-in41.5%
distribute-rgt-neg-out41.5%
fma-define41.5%
hypot-define68.8%
*-commutative68.8%
Simplified68.8%
Taylor expanded in y.im around 0 37.6%
unpow237.6%
unpow237.6%
hypot-undefine23.6%
Simplified23.6%
Taylor expanded in y.re around 0 18.7%
Taylor expanded in x.im around 0 30.1%
Final simplification61.2%
(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 41.4%
cancel-sign-sub-inv41.4%
fma-define41.4%
hypot-define41.4%
distribute-lft-neg-in41.4%
distribute-rgt-neg-out41.4%
fma-define41.4%
hypot-define78.3%
*-commutative78.3%
Simplified78.3%
Taylor expanded in y.im around 0 52.0%
unpow252.0%
unpow252.0%
hypot-undefine57.5%
Simplified57.5%
Taylor expanded in y.re around 0 59.4%
Final simplification59.4%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (or (<= y.re -2.4e-6) (not (<= y.re 51000.0))) (pow x.im y.re) 1.0))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_re <= -2.4e-6) || !(y_46_re <= 51000.0)) {
tmp = pow(x_46_im, y_46_re);
} else {
tmp = 1.0;
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: tmp
if ((y_46re <= (-2.4d-6)) .or. (.not. (y_46re <= 51000.0d0))) then
tmp = x_46im ** y_46re
else
tmp = 1.0d0
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_re <= -2.4e-6) || !(y_46_re <= 51000.0)) {
tmp = Math.pow(x_46_im, y_46_re);
} else {
tmp = 1.0;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if (y_46_re <= -2.4e-6) or not (y_46_re <= 51000.0): tmp = math.pow(x_46_im, y_46_re) else: tmp = 1.0 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if ((y_46_re <= -2.4e-6) || !(y_46_re <= 51000.0)) tmp = x_46_im ^ y_46_re; else tmp = 1.0; end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if ((y_46_re <= -2.4e-6) || ~((y_46_re <= 51000.0))) tmp = x_46_im ^ y_46_re; else tmp = 1.0; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[Or[LessEqual[y$46$re, -2.4e-6], N[Not[LessEqual[y$46$re, 51000.0]], $MachinePrecision]], N[Power[x$46$im, y$46$re], $MachinePrecision], 1.0]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq -2.4 \cdot 10^{-6} \lor \neg \left(y.re \leq 51000\right):\\
\;\;\;\;{x.im}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if y.re < -2.3999999999999999e-6 or 51000 < y.re Initial program 33.6%
cancel-sign-sub-inv33.6%
fma-define33.6%
hypot-define33.6%
distribute-lft-neg-in33.6%
distribute-rgt-neg-out33.6%
fma-define33.6%
hypot-define74.2%
*-commutative74.2%
Simplified74.2%
Taylor expanded in y.im around 0 65.8%
unpow265.8%
unpow265.8%
hypot-undefine66.6%
Simplified66.6%
Taylor expanded in y.re around 0 71.0%
Taylor expanded in x.re around 0 45.9%
if -2.3999999999999999e-6 < y.re < 51000Initial program 49.2%
cancel-sign-sub-inv49.2%
fma-define49.2%
hypot-define49.2%
distribute-lft-neg-in49.2%
distribute-rgt-neg-out49.2%
fma-define49.2%
hypot-define82.3%
*-commutative82.3%
Simplified82.3%
Taylor expanded in y.im around 0 38.3%
unpow238.3%
unpow238.3%
hypot-undefine48.5%
Simplified48.5%
Taylor expanded in x.im around -inf 23.8%
mul-1-neg23.0%
Simplified23.8%
Taylor expanded in y.re around 0 47.5%
Final simplification46.7%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (<= x.re -1.62e-111) (pow (- x.re) y.re) (if (<= x.re 2.4e-168) (pow x.im y.re) (pow x.re y.re))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (x_46_re <= -1.62e-111) {
tmp = pow(-x_46_re, y_46_re);
} else if (x_46_re <= 2.4e-168) {
tmp = pow(x_46_im, y_46_re);
} else {
tmp = pow(x_46_re, y_46_re);
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: tmp
if (x_46re <= (-1.62d-111)) then
tmp = -x_46re ** y_46re
else if (x_46re <= 2.4d-168) then
tmp = x_46im ** y_46re
else
tmp = x_46re ** y_46re
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (x_46_re <= -1.62e-111) {
tmp = Math.pow(-x_46_re, y_46_re);
} else if (x_46_re <= 2.4e-168) {
tmp = Math.pow(x_46_im, y_46_re);
} else {
tmp = Math.pow(x_46_re, y_46_re);
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if x_46_re <= -1.62e-111: tmp = math.pow(-x_46_re, y_46_re) elif x_46_re <= 2.4e-168: tmp = math.pow(x_46_im, y_46_re) else: tmp = math.pow(x_46_re, y_46_re) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if (x_46_re <= -1.62e-111) tmp = Float64(-x_46_re) ^ y_46_re; elseif (x_46_re <= 2.4e-168) tmp = x_46_im ^ y_46_re; else tmp = x_46_re ^ y_46_re; end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if (x_46_re <= -1.62e-111) tmp = -x_46_re ^ y_46_re; elseif (x_46_re <= 2.4e-168) tmp = x_46_im ^ y_46_re; else tmp = x_46_re ^ y_46_re; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[x$46$re, -1.62e-111], N[Power[(-x$46$re), y$46$re], $MachinePrecision], If[LessEqual[x$46$re, 2.4e-168], N[Power[x$46$im, y$46$re], $MachinePrecision], N[Power[x$46$re, y$46$re], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x.re \leq -1.62 \cdot 10^{-111}:\\
\;\;\;\;{\left(-x.re\right)}^{y.re}\\
\mathbf{elif}\;x.re \leq 2.4 \cdot 10^{-168}:\\
\;\;\;\;{x.im}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;{x.re}^{y.re}\\
\end{array}
\end{array}
if x.re < -1.62000000000000004e-111Initial program 38.7%
cancel-sign-sub-inv38.7%
fma-define38.7%
hypot-define38.7%
distribute-lft-neg-in38.7%
distribute-rgt-neg-out38.7%
fma-define38.7%
hypot-define77.5%
*-commutative77.5%
Simplified77.5%
Taylor expanded in y.im around 0 51.9%
unpow251.9%
unpow251.9%
hypot-undefine58.0%
Simplified58.0%
Taylor expanded in y.re around 0 58.0%
Taylor expanded in x.re around -inf 55.5%
mul-1-neg55.5%
Simplified55.5%
if -1.62000000000000004e-111 < x.re < 2.3999999999999999e-168Initial program 44.8%
cancel-sign-sub-inv44.8%
fma-define44.8%
hypot-define44.8%
distribute-lft-neg-in44.8%
distribute-rgt-neg-out44.8%
fma-define44.8%
hypot-define78.5%
*-commutative78.5%
Simplified78.5%
Taylor expanded in y.im around 0 53.1%
unpow253.1%
unpow253.1%
hypot-undefine54.3%
Simplified54.3%
Taylor expanded in y.re around 0 56.5%
Taylor expanded in x.re around 0 46.3%
if 2.3999999999999999e-168 < x.re Initial program 40.8%
cancel-sign-sub-inv40.8%
fma-define40.8%
hypot-define40.8%
distribute-lft-neg-in40.8%
distribute-rgt-neg-out40.8%
fma-define40.8%
hypot-define78.7%
*-commutative78.7%
Simplified78.7%
Taylor expanded in y.im around 0 51.3%
unpow251.3%
unpow251.3%
hypot-undefine59.8%
Simplified59.8%
Taylor expanded in y.re around 0 62.9%
Taylor expanded in x.im around 0 57.8%
Final simplification53.5%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (<= x.im -6.2e-9) (pow (- x.im) y.re) (if (<= x.im 3.55e-32) (pow x.re y.re) (pow x.im y.re))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (x_46_im <= -6.2e-9) {
tmp = pow(-x_46_im, y_46_re);
} else if (x_46_im <= 3.55e-32) {
tmp = pow(x_46_re, y_46_re);
} else {
tmp = pow(x_46_im, y_46_re);
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: tmp
if (x_46im <= (-6.2d-9)) then
tmp = -x_46im ** y_46re
else if (x_46im <= 3.55d-32) then
tmp = x_46re ** y_46re
else
tmp = x_46im ** y_46re
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (x_46_im <= -6.2e-9) {
tmp = Math.pow(-x_46_im, y_46_re);
} else if (x_46_im <= 3.55e-32) {
tmp = Math.pow(x_46_re, y_46_re);
} else {
tmp = Math.pow(x_46_im, y_46_re);
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if x_46_im <= -6.2e-9: tmp = math.pow(-x_46_im, y_46_re) elif x_46_im <= 3.55e-32: tmp = math.pow(x_46_re, y_46_re) else: tmp = math.pow(x_46_im, y_46_re) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if (x_46_im <= -6.2e-9) tmp = Float64(-x_46_im) ^ y_46_re; elseif (x_46_im <= 3.55e-32) tmp = x_46_re ^ y_46_re; else tmp = x_46_im ^ y_46_re; end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if (x_46_im <= -6.2e-9) tmp = -x_46_im ^ y_46_re; elseif (x_46_im <= 3.55e-32) tmp = x_46_re ^ y_46_re; else tmp = x_46_im ^ y_46_re; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[x$46$im, -6.2e-9], N[Power[(-x$46$im), y$46$re], $MachinePrecision], If[LessEqual[x$46$im, 3.55e-32], N[Power[x$46$re, y$46$re], $MachinePrecision], N[Power[x$46$im, y$46$re], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x.im \leq -6.2 \cdot 10^{-9}:\\
\;\;\;\;{\left(-x.im\right)}^{y.re}\\
\mathbf{elif}\;x.im \leq 3.55 \cdot 10^{-32}:\\
\;\;\;\;{x.re}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;{x.im}^{y.re}\\
\end{array}
\end{array}
if x.im < -6.2000000000000001e-9Initial program 31.3%
cancel-sign-sub-inv31.3%
fma-define31.3%
hypot-define31.3%
distribute-lft-neg-in31.3%
distribute-rgt-neg-out31.3%
fma-define31.3%
hypot-define78.0%
*-commutative78.0%
Simplified78.0%
Taylor expanded in y.im around 0 44.7%
unpow244.7%
unpow244.7%
hypot-undefine52.4%
Simplified52.4%
Taylor expanded in y.re around 0 55.5%
Taylor expanded in x.im around -inf 54.0%
mul-1-neg54.0%
Simplified54.0%
if -6.2000000000000001e-9 < x.im < 3.5500000000000002e-32Initial program 49.0%
cancel-sign-sub-inv49.0%
fma-define49.0%
hypot-define49.0%
distribute-lft-neg-in49.0%
distribute-rgt-neg-out49.0%
fma-define49.0%
hypot-define79.1%
*-commutative79.1%
Simplified79.1%
Taylor expanded in y.im around 0 61.8%
unpow261.8%
unpow261.8%
hypot-undefine61.4%
Simplified61.4%
Taylor expanded in y.re around 0 59.8%
Taylor expanded in x.im around 0 48.2%
if 3.5500000000000002e-32 < x.im Initial program 35.8%
cancel-sign-sub-inv35.8%
fma-define35.8%
hypot-define35.8%
distribute-lft-neg-in35.8%
distribute-rgt-neg-out35.8%
fma-define35.8%
hypot-define76.8%
*-commutative76.8%
Simplified76.8%
Taylor expanded in y.im around 0 38.8%
unpow238.8%
unpow238.8%
hypot-undefine54.7%
Simplified54.7%
Taylor expanded in y.re around 0 62.5%
Taylor expanded in x.re around 0 62.5%
Final simplification53.1%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (<= y.re -3.6e-6) (pow x.re y.re) (if (<= y.re 51000.0) 1.0 (pow x.im y.re))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_re <= -3.6e-6) {
tmp = pow(x_46_re, y_46_re);
} else if (y_46_re <= 51000.0) {
tmp = 1.0;
} else {
tmp = pow(x_46_im, y_46_re);
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: tmp
if (y_46re <= (-3.6d-6)) then
tmp = x_46re ** y_46re
else if (y_46re <= 51000.0d0) then
tmp = 1.0d0
else
tmp = x_46im ** y_46re
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_re <= -3.6e-6) {
tmp = Math.pow(x_46_re, y_46_re);
} else if (y_46_re <= 51000.0) {
tmp = 1.0;
} else {
tmp = Math.pow(x_46_im, y_46_re);
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if y_46_re <= -3.6e-6: tmp = math.pow(x_46_re, y_46_re) elif y_46_re <= 51000.0: tmp = 1.0 else: tmp = math.pow(x_46_im, y_46_re) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if (y_46_re <= -3.6e-6) tmp = x_46_re ^ y_46_re; elseif (y_46_re <= 51000.0) tmp = 1.0; else tmp = x_46_im ^ y_46_re; end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if (y_46_re <= -3.6e-6) tmp = x_46_re ^ y_46_re; elseif (y_46_re <= 51000.0) tmp = 1.0; else tmp = x_46_im ^ y_46_re; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[y$46$re, -3.6e-6], N[Power[x$46$re, y$46$re], $MachinePrecision], If[LessEqual[y$46$re, 51000.0], 1.0, N[Power[x$46$im, y$46$re], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq -3.6 \cdot 10^{-6}:\\
\;\;\;\;{x.re}^{y.re}\\
\mathbf{elif}\;y.re \leq 51000:\\
\;\;\;\;1\\
\mathbf{else}:\\
\;\;\;\;{x.im}^{y.re}\\
\end{array}
\end{array}
if y.re < -3.59999999999999984e-6Initial program 35.5%
cancel-sign-sub-inv35.5%
fma-define35.5%
hypot-define35.5%
distribute-lft-neg-in35.5%
distribute-rgt-neg-out35.5%
fma-define35.5%
hypot-define87.1%
*-commutative87.1%
Simplified87.1%
Taylor expanded in y.im around 0 80.8%
unpow280.8%
unpow280.8%
hypot-undefine80.8%
Simplified80.8%
Taylor expanded in y.re around 0 77.6%
Taylor expanded in x.im around 0 63.3%
if -3.59999999999999984e-6 < y.re < 51000Initial program 48.9%
cancel-sign-sub-inv48.9%
fma-define48.9%
hypot-define48.9%
distribute-lft-neg-in48.9%
distribute-rgt-neg-out48.9%
fma-define48.9%
hypot-define82.5%
*-commutative82.5%
Simplified82.5%
Taylor expanded in y.im around 0 38.0%
unpow238.0%
unpow238.0%
hypot-undefine48.9%
Simplified48.9%
Taylor expanded in x.im around -inf 23.6%
mul-1-neg22.8%
Simplified23.6%
Taylor expanded in y.re around 0 47.3%
if 51000 < y.re Initial program 32.3%
cancel-sign-sub-inv32.3%
fma-define32.3%
hypot-define32.3%
distribute-lft-neg-in32.3%
distribute-rgt-neg-out32.3%
fma-define32.3%
hypot-define61.5%
*-commutative61.5%
Simplified61.5%
Taylor expanded in y.im around 0 52.4%
unpow252.4%
unpow252.4%
hypot-undefine52.4%
Simplified52.4%
Taylor expanded in y.re around 0 64.7%
Taylor expanded in x.re around 0 52.8%
(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.4%
cancel-sign-sub-inv41.4%
fma-define41.4%
hypot-define41.4%
distribute-lft-neg-in41.4%
distribute-rgt-neg-out41.4%
fma-define41.4%
hypot-define78.3%
*-commutative78.3%
Simplified78.3%
Taylor expanded in y.im around 0 52.0%
unpow252.0%
unpow252.0%
hypot-undefine57.5%
Simplified57.5%
Taylor expanded in x.im around -inf 30.2%
mul-1-neg32.9%
Simplified30.2%
Taylor expanded in y.re around 0 25.2%
herbie shell --seed 2024118
(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)))))