
(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 12 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)))
INFINITY)
(/ (/ (fma x.re y.re (* x.im y.im)) (hypot y.re y.im)) (hypot y.re y.im))
(* (/ 1.0 y.im) (+ x.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))) <= ((double) INFINITY)) {
tmp = (fma(x_46_re, y_46_re, (x_46_im * y_46_im)) / hypot(y_46_re, y_46_im)) / hypot(y_46_re, y_46_im);
} else {
tmp = (1.0 / y_46_im) * (x_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))) <= Inf) tmp = Float64(Float64(fma(x_46_re, y_46_re, Float64(x_46_im * y_46_im)) / hypot(y_46_re, y_46_im)) / hypot(y_46_re, y_46_im)); else tmp = Float64(Float64(1.0 / y_46_im) * Float64(x_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], Infinity], N[(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] / N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / y$46$im), $MachinePrecision] * N[(x$46$im + 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 \infty:\\
\;\;\;\;\frac{\frac{\mathsf{fma}\left(x.re, y.re, x.im \cdot y.im\right)}{\mathsf{hypot}\left(y.re, y.im\right)}}{\mathsf{hypot}\left(y.re, y.im\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{y.im} \cdot \left(x.im + \frac{x.re}{\frac{y.im}{y.re}}\right)\\
\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))) < +inf.0Initial program 74.3%
add-sqr-sqrt74.3%
*-un-lft-identity74.3%
times-frac74.3%
hypot-def74.3%
fma-def74.3%
hypot-def94.6%
Applied egg-rr94.6%
associate-*l/94.8%
*-un-lft-identity94.8%
Applied egg-rr94.8%
if +inf.0 < (/.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 0.0%
add-sqr-sqrt0.0%
*-un-lft-identity0.0%
times-frac0.0%
hypot-def0.0%
fma-def0.0%
hypot-def2.6%
Applied egg-rr2.6%
Taylor expanded in y.re around 0 25.7%
associate-/l*37.6%
Simplified37.6%
Taylor expanded in y.re around 0 65.9%
Final simplification89.1%
(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))) INFINITY)
(/ (/ t_0 (hypot y.re y.im)) (hypot y.re y.im))
(* (/ 1.0 y.im) (+ x.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))) <= ((double) INFINITY)) {
tmp = (t_0 / hypot(y_46_re, y_46_im)) / hypot(y_46_re, y_46_im);
} else {
tmp = (1.0 / y_46_im) * (x_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))) <= Double.POSITIVE_INFINITY) {
tmp = (t_0 / Math.hypot(y_46_re, y_46_im)) / Math.hypot(y_46_re, y_46_im);
} else {
tmp = (1.0 / y_46_im) * (x_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))) <= math.inf: tmp = (t_0 / math.hypot(y_46_re, y_46_im)) / math.hypot(y_46_re, y_46_im) else: tmp = (1.0 / y_46_im) * (x_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))) <= Inf) tmp = Float64(Float64(t_0 / hypot(y_46_re, y_46_im)) / hypot(y_46_re, y_46_im)); else tmp = Float64(Float64(1.0 / y_46_im) * Float64(x_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))) <= Inf) tmp = (t_0 / hypot(y_46_re, y_46_im)) / hypot(y_46_re, y_46_im); else tmp = (1.0 / y_46_im) * (x_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], Infinity], N[(N[(t$95$0 / N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision]), $MachinePrecision] / N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / y$46$im), $MachinePrecision] * N[(x$46$im + 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 \infty:\\
\;\;\;\;\frac{\frac{t_0}{\mathsf{hypot}\left(y.re, y.im\right)}}{\mathsf{hypot}\left(y.re, y.im\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{y.im} \cdot \left(x.im + \frac{x.re}{\frac{y.im}{y.re}}\right)\\
\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))) < +inf.0Initial program 74.3%
add-sqr-sqrt74.3%
*-un-lft-identity74.3%
times-frac74.3%
hypot-def74.3%
fma-def74.3%
hypot-def94.6%
Applied egg-rr94.6%
associate-*l/94.8%
*-un-lft-identity94.8%
Applied egg-rr94.8%
fma-def94.8%
Applied egg-rr94.8%
if +inf.0 < (/.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 0.0%
add-sqr-sqrt0.0%
*-un-lft-identity0.0%
times-frac0.0%
hypot-def0.0%
fma-def0.0%
hypot-def2.6%
Applied egg-rr2.6%
Taylor expanded in y.re around 0 25.7%
associate-/l*37.6%
Simplified37.6%
Taylor expanded in y.re around 0 65.9%
Final simplification89.1%
(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)))))
(if (<= y.im -7e+76)
(/ (- (/ (- x.re) (/ y.im y.re)) x.im) (hypot y.re y.im))
(if (<= y.im -2.5e-139)
t_0
(if (<= y.im 1.05e-36)
(+ (/ x.re y.re) (/ (* x.im y.im) (pow y.re 2.0)))
(if (<= y.im 1.05e+81)
t_0
(* (+ x.im (/ x.re (/ y.im y.re))) (/ 1.0 (hypot y.re y.im)))))))))
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 tmp;
if (y_46_im <= -7e+76) {
tmp = ((-x_46_re / (y_46_im / y_46_re)) - x_46_im) / hypot(y_46_re, y_46_im);
} else if (y_46_im <= -2.5e-139) {
tmp = t_0;
} else if (y_46_im <= 1.05e-36) {
tmp = (x_46_re / y_46_re) + ((x_46_im * y_46_im) / pow(y_46_re, 2.0));
} else if (y_46_im <= 1.05e+81) {
tmp = t_0;
} else {
tmp = (x_46_im + (x_46_re / (y_46_im / y_46_re))) * (1.0 / hypot(y_46_re, y_46_im));
}
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 tmp;
if (y_46_im <= -7e+76) {
tmp = ((-x_46_re / (y_46_im / y_46_re)) - x_46_im) / Math.hypot(y_46_re, y_46_im);
} else if (y_46_im <= -2.5e-139) {
tmp = t_0;
} else if (y_46_im <= 1.05e-36) {
tmp = (x_46_re / y_46_re) + ((x_46_im * y_46_im) / Math.pow(y_46_re, 2.0));
} else if (y_46_im <= 1.05e+81) {
tmp = t_0;
} else {
tmp = (x_46_im + (x_46_re / (y_46_im / y_46_re))) * (1.0 / Math.hypot(y_46_re, y_46_im));
}
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)) tmp = 0 if y_46_im <= -7e+76: tmp = ((-x_46_re / (y_46_im / y_46_re)) - x_46_im) / math.hypot(y_46_re, y_46_im) elif y_46_im <= -2.5e-139: tmp = t_0 elif y_46_im <= 1.05e-36: tmp = (x_46_re / y_46_re) + ((x_46_im * y_46_im) / math.pow(y_46_re, 2.0)) elif y_46_im <= 1.05e+81: tmp = t_0 else: tmp = (x_46_im + (x_46_re / (y_46_im / y_46_re))) * (1.0 / math.hypot(y_46_re, y_46_im)) 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))) tmp = 0.0 if (y_46_im <= -7e+76) tmp = Float64(Float64(Float64(Float64(-x_46_re) / Float64(y_46_im / y_46_re)) - x_46_im) / hypot(y_46_re, y_46_im)); elseif (y_46_im <= -2.5e-139) tmp = t_0; elseif (y_46_im <= 1.05e-36) tmp = Float64(Float64(x_46_re / y_46_re) + Float64(Float64(x_46_im * y_46_im) / (y_46_re ^ 2.0))); elseif (y_46_im <= 1.05e+81) tmp = t_0; else tmp = Float64(Float64(x_46_im + Float64(x_46_re / Float64(y_46_im / y_46_re))) * Float64(1.0 / hypot(y_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) 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)); tmp = 0.0; if (y_46_im <= -7e+76) tmp = ((-x_46_re / (y_46_im / y_46_re)) - x_46_im) / hypot(y_46_re, y_46_im); elseif (y_46_im <= -2.5e-139) tmp = t_0; elseif (y_46_im <= 1.05e-36) tmp = (x_46_re / y_46_re) + ((x_46_im * y_46_im) / (y_46_re ^ 2.0)); elseif (y_46_im <= 1.05e+81) tmp = t_0; else tmp = (x_46_im + (x_46_re / (y_46_im / y_46_re))) * (1.0 / hypot(y_46_re, y_46_im)); 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]}, If[LessEqual[y$46$im, -7e+76], N[(N[(N[((-x$46$re) / N[(y$46$im / y$46$re), $MachinePrecision]), $MachinePrecision] - x$46$im), $MachinePrecision] / N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, -2.5e-139], t$95$0, If[LessEqual[y$46$im, 1.05e-36], N[(N[(x$46$re / y$46$re), $MachinePrecision] + N[(N[(x$46$im * y$46$im), $MachinePrecision] / N[Power[y$46$re, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 1.05e+81], t$95$0, N[(N[(x$46$im + N[(x$46$re / N[(y$46$im / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 / N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision]), $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}\\
\mathbf{if}\;y.im \leq -7 \cdot 10^{+76}:\\
\;\;\;\;\frac{\frac{-x.re}{\frac{y.im}{y.re}} - x.im}{\mathsf{hypot}\left(y.re, y.im\right)}\\
\mathbf{elif}\;y.im \leq -2.5 \cdot 10^{-139}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y.im \leq 1.05 \cdot 10^{-36}:\\
\;\;\;\;\frac{x.re}{y.re} + \frac{x.im \cdot y.im}{{y.re}^{2}}\\
\mathbf{elif}\;y.im \leq 1.05 \cdot 10^{+81}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\left(x.im + \frac{x.re}{\frac{y.im}{y.re}}\right) \cdot \frac{1}{\mathsf{hypot}\left(y.re, y.im\right)}\\
\end{array}
\end{array}
if y.im < -7.00000000000000001e76Initial program 32.0%
add-sqr-sqrt32.0%
*-un-lft-identity32.0%
times-frac32.0%
hypot-def32.0%
fma-def32.0%
hypot-def60.2%
Applied egg-rr60.2%
associate-*l/60.4%
*-un-lft-identity60.4%
Applied egg-rr60.4%
Taylor expanded in y.im around -inf 77.4%
neg-mul-177.4%
+-commutative77.4%
unsub-neg77.4%
mul-1-neg77.4%
associate-/l*82.8%
distribute-neg-frac82.8%
Simplified82.8%
if -7.00000000000000001e76 < y.im < -2.50000000000000017e-139 or 1.04999999999999995e-36 < y.im < 1.0499999999999999e81Initial program 85.8%
if -2.50000000000000017e-139 < y.im < 1.04999999999999995e-36Initial program 67.5%
add-sqr-sqrt67.5%
*-un-lft-identity67.5%
times-frac67.6%
hypot-def67.6%
fma-def67.6%
hypot-def85.2%
Applied egg-rr85.2%
associate-*l/85.3%
*-un-lft-identity85.3%
Applied egg-rr85.3%
Taylor expanded in y.re around inf 77.4%
if 1.0499999999999999e81 < y.im Initial program 39.5%
add-sqr-sqrt39.5%
*-un-lft-identity39.5%
times-frac39.5%
hypot-def39.5%
fma-def39.5%
hypot-def58.4%
Applied egg-rr58.4%
Taylor expanded in y.re around 0 79.8%
associate-/l*92.3%
Simplified92.3%
Final simplification83.5%
(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 (* (/ 1.0 y.im) (+ x.im (/ x.re (/ y.im y.re))))))
(if (<= y.im -1.85e+76)
t_1
(if (<= y.im -1.55e-136)
t_0
(if (<= y.im 1.25e-247)
(+ (/ x.re y.re) (* y.im (/ x.im (pow y.re 2.0))))
(if (<= y.im 2.5e+87) 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 = (1.0 / y_46_im) * (x_46_im + (x_46_re / (y_46_im / y_46_re)));
double tmp;
if (y_46_im <= -1.85e+76) {
tmp = t_1;
} else if (y_46_im <= -1.55e-136) {
tmp = t_0;
} else if (y_46_im <= 1.25e-247) {
tmp = (x_46_re / y_46_re) + (y_46_im * (x_46_im / pow(y_46_re, 2.0)));
} else if (y_46_im <= 2.5e+87) {
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 = (1.0d0 / y_46im) * (x_46im + (x_46re / (y_46im / y_46re)))
if (y_46im <= (-1.85d+76)) then
tmp = t_1
else if (y_46im <= (-1.55d-136)) then
tmp = t_0
else if (y_46im <= 1.25d-247) then
tmp = (x_46re / y_46re) + (y_46im * (x_46im / (y_46re ** 2.0d0)))
else if (y_46im <= 2.5d+87) 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 = (1.0 / y_46_im) * (x_46_im + (x_46_re / (y_46_im / y_46_re)));
double tmp;
if (y_46_im <= -1.85e+76) {
tmp = t_1;
} else if (y_46_im <= -1.55e-136) {
tmp = t_0;
} else if (y_46_im <= 1.25e-247) {
tmp = (x_46_re / y_46_re) + (y_46_im * (x_46_im / Math.pow(y_46_re, 2.0)));
} else if (y_46_im <= 2.5e+87) {
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 = (1.0 / y_46_im) * (x_46_im + (x_46_re / (y_46_im / y_46_re))) tmp = 0 if y_46_im <= -1.85e+76: tmp = t_1 elif y_46_im <= -1.55e-136: tmp = t_0 elif y_46_im <= 1.25e-247: tmp = (x_46_re / y_46_re) + (y_46_im * (x_46_im / math.pow(y_46_re, 2.0))) elif y_46_im <= 2.5e+87: 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(1.0 / y_46_im) * Float64(x_46_im + Float64(x_46_re / Float64(y_46_im / y_46_re)))) tmp = 0.0 if (y_46_im <= -1.85e+76) tmp = t_1; elseif (y_46_im <= -1.55e-136) tmp = t_0; elseif (y_46_im <= 1.25e-247) tmp = Float64(Float64(x_46_re / y_46_re) + Float64(y_46_im * Float64(x_46_im / (y_46_re ^ 2.0)))); elseif (y_46_im <= 2.5e+87) 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 = (1.0 / y_46_im) * (x_46_im + (x_46_re / (y_46_im / y_46_re))); tmp = 0.0; if (y_46_im <= -1.85e+76) tmp = t_1; elseif (y_46_im <= -1.55e-136) tmp = t_0; elseif (y_46_im <= 1.25e-247) tmp = (x_46_re / y_46_re) + (y_46_im * (x_46_im / (y_46_re ^ 2.0))); elseif (y_46_im <= 2.5e+87) 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[(1.0 / y$46$im), $MachinePrecision] * N[(x$46$im + N[(x$46$re / N[(y$46$im / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -1.85e+76], t$95$1, If[LessEqual[y$46$im, -1.55e-136], t$95$0, If[LessEqual[y$46$im, 1.25e-247], N[(N[(x$46$re / y$46$re), $MachinePrecision] + N[(y$46$im * N[(x$46$im / N[Power[y$46$re, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 2.5e+87], 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{1}{y.im} \cdot \left(x.im + \frac{x.re}{\frac{y.im}{y.re}}\right)\\
\mathbf{if}\;y.im \leq -1.85 \cdot 10^{+76}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y.im \leq -1.55 \cdot 10^{-136}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y.im \leq 1.25 \cdot 10^{-247}:\\
\;\;\;\;\frac{x.re}{y.re} + y.im \cdot \frac{x.im}{{y.re}^{2}}\\
\mathbf{elif}\;y.im \leq 2.5 \cdot 10^{+87}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y.im < -1.85e76 or 2.4999999999999999e87 < y.im Initial program 35.5%
add-sqr-sqrt35.5%
*-un-lft-identity35.5%
times-frac35.5%
hypot-def35.5%
fma-def35.5%
hypot-def59.4%
Applied egg-rr59.4%
Taylor expanded in y.re around 0 48.6%
associate-/l*54.4%
Simplified54.4%
Taylor expanded in y.re around 0 86.8%
if -1.85e76 < y.im < -1.55e-136 or 1.24999999999999994e-247 < y.im < 2.4999999999999999e87Initial program 78.9%
if -1.55e-136 < y.im < 1.24999999999999994e-247Initial program 67.8%
Taylor expanded in y.re around inf 85.0%
associate-/l*85.2%
associate-/r/85.2%
Simplified85.2%
Final simplification83.1%
(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 (* (/ 1.0 y.im) (+ x.im (/ x.re (/ y.im y.re))))))
(if (<= y.im -9.5e+76)
t_1
(if (<= y.im -9.6e-136)
t_0
(if (<= y.im 2.4e-36)
(+ (/ x.re y.re) (/ (* x.im y.im) (pow y.re 2.0)))
(if (<= y.im 7e+87) 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 = (1.0 / y_46_im) * (x_46_im + (x_46_re / (y_46_im / y_46_re)));
double tmp;
if (y_46_im <= -9.5e+76) {
tmp = t_1;
} else if (y_46_im <= -9.6e-136) {
tmp = t_0;
} else if (y_46_im <= 2.4e-36) {
tmp = (x_46_re / y_46_re) + ((x_46_im * y_46_im) / pow(y_46_re, 2.0));
} else if (y_46_im <= 7e+87) {
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 = (1.0d0 / y_46im) * (x_46im + (x_46re / (y_46im / y_46re)))
if (y_46im <= (-9.5d+76)) then
tmp = t_1
else if (y_46im <= (-9.6d-136)) then
tmp = t_0
else if (y_46im <= 2.4d-36) then
tmp = (x_46re / y_46re) + ((x_46im * y_46im) / (y_46re ** 2.0d0))
else if (y_46im <= 7d+87) 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 = (1.0 / y_46_im) * (x_46_im + (x_46_re / (y_46_im / y_46_re)));
double tmp;
if (y_46_im <= -9.5e+76) {
tmp = t_1;
} else if (y_46_im <= -9.6e-136) {
tmp = t_0;
} else if (y_46_im <= 2.4e-36) {
tmp = (x_46_re / y_46_re) + ((x_46_im * y_46_im) / Math.pow(y_46_re, 2.0));
} else if (y_46_im <= 7e+87) {
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 = (1.0 / y_46_im) * (x_46_im + (x_46_re / (y_46_im / y_46_re))) tmp = 0 if y_46_im <= -9.5e+76: tmp = t_1 elif y_46_im <= -9.6e-136: tmp = t_0 elif y_46_im <= 2.4e-36: tmp = (x_46_re / y_46_re) + ((x_46_im * y_46_im) / math.pow(y_46_re, 2.0)) elif y_46_im <= 7e+87: 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(1.0 / y_46_im) * Float64(x_46_im + Float64(x_46_re / Float64(y_46_im / y_46_re)))) tmp = 0.0 if (y_46_im <= -9.5e+76) tmp = t_1; elseif (y_46_im <= -9.6e-136) tmp = t_0; elseif (y_46_im <= 2.4e-36) tmp = Float64(Float64(x_46_re / y_46_re) + Float64(Float64(x_46_im * y_46_im) / (y_46_re ^ 2.0))); elseif (y_46_im <= 7e+87) 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 = (1.0 / y_46_im) * (x_46_im + (x_46_re / (y_46_im / y_46_re))); tmp = 0.0; if (y_46_im <= -9.5e+76) tmp = t_1; elseif (y_46_im <= -9.6e-136) tmp = t_0; elseif (y_46_im <= 2.4e-36) tmp = (x_46_re / y_46_re) + ((x_46_im * y_46_im) / (y_46_re ^ 2.0)); elseif (y_46_im <= 7e+87) 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[(1.0 / y$46$im), $MachinePrecision] * N[(x$46$im + N[(x$46$re / N[(y$46$im / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -9.5e+76], t$95$1, If[LessEqual[y$46$im, -9.6e-136], t$95$0, If[LessEqual[y$46$im, 2.4e-36], N[(N[(x$46$re / y$46$re), $MachinePrecision] + N[(N[(x$46$im * y$46$im), $MachinePrecision] / N[Power[y$46$re, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 7e+87], 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{1}{y.im} \cdot \left(x.im + \frac{x.re}{\frac{y.im}{y.re}}\right)\\
\mathbf{if}\;y.im \leq -9.5 \cdot 10^{+76}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y.im \leq -9.6 \cdot 10^{-136}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y.im \leq 2.4 \cdot 10^{-36}:\\
\;\;\;\;\frac{x.re}{y.re} + \frac{x.im \cdot y.im}{{y.re}^{2}}\\
\mathbf{elif}\;y.im \leq 7 \cdot 10^{+87}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y.im < -9.5000000000000003e76 or 6.99999999999999972e87 < y.im Initial program 35.5%
add-sqr-sqrt35.5%
*-un-lft-identity35.5%
times-frac35.5%
hypot-def35.5%
fma-def35.5%
hypot-def59.4%
Applied egg-rr59.4%
Taylor expanded in y.re around 0 48.6%
associate-/l*54.4%
Simplified54.4%
Taylor expanded in y.re around 0 86.8%
if -9.5000000000000003e76 < y.im < -9.5999999999999994e-136 or 2.4e-36 < y.im < 6.99999999999999972e87Initial program 85.8%
if -9.5999999999999994e-136 < y.im < 2.4e-36Initial program 67.5%
add-sqr-sqrt67.5%
*-un-lft-identity67.5%
times-frac67.6%
hypot-def67.6%
fma-def67.6%
hypot-def85.2%
Applied egg-rr85.2%
associate-*l/85.3%
*-un-lft-identity85.3%
Applied egg-rr85.3%
Taylor expanded in y.re around inf 77.4%
Final simplification83.4%
(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)))))
(if (<= y.im -1.3e+77)
(/ (- (/ (- x.re) (/ y.im y.re)) x.im) (hypot y.re y.im))
(if (<= y.im -1.35e-135)
t_0
(if (<= y.im 1.05e-36)
(+ (/ x.re y.re) (/ (* x.im y.im) (pow y.re 2.0)))
(if (<= y.im 1e+87)
t_0
(* (/ 1.0 y.im) (+ x.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)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im));
double tmp;
if (y_46_im <= -1.3e+77) {
tmp = ((-x_46_re / (y_46_im / y_46_re)) - x_46_im) / hypot(y_46_re, y_46_im);
} else if (y_46_im <= -1.35e-135) {
tmp = t_0;
} else if (y_46_im <= 1.05e-36) {
tmp = (x_46_re / y_46_re) + ((x_46_im * y_46_im) / pow(y_46_re, 2.0));
} else if (y_46_im <= 1e+87) {
tmp = t_0;
} else {
tmp = (1.0 / y_46_im) * (x_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)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im));
double tmp;
if (y_46_im <= -1.3e+77) {
tmp = ((-x_46_re / (y_46_im / y_46_re)) - x_46_im) / Math.hypot(y_46_re, y_46_im);
} else if (y_46_im <= -1.35e-135) {
tmp = t_0;
} else if (y_46_im <= 1.05e-36) {
tmp = (x_46_re / y_46_re) + ((x_46_im * y_46_im) / Math.pow(y_46_re, 2.0));
} else if (y_46_im <= 1e+87) {
tmp = t_0;
} else {
tmp = (1.0 / y_46_im) * (x_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)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im)) tmp = 0 if y_46_im <= -1.3e+77: tmp = ((-x_46_re / (y_46_im / y_46_re)) - x_46_im) / math.hypot(y_46_re, y_46_im) elif y_46_im <= -1.35e-135: tmp = t_0 elif y_46_im <= 1.05e-36: tmp = (x_46_re / y_46_re) + ((x_46_im * y_46_im) / math.pow(y_46_re, 2.0)) elif y_46_im <= 1e+87: tmp = t_0 else: tmp = (1.0 / y_46_im) * (x_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(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))) tmp = 0.0 if (y_46_im <= -1.3e+77) tmp = Float64(Float64(Float64(Float64(-x_46_re) / Float64(y_46_im / y_46_re)) - x_46_im) / hypot(y_46_re, y_46_im)); elseif (y_46_im <= -1.35e-135) tmp = t_0; elseif (y_46_im <= 1.05e-36) tmp = Float64(Float64(x_46_re / y_46_re) + Float64(Float64(x_46_im * y_46_im) / (y_46_re ^ 2.0))); elseif (y_46_im <= 1e+87) tmp = t_0; else tmp = Float64(Float64(1.0 / y_46_im) * Float64(x_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)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im)); tmp = 0.0; if (y_46_im <= -1.3e+77) tmp = ((-x_46_re / (y_46_im / y_46_re)) - x_46_im) / hypot(y_46_re, y_46_im); elseif (y_46_im <= -1.35e-135) tmp = t_0; elseif (y_46_im <= 1.05e-36) tmp = (x_46_re / y_46_re) + ((x_46_im * y_46_im) / (y_46_re ^ 2.0)); elseif (y_46_im <= 1e+87) tmp = t_0; else tmp = (1.0 / y_46_im) * (x_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[(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]}, If[LessEqual[y$46$im, -1.3e+77], N[(N[(N[((-x$46$re) / N[(y$46$im / y$46$re), $MachinePrecision]), $MachinePrecision] - x$46$im), $MachinePrecision] / N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, -1.35e-135], t$95$0, If[LessEqual[y$46$im, 1.05e-36], N[(N[(x$46$re / y$46$re), $MachinePrecision] + N[(N[(x$46$im * y$46$im), $MachinePrecision] / N[Power[y$46$re, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 1e+87], t$95$0, N[(N[(1.0 / y$46$im), $MachinePrecision] * N[(x$46$im + N[(x$46$re / N[(y$46$im / y$46$re), $MachinePrecision]), $MachinePrecision]), $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}\\
\mathbf{if}\;y.im \leq -1.3 \cdot 10^{+77}:\\
\;\;\;\;\frac{\frac{-x.re}{\frac{y.im}{y.re}} - x.im}{\mathsf{hypot}\left(y.re, y.im\right)}\\
\mathbf{elif}\;y.im \leq -1.35 \cdot 10^{-135}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y.im \leq 1.05 \cdot 10^{-36}:\\
\;\;\;\;\frac{x.re}{y.re} + \frac{x.im \cdot y.im}{{y.re}^{2}}\\
\mathbf{elif}\;y.im \leq 10^{+87}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{y.im} \cdot \left(x.im + \frac{x.re}{\frac{y.im}{y.re}}\right)\\
\end{array}
\end{array}
if y.im < -1.3000000000000001e77Initial program 32.0%
add-sqr-sqrt32.0%
*-un-lft-identity32.0%
times-frac32.0%
hypot-def32.0%
fma-def32.0%
hypot-def60.2%
Applied egg-rr60.2%
associate-*l/60.4%
*-un-lft-identity60.4%
Applied egg-rr60.4%
Taylor expanded in y.im around -inf 77.4%
neg-mul-177.4%
+-commutative77.4%
unsub-neg77.4%
mul-1-neg77.4%
associate-/l*82.8%
distribute-neg-frac82.8%
Simplified82.8%
if -1.3000000000000001e77 < y.im < -1.34999999999999999e-135 or 1.04999999999999995e-36 < y.im < 9.9999999999999996e86Initial program 85.8%
if -1.34999999999999999e-135 < y.im < 1.04999999999999995e-36Initial program 67.5%
add-sqr-sqrt67.5%
*-un-lft-identity67.5%
times-frac67.6%
hypot-def67.6%
fma-def67.6%
hypot-def85.2%
Applied egg-rr85.2%
associate-*l/85.3%
*-un-lft-identity85.3%
Applied egg-rr85.3%
Taylor expanded in y.re around inf 77.4%
if 9.9999999999999996e86 < y.im Initial program 39.5%
add-sqr-sqrt39.5%
*-un-lft-identity39.5%
times-frac39.5%
hypot-def39.5%
fma-def39.5%
hypot-def58.4%
Applied egg-rr58.4%
Taylor expanded in y.re around 0 79.8%
associate-/l*92.3%
Simplified92.3%
Taylor expanded in y.re around 0 92.2%
Final simplification83.5%
(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 (* (/ 1.0 y.im) (+ x.im (/ x.re (/ y.im y.re))))))
(if (<= y.im -2.4e+76)
t_1
(if (<= y.im -1.45e-136)
t_0
(if (<= y.im 6.2e-283)
(/ x.re y.re)
(if (<= y.im 1.15e+80) 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 = (1.0 / y_46_im) * (x_46_im + (x_46_re / (y_46_im / y_46_re)));
double tmp;
if (y_46_im <= -2.4e+76) {
tmp = t_1;
} else if (y_46_im <= -1.45e-136) {
tmp = t_0;
} else if (y_46_im <= 6.2e-283) {
tmp = x_46_re / y_46_re;
} else if (y_46_im <= 1.15e+80) {
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 = (1.0d0 / y_46im) * (x_46im + (x_46re / (y_46im / y_46re)))
if (y_46im <= (-2.4d+76)) then
tmp = t_1
else if (y_46im <= (-1.45d-136)) then
tmp = t_0
else if (y_46im <= 6.2d-283) then
tmp = x_46re / y_46re
else if (y_46im <= 1.15d+80) 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 = (1.0 / y_46_im) * (x_46_im + (x_46_re / (y_46_im / y_46_re)));
double tmp;
if (y_46_im <= -2.4e+76) {
tmp = t_1;
} else if (y_46_im <= -1.45e-136) {
tmp = t_0;
} else if (y_46_im <= 6.2e-283) {
tmp = x_46_re / y_46_re;
} else if (y_46_im <= 1.15e+80) {
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 = (1.0 / y_46_im) * (x_46_im + (x_46_re / (y_46_im / y_46_re))) tmp = 0 if y_46_im <= -2.4e+76: tmp = t_1 elif y_46_im <= -1.45e-136: tmp = t_0 elif y_46_im <= 6.2e-283: tmp = x_46_re / y_46_re elif y_46_im <= 1.15e+80: 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(1.0 / y_46_im) * Float64(x_46_im + Float64(x_46_re / Float64(y_46_im / y_46_re)))) tmp = 0.0 if (y_46_im <= -2.4e+76) tmp = t_1; elseif (y_46_im <= -1.45e-136) tmp = t_0; elseif (y_46_im <= 6.2e-283) tmp = Float64(x_46_re / y_46_re); elseif (y_46_im <= 1.15e+80) 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 = (1.0 / y_46_im) * (x_46_im + (x_46_re / (y_46_im / y_46_re))); tmp = 0.0; if (y_46_im <= -2.4e+76) tmp = t_1; elseif (y_46_im <= -1.45e-136) tmp = t_0; elseif (y_46_im <= 6.2e-283) tmp = x_46_re / y_46_re; elseif (y_46_im <= 1.15e+80) 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[(1.0 / y$46$im), $MachinePrecision] * N[(x$46$im + N[(x$46$re / N[(y$46$im / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -2.4e+76], t$95$1, If[LessEqual[y$46$im, -1.45e-136], t$95$0, If[LessEqual[y$46$im, 6.2e-283], N[(x$46$re / y$46$re), $MachinePrecision], If[LessEqual[y$46$im, 1.15e+80], 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{1}{y.im} \cdot \left(x.im + \frac{x.re}{\frac{y.im}{y.re}}\right)\\
\mathbf{if}\;y.im \leq -2.4 \cdot 10^{+76}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y.im \leq -1.45 \cdot 10^{-136}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y.im \leq 6.2 \cdot 10^{-283}:\\
\;\;\;\;\frac{x.re}{y.re}\\
\mathbf{elif}\;y.im \leq 1.15 \cdot 10^{+80}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y.im < -2.4e76 or 1.15000000000000002e80 < y.im Initial program 35.5%
add-sqr-sqrt35.5%
*-un-lft-identity35.5%
times-frac35.5%
hypot-def35.5%
fma-def35.5%
hypot-def59.4%
Applied egg-rr59.4%
Taylor expanded in y.re around 0 48.6%
associate-/l*54.4%
Simplified54.4%
Taylor expanded in y.re around 0 86.8%
if -2.4e76 < y.im < -1.44999999999999997e-136 or 6.20000000000000008e-283 < y.im < 1.15000000000000002e80Initial program 79.7%
if -1.44999999999999997e-136 < y.im < 6.20000000000000008e-283Initial program 63.9%
Taylor expanded in y.re around inf 80.1%
Final simplification82.6%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* (/ 1.0 y.im) (+ x.im (/ x.re (/ y.im y.re))))))
(if (<= y.im -9.6e-100)
t_0
(if (<= y.im 1.45e-34)
(/ x.re y.re)
(if (<= y.im 1e+84)
(/ (* x.im y.im) (+ (* y.re y.re) (* y.im y.im)))
t_0)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = (1.0 / y_46_im) * (x_46_im + (x_46_re / (y_46_im / y_46_re)));
double tmp;
if (y_46_im <= -9.6e-100) {
tmp = t_0;
} else if (y_46_im <= 1.45e-34) {
tmp = x_46_re / y_46_re;
} else if (y_46_im <= 1e+84) {
tmp = (x_46_im * y_46_im) / ((y_46_re * y_46_re) + (y_46_im * 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 = (1.0d0 / y_46im) * (x_46im + (x_46re / (y_46im / y_46re)))
if (y_46im <= (-9.6d-100)) then
tmp = t_0
else if (y_46im <= 1.45d-34) then
tmp = x_46re / y_46re
else if (y_46im <= 1d+84) then
tmp = (x_46im * y_46im) / ((y_46re * y_46re) + (y_46im * 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 = (1.0 / y_46_im) * (x_46_im + (x_46_re / (y_46_im / y_46_re)));
double tmp;
if (y_46_im <= -9.6e-100) {
tmp = t_0;
} else if (y_46_im <= 1.45e-34) {
tmp = x_46_re / y_46_re;
} else if (y_46_im <= 1e+84) {
tmp = (x_46_im * y_46_im) / ((y_46_re * y_46_re) + (y_46_im * 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 = (1.0 / y_46_im) * (x_46_im + (x_46_re / (y_46_im / y_46_re))) tmp = 0 if y_46_im <= -9.6e-100: tmp = t_0 elif y_46_im <= 1.45e-34: tmp = x_46_re / y_46_re elif y_46_im <= 1e+84: tmp = (x_46_im * y_46_im) / ((y_46_re * y_46_re) + (y_46_im * 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(1.0 / y_46_im) * Float64(x_46_im + Float64(x_46_re / Float64(y_46_im / y_46_re)))) tmp = 0.0 if (y_46_im <= -9.6e-100) tmp = t_0; elseif (y_46_im <= 1.45e-34) tmp = Float64(x_46_re / y_46_re); elseif (y_46_im <= 1e+84) tmp = Float64(Float64(x_46_im * y_46_im) / Float64(Float64(y_46_re * y_46_re) + Float64(y_46_im * 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 = (1.0 / y_46_im) * (x_46_im + (x_46_re / (y_46_im / y_46_re))); tmp = 0.0; if (y_46_im <= -9.6e-100) tmp = t_0; elseif (y_46_im <= 1.45e-34) tmp = x_46_re / y_46_re; elseif (y_46_im <= 1e+84) tmp = (x_46_im * y_46_im) / ((y_46_re * y_46_re) + (y_46_im * 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[(N[(1.0 / y$46$im), $MachinePrecision] * N[(x$46$im + N[(x$46$re / N[(y$46$im / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -9.6e-100], t$95$0, If[LessEqual[y$46$im, 1.45e-34], N[(x$46$re / y$46$re), $MachinePrecision], If[LessEqual[y$46$im, 1e+84], 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], t$95$0]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{1}{y.im} \cdot \left(x.im + \frac{x.re}{\frac{y.im}{y.re}}\right)\\
\mathbf{if}\;y.im \leq -9.6 \cdot 10^{-100}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y.im \leq 1.45 \cdot 10^{-34}:\\
\;\;\;\;\frac{x.re}{y.re}\\
\mathbf{elif}\;y.im \leq 10^{+84}:\\
\;\;\;\;\frac{x.im \cdot y.im}{y.re \cdot y.re + y.im \cdot y.im}\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if y.im < -9.600000000000001e-100 or 1.00000000000000006e84 < y.im Initial program 47.4%
add-sqr-sqrt47.4%
*-un-lft-identity47.4%
times-frac47.4%
hypot-def47.4%
fma-def47.4%
hypot-def66.7%
Applied egg-rr66.7%
Taylor expanded in y.re around 0 36.9%
associate-/l*41.2%
Simplified41.2%
Taylor expanded in y.re around 0 79.5%
if -9.600000000000001e-100 < y.im < 1.4500000000000001e-34Initial program 69.5%
Taylor expanded in y.re around inf 70.3%
if 1.4500000000000001e-34 < y.im < 1.00000000000000006e84Initial program 88.6%
Taylor expanded in x.re around 0 67.1%
Final simplification74.8%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (or (<= y.im -9.6e-100) (not (<= y.im 2.4e-35))) (* (/ 1.0 y.im) (+ x.im (/ x.re (/ y.im y.re)))) (/ 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 <= -9.6e-100) || !(y_46_im <= 2.4e-35)) {
tmp = (1.0 / y_46_im) * (x_46_im + (x_46_re / (y_46_im / y_46_re)));
} 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 <= (-9.6d-100)) .or. (.not. (y_46im <= 2.4d-35))) then
tmp = (1.0d0 / y_46im) * (x_46im + (x_46re / (y_46im / y_46re)))
else
tmp = x_46re / y_46re
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_im <= -9.6e-100) || !(y_46_im <= 2.4e-35)) {
tmp = (1.0 / y_46_im) * (x_46_im + (x_46_re / (y_46_im / y_46_re)));
} 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 <= -9.6e-100) or not (y_46_im <= 2.4e-35): tmp = (1.0 / y_46_im) * (x_46_im + (x_46_re / (y_46_im / y_46_re))) 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 <= -9.6e-100) || !(y_46_im <= 2.4e-35)) tmp = Float64(Float64(1.0 / y_46_im) * Float64(x_46_im + Float64(x_46_re / Float64(y_46_im / y_46_re)))); 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 <= -9.6e-100) || ~((y_46_im <= 2.4e-35))) tmp = (1.0 / y_46_im) * (x_46_im + (x_46_re / (y_46_im / y_46_re))); else tmp = x_46_re / y_46_re; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[Or[LessEqual[y$46$im, -9.6e-100], N[Not[LessEqual[y$46$im, 2.4e-35]], $MachinePrecision]], N[(N[(1.0 / y$46$im), $MachinePrecision] * N[(x$46$im + N[(x$46$re / N[(y$46$im / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x$46$re / y$46$re), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.im \leq -9.6 \cdot 10^{-100} \lor \neg \left(y.im \leq 2.4 \cdot 10^{-35}\right):\\
\;\;\;\;\frac{1}{y.im} \cdot \left(x.im + \frac{x.re}{\frac{y.im}{y.re}}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x.re}{y.re}\\
\end{array}
\end{array}
if y.im < -9.600000000000001e-100 or 2.4000000000000001e-35 < y.im Initial program 54.0%
add-sqr-sqrt54.0%
*-un-lft-identity54.0%
times-frac54.0%
hypot-def54.0%
fma-def54.0%
hypot-def71.4%
Applied egg-rr71.4%
Taylor expanded in y.re around 0 39.4%
associate-/l*42.6%
Simplified42.6%
Taylor expanded in y.re around 0 74.5%
if -9.600000000000001e-100 < y.im < 2.4000000000000001e-35Initial program 69.5%
Taylor expanded in y.re around inf 70.3%
Final simplification73.0%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (or (<= y.re -8.5e+171) (not (<= y.re 2.7e+255))) (/ x.im y.re) (/ x.im 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_re <= -8.5e+171) || !(y_46_re <= 2.7e+255)) {
tmp = x_46_im / y_46_re;
} else {
tmp = x_46_im / 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_46re <= (-8.5d+171)) .or. (.not. (y_46re <= 2.7d+255))) then
tmp = x_46im / y_46re
else
tmp = x_46im / 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_re <= -8.5e+171) || !(y_46_re <= 2.7e+255)) {
tmp = x_46_im / y_46_re;
} else {
tmp = x_46_im / y_46_im;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if (y_46_re <= -8.5e+171) or not (y_46_re <= 2.7e+255): tmp = x_46_im / y_46_re else: tmp = x_46_im / 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_re <= -8.5e+171) || !(y_46_re <= 2.7e+255)) tmp = Float64(x_46_im / y_46_re); else tmp = Float64(x_46_im / 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_re <= -8.5e+171) || ~((y_46_re <= 2.7e+255))) tmp = x_46_im / y_46_re; else tmp = x_46_im / y_46_im; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[Or[LessEqual[y$46$re, -8.5e+171], N[Not[LessEqual[y$46$re, 2.7e+255]], $MachinePrecision]], N[(x$46$im / y$46$re), $MachinePrecision], N[(x$46$im / y$46$im), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq -8.5 \cdot 10^{+171} \lor \neg \left(y.re \leq 2.7 \cdot 10^{+255}\right):\\
\;\;\;\;\frac{x.im}{y.re}\\
\mathbf{else}:\\
\;\;\;\;\frac{x.im}{y.im}\\
\end{array}
\end{array}
if y.re < -8.4999999999999995e171 or 2.7000000000000001e255 < y.re Initial program 43.9%
add-sqr-sqrt43.9%
*-un-lft-identity43.9%
times-frac43.9%
hypot-def43.9%
fma-def43.9%
hypot-def58.5%
Applied egg-rr58.5%
associate-*l/58.6%
*-un-lft-identity58.6%
Applied egg-rr58.6%
Taylor expanded in y.re around -inf 73.5%
neg-mul-173.5%
+-commutative73.5%
unsub-neg73.5%
associate-*r/73.5%
neg-mul-173.5%
distribute-rgt-neg-out73.5%
Simplified73.5%
Taylor expanded in y.im around -inf 31.1%
if -8.4999999999999995e171 < y.re < 2.7000000000000001e255Initial program 62.7%
Taylor expanded in y.re around 0 52.4%
Final simplification49.1%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (or (<= y.im -9.6e-100) (not (<= y.im 1.06e-32))) (/ 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 <= -9.6e-100) || !(y_46_im <= 1.06e-32)) {
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 <= (-9.6d-100)) .or. (.not. (y_46im <= 1.06d-32))) 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 <= -9.6e-100) || !(y_46_im <= 1.06e-32)) {
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 <= -9.6e-100) or not (y_46_im <= 1.06e-32): 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 <= -9.6e-100) || !(y_46_im <= 1.06e-32)) 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 <= -9.6e-100) || ~((y_46_im <= 1.06e-32))) 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, -9.6e-100], N[Not[LessEqual[y$46$im, 1.06e-32]], $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 -9.6 \cdot 10^{-100} \lor \neg \left(y.im \leq 1.06 \cdot 10^{-32}\right):\\
\;\;\;\;\frac{x.im}{y.im}\\
\mathbf{else}:\\
\;\;\;\;\frac{x.re}{y.re}\\
\end{array}
\end{array}
if y.im < -9.600000000000001e-100 or 1.05999999999999994e-32 < y.im Initial program 54.0%
Taylor expanded in y.re around 0 60.8%
if -9.600000000000001e-100 < y.im < 1.05999999999999994e-32Initial program 69.5%
Taylor expanded in y.re around inf 70.3%
Final simplification64.3%
(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 59.8%
Taylor expanded in y.re around 0 45.5%
Final simplification45.5%
herbie shell --seed 2023311
(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))))