
(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 (* y.re (atan2 x.im x.re)))
(t_1 (cos t_0))
(t_2 (pow (+ (* x.re x.re) (* x.im x.im)) (/ y.re 2.0))))
(if (<= y.re -2.6)
(* t_1 t_2)
(if (<= y.re 82000000.0)
(/
(- t_1 (* (* y.im (log (hypot x.im x.re))) (sin t_0)))
(/ (exp (* (atan2 x.im x.re) y.im)) (pow (hypot x.re x.im) y.re)))
t_2))))
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 = cos(t_0);
double t_2 = pow(((x_46_re * x_46_re) + (x_46_im * x_46_im)), (y_46_re / 2.0));
double tmp;
if (y_46_re <= -2.6) {
tmp = t_1 * t_2;
} else if (y_46_re <= 82000000.0) {
tmp = (t_1 - ((y_46_im * log(hypot(x_46_im, x_46_re))) * sin(t_0))) / (exp((atan2(x_46_im, x_46_re) * y_46_im)) / pow(hypot(x_46_re, x_46_im), y_46_re));
} else {
tmp = t_2;
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_1 = Math.cos(t_0);
double t_2 = Math.pow(((x_46_re * x_46_re) + (x_46_im * x_46_im)), (y_46_re / 2.0));
double tmp;
if (y_46_re <= -2.6) {
tmp = t_1 * t_2;
} else if (y_46_re <= 82000000.0) {
tmp = (t_1 - ((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re))) * Math.sin(t_0))) / (Math.exp((Math.atan2(x_46_im, x_46_re) * y_46_im)) / Math.pow(Math.hypot(x_46_re, x_46_im), y_46_re));
} else {
tmp = t_2;
}
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.cos(t_0) t_2 = math.pow(((x_46_re * x_46_re) + (x_46_im * x_46_im)), (y_46_re / 2.0)) tmp = 0 if y_46_re <= -2.6: tmp = t_1 * t_2 elif y_46_re <= 82000000.0: tmp = (t_1 - ((y_46_im * math.log(math.hypot(x_46_im, x_46_re))) * math.sin(t_0))) / (math.exp((math.atan2(x_46_im, x_46_re) * y_46_im)) / math.pow(math.hypot(x_46_re, x_46_im), y_46_re)) else: tmp = t_2 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 = cos(t_0) t_2 = Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)) ^ Float64(y_46_re / 2.0) tmp = 0.0 if (y_46_re <= -2.6) tmp = Float64(t_1 * t_2); elseif (y_46_re <= 82000000.0) tmp = Float64(Float64(t_1 - Float64(Float64(y_46_im * log(hypot(x_46_im, x_46_re))) * sin(t_0))) / Float64(exp(Float64(atan(x_46_im, x_46_re) * y_46_im)) / (hypot(x_46_re, x_46_im) ^ y_46_re))); else tmp = t_2; end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = y_46_re * atan2(x_46_im, x_46_re); t_1 = cos(t_0); t_2 = ((x_46_re * x_46_re) + (x_46_im * x_46_im)) ^ (y_46_re / 2.0); tmp = 0.0; if (y_46_re <= -2.6) tmp = t_1 * t_2; elseif (y_46_re <= 82000000.0) tmp = (t_1 - ((y_46_im * log(hypot(x_46_im, x_46_re))) * sin(t_0))) / (exp((atan2(x_46_im, x_46_re) * y_46_im)) / (hypot(x_46_re, x_46_im) ^ y_46_re)); else tmp = t_2; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Cos[t$95$0], $MachinePrecision]}, Block[{t$95$2 = N[Power[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision], N[(y$46$re / 2.0), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -2.6], N[(t$95$1 * t$95$2), $MachinePrecision], If[LessEqual[y$46$re, 82000000.0], N[(N[(t$95$1 - N[(N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]], $MachinePrecision] / N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := \cos t\_0\\
t_2 := {\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\left(\frac{y.re}{2}\right)}\\
\mathbf{if}\;y.re \leq -2.6:\\
\;\;\;\;t\_1 \cdot t\_2\\
\mathbf{elif}\;y.re \leq 82000000:\\
\;\;\;\;\frac{t\_1 - \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right) \cdot \sin t\_0}{\frac{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y.re < -2.60000000000000009Initial program 44.8%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f64N/A
pow-lowering-pow.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6482.3%
Simplified82.3%
*-commutativeN/A
sqrt-pow2N/A
+-commutativeN/A
sqrt-pow2N/A
*-lowering-*.f64N/A
sqrt-pow2N/A
pow-lowering-pow.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-commutativeN/A
cos-lowering-cos.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6482.3%
Applied egg-rr82.3%
if -2.60000000000000009 < y.re < 8.2e7Initial program 42.4%
exp-diffN/A
associate-*l/N/A
associate-/l*N/A
*-commutativeN/A
associate-/r/N/A
exp-diffN/A
Simplified84.6%
Taylor expanded in y.im around 0
+-lowering-+.f64N/A
cos-lowering-cos.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f64N/A
mul-1-negN/A
neg-lowering-neg.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
Simplified86.1%
if 8.2e7 < y.re Initial program 34.9%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f64N/A
pow-lowering-pow.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6468.4%
Simplified68.4%
Taylor expanded in y.re around 0
Simplified79.5%
*-lft-identityN/A
sqrt-pow2N/A
pow-lowering-pow.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f6479.5%
Applied egg-rr79.5%
Final simplification83.5%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (atan2 x.im x.re)))
(t_1 (pow (+ (* x.re x.re) (* x.im x.im)) (/ y.re 2.0))))
(if (<= y.re -2.5e+127)
(* (cos t_0) t_1)
(if (<= y.re 780000000.0)
(/
(cos (+ t_0 (* y.im (log (hypot x.re x.im)))))
(/ (exp (* (atan2 x.im x.re) y.im)) (pow (hypot x.re x.im) y.re)))
t_1))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * atan2(x_46_im, x_46_re);
double t_1 = pow(((x_46_re * x_46_re) + (x_46_im * x_46_im)), (y_46_re / 2.0));
double tmp;
if (y_46_re <= -2.5e+127) {
tmp = cos(t_0) * t_1;
} else if (y_46_re <= 780000000.0) {
tmp = cos((t_0 + (y_46_im * log(hypot(x_46_re, x_46_im))))) / (exp((atan2(x_46_im, x_46_re) * y_46_im)) / pow(hypot(x_46_re, x_46_im), y_46_re));
} else {
tmp = t_1;
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_1 = Math.pow(((x_46_re * x_46_re) + (x_46_im * x_46_im)), (y_46_re / 2.0));
double tmp;
if (y_46_re <= -2.5e+127) {
tmp = Math.cos(t_0) * t_1;
} else if (y_46_re <= 780000000.0) {
tmp = Math.cos((t_0 + (y_46_im * Math.log(Math.hypot(x_46_re, x_46_im))))) / (Math.exp((Math.atan2(x_46_im, x_46_re) * y_46_im)) / Math.pow(Math.hypot(x_46_re, x_46_im), y_46_re));
} else {
tmp = t_1;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = y_46_re * math.atan2(x_46_im, x_46_re) t_1 = math.pow(((x_46_re * x_46_re) + (x_46_im * x_46_im)), (y_46_re / 2.0)) tmp = 0 if y_46_re <= -2.5e+127: tmp = math.cos(t_0) * t_1 elif y_46_re <= 780000000.0: tmp = math.cos((t_0 + (y_46_im * math.log(math.hypot(x_46_re, x_46_im))))) / (math.exp((math.atan2(x_46_im, x_46_re) * y_46_im)) / math.pow(math.hypot(x_46_re, x_46_im), y_46_re)) else: tmp = t_1 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_1 = Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)) ^ Float64(y_46_re / 2.0) tmp = 0.0 if (y_46_re <= -2.5e+127) tmp = Float64(cos(t_0) * t_1); elseif (y_46_re <= 780000000.0) tmp = Float64(cos(Float64(t_0 + Float64(y_46_im * log(hypot(x_46_re, x_46_im))))) / Float64(exp(Float64(atan(x_46_im, x_46_re) * y_46_im)) / (hypot(x_46_re, x_46_im) ^ y_46_re))); else tmp = t_1; end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = y_46_re * atan2(x_46_im, x_46_re); t_1 = ((x_46_re * x_46_re) + (x_46_im * x_46_im)) ^ (y_46_re / 2.0); tmp = 0.0; if (y_46_re <= -2.5e+127) tmp = cos(t_0) * t_1; elseif (y_46_re <= 780000000.0) tmp = cos((t_0 + (y_46_im * log(hypot(x_46_re, x_46_im))))) / (exp((atan2(x_46_im, x_46_re) * y_46_im)) / (hypot(x_46_re, x_46_im) ^ y_46_re)); else tmp = t_1; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Power[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision], N[(y$46$re / 2.0), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -2.5e+127], N[(N[Cos[t$95$0], $MachinePrecision] * t$95$1), $MachinePrecision], If[LessEqual[y$46$re, 780000000.0], N[(N[Cos[N[(t$95$0 + N[(y$46$im * N[Log[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]], $MachinePrecision] / N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := {\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\left(\frac{y.re}{2}\right)}\\
\mathbf{if}\;y.re \leq -2.5 \cdot 10^{+127}:\\
\;\;\;\;\cos t\_0 \cdot t\_1\\
\mathbf{elif}\;y.re \leq 780000000:\\
\;\;\;\;\frac{\cos \left(t\_0 + y.im \cdot \log \left(\mathsf{hypot}\left(x.re, x.im\right)\right)\right)}{\frac{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y.re < -2.5000000000000002e127Initial program 32.4%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f64N/A
pow-lowering-pow.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6485.4%
Simplified85.4%
*-commutativeN/A
sqrt-pow2N/A
+-commutativeN/A
sqrt-pow2N/A
*-lowering-*.f64N/A
sqrt-pow2N/A
pow-lowering-pow.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-commutativeN/A
cos-lowering-cos.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6485.4%
Applied egg-rr85.4%
if -2.5000000000000002e127 < y.re < 7.8e8Initial program 45.5%
exp-diffN/A
associate-*l/N/A
associate-/l*N/A
*-commutativeN/A
associate-/r/N/A
exp-diffN/A
Simplified84.0%
if 7.8e8 < y.re Initial program 34.9%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f64N/A
pow-lowering-pow.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6468.4%
Simplified68.4%
Taylor expanded in y.re around 0
Simplified79.5%
*-lft-identityN/A
sqrt-pow2N/A
pow-lowering-pow.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f6479.5%
Applied egg-rr79.5%
Final simplification83.1%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (pow (+ (* x.re x.re) (* x.im x.im)) (/ y.re 2.0))))
(if (<= y.re -3.1e+27)
(* (cos (* y.re (atan2 x.im x.re))) t_0)
(if (<= y.re 2450000.0)
(/
(cos (* y.im (log (hypot x.im x.re))))
(exp (* (atan2 x.im x.re) y.im)))
t_0))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = pow(((x_46_re * x_46_re) + (x_46_im * x_46_im)), (y_46_re / 2.0));
double tmp;
if (y_46_re <= -3.1e+27) {
tmp = cos((y_46_re * atan2(x_46_im, x_46_re))) * t_0;
} else if (y_46_re <= 2450000.0) {
tmp = cos((y_46_im * log(hypot(x_46_im, x_46_re)))) / exp((atan2(x_46_im, x_46_re) * y_46_im));
} else {
tmp = t_0;
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.pow(((x_46_re * x_46_re) + (x_46_im * x_46_im)), (y_46_re / 2.0));
double tmp;
if (y_46_re <= -3.1e+27) {
tmp = Math.cos((y_46_re * Math.atan2(x_46_im, x_46_re))) * t_0;
} else if (y_46_re <= 2450000.0) {
tmp = Math.cos((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re)))) / Math.exp((Math.atan2(x_46_im, x_46_re) * y_46_im));
} else {
tmp = t_0;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.pow(((x_46_re * x_46_re) + (x_46_im * x_46_im)), (y_46_re / 2.0)) tmp = 0 if y_46_re <= -3.1e+27: tmp = math.cos((y_46_re * math.atan2(x_46_im, x_46_re))) * t_0 elif y_46_re <= 2450000.0: tmp = math.cos((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) / math.exp((math.atan2(x_46_im, x_46_re) * y_46_im)) else: tmp = t_0 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)) ^ Float64(y_46_re / 2.0) tmp = 0.0 if (y_46_re <= -3.1e+27) tmp = Float64(cos(Float64(y_46_re * atan(x_46_im, x_46_re))) * t_0); elseif (y_46_re <= 2450000.0) tmp = Float64(cos(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) / exp(Float64(atan(x_46_im, x_46_re) * y_46_im))); else tmp = t_0; end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = ((x_46_re * x_46_re) + (x_46_im * x_46_im)) ^ (y_46_re / 2.0); tmp = 0.0; if (y_46_re <= -3.1e+27) tmp = cos((y_46_re * atan2(x_46_im, x_46_re))) * t_0; elseif (y_46_re <= 2450000.0) tmp = cos((y_46_im * log(hypot(x_46_im, x_46_re)))) / exp((atan2(x_46_im, x_46_re) * y_46_im)); else tmp = t_0; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Power[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision], N[(y$46$re / 2.0), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -3.1e+27], N[(N[Cos[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$0), $MachinePrecision], If[LessEqual[y$46$re, 2450000.0], N[(N[Cos[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\left(\frac{y.re}{2}\right)}\\
\mathbf{if}\;y.re \leq -3.1 \cdot 10^{+27}:\\
\;\;\;\;\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot t\_0\\
\mathbf{elif}\;y.re \leq 2450000:\\
\;\;\;\;\frac{\cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)}{e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if y.re < -3.09999999999999996e27Initial program 42.6%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f64N/A
pow-lowering-pow.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6485.4%
Simplified85.4%
*-commutativeN/A
sqrt-pow2N/A
+-commutativeN/A
sqrt-pow2N/A
*-lowering-*.f64N/A
sqrt-pow2N/A
pow-lowering-pow.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-commutativeN/A
cos-lowering-cos.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6485.4%
Applied egg-rr85.4%
if -3.09999999999999996e27 < y.re < 2.45e6Initial program 43.5%
exp-diffN/A
associate-*l/N/A
associate-/l*N/A
*-commutativeN/A
associate-/r/N/A
exp-diffN/A
Simplified83.0%
Taylor expanded in y.re around 0
/-lowering-/.f64N/A
cos-lowering-cos.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f64N/A
exp-lowering-exp.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6483.4%
Simplified83.4%
if 2.45e6 < y.re Initial program 34.9%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f64N/A
pow-lowering-pow.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6468.4%
Simplified68.4%
Taylor expanded in y.re around 0
Simplified79.5%
*-lft-identityN/A
sqrt-pow2N/A
pow-lowering-pow.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f6479.5%
Applied egg-rr79.5%
Final simplification82.9%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (pow (+ (* x.re x.re) (* x.im x.im)) (/ y.re 2.0))))
(if (<= y.re -300.0)
(* (cos (* y.re (atan2 x.im x.re))) t_0)
(if (<= y.re 2450000.0) (exp (- 0.0 (* (atan2 x.im x.re) y.im))) t_0))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = pow(((x_46_re * x_46_re) + (x_46_im * x_46_im)), (y_46_re / 2.0));
double tmp;
if (y_46_re <= -300.0) {
tmp = cos((y_46_re * atan2(x_46_im, x_46_re))) * t_0;
} else if (y_46_re <= 2450000.0) {
tmp = exp((0.0 - (atan2(x_46_im, x_46_re) * y_46_im)));
} else {
tmp = t_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) :: t_0
real(8) :: tmp
t_0 = ((x_46re * x_46re) + (x_46im * x_46im)) ** (y_46re / 2.0d0)
if (y_46re <= (-300.0d0)) then
tmp = cos((y_46re * atan2(x_46im, x_46re))) * t_0
else if (y_46re <= 2450000.0d0) then
tmp = exp((0.0d0 - (atan2(x_46im, x_46re) * y_46im)))
else
tmp = t_0
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 t_0 = Math.pow(((x_46_re * x_46_re) + (x_46_im * x_46_im)), (y_46_re / 2.0));
double tmp;
if (y_46_re <= -300.0) {
tmp = Math.cos((y_46_re * Math.atan2(x_46_im, x_46_re))) * t_0;
} else if (y_46_re <= 2450000.0) {
tmp = Math.exp((0.0 - (Math.atan2(x_46_im, x_46_re) * y_46_im)));
} else {
tmp = t_0;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.pow(((x_46_re * x_46_re) + (x_46_im * x_46_im)), (y_46_re / 2.0)) tmp = 0 if y_46_re <= -300.0: tmp = math.cos((y_46_re * math.atan2(x_46_im, x_46_re))) * t_0 elif y_46_re <= 2450000.0: tmp = math.exp((0.0 - (math.atan2(x_46_im, x_46_re) * y_46_im))) else: tmp = t_0 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)) ^ Float64(y_46_re / 2.0) tmp = 0.0 if (y_46_re <= -300.0) tmp = Float64(cos(Float64(y_46_re * atan(x_46_im, x_46_re))) * t_0); elseif (y_46_re <= 2450000.0) tmp = exp(Float64(0.0 - Float64(atan(x_46_im, x_46_re) * y_46_im))); else tmp = t_0; end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = ((x_46_re * x_46_re) + (x_46_im * x_46_im)) ^ (y_46_re / 2.0); tmp = 0.0; if (y_46_re <= -300.0) tmp = cos((y_46_re * atan2(x_46_im, x_46_re))) * t_0; elseif (y_46_re <= 2450000.0) tmp = exp((0.0 - (atan2(x_46_im, x_46_re) * y_46_im))); else tmp = t_0; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Power[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision], N[(y$46$re / 2.0), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -300.0], 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, 2450000.0], N[Exp[N[(0.0 - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\left(\frac{y.re}{2}\right)}\\
\mathbf{if}\;y.re \leq -300:\\
\;\;\;\;\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot t\_0\\
\mathbf{elif}\;y.re \leq 2450000:\\
\;\;\;\;e^{0 - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if y.re < -300Initial program 45.5%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f64N/A
pow-lowering-pow.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6483.5%
Simplified83.5%
*-commutativeN/A
sqrt-pow2N/A
+-commutativeN/A
sqrt-pow2N/A
*-lowering-*.f64N/A
sqrt-pow2N/A
pow-lowering-pow.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-commutativeN/A
cos-lowering-cos.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6483.5%
Applied egg-rr83.5%
if -300 < y.re < 2.45e6Initial program 42.0%
exp-diffN/A
associate-*l/N/A
associate-/l*N/A
*-commutativeN/A
associate-/r/N/A
exp-diffN/A
Simplified83.9%
Taylor expanded in y.im around 0
cos-lowering-cos.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6483.8%
Simplified83.8%
Taylor expanded in y.re around 0
rec-expN/A
exp-lowering-exp.f64N/A
neg-sub0N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6484.2%
Simplified84.2%
if 2.45e6 < y.re Initial program 34.9%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f64N/A
pow-lowering-pow.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6468.4%
Simplified68.4%
Taylor expanded in y.re around 0
Simplified79.5%
*-lft-identityN/A
sqrt-pow2N/A
pow-lowering-pow.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f6479.5%
Applied egg-rr79.5%
Final simplification82.9%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (pow (+ (* x.re x.re) (* x.im x.im)) (/ y.re 2.0))))
(if (<= y.re -300.0)
t_0
(if (<= y.re 14500000.0) (exp (- 0.0 (* (atan2 x.im x.re) y.im))) t_0))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = pow(((x_46_re * x_46_re) + (x_46_im * x_46_im)), (y_46_re / 2.0));
double tmp;
if (y_46_re <= -300.0) {
tmp = t_0;
} else if (y_46_re <= 14500000.0) {
tmp = exp((0.0 - (atan2(x_46_im, x_46_re) * y_46_im)));
} else {
tmp = t_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) :: t_0
real(8) :: tmp
t_0 = ((x_46re * x_46re) + (x_46im * x_46im)) ** (y_46re / 2.0d0)
if (y_46re <= (-300.0d0)) then
tmp = t_0
else if (y_46re <= 14500000.0d0) then
tmp = exp((0.0d0 - (atan2(x_46im, x_46re) * y_46im)))
else
tmp = t_0
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 t_0 = Math.pow(((x_46_re * x_46_re) + (x_46_im * x_46_im)), (y_46_re / 2.0));
double tmp;
if (y_46_re <= -300.0) {
tmp = t_0;
} else if (y_46_re <= 14500000.0) {
tmp = Math.exp((0.0 - (Math.atan2(x_46_im, x_46_re) * y_46_im)));
} else {
tmp = t_0;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.pow(((x_46_re * x_46_re) + (x_46_im * x_46_im)), (y_46_re / 2.0)) tmp = 0 if y_46_re <= -300.0: tmp = t_0 elif y_46_re <= 14500000.0: tmp = math.exp((0.0 - (math.atan2(x_46_im, x_46_re) * y_46_im))) else: tmp = t_0 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)) ^ Float64(y_46_re / 2.0) tmp = 0.0 if (y_46_re <= -300.0) tmp = t_0; elseif (y_46_re <= 14500000.0) tmp = exp(Float64(0.0 - Float64(atan(x_46_im, x_46_re) * y_46_im))); else tmp = t_0; end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = ((x_46_re * x_46_re) + (x_46_im * x_46_im)) ^ (y_46_re / 2.0); tmp = 0.0; if (y_46_re <= -300.0) tmp = t_0; elseif (y_46_re <= 14500000.0) tmp = exp((0.0 - (atan2(x_46_im, x_46_re) * y_46_im))); else tmp = t_0; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Power[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision], N[(y$46$re / 2.0), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -300.0], t$95$0, If[LessEqual[y$46$re, 14500000.0], N[Exp[N[(0.0 - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\left(\frac{y.re}{2}\right)}\\
\mathbf{if}\;y.re \leq -300:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y.re \leq 14500000:\\
\;\;\;\;e^{0 - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if y.re < -300 or 1.45e7 < y.re Initial program 40.3%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f64N/A
pow-lowering-pow.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6476.2%
Simplified76.2%
Taylor expanded in y.re around 0
Simplified80.0%
*-lft-identityN/A
sqrt-pow2N/A
pow-lowering-pow.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f6480.0%
Applied egg-rr80.0%
if -300 < y.re < 1.45e7Initial program 42.0%
exp-diffN/A
associate-*l/N/A
associate-/l*N/A
*-commutativeN/A
associate-/r/N/A
exp-diffN/A
Simplified83.9%
Taylor expanded in y.im around 0
cos-lowering-cos.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6483.8%
Simplified83.8%
Taylor expanded in y.re around 0
rec-expN/A
exp-lowering-exp.f64N/A
neg-sub0N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6484.2%
Simplified84.2%
Final simplification82.1%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (+ (* x.re x.re) (* x.im x.im))))
(if (<= y.im -92000000000.0)
(pow (* t_0 t_0) (/ 0.5 (/ 2.0 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 t_0 = (x_46_re * x_46_re) + (x_46_im * x_46_im);
double tmp;
if (y_46_im <= -92000000000.0) {
tmp = pow((t_0 * t_0), (0.5 / (2.0 / 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 t_0 = (x_46_re * x_46_re) + (x_46_im * x_46_im);
double tmp;
if (y_46_im <= -92000000000.0) {
tmp = Math.pow((t_0 * t_0), (0.5 / (2.0 / 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): t_0 = (x_46_re * x_46_re) + (x_46_im * x_46_im) tmp = 0 if y_46_im <= -92000000000.0: tmp = math.pow((t_0 * t_0), (0.5 / (2.0 / 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) t_0 = Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)) tmp = 0.0 if (y_46_im <= -92000000000.0) tmp = Float64(t_0 * t_0) ^ Float64(0.5 / Float64(2.0 / 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) t_0 = (x_46_re * x_46_re) + (x_46_im * x_46_im); tmp = 0.0; if (y_46_im <= -92000000000.0) tmp = (t_0 * t_0) ^ (0.5 / (2.0 / 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_] := Block[{t$95$0 = N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -92000000000.0], N[Power[N[(t$95$0 * t$95$0), $MachinePrecision], N[(0.5 / N[(2.0 / y$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x.re \cdot x.re + x.im \cdot x.im\\
\mathbf{if}\;y.im \leq -92000000000:\\
\;\;\;\;{\left(t\_0 \cdot t\_0\right)}^{\left(\frac{0.5}{\frac{2}{y.re}}\right)}\\
\mathbf{else}:\\
\;\;\;\;{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\end{array}
\end{array}
if y.im < -9.2e10Initial program 37.7%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f64N/A
pow-lowering-pow.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6437.1%
Simplified37.1%
Taylor expanded in y.re around 0
Simplified33.9%
*-lft-identityN/A
sqrt-pow2N/A
sqr-powN/A
pow-prod-downN/A
pow-lowering-pow.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
clear-numN/A
associate-/r/N/A
metadata-evalN/A
associate-*r/N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
/-lowering-/.f6451.0%
Applied egg-rr51.0%
if -9.2e10 < y.im Initial program 42.3%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f64N/A
pow-lowering-pow.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6473.2%
Simplified73.2%
Taylor expanded in y.re around 0
Simplified76.3%
Final simplification70.2%
(FPCore (x.re x.im y.re y.im) :precision binary64 (let* ((t_0 (pow (+ (* x.re x.re) (* x.im x.im)) (/ y.re 2.0)))) (if (<= y.re -300.0) t_0 (if (<= y.re 2450000.0) 1.0 t_0))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = pow(((x_46_re * x_46_re) + (x_46_im * x_46_im)), (y_46_re / 2.0));
double tmp;
if (y_46_re <= -300.0) {
tmp = t_0;
} else if (y_46_re <= 2450000.0) {
tmp = 1.0;
} else {
tmp = t_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) :: t_0
real(8) :: tmp
t_0 = ((x_46re * x_46re) + (x_46im * x_46im)) ** (y_46re / 2.0d0)
if (y_46re <= (-300.0d0)) then
tmp = t_0
else if (y_46re <= 2450000.0d0) then
tmp = 1.0d0
else
tmp = t_0
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 t_0 = Math.pow(((x_46_re * x_46_re) + (x_46_im * x_46_im)), (y_46_re / 2.0));
double tmp;
if (y_46_re <= -300.0) {
tmp = t_0;
} else if (y_46_re <= 2450000.0) {
tmp = 1.0;
} else {
tmp = t_0;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.pow(((x_46_re * x_46_re) + (x_46_im * x_46_im)), (y_46_re / 2.0)) tmp = 0 if y_46_re <= -300.0: tmp = t_0 elif y_46_re <= 2450000.0: tmp = 1.0 else: tmp = t_0 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)) ^ Float64(y_46_re / 2.0) tmp = 0.0 if (y_46_re <= -300.0) tmp = t_0; elseif (y_46_re <= 2450000.0) tmp = 1.0; else tmp = t_0; end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = ((x_46_re * x_46_re) + (x_46_im * x_46_im)) ^ (y_46_re / 2.0); tmp = 0.0; if (y_46_re <= -300.0) tmp = t_0; elseif (y_46_re <= 2450000.0) tmp = 1.0; else tmp = t_0; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Power[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision], N[(y$46$re / 2.0), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$re, -300.0], t$95$0, If[LessEqual[y$46$re, 2450000.0], 1.0, t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\left(\frac{y.re}{2}\right)}\\
\mathbf{if}\;y.re \leq -300:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y.re \leq 2450000:\\
\;\;\;\;1\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if y.re < -300 or 2.45e6 < y.re Initial program 40.3%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f64N/A
pow-lowering-pow.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6476.2%
Simplified76.2%
Taylor expanded in y.re around 0
Simplified80.0%
*-lft-identityN/A
sqrt-pow2N/A
pow-lowering-pow.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f6480.0%
Applied egg-rr80.0%
if -300 < y.re < 2.45e6Initial program 42.0%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f64N/A
pow-lowering-pow.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6452.6%
Simplified52.6%
Taylor expanded in y.re around 0
Simplified51.4%
Final simplification65.8%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (<= y.re -3.2e+221)
(pow x.re y.re)
(if (<= y.re -950000000000.0)
(pow x.im y.re)
(if (<= y.re 2450000.0) 1.0 (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 (y_46_re <= -3.2e+221) {
tmp = pow(x_46_re, y_46_re);
} else if (y_46_re <= -950000000000.0) {
tmp = pow(x_46_im, y_46_re);
} else if (y_46_re <= 2450000.0) {
tmp = 1.0;
} 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 (y_46re <= (-3.2d+221)) then
tmp = x_46re ** y_46re
else if (y_46re <= (-950000000000.0d0)) then
tmp = x_46im ** y_46re
else if (y_46re <= 2450000.0d0) then
tmp = 1.0d0
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 (y_46_re <= -3.2e+221) {
tmp = Math.pow(x_46_re, y_46_re);
} else if (y_46_re <= -950000000000.0) {
tmp = Math.pow(x_46_im, y_46_re);
} else if (y_46_re <= 2450000.0) {
tmp = 1.0;
} 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 y_46_re <= -3.2e+221: tmp = math.pow(x_46_re, y_46_re) elif y_46_re <= -950000000000.0: tmp = math.pow(x_46_im, y_46_re) elif y_46_re <= 2450000.0: tmp = 1.0 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 (y_46_re <= -3.2e+221) tmp = x_46_re ^ y_46_re; elseif (y_46_re <= -950000000000.0) tmp = x_46_im ^ y_46_re; elseif (y_46_re <= 2450000.0) tmp = 1.0; 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 (y_46_re <= -3.2e+221) tmp = x_46_re ^ y_46_re; elseif (y_46_re <= -950000000000.0) tmp = x_46_im ^ y_46_re; elseif (y_46_re <= 2450000.0) tmp = 1.0; 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[y$46$re, -3.2e+221], N[Power[x$46$re, y$46$re], $MachinePrecision], If[LessEqual[y$46$re, -950000000000.0], N[Power[x$46$im, y$46$re], $MachinePrecision], If[LessEqual[y$46$re, 2450000.0], 1.0, N[Power[x$46$re, y$46$re], $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq -3.2 \cdot 10^{+221}:\\
\;\;\;\;{x.re}^{y.re}\\
\mathbf{elif}\;y.re \leq -950000000000:\\
\;\;\;\;{x.im}^{y.re}\\
\mathbf{elif}\;y.re \leq 2450000:\\
\;\;\;\;1\\
\mathbf{else}:\\
\;\;\;\;{x.re}^{y.re}\\
\end{array}
\end{array}
if y.re < -3.2e221 or 2.45e6 < y.re Initial program 33.8%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f64N/A
pow-lowering-pow.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6472.7%
Simplified72.7%
Taylor expanded in y.re around 0
Simplified81.4%
Taylor expanded in x.im around 0
pow-lowering-pow.f6469.2%
Simplified69.2%
if -3.2e221 < y.re < -9.5e11Initial program 50.0%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f64N/A
pow-lowering-pow.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6482.8%
Simplified82.8%
Taylor expanded in y.re around 0
Simplified78.5%
Taylor expanded in x.re around 0
pow-lowering-pow.f6465.6%
Simplified65.6%
if -9.5e11 < y.re < 2.45e6Initial program 42.6%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f64N/A
pow-lowering-pow.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6453.0%
Simplified53.0%
Taylor expanded in y.re around 0
Simplified50.3%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (<= x.re -490.0) (pow (- 0.0 x.re) y.re) (if (<= x.re 0.0025) (pow (* x.im x.im) (/ y.re 2.0)) (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 <= -490.0) {
tmp = pow((0.0 - x_46_re), y_46_re);
} else if (x_46_re <= 0.0025) {
tmp = pow((x_46_im * x_46_im), (y_46_re / 2.0));
} 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 <= (-490.0d0)) then
tmp = (0.0d0 - x_46re) ** y_46re
else if (x_46re <= 0.0025d0) then
tmp = (x_46im * x_46im) ** (y_46re / 2.0d0)
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 <= -490.0) {
tmp = Math.pow((0.0 - x_46_re), y_46_re);
} else if (x_46_re <= 0.0025) {
tmp = Math.pow((x_46_im * x_46_im), (y_46_re / 2.0));
} 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 <= -490.0: tmp = math.pow((0.0 - x_46_re), y_46_re) elif x_46_re <= 0.0025: tmp = math.pow((x_46_im * x_46_im), (y_46_re / 2.0)) 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 <= -490.0) tmp = Float64(0.0 - x_46_re) ^ y_46_re; elseif (x_46_re <= 0.0025) tmp = Float64(x_46_im * x_46_im) ^ Float64(y_46_re / 2.0); 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 <= -490.0) tmp = (0.0 - x_46_re) ^ y_46_re; elseif (x_46_re <= 0.0025) tmp = (x_46_im * x_46_im) ^ (y_46_re / 2.0); 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, -490.0], N[Power[N[(0.0 - x$46$re), $MachinePrecision], y$46$re], $MachinePrecision], If[LessEqual[x$46$re, 0.0025], N[Power[N[(x$46$im * x$46$im), $MachinePrecision], N[(y$46$re / 2.0), $MachinePrecision]], $MachinePrecision], N[Power[x$46$re, y$46$re], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x.re \leq -490:\\
\;\;\;\;{\left(0 - x.re\right)}^{y.re}\\
\mathbf{elif}\;x.re \leq 0.0025:\\
\;\;\;\;{\left(x.im \cdot x.im\right)}^{\left(\frac{y.re}{2}\right)}\\
\mathbf{else}:\\
\;\;\;\;{x.re}^{y.re}\\
\end{array}
\end{array}
if x.re < -490Initial program 36.7%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f64N/A
pow-lowering-pow.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6458.6%
Simplified58.6%
Taylor expanded in y.re around 0
Simplified60.7%
Taylor expanded in x.re around -inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6460.7%
Simplified60.7%
if -490 < x.re < 0.00250000000000000005Initial program 51.6%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f64N/A
pow-lowering-pow.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6461.1%
Simplified61.1%
Taylor expanded in y.re around 0
Simplified61.8%
Taylor expanded in x.re around 0
pow-lowering-pow.f6447.5%
Simplified47.5%
sqr-powN/A
pow-prod-downN/A
pow-lowering-pow.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f6456.8%
Applied egg-rr56.8%
if 0.00250000000000000005 < x.re Initial program 24.2%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f64N/A
pow-lowering-pow.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6475.0%
Simplified75.0%
Taylor expanded in y.re around 0
Simplified77.9%
Taylor expanded in x.im around 0
pow-lowering-pow.f6477.9%
Simplified77.9%
Final simplification63.4%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (<= x.im -1.7e-19) (pow (- 0.0 x.im) y.re) (if (<= x.im 2.65e-14) (pow x.re y.re) (pow x.im y.re))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (x_46_im <= -1.7e-19) {
tmp = pow((0.0 - x_46_im), y_46_re);
} else if (x_46_im <= 2.65e-14) {
tmp = pow(x_46_re, y_46_re);
} else {
tmp = pow(x_46_im, y_46_re);
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: tmp
if (x_46im <= (-1.7d-19)) then
tmp = (0.0d0 - x_46im) ** y_46re
else if (x_46im <= 2.65d-14) then
tmp = x_46re ** y_46re
else
tmp = x_46im ** y_46re
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (x_46_im <= -1.7e-19) {
tmp = Math.pow((0.0 - x_46_im), y_46_re);
} else if (x_46_im <= 2.65e-14) {
tmp = Math.pow(x_46_re, y_46_re);
} else {
tmp = Math.pow(x_46_im, y_46_re);
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if x_46_im <= -1.7e-19: tmp = math.pow((0.0 - x_46_im), y_46_re) elif x_46_im <= 2.65e-14: tmp = math.pow(x_46_re, y_46_re) else: tmp = math.pow(x_46_im, y_46_re) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if (x_46_im <= -1.7e-19) tmp = Float64(0.0 - x_46_im) ^ y_46_re; elseif (x_46_im <= 2.65e-14) tmp = x_46_re ^ y_46_re; else tmp = x_46_im ^ y_46_re; end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if (x_46_im <= -1.7e-19) tmp = (0.0 - x_46_im) ^ y_46_re; elseif (x_46_im <= 2.65e-14) tmp = x_46_re ^ y_46_re; else tmp = x_46_im ^ y_46_re; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[x$46$im, -1.7e-19], N[Power[N[(0.0 - x$46$im), $MachinePrecision], y$46$re], $MachinePrecision], If[LessEqual[x$46$im, 2.65e-14], N[Power[x$46$re, y$46$re], $MachinePrecision], N[Power[x$46$im, y$46$re], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x.im \leq -1.7 \cdot 10^{-19}:\\
\;\;\;\;{\left(0 - x.im\right)}^{y.re}\\
\mathbf{elif}\;x.im \leq 2.65 \cdot 10^{-14}:\\
\;\;\;\;{x.re}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;{x.im}^{y.re}\\
\end{array}
\end{array}
if x.im < -1.7000000000000001e-19Initial program 34.7%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f64N/A
pow-lowering-pow.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6458.9%
Simplified58.9%
Taylor expanded in y.re around 0
Simplified62.9%
Taylor expanded in x.im around -inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6461.6%
Simplified61.6%
if -1.7000000000000001e-19 < x.im < 2.6500000000000001e-14Initial program 49.5%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f64N/A
pow-lowering-pow.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6466.8%
Simplified66.8%
Taylor expanded in y.re around 0
Simplified66.8%
Taylor expanded in x.im around 0
pow-lowering-pow.f6458.4%
Simplified58.4%
if 2.6500000000000001e-14 < x.im Initial program 33.8%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f64N/A
pow-lowering-pow.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6466.8%
Simplified66.8%
Taylor expanded in y.re around 0
Simplified68.4%
Taylor expanded in x.re around 0
pow-lowering-pow.f6467.6%
Simplified67.6%
Final simplification61.7%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (<= y.re -950000000000.0) (pow x.im y.re) (if (<= y.re 1.36e-18) 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 <= -950000000000.0) {
tmp = pow(x_46_im, y_46_re);
} else if (y_46_re <= 1.36e-18) {
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 <= (-950000000000.0d0)) then
tmp = x_46im ** y_46re
else if (y_46re <= 1.36d-18) 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 <= -950000000000.0) {
tmp = Math.pow(x_46_im, y_46_re);
} else if (y_46_re <= 1.36e-18) {
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 <= -950000000000.0: tmp = math.pow(x_46_im, y_46_re) elif y_46_re <= 1.36e-18: 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 <= -950000000000.0) tmp = x_46_im ^ y_46_re; elseif (y_46_re <= 1.36e-18) 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 <= -950000000000.0) tmp = x_46_im ^ y_46_re; elseif (y_46_re <= 1.36e-18) 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, -950000000000.0], N[Power[x$46$im, y$46$re], $MachinePrecision], If[LessEqual[y$46$re, 1.36e-18], 1.0, N[Power[x$46$im, y$46$re], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq -950000000000:\\
\;\;\;\;{x.im}^{y.re}\\
\mathbf{elif}\;y.re \leq 1.36 \cdot 10^{-18}:\\
\;\;\;\;1\\
\mathbf{else}:\\
\;\;\;\;{x.im}^{y.re}\\
\end{array}
\end{array}
if y.re < -9.5e11 or 1.3600000000000001e-18 < y.re Initial program 39.5%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f64N/A
pow-lowering-pow.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6476.2%
Simplified76.2%
Taylor expanded in y.re around 0
Simplified79.3%
Taylor expanded in x.re around 0
pow-lowering-pow.f6458.7%
Simplified58.7%
if -9.5e11 < y.re < 1.3600000000000001e-18Initial program 42.8%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f64N/A
pow-lowering-pow.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6452.6%
Simplified52.6%
Taylor expanded in y.re around 0
Simplified50.7%
(FPCore (x.re x.im y.re y.im) :precision binary64 1.0)
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return 1.0;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
code = 1.0d0
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return 1.0;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): return 1.0
function code(x_46_re, x_46_im, y_46_re, y_46_im) return 1.0 end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 1.0; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := 1.0
\begin{array}{l}
\\
1
\end{array}
Initial program 41.2%
Taylor expanded in y.im around 0
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f64N/A
pow-lowering-pow.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6464.5%
Simplified64.5%
Taylor expanded in y.re around 0
Simplified26.9%
herbie shell --seed 2024145
(FPCore (x.re x.im y.re y.im)
:name "powComplex, real part"
:precision binary64
(* (exp (- (* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.re) (* (atan2 x.im x.re) y.im))) (cos (+ (* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.im) (* (atan2 x.im x.re) y.re)))))