
(FPCore (x.re x.im y.re y.im) :precision binary64 (/ (- (* x.im y.re) (* x.re 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_im * y_46_re) - (x_46_re * 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_46im * y_46re) - (x_46re * 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_im * y_46_re) - (x_46_re * 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_im * y_46_re) - (x_46_re * 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_im * y_46_re) - Float64(x_46_re * 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_im * y_46_re) - (x_46_re * 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$im * y$46$re), $MachinePrecision] - N[(x$46$re * 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.im \cdot y.re - x.re \cdot y.im}{y.re \cdot y.re + y.im \cdot y.im}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 15 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x.re x.im y.re y.im) :precision binary64 (/ (- (* x.im y.re) (* x.re 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_im * y_46_re) - (x_46_re * 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_46im * y_46re) - (x_46re * 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_im * y_46_re) - (x_46_re * 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_im * y_46_re) - (x_46_re * 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_im * y_46_re) - Float64(x_46_re * 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_im * y_46_re) - (x_46_re * 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$im * y$46$re), $MachinePrecision] - N[(x$46$re * 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.im \cdot y.re - x.re \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 (- (/ (* (/ y.re (hypot y.re y.im)) x.im) (hypot y.re y.im)) (/ (* (/ y.im (hypot y.re y.im)) x.re) (hypot y.re y.im))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return (((y_46_re / hypot(y_46_re, y_46_im)) * x_46_im) / hypot(y_46_re, y_46_im)) - (((y_46_im / hypot(y_46_re, y_46_im)) * x_46_re) / hypot(y_46_re, y_46_im));
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return (((y_46_re / Math.hypot(y_46_re, y_46_im)) * x_46_im) / Math.hypot(y_46_re, y_46_im)) - (((y_46_im / Math.hypot(y_46_re, y_46_im)) * x_46_re) / Math.hypot(y_46_re, y_46_im));
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): return (((y_46_re / math.hypot(y_46_re, y_46_im)) * x_46_im) / math.hypot(y_46_re, y_46_im)) - (((y_46_im / math.hypot(y_46_re, y_46_im)) * x_46_re) / math.hypot(y_46_re, y_46_im))
function code(x_46_re, x_46_im, y_46_re, y_46_im) return Float64(Float64(Float64(Float64(y_46_re / hypot(y_46_re, y_46_im)) * x_46_im) / hypot(y_46_re, y_46_im)) - Float64(Float64(Float64(y_46_im / hypot(y_46_re, y_46_im)) * x_46_re) / hypot(y_46_re, y_46_im))) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = (((y_46_re / hypot(y_46_re, y_46_im)) * x_46_im) / hypot(y_46_re, y_46_im)) - (((y_46_im / hypot(y_46_re, y_46_im)) * x_46_re) / hypot(y_46_re, y_46_im)); end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[(N[(N[(N[(y$46$re / N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision]), $MachinePrecision] * x$46$im), $MachinePrecision] / N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision]), $MachinePrecision] - N[(N[(N[(y$46$im / N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision]), $MachinePrecision] * x$46$re), $MachinePrecision] / N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\frac{y.re}{\mathsf{hypot}\left(y.re, y.im\right)} \cdot x.im}{\mathsf{hypot}\left(y.re, y.im\right)} - \frac{\frac{y.im}{\mathsf{hypot}\left(y.re, y.im\right)} \cdot x.re}{\mathsf{hypot}\left(y.re, y.im\right)}
\end{array}
Initial program 63.5%
*-un-lft-identity63.5%
add-sqr-sqrt63.5%
times-frac63.5%
hypot-def63.5%
hypot-def75.9%
Applied egg-rr75.9%
div-sub75.9%
sub-neg75.9%
*-commutative75.9%
*-commutative75.9%
Applied egg-rr75.9%
sub-neg75.9%
associate-/l*89.8%
associate-/l*97.4%
Simplified97.4%
associate-*l/97.6%
*-un-lft-identity97.6%
div-sub97.6%
associate-/r/97.9%
associate-/r/98.8%
Applied egg-rr98.8%
Final simplification98.8%
(FPCore (x.re x.im y.re y.im) :precision binary64 (* (/ 1.0 (hypot y.re y.im)) (- (/ y.re (/ (hypot y.re y.im) x.im)) (* (/ y.im (hypot y.re y.im)) x.re))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return (1.0 / hypot(y_46_re, y_46_im)) * ((y_46_re / (hypot(y_46_re, y_46_im) / x_46_im)) - ((y_46_im / hypot(y_46_re, y_46_im)) * x_46_re));
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return (1.0 / Math.hypot(y_46_re, y_46_im)) * ((y_46_re / (Math.hypot(y_46_re, y_46_im) / x_46_im)) - ((y_46_im / Math.hypot(y_46_re, y_46_im)) * x_46_re));
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): return (1.0 / math.hypot(y_46_re, y_46_im)) * ((y_46_re / (math.hypot(y_46_re, y_46_im) / x_46_im)) - ((y_46_im / math.hypot(y_46_re, y_46_im)) * x_46_re))
function code(x_46_re, x_46_im, y_46_re, y_46_im) return Float64(Float64(1.0 / hypot(y_46_re, y_46_im)) * Float64(Float64(y_46_re / Float64(hypot(y_46_re, y_46_im) / x_46_im)) - Float64(Float64(y_46_im / hypot(y_46_re, y_46_im)) * x_46_re))) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = (1.0 / hypot(y_46_re, y_46_im)) * ((y_46_re / (hypot(y_46_re, y_46_im) / x_46_im)) - ((y_46_im / hypot(y_46_re, y_46_im)) * x_46_re)); end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[(N[(1.0 / N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision]), $MachinePrecision] * N[(N[(y$46$re / N[(N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision] / x$46$im), $MachinePrecision]), $MachinePrecision] - N[(N[(y$46$im / N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision]), $MachinePrecision] * x$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{1}{\mathsf{hypot}\left(y.re, y.im\right)} \cdot \left(\frac{y.re}{\frac{\mathsf{hypot}\left(y.re, y.im\right)}{x.im}} - \frac{y.im}{\mathsf{hypot}\left(y.re, y.im\right)} \cdot x.re\right)
\end{array}
Initial program 63.5%
*-un-lft-identity63.5%
add-sqr-sqrt63.5%
times-frac63.5%
hypot-def63.5%
hypot-def75.9%
Applied egg-rr75.9%
div-sub75.9%
sub-neg75.9%
*-commutative75.9%
*-commutative75.9%
Applied egg-rr75.9%
sub-neg75.9%
associate-/l*89.8%
associate-/l*97.4%
Simplified97.4%
associate-/r/98.7%
Applied egg-rr98.7%
Final simplification98.7%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (- (* y.re x.im) (* y.im x.re)))
(t_1 (/ t_0 (+ (* y.re y.re) (* y.im y.im)))))
(if (or (<= t_1 (- INFINITY)) (not (<= t_1 2e+202)))
(-
(/ x.im y.re)
(/ (* (/ y.im (hypot y.re y.im)) x.re) (hypot y.re y.im)))
(* (/ 1.0 (hypot y.re y.im)) (/ t_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 = (y_46_re * x_46_im) - (y_46_im * x_46_re);
double t_1 = t_0 / ((y_46_re * y_46_re) + (y_46_im * y_46_im));
double tmp;
if ((t_1 <= -((double) INFINITY)) || !(t_1 <= 2e+202)) {
tmp = (x_46_im / y_46_re) - (((y_46_im / hypot(y_46_re, y_46_im)) * x_46_re) / hypot(y_46_re, y_46_im));
} else {
tmp = (1.0 / hypot(y_46_re, y_46_im)) * (t_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 = (y_46_re * x_46_im) - (y_46_im * x_46_re);
double t_1 = t_0 / ((y_46_re * y_46_re) + (y_46_im * y_46_im));
double tmp;
if ((t_1 <= -Double.POSITIVE_INFINITY) || !(t_1 <= 2e+202)) {
tmp = (x_46_im / y_46_re) - (((y_46_im / Math.hypot(y_46_re, y_46_im)) * x_46_re) / Math.hypot(y_46_re, y_46_im));
} else {
tmp = (1.0 / Math.hypot(y_46_re, y_46_im)) * (t_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 = (y_46_re * x_46_im) - (y_46_im * x_46_re) t_1 = t_0 / ((y_46_re * y_46_re) + (y_46_im * y_46_im)) tmp = 0 if (t_1 <= -math.inf) or not (t_1 <= 2e+202): tmp = (x_46_im / y_46_re) - (((y_46_im / math.hypot(y_46_re, y_46_im)) * x_46_re) / math.hypot(y_46_re, y_46_im)) else: tmp = (1.0 / math.hypot(y_46_re, y_46_im)) * (t_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(y_46_re * x_46_im) - Float64(y_46_im * x_46_re)) t_1 = Float64(t_0 / Float64(Float64(y_46_re * y_46_re) + Float64(y_46_im * y_46_im))) tmp = 0.0 if ((t_1 <= Float64(-Inf)) || !(t_1 <= 2e+202)) tmp = Float64(Float64(x_46_im / y_46_re) - Float64(Float64(Float64(y_46_im / hypot(y_46_re, y_46_im)) * x_46_re) / hypot(y_46_re, y_46_im))); else tmp = Float64(Float64(1.0 / hypot(y_46_re, y_46_im)) * Float64(t_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 = (y_46_re * x_46_im) - (y_46_im * x_46_re); t_1 = t_0 / ((y_46_re * y_46_re) + (y_46_im * y_46_im)); tmp = 0.0; if ((t_1 <= -Inf) || ~((t_1 <= 2e+202))) tmp = (x_46_im / y_46_re) - (((y_46_im / hypot(y_46_re, y_46_im)) * x_46_re) / hypot(y_46_re, y_46_im)); else tmp = (1.0 / hypot(y_46_re, y_46_im)) * (t_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[(y$46$re * x$46$im), $MachinePrecision] - N[(y$46$im * x$46$re), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(t$95$0 / N[(N[(y$46$re * y$46$re), $MachinePrecision] + N[(y$46$im * y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, (-Infinity)], N[Not[LessEqual[t$95$1, 2e+202]], $MachinePrecision]], N[(N[(x$46$im / y$46$re), $MachinePrecision] - N[(N[(N[(y$46$im / N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision]), $MachinePrecision] * x$46$re), $MachinePrecision] / N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 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]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot x.im - y.im \cdot x.re\\
t_1 := \frac{t_0}{y.re \cdot y.re + y.im \cdot y.im}\\
\mathbf{if}\;t_1 \leq -\infty \lor \neg \left(t_1 \leq 2 \cdot 10^{+202}\right):\\
\;\;\;\;\frac{x.im}{y.re} - \frac{\frac{y.im}{\mathsf{hypot}\left(y.re, y.im\right)} \cdot x.re}{\mathsf{hypot}\left(y.re, y.im\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\mathsf{hypot}\left(y.re, y.im\right)} \cdot \frac{t_0}{\mathsf{hypot}\left(y.re, y.im\right)}\\
\end{array}
\end{array}
if (/.f64 (-.f64 (*.f64 x.im y.re) (*.f64 x.re y.im)) (+.f64 (*.f64 y.re y.re) (*.f64 y.im y.im))) < -inf.0 or 1.9999999999999998e202 < (/.f64 (-.f64 (*.f64 x.im y.re) (*.f64 x.re y.im)) (+.f64 (*.f64 y.re y.re) (*.f64 y.im y.im))) Initial program 25.7%
*-un-lft-identity25.7%
add-sqr-sqrt25.7%
times-frac25.7%
hypot-def25.7%
hypot-def33.5%
Applied egg-rr33.5%
div-sub33.5%
sub-neg33.5%
*-commutative33.5%
*-commutative33.5%
Applied egg-rr33.5%
sub-neg33.5%
associate-/l*72.6%
associate-/l*97.3%
Simplified97.3%
associate-*l/97.4%
*-un-lft-identity97.4%
div-sub97.4%
associate-/r/97.5%
associate-/r/98.8%
Applied egg-rr98.8%
Taylor expanded in y.re around inf 80.8%
if -inf.0 < (/.f64 (-.f64 (*.f64 x.im y.re) (*.f64 x.re y.im)) (+.f64 (*.f64 y.re y.re) (*.f64 y.im y.im))) < 1.9999999999999998e202Initial program 83.6%
*-un-lft-identity83.6%
add-sqr-sqrt83.6%
times-frac83.6%
hypot-def83.6%
hypot-def98.4%
Applied egg-rr98.4%
Final simplification92.3%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (/ 1.0 (hypot y.re y.im))))
(if (<= y.re -4.4e+101)
(* t_0 (- (/ (* y.im x.re) y.re) x.im))
(if (<= y.re -4.3e-158)
(/ (- (* y.re x.im) (* y.im x.re)) (+ (* y.re y.re) (* y.im y.im)))
(if (<= y.re 4.2e-19)
(* (/ -1.0 y.im) (- x.re (/ x.im (/ y.im y.re))))
(* t_0 (- x.im (/ y.im (/ (hypot y.re y.im) x.re)))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = 1.0 / hypot(y_46_re, y_46_im);
double tmp;
if (y_46_re <= -4.4e+101) {
tmp = t_0 * (((y_46_im * x_46_re) / y_46_re) - x_46_im);
} else if (y_46_re <= -4.3e-158) {
tmp = ((y_46_re * x_46_im) - (y_46_im * x_46_re)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im));
} else if (y_46_re <= 4.2e-19) {
tmp = (-1.0 / y_46_im) * (x_46_re - (x_46_im / (y_46_im / y_46_re)));
} else {
tmp = t_0 * (x_46_im - (y_46_im / (hypot(y_46_re, y_46_im) / x_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 = 1.0 / Math.hypot(y_46_re, y_46_im);
double tmp;
if (y_46_re <= -4.4e+101) {
tmp = t_0 * (((y_46_im * x_46_re) / y_46_re) - x_46_im);
} else if (y_46_re <= -4.3e-158) {
tmp = ((y_46_re * x_46_im) - (y_46_im * x_46_re)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im));
} else if (y_46_re <= 4.2e-19) {
tmp = (-1.0 / y_46_im) * (x_46_re - (x_46_im / (y_46_im / y_46_re)));
} else {
tmp = t_0 * (x_46_im - (y_46_im / (Math.hypot(y_46_re, y_46_im) / x_46_re)));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = 1.0 / math.hypot(y_46_re, y_46_im) tmp = 0 if y_46_re <= -4.4e+101: tmp = t_0 * (((y_46_im * x_46_re) / y_46_re) - x_46_im) elif y_46_re <= -4.3e-158: tmp = ((y_46_re * x_46_im) - (y_46_im * x_46_re)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im)) elif y_46_re <= 4.2e-19: tmp = (-1.0 / y_46_im) * (x_46_re - (x_46_im / (y_46_im / y_46_re))) else: tmp = t_0 * (x_46_im - (y_46_im / (math.hypot(y_46_re, y_46_im) / x_46_re))) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(1.0 / hypot(y_46_re, y_46_im)) tmp = 0.0 if (y_46_re <= -4.4e+101) tmp = Float64(t_0 * Float64(Float64(Float64(y_46_im * x_46_re) / y_46_re) - x_46_im)); elseif (y_46_re <= -4.3e-158) tmp = Float64(Float64(Float64(y_46_re * x_46_im) - Float64(y_46_im * x_46_re)) / Float64(Float64(y_46_re * y_46_re) + Float64(y_46_im * y_46_im))); elseif (y_46_re <= 4.2e-19) tmp = Float64(Float64(-1.0 / y_46_im) * Float64(x_46_re - Float64(x_46_im / Float64(y_46_im / y_46_re)))); else tmp = Float64(t_0 * Float64(x_46_im - Float64(y_46_im / Float64(hypot(y_46_re, y_46_im) / x_46_re)))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = 1.0 / hypot(y_46_re, y_46_im); tmp = 0.0; if (y_46_re <= -4.4e+101) tmp = t_0 * (((y_46_im * x_46_re) / y_46_re) - x_46_im); elseif (y_46_re <= -4.3e-158) tmp = ((y_46_re * x_46_im) - (y_46_im * x_46_re)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im)); elseif (y_46_re <= 4.2e-19) tmp = (-1.0 / y_46_im) * (x_46_re - (x_46_im / (y_46_im / y_46_re))); else tmp = t_0 * (x_46_im - (y_46_im / (hypot(y_46_re, y_46_im) / x_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[(1.0 / N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -4.4e+101], N[(t$95$0 * N[(N[(N[(y$46$im * x$46$re), $MachinePrecision] / y$46$re), $MachinePrecision] - x$46$im), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, -4.3e-158], N[(N[(N[(y$46$re * x$46$im), $MachinePrecision] - N[(y$46$im * x$46$re), $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$re, 4.2e-19], N[(N[(-1.0 / y$46$im), $MachinePrecision] * N[(x$46$re - N[(x$46$im / N[(y$46$im / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[(x$46$im - N[(y$46$im / N[(N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision] / x$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{1}{\mathsf{hypot}\left(y.re, y.im\right)}\\
\mathbf{if}\;y.re \leq -4.4 \cdot 10^{+101}:\\
\;\;\;\;t_0 \cdot \left(\frac{y.im \cdot x.re}{y.re} - x.im\right)\\
\mathbf{elif}\;y.re \leq -4.3 \cdot 10^{-158}:\\
\;\;\;\;\frac{y.re \cdot x.im - y.im \cdot x.re}{y.re \cdot y.re + y.im \cdot y.im}\\
\mathbf{elif}\;y.re \leq 4.2 \cdot 10^{-19}:\\
\;\;\;\;\frac{-1}{y.im} \cdot \left(x.re - \frac{x.im}{\frac{y.im}{y.re}}\right)\\
\mathbf{else}:\\
\;\;\;\;t_0 \cdot \left(x.im - \frac{y.im}{\frac{\mathsf{hypot}\left(y.re, y.im\right)}{x.re}}\right)\\
\end{array}
\end{array}
if y.re < -4.4000000000000001e101Initial program 48.8%
*-un-lft-identity48.8%
add-sqr-sqrt48.8%
times-frac48.9%
hypot-def48.9%
hypot-def61.5%
Applied egg-rr61.5%
Taylor expanded in y.re around -inf 86.6%
if -4.4000000000000001e101 < y.re < -4.29999999999999961e-158Initial program 81.5%
if -4.29999999999999961e-158 < y.re < 4.1999999999999998e-19Initial program 73.3%
*-un-lft-identity73.3%
add-sqr-sqrt73.3%
times-frac73.3%
hypot-def73.3%
hypot-def86.5%
Applied egg-rr86.5%
Taylor expanded in y.im around -inf 48.6%
mul-1-neg48.6%
unsub-neg48.6%
associate-/l*48.6%
Simplified48.6%
Taylor expanded in y.im around -inf 92.3%
if 4.1999999999999998e-19 < y.re Initial program 44.4%
*-un-lft-identity44.4%
add-sqr-sqrt44.4%
times-frac44.4%
hypot-def44.4%
hypot-def64.3%
Applied egg-rr64.3%
div-sub64.3%
sub-neg64.3%
*-commutative64.3%
*-commutative64.3%
Applied egg-rr64.3%
sub-neg64.3%
associate-/l*88.8%
associate-/l*98.3%
Simplified98.3%
Taylor expanded in y.re around inf 87.6%
Final simplification87.6%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (<= y.re -3.3e+102)
(- (/ x.im y.re) (/ (* (/ y.im (hypot y.re y.im)) x.re) (hypot y.re y.im)))
(if (<= y.re -1.8e-158)
(/ (- (* y.re x.im) (* y.im x.re)) (+ (* y.re y.re) (* y.im y.im)))
(if (<= y.re 3.6e-19)
(* (/ -1.0 y.im) (- x.re (/ x.im (/ y.im y.re))))
(*
(/ 1.0 (hypot y.re y.im))
(- x.im (/ y.im (/ (hypot y.re y.im) x.re))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_re <= -3.3e+102) {
tmp = (x_46_im / y_46_re) - (((y_46_im / hypot(y_46_re, y_46_im)) * x_46_re) / hypot(y_46_re, y_46_im));
} else if (y_46_re <= -1.8e-158) {
tmp = ((y_46_re * x_46_im) - (y_46_im * x_46_re)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im));
} else if (y_46_re <= 3.6e-19) {
tmp = (-1.0 / y_46_im) * (x_46_re - (x_46_im / (y_46_im / y_46_re)));
} else {
tmp = (1.0 / hypot(y_46_re, y_46_im)) * (x_46_im - (y_46_im / (hypot(y_46_re, y_46_im) / x_46_re)));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_re <= -3.3e+102) {
tmp = (x_46_im / y_46_re) - (((y_46_im / Math.hypot(y_46_re, y_46_im)) * x_46_re) / Math.hypot(y_46_re, y_46_im));
} else if (y_46_re <= -1.8e-158) {
tmp = ((y_46_re * x_46_im) - (y_46_im * x_46_re)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im));
} else if (y_46_re <= 3.6e-19) {
tmp = (-1.0 / y_46_im) * (x_46_re - (x_46_im / (y_46_im / y_46_re)));
} else {
tmp = (1.0 / Math.hypot(y_46_re, y_46_im)) * (x_46_im - (y_46_im / (Math.hypot(y_46_re, y_46_im) / x_46_re)));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if y_46_re <= -3.3e+102: tmp = (x_46_im / y_46_re) - (((y_46_im / math.hypot(y_46_re, y_46_im)) * x_46_re) / math.hypot(y_46_re, y_46_im)) elif y_46_re <= -1.8e-158: tmp = ((y_46_re * x_46_im) - (y_46_im * x_46_re)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im)) elif y_46_re <= 3.6e-19: tmp = (-1.0 / y_46_im) * (x_46_re - (x_46_im / (y_46_im / y_46_re))) else: tmp = (1.0 / math.hypot(y_46_re, y_46_im)) * (x_46_im - (y_46_im / (math.hypot(y_46_re, y_46_im) / x_46_re))) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if (y_46_re <= -3.3e+102) tmp = Float64(Float64(x_46_im / y_46_re) - Float64(Float64(Float64(y_46_im / hypot(y_46_re, y_46_im)) * x_46_re) / hypot(y_46_re, y_46_im))); elseif (y_46_re <= -1.8e-158) tmp = Float64(Float64(Float64(y_46_re * x_46_im) - Float64(y_46_im * x_46_re)) / Float64(Float64(y_46_re * y_46_re) + Float64(y_46_im * y_46_im))); elseif (y_46_re <= 3.6e-19) tmp = Float64(Float64(-1.0 / y_46_im) * Float64(x_46_re - Float64(x_46_im / Float64(y_46_im / y_46_re)))); else tmp = Float64(Float64(1.0 / hypot(y_46_re, y_46_im)) * Float64(x_46_im - Float64(y_46_im / Float64(hypot(y_46_re, y_46_im) / x_46_re)))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if (y_46_re <= -3.3e+102) tmp = (x_46_im / y_46_re) - (((y_46_im / hypot(y_46_re, y_46_im)) * x_46_re) / hypot(y_46_re, y_46_im)); elseif (y_46_re <= -1.8e-158) tmp = ((y_46_re * x_46_im) - (y_46_im * x_46_re)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im)); elseif (y_46_re <= 3.6e-19) tmp = (-1.0 / y_46_im) * (x_46_re - (x_46_im / (y_46_im / y_46_re))); else tmp = (1.0 / hypot(y_46_re, y_46_im)) * (x_46_im - (y_46_im / (hypot(y_46_re, y_46_im) / x_46_re))); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[y$46$re, -3.3e+102], N[(N[(x$46$im / y$46$re), $MachinePrecision] - N[(N[(N[(y$46$im / N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision]), $MachinePrecision] * x$46$re), $MachinePrecision] / N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, -1.8e-158], N[(N[(N[(y$46$re * x$46$im), $MachinePrecision] - N[(y$46$im * x$46$re), $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$re, 3.6e-19], N[(N[(-1.0 / y$46$im), $MachinePrecision] * N[(x$46$re - N[(x$46$im / N[(y$46$im / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision]), $MachinePrecision] * N[(x$46$im - N[(y$46$im / N[(N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision] / x$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq -3.3 \cdot 10^{+102}:\\
\;\;\;\;\frac{x.im}{y.re} - \frac{\frac{y.im}{\mathsf{hypot}\left(y.re, y.im\right)} \cdot x.re}{\mathsf{hypot}\left(y.re, y.im\right)}\\
\mathbf{elif}\;y.re \leq -1.8 \cdot 10^{-158}:\\
\;\;\;\;\frac{y.re \cdot x.im - y.im \cdot x.re}{y.re \cdot y.re + y.im \cdot y.im}\\
\mathbf{elif}\;y.re \leq 3.6 \cdot 10^{-19}:\\
\;\;\;\;\frac{-1}{y.im} \cdot \left(x.re - \frac{x.im}{\frac{y.im}{y.re}}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\mathsf{hypot}\left(y.re, y.im\right)} \cdot \left(x.im - \frac{y.im}{\frac{\mathsf{hypot}\left(y.re, y.im\right)}{x.re}}\right)\\
\end{array}
\end{array}
if y.re < -3.29999999999999999e102Initial program 48.8%
*-un-lft-identity48.8%
add-sqr-sqrt48.8%
times-frac48.9%
hypot-def48.9%
hypot-def61.5%
Applied egg-rr61.5%
div-sub61.5%
sub-neg61.5%
*-commutative61.5%
*-commutative61.5%
Applied egg-rr61.5%
sub-neg61.5%
associate-/l*97.7%
associate-/l*99.7%
Simplified99.7%
associate-*l/99.9%
*-un-lft-identity99.9%
div-sub99.9%
associate-/r/100.0%
associate-/r/98.6%
Applied egg-rr98.6%
Taylor expanded in y.re around inf 92.7%
if -3.29999999999999999e102 < y.re < -1.79999999999999995e-158Initial program 81.5%
if -1.79999999999999995e-158 < y.re < 3.6000000000000001e-19Initial program 73.3%
*-un-lft-identity73.3%
add-sqr-sqrt73.3%
times-frac73.3%
hypot-def73.3%
hypot-def86.5%
Applied egg-rr86.5%
Taylor expanded in y.im around -inf 48.6%
mul-1-neg48.6%
unsub-neg48.6%
associate-/l*48.6%
Simplified48.6%
Taylor expanded in y.im around -inf 92.3%
if 3.6000000000000001e-19 < y.re Initial program 44.4%
*-un-lft-identity44.4%
add-sqr-sqrt44.4%
times-frac44.4%
hypot-def44.4%
hypot-def64.3%
Applied egg-rr64.3%
div-sub64.3%
sub-neg64.3%
*-commutative64.3%
*-commutative64.3%
Applied egg-rr64.3%
sub-neg64.3%
associate-/l*88.8%
associate-/l*98.3%
Simplified98.3%
Taylor expanded in y.re around inf 87.6%
Final simplification88.8%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (<= y.re -2.6e+102)
(* (- (/ (* y.im x.re) y.re) x.im) (/ -1.0 y.re))
(if (<= y.re -9.8e-158)
(/ (- (* y.re x.im) (* y.im x.re)) (+ (* y.re y.re) (* y.im y.im)))
(if (<= y.re 2.6e-18)
(* (/ -1.0 y.im) (- x.re (/ x.im (/ y.im y.re))))
(* (/ 1.0 (hypot y.re 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 (y_46_re <= -2.6e+102) {
tmp = (((y_46_im * x_46_re) / y_46_re) - x_46_im) * (-1.0 / y_46_re);
} else if (y_46_re <= -9.8e-158) {
tmp = ((y_46_re * x_46_im) - (y_46_im * x_46_re)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im));
} else if (y_46_re <= 2.6e-18) {
tmp = (-1.0 / y_46_im) * (x_46_re - (x_46_im / (y_46_im / y_46_re)));
} else {
tmp = (1.0 / hypot(y_46_re, 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 tmp;
if (y_46_re <= -2.6e+102) {
tmp = (((y_46_im * x_46_re) / y_46_re) - x_46_im) * (-1.0 / y_46_re);
} else if (y_46_re <= -9.8e-158) {
tmp = ((y_46_re * x_46_im) - (y_46_im * x_46_re)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im));
} else if (y_46_re <= 2.6e-18) {
tmp = (-1.0 / y_46_im) * (x_46_re - (x_46_im / (y_46_im / y_46_re)));
} else {
tmp = (1.0 / Math.hypot(y_46_re, 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): tmp = 0 if y_46_re <= -2.6e+102: tmp = (((y_46_im * x_46_re) / y_46_re) - x_46_im) * (-1.0 / y_46_re) elif y_46_re <= -9.8e-158: tmp = ((y_46_re * x_46_im) - (y_46_im * x_46_re)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im)) elif y_46_re <= 2.6e-18: tmp = (-1.0 / y_46_im) * (x_46_re - (x_46_im / (y_46_im / y_46_re))) else: tmp = (1.0 / math.hypot(y_46_re, 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 (y_46_re <= -2.6e+102) tmp = Float64(Float64(Float64(Float64(y_46_im * x_46_re) / y_46_re) - x_46_im) * Float64(-1.0 / y_46_re)); elseif (y_46_re <= -9.8e-158) tmp = Float64(Float64(Float64(y_46_re * x_46_im) - Float64(y_46_im * x_46_re)) / Float64(Float64(y_46_re * y_46_re) + Float64(y_46_im * y_46_im))); elseif (y_46_re <= 2.6e-18) tmp = Float64(Float64(-1.0 / y_46_im) * Float64(x_46_re - Float64(x_46_im / Float64(y_46_im / y_46_re)))); else tmp = Float64(Float64(1.0 / hypot(y_46_re, 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) tmp = 0.0; if (y_46_re <= -2.6e+102) tmp = (((y_46_im * x_46_re) / y_46_re) - x_46_im) * (-1.0 / y_46_re); elseif (y_46_re <= -9.8e-158) tmp = ((y_46_re * x_46_im) - (y_46_im * x_46_re)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im)); elseif (y_46_re <= 2.6e-18) tmp = (-1.0 / y_46_im) * (x_46_re - (x_46_im / (y_46_im / y_46_re))); else tmp = (1.0 / hypot(y_46_re, 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_] := If[LessEqual[y$46$re, -2.6e+102], N[(N[(N[(N[(y$46$im * x$46$re), $MachinePrecision] / y$46$re), $MachinePrecision] - x$46$im), $MachinePrecision] * N[(-1.0 / y$46$re), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, -9.8e-158], N[(N[(N[(y$46$re * x$46$im), $MachinePrecision] - N[(y$46$im * x$46$re), $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$re, 2.6e-18], N[(N[(-1.0 / y$46$im), $MachinePrecision] * N[(x$46$re - N[(x$46$im / N[(y$46$im / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision]), $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}\;y.re \leq -2.6 \cdot 10^{+102}:\\
\;\;\;\;\left(\frac{y.im \cdot x.re}{y.re} - x.im\right) \cdot \frac{-1}{y.re}\\
\mathbf{elif}\;y.re \leq -9.8 \cdot 10^{-158}:\\
\;\;\;\;\frac{y.re \cdot x.im - y.im \cdot x.re}{y.re \cdot y.re + y.im \cdot y.im}\\
\mathbf{elif}\;y.re \leq 2.6 \cdot 10^{-18}:\\
\;\;\;\;\frac{-1}{y.im} \cdot \left(x.re - \frac{x.im}{\frac{y.im}{y.re}}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\mathsf{hypot}\left(y.re, y.im\right)} \cdot \left(x.im - x.re \cdot \frac{y.im}{y.re}\right)\\
\end{array}
\end{array}
if y.re < -2.60000000000000006e102Initial program 48.8%
*-un-lft-identity48.8%
add-sqr-sqrt48.8%
times-frac48.9%
hypot-def48.9%
hypot-def61.5%
Applied egg-rr61.5%
Taylor expanded in y.re around -inf 86.6%
Taylor expanded in y.re around -inf 85.9%
if -2.60000000000000006e102 < y.re < -9.79999999999999986e-158Initial program 81.5%
if -9.79999999999999986e-158 < y.re < 2.6e-18Initial program 73.3%
*-un-lft-identity73.3%
add-sqr-sqrt73.3%
times-frac73.3%
hypot-def73.3%
hypot-def86.5%
Applied egg-rr86.5%
Taylor expanded in y.im around -inf 48.6%
mul-1-neg48.6%
unsub-neg48.6%
associate-/l*48.6%
Simplified48.6%
Taylor expanded in y.im around -inf 92.3%
if 2.6e-18 < y.re Initial program 44.4%
*-un-lft-identity44.4%
add-sqr-sqrt44.4%
times-frac44.4%
hypot-def44.4%
hypot-def64.3%
Applied egg-rr64.3%
Taylor expanded in y.re around -inf 13.3%
div-inv13.3%
add-sqr-sqrt6.1%
sqrt-unprod13.5%
sqr-neg13.5%
sqrt-unprod16.6%
add-sqr-sqrt27.3%
distribute-lft-neg-in27.3%
cancel-sign-sub-inv27.3%
add-sqr-sqrt13.3%
sqrt-unprod47.4%
mul-1-neg47.4%
mul-1-neg47.4%
sqr-neg47.4%
sqrt-unprod49.2%
add-sqr-sqrt73.7%
*-commutative73.7%
associate-*l*78.2%
*-un-lft-identity78.2%
metadata-eval78.2%
associate-*r*78.2%
neg-mul-178.2%
div-inv78.3%
Applied egg-rr78.3%
*-commutative78.3%
associate-*l/73.7%
associate-*r/77.3%
Simplified77.3%
Final simplification85.0%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (/ 1.0 (hypot y.re y.im))))
(if (<= y.re -4.8e+101)
(* t_0 (- (/ (* y.im x.re) y.re) x.im))
(if (<= y.re -4.2e-159)
(/ (- (* y.re x.im) (* y.im x.re)) (+ (* y.re y.re) (* y.im y.im)))
(if (<= y.re 9e-18)
(* (/ -1.0 y.im) (- x.re (/ x.im (/ y.im y.re))))
(* t_0 (- 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 = 1.0 / hypot(y_46_re, y_46_im);
double tmp;
if (y_46_re <= -4.8e+101) {
tmp = t_0 * (((y_46_im * x_46_re) / y_46_re) - x_46_im);
} else if (y_46_re <= -4.2e-159) {
tmp = ((y_46_re * x_46_im) - (y_46_im * x_46_re)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im));
} else if (y_46_re <= 9e-18) {
tmp = (-1.0 / y_46_im) * (x_46_re - (x_46_im / (y_46_im / y_46_re)));
} else {
tmp = t_0 * (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 = 1.0 / Math.hypot(y_46_re, y_46_im);
double tmp;
if (y_46_re <= -4.8e+101) {
tmp = t_0 * (((y_46_im * x_46_re) / y_46_re) - x_46_im);
} else if (y_46_re <= -4.2e-159) {
tmp = ((y_46_re * x_46_im) - (y_46_im * x_46_re)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im));
} else if (y_46_re <= 9e-18) {
tmp = (-1.0 / y_46_im) * (x_46_re - (x_46_im / (y_46_im / y_46_re)));
} else {
tmp = t_0 * (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 = 1.0 / math.hypot(y_46_re, y_46_im) tmp = 0 if y_46_re <= -4.8e+101: tmp = t_0 * (((y_46_im * x_46_re) / y_46_re) - x_46_im) elif y_46_re <= -4.2e-159: tmp = ((y_46_re * x_46_im) - (y_46_im * x_46_re)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im)) elif y_46_re <= 9e-18: tmp = (-1.0 / y_46_im) * (x_46_re - (x_46_im / (y_46_im / y_46_re))) else: tmp = t_0 * (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(1.0 / hypot(y_46_re, y_46_im)) tmp = 0.0 if (y_46_re <= -4.8e+101) tmp = Float64(t_0 * Float64(Float64(Float64(y_46_im * x_46_re) / y_46_re) - x_46_im)); elseif (y_46_re <= -4.2e-159) tmp = Float64(Float64(Float64(y_46_re * x_46_im) - Float64(y_46_im * x_46_re)) / Float64(Float64(y_46_re * y_46_re) + Float64(y_46_im * y_46_im))); elseif (y_46_re <= 9e-18) tmp = Float64(Float64(-1.0 / y_46_im) * Float64(x_46_re - Float64(x_46_im / Float64(y_46_im / y_46_re)))); else tmp = Float64(t_0 * 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 = 1.0 / hypot(y_46_re, y_46_im); tmp = 0.0; if (y_46_re <= -4.8e+101) tmp = t_0 * (((y_46_im * x_46_re) / y_46_re) - x_46_im); elseif (y_46_re <= -4.2e-159) tmp = ((y_46_re * x_46_im) - (y_46_im * x_46_re)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im)); elseif (y_46_re <= 9e-18) tmp = (-1.0 / y_46_im) * (x_46_re - (x_46_im / (y_46_im / y_46_re))); else tmp = t_0 * (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[(1.0 / N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -4.8e+101], N[(t$95$0 * N[(N[(N[(y$46$im * x$46$re), $MachinePrecision] / y$46$re), $MachinePrecision] - x$46$im), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, -4.2e-159], N[(N[(N[(y$46$re * x$46$im), $MachinePrecision] - N[(y$46$im * x$46$re), $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$re, 9e-18], N[(N[(-1.0 / y$46$im), $MachinePrecision] * N[(x$46$re - N[(x$46$im / N[(y$46$im / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 * 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{1}{\mathsf{hypot}\left(y.re, y.im\right)}\\
\mathbf{if}\;y.re \leq -4.8 \cdot 10^{+101}:\\
\;\;\;\;t_0 \cdot \left(\frac{y.im \cdot x.re}{y.re} - x.im\right)\\
\mathbf{elif}\;y.re \leq -4.2 \cdot 10^{-159}:\\
\;\;\;\;\frac{y.re \cdot x.im - y.im \cdot x.re}{y.re \cdot y.re + y.im \cdot y.im}\\
\mathbf{elif}\;y.re \leq 9 \cdot 10^{-18}:\\
\;\;\;\;\frac{-1}{y.im} \cdot \left(x.re - \frac{x.im}{\frac{y.im}{y.re}}\right)\\
\mathbf{else}:\\
\;\;\;\;t_0 \cdot \left(x.im - x.re \cdot \frac{y.im}{y.re}\right)\\
\end{array}
\end{array}
if y.re < -4.79999999999999977e101Initial program 48.8%
*-un-lft-identity48.8%
add-sqr-sqrt48.8%
times-frac48.9%
hypot-def48.9%
hypot-def61.5%
Applied egg-rr61.5%
Taylor expanded in y.re around -inf 86.6%
if -4.79999999999999977e101 < y.re < -4.1999999999999998e-159Initial program 81.5%
if -4.1999999999999998e-159 < y.re < 8.99999999999999987e-18Initial program 73.3%
*-un-lft-identity73.3%
add-sqr-sqrt73.3%
times-frac73.3%
hypot-def73.3%
hypot-def86.5%
Applied egg-rr86.5%
Taylor expanded in y.im around -inf 48.6%
mul-1-neg48.6%
unsub-neg48.6%
associate-/l*48.6%
Simplified48.6%
Taylor expanded in y.im around -inf 92.3%
if 8.99999999999999987e-18 < y.re Initial program 44.4%
*-un-lft-identity44.4%
add-sqr-sqrt44.4%
times-frac44.4%
hypot-def44.4%
hypot-def64.3%
Applied egg-rr64.3%
Taylor expanded in y.re around -inf 13.3%
div-inv13.3%
add-sqr-sqrt6.1%
sqrt-unprod13.5%
sqr-neg13.5%
sqrt-unprod16.6%
add-sqr-sqrt27.3%
distribute-lft-neg-in27.3%
cancel-sign-sub-inv27.3%
add-sqr-sqrt13.3%
sqrt-unprod47.4%
mul-1-neg47.4%
mul-1-neg47.4%
sqr-neg47.4%
sqrt-unprod49.2%
add-sqr-sqrt73.7%
*-commutative73.7%
associate-*l*78.2%
*-un-lft-identity78.2%
metadata-eval78.2%
associate-*r*78.2%
neg-mul-178.2%
div-inv78.3%
Applied egg-rr78.3%
*-commutative78.3%
associate-*l/73.7%
associate-*r/77.3%
Simplified77.3%
Final simplification85.1%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0
(/ (- (* y.re x.im) (* y.im x.re)) (+ (* y.re y.re) (* y.im y.im))))
(t_1 (* (- (/ (* y.im x.re) y.re) x.im) (/ -1.0 y.re))))
(if (<= y.re -1.36e+103)
t_1
(if (<= y.re -2e-158)
t_0
(if (<= y.re 5.6e-144)
(* (/ -1.0 y.im) (- x.re (/ x.im (/ y.im y.re))))
(if (<= y.re 4e+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 = ((y_46_re * x_46_im) - (y_46_im * x_46_re)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im));
double t_1 = (((y_46_im * x_46_re) / y_46_re) - x_46_im) * (-1.0 / y_46_re);
double tmp;
if (y_46_re <= -1.36e+103) {
tmp = t_1;
} else if (y_46_re <= -2e-158) {
tmp = t_0;
} else if (y_46_re <= 5.6e-144) {
tmp = (-1.0 / y_46_im) * (x_46_re - (x_46_im / (y_46_im / y_46_re)));
} else if (y_46_re <= 4e+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 = ((y_46re * x_46im) - (y_46im * x_46re)) / ((y_46re * y_46re) + (y_46im * y_46im))
t_1 = (((y_46im * x_46re) / y_46re) - x_46im) * ((-1.0d0) / y_46re)
if (y_46re <= (-1.36d+103)) then
tmp = t_1
else if (y_46re <= (-2d-158)) then
tmp = t_0
else if (y_46re <= 5.6d-144) then
tmp = ((-1.0d0) / y_46im) * (x_46re - (x_46im / (y_46im / y_46re)))
else if (y_46re <= 4d+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 = ((y_46_re * x_46_im) - (y_46_im * x_46_re)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im));
double t_1 = (((y_46_im * x_46_re) / y_46_re) - x_46_im) * (-1.0 / y_46_re);
double tmp;
if (y_46_re <= -1.36e+103) {
tmp = t_1;
} else if (y_46_re <= -2e-158) {
tmp = t_0;
} else if (y_46_re <= 5.6e-144) {
tmp = (-1.0 / y_46_im) * (x_46_re - (x_46_im / (y_46_im / y_46_re)));
} else if (y_46_re <= 4e+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 = ((y_46_re * x_46_im) - (y_46_im * x_46_re)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im)) t_1 = (((y_46_im * x_46_re) / y_46_re) - x_46_im) * (-1.0 / y_46_re) tmp = 0 if y_46_re <= -1.36e+103: tmp = t_1 elif y_46_re <= -2e-158: tmp = t_0 elif y_46_re <= 5.6e-144: tmp = (-1.0 / y_46_im) * (x_46_re - (x_46_im / (y_46_im / y_46_re))) elif y_46_re <= 4e+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(y_46_re * x_46_im) - Float64(y_46_im * x_46_re)) / Float64(Float64(y_46_re * y_46_re) + Float64(y_46_im * y_46_im))) t_1 = Float64(Float64(Float64(Float64(y_46_im * x_46_re) / y_46_re) - x_46_im) * Float64(-1.0 / y_46_re)) tmp = 0.0 if (y_46_re <= -1.36e+103) tmp = t_1; elseif (y_46_re <= -2e-158) tmp = t_0; elseif (y_46_re <= 5.6e-144) tmp = Float64(Float64(-1.0 / y_46_im) * Float64(x_46_re - Float64(x_46_im / Float64(y_46_im / y_46_re)))); elseif (y_46_re <= 4e+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 = ((y_46_re * x_46_im) - (y_46_im * x_46_re)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im)); t_1 = (((y_46_im * x_46_re) / y_46_re) - x_46_im) * (-1.0 / y_46_re); tmp = 0.0; if (y_46_re <= -1.36e+103) tmp = t_1; elseif (y_46_re <= -2e-158) tmp = t_0; elseif (y_46_re <= 5.6e-144) tmp = (-1.0 / y_46_im) * (x_46_re - (x_46_im / (y_46_im / y_46_re))); elseif (y_46_re <= 4e+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[(y$46$re * x$46$im), $MachinePrecision] - N[(y$46$im * x$46$re), $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[(N[(N[(y$46$im * x$46$re), $MachinePrecision] / y$46$re), $MachinePrecision] - x$46$im), $MachinePrecision] * N[(-1.0 / y$46$re), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -1.36e+103], t$95$1, If[LessEqual[y$46$re, -2e-158], t$95$0, If[LessEqual[y$46$re, 5.6e-144], N[(N[(-1.0 / y$46$im), $MachinePrecision] * N[(x$46$re - N[(x$46$im / N[(y$46$im / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 4e+91], t$95$0, t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{y.re \cdot x.im - y.im \cdot x.re}{y.re \cdot y.re + y.im \cdot y.im}\\
t_1 := \left(\frac{y.im \cdot x.re}{y.re} - x.im\right) \cdot \frac{-1}{y.re}\\
\mathbf{if}\;y.re \leq -1.36 \cdot 10^{+103}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y.re \leq -2 \cdot 10^{-158}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y.re \leq 5.6 \cdot 10^{-144}:\\
\;\;\;\;\frac{-1}{y.im} \cdot \left(x.re - \frac{x.im}{\frac{y.im}{y.re}}\right)\\
\mathbf{elif}\;y.re \leq 4 \cdot 10^{+91}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y.re < -1.36e103 or 4.00000000000000032e91 < y.re Initial program 39.1%
*-un-lft-identity39.1%
add-sqr-sqrt39.1%
times-frac39.1%
hypot-def39.1%
hypot-def56.3%
Applied egg-rr56.3%
Taylor expanded in y.re around -inf 56.8%
Taylor expanded in y.re around -inf 84.9%
if -1.36e103 < y.re < -2.00000000000000013e-158 or 5.59999999999999995e-144 < y.re < 4.00000000000000032e91Initial program 80.4%
if -2.00000000000000013e-158 < y.re < 5.59999999999999995e-144Initial program 69.1%
*-un-lft-identity69.1%
add-sqr-sqrt69.1%
times-frac69.2%
hypot-def69.2%
hypot-def82.3%
Applied egg-rr82.3%
Taylor expanded in y.im around -inf 47.1%
mul-1-neg47.1%
unsub-neg47.1%
associate-/l*47.1%
Simplified47.1%
Taylor expanded in y.im around -inf 94.3%
Final simplification85.6%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* (/ -1.0 y.im) (- x.re (/ x.im (/ y.im y.re)))))
(t_1 (/ (* y.re x.im) (+ (* y.re y.re) (* y.im y.im)))))
(if (<= y.re -4.9e+101)
(/ x.im y.re)
(if (<= y.re -5.4e-52)
t_1
(if (<= y.re 2.3e-31)
t_0
(if (<= y.re 1.95e+28)
t_1
(if (<= y.re 8e+93) t_0 (/ x.im y.re))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = (-1.0 / y_46_im) * (x_46_re - (x_46_im / (y_46_im / y_46_re)));
double t_1 = (y_46_re * x_46_im) / ((y_46_re * y_46_re) + (y_46_im * y_46_im));
double tmp;
if (y_46_re <= -4.9e+101) {
tmp = x_46_im / y_46_re;
} else if (y_46_re <= -5.4e-52) {
tmp = t_1;
} else if (y_46_re <= 2.3e-31) {
tmp = t_0;
} else if (y_46_re <= 1.95e+28) {
tmp = t_1;
} else if (y_46_re <= 8e+93) {
tmp = t_0;
} else {
tmp = x_46_im / y_46_re;
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = ((-1.0d0) / y_46im) * (x_46re - (x_46im / (y_46im / y_46re)))
t_1 = (y_46re * x_46im) / ((y_46re * y_46re) + (y_46im * y_46im))
if (y_46re <= (-4.9d+101)) then
tmp = x_46im / y_46re
else if (y_46re <= (-5.4d-52)) then
tmp = t_1
else if (y_46re <= 2.3d-31) then
tmp = t_0
else if (y_46re <= 1.95d+28) then
tmp = t_1
else if (y_46re <= 8d+93) then
tmp = t_0
else
tmp = x_46im / y_46re
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = (-1.0 / y_46_im) * (x_46_re - (x_46_im / (y_46_im / y_46_re)));
double t_1 = (y_46_re * x_46_im) / ((y_46_re * y_46_re) + (y_46_im * y_46_im));
double tmp;
if (y_46_re <= -4.9e+101) {
tmp = x_46_im / y_46_re;
} else if (y_46_re <= -5.4e-52) {
tmp = t_1;
} else if (y_46_re <= 2.3e-31) {
tmp = t_0;
} else if (y_46_re <= 1.95e+28) {
tmp = t_1;
} else if (y_46_re <= 8e+93) {
tmp = t_0;
} else {
tmp = x_46_im / y_46_re;
}
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_re - (x_46_im / (y_46_im / y_46_re))) t_1 = (y_46_re * x_46_im) / ((y_46_re * y_46_re) + (y_46_im * y_46_im)) tmp = 0 if y_46_re <= -4.9e+101: tmp = x_46_im / y_46_re elif y_46_re <= -5.4e-52: tmp = t_1 elif y_46_re <= 2.3e-31: tmp = t_0 elif y_46_re <= 1.95e+28: tmp = t_1 elif y_46_re <= 8e+93: tmp = t_0 else: tmp = x_46_im / y_46_re return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(Float64(-1.0 / y_46_im) * Float64(x_46_re - Float64(x_46_im / Float64(y_46_im / y_46_re)))) t_1 = Float64(Float64(y_46_re * x_46_im) / Float64(Float64(y_46_re * y_46_re) + Float64(y_46_im * y_46_im))) tmp = 0.0 if (y_46_re <= -4.9e+101) tmp = Float64(x_46_im / y_46_re); elseif (y_46_re <= -5.4e-52) tmp = t_1; elseif (y_46_re <= 2.3e-31) tmp = t_0; elseif (y_46_re <= 1.95e+28) tmp = t_1; elseif (y_46_re <= 8e+93) tmp = t_0; else tmp = Float64(x_46_im / y_46_re); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = (-1.0 / y_46_im) * (x_46_re - (x_46_im / (y_46_im / y_46_re))); t_1 = (y_46_re * x_46_im) / ((y_46_re * y_46_re) + (y_46_im * y_46_im)); tmp = 0.0; if (y_46_re <= -4.9e+101) tmp = x_46_im / y_46_re; elseif (y_46_re <= -5.4e-52) tmp = t_1; elseif (y_46_re <= 2.3e-31) tmp = t_0; elseif (y_46_re <= 1.95e+28) tmp = t_1; elseif (y_46_re <= 8e+93) tmp = t_0; else tmp = x_46_im / y_46_re; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[(-1.0 / y$46$im), $MachinePrecision] * N[(x$46$re - N[(x$46$im / N[(y$46$im / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(y$46$re * x$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$re, -4.9e+101], N[(x$46$im / y$46$re), $MachinePrecision], If[LessEqual[y$46$re, -5.4e-52], t$95$1, If[LessEqual[y$46$re, 2.3e-31], t$95$0, If[LessEqual[y$46$re, 1.95e+28], t$95$1, If[LessEqual[y$46$re, 8e+93], t$95$0, N[(x$46$im / y$46$re), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-1}{y.im} \cdot \left(x.re - \frac{x.im}{\frac{y.im}{y.re}}\right)\\
t_1 := \frac{y.re \cdot x.im}{y.re \cdot y.re + y.im \cdot y.im}\\
\mathbf{if}\;y.re \leq -4.9 \cdot 10^{+101}:\\
\;\;\;\;\frac{x.im}{y.re}\\
\mathbf{elif}\;y.re \leq -5.4 \cdot 10^{-52}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y.re \leq 2.3 \cdot 10^{-31}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y.re \leq 1.95 \cdot 10^{+28}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y.re \leq 8 \cdot 10^{+93}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{x.im}{y.re}\\
\end{array}
\end{array}
if y.re < -4.89999999999999983e101 or 8.00000000000000035e93 < y.re Initial program 39.1%
Taylor expanded in y.re around inf 78.6%
if -4.89999999999999983e101 < y.re < -5.40000000000000019e-52 or 2.2999999999999998e-31 < y.re < 1.9499999999999999e28Initial program 85.2%
Taylor expanded in x.im around inf 67.5%
*-commutative67.5%
Simplified67.5%
if -5.40000000000000019e-52 < y.re < 2.2999999999999998e-31 or 1.9499999999999999e28 < y.re < 8.00000000000000035e93Initial program 72.5%
*-un-lft-identity72.5%
add-sqr-sqrt72.5%
times-frac72.5%
hypot-def72.5%
hypot-def85.5%
Applied egg-rr85.5%
Taylor expanded in y.im around -inf 44.6%
mul-1-neg44.6%
unsub-neg44.6%
associate-/l*44.6%
Simplified44.6%
Taylor expanded in y.im around -inf 82.5%
Final simplification78.4%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (or (<= y.re -5e+40) (not (<= y.re 2.25e+88))) (/ x.im y.re) (* (/ -1.0 y.im) (- x.re (/ x.im (/ 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 ((y_46_re <= -5e+40) || !(y_46_re <= 2.25e+88)) {
tmp = x_46_im / y_46_re;
} else {
tmp = (-1.0 / y_46_im) * (x_46_re - (x_46_im / (y_46_im / y_46_re)));
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: tmp
if ((y_46re <= (-5d+40)) .or. (.not. (y_46re <= 2.25d+88))) then
tmp = x_46im / y_46re
else
tmp = ((-1.0d0) / y_46im) * (x_46re - (x_46im / (y_46im / y_46re)))
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_re <= -5e+40) || !(y_46_re <= 2.25e+88)) {
tmp = x_46_im / y_46_re;
} else {
tmp = (-1.0 / y_46_im) * (x_46_re - (x_46_im / (y_46_im / y_46_re)));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if (y_46_re <= -5e+40) or not (y_46_re <= 2.25e+88): tmp = x_46_im / y_46_re else: tmp = (-1.0 / y_46_im) * (x_46_re - (x_46_im / (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 ((y_46_re <= -5e+40) || !(y_46_re <= 2.25e+88)) tmp = Float64(x_46_im / y_46_re); else tmp = Float64(Float64(-1.0 / y_46_im) * Float64(x_46_re - Float64(x_46_im / 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) tmp = 0.0; if ((y_46_re <= -5e+40) || ~((y_46_re <= 2.25e+88))) tmp = x_46_im / y_46_re; else tmp = (-1.0 / y_46_im) * (x_46_re - (x_46_im / (y_46_im / 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$re, -5e+40], N[Not[LessEqual[y$46$re, 2.25e+88]], $MachinePrecision]], N[(x$46$im / y$46$re), $MachinePrecision], N[(N[(-1.0 / y$46$im), $MachinePrecision] * N[(x$46$re - N[(x$46$im / N[(y$46$im / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq -5 \cdot 10^{+40} \lor \neg \left(y.re \leq 2.25 \cdot 10^{+88}\right):\\
\;\;\;\;\frac{x.im}{y.re}\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{y.im} \cdot \left(x.re - \frac{x.im}{\frac{y.im}{y.re}}\right)\\
\end{array}
\end{array}
if y.re < -5.00000000000000003e40 or 2.25e88 < y.re Initial program 43.8%
Taylor expanded in y.re around inf 75.2%
if -5.00000000000000003e40 < y.re < 2.25e88Initial program 75.6%
*-un-lft-identity75.6%
add-sqr-sqrt75.6%
times-frac75.6%
hypot-def75.6%
hypot-def86.2%
Applied egg-rr86.2%
Taylor expanded in y.im around -inf 40.7%
mul-1-neg40.7%
unsub-neg40.7%
associate-/l*41.3%
Simplified41.3%
Taylor expanded in y.im around -inf 74.5%
Final simplification74.8%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (or (<= y.re -1.46e-87) (not (<= y.re 2.8e-18))) (* (- (/ (* y.im x.re) y.re) x.im) (/ -1.0 y.re)) (* (/ -1.0 y.im) (- x.re (/ x.im (/ 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 ((y_46_re <= -1.46e-87) || !(y_46_re <= 2.8e-18)) {
tmp = (((y_46_im * x_46_re) / y_46_re) - x_46_im) * (-1.0 / y_46_re);
} else {
tmp = (-1.0 / y_46_im) * (x_46_re - (x_46_im / (y_46_im / y_46_re)));
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: tmp
if ((y_46re <= (-1.46d-87)) .or. (.not. (y_46re <= 2.8d-18))) then
tmp = (((y_46im * x_46re) / y_46re) - x_46im) * ((-1.0d0) / y_46re)
else
tmp = ((-1.0d0) / y_46im) * (x_46re - (x_46im / (y_46im / y_46re)))
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_re <= -1.46e-87) || !(y_46_re <= 2.8e-18)) {
tmp = (((y_46_im * x_46_re) / y_46_re) - x_46_im) * (-1.0 / y_46_re);
} else {
tmp = (-1.0 / y_46_im) * (x_46_re - (x_46_im / (y_46_im / y_46_re)));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if (y_46_re <= -1.46e-87) or not (y_46_re <= 2.8e-18): tmp = (((y_46_im * x_46_re) / y_46_re) - x_46_im) * (-1.0 / y_46_re) else: tmp = (-1.0 / y_46_im) * (x_46_re - (x_46_im / (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 ((y_46_re <= -1.46e-87) || !(y_46_re <= 2.8e-18)) tmp = Float64(Float64(Float64(Float64(y_46_im * x_46_re) / y_46_re) - x_46_im) * Float64(-1.0 / y_46_re)); else tmp = Float64(Float64(-1.0 / y_46_im) * Float64(x_46_re - Float64(x_46_im / 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) tmp = 0.0; if ((y_46_re <= -1.46e-87) || ~((y_46_re <= 2.8e-18))) tmp = (((y_46_im * x_46_re) / y_46_re) - x_46_im) * (-1.0 / y_46_re); else tmp = (-1.0 / y_46_im) * (x_46_re - (x_46_im / (y_46_im / 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$re, -1.46e-87], N[Not[LessEqual[y$46$re, 2.8e-18]], $MachinePrecision]], N[(N[(N[(N[(y$46$im * x$46$re), $MachinePrecision] / y$46$re), $MachinePrecision] - x$46$im), $MachinePrecision] * N[(-1.0 / y$46$re), $MachinePrecision]), $MachinePrecision], N[(N[(-1.0 / y$46$im), $MachinePrecision] * N[(x$46$re - N[(x$46$im / N[(y$46$im / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq -1.46 \cdot 10^{-87} \lor \neg \left(y.re \leq 2.8 \cdot 10^{-18}\right):\\
\;\;\;\;\left(\frac{y.im \cdot x.re}{y.re} - x.im\right) \cdot \frac{-1}{y.re}\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{y.im} \cdot \left(x.re - \frac{x.im}{\frac{y.im}{y.re}}\right)\\
\end{array}
\end{array}
if y.re < -1.4599999999999999e-87 or 2.80000000000000012e-18 < y.re Initial program 55.5%
*-un-lft-identity55.5%
add-sqr-sqrt55.5%
times-frac55.4%
hypot-def55.4%
hypot-def67.8%
Applied egg-rr67.8%
Taylor expanded in y.re around -inf 49.3%
Taylor expanded in y.re around -inf 73.6%
if -1.4599999999999999e-87 < y.re < 2.80000000000000012e-18Initial program 75.1%
*-un-lft-identity75.1%
add-sqr-sqrt75.1%
times-frac75.2%
hypot-def75.2%
hypot-def87.7%
Applied egg-rr87.7%
Taylor expanded in y.im around -inf 47.1%
mul-1-neg47.1%
unsub-neg47.1%
associate-/l*47.2%
Simplified47.2%
Taylor expanded in y.im around -inf 88.6%
Final simplification79.7%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (or (<= y.re -5.2e+32) (not (<= y.re 2.9e-22))) (/ x.im y.re) (/ (- 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_re <= -5.2e+32) || !(y_46_re <= 2.9e-22)) {
tmp = x_46_im / y_46_re;
} else {
tmp = -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_46re <= (-5.2d+32)) .or. (.not. (y_46re <= 2.9d-22))) then
tmp = x_46im / y_46re
else
tmp = -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_re <= -5.2e+32) || !(y_46_re <= 2.9e-22)) {
tmp = x_46_im / y_46_re;
} else {
tmp = -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_re <= -5.2e+32) or not (y_46_re <= 2.9e-22): tmp = x_46_im / y_46_re else: tmp = -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_re <= -5.2e+32) || !(y_46_re <= 2.9e-22)) tmp = Float64(x_46_im / y_46_re); else tmp = Float64(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_re <= -5.2e+32) || ~((y_46_re <= 2.9e-22))) tmp = x_46_im / y_46_re; else tmp = -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[Or[LessEqual[y$46$re, -5.2e+32], N[Not[LessEqual[y$46$re, 2.9e-22]], $MachinePrecision]], N[(x$46$im / y$46$re), $MachinePrecision], N[((-x$46$re) / y$46$im), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq -5.2 \cdot 10^{+32} \lor \neg \left(y.re \leq 2.9 \cdot 10^{-22}\right):\\
\;\;\;\;\frac{x.im}{y.re}\\
\mathbf{else}:\\
\;\;\;\;\frac{-x.re}{y.im}\\
\end{array}
\end{array}
if y.re < -5.2000000000000004e32 or 2.9000000000000002e-22 < y.re Initial program 51.4%
Taylor expanded in y.re around inf 65.6%
if -5.2000000000000004e32 < y.re < 2.9000000000000002e-22Initial program 75.7%
Taylor expanded in y.re around 0 66.6%
associate-*r/66.6%
neg-mul-166.6%
Simplified66.6%
Final simplification66.1%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (or (<= y.im -3.1e+150) (not (<= y.im 3.5e+77))) (/ x.re y.im) (/ x.im y.re)))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_im <= -3.1e+150) || !(y_46_im <= 3.5e+77)) {
tmp = x_46_re / y_46_im;
} else {
tmp = x_46_im / y_46_re;
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: tmp
if ((y_46im <= (-3.1d+150)) .or. (.not. (y_46im <= 3.5d+77))) then
tmp = x_46re / y_46im
else
tmp = x_46im / y_46re
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_im <= -3.1e+150) || !(y_46_im <= 3.5e+77)) {
tmp = x_46_re / y_46_im;
} else {
tmp = x_46_im / y_46_re;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if (y_46_im <= -3.1e+150) or not (y_46_im <= 3.5e+77): tmp = x_46_re / y_46_im else: tmp = x_46_im / y_46_re return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if ((y_46_im <= -3.1e+150) || !(y_46_im <= 3.5e+77)) tmp = Float64(x_46_re / y_46_im); else tmp = Float64(x_46_im / y_46_re); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if ((y_46_im <= -3.1e+150) || ~((y_46_im <= 3.5e+77))) tmp = x_46_re / y_46_im; else tmp = x_46_im / y_46_re; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[Or[LessEqual[y$46$im, -3.1e+150], N[Not[LessEqual[y$46$im, 3.5e+77]], $MachinePrecision]], N[(x$46$re / y$46$im), $MachinePrecision], N[(x$46$im / y$46$re), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.im \leq -3.1 \cdot 10^{+150} \lor \neg \left(y.im \leq 3.5 \cdot 10^{+77}\right):\\
\;\;\;\;\frac{x.re}{y.im}\\
\mathbf{else}:\\
\;\;\;\;\frac{x.im}{y.re}\\
\end{array}
\end{array}
if y.im < -3.10000000000000014e150 or 3.5000000000000001e77 < y.im Initial program 44.5%
*-un-lft-identity44.5%
add-sqr-sqrt44.5%
times-frac44.5%
hypot-def44.5%
hypot-def67.9%
Applied egg-rr67.9%
Taylor expanded in y.re around 0 55.5%
mul-1-neg55.5%
Simplified55.5%
Taylor expanded in y.im around -inf 35.3%
if -3.10000000000000014e150 < y.im < 3.5000000000000001e77Initial program 71.5%
Taylor expanded in y.re around inf 55.7%
Final simplification49.6%
(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 63.5%
*-un-lft-identity63.5%
add-sqr-sqrt63.5%
times-frac63.5%
hypot-def63.5%
hypot-def75.9%
Applied egg-rr75.9%
Taylor expanded in y.im around -inf 30.7%
mul-1-neg30.7%
unsub-neg30.7%
associate-/l*31.4%
Simplified31.4%
Taylor expanded in y.re around -inf 9.3%
Final simplification9.3%
(FPCore (x.re x.im y.re y.im) :precision binary64 (/ x.im y.re))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return x_46_im / y_46_re;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
code = x_46im / y_46re
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_re;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): return x_46_im / y_46_re
function code(x_46_re, x_46_im, y_46_re, y_46_im) return Float64(x_46_im / y_46_re) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = x_46_im / y_46_re; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[(x$46$im / y$46$re), $MachinePrecision]
\begin{array}{l}
\\
\frac{x.im}{y.re}
\end{array}
Initial program 63.5%
Taylor expanded in y.re around inf 43.3%
Final simplification43.3%
herbie shell --seed 2023332
(FPCore (x.re x.im y.re y.im)
:name "_divideComplex, imaginary part"
:precision binary64
(/ (- (* x.im y.re) (* x.re y.im)) (+ (* y.re y.re) (* y.im y.im))))