
(FPCore (x.re x.im y.re y.im) :precision binary64 (/ (+ (* x.re y.re) (* x.im y.im)) (+ (* y.re y.re) (* y.im y.im))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return ((x_46_re * y_46_re) + (x_46_im * y_46_im)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im));
}
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 = ((x_46re * y_46re) + (x_46im * y_46im)) / ((y_46re * y_46re) + (y_46im * y_46im))
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return ((x_46_re * y_46_re) + (x_46_im * y_46_im)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im));
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): return ((x_46_re * y_46_re) + (x_46_im * y_46_im)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im))
function code(x_46_re, x_46_im, y_46_re, y_46_im) return Float64(Float64(Float64(x_46_re * y_46_re) + Float64(x_46_im * y_46_im)) / Float64(Float64(y_46_re * y_46_re) + Float64(y_46_im * y_46_im))) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = ((x_46_re * y_46_re) + (x_46_im * y_46_im)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im)); end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[(N[(N[(x$46$re * y$46$re), $MachinePrecision] + N[(x$46$im * y$46$im), $MachinePrecision]), $MachinePrecision] / N[(N[(y$46$re * y$46$re), $MachinePrecision] + N[(y$46$im * y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x.re \cdot y.re + x.im \cdot y.im}{y.re \cdot y.re + y.im \cdot y.im}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 11 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x.re x.im y.re y.im) :precision binary64 (/ (+ (* x.re y.re) (* x.im y.im)) (+ (* y.re y.re) (* y.im y.im))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return ((x_46_re * y_46_re) + (x_46_im * y_46_im)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im));
}
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 = ((x_46re * y_46re) + (x_46im * y_46im)) / ((y_46re * y_46re) + (y_46im * y_46im))
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return ((x_46_re * y_46_re) + (x_46_im * y_46_im)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im));
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): return ((x_46_re * y_46_re) + (x_46_im * y_46_im)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im))
function code(x_46_re, x_46_im, y_46_re, y_46_im) return Float64(Float64(Float64(x_46_re * y_46_re) + Float64(x_46_im * y_46_im)) / Float64(Float64(y_46_re * y_46_re) + Float64(y_46_im * y_46_im))) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = ((x_46_re * y_46_re) + (x_46_im * y_46_im)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im)); end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[(N[(N[(x$46$re * y$46$re), $MachinePrecision] + N[(x$46$im * y$46$im), $MachinePrecision]), $MachinePrecision] / N[(N[(y$46$re * y$46$re), $MachinePrecision] + N[(y$46$im * y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x.re \cdot y.re + x.im \cdot y.im}{y.re \cdot y.re + y.im \cdot y.im}
\end{array}
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (<=
(/ (+ (* x.re y.re) (* x.im y.im)) (+ (* y.re y.re) (* y.im y.im)))
5e+234)
(*
(/ 1.0 (hypot y.re y.im))
(/ (fma x.re y.re (* x.im y.im)) (hypot y.re y.im)))
(+ (/ x.im y.im) (* (/ 1.0 y.im) (/ x.re (/ y.im y.re))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((((x_46_re * y_46_re) + (x_46_im * y_46_im)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im))) <= 5e+234) {
tmp = (1.0 / hypot(y_46_re, y_46_im)) * (fma(x_46_re, y_46_re, (x_46_im * y_46_im)) / hypot(y_46_re, y_46_im));
} else {
tmp = (x_46_im / y_46_im) + ((1.0 / y_46_im) * (x_46_re / (y_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 (Float64(Float64(Float64(x_46_re * y_46_re) + Float64(x_46_im * y_46_im)) / Float64(Float64(y_46_re * y_46_re) + Float64(y_46_im * y_46_im))) <= 5e+234) tmp = Float64(Float64(1.0 / hypot(y_46_re, y_46_im)) * Float64(fma(x_46_re, y_46_re, Float64(x_46_im * y_46_im)) / hypot(y_46_re, y_46_im))); else tmp = Float64(Float64(x_46_im / y_46_im) + Float64(Float64(1.0 / y_46_im) * Float64(x_46_re / Float64(y_46_im / y_46_re)))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[N[(N[(N[(x$46$re * y$46$re), $MachinePrecision] + N[(x$46$im * y$46$im), $MachinePrecision]), $MachinePrecision] / N[(N[(y$46$re * y$46$re), $MachinePrecision] + N[(y$46$im * y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 5e+234], N[(N[(1.0 / N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision]), $MachinePrecision] * N[(N[(x$46$re * y$46$re + N[(x$46$im * y$46$im), $MachinePrecision]), $MachinePrecision] / N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x$46$im / y$46$im), $MachinePrecision] + N[(N[(1.0 / y$46$im), $MachinePrecision] * N[(x$46$re / N[(y$46$im / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{x.re \cdot y.re + x.im \cdot y.im}{y.re \cdot y.re + y.im \cdot y.im} \leq 5 \cdot 10^{+234}:\\
\;\;\;\;\frac{1}{\mathsf{hypot}\left(y.re, y.im\right)} \cdot \frac{\mathsf{fma}\left(x.re, y.re, x.im \cdot y.im\right)}{\mathsf{hypot}\left(y.re, y.im\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x.im}{y.im} + \frac{1}{y.im} \cdot \frac{x.re}{\frac{y.im}{y.re}}\\
\end{array}
\end{array}
if (/.f64 (+.f64 (*.f64 x.re y.re) (*.f64 x.im y.im)) (+.f64 (*.f64 y.re y.re) (*.f64 y.im y.im))) < 5.0000000000000003e234Initial program 79.5%
add-sqr-sqrt79.5%
*-un-lft-identity79.5%
times-frac79.5%
hypot-def79.5%
fma-def79.5%
hypot-def97.3%
Applied egg-rr97.3%
if 5.0000000000000003e234 < (/.f64 (+.f64 (*.f64 x.re y.re) (*.f64 x.im y.im)) (+.f64 (*.f64 y.re y.re) (*.f64 y.im y.im))) Initial program 17.8%
add-sqr-sqrt17.8%
*-un-lft-identity17.8%
times-frac17.8%
hypot-def17.8%
fma-def17.8%
hypot-def23.5%
Applied egg-rr23.5%
Taylor expanded in y.re around 0 56.8%
associate-/l*57.3%
Simplified57.3%
unpow257.3%
*-un-lft-identity57.3%
times-frac68.4%
Applied egg-rr68.4%
/-rgt-identity68.4%
*-un-lft-identity68.4%
times-frac70.3%
Applied egg-rr70.3%
Final simplification91.8%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (+ (* x.re y.re) (* x.im y.im))))
(if (<= (/ t_0 (+ (* y.re y.re) (* y.im y.im))) 5e+234)
(* (/ 1.0 (hypot y.re y.im)) (/ t_0 (hypot y.re y.im)))
(+ (/ x.im y.im) (* (/ 1.0 y.im) (/ x.re (/ y.im y.re)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = (x_46_re * y_46_re) + (x_46_im * y_46_im);
double tmp;
if ((t_0 / ((y_46_re * y_46_re) + (y_46_im * y_46_im))) <= 5e+234) {
tmp = (1.0 / hypot(y_46_re, y_46_im)) * (t_0 / hypot(y_46_re, y_46_im));
} else {
tmp = (x_46_im / y_46_im) + ((1.0 / y_46_im) * (x_46_re / (y_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 = (x_46_re * y_46_re) + (x_46_im * y_46_im);
double tmp;
if ((t_0 / ((y_46_re * y_46_re) + (y_46_im * y_46_im))) <= 5e+234) {
tmp = (1.0 / Math.hypot(y_46_re, y_46_im)) * (t_0 / Math.hypot(y_46_re, y_46_im));
} else {
tmp = (x_46_im / y_46_im) + ((1.0 / y_46_im) * (x_46_re / (y_46_im / y_46_re)));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = (x_46_re * y_46_re) + (x_46_im * y_46_im) tmp = 0 if (t_0 / ((y_46_re * y_46_re) + (y_46_im * y_46_im))) <= 5e+234: tmp = (1.0 / math.hypot(y_46_re, y_46_im)) * (t_0 / math.hypot(y_46_re, y_46_im)) else: tmp = (x_46_im / y_46_im) + ((1.0 / y_46_im) * (x_46_re / (y_46_im / y_46_re))) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(Float64(x_46_re * y_46_re) + Float64(x_46_im * y_46_im)) tmp = 0.0 if (Float64(t_0 / Float64(Float64(y_46_re * y_46_re) + Float64(y_46_im * y_46_im))) <= 5e+234) tmp = Float64(Float64(1.0 / hypot(y_46_re, y_46_im)) * Float64(t_0 / hypot(y_46_re, y_46_im))); else tmp = Float64(Float64(x_46_im / y_46_im) + Float64(Float64(1.0 / y_46_im) * Float64(x_46_re / Float64(y_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 = (x_46_re * y_46_re) + (x_46_im * y_46_im); tmp = 0.0; if ((t_0 / ((y_46_re * y_46_re) + (y_46_im * y_46_im))) <= 5e+234) tmp = (1.0 / hypot(y_46_re, y_46_im)) * (t_0 / hypot(y_46_re, y_46_im)); else tmp = (x_46_im / y_46_im) + ((1.0 / y_46_im) * (x_46_re / (y_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[(x$46$re * y$46$re), $MachinePrecision] + N[(x$46$im * y$46$im), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(t$95$0 / N[(N[(y$46$re * y$46$re), $MachinePrecision] + N[(y$46$im * y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 5e+234], N[(N[(1.0 / N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision]), $MachinePrecision] * N[(t$95$0 / N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x$46$im / y$46$im), $MachinePrecision] + N[(N[(1.0 / y$46$im), $MachinePrecision] * N[(x$46$re / N[(y$46$im / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x.re \cdot y.re + x.im \cdot y.im\\
\mathbf{if}\;\frac{t_0}{y.re \cdot y.re + y.im \cdot y.im} \leq 5 \cdot 10^{+234}:\\
\;\;\;\;\frac{1}{\mathsf{hypot}\left(y.re, y.im\right)} \cdot \frac{t_0}{\mathsf{hypot}\left(y.re, y.im\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x.im}{y.im} + \frac{1}{y.im} \cdot \frac{x.re}{\frac{y.im}{y.re}}\\
\end{array}
\end{array}
if (/.f64 (+.f64 (*.f64 x.re y.re) (*.f64 x.im y.im)) (+.f64 (*.f64 y.re y.re) (*.f64 y.im y.im))) < 5.0000000000000003e234Initial program 79.5%
add-sqr-sqrt79.5%
*-un-lft-identity79.5%
times-frac79.5%
hypot-def79.5%
fma-def79.5%
hypot-def97.3%
Applied egg-rr97.3%
fma-def97.3%
Applied egg-rr97.3%
if 5.0000000000000003e234 < (/.f64 (+.f64 (*.f64 x.re y.re) (*.f64 x.im y.im)) (+.f64 (*.f64 y.re y.re) (*.f64 y.im y.im))) Initial program 17.8%
add-sqr-sqrt17.8%
*-un-lft-identity17.8%
times-frac17.8%
hypot-def17.8%
fma-def17.8%
hypot-def23.5%
Applied egg-rr23.5%
Taylor expanded in y.re around 0 56.8%
associate-/l*57.3%
Simplified57.3%
unpow257.3%
*-un-lft-identity57.3%
times-frac68.4%
Applied egg-rr68.4%
/-rgt-identity68.4%
*-un-lft-identity68.4%
times-frac70.3%
Applied egg-rr70.3%
Final simplification91.8%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0
(/ (+ (* x.re y.re) (* x.im y.im)) (+ (* y.re y.re) (* y.im y.im))))
(t_1 (/ x.re (/ y.im y.re))))
(if (<= y.im -7.6e+104)
(+ (/ x.im y.im) (* (/ 1.0 y.im) t_1))
(if (<= y.im -2.4e-133)
t_0
(if (<= y.im 3.95e-115)
(* (/ -1.0 y.re) (- (/ (* y.im (- x.im)) y.re) x.re))
(if (<= y.im 2.8e+95)
t_0
(* (/ 1.0 (hypot y.re y.im)) (+ x.im t_1))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = ((x_46_re * y_46_re) + (x_46_im * y_46_im)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im));
double t_1 = x_46_re / (y_46_im / y_46_re);
double tmp;
if (y_46_im <= -7.6e+104) {
tmp = (x_46_im / y_46_im) + ((1.0 / y_46_im) * t_1);
} else if (y_46_im <= -2.4e-133) {
tmp = t_0;
} else if (y_46_im <= 3.95e-115) {
tmp = (-1.0 / y_46_re) * (((y_46_im * -x_46_im) / y_46_re) - x_46_re);
} else if (y_46_im <= 2.8e+95) {
tmp = t_0;
} else {
tmp = (1.0 / hypot(y_46_re, y_46_im)) * (x_46_im + 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 = ((x_46_re * y_46_re) + (x_46_im * y_46_im)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im));
double t_1 = x_46_re / (y_46_im / y_46_re);
double tmp;
if (y_46_im <= -7.6e+104) {
tmp = (x_46_im / y_46_im) + ((1.0 / y_46_im) * t_1);
} else if (y_46_im <= -2.4e-133) {
tmp = t_0;
} else if (y_46_im <= 3.95e-115) {
tmp = (-1.0 / y_46_re) * (((y_46_im * -x_46_im) / y_46_re) - x_46_re);
} else if (y_46_im <= 2.8e+95) {
tmp = t_0;
} else {
tmp = (1.0 / Math.hypot(y_46_re, y_46_im)) * (x_46_im + t_1);
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = ((x_46_re * y_46_re) + (x_46_im * y_46_im)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im)) t_1 = x_46_re / (y_46_im / y_46_re) tmp = 0 if y_46_im <= -7.6e+104: tmp = (x_46_im / y_46_im) + ((1.0 / y_46_im) * t_1) elif y_46_im <= -2.4e-133: tmp = t_0 elif y_46_im <= 3.95e-115: tmp = (-1.0 / y_46_re) * (((y_46_im * -x_46_im) / y_46_re) - x_46_re) elif y_46_im <= 2.8e+95: tmp = t_0 else: tmp = (1.0 / math.hypot(y_46_re, y_46_im)) * (x_46_im + t_1) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(Float64(Float64(x_46_re * y_46_re) + Float64(x_46_im * y_46_im)) / Float64(Float64(y_46_re * y_46_re) + Float64(y_46_im * y_46_im))) t_1 = Float64(x_46_re / Float64(y_46_im / y_46_re)) tmp = 0.0 if (y_46_im <= -7.6e+104) tmp = Float64(Float64(x_46_im / y_46_im) + Float64(Float64(1.0 / y_46_im) * t_1)); elseif (y_46_im <= -2.4e-133) tmp = t_0; elseif (y_46_im <= 3.95e-115) tmp = Float64(Float64(-1.0 / y_46_re) * Float64(Float64(Float64(y_46_im * Float64(-x_46_im)) / y_46_re) - x_46_re)); elseif (y_46_im <= 2.8e+95) tmp = t_0; else tmp = Float64(Float64(1.0 / hypot(y_46_re, y_46_im)) * Float64(x_46_im + t_1)); 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 * y_46_re) + (x_46_im * y_46_im)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im)); t_1 = x_46_re / (y_46_im / y_46_re); tmp = 0.0; if (y_46_im <= -7.6e+104) tmp = (x_46_im / y_46_im) + ((1.0 / y_46_im) * t_1); elseif (y_46_im <= -2.4e-133) tmp = t_0; elseif (y_46_im <= 3.95e-115) tmp = (-1.0 / y_46_re) * (((y_46_im * -x_46_im) / y_46_re) - x_46_re); elseif (y_46_im <= 2.8e+95) tmp = t_0; else tmp = (1.0 / hypot(y_46_re, y_46_im)) * (x_46_im + 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[(N[(N[(x$46$re * y$46$re), $MachinePrecision] + N[(x$46$im * y$46$im), $MachinePrecision]), $MachinePrecision] / N[(N[(y$46$re * y$46$re), $MachinePrecision] + N[(y$46$im * y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x$46$re / N[(y$46$im / y$46$re), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -7.6e+104], N[(N[(x$46$im / y$46$im), $MachinePrecision] + N[(N[(1.0 / y$46$im), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, -2.4e-133], t$95$0, If[LessEqual[y$46$im, 3.95e-115], N[(N[(-1.0 / y$46$re), $MachinePrecision] * N[(N[(N[(y$46$im * (-x$46$im)), $MachinePrecision] / y$46$re), $MachinePrecision] - x$46$re), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 2.8e+95], t$95$0, N[(N[(1.0 / N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision]), $MachinePrecision] * N[(x$46$im + t$95$1), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x.re \cdot y.re + x.im \cdot y.im}{y.re \cdot y.re + y.im \cdot y.im}\\
t_1 := \frac{x.re}{\frac{y.im}{y.re}}\\
\mathbf{if}\;y.im \leq -7.6 \cdot 10^{+104}:\\
\;\;\;\;\frac{x.im}{y.im} + \frac{1}{y.im} \cdot t_1\\
\mathbf{elif}\;y.im \leq -2.4 \cdot 10^{-133}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y.im \leq 3.95 \cdot 10^{-115}:\\
\;\;\;\;\frac{-1}{y.re} \cdot \left(\frac{y.im \cdot \left(-x.im\right)}{y.re} - x.re\right)\\
\mathbf{elif}\;y.im \leq 2.8 \cdot 10^{+95}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\mathsf{hypot}\left(y.re, y.im\right)} \cdot \left(x.im + t_1\right)\\
\end{array}
\end{array}
if y.im < -7.59999999999999938e104Initial program 40.0%
add-sqr-sqrt40.0%
*-un-lft-identity40.0%
times-frac40.0%
hypot-def40.0%
fma-def40.0%
hypot-def62.5%
Applied egg-rr62.5%
Taylor expanded in y.re around 0 74.0%
associate-/l*74.2%
Simplified74.2%
unpow274.2%
*-un-lft-identity74.2%
times-frac83.1%
Applied egg-rr83.1%
/-rgt-identity83.1%
*-un-lft-identity83.1%
times-frac85.3%
Applied egg-rr85.3%
if -7.59999999999999938e104 < y.im < -2.4e-133 or 3.95000000000000002e-115 < y.im < 2.7999999999999998e95Initial program 91.1%
if -2.4e-133 < y.im < 3.95000000000000002e-115Initial program 75.8%
add-sqr-sqrt75.8%
*-un-lft-identity75.8%
times-frac75.8%
hypot-def75.8%
fma-def75.8%
hypot-def91.8%
Applied egg-rr91.8%
Taylor expanded in y.re around -inf 45.9%
neg-mul-145.9%
+-commutative45.9%
unsub-neg45.9%
mul-1-neg45.9%
distribute-neg-frac45.9%
distribute-rgt-neg-out45.9%
Simplified45.9%
Taylor expanded in y.re around -inf 94.5%
if 2.7999999999999998e95 < y.im Initial program 33.0%
add-sqr-sqrt33.0%
*-un-lft-identity33.0%
times-frac33.0%
hypot-def33.0%
fma-def33.0%
hypot-def61.5%
Applied egg-rr61.5%
Taylor expanded in y.re around 0 88.0%
associate-/l*94.0%
Simplified94.0%
Final simplification91.6%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (+ (* y.re y.re) (* y.im y.im))) (t_1 (/ x.re (/ y.im y.re))))
(if (<= y.im -2.35e+104)
(+ (/ x.im y.im) (* (/ 1.0 y.im) t_1))
(if (<= y.im -1.05e-129)
(/ (fma y.re x.re (* x.im y.im)) t_0)
(if (<= y.im 1.6e-114)
(* (/ -1.0 y.re) (- (/ (* y.im (- x.im)) y.re) x.re))
(if (<= y.im 3e+92)
(/ (+ (* x.re y.re) (* x.im y.im)) t_0)
(* (/ 1.0 (hypot y.re y.im)) (+ x.im t_1))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = (y_46_re * y_46_re) + (y_46_im * y_46_im);
double t_1 = x_46_re / (y_46_im / y_46_re);
double tmp;
if (y_46_im <= -2.35e+104) {
tmp = (x_46_im / y_46_im) + ((1.0 / y_46_im) * t_1);
} else if (y_46_im <= -1.05e-129) {
tmp = fma(y_46_re, x_46_re, (x_46_im * y_46_im)) / t_0;
} else if (y_46_im <= 1.6e-114) {
tmp = (-1.0 / y_46_re) * (((y_46_im * -x_46_im) / y_46_re) - x_46_re);
} else if (y_46_im <= 3e+92) {
tmp = ((x_46_re * y_46_re) + (x_46_im * y_46_im)) / t_0;
} else {
tmp = (1.0 / hypot(y_46_re, y_46_im)) * (x_46_im + t_1);
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(Float64(y_46_re * y_46_re) + Float64(y_46_im * y_46_im)) t_1 = Float64(x_46_re / Float64(y_46_im / y_46_re)) tmp = 0.0 if (y_46_im <= -2.35e+104) tmp = Float64(Float64(x_46_im / y_46_im) + Float64(Float64(1.0 / y_46_im) * t_1)); elseif (y_46_im <= -1.05e-129) tmp = Float64(fma(y_46_re, x_46_re, Float64(x_46_im * y_46_im)) / t_0); elseif (y_46_im <= 1.6e-114) tmp = Float64(Float64(-1.0 / y_46_re) * Float64(Float64(Float64(y_46_im * Float64(-x_46_im)) / y_46_re) - x_46_re)); elseif (y_46_im <= 3e+92) tmp = Float64(Float64(Float64(x_46_re * y_46_re) + Float64(x_46_im * y_46_im)) / t_0); else tmp = Float64(Float64(1.0 / hypot(y_46_re, y_46_im)) * Float64(x_46_im + t_1)); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[(y$46$re * y$46$re), $MachinePrecision] + N[(y$46$im * y$46$im), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x$46$re / N[(y$46$im / y$46$re), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -2.35e+104], N[(N[(x$46$im / y$46$im), $MachinePrecision] + N[(N[(1.0 / y$46$im), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, -1.05e-129], N[(N[(y$46$re * x$46$re + N[(x$46$im * y$46$im), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision], If[LessEqual[y$46$im, 1.6e-114], N[(N[(-1.0 / y$46$re), $MachinePrecision] * N[(N[(N[(y$46$im * (-x$46$im)), $MachinePrecision] / y$46$re), $MachinePrecision] - x$46$re), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 3e+92], N[(N[(N[(x$46$re * y$46$re), $MachinePrecision] + N[(x$46$im * y$46$im), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision], N[(N[(1.0 / N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision]), $MachinePrecision] * N[(x$46$im + t$95$1), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot y.re + y.im \cdot y.im\\
t_1 := \frac{x.re}{\frac{y.im}{y.re}}\\
\mathbf{if}\;y.im \leq -2.35 \cdot 10^{+104}:\\
\;\;\;\;\frac{x.im}{y.im} + \frac{1}{y.im} \cdot t_1\\
\mathbf{elif}\;y.im \leq -1.05 \cdot 10^{-129}:\\
\;\;\;\;\frac{\mathsf{fma}\left(y.re, x.re, x.im \cdot y.im\right)}{t_0}\\
\mathbf{elif}\;y.im \leq 1.6 \cdot 10^{-114}:\\
\;\;\;\;\frac{-1}{y.re} \cdot \left(\frac{y.im \cdot \left(-x.im\right)}{y.re} - x.re\right)\\
\mathbf{elif}\;y.im \leq 3 \cdot 10^{+92}:\\
\;\;\;\;\frac{x.re \cdot y.re + x.im \cdot y.im}{t_0}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\mathsf{hypot}\left(y.re, y.im\right)} \cdot \left(x.im + t_1\right)\\
\end{array}
\end{array}
if y.im < -2.35000000000000008e104Initial program 40.0%
add-sqr-sqrt40.0%
*-un-lft-identity40.0%
times-frac40.0%
hypot-def40.0%
fma-def40.0%
hypot-def62.5%
Applied egg-rr62.5%
Taylor expanded in y.re around 0 74.0%
associate-/l*74.2%
Simplified74.2%
unpow274.2%
*-un-lft-identity74.2%
times-frac83.1%
Applied egg-rr83.1%
/-rgt-identity83.1%
*-un-lft-identity83.1%
times-frac85.3%
Applied egg-rr85.3%
if -2.35000000000000008e104 < y.im < -1.05e-129Initial program 87.1%
*-commutative87.1%
fma-def87.2%
Applied egg-rr87.2%
if -1.05e-129 < y.im < 1.6000000000000001e-114Initial program 75.8%
add-sqr-sqrt75.8%
*-un-lft-identity75.8%
times-frac75.8%
hypot-def75.8%
fma-def75.8%
hypot-def91.8%
Applied egg-rr91.8%
Taylor expanded in y.re around -inf 45.9%
neg-mul-145.9%
+-commutative45.9%
unsub-neg45.9%
mul-1-neg45.9%
distribute-neg-frac45.9%
distribute-rgt-neg-out45.9%
Simplified45.9%
Taylor expanded in y.re around -inf 94.5%
if 1.6000000000000001e-114 < y.im < 3.00000000000000013e92Initial program 97.0%
if 3.00000000000000013e92 < y.im Initial program 33.0%
add-sqr-sqrt33.0%
*-un-lft-identity33.0%
times-frac33.0%
hypot-def33.0%
fma-def33.0%
hypot-def61.5%
Applied egg-rr61.5%
Taylor expanded in y.re around 0 88.0%
associate-/l*94.0%
Simplified94.0%
Final simplification91.6%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0
(/ (+ (* x.re y.re) (* x.im y.im)) (+ (* y.re y.re) (* y.im y.im))))
(t_1 (+ (/ x.im y.im) (* (/ 1.0 y.im) (/ x.re (/ y.im y.re))))))
(if (<= y.im -1.6e+106)
t_1
(if (<= y.im -3.2e-135)
t_0
(if (<= y.im 6.4e-115)
(* (/ -1.0 y.re) (- (/ (* y.im (- x.im)) y.re) x.re))
(if (<= y.im 7.2e+91) 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 = ((x_46_re * y_46_re) + (x_46_im * y_46_im)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im));
double t_1 = (x_46_im / y_46_im) + ((1.0 / y_46_im) * (x_46_re / (y_46_im / y_46_re)));
double tmp;
if (y_46_im <= -1.6e+106) {
tmp = t_1;
} else if (y_46_im <= -3.2e-135) {
tmp = t_0;
} else if (y_46_im <= 6.4e-115) {
tmp = (-1.0 / y_46_re) * (((y_46_im * -x_46_im) / y_46_re) - x_46_re);
} else if (y_46_im <= 7.2e+91) {
tmp = t_0;
} else {
tmp = t_1;
}
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 = ((x_46re * y_46re) + (x_46im * y_46im)) / ((y_46re * y_46re) + (y_46im * y_46im))
t_1 = (x_46im / y_46im) + ((1.0d0 / y_46im) * (x_46re / (y_46im / y_46re)))
if (y_46im <= (-1.6d+106)) then
tmp = t_1
else if (y_46im <= (-3.2d-135)) then
tmp = t_0
else if (y_46im <= 6.4d-115) then
tmp = ((-1.0d0) / y_46re) * (((y_46im * -x_46im) / y_46re) - x_46re)
else if (y_46im <= 7.2d+91) then
tmp = t_0
else
tmp = t_1
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 = ((x_46_re * y_46_re) + (x_46_im * y_46_im)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im));
double t_1 = (x_46_im / y_46_im) + ((1.0 / y_46_im) * (x_46_re / (y_46_im / y_46_re)));
double tmp;
if (y_46_im <= -1.6e+106) {
tmp = t_1;
} else if (y_46_im <= -3.2e-135) {
tmp = t_0;
} else if (y_46_im <= 6.4e-115) {
tmp = (-1.0 / y_46_re) * (((y_46_im * -x_46_im) / y_46_re) - x_46_re);
} else if (y_46_im <= 7.2e+91) {
tmp = t_0;
} else {
tmp = t_1;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = ((x_46_re * y_46_re) + (x_46_im * y_46_im)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im)) t_1 = (x_46_im / y_46_im) + ((1.0 / y_46_im) * (x_46_re / (y_46_im / y_46_re))) tmp = 0 if y_46_im <= -1.6e+106: tmp = t_1 elif y_46_im <= -3.2e-135: tmp = t_0 elif y_46_im <= 6.4e-115: tmp = (-1.0 / y_46_re) * (((y_46_im * -x_46_im) / y_46_re) - x_46_re) elif y_46_im <= 7.2e+91: tmp = t_0 else: tmp = t_1 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(Float64(Float64(x_46_re * y_46_re) + Float64(x_46_im * y_46_im)) / Float64(Float64(y_46_re * y_46_re) + Float64(y_46_im * y_46_im))) t_1 = Float64(Float64(x_46_im / y_46_im) + Float64(Float64(1.0 / y_46_im) * Float64(x_46_re / Float64(y_46_im / y_46_re)))) tmp = 0.0 if (y_46_im <= -1.6e+106) tmp = t_1; elseif (y_46_im <= -3.2e-135) tmp = t_0; elseif (y_46_im <= 6.4e-115) tmp = Float64(Float64(-1.0 / y_46_re) * Float64(Float64(Float64(y_46_im * Float64(-x_46_im)) / y_46_re) - x_46_re)); elseif (y_46_im <= 7.2e+91) tmp = t_0; else tmp = t_1; end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = ((x_46_re * y_46_re) + (x_46_im * y_46_im)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im)); t_1 = (x_46_im / y_46_im) + ((1.0 / y_46_im) * (x_46_re / (y_46_im / y_46_re))); tmp = 0.0; if (y_46_im <= -1.6e+106) tmp = t_1; elseif (y_46_im <= -3.2e-135) tmp = t_0; elseif (y_46_im <= 6.4e-115) tmp = (-1.0 / y_46_re) * (((y_46_im * -x_46_im) / y_46_re) - x_46_re); elseif (y_46_im <= 7.2e+91) tmp = t_0; else tmp = t_1; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[(N[(x$46$re * y$46$re), $MachinePrecision] + N[(x$46$im * y$46$im), $MachinePrecision]), $MachinePrecision] / N[(N[(y$46$re * y$46$re), $MachinePrecision] + N[(y$46$im * y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x$46$im / y$46$im), $MachinePrecision] + N[(N[(1.0 / y$46$im), $MachinePrecision] * N[(x$46$re / N[(y$46$im / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -1.6e+106], t$95$1, If[LessEqual[y$46$im, -3.2e-135], t$95$0, If[LessEqual[y$46$im, 6.4e-115], N[(N[(-1.0 / y$46$re), $MachinePrecision] * N[(N[(N[(y$46$im * (-x$46$im)), $MachinePrecision] / y$46$re), $MachinePrecision] - x$46$re), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 7.2e+91], t$95$0, t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x.re \cdot y.re + x.im \cdot y.im}{y.re \cdot y.re + y.im \cdot y.im}\\
t_1 := \frac{x.im}{y.im} + \frac{1}{y.im} \cdot \frac{x.re}{\frac{y.im}{y.re}}\\
\mathbf{if}\;y.im \leq -1.6 \cdot 10^{+106}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y.im \leq -3.2 \cdot 10^{-135}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y.im \leq 6.4 \cdot 10^{-115}:\\
\;\;\;\;\frac{-1}{y.re} \cdot \left(\frac{y.im \cdot \left(-x.im\right)}{y.re} - x.re\right)\\
\mathbf{elif}\;y.im \leq 7.2 \cdot 10^{+91}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y.im < -1.5999999999999999e106 or 7.2e91 < y.im Initial program 36.3%
add-sqr-sqrt36.3%
*-un-lft-identity36.3%
times-frac36.3%
hypot-def36.3%
fma-def36.3%
hypot-def62.0%
Applied egg-rr62.0%
Taylor expanded in y.re around 0 77.5%
associate-/l*77.7%
Simplified77.7%
unpow277.7%
*-un-lft-identity77.7%
times-frac84.8%
Applied egg-rr84.8%
/-rgt-identity84.8%
*-un-lft-identity84.8%
times-frac89.8%
Applied egg-rr89.8%
if -1.5999999999999999e106 < y.im < -3.2e-135 or 6.4e-115 < y.im < 7.2e91Initial program 91.1%
if -3.2e-135 < y.im < 6.4e-115Initial program 75.8%
add-sqr-sqrt75.8%
*-un-lft-identity75.8%
times-frac75.8%
hypot-def75.8%
fma-def75.8%
hypot-def91.8%
Applied egg-rr91.8%
Taylor expanded in y.re around -inf 45.9%
neg-mul-145.9%
+-commutative45.9%
unsub-neg45.9%
mul-1-neg45.9%
distribute-neg-frac45.9%
distribute-rgt-neg-out45.9%
Simplified45.9%
Taylor expanded in y.re around -inf 94.5%
Final simplification91.6%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (+ (/ x.im y.im) (* (/ y.re y.im) (/ x.re y.im)))))
(if (<= y.im -2.6e+92)
t_0
(if (<= y.im -1.05e+32)
(/ (* x.im y.im) (+ (* y.re y.re) (* y.im y.im)))
(if (<= y.im -6.8e-77)
(+ (/ x.im y.im) (* x.re (/ (/ y.re y.im) y.im)))
(if (<= y.im 5.5e-54)
(* (/ -1.0 y.re) (- (/ (* y.im (- x.im)) y.re) 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 = (x_46_im / y_46_im) + ((y_46_re / y_46_im) * (x_46_re / y_46_im));
double tmp;
if (y_46_im <= -2.6e+92) {
tmp = t_0;
} else if (y_46_im <= -1.05e+32) {
tmp = (x_46_im * y_46_im) / ((y_46_re * y_46_re) + (y_46_im * y_46_im));
} else if (y_46_im <= -6.8e-77) {
tmp = (x_46_im / y_46_im) + (x_46_re * ((y_46_re / y_46_im) / y_46_im));
} else if (y_46_im <= 5.5e-54) {
tmp = (-1.0 / y_46_re) * (((y_46_im * -x_46_im) / y_46_re) - x_46_re);
} 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_46im / y_46im) + ((y_46re / y_46im) * (x_46re / y_46im))
if (y_46im <= (-2.6d+92)) then
tmp = t_0
else if (y_46im <= (-1.05d+32)) then
tmp = (x_46im * y_46im) / ((y_46re * y_46re) + (y_46im * y_46im))
else if (y_46im <= (-6.8d-77)) then
tmp = (x_46im / y_46im) + (x_46re * ((y_46re / y_46im) / y_46im))
else if (y_46im <= 5.5d-54) then
tmp = ((-1.0d0) / y_46re) * (((y_46im * -x_46im) / y_46re) - x_46re)
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 = (x_46_im / y_46_im) + ((y_46_re / y_46_im) * (x_46_re / y_46_im));
double tmp;
if (y_46_im <= -2.6e+92) {
tmp = t_0;
} else if (y_46_im <= -1.05e+32) {
tmp = (x_46_im * y_46_im) / ((y_46_re * y_46_re) + (y_46_im * y_46_im));
} else if (y_46_im <= -6.8e-77) {
tmp = (x_46_im / y_46_im) + (x_46_re * ((y_46_re / y_46_im) / y_46_im));
} else if (y_46_im <= 5.5e-54) {
tmp = (-1.0 / y_46_re) * (((y_46_im * -x_46_im) / y_46_re) - 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 = (x_46_im / y_46_im) + ((y_46_re / y_46_im) * (x_46_re / y_46_im)) tmp = 0 if y_46_im <= -2.6e+92: tmp = t_0 elif y_46_im <= -1.05e+32: tmp = (x_46_im * y_46_im) / ((y_46_re * y_46_re) + (y_46_im * y_46_im)) elif y_46_im <= -6.8e-77: tmp = (x_46_im / y_46_im) + (x_46_re * ((y_46_re / y_46_im) / y_46_im)) elif y_46_im <= 5.5e-54: tmp = (-1.0 / y_46_re) * (((y_46_im * -x_46_im) / y_46_re) - 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 = Float64(Float64(x_46_im / y_46_im) + Float64(Float64(y_46_re / y_46_im) * Float64(x_46_re / y_46_im))) tmp = 0.0 if (y_46_im <= -2.6e+92) tmp = t_0; elseif (y_46_im <= -1.05e+32) tmp = Float64(Float64(x_46_im * y_46_im) / Float64(Float64(y_46_re * y_46_re) + Float64(y_46_im * y_46_im))); elseif (y_46_im <= -6.8e-77) tmp = Float64(Float64(x_46_im / y_46_im) + Float64(x_46_re * Float64(Float64(y_46_re / y_46_im) / y_46_im))); elseif (y_46_im <= 5.5e-54) tmp = Float64(Float64(-1.0 / y_46_re) * Float64(Float64(Float64(y_46_im * Float64(-x_46_im)) / y_46_re) - 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 = (x_46_im / y_46_im) + ((y_46_re / y_46_im) * (x_46_re / y_46_im)); tmp = 0.0; if (y_46_im <= -2.6e+92) tmp = t_0; elseif (y_46_im <= -1.05e+32) tmp = (x_46_im * y_46_im) / ((y_46_re * y_46_re) + (y_46_im * y_46_im)); elseif (y_46_im <= -6.8e-77) tmp = (x_46_im / y_46_im) + (x_46_re * ((y_46_re / y_46_im) / y_46_im)); elseif (y_46_im <= 5.5e-54) tmp = (-1.0 / y_46_re) * (((y_46_im * -x_46_im) / y_46_re) - 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[(N[(x$46$im / y$46$im), $MachinePrecision] + N[(N[(y$46$re / y$46$im), $MachinePrecision] * N[(x$46$re / y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -2.6e+92], t$95$0, If[LessEqual[y$46$im, -1.05e+32], N[(N[(x$46$im * y$46$im), $MachinePrecision] / N[(N[(y$46$re * y$46$re), $MachinePrecision] + N[(y$46$im * y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, -6.8e-77], N[(N[(x$46$im / y$46$im), $MachinePrecision] + N[(x$46$re * N[(N[(y$46$re / y$46$im), $MachinePrecision] / y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 5.5e-54], N[(N[(-1.0 / y$46$re), $MachinePrecision] * N[(N[(N[(y$46$im * (-x$46$im)), $MachinePrecision] / y$46$re), $MachinePrecision] - x$46$re), $MachinePrecision]), $MachinePrecision], t$95$0]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x.im}{y.im} + \frac{y.re}{y.im} \cdot \frac{x.re}{y.im}\\
\mathbf{if}\;y.im \leq -2.6 \cdot 10^{+92}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y.im \leq -1.05 \cdot 10^{+32}:\\
\;\;\;\;\frac{x.im \cdot y.im}{y.re \cdot y.re + y.im \cdot y.im}\\
\mathbf{elif}\;y.im \leq -6.8 \cdot 10^{-77}:\\
\;\;\;\;\frac{x.im}{y.im} + x.re \cdot \frac{\frac{y.re}{y.im}}{y.im}\\
\mathbf{elif}\;y.im \leq 5.5 \cdot 10^{-54}:\\
\;\;\;\;\frac{-1}{y.re} \cdot \left(\frac{y.im \cdot \left(-x.im\right)}{y.re} - x.re\right)\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if y.im < -2.5999999999999999e92 or 5.50000000000000046e-54 < y.im Initial program 49.4%
add-sqr-sqrt49.4%
*-un-lft-identity49.4%
times-frac49.4%
hypot-def49.4%
fma-def49.4%
hypot-def70.2%
Applied egg-rr70.2%
Taylor expanded in y.re around 0 74.4%
associate-/l*73.0%
Simplified73.0%
unpow273.0%
*-un-lft-identity73.0%
times-frac78.4%
Applied egg-rr78.4%
/-rgt-identity78.4%
*-un-lft-identity78.4%
*-commutative78.4%
times-frac84.0%
clear-num83.9%
Applied egg-rr83.9%
if -2.5999999999999999e92 < y.im < -1.05e32Initial program 87.1%
Taylor expanded in x.re around 0 87.1%
if -1.05e32 < y.im < -6.79999999999999966e-77Initial program 84.5%
add-sqr-sqrt84.5%
*-un-lft-identity84.5%
times-frac84.4%
hypot-def84.4%
fma-def84.4%
hypot-def84.8%
Applied egg-rr84.8%
Taylor expanded in y.re around 0 65.3%
associate-/l*65.2%
Simplified65.2%
unpow265.2%
*-un-lft-identity65.2%
times-frac65.2%
Applied egg-rr65.2%
clear-num65.2%
associate-/r/65.2%
/-rgt-identity65.2%
*-commutative65.2%
associate-/r*65.2%
clear-num65.3%
Applied egg-rr65.3%
if -6.79999999999999966e-77 < y.im < 5.50000000000000046e-54Initial program 80.5%
add-sqr-sqrt80.5%
*-un-lft-identity80.5%
times-frac80.5%
hypot-def80.5%
fma-def80.5%
hypot-def93.7%
Applied egg-rr93.7%
Taylor expanded in y.re around -inf 42.6%
neg-mul-142.6%
+-commutative42.6%
unsub-neg42.6%
mul-1-neg42.6%
distribute-neg-frac42.6%
distribute-rgt-neg-out42.6%
Simplified42.6%
Taylor expanded in y.re around -inf 90.0%
Final simplification84.5%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (<= y.im -2.8e+92)
(+ (/ x.im y.im) (* (/ 1.0 y.im) (/ x.re (/ y.im y.re))))
(if (<= y.im -4.4e+32)
(/ (* x.im y.im) (+ (* y.re y.re) (* y.im y.im)))
(if (<= y.im -2.55e-76)
(+ (/ x.im y.im) (* x.re (/ (/ y.re y.im) y.im)))
(if (<= y.im 7.6e-53)
(* (/ -1.0 y.re) (- (/ (* y.im (- x.im)) y.re) x.re))
(+ (/ x.im y.im) (* (/ y.re y.im) (/ x.re y.im))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_im <= -2.8e+92) {
tmp = (x_46_im / y_46_im) + ((1.0 / y_46_im) * (x_46_re / (y_46_im / y_46_re)));
} else if (y_46_im <= -4.4e+32) {
tmp = (x_46_im * y_46_im) / ((y_46_re * y_46_re) + (y_46_im * y_46_im));
} else if (y_46_im <= -2.55e-76) {
tmp = (x_46_im / y_46_im) + (x_46_re * ((y_46_re / y_46_im) / y_46_im));
} else if (y_46_im <= 7.6e-53) {
tmp = (-1.0 / y_46_re) * (((y_46_im * -x_46_im) / y_46_re) - x_46_re);
} else {
tmp = (x_46_im / y_46_im) + ((y_46_re / y_46_im) * (x_46_re / y_46_im));
}
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_46im <= (-2.8d+92)) then
tmp = (x_46im / y_46im) + ((1.0d0 / y_46im) * (x_46re / (y_46im / y_46re)))
else if (y_46im <= (-4.4d+32)) then
tmp = (x_46im * y_46im) / ((y_46re * y_46re) + (y_46im * y_46im))
else if (y_46im <= (-2.55d-76)) then
tmp = (x_46im / y_46im) + (x_46re * ((y_46re / y_46im) / y_46im))
else if (y_46im <= 7.6d-53) then
tmp = ((-1.0d0) / y_46re) * (((y_46im * -x_46im) / y_46re) - x_46re)
else
tmp = (x_46im / y_46im) + ((y_46re / y_46im) * (x_46re / y_46im))
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_im <= -2.8e+92) {
tmp = (x_46_im / y_46_im) + ((1.0 / y_46_im) * (x_46_re / (y_46_im / y_46_re)));
} else if (y_46_im <= -4.4e+32) {
tmp = (x_46_im * y_46_im) / ((y_46_re * y_46_re) + (y_46_im * y_46_im));
} else if (y_46_im <= -2.55e-76) {
tmp = (x_46_im / y_46_im) + (x_46_re * ((y_46_re / y_46_im) / y_46_im));
} else if (y_46_im <= 7.6e-53) {
tmp = (-1.0 / y_46_re) * (((y_46_im * -x_46_im) / y_46_re) - x_46_re);
} else {
tmp = (x_46_im / y_46_im) + ((y_46_re / y_46_im) * (x_46_re / y_46_im));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if y_46_im <= -2.8e+92: tmp = (x_46_im / y_46_im) + ((1.0 / y_46_im) * (x_46_re / (y_46_im / y_46_re))) elif y_46_im <= -4.4e+32: tmp = (x_46_im * y_46_im) / ((y_46_re * y_46_re) + (y_46_im * y_46_im)) elif y_46_im <= -2.55e-76: tmp = (x_46_im / y_46_im) + (x_46_re * ((y_46_re / y_46_im) / y_46_im)) elif y_46_im <= 7.6e-53: tmp = (-1.0 / y_46_re) * (((y_46_im * -x_46_im) / y_46_re) - x_46_re) else: tmp = (x_46_im / y_46_im) + ((y_46_re / y_46_im) * (x_46_re / y_46_im)) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if (y_46_im <= -2.8e+92) tmp = Float64(Float64(x_46_im / y_46_im) + Float64(Float64(1.0 / y_46_im) * Float64(x_46_re / Float64(y_46_im / y_46_re)))); elseif (y_46_im <= -4.4e+32) tmp = Float64(Float64(x_46_im * y_46_im) / Float64(Float64(y_46_re * y_46_re) + Float64(y_46_im * y_46_im))); elseif (y_46_im <= -2.55e-76) tmp = Float64(Float64(x_46_im / y_46_im) + Float64(x_46_re * Float64(Float64(y_46_re / y_46_im) / y_46_im))); elseif (y_46_im <= 7.6e-53) tmp = Float64(Float64(-1.0 / y_46_re) * Float64(Float64(Float64(y_46_im * Float64(-x_46_im)) / y_46_re) - x_46_re)); else tmp = Float64(Float64(x_46_im / y_46_im) + Float64(Float64(y_46_re / y_46_im) * Float64(x_46_re / y_46_im))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if (y_46_im <= -2.8e+92) tmp = (x_46_im / y_46_im) + ((1.0 / y_46_im) * (x_46_re / (y_46_im / y_46_re))); elseif (y_46_im <= -4.4e+32) tmp = (x_46_im * y_46_im) / ((y_46_re * y_46_re) + (y_46_im * y_46_im)); elseif (y_46_im <= -2.55e-76) tmp = (x_46_im / y_46_im) + (x_46_re * ((y_46_re / y_46_im) / y_46_im)); elseif (y_46_im <= 7.6e-53) tmp = (-1.0 / y_46_re) * (((y_46_im * -x_46_im) / y_46_re) - x_46_re); else tmp = (x_46_im / y_46_im) + ((y_46_re / y_46_im) * (x_46_re / y_46_im)); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[y$46$im, -2.8e+92], N[(N[(x$46$im / y$46$im), $MachinePrecision] + N[(N[(1.0 / y$46$im), $MachinePrecision] * N[(x$46$re / N[(y$46$im / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, -4.4e+32], N[(N[(x$46$im * y$46$im), $MachinePrecision] / N[(N[(y$46$re * y$46$re), $MachinePrecision] + N[(y$46$im * y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, -2.55e-76], N[(N[(x$46$im / y$46$im), $MachinePrecision] + N[(x$46$re * N[(N[(y$46$re / y$46$im), $MachinePrecision] / y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 7.6e-53], N[(N[(-1.0 / y$46$re), $MachinePrecision] * N[(N[(N[(y$46$im * (-x$46$im)), $MachinePrecision] / y$46$re), $MachinePrecision] - x$46$re), $MachinePrecision]), $MachinePrecision], N[(N[(x$46$im / y$46$im), $MachinePrecision] + N[(N[(y$46$re / y$46$im), $MachinePrecision] * N[(x$46$re / y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.im \leq -2.8 \cdot 10^{+92}:\\
\;\;\;\;\frac{x.im}{y.im} + \frac{1}{y.im} \cdot \frac{x.re}{\frac{y.im}{y.re}}\\
\mathbf{elif}\;y.im \leq -4.4 \cdot 10^{+32}:\\
\;\;\;\;\frac{x.im \cdot y.im}{y.re \cdot y.re + y.im \cdot y.im}\\
\mathbf{elif}\;y.im \leq -2.55 \cdot 10^{-76}:\\
\;\;\;\;\frac{x.im}{y.im} + x.re \cdot \frac{\frac{y.re}{y.im}}{y.im}\\
\mathbf{elif}\;y.im \leq 7.6 \cdot 10^{-53}:\\
\;\;\;\;\frac{-1}{y.re} \cdot \left(\frac{y.im \cdot \left(-x.im\right)}{y.re} - x.re\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x.im}{y.im} + \frac{y.re}{y.im} \cdot \frac{x.re}{y.im}\\
\end{array}
\end{array}
if y.im < -2.80000000000000001e92Initial program 46.0%
add-sqr-sqrt46.0%
*-un-lft-identity46.0%
times-frac46.0%
hypot-def46.0%
fma-def46.0%
hypot-def66.3%
Applied egg-rr66.3%
Taylor expanded in y.re around 0 76.6%
associate-/l*73.0%
Simplified73.0%
unpow273.0%
*-un-lft-identity73.0%
times-frac81.0%
Applied egg-rr81.0%
/-rgt-identity81.0%
*-un-lft-identity81.0%
times-frac86.7%
Applied egg-rr86.7%
if -2.80000000000000001e92 < y.im < -4.40000000000000002e32Initial program 87.1%
Taylor expanded in x.re around 0 87.1%
if -4.40000000000000002e32 < y.im < -2.54999999999999993e-76Initial program 84.5%
add-sqr-sqrt84.5%
*-un-lft-identity84.5%
times-frac84.4%
hypot-def84.4%
fma-def84.4%
hypot-def84.8%
Applied egg-rr84.8%
Taylor expanded in y.re around 0 65.3%
associate-/l*65.2%
Simplified65.2%
unpow265.2%
*-un-lft-identity65.2%
times-frac65.2%
Applied egg-rr65.2%
clear-num65.2%
associate-/r/65.2%
/-rgt-identity65.2%
*-commutative65.2%
associate-/r*65.2%
clear-num65.3%
Applied egg-rr65.3%
if -2.54999999999999993e-76 < y.im < 7.5999999999999995e-53Initial program 80.5%
add-sqr-sqrt80.5%
*-un-lft-identity80.5%
times-frac80.5%
hypot-def80.5%
fma-def80.5%
hypot-def93.7%
Applied egg-rr93.7%
Taylor expanded in y.re around -inf 42.6%
neg-mul-142.6%
+-commutative42.6%
unsub-neg42.6%
mul-1-neg42.6%
distribute-neg-frac42.6%
distribute-rgt-neg-out42.6%
Simplified42.6%
Taylor expanded in y.re around -inf 90.0%
if 7.5999999999999995e-53 < y.im Initial program 51.9%
add-sqr-sqrt51.9%
*-un-lft-identity51.9%
times-frac51.8%
hypot-def51.8%
fma-def51.8%
hypot-def73.0%
Applied egg-rr73.0%
Taylor expanded in y.re around 0 72.8%
associate-/l*72.9%
Simplified72.9%
unpow272.9%
*-un-lft-identity72.9%
times-frac76.6%
Applied egg-rr76.6%
/-rgt-identity76.6%
*-un-lft-identity76.6%
*-commutative76.6%
times-frac82.0%
clear-num82.0%
Applied egg-rr82.0%
Final simplification84.5%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (+ (/ x.im y.im) (* (/ y.re y.im) (/ x.re y.im)))))
(if (<= y.im -2.6e+92)
t_0
(if (<= y.im -3.2e+32)
(/ (* x.im y.im) (+ (* y.re y.re) (* y.im y.im)))
(if (<= y.im -9e-86)
(+ (/ x.im y.im) (* x.re (/ (/ y.re y.im) y.im)))
(if (<= y.im 4.3e-75) (/ 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 = (x_46_im / y_46_im) + ((y_46_re / y_46_im) * (x_46_re / y_46_im));
double tmp;
if (y_46_im <= -2.6e+92) {
tmp = t_0;
} else if (y_46_im <= -3.2e+32) {
tmp = (x_46_im * y_46_im) / ((y_46_re * y_46_re) + (y_46_im * y_46_im));
} else if (y_46_im <= -9e-86) {
tmp = (x_46_im / y_46_im) + (x_46_re * ((y_46_re / y_46_im) / y_46_im));
} else if (y_46_im <= 4.3e-75) {
tmp = x_46_re / y_46_re;
} 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_46im / y_46im) + ((y_46re / y_46im) * (x_46re / y_46im))
if (y_46im <= (-2.6d+92)) then
tmp = t_0
else if (y_46im <= (-3.2d+32)) then
tmp = (x_46im * y_46im) / ((y_46re * y_46re) + (y_46im * y_46im))
else if (y_46im <= (-9d-86)) then
tmp = (x_46im / y_46im) + (x_46re * ((y_46re / y_46im) / y_46im))
else if (y_46im <= 4.3d-75) then
tmp = x_46re / y_46re
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 = (x_46_im / y_46_im) + ((y_46_re / y_46_im) * (x_46_re / y_46_im));
double tmp;
if (y_46_im <= -2.6e+92) {
tmp = t_0;
} else if (y_46_im <= -3.2e+32) {
tmp = (x_46_im * y_46_im) / ((y_46_re * y_46_re) + (y_46_im * y_46_im));
} else if (y_46_im <= -9e-86) {
tmp = (x_46_im / y_46_im) + (x_46_re * ((y_46_re / y_46_im) / y_46_im));
} else if (y_46_im <= 4.3e-75) {
tmp = 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 = (x_46_im / y_46_im) + ((y_46_re / y_46_im) * (x_46_re / y_46_im)) tmp = 0 if y_46_im <= -2.6e+92: tmp = t_0 elif y_46_im <= -3.2e+32: tmp = (x_46_im * y_46_im) / ((y_46_re * y_46_re) + (y_46_im * y_46_im)) elif y_46_im <= -9e-86: tmp = (x_46_im / y_46_im) + (x_46_re * ((y_46_re / y_46_im) / y_46_im)) elif y_46_im <= 4.3e-75: tmp = 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 = Float64(Float64(x_46_im / y_46_im) + Float64(Float64(y_46_re / y_46_im) * Float64(x_46_re / y_46_im))) tmp = 0.0 if (y_46_im <= -2.6e+92) tmp = t_0; elseif (y_46_im <= -3.2e+32) tmp = Float64(Float64(x_46_im * y_46_im) / Float64(Float64(y_46_re * y_46_re) + Float64(y_46_im * y_46_im))); elseif (y_46_im <= -9e-86) tmp = Float64(Float64(x_46_im / y_46_im) + Float64(x_46_re * Float64(Float64(y_46_re / y_46_im) / y_46_im))); elseif (y_46_im <= 4.3e-75) tmp = Float64(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 = (x_46_im / y_46_im) + ((y_46_re / y_46_im) * (x_46_re / y_46_im)); tmp = 0.0; if (y_46_im <= -2.6e+92) tmp = t_0; elseif (y_46_im <= -3.2e+32) tmp = (x_46_im * y_46_im) / ((y_46_re * y_46_re) + (y_46_im * y_46_im)); elseif (y_46_im <= -9e-86) tmp = (x_46_im / y_46_im) + (x_46_re * ((y_46_re / y_46_im) / y_46_im)); elseif (y_46_im <= 4.3e-75) tmp = 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[(N[(x$46$im / y$46$im), $MachinePrecision] + N[(N[(y$46$re / y$46$im), $MachinePrecision] * N[(x$46$re / y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -2.6e+92], t$95$0, If[LessEqual[y$46$im, -3.2e+32], N[(N[(x$46$im * y$46$im), $MachinePrecision] / N[(N[(y$46$re * y$46$re), $MachinePrecision] + N[(y$46$im * y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, -9e-86], N[(N[(x$46$im / y$46$im), $MachinePrecision] + N[(x$46$re * N[(N[(y$46$re / y$46$im), $MachinePrecision] / y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 4.3e-75], N[(x$46$re / y$46$re), $MachinePrecision], t$95$0]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x.im}{y.im} + \frac{y.re}{y.im} \cdot \frac{x.re}{y.im}\\
\mathbf{if}\;y.im \leq -2.6 \cdot 10^{+92}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y.im \leq -3.2 \cdot 10^{+32}:\\
\;\;\;\;\frac{x.im \cdot y.im}{y.re \cdot y.re + y.im \cdot y.im}\\
\mathbf{elif}\;y.im \leq -9 \cdot 10^{-86}:\\
\;\;\;\;\frac{x.im}{y.im} + x.re \cdot \frac{\frac{y.re}{y.im}}{y.im}\\
\mathbf{elif}\;y.im \leq 4.3 \cdot 10^{-75}:\\
\;\;\;\;\frac{x.re}{y.re}\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if y.im < -2.5999999999999999e92 or 4.2999999999999999e-75 < y.im Initial program 51.1%
add-sqr-sqrt51.1%
*-un-lft-identity51.1%
times-frac51.0%
hypot-def51.0%
fma-def51.0%
hypot-def71.1%
Applied egg-rr71.1%
Taylor expanded in y.re around 0 73.6%
associate-/l*72.2%
Simplified72.2%
unpow272.2%
*-un-lft-identity72.2%
times-frac77.5%
Applied egg-rr77.5%
/-rgt-identity77.5%
*-un-lft-identity77.5%
*-commutative77.5%
times-frac82.9%
clear-num82.9%
Applied egg-rr82.9%
if -2.5999999999999999e92 < y.im < -3.1999999999999999e32Initial program 87.1%
Taylor expanded in x.re around 0 87.1%
if -3.1999999999999999e32 < y.im < -8.9999999999999995e-86Initial program 82.9%
add-sqr-sqrt82.9%
*-un-lft-identity82.9%
times-frac82.9%
hypot-def82.9%
fma-def82.9%
hypot-def86.4%
Applied egg-rr86.4%
Taylor expanded in y.re around 0 65.5%
associate-/l*65.4%
Simplified65.4%
unpow265.4%
*-un-lft-identity65.4%
times-frac65.4%
Applied egg-rr65.4%
clear-num65.4%
associate-/r/65.4%
/-rgt-identity65.4%
*-commutative65.4%
associate-/r*65.4%
clear-num65.5%
Applied egg-rr65.5%
if -8.9999999999999995e-86 < y.im < 4.2999999999999999e-75Initial program 80.0%
Taylor expanded in y.re around inf 81.8%
Final simplification80.8%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (or (<= y.im -5.6e-85) (not (<= y.im 1.5e-75))) (+ (/ x.im y.im) (* (/ y.re y.im) (/ x.re y.im))) (/ x.re y.re)))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_im <= -5.6e-85) || !(y_46_im <= 1.5e-75)) {
tmp = (x_46_im / y_46_im) + ((y_46_re / y_46_im) * (x_46_re / y_46_im));
} else {
tmp = 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_46im <= (-5.6d-85)) .or. (.not. (y_46im <= 1.5d-75))) then
tmp = (x_46im / y_46im) + ((y_46re / y_46im) * (x_46re / y_46im))
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_im <= -5.6e-85) || !(y_46_im <= 1.5e-75)) {
tmp = (x_46_im / y_46_im) + ((y_46_re / y_46_im) * (x_46_re / y_46_im));
} else {
tmp = x_46_re / y_46_re;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if (y_46_im <= -5.6e-85) or not (y_46_im <= 1.5e-75): tmp = (x_46_im / y_46_im) + ((y_46_re / y_46_im) * (x_46_re / y_46_im)) else: tmp = x_46_re / y_46_re return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if ((y_46_im <= -5.6e-85) || !(y_46_im <= 1.5e-75)) tmp = Float64(Float64(x_46_im / y_46_im) + Float64(Float64(y_46_re / y_46_im) * Float64(x_46_re / y_46_im))); else tmp = Float64(x_46_re / y_46_re); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if ((y_46_im <= -5.6e-85) || ~((y_46_im <= 1.5e-75))) tmp = (x_46_im / y_46_im) + ((y_46_re / y_46_im) * (x_46_re / y_46_im)); 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[Or[LessEqual[y$46$im, -5.6e-85], N[Not[LessEqual[y$46$im, 1.5e-75]], $MachinePrecision]], N[(N[(x$46$im / y$46$im), $MachinePrecision] + N[(N[(y$46$re / y$46$im), $MachinePrecision] * N[(x$46$re / y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x$46$re / y$46$re), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.im \leq -5.6 \cdot 10^{-85} \lor \neg \left(y.im \leq 1.5 \cdot 10^{-75}\right):\\
\;\;\;\;\frac{x.im}{y.im} + \frac{y.re}{y.im} \cdot \frac{x.re}{y.im}\\
\mathbf{else}:\\
\;\;\;\;\frac{x.re}{y.re}\\
\end{array}
\end{array}
if y.im < -5.60000000000000033e-85 or 1.4999999999999999e-75 < y.im Initial program 59.9%
add-sqr-sqrt59.9%
*-un-lft-identity59.9%
times-frac59.8%
hypot-def59.8%
fma-def59.8%
hypot-def76.4%
Applied egg-rr76.4%
Taylor expanded in y.re around 0 70.6%
associate-/l*69.6%
Simplified69.6%
unpow269.6%
*-un-lft-identity69.6%
times-frac73.5%
Applied egg-rr73.5%
/-rgt-identity73.5%
*-un-lft-identity73.5%
*-commutative73.5%
times-frac76.8%
clear-num76.8%
Applied egg-rr76.8%
if -5.60000000000000033e-85 < y.im < 1.4999999999999999e-75Initial program 80.0%
Taylor expanded in y.re around inf 81.8%
Final simplification78.6%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (or (<= y.im -1.2e-84) (not (<= y.im 2.9e+21))) (/ x.im y.im) (/ x.re y.re)))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_im <= -1.2e-84) || !(y_46_im <= 2.9e+21)) {
tmp = x_46_im / y_46_im;
} else {
tmp = 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_46im <= (-1.2d-84)) .or. (.not. (y_46im <= 2.9d+21))) then
tmp = x_46im / y_46im
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_im <= -1.2e-84) || !(y_46_im <= 2.9e+21)) {
tmp = x_46_im / y_46_im;
} else {
tmp = x_46_re / y_46_re;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if (y_46_im <= -1.2e-84) or not (y_46_im <= 2.9e+21): tmp = x_46_im / y_46_im else: tmp = x_46_re / y_46_re return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if ((y_46_im <= -1.2e-84) || !(y_46_im <= 2.9e+21)) tmp = Float64(x_46_im / y_46_im); else tmp = Float64(x_46_re / y_46_re); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if ((y_46_im <= -1.2e-84) || ~((y_46_im <= 2.9e+21))) tmp = x_46_im / y_46_im; 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[Or[LessEqual[y$46$im, -1.2e-84], N[Not[LessEqual[y$46$im, 2.9e+21]], $MachinePrecision]], N[(x$46$im / y$46$im), $MachinePrecision], N[(x$46$re / y$46$re), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.im \leq -1.2 \cdot 10^{-84} \lor \neg \left(y.im \leq 2.9 \cdot 10^{+21}\right):\\
\;\;\;\;\frac{x.im}{y.im}\\
\mathbf{else}:\\
\;\;\;\;\frac{x.re}{y.re}\\
\end{array}
\end{array}
if y.im < -1.20000000000000009e-84 or 2.9e21 < y.im Initial program 56.3%
Taylor expanded in y.re around 0 64.5%
if -1.20000000000000009e-84 < y.im < 2.9e21Initial program 82.7%
Taylor expanded in y.re around inf 76.8%
Final simplification69.5%
(FPCore (x.re x.im y.re y.im) :precision binary64 (/ x.im y.im))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return x_46_im / y_46_im;
}
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 = x_46im / y_46im
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return x_46_im / y_46_im;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): return x_46_im / y_46_im
function code(x_46_re, x_46_im, y_46_re, y_46_im) return Float64(x_46_im / y_46_im) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = x_46_im / y_46_im; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[(x$46$im / y$46$im), $MachinePrecision]
\begin{array}{l}
\\
\frac{x.im}{y.im}
\end{array}
Initial program 67.0%
Taylor expanded in y.re around 0 44.5%
Final simplification44.5%
herbie shell --seed 2024013
(FPCore (x.re x.im y.re y.im)
:name "_divideComplex, real part"
:precision binary64
(/ (+ (* x.re y.re) (* x.im y.im)) (+ (* y.re y.re) (* y.im y.im))))