
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (sqrt (+ (* x.re x.re) (* x.im x.im))))))
(*
(exp (- (* t_0 y.re) (* (atan2 x.im x.re) y.im)))
(cos (+ (* t_0 y.im) (* (atan2 x.im x.re) y.re))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
return exp(((t_0 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * cos(((t_0 * y_46_im) + (atan2(x_46_im, x_46_re) * y_46_re)));
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
t_0 = log(sqrt(((x_46re * x_46re) + (x_46im * x_46im))))
code = exp(((t_0 * y_46re) - (atan2(x_46im, x_46re) * y_46im))) * cos(((t_0 * y_46im) + (atan2(x_46im, x_46re) * y_46re)))
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
return Math.exp(((t_0 * y_46_re) - (Math.atan2(x_46_im, x_46_re) * y_46_im))) * Math.cos(((t_0 * y_46_im) + (Math.atan2(x_46_im, x_46_re) * y_46_re)));
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) return math.exp(((t_0 * y_46_re) - (math.atan2(x_46_im, x_46_re) * y_46_im))) * math.cos(((t_0 * y_46_im) + (math.atan2(x_46_im, x_46_re) * y_46_re)))
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) return Float64(exp(Float64(Float64(t_0 * y_46_re) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * cos(Float64(Float64(t_0 * y_46_im) + Float64(atan(x_46_im, x_46_re) * y_46_re)))) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))); tmp = exp(((t_0 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * cos(((t_0 * y_46_im) + (atan2(x_46_im, x_46_re) * y_46_re))); end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]}, N[(N[Exp[N[(N[(t$95$0 * y$46$re), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Cos[N[(N[(t$95$0 * y$46$im), $MachinePrecision] + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)\\
e^{t\_0 \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \cos \left(t\_0 \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)
\end{array}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 17 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (sqrt (+ (* x.re x.re) (* x.im x.im))))))
(*
(exp (- (* t_0 y.re) (* (atan2 x.im x.re) y.im)))
(cos (+ (* t_0 y.im) (* (atan2 x.im x.re) y.re))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
return exp(((t_0 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * cos(((t_0 * y_46_im) + (atan2(x_46_im, x_46_re) * y_46_re)));
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
t_0 = log(sqrt(((x_46re * x_46re) + (x_46im * x_46im))))
code = exp(((t_0 * y_46re) - (atan2(x_46im, x_46re) * y_46im))) * cos(((t_0 * y_46im) + (atan2(x_46im, x_46re) * y_46re)))
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
return Math.exp(((t_0 * y_46_re) - (Math.atan2(x_46_im, x_46_re) * y_46_im))) * Math.cos(((t_0 * y_46_im) + (Math.atan2(x_46_im, x_46_re) * y_46_re)));
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) return math.exp(((t_0 * y_46_re) - (math.atan2(x_46_im, x_46_re) * y_46_im))) * math.cos(((t_0 * y_46_im) + (math.atan2(x_46_im, x_46_re) * y_46_re)))
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) return Float64(exp(Float64(Float64(t_0 * y_46_re) - Float64(atan(x_46_im, x_46_re) * y_46_im))) * cos(Float64(Float64(t_0 * y_46_im) + Float64(atan(x_46_im, x_46_re) * y_46_re)))) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))); tmp = exp(((t_0 * y_46_re) - (atan2(x_46_im, x_46_re) * y_46_im))) * cos(((t_0 * y_46_im) + (atan2(x_46_im, x_46_re) * y_46_re))); end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]}, N[(N[Exp[N[(N[(t$95$0 * y$46$re), $MachinePrecision] - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Cos[N[(N[(t$95$0 * y$46$im), $MachinePrecision] + N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$re), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)\\
e^{t\_0 \cdot y.re - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im} \cdot \cos \left(t\_0 \cdot y.im + \tan^{-1}_* \frac{x.im}{x.re} \cdot y.re\right)
\end{array}
\end{array}
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (hypot x.im x.re)))
(t_1 (* y.re (atan2 x.im x.re)))
(t_2 (exp (* y.im (atan2 x.im x.re))))
(t_3 (/ t_2 (pow (hypot x.re x.im) y.re))))
(if (<= y.im -1.35e+191)
(*
(- (cos t_1) (* (* y.im t_0) (sin t_1)))
(exp (* (atan2 x.im x.re) (- 0.0 y.im))))
(if (<= y.im -2e+16)
(/ 1.0 t_3)
(if (<= y.im 6.4e+154)
(/ (+ (* (* -0.5 (* y.im y.im)) (pow t_0 2.0)) 1.0) t_3)
(/ 1.0 t_2))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log(hypot(x_46_im, x_46_re));
double t_1 = y_46_re * atan2(x_46_im, x_46_re);
double t_2 = exp((y_46_im * atan2(x_46_im, x_46_re)));
double t_3 = t_2 / pow(hypot(x_46_re, x_46_im), y_46_re);
double tmp;
if (y_46_im <= -1.35e+191) {
tmp = (cos(t_1) - ((y_46_im * t_0) * sin(t_1))) * exp((atan2(x_46_im, x_46_re) * (0.0 - y_46_im)));
} else if (y_46_im <= -2e+16) {
tmp = 1.0 / t_3;
} else if (y_46_im <= 6.4e+154) {
tmp = (((-0.5 * (y_46_im * y_46_im)) * pow(t_0, 2.0)) + 1.0) / t_3;
} else {
tmp = 1.0 / 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 = Math.log(Math.hypot(x_46_im, x_46_re));
double t_1 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_2 = Math.exp((y_46_im * Math.atan2(x_46_im, x_46_re)));
double t_3 = t_2 / Math.pow(Math.hypot(x_46_re, x_46_im), y_46_re);
double tmp;
if (y_46_im <= -1.35e+191) {
tmp = (Math.cos(t_1) - ((y_46_im * t_0) * Math.sin(t_1))) * Math.exp((Math.atan2(x_46_im, x_46_re) * (0.0 - y_46_im)));
} else if (y_46_im <= -2e+16) {
tmp = 1.0 / t_3;
} else if (y_46_im <= 6.4e+154) {
tmp = (((-0.5 * (y_46_im * y_46_im)) * Math.pow(t_0, 2.0)) + 1.0) / t_3;
} else {
tmp = 1.0 / t_2;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.log(math.hypot(x_46_im, x_46_re)) t_1 = y_46_re * math.atan2(x_46_im, x_46_re) t_2 = math.exp((y_46_im * math.atan2(x_46_im, x_46_re))) t_3 = t_2 / math.pow(math.hypot(x_46_re, x_46_im), y_46_re) tmp = 0 if y_46_im <= -1.35e+191: tmp = (math.cos(t_1) - ((y_46_im * t_0) * math.sin(t_1))) * math.exp((math.atan2(x_46_im, x_46_re) * (0.0 - y_46_im))) elif y_46_im <= -2e+16: tmp = 1.0 / t_3 elif y_46_im <= 6.4e+154: tmp = (((-0.5 * (y_46_im * y_46_im)) * math.pow(t_0, 2.0)) + 1.0) / t_3 else: tmp = 1.0 / t_2 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_im, x_46_re)) t_1 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_2 = exp(Float64(y_46_im * atan(x_46_im, x_46_re))) t_3 = Float64(t_2 / (hypot(x_46_re, x_46_im) ^ y_46_re)) tmp = 0.0 if (y_46_im <= -1.35e+191) tmp = Float64(Float64(cos(t_1) - Float64(Float64(y_46_im * t_0) * sin(t_1))) * exp(Float64(atan(x_46_im, x_46_re) * Float64(0.0 - y_46_im)))); elseif (y_46_im <= -2e+16) tmp = Float64(1.0 / t_3); elseif (y_46_im <= 6.4e+154) tmp = Float64(Float64(Float64(Float64(-0.5 * Float64(y_46_im * y_46_im)) * (t_0 ^ 2.0)) + 1.0) / t_3); else tmp = Float64(1.0 / t_2); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(hypot(x_46_im, x_46_re)); t_1 = y_46_re * atan2(x_46_im, x_46_re); t_2 = exp((y_46_im * atan2(x_46_im, x_46_re))); t_3 = t_2 / (hypot(x_46_re, x_46_im) ^ y_46_re); tmp = 0.0; if (y_46_im <= -1.35e+191) tmp = (cos(t_1) - ((y_46_im * t_0) * sin(t_1))) * exp((atan2(x_46_im, x_46_re) * (0.0 - y_46_im))); elseif (y_46_im <= -2e+16) tmp = 1.0 / t_3; elseif (y_46_im <= 6.4e+154) tmp = (((-0.5 * (y_46_im * y_46_im)) * (t_0 ^ 2.0)) + 1.0) / t_3; else tmp = 1.0 / 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[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Exp[N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 / N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -1.35e+191], N[(N[(N[Cos[t$95$1], $MachinePrecision] - N[(N[(y$46$im * t$95$0), $MachinePrecision] * N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Exp[N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * N[(0.0 - y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, -2e+16], N[(1.0 / t$95$3), $MachinePrecision], If[LessEqual[y$46$im, 6.4e+154], N[(N[(N[(N[(-0.5 * N[(y$46$im * y$46$im), $MachinePrecision]), $MachinePrecision] * N[Power[t$95$0, 2.0], $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision] / t$95$3), $MachinePrecision], N[(1.0 / t$95$2), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_2 := e^{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\\
t_3 := \frac{t\_2}{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}\\
\mathbf{if}\;y.im \leq -1.35 \cdot 10^{+191}:\\
\;\;\;\;\left(\cos t\_1 - \left(y.im \cdot t\_0\right) \cdot \sin t\_1\right) \cdot e^{\tan^{-1}_* \frac{x.im}{x.re} \cdot \left(0 - y.im\right)}\\
\mathbf{elif}\;y.im \leq -2 \cdot 10^{+16}:\\
\;\;\;\;\frac{1}{t\_3}\\
\mathbf{elif}\;y.im \leq 6.4 \cdot 10^{+154}:\\
\;\;\;\;\frac{\left(-0.5 \cdot \left(y.im \cdot y.im\right)\right) \cdot {t\_0}^{2} + 1}{t\_3}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{t\_2}\\
\end{array}
\end{array}
if y.im < -1.34999999999999998e191Initial program 42.9%
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
Simplified74.5%
Taylor expanded in y.re around 0
exp-lowering-exp.f64N/A
distribute-rgt-neg-inN/A
mul-1-negN/A
*-lowering-*.f64N/A
mul-1-negN/A
neg-sub0N/A
--lowering--.f64N/A
atan2-lowering-atan2.f6480.1%
Simplified80.1%
if -1.34999999999999998e191 < y.im < -2e16Initial program 34.1%
exp-diffN/A
associate-*l/N/A
associate-/l*N/A
*-commutativeN/A
associate-/r/N/A
exp-diffN/A
Simplified52.4%
Taylor expanded in y.re around 0
cos-lowering-cos.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6450.0%
Simplified50.0%
Taylor expanded in y.im around 0
Simplified68.4%
if -2e16 < y.im < 6.4e154Initial program 43.4%
exp-diffN/A
associate-*l/N/A
associate-/l*N/A
*-commutativeN/A
associate-/r/N/A
exp-diffN/A
Simplified78.6%
Taylor expanded in y.re around 0
cos-lowering-cos.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6484.4%
Simplified84.4%
Taylor expanded in y.im around 0
+-lowering-+.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
log-lowering-log.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6489.3%
Simplified89.3%
if 6.4e154 < y.im Initial program 25.7%
exp-diffN/A
associate-*l/N/A
associate-/l*N/A
*-commutativeN/A
associate-/r/N/A
exp-diffN/A
Simplified51.4%
Taylor expanded in y.re around 0
cos-lowering-cos.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6454.3%
Simplified54.3%
Taylor expanded in y.im around 0
Simplified65.7%
Taylor expanded in y.re around 0
exp-lowering-exp.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6471.7%
Simplified71.7%
Final simplification82.3%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.im (atan2 x.im x.re)))
(t_1 (* y.re (atan2 x.im x.re)))
(t_2 (log (hypot x.im x.re)))
(t_3 (exp t_0)))
(if (<= y.im -2e+15)
(*
(exp (- (* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.re) t_0))
(- (cos t_1) (* (* y.im t_2) (sin t_1))))
(if (<= y.im 6.4e+154)
(/
(+ (* (* -0.5 (* y.im y.im)) (pow t_2 2.0)) 1.0)
(/ t_3 (pow (hypot x.re x.im) y.re)))
(/ 1.0 t_3)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_im * atan2(x_46_im, x_46_re);
double t_1 = y_46_re * atan2(x_46_im, x_46_re);
double t_2 = log(hypot(x_46_im, x_46_re));
double t_3 = exp(t_0);
double tmp;
if (y_46_im <= -2e+15) {
tmp = exp(((log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - t_0)) * (cos(t_1) - ((y_46_im * t_2) * sin(t_1)));
} else if (y_46_im <= 6.4e+154) {
tmp = (((-0.5 * (y_46_im * y_46_im)) * pow(t_2, 2.0)) + 1.0) / (t_3 / pow(hypot(x_46_re, x_46_im), y_46_re));
} else {
tmp = 1.0 / t_3;
}
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_im * Math.atan2(x_46_im, x_46_re);
double t_1 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_2 = Math.log(Math.hypot(x_46_im, x_46_re));
double t_3 = Math.exp(t_0);
double tmp;
if (y_46_im <= -2e+15) {
tmp = Math.exp(((Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - t_0)) * (Math.cos(t_1) - ((y_46_im * t_2) * Math.sin(t_1)));
} else if (y_46_im <= 6.4e+154) {
tmp = (((-0.5 * (y_46_im * y_46_im)) * Math.pow(t_2, 2.0)) + 1.0) / (t_3 / Math.pow(Math.hypot(x_46_re, x_46_im), y_46_re));
} else {
tmp = 1.0 / t_3;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = y_46_im * math.atan2(x_46_im, x_46_re) t_1 = y_46_re * math.atan2(x_46_im, x_46_re) t_2 = math.log(math.hypot(x_46_im, x_46_re)) t_3 = math.exp(t_0) tmp = 0 if y_46_im <= -2e+15: tmp = math.exp(((math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - t_0)) * (math.cos(t_1) - ((y_46_im * t_2) * math.sin(t_1))) elif y_46_im <= 6.4e+154: tmp = (((-0.5 * (y_46_im * y_46_im)) * math.pow(t_2, 2.0)) + 1.0) / (t_3 / math.pow(math.hypot(x_46_re, x_46_im), y_46_re)) else: tmp = 1.0 / t_3 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_im * atan(x_46_im, x_46_re)) t_1 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_2 = log(hypot(x_46_im, x_46_re)) t_3 = exp(t_0) tmp = 0.0 if (y_46_im <= -2e+15) tmp = Float64(exp(Float64(Float64(log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) * y_46_re) - t_0)) * Float64(cos(t_1) - Float64(Float64(y_46_im * t_2) * sin(t_1)))); elseif (y_46_im <= 6.4e+154) tmp = Float64(Float64(Float64(Float64(-0.5 * Float64(y_46_im * y_46_im)) * (t_2 ^ 2.0)) + 1.0) / Float64(t_3 / (hypot(x_46_re, x_46_im) ^ y_46_re))); else tmp = Float64(1.0 / t_3); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = y_46_im * atan2(x_46_im, x_46_re); t_1 = y_46_re * atan2(x_46_im, x_46_re); t_2 = log(hypot(x_46_im, x_46_re)); t_3 = exp(t_0); tmp = 0.0; if (y_46_im <= -2e+15) tmp = exp(((log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - t_0)) * (cos(t_1) - ((y_46_im * t_2) * sin(t_1))); elseif (y_46_im <= 6.4e+154) tmp = (((-0.5 * (y_46_im * y_46_im)) * (t_2 ^ 2.0)) + 1.0) / (t_3 / (hypot(x_46_re, x_46_im) ^ y_46_re)); else tmp = 1.0 / t_3; 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$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[Exp[t$95$0], $MachinePrecision]}, If[LessEqual[y$46$im, -2e+15], N[(N[Exp[N[(N[(N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * y$46$re), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision] * N[(N[Cos[t$95$1], $MachinePrecision] - N[(N[(y$46$im * t$95$2), $MachinePrecision] * N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 6.4e+154], N[(N[(N[(N[(-0.5 * N[(y$46$im * y$46$im), $MachinePrecision]), $MachinePrecision] * N[Power[t$95$2, 2.0], $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision] / N[(t$95$3 / N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 / t$95$3), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_2 := \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
t_3 := e^{t\_0}\\
\mathbf{if}\;y.im \leq -2 \cdot 10^{+15}:\\
\;\;\;\;e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - t\_0} \cdot \left(\cos t\_1 - \left(y.im \cdot t\_2\right) \cdot \sin t\_1\right)\\
\mathbf{elif}\;y.im \leq 6.4 \cdot 10^{+154}:\\
\;\;\;\;\frac{\left(-0.5 \cdot \left(y.im \cdot y.im\right)\right) \cdot {t\_2}^{2} + 1}{\frac{t\_3}{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{t\_3}\\
\end{array}
\end{array}
if y.im < -2e15Initial program 38.2%
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
Simplified69.9%
if -2e15 < y.im < 6.4e154Initial program 43.4%
exp-diffN/A
associate-*l/N/A
associate-/l*N/A
*-commutativeN/A
associate-/r/N/A
exp-diffN/A
Simplified78.6%
Taylor expanded in y.re around 0
cos-lowering-cos.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6484.4%
Simplified84.4%
Taylor expanded in y.im around 0
+-lowering-+.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
log-lowering-log.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6489.3%
Simplified89.3%
if 6.4e154 < y.im Initial program 25.7%
exp-diffN/A
associate-*l/N/A
associate-/l*N/A
*-commutativeN/A
associate-/r/N/A
exp-diffN/A
Simplified51.4%
Taylor expanded in y.re around 0
cos-lowering-cos.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6454.3%
Simplified54.3%
Taylor expanded in y.im around 0
Simplified65.7%
Taylor expanded in y.re around 0
exp-lowering-exp.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6471.7%
Simplified71.7%
Final simplification81.1%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (exp (* y.im (atan2 x.im x.re))))
(t_1 (/ t_0 (pow (hypot x.re x.im) y.re))))
(if (<= y.im -1.35e+14)
(/ 1.0 t_1)
(if (<= y.im 6.5e+154)
(/
(+ (* (* -0.5 (* y.im y.im)) (pow (log (hypot x.im x.re)) 2.0)) 1.0)
t_1)
(/ 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 = exp((y_46_im * atan2(x_46_im, x_46_re)));
double t_1 = t_0 / pow(hypot(x_46_re, x_46_im), y_46_re);
double tmp;
if (y_46_im <= -1.35e+14) {
tmp = 1.0 / t_1;
} else if (y_46_im <= 6.5e+154) {
tmp = (((-0.5 * (y_46_im * y_46_im)) * pow(log(hypot(x_46_im, x_46_re)), 2.0)) + 1.0) / t_1;
} else {
tmp = 1.0 / 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.exp((y_46_im * Math.atan2(x_46_im, x_46_re)));
double t_1 = t_0 / Math.pow(Math.hypot(x_46_re, x_46_im), y_46_re);
double tmp;
if (y_46_im <= -1.35e+14) {
tmp = 1.0 / t_1;
} else if (y_46_im <= 6.5e+154) {
tmp = (((-0.5 * (y_46_im * y_46_im)) * Math.pow(Math.log(Math.hypot(x_46_im, x_46_re)), 2.0)) + 1.0) / t_1;
} else {
tmp = 1.0 / t_0;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.exp((y_46_im * math.atan2(x_46_im, x_46_re))) t_1 = t_0 / math.pow(math.hypot(x_46_re, x_46_im), y_46_re) tmp = 0 if y_46_im <= -1.35e+14: tmp = 1.0 / t_1 elif y_46_im <= 6.5e+154: tmp = (((-0.5 * (y_46_im * y_46_im)) * math.pow(math.log(math.hypot(x_46_im, x_46_re)), 2.0)) + 1.0) / t_1 else: tmp = 1.0 / t_0 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = exp(Float64(y_46_im * atan(x_46_im, x_46_re))) t_1 = Float64(t_0 / (hypot(x_46_re, x_46_im) ^ y_46_re)) tmp = 0.0 if (y_46_im <= -1.35e+14) tmp = Float64(1.0 / t_1); elseif (y_46_im <= 6.5e+154) tmp = Float64(Float64(Float64(Float64(-0.5 * Float64(y_46_im * y_46_im)) * (log(hypot(x_46_im, x_46_re)) ^ 2.0)) + 1.0) / t_1); else tmp = Float64(1.0 / t_0); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = exp((y_46_im * atan2(x_46_im, x_46_re))); t_1 = t_0 / (hypot(x_46_re, x_46_im) ^ y_46_re); tmp = 0.0; if (y_46_im <= -1.35e+14) tmp = 1.0 / t_1; elseif (y_46_im <= 6.5e+154) tmp = (((-0.5 * (y_46_im * y_46_im)) * (log(hypot(x_46_im, x_46_re)) ^ 2.0)) + 1.0) / t_1; else tmp = 1.0 / 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[Exp[N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(t$95$0 / N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -1.35e+14], N[(1.0 / t$95$1), $MachinePrecision], If[LessEqual[y$46$im, 6.5e+154], N[(N[(N[(N[(-0.5 * N[(y$46$im * y$46$im), $MachinePrecision]), $MachinePrecision] * N[Power[N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision] / t$95$1), $MachinePrecision], N[(1.0 / t$95$0), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := e^{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\\
t_1 := \frac{t\_0}{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}\\
\mathbf{if}\;y.im \leq -1.35 \cdot 10^{+14}:\\
\;\;\;\;\frac{1}{t\_1}\\
\mathbf{elif}\;y.im \leq 6.5 \cdot 10^{+154}:\\
\;\;\;\;\frac{\left(-0.5 \cdot \left(y.im \cdot y.im\right)\right) \cdot {\log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{2} + 1}{t\_1}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{t\_0}\\
\end{array}
\end{array}
if y.im < -1.35e14Initial program 38.2%
exp-diffN/A
associate-*l/N/A
associate-/l*N/A
*-commutativeN/A
associate-/r/N/A
exp-diffN/A
Simplified57.2%
Taylor expanded in y.re around 0
cos-lowering-cos.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6455.9%
Simplified55.9%
Taylor expanded in y.im around 0
Simplified67.2%
if -1.35e14 < y.im < 6.5000000000000005e154Initial program 43.4%
exp-diffN/A
associate-*l/N/A
associate-/l*N/A
*-commutativeN/A
associate-/r/N/A
exp-diffN/A
Simplified78.6%
Taylor expanded in y.re around 0
cos-lowering-cos.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6484.4%
Simplified84.4%
Taylor expanded in y.im around 0
+-lowering-+.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
pow-lowering-pow.f64N/A
log-lowering-log.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6489.3%
Simplified89.3%
if 6.5000000000000005e154 < y.im Initial program 25.7%
exp-diffN/A
associate-*l/N/A
associate-/l*N/A
*-commutativeN/A
associate-/r/N/A
exp-diffN/A
Simplified51.4%
Taylor expanded in y.re around 0
cos-lowering-cos.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6454.3%
Simplified54.3%
Taylor expanded in y.im around 0
Simplified65.7%
Taylor expanded in y.re around 0
exp-lowering-exp.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6471.7%
Simplified71.7%
Final simplification80.3%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.im (atan2 x.im x.re))) (t_1 (exp t_0)))
(if (<= y.im 4.4e+14)
(/ 1.0 (/ t_1 (pow (hypot x.re x.im) y.re)))
(if (<= y.im 1.3e+146)
(*
(exp (- (* (log (sqrt (+ (* x.re x.re) (* x.im x.im)))) y.re) t_0))
(cos (* y.im (log (hypot x.im x.re)))))
(/ 1.0 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_im * atan2(x_46_im, x_46_re);
double t_1 = exp(t_0);
double tmp;
if (y_46_im <= 4.4e+14) {
tmp = 1.0 / (t_1 / pow(hypot(x_46_re, x_46_im), y_46_re));
} else if (y_46_im <= 1.3e+146) {
tmp = exp(((log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - t_0)) * cos((y_46_im * log(hypot(x_46_im, x_46_re))));
} else {
tmp = 1.0 / 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_im * Math.atan2(x_46_im, x_46_re);
double t_1 = Math.exp(t_0);
double tmp;
if (y_46_im <= 4.4e+14) {
tmp = 1.0 / (t_1 / Math.pow(Math.hypot(x_46_re, x_46_im), y_46_re));
} else if (y_46_im <= 1.3e+146) {
tmp = Math.exp(((Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - t_0)) * Math.cos((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re))));
} else {
tmp = 1.0 / t_1;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = y_46_im * math.atan2(x_46_im, x_46_re) t_1 = math.exp(t_0) tmp = 0 if y_46_im <= 4.4e+14: tmp = 1.0 / (t_1 / math.pow(math.hypot(x_46_re, x_46_im), y_46_re)) elif y_46_im <= 1.3e+146: tmp = math.exp(((math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - t_0)) * math.cos((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) else: tmp = 1.0 / t_1 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_im * atan(x_46_im, x_46_re)) t_1 = exp(t_0) tmp = 0.0 if (y_46_im <= 4.4e+14) tmp = Float64(1.0 / Float64(t_1 / (hypot(x_46_re, x_46_im) ^ y_46_re))); elseif (y_46_im <= 1.3e+146) tmp = Float64(exp(Float64(Float64(log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) * y_46_re) - t_0)) * cos(Float64(y_46_im * log(hypot(x_46_im, x_46_re))))); else tmp = Float64(1.0 / 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_im * atan2(x_46_im, x_46_re); t_1 = exp(t_0); tmp = 0.0; if (y_46_im <= 4.4e+14) tmp = 1.0 / (t_1 / (hypot(x_46_re, x_46_im) ^ y_46_re)); elseif (y_46_im <= 1.3e+146) tmp = exp(((log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) * y_46_re) - t_0)) * cos((y_46_im * log(hypot(x_46_im, x_46_re)))); else tmp = 1.0 / 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$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Exp[t$95$0], $MachinePrecision]}, If[LessEqual[y$46$im, 4.4e+14], N[(1.0 / N[(t$95$1 / N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 1.3e+146], N[(N[Exp[N[(N[(N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * y$46$re), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision] * N[Cos[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(1.0 / t$95$1), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := e^{t\_0}\\
\mathbf{if}\;y.im \leq 4.4 \cdot 10^{+14}:\\
\;\;\;\;\frac{1}{\frac{t\_1}{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}}\\
\mathbf{elif}\;y.im \leq 1.3 \cdot 10^{+146}:\\
\;\;\;\;e^{\log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right) \cdot y.re - t\_0} \cdot \cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{t\_1}\\
\end{array}
\end{array}
if y.im < 4.4e14Initial program 43.0%
exp-diffN/A
associate-*l/N/A
associate-/l*N/A
*-commutativeN/A
associate-/r/N/A
exp-diffN/A
Simplified74.9%
Taylor expanded in y.re around 0
cos-lowering-cos.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6478.7%
Simplified78.7%
Taylor expanded in y.im around 0
Simplified82.4%
if 4.4e14 < y.im < 1.30000000000000007e146Initial program 36.1%
Taylor expanded in y.re around 0
cos-lowering-cos.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6468.3%
Simplified68.3%
if 1.30000000000000007e146 < y.im Initial program 23.7%
exp-diffN/A
associate-*l/N/A
associate-/l*N/A
*-commutativeN/A
associate-/r/N/A
exp-diffN/A
Simplified50.0%
Taylor expanded in y.re around 0
cos-lowering-cos.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6452.6%
Simplified52.6%
Taylor expanded in y.im around 0
Simplified63.2%
Taylor expanded in y.re around 0
exp-lowering-exp.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6468.7%
Simplified68.7%
Final simplification79.0%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (log (/ 1.0 x.re)))
(t_1 (* y.im (atan2 x.im x.re)))
(t_2 (* y.re (atan2 x.im x.re))))
(if (<= x.re -6e+108)
(* (cos t_2) (exp (- (* (- 0.0 y.re) (log (/ -1.0 x.re))) t_1)))
(if (<= x.re 2.6e-31)
(/ 1.0 (/ (exp t_1) (pow (hypot x.re x.im) y.re)))
(* (cos (- t_2 (* y.im t_0))) (exp (- (* (- 0.0 y.re) t_0) t_1)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = log((1.0 / x_46_re));
double t_1 = y_46_im * atan2(x_46_im, x_46_re);
double t_2 = y_46_re * atan2(x_46_im, x_46_re);
double tmp;
if (x_46_re <= -6e+108) {
tmp = cos(t_2) * exp((((0.0 - y_46_re) * log((-1.0 / x_46_re))) - t_1));
} else if (x_46_re <= 2.6e-31) {
tmp = 1.0 / (exp(t_1) / pow(hypot(x_46_re, x_46_im), y_46_re));
} else {
tmp = cos((t_2 - (y_46_im * t_0))) * exp((((0.0 - y_46_re) * t_0) - 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 = Math.log((1.0 / x_46_re));
double t_1 = y_46_im * Math.atan2(x_46_im, x_46_re);
double t_2 = y_46_re * Math.atan2(x_46_im, x_46_re);
double tmp;
if (x_46_re <= -6e+108) {
tmp = Math.cos(t_2) * Math.exp((((0.0 - y_46_re) * Math.log((-1.0 / x_46_re))) - t_1));
} else if (x_46_re <= 2.6e-31) {
tmp = 1.0 / (Math.exp(t_1) / Math.pow(Math.hypot(x_46_re, x_46_im), y_46_re));
} else {
tmp = Math.cos((t_2 - (y_46_im * t_0))) * Math.exp((((0.0 - y_46_re) * t_0) - t_1));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.log((1.0 / x_46_re)) t_1 = y_46_im * math.atan2(x_46_im, x_46_re) t_2 = y_46_re * math.atan2(x_46_im, x_46_re) tmp = 0 if x_46_re <= -6e+108: tmp = math.cos(t_2) * math.exp((((0.0 - y_46_re) * math.log((-1.0 / x_46_re))) - t_1)) elif x_46_re <= 2.6e-31: tmp = 1.0 / (math.exp(t_1) / math.pow(math.hypot(x_46_re, x_46_im), y_46_re)) else: tmp = math.cos((t_2 - (y_46_im * t_0))) * math.exp((((0.0 - y_46_re) * t_0) - t_1)) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log(Float64(1.0 / x_46_re)) t_1 = Float64(y_46_im * atan(x_46_im, x_46_re)) t_2 = Float64(y_46_re * atan(x_46_im, x_46_re)) tmp = 0.0 if (x_46_re <= -6e+108) tmp = Float64(cos(t_2) * exp(Float64(Float64(Float64(0.0 - y_46_re) * log(Float64(-1.0 / x_46_re))) - t_1))); elseif (x_46_re <= 2.6e-31) tmp = Float64(1.0 / Float64(exp(t_1) / (hypot(x_46_re, x_46_im) ^ y_46_re))); else tmp = Float64(cos(Float64(t_2 - Float64(y_46_im * t_0))) * exp(Float64(Float64(Float64(0.0 - y_46_re) * t_0) - t_1))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = log((1.0 / x_46_re)); t_1 = y_46_im * atan2(x_46_im, x_46_re); t_2 = y_46_re * atan2(x_46_im, x_46_re); tmp = 0.0; if (x_46_re <= -6e+108) tmp = cos(t_2) * exp((((0.0 - y_46_re) * log((-1.0 / x_46_re))) - t_1)); elseif (x_46_re <= 2.6e-31) tmp = 1.0 / (exp(t_1) / (hypot(x_46_re, x_46_im) ^ y_46_re)); else tmp = cos((t_2 - (y_46_im * t_0))) * exp((((0.0 - y_46_re) * t_0) - 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[Log[N[(1.0 / x$46$re), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x$46$re, -6e+108], N[(N[Cos[t$95$2], $MachinePrecision] * N[Exp[N[(N[(N[(0.0 - y$46$re), $MachinePrecision] * N[Log[N[(-1.0 / x$46$re), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, 2.6e-31], N[(1.0 / N[(N[Exp[t$95$1], $MachinePrecision] / N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Cos[N[(t$95$2 - N[(y$46$im * t$95$0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Exp[N[(N[(N[(0.0 - y$46$re), $MachinePrecision] * t$95$0), $MachinePrecision] - t$95$1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log \left(\frac{1}{x.re}\right)\\
t_1 := y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_2 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;x.re \leq -6 \cdot 10^{+108}:\\
\;\;\;\;\cos t\_2 \cdot e^{\left(0 - y.re\right) \cdot \log \left(\frac{-1}{x.re}\right) - t\_1}\\
\mathbf{elif}\;x.re \leq 2.6 \cdot 10^{-31}:\\
\;\;\;\;\frac{1}{\frac{e^{t\_1}}{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}}\\
\mathbf{else}:\\
\;\;\;\;\cos \left(t\_2 - y.im \cdot t\_0\right) \cdot e^{\left(0 - y.re\right) \cdot t\_0 - t\_1}\\
\end{array}
\end{array}
if x.re < -5.99999999999999968e108Initial program 8.8%
Taylor expanded in x.re around -inf
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
/-lowering-/.f64N/A
exp-lowering-exp.f64N/A
--lowering--.f64N/A
Simplified79.9%
Taylor expanded in y.im around 0
cos-lowering-cos.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6485.8%
Simplified85.8%
if -5.99999999999999968e108 < x.re < 2.59999999999999995e-31Initial program 46.8%
exp-diffN/A
associate-*l/N/A
associate-/l*N/A
*-commutativeN/A
associate-/r/N/A
exp-diffN/A
Simplified69.2%
Taylor expanded in y.re around 0
cos-lowering-cos.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6476.3%
Simplified76.3%
Taylor expanded in y.im around 0
Simplified79.2%
if 2.59999999999999995e-31 < x.re Initial program 37.9%
Taylor expanded in x.re around inf
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
/-lowering-/.f64N/A
exp-lowering-exp.f64N/A
--lowering--.f64N/A
Simplified73.5%
Final simplification78.6%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.im (atan2 x.im x.re)))
(t_1 (* y.re (atan2 x.im x.re)))
(t_2 (exp t_0)))
(if (<= x.re -6e+108)
(* (cos t_1) (exp (- (* (- 0.0 y.re) (log (/ -1.0 x.re))) t_0)))
(if (<= x.re 1.9e-32)
(/ 1.0 (/ t_2 (pow (hypot x.re x.im) y.re)))
(/ (* (cos (+ t_1 (* y.im (log x.re)))) (pow x.re 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_im * atan2(x_46_im, x_46_re);
double t_1 = y_46_re * atan2(x_46_im, x_46_re);
double t_2 = exp(t_0);
double tmp;
if (x_46_re <= -6e+108) {
tmp = cos(t_1) * exp((((0.0 - y_46_re) * log((-1.0 / x_46_re))) - t_0));
} else if (x_46_re <= 1.9e-32) {
tmp = 1.0 / (t_2 / pow(hypot(x_46_re, x_46_im), y_46_re));
} else {
tmp = (cos((t_1 + (y_46_im * log(x_46_re)))) * pow(x_46_re, y_46_re)) / 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_im * Math.atan2(x_46_im, x_46_re);
double t_1 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_2 = Math.exp(t_0);
double tmp;
if (x_46_re <= -6e+108) {
tmp = Math.cos(t_1) * Math.exp((((0.0 - y_46_re) * Math.log((-1.0 / x_46_re))) - t_0));
} else if (x_46_re <= 1.9e-32) {
tmp = 1.0 / (t_2 / Math.pow(Math.hypot(x_46_re, x_46_im), y_46_re));
} else {
tmp = (Math.cos((t_1 + (y_46_im * Math.log(x_46_re)))) * Math.pow(x_46_re, y_46_re)) / t_2;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = y_46_im * math.atan2(x_46_im, x_46_re) t_1 = y_46_re * math.atan2(x_46_im, x_46_re) t_2 = math.exp(t_0) tmp = 0 if x_46_re <= -6e+108: tmp = math.cos(t_1) * math.exp((((0.0 - y_46_re) * math.log((-1.0 / x_46_re))) - t_0)) elif x_46_re <= 1.9e-32: tmp = 1.0 / (t_2 / math.pow(math.hypot(x_46_re, x_46_im), y_46_re)) else: tmp = (math.cos((t_1 + (y_46_im * math.log(x_46_re)))) * math.pow(x_46_re, y_46_re)) / t_2 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_im * atan(x_46_im, x_46_re)) t_1 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_2 = exp(t_0) tmp = 0.0 if (x_46_re <= -6e+108) tmp = Float64(cos(t_1) * exp(Float64(Float64(Float64(0.0 - y_46_re) * log(Float64(-1.0 / x_46_re))) - t_0))); elseif (x_46_re <= 1.9e-32) tmp = Float64(1.0 / Float64(t_2 / (hypot(x_46_re, x_46_im) ^ y_46_re))); else tmp = Float64(Float64(cos(Float64(t_1 + Float64(y_46_im * log(x_46_re)))) * (x_46_re ^ y_46_re)) / 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_im * atan2(x_46_im, x_46_re); t_1 = y_46_re * atan2(x_46_im, x_46_re); t_2 = exp(t_0); tmp = 0.0; if (x_46_re <= -6e+108) tmp = cos(t_1) * exp((((0.0 - y_46_re) * log((-1.0 / x_46_re))) - t_0)); elseif (x_46_re <= 1.9e-32) tmp = 1.0 / (t_2 / (hypot(x_46_re, x_46_im) ^ y_46_re)); else tmp = (cos((t_1 + (y_46_im * log(x_46_re)))) * (x_46_re ^ y_46_re)) / 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$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Exp[t$95$0], $MachinePrecision]}, If[LessEqual[x$46$re, -6e+108], N[(N[Cos[t$95$1], $MachinePrecision] * N[Exp[N[(N[(N[(0.0 - y$46$re), $MachinePrecision] * N[Log[N[(-1.0 / x$46$re), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[x$46$re, 1.9e-32], N[(1.0 / N[(t$95$2 / N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Cos[N[(t$95$1 + N[(y$46$im * N[Log[x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Power[x$46$re, y$46$re], $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_2 := e^{t\_0}\\
\mathbf{if}\;x.re \leq -6 \cdot 10^{+108}:\\
\;\;\;\;\cos t\_1 \cdot e^{\left(0 - y.re\right) \cdot \log \left(\frac{-1}{x.re}\right) - t\_0}\\
\mathbf{elif}\;x.re \leq 1.9 \cdot 10^{-32}:\\
\;\;\;\;\frac{1}{\frac{t\_2}{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\cos \left(t\_1 + y.im \cdot \log x.re\right) \cdot {x.re}^{y.re}}{t\_2}\\
\end{array}
\end{array}
if x.re < -5.99999999999999968e108Initial program 8.8%
Taylor expanded in x.re around -inf
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
/-lowering-/.f64N/A
exp-lowering-exp.f64N/A
--lowering--.f64N/A
Simplified79.9%
Taylor expanded in y.im around 0
cos-lowering-cos.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6485.8%
Simplified85.8%
if -5.99999999999999968e108 < x.re < 1.90000000000000004e-32Initial program 46.4%
exp-diffN/A
associate-*l/N/A
associate-/l*N/A
*-commutativeN/A
associate-/r/N/A
exp-diffN/A
Simplified69.0%
Taylor expanded in y.re around 0
cos-lowering-cos.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6476.1%
Simplified76.1%
Taylor expanded in y.im around 0
Simplified79.0%
if 1.90000000000000004e-32 < x.re Initial program 38.8%
Taylor expanded in x.im around 0
exp-diffN/A
*-commutativeN/A
exp-to-powN/A
associate-/l*N/A
/-lowering-/.f64N/A
Simplified67.9%
frac-2negN/A
/-lowering-/.f64N/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
neg-lowering-neg.f64N/A
pow-lowering-pow.f64N/A
neg-sub0N/A
metadata-evalN/A
metadata-evalN/A
Applied egg-rr73.9%
Final simplification77.0%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.im (atan2 x.im x.re))))
(if (<= x.re -6e+108)
(*
(cos (* y.re (atan2 x.im x.re)))
(exp (- (* (- 0.0 y.re) (log (/ -1.0 x.re))) t_0)))
(/ 1.0 (/ (exp t_0) (pow (hypot x.re x.im) y.re))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_im * atan2(x_46_im, x_46_re);
double tmp;
if (x_46_re <= -6e+108) {
tmp = cos((y_46_re * atan2(x_46_im, x_46_re))) * exp((((0.0 - y_46_re) * log((-1.0 / x_46_re))) - t_0));
} else {
tmp = 1.0 / (exp(t_0) / pow(hypot(x_46_re, x_46_im), 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 = y_46_im * Math.atan2(x_46_im, x_46_re);
double tmp;
if (x_46_re <= -6e+108) {
tmp = Math.cos((y_46_re * Math.atan2(x_46_im, x_46_re))) * Math.exp((((0.0 - y_46_re) * Math.log((-1.0 / x_46_re))) - t_0));
} else {
tmp = 1.0 / (Math.exp(t_0) / Math.pow(Math.hypot(x_46_re, x_46_im), y_46_re));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = y_46_im * math.atan2(x_46_im, x_46_re) tmp = 0 if x_46_re <= -6e+108: tmp = math.cos((y_46_re * math.atan2(x_46_im, x_46_re))) * math.exp((((0.0 - y_46_re) * math.log((-1.0 / x_46_re))) - t_0)) else: tmp = 1.0 / (math.exp(t_0) / math.pow(math.hypot(x_46_re, x_46_im), y_46_re)) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_im * atan(x_46_im, x_46_re)) tmp = 0.0 if (x_46_re <= -6e+108) tmp = Float64(cos(Float64(y_46_re * atan(x_46_im, x_46_re))) * exp(Float64(Float64(Float64(0.0 - y_46_re) * log(Float64(-1.0 / x_46_re))) - t_0))); else tmp = Float64(1.0 / Float64(exp(t_0) / (hypot(x_46_re, 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) t_0 = y_46_im * atan2(x_46_im, x_46_re); tmp = 0.0; if (x_46_re <= -6e+108) tmp = cos((y_46_re * atan2(x_46_im, x_46_re))) * exp((((0.0 - y_46_re) * log((-1.0 / x_46_re))) - t_0)); else tmp = 1.0 / (exp(t_0) / (hypot(x_46_re, x_46_im) ^ 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[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x$46$re, -6e+108], N[(N[Cos[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Exp[N[(N[(N[(0.0 - y$46$re), $MachinePrecision] * N[Log[N[(-1.0 / x$46$re), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(N[Exp[t$95$0], $MachinePrecision] / N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;x.re \leq -6 \cdot 10^{+108}:\\
\;\;\;\;\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot e^{\left(0 - y.re\right) \cdot \log \left(\frac{-1}{x.re}\right) - t\_0}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\frac{e^{t\_0}}{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}}\\
\end{array}
\end{array}
if x.re < -5.99999999999999968e108Initial program 8.8%
Taylor expanded in x.re around -inf
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f64N/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
/-lowering-/.f64N/A
exp-lowering-exp.f64N/A
--lowering--.f64N/A
Simplified79.9%
Taylor expanded in y.im around 0
cos-lowering-cos.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6485.8%
Simplified85.8%
if -5.99999999999999968e108 < x.re Initial program 44.1%
exp-diffN/A
associate-*l/N/A
associate-/l*N/A
*-commutativeN/A
associate-/r/N/A
exp-diffN/A
Simplified69.1%
Taylor expanded in y.re around 0
cos-lowering-cos.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6472.8%
Simplified72.8%
Taylor expanded in y.im around 0
Simplified75.5%
Final simplification76.9%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.im (atan2 x.im x.re))) (t_1 (exp t_0)))
(if (<= y.im 1.9e+21)
(/ 1.0 (/ t_1 (pow (hypot x.re x.im) y.re)))
(if (<= y.im 1.2e+95)
(/ (pow (hypot x.im x.re) y.re) t_0)
(if (<= y.im 9.5e+154)
(/ (pow (+ (* x.re x.re) (* x.im x.im)) (/ y.re 2.0)) t_1)
(/ 1.0 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_im * atan2(x_46_im, x_46_re);
double t_1 = exp(t_0);
double tmp;
if (y_46_im <= 1.9e+21) {
tmp = 1.0 / (t_1 / pow(hypot(x_46_re, x_46_im), y_46_re));
} else if (y_46_im <= 1.2e+95) {
tmp = pow(hypot(x_46_im, x_46_re), y_46_re) / t_0;
} else if (y_46_im <= 9.5e+154) {
tmp = pow(((x_46_re * x_46_re) + (x_46_im * x_46_im)), (y_46_re / 2.0)) / t_1;
} else {
tmp = 1.0 / 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_im * Math.atan2(x_46_im, x_46_re);
double t_1 = Math.exp(t_0);
double tmp;
if (y_46_im <= 1.9e+21) {
tmp = 1.0 / (t_1 / Math.pow(Math.hypot(x_46_re, x_46_im), y_46_re));
} else if (y_46_im <= 1.2e+95) {
tmp = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re) / t_0;
} else if (y_46_im <= 9.5e+154) {
tmp = Math.pow(((x_46_re * x_46_re) + (x_46_im * x_46_im)), (y_46_re / 2.0)) / t_1;
} else {
tmp = 1.0 / t_1;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = y_46_im * math.atan2(x_46_im, x_46_re) t_1 = math.exp(t_0) tmp = 0 if y_46_im <= 1.9e+21: tmp = 1.0 / (t_1 / math.pow(math.hypot(x_46_re, x_46_im), y_46_re)) elif y_46_im <= 1.2e+95: tmp = math.pow(math.hypot(x_46_im, x_46_re), y_46_re) / t_0 elif y_46_im <= 9.5e+154: tmp = math.pow(((x_46_re * x_46_re) + (x_46_im * x_46_im)), (y_46_re / 2.0)) / t_1 else: tmp = 1.0 / t_1 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_im * atan(x_46_im, x_46_re)) t_1 = exp(t_0) tmp = 0.0 if (y_46_im <= 1.9e+21) tmp = Float64(1.0 / Float64(t_1 / (hypot(x_46_re, x_46_im) ^ y_46_re))); elseif (y_46_im <= 1.2e+95) tmp = Float64((hypot(x_46_im, x_46_re) ^ y_46_re) / t_0); elseif (y_46_im <= 9.5e+154) tmp = Float64((Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)) ^ Float64(y_46_re / 2.0)) / t_1); else tmp = Float64(1.0 / 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_im * atan2(x_46_im, x_46_re); t_1 = exp(t_0); tmp = 0.0; if (y_46_im <= 1.9e+21) tmp = 1.0 / (t_1 / (hypot(x_46_re, x_46_im) ^ y_46_re)); elseif (y_46_im <= 1.2e+95) tmp = (hypot(x_46_im, x_46_re) ^ y_46_re) / t_0; elseif (y_46_im <= 9.5e+154) tmp = (((x_46_re * x_46_re) + (x_46_im * x_46_im)) ^ (y_46_re / 2.0)) / t_1; else tmp = 1.0 / 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$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Exp[t$95$0], $MachinePrecision]}, If[LessEqual[y$46$im, 1.9e+21], N[(1.0 / N[(t$95$1 / N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 1.2e+95], N[(N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision] / t$95$0), $MachinePrecision], If[LessEqual[y$46$im, 9.5e+154], N[(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] / t$95$1), $MachinePrecision], N[(1.0 / t$95$1), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := e^{t\_0}\\
\mathbf{if}\;y.im \leq 1.9 \cdot 10^{+21}:\\
\;\;\;\;\frac{1}{\frac{t\_1}{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}}\\
\mathbf{elif}\;y.im \leq 1.2 \cdot 10^{+95}:\\
\;\;\;\;\frac{{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}}{t\_0}\\
\mathbf{elif}\;y.im \leq 9.5 \cdot 10^{+154}:\\
\;\;\;\;\frac{{\left(x.re \cdot x.re + x.im \cdot x.im\right)}^{\left(\frac{y.re}{2}\right)}}{t\_1}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{t\_1}\\
\end{array}
\end{array}
if y.im < 1.9e21Initial program 43.0%
exp-diffN/A
associate-*l/N/A
associate-/l*N/A
*-commutativeN/A
associate-/r/N/A
exp-diffN/A
Simplified74.9%
Taylor expanded in y.re around 0
cos-lowering-cos.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6478.7%
Simplified78.7%
Taylor expanded in y.im around 0
Simplified82.4%
if 1.9e21 < y.im < 1.2e95Initial program 38.6%
exp-diffN/A
associate-*l/N/A
associate-/l*N/A
*-commutativeN/A
associate-/r/N/A
exp-diffN/A
Simplified30.9%
Taylor expanded in y.re around 0
cos-lowering-cos.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6430.9%
Simplified30.9%
Taylor expanded in y.im around 0
Simplified15.5%
Taylor expanded in y.im around 0
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6446.6%
Simplified46.6%
Taylor expanded in y.im around inf
/-lowering-/.f64N/A
pow-lowering-pow.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6462.8%
Simplified62.8%
if 1.2e95 < y.im < 9.5000000000000001e154Initial program 26.7%
exp-diffN/A
associate-*l/N/A
associate-/l*N/A
*-commutativeN/A
associate-/r/N/A
exp-diffN/A
Simplified60.1%
Taylor expanded in y.re around 0
cos-lowering-cos.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6460.1%
Simplified60.1%
Taylor expanded in y.im around 0
Simplified46.8%
frac-2negN/A
metadata-evalN/A
div-invN/A
*-commutativeN/A
distribute-neg-fracN/A
sub0-negN/A
clear-numN/A
neg-mul-1N/A
neg-lowering-neg.f64N/A
Applied egg-rr80.2%
if 9.5000000000000001e154 < y.im Initial program 25.7%
exp-diffN/A
associate-*l/N/A
associate-/l*N/A
*-commutativeN/A
associate-/r/N/A
exp-diffN/A
Simplified51.4%
Taylor expanded in y.re around 0
cos-lowering-cos.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6454.3%
Simplified54.3%
Taylor expanded in y.im around 0
Simplified65.7%
Taylor expanded in y.re around 0
exp-lowering-exp.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6471.7%
Simplified71.7%
Final simplification77.4%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.im (atan2 x.im x.re))))
(if (<= y.re -5.5e-11)
(/ -1.0 (/ (- -1.0 t_0) (pow (hypot x.re x.im) y.re)))
(if (<= y.re 1.6e-21)
(/ 1.0 (exp t_0))
(pow (sqrt (+ (* x.re x.re) (* x.im x.im))) y.re)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_im * atan2(x_46_im, x_46_re);
double tmp;
if (y_46_re <= -5.5e-11) {
tmp = -1.0 / ((-1.0 - t_0) / pow(hypot(x_46_re, x_46_im), y_46_re));
} else if (y_46_re <= 1.6e-21) {
tmp = 1.0 / exp(t_0);
} else {
tmp = pow(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))), 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 = y_46_im * Math.atan2(x_46_im, x_46_re);
double tmp;
if (y_46_re <= -5.5e-11) {
tmp = -1.0 / ((-1.0 - t_0) / Math.pow(Math.hypot(x_46_re, x_46_im), y_46_re));
} else if (y_46_re <= 1.6e-21) {
tmp = 1.0 / Math.exp(t_0);
} else {
tmp = Math.pow(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))), y_46_re);
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = y_46_im * math.atan2(x_46_im, x_46_re) tmp = 0 if y_46_re <= -5.5e-11: tmp = -1.0 / ((-1.0 - t_0) / math.pow(math.hypot(x_46_re, x_46_im), y_46_re)) elif y_46_re <= 1.6e-21: tmp = 1.0 / math.exp(t_0) else: tmp = math.pow(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))), y_46_re) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_im * atan(x_46_im, x_46_re)) tmp = 0.0 if (y_46_re <= -5.5e-11) tmp = Float64(-1.0 / Float64(Float64(-1.0 - t_0) / (hypot(x_46_re, x_46_im) ^ y_46_re))); elseif (y_46_re <= 1.6e-21) tmp = Float64(1.0 / exp(t_0)); else tmp = sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * 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) t_0 = y_46_im * atan2(x_46_im, x_46_re); tmp = 0.0; if (y_46_re <= -5.5e-11) tmp = -1.0 / ((-1.0 - t_0) / (hypot(x_46_re, x_46_im) ^ y_46_re)); elseif (y_46_re <= 1.6e-21) tmp = 1.0 / exp(t_0); else tmp = sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))) ^ 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[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -5.5e-11], N[(-1.0 / N[(N[(-1.0 - t$95$0), $MachinePrecision] / N[Power[N[Sqrt[x$46$re ^ 2 + x$46$im ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 1.6e-21], N[(1.0 / N[Exp[t$95$0], $MachinePrecision]), $MachinePrecision], N[Power[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], y$46$re], $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{if}\;y.re \leq -5.5 \cdot 10^{-11}:\\
\;\;\;\;\frac{-1}{\frac{-1 - t\_0}{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}}\\
\mathbf{elif}\;y.re \leq 1.6 \cdot 10^{-21}:\\
\;\;\;\;\frac{1}{e^{t\_0}}\\
\mathbf{else}:\\
\;\;\;\;{\left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)}^{y.re}\\
\end{array}
\end{array}
if y.re < -5.49999999999999975e-11Initial program 37.5%
exp-diffN/A
associate-*l/N/A
associate-/l*N/A
*-commutativeN/A
associate-/r/N/A
exp-diffN/A
Simplified68.7%
Taylor expanded in y.re around 0
cos-lowering-cos.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6472.5%
Simplified72.5%
Taylor expanded in y.im around 0
Simplified71.0%
Taylor expanded in y.im around 0
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6475.9%
Simplified75.9%
if -5.49999999999999975e-11 < y.re < 1.6000000000000001e-21Initial program 48.3%
exp-diffN/A
associate-*l/N/A
associate-/l*N/A
*-commutativeN/A
associate-/r/N/A
exp-diffN/A
Simplified84.9%
Taylor expanded in y.re around 0
cos-lowering-cos.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6484.9%
Simplified84.9%
Taylor expanded in y.im around 0
Simplified87.6%
Taylor expanded in y.re around 0
exp-lowering-exp.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6487.6%
Simplified87.6%
if 1.6000000000000001e-21 < y.re Initial program 27.6%
exp-diffN/A
associate-*l/N/A
associate-/l*N/A
*-commutativeN/A
associate-/r/N/A
exp-diffN/A
Simplified43.4%
Taylor expanded in y.re around 0
cos-lowering-cos.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6451.3%
Simplified51.3%
Taylor expanded in y.im around 0
Simplified57.9%
Taylor expanded in y.im around 0
pow-lowering-pow.f64N/A
sqrt-lowering-sqrt.f64N/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6461.9%
Simplified61.9%
Final simplification77.0%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.im (atan2 x.im x.re))) (t_1 (+ (* x.re x.re) (* x.im x.im))))
(if (<= y.re -1.8)
(/ (pow t_1 (/ y.re 2.0)) (+ t_0 1.0))
(if (<= y.re 1.6e-21) (/ 1.0 (exp t_0)) (pow (sqrt t_1) y.re)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_im * atan2(x_46_im, x_46_re);
double t_1 = (x_46_re * x_46_re) + (x_46_im * x_46_im);
double tmp;
if (y_46_re <= -1.8) {
tmp = pow(t_1, (y_46_re / 2.0)) / (t_0 + 1.0);
} else if (y_46_re <= 1.6e-21) {
tmp = 1.0 / exp(t_0);
} else {
tmp = pow(sqrt(t_1), 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) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = y_46im * atan2(x_46im, x_46re)
t_1 = (x_46re * x_46re) + (x_46im * x_46im)
if (y_46re <= (-1.8d0)) then
tmp = (t_1 ** (y_46re / 2.0d0)) / (t_0 + 1.0d0)
else if (y_46re <= 1.6d-21) then
tmp = 1.0d0 / exp(t_0)
else
tmp = sqrt(t_1) ** 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 t_0 = y_46_im * Math.atan2(x_46_im, x_46_re);
double t_1 = (x_46_re * x_46_re) + (x_46_im * x_46_im);
double tmp;
if (y_46_re <= -1.8) {
tmp = Math.pow(t_1, (y_46_re / 2.0)) / (t_0 + 1.0);
} else if (y_46_re <= 1.6e-21) {
tmp = 1.0 / Math.exp(t_0);
} else {
tmp = Math.pow(Math.sqrt(t_1), y_46_re);
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = y_46_im * math.atan2(x_46_im, x_46_re) t_1 = (x_46_re * x_46_re) + (x_46_im * x_46_im) tmp = 0 if y_46_re <= -1.8: tmp = math.pow(t_1, (y_46_re / 2.0)) / (t_0 + 1.0) elif y_46_re <= 1.6e-21: tmp = 1.0 / math.exp(t_0) else: tmp = math.pow(math.sqrt(t_1), y_46_re) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_im * atan(x_46_im, x_46_re)) t_1 = Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)) tmp = 0.0 if (y_46_re <= -1.8) tmp = Float64((t_1 ^ Float64(y_46_re / 2.0)) / Float64(t_0 + 1.0)); elseif (y_46_re <= 1.6e-21) tmp = Float64(1.0 / exp(t_0)); else tmp = sqrt(t_1) ^ 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 = y_46_im * atan2(x_46_im, x_46_re); t_1 = (x_46_re * x_46_re) + (x_46_im * x_46_im); tmp = 0.0; if (y_46_re <= -1.8) tmp = (t_1 ^ (y_46_re / 2.0)) / (t_0 + 1.0); elseif (y_46_re <= 1.6e-21) tmp = 1.0 / exp(t_0); else tmp = sqrt(t_1) ^ 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[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -1.8], N[(N[Power[t$95$1, N[(y$46$re / 2.0), $MachinePrecision]], $MachinePrecision] / N[(t$95$0 + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 1.6e-21], N[(1.0 / N[Exp[t$95$0], $MachinePrecision]), $MachinePrecision], N[Power[N[Sqrt[t$95$1], $MachinePrecision], y$46$re], $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_1 := x.re \cdot x.re + x.im \cdot x.im\\
\mathbf{if}\;y.re \leq -1.8:\\
\;\;\;\;\frac{{t\_1}^{\left(\frac{y.re}{2}\right)}}{t\_0 + 1}\\
\mathbf{elif}\;y.re \leq 1.6 \cdot 10^{-21}:\\
\;\;\;\;\frac{1}{e^{t\_0}}\\
\mathbf{else}:\\
\;\;\;\;{\left(\sqrt{t\_1}\right)}^{y.re}\\
\end{array}
\end{array}
if y.re < -1.80000000000000004Initial program 37.1%
exp-diffN/A
associate-*l/N/A
associate-/l*N/A
*-commutativeN/A
associate-/r/N/A
exp-diffN/A
Simplified67.7%
Taylor expanded in y.re around 0
cos-lowering-cos.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6474.2%
Simplified74.2%
Taylor expanded in y.im around 0
Simplified72.6%
Taylor expanded in y.im around 0
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6477.6%
Simplified77.6%
clear-numN/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
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6477.6%
Applied egg-rr77.6%
if -1.80000000000000004 < y.re < 1.6000000000000001e-21Initial program 48.3%
exp-diffN/A
associate-*l/N/A
associate-/l*N/A
*-commutativeN/A
associate-/r/N/A
exp-diffN/A
Simplified85.2%
Taylor expanded in y.re around 0
cos-lowering-cos.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6483.8%
Simplified83.8%
Taylor expanded in y.im around 0
Simplified86.4%
Taylor expanded in y.re around 0
exp-lowering-exp.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6486.2%
Simplified86.2%
if 1.6000000000000001e-21 < y.re Initial program 27.6%
exp-diffN/A
associate-*l/N/A
associate-/l*N/A
*-commutativeN/A
associate-/r/N/A
exp-diffN/A
Simplified43.4%
Taylor expanded in y.re around 0
cos-lowering-cos.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6451.3%
Simplified51.3%
Taylor expanded in y.im around 0
Simplified57.9%
Taylor expanded in y.im around 0
pow-lowering-pow.f64N/A
sqrt-lowering-sqrt.f64N/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6461.9%
Simplified61.9%
Final simplification76.9%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (<= y.re -0.00022)
(pow (hypot x.im x.re) y.re)
(if (<= y.re 1.6e-21)
(/ 1.0 (exp (* y.im (atan2 x.im x.re))))
(pow (sqrt (+ (* x.re x.re) (* x.im 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 <= -0.00022) {
tmp = pow(hypot(x_46_im, x_46_re), y_46_re);
} else if (y_46_re <= 1.6e-21) {
tmp = 1.0 / exp((y_46_im * atan2(x_46_im, x_46_re)));
} else {
tmp = pow(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))), 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 <= -0.00022) {
tmp = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
} else if (y_46_re <= 1.6e-21) {
tmp = 1.0 / Math.exp((y_46_im * Math.atan2(x_46_im, x_46_re)));
} else {
tmp = Math.pow(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * 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 <= -0.00022: tmp = math.pow(math.hypot(x_46_im, x_46_re), y_46_re) elif y_46_re <= 1.6e-21: tmp = 1.0 / math.exp((y_46_im * math.atan2(x_46_im, x_46_re))) else: tmp = math.pow(math.sqrt(((x_46_re * x_46_re) + (x_46_im * 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 <= -0.00022) tmp = hypot(x_46_im, x_46_re) ^ y_46_re; elseif (y_46_re <= 1.6e-21) tmp = Float64(1.0 / exp(Float64(y_46_im * atan(x_46_im, x_46_re)))); else tmp = sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * 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 <= -0.00022) tmp = hypot(x_46_im, x_46_re) ^ y_46_re; elseif (y_46_re <= 1.6e-21) tmp = 1.0 / exp((y_46_im * atan2(x_46_im, x_46_re))); else tmp = sqrt(((x_46_re * x_46_re) + (x_46_im * 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, -0.00022], N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision], If[LessEqual[y$46$re, 1.6e-21], N[(1.0 / N[Exp[N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[Power[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], y$46$re], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq -0.00022:\\
\;\;\;\;{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{elif}\;y.re \leq 1.6 \cdot 10^{-21}:\\
\;\;\;\;\frac{1}{e^{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}}\\
\mathbf{else}:\\
\;\;\;\;{\left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)}^{y.re}\\
\end{array}
\end{array}
if y.re < -2.20000000000000008e-4Initial program 37.5%
exp-diffN/A
associate-*l/N/A
associate-/l*N/A
*-commutativeN/A
associate-/r/N/A
exp-diffN/A
Simplified68.7%
Taylor expanded in y.re around 0
cos-lowering-cos.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6472.5%
Simplified72.5%
Taylor expanded in y.im around 0
pow-lowering-pow.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6474.3%
Simplified74.3%
if -2.20000000000000008e-4 < y.re < 1.6000000000000001e-21Initial program 48.3%
exp-diffN/A
associate-*l/N/A
associate-/l*N/A
*-commutativeN/A
associate-/r/N/A
exp-diffN/A
Simplified84.9%
Taylor expanded in y.re around 0
cos-lowering-cos.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6484.9%
Simplified84.9%
Taylor expanded in y.im around 0
Simplified87.6%
Taylor expanded in y.re around 0
exp-lowering-exp.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6487.6%
Simplified87.6%
if 1.6000000000000001e-21 < y.re Initial program 27.6%
exp-diffN/A
associate-*l/N/A
associate-/l*N/A
*-commutativeN/A
associate-/r/N/A
exp-diffN/A
Simplified43.4%
Taylor expanded in y.re around 0
cos-lowering-cos.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6451.3%
Simplified51.3%
Taylor expanded in y.im around 0
Simplified57.9%
Taylor expanded in y.im around 0
pow-lowering-pow.f64N/A
sqrt-lowering-sqrt.f64N/A
+-lowering-+.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6461.9%
Simplified61.9%
Final simplification76.6%
(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.45e-8)
t_0
(if (<= y.re 3.0) (/ 1.0 (exp (* y.im (atan2 x.im x.re)))) t_0))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = pow(hypot(x_46_im, x_46_re), y_46_re);
double tmp;
if (y_46_re <= -2.45e-8) {
tmp = t_0;
} else if (y_46_re <= 3.0) {
tmp = 1.0 / exp((y_46_im * atan2(x_46_im, x_46_re)));
} else {
tmp = t_0;
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.pow(Math.hypot(x_46_im, x_46_re), y_46_re);
double tmp;
if (y_46_re <= -2.45e-8) {
tmp = t_0;
} else if (y_46_re <= 3.0) {
tmp = 1.0 / Math.exp((y_46_im * Math.atan2(x_46_im, x_46_re)));
} else {
tmp = 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.45e-8: tmp = t_0 elif y_46_re <= 3.0: tmp = 1.0 / math.exp((y_46_im * math.atan2(x_46_im, x_46_re))) else: tmp = t_0 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = hypot(x_46_im, x_46_re) ^ y_46_re tmp = 0.0 if (y_46_re <= -2.45e-8) tmp = t_0; elseif (y_46_re <= 3.0) tmp = Float64(1.0 / exp(Float64(y_46_im * atan(x_46_im, x_46_re)))); 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 = hypot(x_46_im, x_46_re) ^ y_46_re; tmp = 0.0; if (y_46_re <= -2.45e-8) tmp = t_0; elseif (y_46_re <= 3.0) tmp = 1.0 / exp((y_46_im * atan2(x_46_im, x_46_re))); 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[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision]}, If[LessEqual[y$46$re, -2.45e-8], t$95$0, If[LessEqual[y$46$re, 3.0], N[(1.0 / N[Exp[N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{if}\;y.re \leq -2.45 \cdot 10^{-8}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y.re \leq 3:\\
\;\;\;\;\frac{1}{e^{y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if y.re < -2.4500000000000001e-8 or 3 < y.re Initial program 32.3%
exp-diffN/A
associate-*l/N/A
associate-/l*N/A
*-commutativeN/A
associate-/r/N/A
exp-diffN/A
Simplified55.9%
Taylor expanded in y.re around 0
cos-lowering-cos.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6462.1%
Simplified62.1%
Taylor expanded in y.im around 0
pow-lowering-pow.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6468.1%
Simplified68.1%
if -2.4500000000000001e-8 < y.re < 3Initial program 47.5%
exp-diffN/A
associate-*l/N/A
associate-/l*N/A
*-commutativeN/A
associate-/r/N/A
exp-diffN/A
Simplified82.9%
Taylor expanded in y.re around 0
cos-lowering-cos.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6482.9%
Simplified82.9%
Taylor expanded in y.im around 0
Simplified86.3%
Taylor expanded in y.re around 0
exp-lowering-exp.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6486.3%
Simplified86.3%
(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 39.4%
exp-diffN/A
associate-*l/N/A
associate-/l*N/A
*-commutativeN/A
associate-/r/N/A
exp-diffN/A
Simplified68.6%
Taylor expanded in y.re around 0
cos-lowering-cos.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6471.8%
Simplified71.8%
Taylor expanded in y.im around 0
pow-lowering-pow.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6459.2%
Simplified59.2%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (<= y.re -1.3)
(pow x.im y.re)
(if (<= y.re 4.5e-10)
(/ -1.0 (- -1.0 (* y.im (atan2 x.im x.re))))
(pow x.im y.re))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_re <= -1.3) {
tmp = pow(x_46_im, y_46_re);
} else if (y_46_re <= 4.5e-10) {
tmp = -1.0 / (-1.0 - (y_46_im * atan2(x_46_im, x_46_re)));
} else {
tmp = pow(x_46_im, y_46_re);
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: tmp
if (y_46re <= (-1.3d0)) then
tmp = x_46im ** y_46re
else if (y_46re <= 4.5d-10) then
tmp = (-1.0d0) / ((-1.0d0) - (y_46im * atan2(x_46im, x_46re)))
else
tmp = x_46im ** y_46re
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_re <= -1.3) {
tmp = Math.pow(x_46_im, y_46_re);
} else if (y_46_re <= 4.5e-10) {
tmp = -1.0 / (-1.0 - (y_46_im * Math.atan2(x_46_im, x_46_re)));
} else {
tmp = Math.pow(x_46_im, y_46_re);
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if y_46_re <= -1.3: tmp = math.pow(x_46_im, y_46_re) elif y_46_re <= 4.5e-10: tmp = -1.0 / (-1.0 - (y_46_im * math.atan2(x_46_im, x_46_re))) else: tmp = math.pow(x_46_im, y_46_re) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if (y_46_re <= -1.3) tmp = x_46_im ^ y_46_re; elseif (y_46_re <= 4.5e-10) tmp = Float64(-1.0 / Float64(-1.0 - Float64(y_46_im * atan(x_46_im, x_46_re)))); else tmp = x_46_im ^ y_46_re; end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if (y_46_re <= -1.3) tmp = x_46_im ^ y_46_re; elseif (y_46_re <= 4.5e-10) tmp = -1.0 / (-1.0 - (y_46_im * atan2(x_46_im, x_46_re))); else tmp = x_46_im ^ y_46_re; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[y$46$re, -1.3], N[Power[x$46$im, y$46$re], $MachinePrecision], If[LessEqual[y$46$re, 4.5e-10], N[(-1.0 / N[(-1.0 - N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Power[x$46$im, y$46$re], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq -1.3:\\
\;\;\;\;{x.im}^{y.re}\\
\mathbf{elif}\;y.re \leq 4.5 \cdot 10^{-10}:\\
\;\;\;\;\frac{-1}{-1 - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}}\\
\mathbf{else}:\\
\;\;\;\;{x.im}^{y.re}\\
\end{array}
\end{array}
if y.re < -1.30000000000000004 or 4.5e-10 < y.re Initial program 31.9%
exp-diffN/A
associate-*l/N/A
associate-/l*N/A
*-commutativeN/A
associate-/r/N/A
exp-diffN/A
Simplified54.8%
Taylor expanded in y.re around 0
cos-lowering-cos.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6462.2%
Simplified62.2%
Taylor expanded in y.im around 0
Simplified69.8%
Taylor expanded in x.re around 0
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
pow-lowering-pow.f6432.1%
Simplified32.1%
Taylor expanded in y.im around 0
pow-lowering-pow.f6460.4%
Simplified60.4%
if -1.30000000000000004 < y.re < 4.5e-10Initial program 47.9%
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.re around 0
cos-lowering-cos.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6482.6%
Simplified82.6%
Taylor expanded in y.im around 0
Simplified85.1%
Taylor expanded in y.im around 0
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6449.6%
Simplified49.6%
Taylor expanded in y.re around 0
/-lowering-/.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6449.4%
Simplified49.4%
Final simplification55.2%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (<= y.re -1.55) (pow x.im y.re) (if (<= y.re 340000.0) (- 1.0 (* y.im (atan2 x.im x.re))) (pow x.im y.re))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_re <= -1.55) {
tmp = pow(x_46_im, y_46_re);
} else if (y_46_re <= 340000.0) {
tmp = 1.0 - (y_46_im * atan2(x_46_im, x_46_re));
} else {
tmp = pow(x_46_im, y_46_re);
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: tmp
if (y_46re <= (-1.55d0)) then
tmp = x_46im ** y_46re
else if (y_46re <= 340000.0d0) then
tmp = 1.0d0 - (y_46im * atan2(x_46im, x_46re))
else
tmp = x_46im ** y_46re
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_re <= -1.55) {
tmp = Math.pow(x_46_im, y_46_re);
} else if (y_46_re <= 340000.0) {
tmp = 1.0 - (y_46_im * Math.atan2(x_46_im, x_46_re));
} else {
tmp = Math.pow(x_46_im, y_46_re);
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if y_46_re <= -1.55: tmp = math.pow(x_46_im, y_46_re) elif y_46_re <= 340000.0: tmp = 1.0 - (y_46_im * math.atan2(x_46_im, x_46_re)) else: tmp = math.pow(x_46_im, y_46_re) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if (y_46_re <= -1.55) tmp = x_46_im ^ y_46_re; elseif (y_46_re <= 340000.0) tmp = Float64(1.0 - Float64(y_46_im * atan(x_46_im, x_46_re))); else tmp = x_46_im ^ y_46_re; end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if (y_46_re <= -1.55) tmp = x_46_im ^ y_46_re; elseif (y_46_re <= 340000.0) tmp = 1.0 - (y_46_im * atan2(x_46_im, x_46_re)); else tmp = x_46_im ^ y_46_re; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[y$46$re, -1.55], N[Power[x$46$im, y$46$re], $MachinePrecision], If[LessEqual[y$46$re, 340000.0], N[(1.0 - N[(y$46$im * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Power[x$46$im, y$46$re], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq -1.55:\\
\;\;\;\;{x.im}^{y.re}\\
\mathbf{elif}\;y.re \leq 340000:\\
\;\;\;\;1 - y.im \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
\mathbf{else}:\\
\;\;\;\;{x.im}^{y.re}\\
\end{array}
\end{array}
if y.re < -1.55000000000000004 or 3.4e5 < y.re Initial program 31.6%
exp-diffN/A
associate-*l/N/A
associate-/l*N/A
*-commutativeN/A
associate-/r/N/A
exp-diffN/A
Simplified54.9%
Taylor expanded in y.re around 0
cos-lowering-cos.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6462.4%
Simplified62.4%
Taylor expanded in y.im around 0
Simplified70.1%
Taylor expanded in x.re around 0
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
pow-lowering-pow.f6432.5%
Simplified32.5%
Taylor expanded in y.im around 0
pow-lowering-pow.f6461.3%
Simplified61.3%
if -1.55000000000000004 < y.re < 3.4e5Initial program 48.0%
Taylor expanded in x.im around 0
exp-diffN/A
*-commutativeN/A
exp-to-powN/A
associate-/l*N/A
/-lowering-/.f64N/A
Simplified35.4%
Taylor expanded in y.re around 0
/-lowering-/.f64N/A
cos-lowering-cos.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
exp-lowering-exp.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6435.4%
Simplified35.4%
Taylor expanded in y.im around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6448.4%
Simplified48.4%
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6448.4%
Applied egg-rr48.4%
Final simplification55.1%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (<= y.re -1.22) (pow x.im y.re) (if (<= y.re 6200.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 <= -1.22) {
tmp = pow(x_46_im, y_46_re);
} else if (y_46_re <= 6200.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 <= (-1.22d0)) then
tmp = x_46im ** y_46re
else if (y_46re <= 6200.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 <= -1.22) {
tmp = Math.pow(x_46_im, y_46_re);
} else if (y_46_re <= 6200.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 <= -1.22: tmp = math.pow(x_46_im, y_46_re) elif y_46_re <= 6200.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 <= -1.22) tmp = x_46_im ^ y_46_re; elseif (y_46_re <= 6200.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 <= -1.22) tmp = x_46_im ^ y_46_re; elseif (y_46_re <= 6200.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, -1.22], N[Power[x$46$im, y$46$re], $MachinePrecision], If[LessEqual[y$46$re, 6200.0], 1.0, N[Power[x$46$im, y$46$re], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq -1.22:\\
\;\;\;\;{x.im}^{y.re}\\
\mathbf{elif}\;y.re \leq 6200:\\
\;\;\;\;1\\
\mathbf{else}:\\
\;\;\;\;{x.im}^{y.re}\\
\end{array}
\end{array}
if y.re < -1.21999999999999997 or 6200 < y.re Initial program 31.6%
exp-diffN/A
associate-*l/N/A
associate-/l*N/A
*-commutativeN/A
associate-/r/N/A
exp-diffN/A
Simplified54.9%
Taylor expanded in y.re around 0
cos-lowering-cos.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
unpow2N/A
unpow2N/A
hypot-defineN/A
hypot-lowering-hypot.f6462.4%
Simplified62.4%
Taylor expanded in y.im around 0
Simplified70.1%
Taylor expanded in x.re around 0
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
pow-lowering-pow.f6432.5%
Simplified32.5%
Taylor expanded in y.im around 0
pow-lowering-pow.f6461.3%
Simplified61.3%
if -1.21999999999999997 < y.re < 6200Initial program 48.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.f6450.3%
Simplified50.3%
Taylor expanded in y.re around 0
Simplified48.1%
(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 39.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.f6454.0%
Simplified54.0%
Taylor expanded in y.re around 0
Simplified24.4%
herbie shell --seed 2024155
(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)))))