
(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 14 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 (* (atan2 x.im x.re) y.im))
(t_1 (* y.re (atan2 x.im x.re)))
(t_2 (cos t_1))
(t_3 (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(t_4 (exp (- (* t_3 y.re) t_0)))
(t_5 (* t_4 (cos (+ (* t_3 y.im) t_1))))
(t_6 (log (hypot x.im x.re)))
(t_7 (/ (exp t_0) (pow (hypot x.re x.im) y.re))))
(if (<= t_5 0.85)
(* t_4 (cos (* y.im t_6)))
(if (<= t_5 INFINITY)
(/
(+
t_2
(*
y.im
(- (* (* y.im -0.5) (* t_2 (pow t_6 2.0))) (* t_6 (sin t_1)))))
t_7)
(/ 1.0 t_7)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = y_46_re * atan2(x_46_im, x_46_re);
double t_2 = cos(t_1);
double t_3 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
double t_4 = exp(((t_3 * y_46_re) - t_0));
double t_5 = t_4 * cos(((t_3 * y_46_im) + t_1));
double t_6 = log(hypot(x_46_im, x_46_re));
double t_7 = exp(t_0) / pow(hypot(x_46_re, x_46_im), y_46_re);
double tmp;
if (t_5 <= 0.85) {
tmp = t_4 * cos((y_46_im * t_6));
} else if (t_5 <= ((double) INFINITY)) {
tmp = (t_2 + (y_46_im * (((y_46_im * -0.5) * (t_2 * pow(t_6, 2.0))) - (t_6 * sin(t_1))))) / t_7;
} else {
tmp = 1.0 / t_7;
}
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.atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = y_46_re * Math.atan2(x_46_im, x_46_re);
double t_2 = Math.cos(t_1);
double t_3 = Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
double t_4 = Math.exp(((t_3 * y_46_re) - t_0));
double t_5 = t_4 * Math.cos(((t_3 * y_46_im) + t_1));
double t_6 = Math.log(Math.hypot(x_46_im, x_46_re));
double t_7 = Math.exp(t_0) / Math.pow(Math.hypot(x_46_re, x_46_im), y_46_re);
double tmp;
if (t_5 <= 0.85) {
tmp = t_4 * Math.cos((y_46_im * t_6));
} else if (t_5 <= Double.POSITIVE_INFINITY) {
tmp = (t_2 + (y_46_im * (((y_46_im * -0.5) * (t_2 * Math.pow(t_6, 2.0))) - (t_6 * Math.sin(t_1))))) / t_7;
} else {
tmp = 1.0 / t_7;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.atan2(x_46_im, x_46_re) * y_46_im t_1 = y_46_re * math.atan2(x_46_im, x_46_re) t_2 = math.cos(t_1) t_3 = math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) t_4 = math.exp(((t_3 * y_46_re) - t_0)) t_5 = t_4 * math.cos(((t_3 * y_46_im) + t_1)) t_6 = math.log(math.hypot(x_46_im, x_46_re)) t_7 = math.exp(t_0) / math.pow(math.hypot(x_46_re, x_46_im), y_46_re) tmp = 0 if t_5 <= 0.85: tmp = t_4 * math.cos((y_46_im * t_6)) elif t_5 <= math.inf: tmp = (t_2 + (y_46_im * (((y_46_im * -0.5) * (t_2 * math.pow(t_6, 2.0))) - (t_6 * math.sin(t_1))))) / t_7 else: tmp = 1.0 / t_7 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(atan(x_46_im, x_46_re) * y_46_im) t_1 = Float64(y_46_re * atan(x_46_im, x_46_re)) t_2 = cos(t_1) t_3 = log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) t_4 = exp(Float64(Float64(t_3 * y_46_re) - t_0)) t_5 = Float64(t_4 * cos(Float64(Float64(t_3 * y_46_im) + t_1))) t_6 = log(hypot(x_46_im, x_46_re)) t_7 = Float64(exp(t_0) / (hypot(x_46_re, x_46_im) ^ y_46_re)) tmp = 0.0 if (t_5 <= 0.85) tmp = Float64(t_4 * cos(Float64(y_46_im * t_6))); elseif (t_5 <= Inf) tmp = Float64(Float64(t_2 + Float64(y_46_im * Float64(Float64(Float64(y_46_im * -0.5) * Float64(t_2 * (t_6 ^ 2.0))) - Float64(t_6 * sin(t_1))))) / t_7); else tmp = Float64(1.0 / t_7); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = atan2(x_46_im, x_46_re) * y_46_im; t_1 = y_46_re * atan2(x_46_im, x_46_re); t_2 = cos(t_1); t_3 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))); t_4 = exp(((t_3 * y_46_re) - t_0)); t_5 = t_4 * cos(((t_3 * y_46_im) + t_1)); t_6 = log(hypot(x_46_im, x_46_re)); t_7 = exp(t_0) / (hypot(x_46_re, x_46_im) ^ y_46_re); tmp = 0.0; if (t_5 <= 0.85) tmp = t_4 * cos((y_46_im * t_6)); elseif (t_5 <= Inf) tmp = (t_2 + (y_46_im * (((y_46_im * -0.5) * (t_2 * (t_6 ^ 2.0))) - (t_6 * sin(t_1))))) / t_7; else tmp = 1.0 / t_7; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, Block[{t$95$1 = N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Cos[t$95$1], $MachinePrecision]}, Block[{t$95$3 = N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$4 = N[Exp[N[(N[(t$95$3 * y$46$re), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$5 = N[(t$95$4 * N[Cos[N[(N[(t$95$3 * y$46$im), $MachinePrecision] + t$95$1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$7 = 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]}, If[LessEqual[t$95$5, 0.85], N[(t$95$4 * N[Cos[N[(y$46$im * t$95$6), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$5, Infinity], N[(N[(t$95$2 + N[(y$46$im * N[(N[(N[(y$46$im * -0.5), $MachinePrecision] * N[(t$95$2 * N[Power[t$95$6, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(t$95$6 * N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$7), $MachinePrecision], N[(1.0 / t$95$7), $MachinePrecision]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_1 := y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\\
t_2 := \cos t\_1\\
t_3 := \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)\\
t_4 := e^{t\_3 \cdot y.re - t\_0}\\
t_5 := t\_4 \cdot \cos \left(t\_3 \cdot y.im + t\_1\right)\\
t_6 := \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\\
t_7 := \frac{e^{t\_0}}{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}\\
\mathbf{if}\;t\_5 \leq 0.85:\\
\;\;\;\;t\_4 \cdot \cos \left(y.im \cdot t\_6\right)\\
\mathbf{elif}\;t\_5 \leq \infty:\\
\;\;\;\;\frac{t\_2 + y.im \cdot \left(\left(y.im \cdot -0.5\right) \cdot \left(t\_2 \cdot {t\_6}^{2}\right) - t\_6 \cdot \sin t\_1\right)}{t\_7}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{t\_7}\\
\end{array}
\end{array}
if (*.f64 (exp.f64 (-.f64 (*.f64 (log.f64 (sqrt.f64 (+.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)))) y.re) (*.f64 (atan2.f64 x.im x.re) y.im))) (cos.f64 (+.f64 (*.f64 (log.f64 (sqrt.f64 (+.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)))) y.im) (*.f64 (atan2.f64 x.im x.re) y.re)))) < 0.849999999999999978Initial program 77.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.f6481.6%
Simplified81.6%
if 0.849999999999999978 < (*.f64 (exp.f64 (-.f64 (*.f64 (log.f64 (sqrt.f64 (+.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)))) y.re) (*.f64 (atan2.f64 x.im x.re) y.im))) (cos.f64 (+.f64 (*.f64 (log.f64 (sqrt.f64 (+.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)))) y.im) (*.f64 (atan2.f64 x.im x.re) y.re)))) < +inf.0Initial program 77.5%
exp-diffN/A
associate-*l/N/A
associate-/l*N/A
*-commutativeN/A
associate-/r/N/A
exp-diffN/A
Simplified75.8%
Taylor expanded in y.im around 0
+-lowering-+.f64N/A
cos-lowering-cos.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
Simplified85.3%
if +inf.0 < (*.f64 (exp.f64 (-.f64 (*.f64 (log.f64 (sqrt.f64 (+.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)))) y.re) (*.f64 (atan2.f64 x.im x.re) y.im))) (cos.f64 (+.f64 (*.f64 (log.f64 (sqrt.f64 (+.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)))) y.im) (*.f64 (atan2.f64 x.im x.re) y.re)))) Initial program 0.0%
exp-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.f6470.7%
Simplified70.7%
Taylor expanded in y.im around 0
Simplified74.1%
Final simplification79.0%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* (atan2 x.im x.re) y.im))
(t_1 (log (sqrt (+ (* x.re x.re) (* x.im x.im)))))
(t_2 (exp (- (* t_1 y.re) t_0))))
(if (<= (* t_2 (cos (+ (* t_1 y.im) (* y.re (atan2 x.im x.re))))) INFINITY)
(* t_2 (cos (* y.im (log (hypot x.im x.re)))))
(/ 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 = atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
double t_2 = exp(((t_1 * y_46_re) - t_0));
double tmp;
if ((t_2 * cos(((t_1 * y_46_im) + (y_46_re * atan2(x_46_im, x_46_re))))) <= ((double) INFINITY)) {
tmp = t_2 * cos((y_46_im * log(hypot(x_46_im, x_46_re))));
} 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 = Math.atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = Math.log(Math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im))));
double t_2 = Math.exp(((t_1 * y_46_re) - t_0));
double tmp;
if ((t_2 * Math.cos(((t_1 * y_46_im) + (y_46_re * Math.atan2(x_46_im, x_46_re))))) <= Double.POSITIVE_INFINITY) {
tmp = t_2 * Math.cos((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re))));
} 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 = math.atan2(x_46_im, x_46_re) * y_46_im t_1 = math.log(math.sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))) t_2 = math.exp(((t_1 * y_46_re) - t_0)) tmp = 0 if (t_2 * math.cos(((t_1 * y_46_im) + (y_46_re * math.atan2(x_46_im, x_46_re))))) <= math.inf: tmp = t_2 * math.cos((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) 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(atan(x_46_im, x_46_re) * y_46_im) t_1 = log(sqrt(Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)))) t_2 = exp(Float64(Float64(t_1 * y_46_re) - t_0)) tmp = 0.0 if (Float64(t_2 * cos(Float64(Float64(t_1 * y_46_im) + Float64(y_46_re * atan(x_46_im, x_46_re))))) <= Inf) tmp = Float64(t_2 * cos(Float64(y_46_im * log(hypot(x_46_im, x_46_re))))); 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 = atan2(x_46_im, x_46_re) * y_46_im; t_1 = log(sqrt(((x_46_re * x_46_re) + (x_46_im * x_46_im)))); t_2 = exp(((t_1 * y_46_re) - t_0)); tmp = 0.0; if ((t_2 * cos(((t_1 * y_46_im) + (y_46_re * atan2(x_46_im, x_46_re))))) <= Inf) tmp = t_2 * cos((y_46_im * log(hypot(x_46_im, x_46_re)))); 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[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]}, Block[{t$95$1 = N[Log[N[Sqrt[N[(N[(x$46$re * x$46$re), $MachinePrecision] + N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[Exp[N[(N[(t$95$1 * y$46$re), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[N[(t$95$2 * N[Cos[N[(N[(t$95$1 * y$46$im), $MachinePrecision] + N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], Infinity], N[(t$95$2 * 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 / 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 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_1 := \log \left(\sqrt{x.re \cdot x.re + x.im \cdot x.im}\right)\\
t_2 := e^{t\_1 \cdot y.re - t\_0}\\
\mathbf{if}\;t\_2 \cdot \cos \left(t\_1 \cdot y.im + y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \leq \infty:\\
\;\;\;\;t\_2 \cdot \cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)\\
\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 (*.f64 (exp.f64 (-.f64 (*.f64 (log.f64 (sqrt.f64 (+.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)))) y.re) (*.f64 (atan2.f64 x.im x.re) y.im))) (cos.f64 (+.f64 (*.f64 (log.f64 (sqrt.f64 (+.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)))) y.im) (*.f64 (atan2.f64 x.im x.re) y.re)))) < +inf.0Initial program 77.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.f6480.2%
Simplified80.2%
if +inf.0 < (*.f64 (exp.f64 (-.f64 (*.f64 (log.f64 (sqrt.f64 (+.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)))) y.re) (*.f64 (atan2.f64 x.im x.re) y.im))) (cos.f64 (+.f64 (*.f64 (log.f64 (sqrt.f64 (+.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)))) y.im) (*.f64 (atan2.f64 x.im x.re) y.re)))) Initial program 0.0%
exp-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.f6470.7%
Simplified70.7%
Taylor expanded in y.im around 0
Simplified74.1%
Final simplification77.4%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* (atan2 x.im x.re) y.im)) (t_1 (+ (* x.re x.re) (* x.im x.im))))
(if (<= y.re -1.3e+131)
(*
(exp (- (* (log (sqrt t_1)) y.re) t_0))
(cos (* y.re (atan2 x.im x.re))))
(if (<= y.re 4.6e+18)
(/
(cos (* y.im (log (hypot x.im x.re))))
(/ (exp t_0) (pow (hypot x.re x.im) y.re)))
(pow (exp (* -0.5 (- t_0 (/ (log t_1) (/ 2.0 y.re))))) 2.0)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = (x_46_re * x_46_re) + (x_46_im * x_46_im);
double tmp;
if (y_46_re <= -1.3e+131) {
tmp = exp(((log(sqrt(t_1)) * y_46_re) - t_0)) * cos((y_46_re * atan2(x_46_im, x_46_re)));
} else if (y_46_re <= 4.6e+18) {
tmp = cos((y_46_im * log(hypot(x_46_im, x_46_re)))) / (exp(t_0) / pow(hypot(x_46_re, x_46_im), y_46_re));
} else {
tmp = pow(exp((-0.5 * (t_0 - (log(t_1) / (2.0 / y_46_re))))), 2.0);
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = (x_46_re * x_46_re) + (x_46_im * x_46_im);
double tmp;
if (y_46_re <= -1.3e+131) {
tmp = Math.exp(((Math.log(Math.sqrt(t_1)) * y_46_re) - t_0)) * Math.cos((y_46_re * Math.atan2(x_46_im, x_46_re)));
} else if (y_46_re <= 4.6e+18) {
tmp = Math.cos((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re)))) / (Math.exp(t_0) / Math.pow(Math.hypot(x_46_re, x_46_im), y_46_re));
} else {
tmp = Math.pow(Math.exp((-0.5 * (t_0 - (Math.log(t_1) / (2.0 / y_46_re))))), 2.0);
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.atan2(x_46_im, x_46_re) * y_46_im t_1 = (x_46_re * x_46_re) + (x_46_im * x_46_im) tmp = 0 if y_46_re <= -1.3e+131: tmp = math.exp(((math.log(math.sqrt(t_1)) * y_46_re) - t_0)) * math.cos((y_46_re * math.atan2(x_46_im, x_46_re))) elif y_46_re <= 4.6e+18: tmp = math.cos((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) / (math.exp(t_0) / math.pow(math.hypot(x_46_re, x_46_im), y_46_re)) else: tmp = math.pow(math.exp((-0.5 * (t_0 - (math.log(t_1) / (2.0 / y_46_re))))), 2.0) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(atan(x_46_im, x_46_re) * y_46_im) 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.3e+131) tmp = Float64(exp(Float64(Float64(log(sqrt(t_1)) * y_46_re) - t_0)) * cos(Float64(y_46_re * atan(x_46_im, x_46_re)))); elseif (y_46_re <= 4.6e+18) tmp = Float64(cos(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) / Float64(exp(t_0) / (hypot(x_46_re, x_46_im) ^ y_46_re))); else tmp = exp(Float64(-0.5 * Float64(t_0 - Float64(log(t_1) / Float64(2.0 / y_46_re))))) ^ 2.0; end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = atan2(x_46_im, x_46_re) * y_46_im; t_1 = (x_46_re * x_46_re) + (x_46_im * x_46_im); tmp = 0.0; if (y_46_re <= -1.3e+131) tmp = exp(((log(sqrt(t_1)) * y_46_re) - t_0)) * cos((y_46_re * atan2(x_46_im, x_46_re))); elseif (y_46_re <= 4.6e+18) tmp = cos((y_46_im * log(hypot(x_46_im, x_46_re)))) / (exp(t_0) / (hypot(x_46_re, x_46_im) ^ y_46_re)); else tmp = exp((-0.5 * (t_0 - (log(t_1) / (2.0 / y_46_re))))) ^ 2.0; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $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.3e+131], N[(N[Exp[N[(N[(N[Log[N[Sqrt[t$95$1], $MachinePrecision]], $MachinePrecision] * y$46$re), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision] * N[Cos[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 4.6e+18], N[(N[Cos[N[(y$46$im * N[Log[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / 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], N[Power[N[Exp[N[(-0.5 * N[(t$95$0 - N[(N[Log[t$95$1], $MachinePrecision] / N[(2.0 / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], 2.0], $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_1 := x.re \cdot x.re + x.im \cdot x.im\\
\mathbf{if}\;y.re \leq -1.3 \cdot 10^{+131}:\\
\;\;\;\;e^{\log \left(\sqrt{t\_1}\right) \cdot y.re - t\_0} \cdot \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{elif}\;y.re \leq 4.6 \cdot 10^{+18}:\\
\;\;\;\;\frac{\cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)}{\frac{e^{t\_0}}{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}}\\
\mathbf{else}:\\
\;\;\;\;{\left(e^{-0.5 \cdot \left(t\_0 - \frac{\log t\_1}{\frac{2}{y.re}}\right)}\right)}^{2}\\
\end{array}
\end{array}
if y.re < -1.3e131Initial program 40.6%
Taylor expanded in y.im around 0
cos-lowering-cos.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6484.4%
Simplified84.4%
if -1.3e131 < y.re < 4.6e18Initial program 43.7%
exp-diffN/A
associate-*l/N/A
associate-/l*N/A
*-commutativeN/A
associate-/r/N/A
exp-diffN/A
Simplified76.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.f6476.6%
Simplified76.6%
if 4.6e18 < y.re Initial program 37.9%
exp-diffN/A
associate-*l/N/A
associate-/l*N/A
*-commutativeN/A
associate-/r/N/A
exp-diffN/A
Simplified51.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.f6463.8%
Simplified63.8%
Taylor expanded in y.im around 0
Simplified69.0%
inv-powN/A
sqr-powN/A
pow2N/A
pow-lowering-pow.f64N/A
Applied egg-rr79.4%
Final simplification78.2%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* (atan2 x.im x.re) y.im)) (t_1 (+ (* x.re x.re) (* x.im x.im))))
(if (<= y.re -0.085)
(*
(exp (- (* (log (sqrt t_1)) y.re) t_0))
(cos (* y.re (atan2 x.im x.re))))
(if (<= y.re 3.4e+18)
(/ (cos (* y.im (log (hypot x.im x.re)))) (exp t_0))
(pow (exp (* -0.5 (- t_0 (/ (log t_1) (/ 2.0 y.re))))) 2.0)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = (x_46_re * x_46_re) + (x_46_im * x_46_im);
double tmp;
if (y_46_re <= -0.085) {
tmp = exp(((log(sqrt(t_1)) * y_46_re) - t_0)) * cos((y_46_re * atan2(x_46_im, x_46_re)));
} else if (y_46_re <= 3.4e+18) {
tmp = cos((y_46_im * log(hypot(x_46_im, x_46_re)))) / exp(t_0);
} else {
tmp = pow(exp((-0.5 * (t_0 - (log(t_1) / (2.0 / y_46_re))))), 2.0);
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = (x_46_re * x_46_re) + (x_46_im * x_46_im);
double tmp;
if (y_46_re <= -0.085) {
tmp = Math.exp(((Math.log(Math.sqrt(t_1)) * y_46_re) - t_0)) * Math.cos((y_46_re * Math.atan2(x_46_im, x_46_re)));
} else if (y_46_re <= 3.4e+18) {
tmp = Math.cos((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re)))) / Math.exp(t_0);
} else {
tmp = Math.pow(Math.exp((-0.5 * (t_0 - (Math.log(t_1) / (2.0 / y_46_re))))), 2.0);
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.atan2(x_46_im, x_46_re) * y_46_im t_1 = (x_46_re * x_46_re) + (x_46_im * x_46_im) tmp = 0 if y_46_re <= -0.085: tmp = math.exp(((math.log(math.sqrt(t_1)) * y_46_re) - t_0)) * math.cos((y_46_re * math.atan2(x_46_im, x_46_re))) elif y_46_re <= 3.4e+18: tmp = math.cos((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) / math.exp(t_0) else: tmp = math.pow(math.exp((-0.5 * (t_0 - (math.log(t_1) / (2.0 / y_46_re))))), 2.0) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(atan(x_46_im, x_46_re) * y_46_im) t_1 = Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)) tmp = 0.0 if (y_46_re <= -0.085) tmp = Float64(exp(Float64(Float64(log(sqrt(t_1)) * y_46_re) - t_0)) * cos(Float64(y_46_re * atan(x_46_im, x_46_re)))); elseif (y_46_re <= 3.4e+18) tmp = Float64(cos(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) / exp(t_0)); else tmp = exp(Float64(-0.5 * Float64(t_0 - Float64(log(t_1) / Float64(2.0 / y_46_re))))) ^ 2.0; end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = atan2(x_46_im, x_46_re) * y_46_im; t_1 = (x_46_re * x_46_re) + (x_46_im * x_46_im); tmp = 0.0; if (y_46_re <= -0.085) tmp = exp(((log(sqrt(t_1)) * y_46_re) - t_0)) * cos((y_46_re * atan2(x_46_im, x_46_re))); elseif (y_46_re <= 3.4e+18) tmp = cos((y_46_im * log(hypot(x_46_im, x_46_re)))) / exp(t_0); else tmp = exp((-0.5 * (t_0 - (log(t_1) / (2.0 / y_46_re))))) ^ 2.0; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $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, -0.085], N[(N[Exp[N[(N[(N[Log[N[Sqrt[t$95$1], $MachinePrecision]], $MachinePrecision] * y$46$re), $MachinePrecision] - t$95$0), $MachinePrecision]], $MachinePrecision] * N[Cos[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 3.4e+18], 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[t$95$0], $MachinePrecision]), $MachinePrecision], N[Power[N[Exp[N[(-0.5 * N[(t$95$0 - N[(N[Log[t$95$1], $MachinePrecision] / N[(2.0 / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], 2.0], $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_1 := x.re \cdot x.re + x.im \cdot x.im\\
\mathbf{if}\;y.re \leq -0.085:\\
\;\;\;\;e^{\log \left(\sqrt{t\_1}\right) \cdot y.re - t\_0} \cdot \cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)\\
\mathbf{elif}\;y.re \leq 3.4 \cdot 10^{+18}:\\
\;\;\;\;\frac{\cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)}{e^{t\_0}}\\
\mathbf{else}:\\
\;\;\;\;{\left(e^{-0.5 \cdot \left(t\_0 - \frac{\log t\_1}{\frac{2}{y.re}}\right)}\right)}^{2}\\
\end{array}
\end{array}
if y.re < -0.0850000000000000061Initial program 41.0%
Taylor expanded in y.im around 0
cos-lowering-cos.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6478.6%
Simplified78.6%
if -0.0850000000000000061 < y.re < 3.4e18Initial program 44.1%
exp-diffN/A
associate-*l/N/A
associate-/l*N/A
*-commutativeN/A
associate-/r/N/A
exp-diffN/A
Simplified77.7%
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.f6476.7%
Simplified76.7%
if 3.4e18 < y.re Initial program 37.9%
exp-diffN/A
associate-*l/N/A
associate-/l*N/A
*-commutativeN/A
associate-/r/N/A
exp-diffN/A
Simplified51.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.f6463.8%
Simplified63.8%
Taylor expanded in y.im around 0
Simplified69.0%
inv-powN/A
sqr-powN/A
pow2N/A
pow-lowering-pow.f64N/A
Applied egg-rr79.4%
Final simplification77.7%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* (atan2 x.im x.re) y.im)) (t_1 (+ (* x.re x.re) (* x.im x.im))))
(if (<= y.re -3450.0)
(/ (cos (* y.re (atan2 x.im x.re))) (pow t_1 (/ y.re -2.0)))
(if (<= y.re 3.4e+18)
(/ (cos (* y.im (log (hypot x.im x.re)))) (exp t_0))
(pow (exp (* -0.5 (- t_0 (/ (log t_1) (/ 2.0 y.re))))) 2.0)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = (x_46_re * x_46_re) + (x_46_im * x_46_im);
double tmp;
if (y_46_re <= -3450.0) {
tmp = cos((y_46_re * atan2(x_46_im, x_46_re))) / pow(t_1, (y_46_re / -2.0));
} else if (y_46_re <= 3.4e+18) {
tmp = cos((y_46_im * log(hypot(x_46_im, x_46_re)))) / exp(t_0);
} else {
tmp = pow(exp((-0.5 * (t_0 - (log(t_1) / (2.0 / y_46_re))))), 2.0);
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = (x_46_re * x_46_re) + (x_46_im * x_46_im);
double tmp;
if (y_46_re <= -3450.0) {
tmp = Math.cos((y_46_re * Math.atan2(x_46_im, x_46_re))) / Math.pow(t_1, (y_46_re / -2.0));
} else if (y_46_re <= 3.4e+18) {
tmp = Math.cos((y_46_im * Math.log(Math.hypot(x_46_im, x_46_re)))) / Math.exp(t_0);
} else {
tmp = Math.pow(Math.exp((-0.5 * (t_0 - (Math.log(t_1) / (2.0 / y_46_re))))), 2.0);
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.atan2(x_46_im, x_46_re) * y_46_im t_1 = (x_46_re * x_46_re) + (x_46_im * x_46_im) tmp = 0 if y_46_re <= -3450.0: tmp = math.cos((y_46_re * math.atan2(x_46_im, x_46_re))) / math.pow(t_1, (y_46_re / -2.0)) elif y_46_re <= 3.4e+18: tmp = math.cos((y_46_im * math.log(math.hypot(x_46_im, x_46_re)))) / math.exp(t_0) else: tmp = math.pow(math.exp((-0.5 * (t_0 - (math.log(t_1) / (2.0 / y_46_re))))), 2.0) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(atan(x_46_im, x_46_re) * y_46_im) t_1 = Float64(Float64(x_46_re * x_46_re) + Float64(x_46_im * x_46_im)) tmp = 0.0 if (y_46_re <= -3450.0) tmp = Float64(cos(Float64(y_46_re * atan(x_46_im, x_46_re))) / (t_1 ^ Float64(y_46_re / -2.0))); elseif (y_46_re <= 3.4e+18) tmp = Float64(cos(Float64(y_46_im * log(hypot(x_46_im, x_46_re)))) / exp(t_0)); else tmp = exp(Float64(-0.5 * Float64(t_0 - Float64(log(t_1) / Float64(2.0 / y_46_re))))) ^ 2.0; end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = atan2(x_46_im, x_46_re) * y_46_im; t_1 = (x_46_re * x_46_re) + (x_46_im * x_46_im); tmp = 0.0; if (y_46_re <= -3450.0) tmp = cos((y_46_re * atan2(x_46_im, x_46_re))) / (t_1 ^ (y_46_re / -2.0)); elseif (y_46_re <= 3.4e+18) tmp = cos((y_46_im * log(hypot(x_46_im, x_46_re)))) / exp(t_0); else tmp = exp((-0.5 * (t_0 - (log(t_1) / (2.0 / y_46_re))))) ^ 2.0; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $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, -3450.0], N[(N[Cos[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Power[t$95$1, N[(y$46$re / -2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 3.4e+18], 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[t$95$0], $MachinePrecision]), $MachinePrecision], N[Power[N[Exp[N[(-0.5 * N[(t$95$0 - N[(N[Log[t$95$1], $MachinePrecision] / N[(2.0 / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], 2.0], $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_1 := x.re \cdot x.re + x.im \cdot x.im\\
\mathbf{if}\;y.re \leq -3450:\\
\;\;\;\;\frac{\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}{{t\_1}^{\left(\frac{y.re}{-2}\right)}}\\
\mathbf{elif}\;y.re \leq 3.4 \cdot 10^{+18}:\\
\;\;\;\;\frac{\cos \left(y.im \cdot \log \left(\mathsf{hypot}\left(x.im, x.re\right)\right)\right)}{e^{t\_0}}\\
\mathbf{else}:\\
\;\;\;\;{\left(e^{-0.5 \cdot \left(t\_0 - \frac{\log t\_1}{\frac{2}{y.re}}\right)}\right)}^{2}\\
\end{array}
\end{array}
if y.re < -3450Initial program 38.9%
Applied egg-rr27.8%
Taylor expanded in y.im around 0
cos-lowering-cos.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6478.0%
Simplified78.0%
if -3450 < y.re < 3.4e18Initial program 44.9%
exp-diffN/A
associate-*l/N/A
associate-/l*N/A
*-commutativeN/A
associate-/r/N/A
exp-diffN/A
Simplified77.3%
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.f6476.4%
Simplified76.4%
if 3.4e18 < y.re Initial program 37.9%
exp-diffN/A
associate-*l/N/A
associate-/l*N/A
*-commutativeN/A
associate-/r/N/A
exp-diffN/A
Simplified51.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.f6463.8%
Simplified63.8%
Taylor expanded in y.im around 0
Simplified69.0%
inv-powN/A
sqr-powN/A
pow2N/A
pow-lowering-pow.f64N/A
Applied egg-rr79.4%
Final simplification77.0%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* (atan2 x.im x.re) y.im)) (t_1 (+ (* x.re x.re) (* x.im x.im))))
(if (<= y.re -1.95e+59)
(/ (cos (* y.re (atan2 x.im x.re))) (pow t_1 (/ y.re -2.0)))
(if (<= y.re 1.65e-12)
(/ 1.0 (/ (exp t_0) (pow (hypot x.re x.im) y.re)))
(pow (exp (* -0.5 (- t_0 (/ (log t_1) (/ 2.0 y.re))))) 2.0)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = (x_46_re * x_46_re) + (x_46_im * x_46_im);
double tmp;
if (y_46_re <= -1.95e+59) {
tmp = cos((y_46_re * atan2(x_46_im, x_46_re))) / pow(t_1, (y_46_re / -2.0));
} else if (y_46_re <= 1.65e-12) {
tmp = 1.0 / (exp(t_0) / pow(hypot(x_46_re, x_46_im), y_46_re));
} else {
tmp = pow(exp((-0.5 * (t_0 - (log(t_1) / (2.0 / y_46_re))))), 2.0);
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = Math.atan2(x_46_im, x_46_re) * y_46_im;
double t_1 = (x_46_re * x_46_re) + (x_46_im * x_46_im);
double tmp;
if (y_46_re <= -1.95e+59) {
tmp = Math.cos((y_46_re * Math.atan2(x_46_im, x_46_re))) / Math.pow(t_1, (y_46_re / -2.0));
} else if (y_46_re <= 1.65e-12) {
tmp = 1.0 / (Math.exp(t_0) / Math.pow(Math.hypot(x_46_re, x_46_im), y_46_re));
} else {
tmp = Math.pow(Math.exp((-0.5 * (t_0 - (Math.log(t_1) / (2.0 / y_46_re))))), 2.0);
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = math.atan2(x_46_im, x_46_re) * y_46_im t_1 = (x_46_re * x_46_re) + (x_46_im * x_46_im) tmp = 0 if y_46_re <= -1.95e+59: tmp = math.cos((y_46_re * math.atan2(x_46_im, x_46_re))) / math.pow(t_1, (y_46_re / -2.0)) elif y_46_re <= 1.65e-12: tmp = 1.0 / (math.exp(t_0) / math.pow(math.hypot(x_46_re, x_46_im), y_46_re)) else: tmp = math.pow(math.exp((-0.5 * (t_0 - (math.log(t_1) / (2.0 / y_46_re))))), 2.0) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(atan(x_46_im, x_46_re) * y_46_im) 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.95e+59) tmp = Float64(cos(Float64(y_46_re * atan(x_46_im, x_46_re))) / (t_1 ^ Float64(y_46_re / -2.0))); elseif (y_46_re <= 1.65e-12) tmp = Float64(1.0 / Float64(exp(t_0) / (hypot(x_46_re, x_46_im) ^ y_46_re))); else tmp = exp(Float64(-0.5 * Float64(t_0 - Float64(log(t_1) / Float64(2.0 / y_46_re))))) ^ 2.0; end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = atan2(x_46_im, x_46_re) * y_46_im; t_1 = (x_46_re * x_46_re) + (x_46_im * x_46_im); tmp = 0.0; if (y_46_re <= -1.95e+59) tmp = cos((y_46_re * atan2(x_46_im, x_46_re))) / (t_1 ^ (y_46_re / -2.0)); elseif (y_46_re <= 1.65e-12) tmp = 1.0 / (exp(t_0) / (hypot(x_46_re, x_46_im) ^ y_46_re)); else tmp = exp((-0.5 * (t_0 - (log(t_1) / (2.0 / y_46_re))))) ^ 2.0; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $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.95e+59], N[(N[Cos[N[(y$46$re * N[ArcTan[x$46$im / x$46$re], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Power[t$95$1, N[(y$46$re / -2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 1.65e-12], 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], N[Power[N[Exp[N[(-0.5 * N[(t$95$0 - N[(N[Log[t$95$1], $MachinePrecision] / N[(2.0 / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], 2.0], $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im\\
t_1 := x.re \cdot x.re + x.im \cdot x.im\\
\mathbf{if}\;y.re \leq -1.95 \cdot 10^{+59}:\\
\;\;\;\;\frac{\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right)}{{t\_1}^{\left(\frac{y.re}{-2}\right)}}\\
\mathbf{elif}\;y.re \leq 1.65 \cdot 10^{-12}:\\
\;\;\;\;\frac{1}{\frac{e^{t\_0}}{{\left(\mathsf{hypot}\left(x.re, x.im\right)\right)}^{y.re}}}\\
\mathbf{else}:\\
\;\;\;\;{\left(e^{-0.5 \cdot \left(t\_0 - \frac{\log t\_1}{\frac{2}{y.re}}\right)}\right)}^{2}\\
\end{array}
\end{array}
if y.re < -1.95000000000000011e59Initial program 40.9%
Applied egg-rr27.3%
Taylor expanded in y.im around 0
cos-lowering-cos.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6477.5%
Simplified77.5%
if -1.95000000000000011e59 < y.re < 1.65e-12Initial program 43.3%
exp-diffN/A
associate-*l/N/A
associate-/l*N/A
*-commutativeN/A
associate-/r/N/A
exp-diffN/A
Simplified79.3%
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.f6479.4%
Simplified79.4%
Taylor expanded in y.im around 0
Simplified78.0%
if 1.65e-12 < y.re Initial program 40.1%
exp-diffN/A
associate-*l/N/A
associate-/l*N/A
*-commutativeN/A
associate-/r/N/A
exp-diffN/A
Simplified51.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.f6461.5%
Simplified61.5%
Taylor expanded in y.im around 0
Simplified63.0%
inv-powN/A
sqr-powN/A
pow2N/A
pow-lowering-pow.f64N/A
Applied egg-rr73.4%
Final simplification76.3%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (exp (- 0.0 (* (atan2 x.im x.re) y.im)))))
(if (<= y.im -7e+107)
(* (cos (* y.re (atan2 x.im x.re))) t_0)
(if (<= y.im 2100000000.0) (pow (hypot x.im x.re) y.re) t_0))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = exp((0.0 - (atan2(x_46_im, x_46_re) * y_46_im)));
double tmp;
if (y_46_im <= -7e+107) {
tmp = cos((y_46_re * atan2(x_46_im, x_46_re))) * t_0;
} else if (y_46_im <= 2100000000.0) {
tmp = pow(hypot(x_46_im, x_46_re), y_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.exp((0.0 - (Math.atan2(x_46_im, x_46_re) * y_46_im)));
double tmp;
if (y_46_im <= -7e+107) {
tmp = Math.cos((y_46_re * Math.atan2(x_46_im, x_46_re))) * t_0;
} else if (y_46_im <= 2100000000.0) {
tmp = Math.pow(Math.hypot(x_46_im, x_46_re), y_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.exp((0.0 - (math.atan2(x_46_im, x_46_re) * y_46_im))) tmp = 0 if y_46_im <= -7e+107: tmp = math.cos((y_46_re * math.atan2(x_46_im, x_46_re))) * t_0 elif y_46_im <= 2100000000.0: tmp = math.pow(math.hypot(x_46_im, x_46_re), y_46_re) else: tmp = t_0 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = exp(Float64(0.0 - Float64(atan(x_46_im, x_46_re) * y_46_im))) tmp = 0.0 if (y_46_im <= -7e+107) tmp = Float64(cos(Float64(y_46_re * atan(x_46_im, x_46_re))) * t_0); elseif (y_46_im <= 2100000000.0) tmp = hypot(x_46_im, x_46_re) ^ y_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 = exp((0.0 - (atan2(x_46_im, x_46_re) * y_46_im))); tmp = 0.0; if (y_46_im <= -7e+107) tmp = cos((y_46_re * atan2(x_46_im, x_46_re))) * t_0; elseif (y_46_im <= 2100000000.0) tmp = hypot(x_46_im, x_46_re) ^ y_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[Exp[N[(0.0 - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$im, -7e+107], 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$im, 2100000000.0], N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := e^{0 - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\
\mathbf{if}\;y.im \leq -7 \cdot 10^{+107}:\\
\;\;\;\;\cos \left(y.re \cdot \tan^{-1}_* \frac{x.im}{x.re}\right) \cdot t\_0\\
\mathbf{elif}\;y.im \leq 2100000000:\\
\;\;\;\;{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if y.im < -6.9999999999999995e107Initial program 25.6%
Taylor expanded in y.im around 0
cos-lowering-cos.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6446.4%
Simplified46.4%
Taylor expanded in y.re around 0
exp-lowering-exp.f64N/A
distribute-rgt-neg-inN/A
mul-1-negN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6466.3%
Simplified66.3%
if -6.9999999999999995e107 < y.im < 2.1e9Initial program 46.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.f6479.0%
Simplified79.0%
Taylor expanded in y.re around 0
Simplified84.1%
if 2.1e9 < y.im Initial program 44.8%
exp-diffN/A
associate-*l/N/A
associate-/l*N/A
*-commutativeN/A
associate-/r/N/A
exp-diffN/A
Simplified54.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.f6448.6%
Simplified48.6%
Taylor expanded in y.im around 0
Simplified49.5%
Taylor expanded in y.re around 0
rec-expN/A
exp-lowering-exp.f64N/A
neg-lowering-neg.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6460.9%
Simplified60.9%
Final simplification75.8%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (exp (- 0.0 (* (atan2 x.im x.re) y.im)))))
(if (<= y.im -7.5e+107)
t_0
(if (<= y.im 5000000000.0) (pow (hypot x.im x.re) y.re) t_0))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = exp((0.0 - (atan2(x_46_im, x_46_re) * y_46_im)));
double tmp;
if (y_46_im <= -7.5e+107) {
tmp = t_0;
} else if (y_46_im <= 5000000000.0) {
tmp = pow(hypot(x_46_im, x_46_re), y_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.exp((0.0 - (Math.atan2(x_46_im, x_46_re) * y_46_im)));
double tmp;
if (y_46_im <= -7.5e+107) {
tmp = t_0;
} else if (y_46_im <= 5000000000.0) {
tmp = Math.pow(Math.hypot(x_46_im, x_46_re), y_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.exp((0.0 - (math.atan2(x_46_im, x_46_re) * y_46_im))) tmp = 0 if y_46_im <= -7.5e+107: tmp = t_0 elif y_46_im <= 5000000000.0: tmp = math.pow(math.hypot(x_46_im, x_46_re), y_46_re) else: tmp = t_0 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = exp(Float64(0.0 - Float64(atan(x_46_im, x_46_re) * y_46_im))) tmp = 0.0 if (y_46_im <= -7.5e+107) tmp = t_0; elseif (y_46_im <= 5000000000.0) tmp = hypot(x_46_im, x_46_re) ^ y_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 = exp((0.0 - (atan2(x_46_im, x_46_re) * y_46_im))); tmp = 0.0; if (y_46_im <= -7.5e+107) tmp = t_0; elseif (y_46_im <= 5000000000.0) tmp = hypot(x_46_im, x_46_re) ^ y_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[Exp[N[(0.0 - N[(N[ArcTan[x$46$im / x$46$re], $MachinePrecision] * y$46$im), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y$46$im, -7.5e+107], t$95$0, If[LessEqual[y$46$im, 5000000000.0], N[Power[N[Sqrt[x$46$im ^ 2 + x$46$re ^ 2], $MachinePrecision], y$46$re], $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := e^{0 - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\
\mathbf{if}\;y.im \leq -7.5 \cdot 10^{+107}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y.im \leq 5000000000:\\
\;\;\;\;{\left(\mathsf{hypot}\left(x.im, x.re\right)\right)}^{y.re}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if y.im < -7.4999999999999996e107 or 5e9 < y.im Initial program 35.3%
exp-diffN/A
associate-*l/N/A
associate-/l*N/A
*-commutativeN/A
associate-/r/N/A
exp-diffN/A
Simplified50.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.f6448.4%
Simplified48.4%
Taylor expanded in y.im around 0
Simplified51.0%
Taylor expanded in y.re around 0
rec-expN/A
exp-lowering-exp.f64N/A
neg-lowering-neg.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6463.5%
Simplified63.5%
if -7.4999999999999996e107 < y.im < 5e9Initial program 46.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.f6479.0%
Simplified79.0%
Taylor expanded in y.re around 0
Simplified84.1%
Final simplification75.8%
(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 -145.0)
t_0
(if (<= y.re 3.4e+18) (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 <= -145.0) {
tmp = t_0;
} else if (y_46_re <= 3.4e+18) {
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 <= (-145.0d0)) then
tmp = t_0
else if (y_46re <= 3.4d+18) 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 <= -145.0) {
tmp = t_0;
} else if (y_46_re <= 3.4e+18) {
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 <= -145.0: tmp = t_0 elif y_46_re <= 3.4e+18: 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 <= -145.0) tmp = t_0; elseif (y_46_re <= 3.4e+18) 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 <= -145.0) tmp = t_0; elseif (y_46_re <= 3.4e+18) 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, -145.0], t$95$0, If[LessEqual[y$46$re, 3.4e+18], 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 -145:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y.re \leq 3.4 \cdot 10^{+18}:\\
\;\;\;\;e^{0 - \tan^{-1}_* \frac{x.im}{x.re} \cdot y.im}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if y.re < -145 or 3.4e18 < y.re Initial program 38.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.f6464.5%
Simplified64.5%
*-commutativeN/A
sqrt-pow2N/A
+-commutativeN/A
sqrt-pow2N/A
*-lowering-*.f64N/A
sqrt-pow2N/A
pow-lowering-pow.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-commutativeN/A
cos-lowering-cos.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6464.5%
Applied egg-rr64.5%
Taylor expanded in y.re around 0
Simplified73.4%
if -145 < y.re < 3.4e18Initial program 44.9%
exp-diffN/A
associate-*l/N/A
associate-/l*N/A
*-commutativeN/A
associate-/r/N/A
exp-diffN/A
Simplified77.3%
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.5%
Simplified76.5%
Taylor expanded in y.im around 0
Simplified73.7%
Taylor expanded in y.re around 0
rec-expN/A
exp-lowering-exp.f64N/A
neg-lowering-neg.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6474.2%
Simplified74.2%
Final simplification73.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 -6.8e-140) t_0 (if (<= y.re 9e-29) 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 <= -6.8e-140) {
tmp = t_0;
} else if (y_46_re <= 9e-29) {
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 <= (-6.8d-140)) then
tmp = t_0
else if (y_46re <= 9d-29) 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 <= -6.8e-140) {
tmp = t_0;
} else if (y_46_re <= 9e-29) {
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 <= -6.8e-140: tmp = t_0 elif y_46_re <= 9e-29: 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 <= -6.8e-140) tmp = t_0; elseif (y_46_re <= 9e-29) 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 <= -6.8e-140) tmp = t_0; elseif (y_46_re <= 9e-29) 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, -6.8e-140], t$95$0, If[LessEqual[y$46$re, 9e-29], 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 -6.8 \cdot 10^{-140}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y.re \leq 9 \cdot 10^{-29}:\\
\;\;\;\;1\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if y.re < -6.80000000000000017e-140 or 8.9999999999999996e-29 < y.re Initial program 40.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.f6458.0%
Simplified58.0%
*-commutativeN/A
sqrt-pow2N/A
+-commutativeN/A
sqrt-pow2N/A
*-lowering-*.f64N/A
sqrt-pow2N/A
pow-lowering-pow.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-commutativeN/A
cos-lowering-cos.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6459.2%
Applied egg-rr59.2%
Taylor expanded in y.re around 0
Simplified64.1%
if -6.80000000000000017e-140 < y.re < 8.9999999999999996e-29Initial program 44.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.f6451.0%
Simplified51.0%
Taylor expanded in y.re around 0
Simplified51.0%
Final simplification59.2%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (<= x.re -1.7e+39) (pow (* x.re x.re) (/ y.re 2.0)) (if (<= x.re 4.2e-113) (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 <= -1.7e+39) {
tmp = pow((x_46_re * x_46_re), (y_46_re / 2.0));
} else if (x_46_re <= 4.2e-113) {
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 <= (-1.7d+39)) then
tmp = (x_46re * x_46re) ** (y_46re / 2.0d0)
else if (x_46re <= 4.2d-113) 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 <= -1.7e+39) {
tmp = Math.pow((x_46_re * x_46_re), (y_46_re / 2.0));
} else if (x_46_re <= 4.2e-113) {
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 <= -1.7e+39: tmp = math.pow((x_46_re * x_46_re), (y_46_re / 2.0)) elif x_46_re <= 4.2e-113: 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 <= -1.7e+39) tmp = Float64(x_46_re * x_46_re) ^ Float64(y_46_re / 2.0); elseif (x_46_re <= 4.2e-113) 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 <= -1.7e+39) tmp = (x_46_re * x_46_re) ^ (y_46_re / 2.0); elseif (x_46_re <= 4.2e-113) 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, -1.7e+39], N[Power[N[(x$46$re * x$46$re), $MachinePrecision], N[(y$46$re / 2.0), $MachinePrecision]], $MachinePrecision], If[LessEqual[x$46$re, 4.2e-113], 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 -1.7 \cdot 10^{+39}:\\
\;\;\;\;{\left(x.re \cdot x.re\right)}^{\left(\frac{y.re}{2}\right)}\\
\mathbf{elif}\;x.re \leq 4.2 \cdot 10^{-113}:\\
\;\;\;\;{\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 < -1.6999999999999999e39Initial program 24.4%
exp-diffN/A
associate-*l/N/A
associate-/l*N/A
*-commutativeN/A
associate-/r/N/A
exp-diffN/A
Simplified71.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.4%
Simplified72.4%
Taylor expanded in x.im around 0
associate-/l*N/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
/-lowering-/.f64N/A
pow-lowering-pow.f64N/A
exp-lowering-exp.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f640.0%
Simplified0.0%
Taylor expanded in y.im around 0
pow-lowering-pow.f6429.0%
Simplified29.0%
sqr-powN/A
pow-prod-downN/A
pow-lowering-pow.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f6451.1%
Applied egg-rr51.1%
if -1.6999999999999999e39 < x.re < 4.2e-113Initial program 51.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.f6453.2%
Simplified53.2%
*-commutativeN/A
sqrt-pow2N/A
+-commutativeN/A
sqrt-pow2N/A
*-lowering-*.f64N/A
sqrt-pow2N/A
pow-lowering-pow.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-commutativeN/A
cos-lowering-cos.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6450.7%
Applied egg-rr50.7%
Taylor expanded in x.im around inf
unpow2N/A
*-lowering-*.f6450.7%
Simplified50.7%
Taylor expanded in y.re around 0
Simplified53.4%
if 4.2e-113 < x.re Initial program 38.2%
exp-diffN/A
associate-*l/N/A
associate-/l*N/A
*-commutativeN/A
associate-/r/N/A
exp-diffN/A
Simplified65.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.f6467.6%
Simplified67.6%
Taylor expanded in x.im around 0
associate-/l*N/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
/-lowering-/.f64N/A
pow-lowering-pow.f64N/A
exp-lowering-exp.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6470.9%
Simplified70.9%
Taylor expanded in y.im around 0
pow-lowering-pow.f6463.3%
Simplified63.3%
Final simplification56.5%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (<= y.re -1.5e-7) (pow x.re y.re) (if (<= y.re 9.4e-5) 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 <= -1.5e-7) {
tmp = pow(x_46_re, y_46_re);
} else if (y_46_re <= 9.4e-5) {
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 <= (-1.5d-7)) then
tmp = x_46re ** y_46re
else if (y_46re <= 9.4d-5) 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 <= -1.5e-7) {
tmp = Math.pow(x_46_re, y_46_re);
} else if (y_46_re <= 9.4e-5) {
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 <= -1.5e-7: tmp = math.pow(x_46_re, y_46_re) elif y_46_re <= 9.4e-5: 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 <= -1.5e-7) tmp = x_46_re ^ y_46_re; elseif (y_46_re <= 9.4e-5) 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 <= -1.5e-7) tmp = x_46_re ^ y_46_re; elseif (y_46_re <= 9.4e-5) 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, -1.5e-7], N[Power[x$46$re, y$46$re], $MachinePrecision], If[LessEqual[y$46$re, 9.4e-5], 1.0, N[Power[x$46$re, y$46$re], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq -1.5 \cdot 10^{-7}:\\
\;\;\;\;{x.re}^{y.re}\\
\mathbf{elif}\;y.re \leq 9.4 \cdot 10^{-5}:\\
\;\;\;\;1\\
\mathbf{else}:\\
\;\;\;\;{x.re}^{y.re}\\
\end{array}
\end{array}
if y.re < -1.4999999999999999e-7 or 9.39999999999999945e-5 < y.re Initial program 39.0%
exp-diffN/A
associate-*l/N/A
associate-/l*N/A
*-commutativeN/A
associate-/r/N/A
exp-diffN/A
Simplified55.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.f6459.9%
Simplified59.9%
Taylor expanded in x.im around 0
associate-/l*N/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
/-lowering-/.f64N/A
pow-lowering-pow.f64N/A
exp-lowering-exp.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6430.1%
Simplified30.1%
Taylor expanded in y.im around 0
pow-lowering-pow.f6452.0%
Simplified52.0%
if -1.4999999999999999e-7 < y.re < 9.39999999999999945e-5Initial 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.f6449.1%
Simplified49.1%
Taylor expanded in y.re around 0
Simplified48.0%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (<= x.re 5.8e-299) (pow (* x.re x.re) (/ 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 <= 5.8e-299) {
tmp = pow((x_46_re * x_46_re), (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 <= 5.8d-299) then
tmp = (x_46re * x_46re) ** (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 <= 5.8e-299) {
tmp = Math.pow((x_46_re * x_46_re), (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 <= 5.8e-299: tmp = math.pow((x_46_re * x_46_re), (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 <= 5.8e-299) tmp = Float64(x_46_re * x_46_re) ^ 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 <= 5.8e-299) tmp = (x_46_re * x_46_re) ^ (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, 5.8e-299], N[Power[N[(x$46$re * x$46$re), $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 5.8 \cdot 10^{-299}:\\
\;\;\;\;{\left(x.re \cdot x.re\right)}^{\left(\frac{y.re}{2}\right)}\\
\mathbf{else}:\\
\;\;\;\;{x.re}^{y.re}\\
\end{array}
\end{array}
if x.re < 5.80000000000000051e-299Initial program 40.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.f6471.8%
Simplified71.8%
Taylor expanded in x.im around 0
associate-/l*N/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
/-lowering-/.f64N/A
pow-lowering-pow.f64N/A
exp-lowering-exp.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f641.6%
Simplified1.6%
Taylor expanded in y.im around 0
pow-lowering-pow.f6419.4%
Simplified19.4%
sqr-powN/A
pow-prod-downN/A
pow-lowering-pow.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f6444.2%
Applied egg-rr44.2%
if 5.80000000000000051e-299 < x.re Initial program 43.6%
exp-diffN/A
associate-*l/N/A
associate-/l*N/A
*-commutativeN/A
associate-/r/N/A
exp-diffN/A
Simplified67.3%
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.2%
Simplified68.2%
Taylor expanded in x.im around 0
associate-/l*N/A
*-lowering-*.f64N/A
cos-lowering-cos.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
/-lowering-/.f64N/A
pow-lowering-pow.f64N/A
exp-lowering-exp.f64N/A
*-lowering-*.f64N/A
atan2-lowering-atan2.f6465.8%
Simplified65.8%
Taylor expanded in y.im around 0
pow-lowering-pow.f6455.3%
Simplified55.3%
(FPCore (x.re x.im y.re y.im) :precision binary64 1.0)
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return 1.0;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
code = 1.0d0
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return 1.0;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): return 1.0
function code(x_46_re, x_46_im, y_46_re, y_46_im) return 1.0 end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 1.0; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := 1.0
\begin{array}{l}
\\
1
\end{array}
Initial program 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.f6455.4%
Simplified55.4%
Taylor expanded in y.re around 0
Simplified26.7%
herbie shell --seed 2024138
(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)))))