
(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 16 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
(if (<= y.re -4.2e+239)
(* (/ 1.0 (hypot y.re y.im)) (- (* y.im (/ x.re y.re)) x.im))
(fma
(/ y.re (hypot y.re y.im))
(/ x.im (hypot y.re y.im))
(/ (- x.re) (fma 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) {
double tmp;
if (y_46_re <= -4.2e+239) {
tmp = (1.0 / hypot(y_46_re, y_46_im)) * ((y_46_im * (x_46_re / y_46_re)) - x_46_im);
} else {
tmp = fma((y_46_re / hypot(y_46_re, y_46_im)), (x_46_im / hypot(y_46_re, y_46_im)), (-x_46_re / fma(y_46_re, (y_46_re / y_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 <= -4.2e+239) tmp = Float64(Float64(1.0 / hypot(y_46_re, y_46_im)) * Float64(Float64(y_46_im * Float64(x_46_re / y_46_re)) - x_46_im)); else tmp = fma(Float64(y_46_re / hypot(y_46_re, y_46_im)), Float64(x_46_im / hypot(y_46_re, y_46_im)), Float64(Float64(-x_46_re) / fma(y_46_re, Float64(y_46_re / y_46_im), y_46_im))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[y$46$re, -4.2e+239], N[(N[(1.0 / N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision]), $MachinePrecision] * N[(N[(y$46$im * N[(x$46$re / y$46$re), $MachinePrecision]), $MachinePrecision] - x$46$im), $MachinePrecision]), $MachinePrecision], N[(N[(y$46$re / N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision]), $MachinePrecision] * N[(x$46$im / N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision]), $MachinePrecision] + N[((-x$46$re) / N[(y$46$re * N[(y$46$re / y$46$im), $MachinePrecision] + y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq -4.2 \cdot 10^{+239}:\\
\;\;\;\;\frac{1}{\mathsf{hypot}\left(y.re, y.im\right)} \cdot \left(y.im \cdot \frac{x.re}{y.re} - x.im\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y.re}{\mathsf{hypot}\left(y.re, y.im\right)}, \frac{x.im}{\mathsf{hypot}\left(y.re, y.im\right)}, \frac{-x.re}{\mathsf{fma}\left(y.re, \frac{y.re}{y.im}, y.im\right)}\right)\\
\end{array}
\end{array}
if y.re < -4.1999999999999998e239Initial program 32.7%
*-un-lft-identity32.7%
add-sqr-sqrt32.7%
times-frac32.7%
hypot-def32.7%
hypot-def53.4%
Applied egg-rr53.4%
Taylor expanded in y.re around -inf 81.3%
neg-mul-181.3%
+-commutative81.3%
unsub-neg81.3%
*-lft-identity81.3%
times-frac99.8%
/-rgt-identity99.8%
Simplified99.8%
Taylor expanded in x.re around 0 81.3%
associate-/l*99.8%
associate-/r/100.0%
Simplified100.0%
if -4.1999999999999998e239 < y.re Initial program 57.7%
div-sub55.0%
sub-neg55.0%
*-commutative55.0%
add-sqr-sqrt55.0%
times-frac60.3%
fma-def60.3%
hypot-def60.3%
hypot-def75.4%
associate-/l*77.7%
add-sqr-sqrt77.7%
pow277.7%
hypot-def77.7%
Applied egg-rr77.7%
Taylor expanded in y.re around 0 93.2%
+-commutative93.2%
unpow293.2%
associate-*r/97.1%
fma-def97.1%
Simplified97.1%
Final simplification97.4%
(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 5e+237)))
(fma
(/ y.re (hypot y.re y.im))
(/ x.im (hypot y.re y.im))
(/ (- x.re) y.im))
(/ (/ t_0 (hypot y.re y.im)) (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 <= 5e+237)) {
tmp = fma((y_46_re / hypot(y_46_re, y_46_im)), (x_46_im / hypot(y_46_re, y_46_im)), (-x_46_re / y_46_im));
} else {
tmp = (t_0 / hypot(y_46_re, y_46_im)) / 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 <= 5e+237)) tmp = fma(Float64(y_46_re / hypot(y_46_re, y_46_im)), Float64(x_46_im / hypot(y_46_re, y_46_im)), Float64(Float64(-x_46_re) / y_46_im)); else tmp = Float64(Float64(t_0 / hypot(y_46_re, y_46_im)) / hypot(y_46_re, y_46_im)); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[(y$46$re * 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, 5e+237]], $MachinePrecision]], N[(N[(y$46$re / N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision]), $MachinePrecision] * N[(x$46$im / N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision]), $MachinePrecision] + N[((-x$46$re) / y$46$im), $MachinePrecision]), $MachinePrecision], 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]]]]
\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 5 \cdot 10^{+237}\right):\\
\;\;\;\;\mathsf{fma}\left(\frac{y.re}{\mathsf{hypot}\left(y.re, y.im\right)}, \frac{x.im}{\mathsf{hypot}\left(y.re, y.im\right)}, \frac{-x.re}{y.im}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{t_0}{\mathsf{hypot}\left(y.re, y.im\right)}}{\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 5.0000000000000002e237 < (/.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 19.1%
div-sub12.1%
sub-neg12.1%
*-commutative12.1%
add-sqr-sqrt12.1%
times-frac27.1%
fma-def27.1%
hypot-def27.1%
hypot-def54.4%
associate-/l*61.4%
add-sqr-sqrt61.4%
pow261.4%
hypot-def61.4%
Applied egg-rr61.4%
Taylor expanded in y.re around 0 70.9%
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))) < 5.0000000000000002e237Initial program 75.1%
*-un-lft-identity75.1%
add-sqr-sqrt75.1%
times-frac75.2%
hypot-def75.2%
hypot-def99.1%
Applied egg-rr99.1%
associate-*l/99.2%
*-un-lft-identity99.2%
*-commutative99.2%
*-commutative99.2%
Applied egg-rr99.2%
Final simplification89.3%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (- (* y.re x.im) (* y.im x.re))))
(if (<= (/ t_0 (+ (* y.re y.re) (* y.im y.im))) INFINITY)
(/ (/ t_0 (hypot y.re y.im)) (hypot y.re y.im))
(/ (- x.re) (fma 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) {
double t_0 = (y_46_re * x_46_im) - (y_46_im * x_46_re);
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 = -x_46_re / fma(y_46_re, (y_46_re / y_46_im), 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)) 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(-x_46_re) / fma(y_46_re, Float64(y_46_re / y_46_im), y_46_im)); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[(y$46$re * x$46$im), $MachinePrecision] - N[(y$46$im * x$46$re), $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[((-x$46$re) / N[(y$46$re * N[(y$46$re / y$46$im), $MachinePrecision] + y$46$im), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot x.im - y.im \cdot x.re\\
\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{-x.re}{\mathsf{fma}\left(y.re, \frac{y.re}{y.im}, 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.0Initial program 70.2%
*-un-lft-identity70.2%
add-sqr-sqrt70.2%
times-frac70.2%
hypot-def70.2%
hypot-def92.6%
Applied egg-rr92.6%
associate-*l/92.7%
*-un-lft-identity92.7%
*-commutative92.7%
*-commutative92.7%
Applied egg-rr92.7%
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))) Initial program 0.0%
div-sub0.0%
sub-neg0.0%
*-commutative0.0%
add-sqr-sqrt0.0%
times-frac1.6%
fma-def1.6%
hypot-def1.6%
hypot-def41.5%
associate-/l*47.7%
add-sqr-sqrt47.7%
pow247.7%
hypot-def47.7%
Applied egg-rr47.7%
Taylor expanded in y.re around 0 80.3%
+-commutative80.3%
unpow280.3%
associate-*r/91.2%
fma-def91.2%
Simplified91.2%
Taylor expanded in x.im around 0 36.8%
associate-*r/36.8%
neg-mul-136.8%
unpow236.8%
associate-*r/47.7%
+-commutative47.7%
fma-def47.7%
Simplified47.7%
Final simplification83.4%
(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)))))
(if (<= y.re -1.8e+80)
(/ (- (* y.im (/ x.re y.re)) x.im) (hypot y.im y.re))
(if (<= y.re -1.15e-155)
t_0
(if (<= y.re 6.4e-218)
(/ (- x.re) y.im)
(if (<= y.re 4.1e+21)
t_0
(* (/ 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 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 tmp;
if (y_46_re <= -1.8e+80) {
tmp = ((y_46_im * (x_46_re / y_46_re)) - x_46_im) / hypot(y_46_im, y_46_re);
} else if (y_46_re <= -1.15e-155) {
tmp = t_0;
} else if (y_46_re <= 6.4e-218) {
tmp = -x_46_re / y_46_im;
} else if (y_46_re <= 4.1e+21) {
tmp = t_0;
} 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 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 tmp;
if (y_46_re <= -1.8e+80) {
tmp = ((y_46_im * (x_46_re / y_46_re)) - x_46_im) / Math.hypot(y_46_im, y_46_re);
} else if (y_46_re <= -1.15e-155) {
tmp = t_0;
} else if (y_46_re <= 6.4e-218) {
tmp = -x_46_re / y_46_im;
} else if (y_46_re <= 4.1e+21) {
tmp = t_0;
} 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): 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)) tmp = 0 if y_46_re <= -1.8e+80: tmp = ((y_46_im * (x_46_re / y_46_re)) - x_46_im) / math.hypot(y_46_im, y_46_re) elif y_46_re <= -1.15e-155: tmp = t_0 elif y_46_re <= 6.4e-218: tmp = -x_46_re / y_46_im elif y_46_re <= 4.1e+21: tmp = t_0 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) 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))) tmp = 0.0 if (y_46_re <= -1.8e+80) tmp = Float64(Float64(Float64(y_46_im * Float64(x_46_re / y_46_re)) - x_46_im) / hypot(y_46_im, y_46_re)); elseif (y_46_re <= -1.15e-155) tmp = t_0; elseif (y_46_re <= 6.4e-218) tmp = Float64(Float64(-x_46_re) / y_46_im); elseif (y_46_re <= 4.1e+21) tmp = t_0; 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) 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)); tmp = 0.0; if (y_46_re <= -1.8e+80) tmp = ((y_46_im * (x_46_re / y_46_re)) - x_46_im) / hypot(y_46_im, y_46_re); elseif (y_46_re <= -1.15e-155) tmp = t_0; elseif (y_46_re <= 6.4e-218) tmp = -x_46_re / y_46_im; elseif (y_46_re <= 4.1e+21) tmp = t_0; 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_] := 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]}, If[LessEqual[y$46$re, -1.8e+80], N[(N[(N[(y$46$im * N[(x$46$re / y$46$re), $MachinePrecision]), $MachinePrecision] - x$46$im), $MachinePrecision] / N[Sqrt[y$46$im ^ 2 + y$46$re ^ 2], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, -1.15e-155], t$95$0, If[LessEqual[y$46$re, 6.4e-218], N[((-x$46$re) / y$46$im), $MachinePrecision], If[LessEqual[y$46$re, 4.1e+21], t$95$0, 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}
t_0 := \frac{y.re \cdot x.im - y.im \cdot x.re}{y.re \cdot y.re + y.im \cdot y.im}\\
\mathbf{if}\;y.re \leq -1.8 \cdot 10^{+80}:\\
\;\;\;\;\frac{y.im \cdot \frac{x.re}{y.re} - x.im}{\mathsf{hypot}\left(y.im, y.re\right)}\\
\mathbf{elif}\;y.re \leq -1.15 \cdot 10^{-155}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y.re \leq 6.4 \cdot 10^{-218}:\\
\;\;\;\;\frac{-x.re}{y.im}\\
\mathbf{elif}\;y.re \leq 4.1 \cdot 10^{+21}:\\
\;\;\;\;t_0\\
\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 < -1.79999999999999997e80Initial program 32.6%
*-un-lft-identity32.6%
add-sqr-sqrt32.6%
times-frac32.7%
hypot-def32.7%
hypot-def58.9%
Applied egg-rr58.9%
Taylor expanded in y.re around -inf 77.9%
neg-mul-177.9%
+-commutative77.9%
unsub-neg77.9%
*-lft-identity77.9%
times-frac84.9%
/-rgt-identity84.9%
Simplified84.9%
sub-neg84.9%
distribute-lft-in84.9%
associate-*r/77.9%
Applied egg-rr77.9%
*-commutative77.9%
*-commutative77.9%
associate-*r/78.1%
*-rgt-identity78.1%
distribute-frac-neg78.1%
associate-*r/78.1%
*-rgt-identity78.1%
sub-neg78.1%
div-sub78.1%
associate-/l*85.1%
associate-/r/85.1%
hypot-def39.2%
unpow239.2%
unpow239.2%
+-commutative39.2%
unpow239.2%
unpow239.2%
hypot-def85.1%
Simplified85.1%
if -1.79999999999999997e80 < y.re < -1.15000000000000003e-155 or 6.4000000000000002e-218 < y.re < 4.1e21Initial program 80.6%
if -1.15000000000000003e-155 < y.re < 6.4000000000000002e-218Initial program 64.2%
Taylor expanded in y.re around 0 88.1%
associate-*r/88.1%
neg-mul-188.1%
Simplified88.1%
if 4.1e21 < y.re Initial program 28.6%
*-un-lft-identity28.6%
add-sqr-sqrt28.6%
times-frac28.6%
hypot-def28.6%
hypot-def52.5%
Applied egg-rr52.5%
Taylor expanded in y.re around inf 69.3%
mul-1-neg69.3%
unsub-neg69.3%
*-lft-identity69.3%
times-frac73.3%
/-rgt-identity73.3%
Simplified73.3%
Final simplification81.6%
(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)))))
(if (<= y.im -9.5e+63)
(/ (- x.re (* y.re (/ x.im y.im))) (hypot y.im y.re))
(if (<= y.im -5.1e-126)
t_0
(if (<= y.im 4e-104)
(- (/ x.im y.re) (/ x.re (* y.re (/ y.re y.im))))
(if (<= y.im 7.8e+139)
t_0
(* (/ 1.0 (hypot y.re y.im)) (- (/ x.im (/ y.im y.re)) x.re))))))))
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 tmp;
if (y_46_im <= -9.5e+63) {
tmp = (x_46_re - (y_46_re * (x_46_im / y_46_im))) / hypot(y_46_im, y_46_re);
} else if (y_46_im <= -5.1e-126) {
tmp = t_0;
} else if (y_46_im <= 4e-104) {
tmp = (x_46_im / y_46_re) - (x_46_re / (y_46_re * (y_46_re / y_46_im)));
} else if (y_46_im <= 7.8e+139) {
tmp = t_0;
} else {
tmp = (1.0 / hypot(y_46_re, y_46_im)) * ((x_46_im / (y_46_im / y_46_re)) - 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 = ((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 tmp;
if (y_46_im <= -9.5e+63) {
tmp = (x_46_re - (y_46_re * (x_46_im / y_46_im))) / Math.hypot(y_46_im, y_46_re);
} else if (y_46_im <= -5.1e-126) {
tmp = t_0;
} else if (y_46_im <= 4e-104) {
tmp = (x_46_im / y_46_re) - (x_46_re / (y_46_re * (y_46_re / y_46_im)));
} else if (y_46_im <= 7.8e+139) {
tmp = t_0;
} else {
tmp = (1.0 / Math.hypot(y_46_re, y_46_im)) * ((x_46_im / (y_46_im / y_46_re)) - x_46_re);
}
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)) tmp = 0 if y_46_im <= -9.5e+63: tmp = (x_46_re - (y_46_re * (x_46_im / y_46_im))) / math.hypot(y_46_im, y_46_re) elif y_46_im <= -5.1e-126: tmp = t_0 elif y_46_im <= 4e-104: tmp = (x_46_im / y_46_re) - (x_46_re / (y_46_re * (y_46_re / y_46_im))) elif y_46_im <= 7.8e+139: tmp = t_0 else: tmp = (1.0 / math.hypot(y_46_re, y_46_im)) * ((x_46_im / (y_46_im / y_46_re)) - x_46_re) 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))) tmp = 0.0 if (y_46_im <= -9.5e+63) tmp = Float64(Float64(x_46_re - Float64(y_46_re * Float64(x_46_im / y_46_im))) / hypot(y_46_im, y_46_re)); elseif (y_46_im <= -5.1e-126) tmp = t_0; elseif (y_46_im <= 4e-104) tmp = Float64(Float64(x_46_im / y_46_re) - Float64(x_46_re / Float64(y_46_re * Float64(y_46_re / y_46_im)))); elseif (y_46_im <= 7.8e+139) tmp = t_0; else tmp = Float64(Float64(1.0 / hypot(y_46_re, y_46_im)) * Float64(Float64(x_46_im / Float64(y_46_im / y_46_re)) - 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 = ((y_46_re * x_46_im) - (y_46_im * x_46_re)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im)); tmp = 0.0; if (y_46_im <= -9.5e+63) tmp = (x_46_re - (y_46_re * (x_46_im / y_46_im))) / hypot(y_46_im, y_46_re); elseif (y_46_im <= -5.1e-126) tmp = t_0; elseif (y_46_im <= 4e-104) tmp = (x_46_im / y_46_re) - (x_46_re / (y_46_re * (y_46_re / y_46_im))); elseif (y_46_im <= 7.8e+139) tmp = t_0; else tmp = (1.0 / hypot(y_46_re, y_46_im)) * ((x_46_im / (y_46_im / y_46_re)) - 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[(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$im, -9.5e+63], N[(N[(x$46$re - N[(y$46$re * N[(x$46$im / y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sqrt[y$46$im ^ 2 + y$46$re ^ 2], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, -5.1e-126], t$95$0, If[LessEqual[y$46$im, 4e-104], N[(N[(x$46$im / y$46$re), $MachinePrecision] - N[(x$46$re / N[(y$46$re * N[(y$46$re / y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 7.8e+139], t$95$0, N[(N[(1.0 / N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision]), $MachinePrecision] * N[(N[(x$46$im / N[(y$46$im / y$46$re), $MachinePrecision]), $MachinePrecision] - x$46$re), $MachinePrecision]), $MachinePrecision]]]]]]
\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}\\
\mathbf{if}\;y.im \leq -9.5 \cdot 10^{+63}:\\
\;\;\;\;\frac{x.re - y.re \cdot \frac{x.im}{y.im}}{\mathsf{hypot}\left(y.im, y.re\right)}\\
\mathbf{elif}\;y.im \leq -5.1 \cdot 10^{-126}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y.im \leq 4 \cdot 10^{-104}:\\
\;\;\;\;\frac{x.im}{y.re} - \frac{x.re}{y.re \cdot \frac{y.re}{y.im}}\\
\mathbf{elif}\;y.im \leq 7.8 \cdot 10^{+139}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\mathsf{hypot}\left(y.re, y.im\right)} \cdot \left(\frac{x.im}{\frac{y.im}{y.re}} - x.re\right)\\
\end{array}
\end{array}
if y.im < -9.5000000000000003e63Initial program 35.1%
*-un-lft-identity35.1%
add-sqr-sqrt35.1%
times-frac35.1%
hypot-def35.1%
hypot-def59.4%
Applied egg-rr59.4%
Taylor expanded in y.im around -inf 74.1%
mul-1-neg74.1%
unsub-neg74.1%
associate-/l*80.3%
Simplified80.3%
sub-neg80.3%
distribute-lft-in80.3%
associate-/r/80.3%
distribute-rgt-neg-in80.3%
Applied egg-rr80.3%
associate-*l/80.4%
*-lft-identity80.4%
associate-*l/80.4%
*-lft-identity80.4%
distribute-rgt-neg-out80.4%
associate-*l/74.3%
distribute-neg-frac74.3%
sub-neg74.3%
div-sub74.3%
associate-*l/80.4%
*-commutative80.4%
hypot-def40.4%
unpow240.4%
unpow240.4%
+-commutative40.4%
unpow240.4%
unpow240.4%
hypot-def80.4%
Simplified80.4%
if -9.5000000000000003e63 < y.im < -5.10000000000000002e-126 or 3.99999999999999971e-104 < y.im < 7.80000000000000012e139Initial program 77.1%
if -5.10000000000000002e-126 < y.im < 3.99999999999999971e-104Initial program 63.5%
Taylor expanded in y.re around inf 84.5%
+-commutative84.5%
mul-1-neg84.5%
unsub-neg84.5%
associate-/l*85.7%
Simplified85.7%
unpow285.7%
*-un-lft-identity85.7%
times-frac88.0%
Applied egg-rr88.0%
if 7.80000000000000012e139 < y.im Initial program 18.8%
*-un-lft-identity18.8%
add-sqr-sqrt18.8%
times-frac18.8%
hypot-def18.8%
hypot-def50.0%
Applied egg-rr50.0%
Taylor expanded in y.re around 0 68.0%
neg-mul-168.0%
+-commutative68.0%
unsub-neg68.0%
associate-/l*83.0%
Simplified83.0%
Final simplification82.4%
(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 (/ (- x.re) (fma y.re (/ y.re y.im) y.im))))
(if (<= y.im -8.6e+152)
t_1
(if (<= y.im -8e-125)
t_0
(if (<= y.im 6.2e-103)
(- (/ x.im y.re) (/ x.re (* y.re (/ y.re y.im))))
(if (<= y.im 2.65e+59) 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 = -x_46_re / fma(y_46_re, (y_46_re / y_46_im), y_46_im);
double tmp;
if (y_46_im <= -8.6e+152) {
tmp = t_1;
} else if (y_46_im <= -8e-125) {
tmp = t_0;
} else if (y_46_im <= 6.2e-103) {
tmp = (x_46_im / y_46_re) - (x_46_re / (y_46_re * (y_46_re / y_46_im)));
} else if (y_46_im <= 2.65e+59) {
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(-x_46_re) / fma(y_46_re, Float64(y_46_re / y_46_im), y_46_im)) tmp = 0.0 if (y_46_im <= -8.6e+152) tmp = t_1; elseif (y_46_im <= -8e-125) tmp = t_0; elseif (y_46_im <= 6.2e-103) tmp = Float64(Float64(x_46_im / y_46_re) - Float64(x_46_re / Float64(y_46_re * Float64(y_46_re / y_46_im)))); elseif (y_46_im <= 2.65e+59) tmp = t_0; else tmp = t_1; end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[(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[((-x$46$re) / N[(y$46$re * N[(y$46$re / y$46$im), $MachinePrecision] + y$46$im), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -8.6e+152], t$95$1, If[LessEqual[y$46$im, -8e-125], t$95$0, If[LessEqual[y$46$im, 6.2e-103], N[(N[(x$46$im / y$46$re), $MachinePrecision] - N[(x$46$re / N[(y$46$re * N[(y$46$re / y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 2.65e+59], 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 := \frac{-x.re}{\mathsf{fma}\left(y.re, \frac{y.re}{y.im}, y.im\right)}\\
\mathbf{if}\;y.im \leq -8.6 \cdot 10^{+152}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y.im \leq -8 \cdot 10^{-125}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y.im \leq 6.2 \cdot 10^{-103}:\\
\;\;\;\;\frac{x.im}{y.re} - \frac{x.re}{y.re \cdot \frac{y.re}{y.im}}\\
\mathbf{elif}\;y.im \leq 2.65 \cdot 10^{+59}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y.im < -8.59999999999999989e152 or 2.6499999999999998e59 < y.im Initial program 32.7%
div-sub32.7%
sub-neg32.7%
*-commutative32.7%
add-sqr-sqrt32.7%
times-frac34.0%
fma-def34.0%
hypot-def34.0%
hypot-def48.6%
associate-/l*53.3%
add-sqr-sqrt53.3%
pow253.3%
hypot-def53.3%
Applied egg-rr53.3%
Taylor expanded in y.re around 0 85.8%
+-commutative85.8%
unpow285.8%
associate-*r/95.4%
fma-def95.4%
Simplified95.4%
Taylor expanded in x.im around 0 65.3%
associate-*r/65.3%
neg-mul-165.3%
unpow265.3%
associate-*r/75.1%
+-commutative75.1%
fma-def75.1%
Simplified75.1%
if -8.59999999999999989e152 < y.im < -8.0000000000000001e-125 or 6.2000000000000003e-103 < y.im < 2.6499999999999998e59Initial program 72.8%
if -8.0000000000000001e-125 < y.im < 6.2000000000000003e-103Initial program 63.5%
Taylor expanded in y.re around inf 84.5%
+-commutative84.5%
mul-1-neg84.5%
unsub-neg84.5%
associate-/l*85.7%
Simplified85.7%
unpow285.7%
*-un-lft-identity85.7%
times-frac88.0%
Applied egg-rr88.0%
Final simplification78.8%
(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)))))
(if (<= y.im -7.4e+61)
(/ (- x.re (* y.re (/ x.im y.im))) (hypot y.im y.re))
(if (<= y.im -1.32e-126)
t_0
(if (<= y.im 3.8e-105)
(- (/ x.im y.re) (/ x.re (* y.re (/ y.re y.im))))
(if (<= y.im 2.15e+59)
t_0
(/ (- x.re) (fma 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) {
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 tmp;
if (y_46_im <= -7.4e+61) {
tmp = (x_46_re - (y_46_re * (x_46_im / y_46_im))) / hypot(y_46_im, y_46_re);
} else if (y_46_im <= -1.32e-126) {
tmp = t_0;
} else if (y_46_im <= 3.8e-105) {
tmp = (x_46_im / y_46_re) - (x_46_re / (y_46_re * (y_46_re / y_46_im)));
} else if (y_46_im <= 2.15e+59) {
tmp = t_0;
} else {
tmp = -x_46_re / fma(y_46_re, (y_46_re / y_46_im), y_46_im);
}
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))) tmp = 0.0 if (y_46_im <= -7.4e+61) tmp = Float64(Float64(x_46_re - Float64(y_46_re * Float64(x_46_im / y_46_im))) / hypot(y_46_im, y_46_re)); elseif (y_46_im <= -1.32e-126) tmp = t_0; elseif (y_46_im <= 3.8e-105) tmp = Float64(Float64(x_46_im / y_46_re) - Float64(x_46_re / Float64(y_46_re * Float64(y_46_re / y_46_im)))); elseif (y_46_im <= 2.15e+59) tmp = t_0; else tmp = Float64(Float64(-x_46_re) / fma(y_46_re, Float64(y_46_re / y_46_im), y_46_im)); end return 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]}, If[LessEqual[y$46$im, -7.4e+61], N[(N[(x$46$re - N[(y$46$re * N[(x$46$im / y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sqrt[y$46$im ^ 2 + y$46$re ^ 2], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, -1.32e-126], t$95$0, If[LessEqual[y$46$im, 3.8e-105], N[(N[(x$46$im / y$46$re), $MachinePrecision] - N[(x$46$re / N[(y$46$re * N[(y$46$re / y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 2.15e+59], t$95$0, N[((-x$46$re) / N[(y$46$re * N[(y$46$re / y$46$im), $MachinePrecision] + y$46$im), $MachinePrecision]), $MachinePrecision]]]]]]
\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}\\
\mathbf{if}\;y.im \leq -7.4 \cdot 10^{+61}:\\
\;\;\;\;\frac{x.re - y.re \cdot \frac{x.im}{y.im}}{\mathsf{hypot}\left(y.im, y.re\right)}\\
\mathbf{elif}\;y.im \leq -1.32 \cdot 10^{-126}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y.im \leq 3.8 \cdot 10^{-105}:\\
\;\;\;\;\frac{x.im}{y.re} - \frac{x.re}{y.re \cdot \frac{y.re}{y.im}}\\
\mathbf{elif}\;y.im \leq 2.15 \cdot 10^{+59}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{-x.re}{\mathsf{fma}\left(y.re, \frac{y.re}{y.im}, y.im\right)}\\
\end{array}
\end{array}
if y.im < -7.40000000000000005e61Initial program 35.1%
*-un-lft-identity35.1%
add-sqr-sqrt35.1%
times-frac35.1%
hypot-def35.1%
hypot-def59.4%
Applied egg-rr59.4%
Taylor expanded in y.im around -inf 74.1%
mul-1-neg74.1%
unsub-neg74.1%
associate-/l*80.3%
Simplified80.3%
sub-neg80.3%
distribute-lft-in80.3%
associate-/r/80.3%
distribute-rgt-neg-in80.3%
Applied egg-rr80.3%
associate-*l/80.4%
*-lft-identity80.4%
associate-*l/80.4%
*-lft-identity80.4%
distribute-rgt-neg-out80.4%
associate-*l/74.3%
distribute-neg-frac74.3%
sub-neg74.3%
div-sub74.3%
associate-*l/80.4%
*-commutative80.4%
hypot-def40.4%
unpow240.4%
unpow240.4%
+-commutative40.4%
unpow240.4%
unpow240.4%
hypot-def80.4%
Simplified80.4%
if -7.40000000000000005e61 < y.im < -1.31999999999999992e-126 or 3.7999999999999998e-105 < y.im < 2.15000000000000012e59Initial program 78.7%
if -1.31999999999999992e-126 < y.im < 3.7999999999999998e-105Initial program 63.5%
Taylor expanded in y.re around inf 84.5%
+-commutative84.5%
mul-1-neg84.5%
unsub-neg84.5%
associate-/l*85.7%
Simplified85.7%
unpow285.7%
*-un-lft-identity85.7%
times-frac88.0%
Applied egg-rr88.0%
if 2.15000000000000012e59 < y.im Initial program 34.8%
div-sub34.8%
sub-neg34.8%
*-commutative34.8%
add-sqr-sqrt34.8%
times-frac36.8%
fma-def36.8%
hypot-def36.8%
hypot-def53.2%
associate-/l*59.8%
add-sqr-sqrt59.8%
pow259.8%
hypot-def59.8%
Applied egg-rr59.8%
Taylor expanded in y.re around 0 84.2%
+-commutative84.2%
unpow284.2%
associate-*r/94.3%
fma-def94.3%
Simplified94.3%
Taylor expanded in x.im around 0 58.4%
associate-*r/58.4%
neg-mul-158.4%
unpow258.4%
associate-*r/68.8%
+-commutative68.8%
fma-def68.8%
Simplified68.8%
Final simplification80.0%
(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)))))
(if (<= y.im -9e+153)
(* (/ 1.0 (hypot y.re y.im)) x.re)
(if (<= y.im -8.2e-126)
t_0
(if (<= y.im 1.85e-104)
(- (/ x.im y.re) (/ x.re (* y.re (/ y.re y.im))))
(if (<= y.im 2.4e+189) t_0 (* x.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 = ((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 tmp;
if (y_46_im <= -9e+153) {
tmp = (1.0 / hypot(y_46_re, y_46_im)) * x_46_re;
} else if (y_46_im <= -8.2e-126) {
tmp = t_0;
} else if (y_46_im <= 1.85e-104) {
tmp = (x_46_im / y_46_re) - (x_46_re / (y_46_re * (y_46_re / y_46_im)));
} else if (y_46_im <= 2.4e+189) {
tmp = t_0;
} else {
tmp = x_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 = ((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 tmp;
if (y_46_im <= -9e+153) {
tmp = (1.0 / Math.hypot(y_46_re, y_46_im)) * x_46_re;
} else if (y_46_im <= -8.2e-126) {
tmp = t_0;
} else if (y_46_im <= 1.85e-104) {
tmp = (x_46_im / y_46_re) - (x_46_re / (y_46_re * (y_46_re / y_46_im)));
} else if (y_46_im <= 2.4e+189) {
tmp = t_0;
} else {
tmp = x_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 = ((y_46_re * x_46_im) - (y_46_im * x_46_re)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im)) tmp = 0 if y_46_im <= -9e+153: tmp = (1.0 / math.hypot(y_46_re, y_46_im)) * x_46_re elif y_46_im <= -8.2e-126: tmp = t_0 elif y_46_im <= 1.85e-104: tmp = (x_46_im / y_46_re) - (x_46_re / (y_46_re * (y_46_re / y_46_im))) elif y_46_im <= 2.4e+189: tmp = t_0 else: tmp = x_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(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))) tmp = 0.0 if (y_46_im <= -9e+153) tmp = Float64(Float64(1.0 / hypot(y_46_re, y_46_im)) * x_46_re); elseif (y_46_im <= -8.2e-126) tmp = t_0; elseif (y_46_im <= 1.85e-104) tmp = Float64(Float64(x_46_im / y_46_re) - Float64(x_46_re / Float64(y_46_re * Float64(y_46_re / y_46_im)))); elseif (y_46_im <= 2.4e+189) tmp = t_0; else tmp = Float64(x_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 = ((y_46_re * x_46_im) - (y_46_im * x_46_re)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im)); tmp = 0.0; if (y_46_im <= -9e+153) tmp = (1.0 / hypot(y_46_re, y_46_im)) * x_46_re; elseif (y_46_im <= -8.2e-126) tmp = t_0; elseif (y_46_im <= 1.85e-104) tmp = (x_46_im / y_46_re) - (x_46_re / (y_46_re * (y_46_re / y_46_im))); elseif (y_46_im <= 2.4e+189) tmp = t_0; else tmp = x_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[(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$im, -9e+153], N[(N[(1.0 / N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision]), $MachinePrecision] * x$46$re), $MachinePrecision], If[LessEqual[y$46$im, -8.2e-126], t$95$0, If[LessEqual[y$46$im, 1.85e-104], N[(N[(x$46$im / y$46$re), $MachinePrecision] - N[(x$46$re / N[(y$46$re * N[(y$46$re / y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 2.4e+189], t$95$0, N[(x$46$re * 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{y.re \cdot x.im - y.im \cdot x.re}{y.re \cdot y.re + y.im \cdot y.im}\\
\mathbf{if}\;y.im \leq -9 \cdot 10^{+153}:\\
\;\;\;\;\frac{1}{\mathsf{hypot}\left(y.re, y.im\right)} \cdot x.re\\
\mathbf{elif}\;y.im \leq -8.2 \cdot 10^{-126}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y.im \leq 1.85 \cdot 10^{-104}:\\
\;\;\;\;\frac{x.im}{y.re} - \frac{x.re}{y.re \cdot \frac{y.re}{y.im}}\\
\mathbf{elif}\;y.im \leq 2.4 \cdot 10^{+189}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;x.re \cdot \frac{-1}{\mathsf{hypot}\left(y.re, y.im\right)}\\
\end{array}
\end{array}
if y.im < -9.0000000000000002e153Initial program 29.3%
*-un-lft-identity29.3%
add-sqr-sqrt29.3%
times-frac29.3%
hypot-def29.3%
hypot-def61.5%
Applied egg-rr61.5%
Taylor expanded in y.im around -inf 79.8%
if -9.0000000000000002e153 < y.im < -8.1999999999999995e-126 or 1.85e-104 < y.im < 2.4000000000000001e189Initial program 69.0%
if -8.1999999999999995e-126 < y.im < 1.85e-104Initial program 63.5%
Taylor expanded in y.re around inf 84.5%
+-commutative84.5%
mul-1-neg84.5%
unsub-neg84.5%
associate-/l*85.7%
Simplified85.7%
unpow285.7%
*-un-lft-identity85.7%
times-frac88.0%
Applied egg-rr88.0%
if 2.4000000000000001e189 < y.im Initial program 15.3%
*-un-lft-identity15.3%
add-sqr-sqrt15.3%
times-frac15.3%
hypot-def15.3%
hypot-def44.8%
Applied egg-rr44.8%
Taylor expanded in y.re around 0 74.9%
neg-mul-174.9%
Simplified74.9%
Final simplification77.6%
(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)))))
(if (<= y.re -3e+82)
(/ (- (* y.im (/ x.re y.re)) x.im) (hypot y.im y.re))
(if (<= y.re -1.75e-157)
t_0
(if (<= y.re 6.5e-218)
(/ (- x.re) y.im)
(if (<= y.re 4.3e+21)
t_0
(- (/ x.im y.re) (/ x.re (* y.re (/ 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)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im));
double tmp;
if (y_46_re <= -3e+82) {
tmp = ((y_46_im * (x_46_re / y_46_re)) - x_46_im) / hypot(y_46_im, y_46_re);
} else if (y_46_re <= -1.75e-157) {
tmp = t_0;
} else if (y_46_re <= 6.5e-218) {
tmp = -x_46_re / y_46_im;
} else if (y_46_re <= 4.3e+21) {
tmp = t_0;
} else {
tmp = (x_46_im / y_46_re) - (x_46_re / (y_46_re * (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)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im));
double tmp;
if (y_46_re <= -3e+82) {
tmp = ((y_46_im * (x_46_re / y_46_re)) - x_46_im) / Math.hypot(y_46_im, y_46_re);
} else if (y_46_re <= -1.75e-157) {
tmp = t_0;
} else if (y_46_re <= 6.5e-218) {
tmp = -x_46_re / y_46_im;
} else if (y_46_re <= 4.3e+21) {
tmp = t_0;
} else {
tmp = (x_46_im / y_46_re) - (x_46_re / (y_46_re * (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)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im)) tmp = 0 if y_46_re <= -3e+82: tmp = ((y_46_im * (x_46_re / y_46_re)) - x_46_im) / math.hypot(y_46_im, y_46_re) elif y_46_re <= -1.75e-157: tmp = t_0 elif y_46_re <= 6.5e-218: tmp = -x_46_re / y_46_im elif y_46_re <= 4.3e+21: tmp = t_0 else: tmp = (x_46_im / y_46_re) - (x_46_re / (y_46_re * (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(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))) tmp = 0.0 if (y_46_re <= -3e+82) tmp = Float64(Float64(Float64(y_46_im * Float64(x_46_re / y_46_re)) - x_46_im) / hypot(y_46_im, y_46_re)); elseif (y_46_re <= -1.75e-157) tmp = t_0; elseif (y_46_re <= 6.5e-218) tmp = Float64(Float64(-x_46_re) / y_46_im); elseif (y_46_re <= 4.3e+21) tmp = t_0; else tmp = Float64(Float64(x_46_im / y_46_re) - Float64(x_46_re / Float64(y_46_re * Float64(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)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im)); tmp = 0.0; if (y_46_re <= -3e+82) tmp = ((y_46_im * (x_46_re / y_46_re)) - x_46_im) / hypot(y_46_im, y_46_re); elseif (y_46_re <= -1.75e-157) tmp = t_0; elseif (y_46_re <= 6.5e-218) tmp = -x_46_re / y_46_im; elseif (y_46_re <= 4.3e+21) tmp = t_0; else tmp = (x_46_im / y_46_re) - (x_46_re / (y_46_re * (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[(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, -3e+82], N[(N[(N[(y$46$im * N[(x$46$re / y$46$re), $MachinePrecision]), $MachinePrecision] - x$46$im), $MachinePrecision] / N[Sqrt[y$46$im ^ 2 + y$46$re ^ 2], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, -1.75e-157], t$95$0, If[LessEqual[y$46$re, 6.5e-218], N[((-x$46$re) / y$46$im), $MachinePrecision], If[LessEqual[y$46$re, 4.3e+21], t$95$0, N[(N[(x$46$im / y$46$re), $MachinePrecision] - N[(x$46$re / N[(y$46$re * N[(y$46$re / y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\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}\\
\mathbf{if}\;y.re \leq -3 \cdot 10^{+82}:\\
\;\;\;\;\frac{y.im \cdot \frac{x.re}{y.re} - x.im}{\mathsf{hypot}\left(y.im, y.re\right)}\\
\mathbf{elif}\;y.re \leq -1.75 \cdot 10^{-157}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y.re \leq 6.5 \cdot 10^{-218}:\\
\;\;\;\;\frac{-x.re}{y.im}\\
\mathbf{elif}\;y.re \leq 4.3 \cdot 10^{+21}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{x.im}{y.re} - \frac{x.re}{y.re \cdot \frac{y.re}{y.im}}\\
\end{array}
\end{array}
if y.re < -2.99999999999999989e82Initial program 32.6%
*-un-lft-identity32.6%
add-sqr-sqrt32.6%
times-frac32.7%
hypot-def32.7%
hypot-def58.9%
Applied egg-rr58.9%
Taylor expanded in y.re around -inf 77.9%
neg-mul-177.9%
+-commutative77.9%
unsub-neg77.9%
*-lft-identity77.9%
times-frac84.9%
/-rgt-identity84.9%
Simplified84.9%
sub-neg84.9%
distribute-lft-in84.9%
associate-*r/77.9%
Applied egg-rr77.9%
*-commutative77.9%
*-commutative77.9%
associate-*r/78.1%
*-rgt-identity78.1%
distribute-frac-neg78.1%
associate-*r/78.1%
*-rgt-identity78.1%
sub-neg78.1%
div-sub78.1%
associate-/l*85.1%
associate-/r/85.1%
hypot-def39.2%
unpow239.2%
unpow239.2%
+-commutative39.2%
unpow239.2%
unpow239.2%
hypot-def85.1%
Simplified85.1%
if -2.99999999999999989e82 < y.re < -1.7500000000000001e-157 or 6.49999999999999983e-218 < y.re < 4.3e21Initial program 80.6%
if -1.7500000000000001e-157 < y.re < 6.49999999999999983e-218Initial program 64.2%
Taylor expanded in y.re around 0 88.1%
associate-*r/88.1%
neg-mul-188.1%
Simplified88.1%
if 4.3e21 < y.re Initial program 28.6%
Taylor expanded in y.re around inf 62.1%
+-commutative62.1%
mul-1-neg62.1%
unsub-neg62.1%
associate-/l*62.5%
Simplified62.5%
unpow262.5%
*-un-lft-identity62.5%
times-frac67.9%
Applied egg-rr67.9%
Final simplification80.5%
(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)))))
(if (<= y.im -1.05e+153)
(* (/ 1.0 (hypot y.re y.im)) x.re)
(if (<= y.im -4.1e-126)
t_0
(if (<= y.im 5.8e-109)
(- (/ x.im y.re) (/ x.re (* y.re (/ y.re y.im))))
(if (<= y.im 2.4e+189) t_0 (/ (- x.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)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im));
double tmp;
if (y_46_im <= -1.05e+153) {
tmp = (1.0 / hypot(y_46_re, y_46_im)) * x_46_re;
} else if (y_46_im <= -4.1e-126) {
tmp = t_0;
} else if (y_46_im <= 5.8e-109) {
tmp = (x_46_im / y_46_re) - (x_46_re / (y_46_re * (y_46_re / y_46_im)));
} else if (y_46_im <= 2.4e+189) {
tmp = t_0;
} else {
tmp = -x_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)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im));
double tmp;
if (y_46_im <= -1.05e+153) {
tmp = (1.0 / Math.hypot(y_46_re, y_46_im)) * x_46_re;
} else if (y_46_im <= -4.1e-126) {
tmp = t_0;
} else if (y_46_im <= 5.8e-109) {
tmp = (x_46_im / y_46_re) - (x_46_re / (y_46_re * (y_46_re / y_46_im)));
} else if (y_46_im <= 2.4e+189) {
tmp = t_0;
} else {
tmp = -x_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)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im)) tmp = 0 if y_46_im <= -1.05e+153: tmp = (1.0 / math.hypot(y_46_re, y_46_im)) * x_46_re elif y_46_im <= -4.1e-126: tmp = t_0 elif y_46_im <= 5.8e-109: tmp = (x_46_im / y_46_re) - (x_46_re / (y_46_re * (y_46_re / y_46_im))) elif y_46_im <= 2.4e+189: tmp = t_0 else: tmp = -x_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(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))) tmp = 0.0 if (y_46_im <= -1.05e+153) tmp = Float64(Float64(1.0 / hypot(y_46_re, y_46_im)) * x_46_re); elseif (y_46_im <= -4.1e-126) tmp = t_0; elseif (y_46_im <= 5.8e-109) tmp = Float64(Float64(x_46_im / y_46_re) - Float64(x_46_re / Float64(y_46_re * Float64(y_46_re / y_46_im)))); elseif (y_46_im <= 2.4e+189) tmp = t_0; 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) 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)); tmp = 0.0; if (y_46_im <= -1.05e+153) tmp = (1.0 / hypot(y_46_re, y_46_im)) * x_46_re; elseif (y_46_im <= -4.1e-126) tmp = t_0; elseif (y_46_im <= 5.8e-109) tmp = (x_46_im / y_46_re) - (x_46_re / (y_46_re * (y_46_re / y_46_im))); elseif (y_46_im <= 2.4e+189) tmp = t_0; 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_] := 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]}, If[LessEqual[y$46$im, -1.05e+153], N[(N[(1.0 / N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision]), $MachinePrecision] * x$46$re), $MachinePrecision], If[LessEqual[y$46$im, -4.1e-126], t$95$0, If[LessEqual[y$46$im, 5.8e-109], N[(N[(x$46$im / y$46$re), $MachinePrecision] - N[(x$46$re / N[(y$46$re * N[(y$46$re / y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 2.4e+189], t$95$0, N[((-x$46$re) / y$46$im), $MachinePrecision]]]]]]
\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}\\
\mathbf{if}\;y.im \leq -1.05 \cdot 10^{+153}:\\
\;\;\;\;\frac{1}{\mathsf{hypot}\left(y.re, y.im\right)} \cdot x.re\\
\mathbf{elif}\;y.im \leq -4.1 \cdot 10^{-126}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y.im \leq 5.8 \cdot 10^{-109}:\\
\;\;\;\;\frac{x.im}{y.re} - \frac{x.re}{y.re \cdot \frac{y.re}{y.im}}\\
\mathbf{elif}\;y.im \leq 2.4 \cdot 10^{+189}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{-x.re}{y.im}\\
\end{array}
\end{array}
if y.im < -1.05000000000000008e153Initial program 29.3%
*-un-lft-identity29.3%
add-sqr-sqrt29.3%
times-frac29.3%
hypot-def29.3%
hypot-def61.5%
Applied egg-rr61.5%
Taylor expanded in y.im around -inf 79.8%
if -1.05000000000000008e153 < y.im < -4.0999999999999997e-126 or 5.8e-109 < y.im < 2.4000000000000001e189Initial program 69.0%
if -4.0999999999999997e-126 < y.im < 5.8e-109Initial program 63.5%
Taylor expanded in y.re around inf 84.5%
+-commutative84.5%
mul-1-neg84.5%
unsub-neg84.5%
associate-/l*85.7%
Simplified85.7%
unpow285.7%
*-un-lft-identity85.7%
times-frac88.0%
Applied egg-rr88.0%
if 2.4000000000000001e189 < y.im Initial program 15.3%
Taylor expanded in y.re around 0 74.5%
associate-*r/74.5%
neg-mul-174.5%
Simplified74.5%
Final simplification77.5%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (/ (- x.re) y.im))
(t_1
(/ (- (* y.re x.im) (* y.im x.re)) (+ (* y.re y.re) (* y.im y.im)))))
(if (<= y.im -1.4e+153)
t_0
(if (<= y.im -4.1e-126)
t_1
(if (<= y.im 2.2e-107)
(- (/ x.im y.re) (/ x.re (* y.re (/ y.re y.im))))
(if (<= y.im 2.4e+189) t_1 t_0))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = -x_46_re / y_46_im;
double t_1 = ((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 tmp;
if (y_46_im <= -1.4e+153) {
tmp = t_0;
} else if (y_46_im <= -4.1e-126) {
tmp = t_1;
} else if (y_46_im <= 2.2e-107) {
tmp = (x_46_im / y_46_re) - (x_46_re / (y_46_re * (y_46_re / y_46_im)));
} else if (y_46_im <= 2.4e+189) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_0 = -x_46re / y_46im
t_1 = ((y_46re * x_46im) - (y_46im * x_46re)) / ((y_46re * y_46re) + (y_46im * y_46im))
if (y_46im <= (-1.4d+153)) then
tmp = t_0
else if (y_46im <= (-4.1d-126)) then
tmp = t_1
else if (y_46im <= 2.2d-107) then
tmp = (x_46im / y_46re) - (x_46re / (y_46re * (y_46re / y_46im)))
else if (y_46im <= 2.4d+189) then
tmp = t_1
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = -x_46_re / y_46_im;
double t_1 = ((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 tmp;
if (y_46_im <= -1.4e+153) {
tmp = t_0;
} else if (y_46_im <= -4.1e-126) {
tmp = t_1;
} else if (y_46_im <= 2.2e-107) {
tmp = (x_46_im / y_46_re) - (x_46_re / (y_46_re * (y_46_re / y_46_im)));
} else if (y_46_im <= 2.4e+189) {
tmp = t_1;
} else {
tmp = t_0;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = -x_46_re / y_46_im t_1 = ((y_46_re * x_46_im) - (y_46_im * x_46_re)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im)) tmp = 0 if y_46_im <= -1.4e+153: tmp = t_0 elif y_46_im <= -4.1e-126: tmp = t_1 elif y_46_im <= 2.2e-107: tmp = (x_46_im / y_46_re) - (x_46_re / (y_46_re * (y_46_re / y_46_im))) elif y_46_im <= 2.4e+189: tmp = t_1 else: tmp = t_0 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(Float64(-x_46_re) / y_46_im) t_1 = 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))) tmp = 0.0 if (y_46_im <= -1.4e+153) tmp = t_0; elseif (y_46_im <= -4.1e-126) tmp = t_1; elseif (y_46_im <= 2.2e-107) tmp = Float64(Float64(x_46_im / y_46_re) - Float64(x_46_re / Float64(y_46_re * Float64(y_46_re / y_46_im)))); elseif (y_46_im <= 2.4e+189) tmp = t_1; else tmp = t_0; end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = -x_46_re / y_46_im; t_1 = ((y_46_re * x_46_im) - (y_46_im * x_46_re)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im)); tmp = 0.0; if (y_46_im <= -1.4e+153) tmp = t_0; elseif (y_46_im <= -4.1e-126) tmp = t_1; elseif (y_46_im <= 2.2e-107) tmp = (x_46_im / y_46_re) - (x_46_re / (y_46_re * (y_46_re / y_46_im))); elseif (y_46_im <= 2.4e+189) tmp = t_1; 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[((-x$46$re) / y$46$im), $MachinePrecision]}, Block[{t$95$1 = 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$im, -1.4e+153], t$95$0, If[LessEqual[y$46$im, -4.1e-126], t$95$1, If[LessEqual[y$46$im, 2.2e-107], N[(N[(x$46$im / y$46$re), $MachinePrecision] - N[(x$46$re / N[(y$46$re * N[(y$46$re / y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 2.4e+189], t$95$1, t$95$0]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-x.re}{y.im}\\
t_1 := \frac{y.re \cdot x.im - y.im \cdot x.re}{y.re \cdot y.re + y.im \cdot y.im}\\
\mathbf{if}\;y.im \leq -1.4 \cdot 10^{+153}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y.im \leq -4.1 \cdot 10^{-126}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y.im \leq 2.2 \cdot 10^{-107}:\\
\;\;\;\;\frac{x.im}{y.re} - \frac{x.re}{y.re \cdot \frac{y.re}{y.im}}\\
\mathbf{elif}\;y.im \leq 2.4 \cdot 10^{+189}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if y.im < -1.39999999999999993e153 or 2.4000000000000001e189 < y.im Initial program 22.6%
Taylor expanded in y.re around 0 75.8%
associate-*r/75.8%
neg-mul-175.8%
Simplified75.8%
if -1.39999999999999993e153 < y.im < -4.0999999999999997e-126 or 2.20000000000000012e-107 < y.im < 2.4000000000000001e189Initial program 69.0%
if -4.0999999999999997e-126 < y.im < 2.20000000000000012e-107Initial program 63.5%
Taylor expanded in y.re around inf 84.5%
+-commutative84.5%
mul-1-neg84.5%
unsub-neg84.5%
associate-/l*85.7%
Simplified85.7%
unpow285.7%
*-un-lft-identity85.7%
times-frac88.0%
Applied egg-rr88.0%
Final simplification77.2%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (/ (- x.re) y.im))
(t_1 (/ (* y.re x.im) (+ (* y.re y.re) (* y.im y.im)))))
(if (<= y.re -1.05e+109)
(/ x.im y.re)
(if (<= y.re -5.8e-39)
t_1
(if (<= y.re 2.05e-116)
t_0
(if (<= y.re 7e-43) t_1 (if (<= y.re 5.5e+23) 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 = -x_46_re / y_46_im;
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 <= -1.05e+109) {
tmp = x_46_im / y_46_re;
} else if (y_46_re <= -5.8e-39) {
tmp = t_1;
} else if (y_46_re <= 2.05e-116) {
tmp = t_0;
} else if (y_46_re <= 7e-43) {
tmp = t_1;
} else if (y_46_re <= 5.5e+23) {
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 = -x_46re / y_46im
t_1 = (y_46re * x_46im) / ((y_46re * y_46re) + (y_46im * y_46im))
if (y_46re <= (-1.05d+109)) then
tmp = x_46im / y_46re
else if (y_46re <= (-5.8d-39)) then
tmp = t_1
else if (y_46re <= 2.05d-116) then
tmp = t_0
else if (y_46re <= 7d-43) then
tmp = t_1
else if (y_46re <= 5.5d+23) 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 = -x_46_re / y_46_im;
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 <= -1.05e+109) {
tmp = x_46_im / y_46_re;
} else if (y_46_re <= -5.8e-39) {
tmp = t_1;
} else if (y_46_re <= 2.05e-116) {
tmp = t_0;
} else if (y_46_re <= 7e-43) {
tmp = t_1;
} else if (y_46_re <= 5.5e+23) {
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 = -x_46_re / y_46_im 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 <= -1.05e+109: tmp = x_46_im / y_46_re elif y_46_re <= -5.8e-39: tmp = t_1 elif y_46_re <= 2.05e-116: tmp = t_0 elif y_46_re <= 7e-43: tmp = t_1 elif y_46_re <= 5.5e+23: 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(-x_46_re) / y_46_im) 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 <= -1.05e+109) tmp = Float64(x_46_im / y_46_re); elseif (y_46_re <= -5.8e-39) tmp = t_1; elseif (y_46_re <= 2.05e-116) tmp = t_0; elseif (y_46_re <= 7e-43) tmp = t_1; elseif (y_46_re <= 5.5e+23) 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 = -x_46_re / y_46_im; 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 <= -1.05e+109) tmp = x_46_im / y_46_re; elseif (y_46_re <= -5.8e-39) tmp = t_1; elseif (y_46_re <= 2.05e-116) tmp = t_0; elseif (y_46_re <= 7e-43) tmp = t_1; elseif (y_46_re <= 5.5e+23) 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[((-x$46$re) / y$46$im), $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, -1.05e+109], N[(x$46$im / y$46$re), $MachinePrecision], If[LessEqual[y$46$re, -5.8e-39], t$95$1, If[LessEqual[y$46$re, 2.05e-116], t$95$0, If[LessEqual[y$46$re, 7e-43], t$95$1, If[LessEqual[y$46$re, 5.5e+23], t$95$0, N[(x$46$im / y$46$re), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-x.re}{y.im}\\
t_1 := \frac{y.re \cdot x.im}{y.re \cdot y.re + y.im \cdot y.im}\\
\mathbf{if}\;y.re \leq -1.05 \cdot 10^{+109}:\\
\;\;\;\;\frac{x.im}{y.re}\\
\mathbf{elif}\;y.re \leq -5.8 \cdot 10^{-39}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y.re \leq 2.05 \cdot 10^{-116}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y.re \leq 7 \cdot 10^{-43}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y.re \leq 5.5 \cdot 10^{+23}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{x.im}{y.re}\\
\end{array}
\end{array}
if y.re < -1.0500000000000001e109 or 5.50000000000000004e23 < y.re Initial program 29.5%
Taylor expanded in y.re around inf 68.0%
if -1.0500000000000001e109 < y.re < -5.79999999999999975e-39 or 2.0499999999999999e-116 < y.re < 6.99999999999999994e-43Initial program 80.9%
Taylor expanded in x.im around inf 58.4%
*-commutative58.4%
Simplified58.4%
if -5.79999999999999975e-39 < y.re < 2.0499999999999999e-116 or 6.99999999999999994e-43 < y.re < 5.50000000000000004e23Initial program 70.4%
Taylor expanded in y.re around 0 74.9%
associate-*r/74.9%
neg-mul-174.9%
Simplified74.9%
Final simplification69.2%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (or (<= y.re -4.2e-34)
(not
(or (<= y.re 5.4e-103)
(and (not (<= y.re 2.5e-44)) (<= y.re 4.8e+21)))))
(/ 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 <= -4.2e-34) || !((y_46_re <= 5.4e-103) || (!(y_46_re <= 2.5e-44) && (y_46_re <= 4.8e+21)))) {
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 <= (-4.2d-34)) .or. (.not. (y_46re <= 5.4d-103) .or. (.not. (y_46re <= 2.5d-44)) .and. (y_46re <= 4.8d+21))) 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 <= -4.2e-34) || !((y_46_re <= 5.4e-103) || (!(y_46_re <= 2.5e-44) && (y_46_re <= 4.8e+21)))) {
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 <= -4.2e-34) or not ((y_46_re <= 5.4e-103) or (not (y_46_re <= 2.5e-44) and (y_46_re <= 4.8e+21))): 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 <= -4.2e-34) || !((y_46_re <= 5.4e-103) || (!(y_46_re <= 2.5e-44) && (y_46_re <= 4.8e+21)))) 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 <= -4.2e-34) || ~(((y_46_re <= 5.4e-103) || (~((y_46_re <= 2.5e-44)) && (y_46_re <= 4.8e+21))))) 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, -4.2e-34], N[Not[Or[LessEqual[y$46$re, 5.4e-103], And[N[Not[LessEqual[y$46$re, 2.5e-44]], $MachinePrecision], LessEqual[y$46$re, 4.8e+21]]]], $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 -4.2 \cdot 10^{-34} \lor \neg \left(y.re \leq 5.4 \cdot 10^{-103} \lor \neg \left(y.re \leq 2.5 \cdot 10^{-44}\right) \land y.re \leq 4.8 \cdot 10^{+21}\right):\\
\;\;\;\;\frac{x.im}{y.re}\\
\mathbf{else}:\\
\;\;\;\;\frac{-x.re}{y.im}\\
\end{array}
\end{array}
if y.re < -4.2000000000000002e-34 or 5.40000000000000019e-103 < y.re < 2.50000000000000019e-44 or 4.8e21 < y.re Initial program 44.5%
Taylor expanded in y.re around inf 62.4%
if -4.2000000000000002e-34 < y.re < 5.40000000000000019e-103 or 2.50000000000000019e-44 < y.re < 4.8e21Initial program 70.9%
Taylor expanded in y.re around 0 74.5%
associate-*r/74.5%
neg-mul-174.5%
Simplified74.5%
Final simplification67.5%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (or (<= y.im -9.5e-19) (not (<= y.im 4.3e-10))) (/ (- x.re) y.im) (- (/ x.im y.re) (/ x.re (* y.re (/ y.re y.im))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_im <= -9.5e-19) || !(y_46_im <= 4.3e-10)) {
tmp = -x_46_re / y_46_im;
} else {
tmp = (x_46_im / y_46_re) - (x_46_re / (y_46_re * (y_46_re / y_46_im)));
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: tmp
if ((y_46im <= (-9.5d-19)) .or. (.not. (y_46im <= 4.3d-10))) then
tmp = -x_46re / y_46im
else
tmp = (x_46im / y_46re) - (x_46re / (y_46re * (y_46re / y_46im)))
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_im <= -9.5e-19) || !(y_46_im <= 4.3e-10)) {
tmp = -x_46_re / y_46_im;
} else {
tmp = (x_46_im / y_46_re) - (x_46_re / (y_46_re * (y_46_re / y_46_im)));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if (y_46_im <= -9.5e-19) or not (y_46_im <= 4.3e-10): tmp = -x_46_re / y_46_im else: tmp = (x_46_im / y_46_re) - (x_46_re / (y_46_re * (y_46_re / y_46_im))) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if ((y_46_im <= -9.5e-19) || !(y_46_im <= 4.3e-10)) tmp = Float64(Float64(-x_46_re) / y_46_im); else tmp = Float64(Float64(x_46_im / y_46_re) - Float64(x_46_re / Float64(y_46_re * Float64(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) tmp = 0.0; if ((y_46_im <= -9.5e-19) || ~((y_46_im <= 4.3e-10))) tmp = -x_46_re / y_46_im; else tmp = (x_46_im / y_46_re) - (x_46_re / (y_46_re * (y_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$im, -9.5e-19], N[Not[LessEqual[y$46$im, 4.3e-10]], $MachinePrecision]], N[((-x$46$re) / y$46$im), $MachinePrecision], N[(N[(x$46$im / y$46$re), $MachinePrecision] - N[(x$46$re / N[(y$46$re * N[(y$46$re / y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.im \leq -9.5 \cdot 10^{-19} \lor \neg \left(y.im \leq 4.3 \cdot 10^{-10}\right):\\
\;\;\;\;\frac{-x.re}{y.im}\\
\mathbf{else}:\\
\;\;\;\;\frac{x.im}{y.re} - \frac{x.re}{y.re \cdot \frac{y.re}{y.im}}\\
\end{array}
\end{array}
if y.im < -9.4999999999999995e-19 or 4.30000000000000014e-10 < y.im Initial program 43.0%
Taylor expanded in y.re around 0 62.0%
associate-*r/62.0%
neg-mul-162.0%
Simplified62.0%
if -9.4999999999999995e-19 < y.im < 4.30000000000000014e-10Initial program 68.6%
Taylor expanded in y.re around inf 76.4%
+-commutative76.4%
mul-1-neg76.4%
unsub-neg76.4%
associate-/l*76.5%
Simplified76.5%
unpow276.5%
*-un-lft-identity76.5%
times-frac78.1%
Applied egg-rr78.1%
Final simplification70.0%
(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 55.7%
*-un-lft-identity55.7%
add-sqr-sqrt55.7%
times-frac55.7%
hypot-def55.7%
hypot-def74.0%
Applied egg-rr74.0%
clear-num73.9%
frac-times73.7%
metadata-eval73.7%
*-commutative73.7%
*-commutative73.7%
Applied egg-rr73.7%
Taylor expanded in y.re around -inf 30.5%
Taylor expanded in y.im around -inf 6.6%
Final simplification6.6%
(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 55.7%
Taylor expanded in y.re around inf 42.6%
Final simplification42.6%
herbie shell --seed 2024020
(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))))