
(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 13 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
(let* ((t_0 (/ 1.0 (hypot y.re y.im)))
(t_1 (- (* x.im y.re) (* x.re y.im)))
(t_2 (/ t_1 (+ (* y.re y.re) (* y.im y.im))))
(t_3 (/ x.im (/ (hypot y.re y.im) y.re))))
(if (<= t_2 -1e-228)
(fma t_0 t_3 (/ (- x.re) (/ (pow (hypot y.re y.im) 2.0) y.im)))
(if (<= t_2 2e+250)
(* t_0 (/ t_1 (hypot y.re y.im)))
(fma t_0 t_3 (/ (- 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 = 1.0 / hypot(y_46_re, y_46_im);
double t_1 = (x_46_im * y_46_re) - (x_46_re * y_46_im);
double t_2 = t_1 / ((y_46_re * y_46_re) + (y_46_im * y_46_im));
double t_3 = x_46_im / (hypot(y_46_re, y_46_im) / y_46_re);
double tmp;
if (t_2 <= -1e-228) {
tmp = fma(t_0, t_3, (-x_46_re / (pow(hypot(y_46_re, y_46_im), 2.0) / y_46_im)));
} else if (t_2 <= 2e+250) {
tmp = t_0 * (t_1 / hypot(y_46_re, y_46_im));
} else {
tmp = fma(t_0, t_3, (-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(1.0 / hypot(y_46_re, y_46_im)) t_1 = Float64(Float64(x_46_im * y_46_re) - Float64(x_46_re * y_46_im)) t_2 = Float64(t_1 / Float64(Float64(y_46_re * y_46_re) + Float64(y_46_im * y_46_im))) t_3 = Float64(x_46_im / Float64(hypot(y_46_re, y_46_im) / y_46_re)) tmp = 0.0 if (t_2 <= -1e-228) tmp = fma(t_0, t_3, Float64(Float64(-x_46_re) / Float64((hypot(y_46_re, y_46_im) ^ 2.0) / y_46_im))); elseif (t_2 <= 2e+250) tmp = Float64(t_0 * Float64(t_1 / hypot(y_46_re, y_46_im))); else tmp = fma(t_0, t_3, Float64(Float64(-x_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[(1.0 / N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x$46$im * y$46$re), $MachinePrecision] - N[(x$46$re * y$46$im), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 / N[(N[(y$46$re * y$46$re), $MachinePrecision] + N[(y$46$im * y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x$46$im / N[(N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision] / y$46$re), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -1e-228], N[(t$95$0 * t$95$3 + N[((-x$46$re) / N[(N[Power[N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision], 2.0], $MachinePrecision] / y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 2e+250], N[(t$95$0 * N[(t$95$1 / N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 * t$95$3 + N[((-x$46$re) / y$46$im), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{1}{\mathsf{hypot}\left(y.re, y.im\right)}\\
t_1 := x.im \cdot y.re - x.re \cdot y.im\\
t_2 := \frac{t_1}{y.re \cdot y.re + y.im \cdot y.im}\\
t_3 := \frac{x.im}{\frac{\mathsf{hypot}\left(y.re, y.im\right)}{y.re}}\\
\mathbf{if}\;t_2 \leq -1 \cdot 10^{-228}:\\
\;\;\;\;\mathsf{fma}\left(t_0, t_3, \frac{-x.re}{\frac{{\left(\mathsf{hypot}\left(y.re, y.im\right)\right)}^{2}}{y.im}}\right)\\
\mathbf{elif}\;t_2 \leq 2 \cdot 10^{+250}:\\
\;\;\;\;t_0 \cdot \frac{t_1}{\mathsf{hypot}\left(y.re, y.im\right)}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(t_0, t_3, \frac{-x.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))) < -1.00000000000000003e-228Initial program 88.5%
div-sub81.1%
*-un-lft-identity81.1%
add-sqr-sqrt81.1%
times-frac81.0%
fma-neg81.0%
hypot-def81.0%
hypot-def85.7%
associate-/l*90.0%
add-sqr-sqrt90.0%
pow290.0%
hypot-def90.0%
Applied egg-rr90.0%
associate-/l*97.7%
distribute-neg-frac97.7%
Simplified97.7%
if -1.00000000000000003e-228 < (/.f64 (-.f64 (*.f64 x.im y.re) (*.f64 x.re y.im)) (+.f64 (*.f64 y.re y.re) (*.f64 y.im y.im))) < 1.9999999999999998e250Initial program 74.7%
*-un-lft-identity74.7%
add-sqr-sqrt74.7%
times-frac74.7%
hypot-def74.7%
hypot-def98.9%
Applied egg-rr98.9%
if 1.9999999999999998e250 < (/.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 17.3%
div-sub8.9%
*-un-lft-identity8.9%
add-sqr-sqrt8.9%
times-frac8.9%
fma-neg8.9%
hypot-def8.9%
hypot-def15.1%
associate-/l*27.1%
add-sqr-sqrt27.1%
pow227.1%
hypot-def27.1%
Applied egg-rr27.1%
associate-/l*58.9%
distribute-neg-frac58.9%
Simplified58.9%
Taylor expanded in y.re around 0 75.6%
Final simplification91.9%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (- (* x.im y.re) (* x.re y.im)))
(t_1 (/ t_0 (+ (* y.re y.re) (* y.im y.im))))
(t_2 (/ 1.0 (hypot y.re y.im))))
(if (or (<= t_1 -1e+179) (not (<= t_1 2e+250)))
(fma t_2 (/ x.im (/ (hypot y.re y.im) y.re)) (/ (- x.re) y.im))
(* t_2 (/ 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 = (x_46_im * y_46_re) - (x_46_re * y_46_im);
double t_1 = t_0 / ((y_46_re * y_46_re) + (y_46_im * y_46_im));
double t_2 = 1.0 / hypot(y_46_re, y_46_im);
double tmp;
if ((t_1 <= -1e+179) || !(t_1 <= 2e+250)) {
tmp = fma(t_2, (x_46_im / (hypot(y_46_re, y_46_im) / y_46_re)), (-x_46_re / y_46_im));
} else {
tmp = t_2 * (t_0 / 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(x_46_im * y_46_re) - Float64(x_46_re * y_46_im)) t_1 = Float64(t_0 / Float64(Float64(y_46_re * y_46_re) + Float64(y_46_im * y_46_im))) t_2 = Float64(1.0 / hypot(y_46_re, y_46_im)) tmp = 0.0 if ((t_1 <= -1e+179) || !(t_1 <= 2e+250)) tmp = fma(t_2, Float64(x_46_im / Float64(hypot(y_46_re, y_46_im) / y_46_re)), Float64(Float64(-x_46_re) / y_46_im)); else tmp = Float64(t_2 * Float64(t_0 / 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[(x$46$im * y$46$re), $MachinePrecision] - N[(x$46$re * y$46$im), $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]}, Block[{t$95$2 = N[(1.0 / N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -1e+179], N[Not[LessEqual[t$95$1, 2e+250]], $MachinePrecision]], N[(t$95$2 * N[(x$46$im / N[(N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision] / y$46$re), $MachinePrecision]), $MachinePrecision] + N[((-x$46$re) / y$46$im), $MachinePrecision]), $MachinePrecision], N[(t$95$2 * 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 := x.im \cdot y.re - x.re \cdot y.im\\
t_1 := \frac{t_0}{y.re \cdot y.re + y.im \cdot y.im}\\
t_2 := \frac{1}{\mathsf{hypot}\left(y.re, y.im\right)}\\
\mathbf{if}\;t_1 \leq -1 \cdot 10^{+179} \lor \neg \left(t_1 \leq 2 \cdot 10^{+250}\right):\\
\;\;\;\;\mathsf{fma}\left(t_2, \frac{x.im}{\frac{\mathsf{hypot}\left(y.re, y.im\right)}{y.re}}, \frac{-x.re}{y.im}\right)\\
\mathbf{else}:\\
\;\;\;\;t_2 \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))) < -9.9999999999999998e178 or 1.9999999999999998e250 < (/.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 31.1%
div-sub19.7%
*-un-lft-identity19.7%
add-sqr-sqrt19.7%
times-frac19.7%
fma-neg19.7%
hypot-def19.7%
hypot-def27.7%
associate-/l*39.5%
add-sqr-sqrt39.5%
pow239.5%
hypot-def39.5%
Applied egg-rr39.5%
associate-/l*68.1%
distribute-neg-frac68.1%
Simplified68.1%
Taylor expanded in y.re around 0 79.7%
if -9.9999999999999998e178 < (/.f64 (-.f64 (*.f64 x.im y.re) (*.f64 x.re y.im)) (+.f64 (*.f64 y.re y.re) (*.f64 y.im y.im))) < 1.9999999999999998e250Initial program 81.1%
*-un-lft-identity81.1%
add-sqr-sqrt81.1%
times-frac81.1%
hypot-def81.1%
hypot-def98.7%
Applied egg-rr98.7%
Final simplification91.4%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (- (* x.im y.re) (* x.re y.im))))
(if (<= (/ t_0 (+ (* y.re y.re) (* y.im y.im))) 2e+250)
(* (/ 1.0 (hypot y.re y.im)) (/ t_0 (hypot y.re y.im)))
(-
(/ (* y.re (/ x.im (hypot y.re y.im))) (hypot y.re y.im))
(/ x.re y.im)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = (x_46_im * y_46_re) - (x_46_re * y_46_im);
double tmp;
if ((t_0 / ((y_46_re * y_46_re) + (y_46_im * y_46_im))) <= 2e+250) {
tmp = (1.0 / hypot(y_46_re, y_46_im)) * (t_0 / hypot(y_46_re, y_46_im));
} else {
tmp = ((y_46_re * (x_46_im / hypot(y_46_re, y_46_im))) / hypot(y_46_re, y_46_im)) - (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 = (x_46_im * y_46_re) - (x_46_re * y_46_im);
double tmp;
if ((t_0 / ((y_46_re * y_46_re) + (y_46_im * y_46_im))) <= 2e+250) {
tmp = (1.0 / Math.hypot(y_46_re, y_46_im)) * (t_0 / Math.hypot(y_46_re, y_46_im));
} else {
tmp = ((y_46_re * (x_46_im / Math.hypot(y_46_re, y_46_im))) / Math.hypot(y_46_re, y_46_im)) - (x_46_re / y_46_im);
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = (x_46_im * y_46_re) - (x_46_re * y_46_im) tmp = 0 if (t_0 / ((y_46_re * y_46_re) + (y_46_im * y_46_im))) <= 2e+250: tmp = (1.0 / math.hypot(y_46_re, y_46_im)) * (t_0 / math.hypot(y_46_re, y_46_im)) else: tmp = ((y_46_re * (x_46_im / math.hypot(y_46_re, y_46_im))) / math.hypot(y_46_re, y_46_im)) - (x_46_re / y_46_im) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(Float64(x_46_im * y_46_re) - Float64(x_46_re * y_46_im)) tmp = 0.0 if (Float64(t_0 / Float64(Float64(y_46_re * y_46_re) + Float64(y_46_im * y_46_im))) <= 2e+250) tmp = Float64(Float64(1.0 / hypot(y_46_re, y_46_im)) * Float64(t_0 / hypot(y_46_re, y_46_im))); else tmp = Float64(Float64(Float64(y_46_re * Float64(x_46_im / hypot(y_46_re, y_46_im))) / hypot(y_46_re, y_46_im)) - Float64(x_46_re / y_46_im)); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = (x_46_im * y_46_re) - (x_46_re * y_46_im); tmp = 0.0; if ((t_0 / ((y_46_re * y_46_re) + (y_46_im * y_46_im))) <= 2e+250) tmp = (1.0 / hypot(y_46_re, y_46_im)) * (t_0 / hypot(y_46_re, y_46_im)); else tmp = ((y_46_re * (x_46_im / hypot(y_46_re, y_46_im))) / hypot(y_46_re, y_46_im)) - (x_46_re / y_46_im); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[(x$46$im * y$46$re), $MachinePrecision] - N[(x$46$re * y$46$im), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(t$95$0 / N[(N[(y$46$re * y$46$re), $MachinePrecision] + N[(y$46$im * y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2e+250], N[(N[(1.0 / N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision]), $MachinePrecision] * N[(t$95$0 / N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(y$46$re * N[(x$46$im / N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision]), $MachinePrecision] - N[(x$46$re / y$46$im), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x.im \cdot y.re - x.re \cdot y.im\\
\mathbf{if}\;\frac{t_0}{y.re \cdot y.re + y.im \cdot y.im} \leq 2 \cdot 10^{+250}:\\
\;\;\;\;\frac{1}{\mathsf{hypot}\left(y.re, y.im\right)} \cdot \frac{t_0}{\mathsf{hypot}\left(y.re, y.im\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{y.re \cdot \frac{x.im}{\mathsf{hypot}\left(y.re, y.im\right)}}{\mathsf{hypot}\left(y.re, y.im\right)} - \frac{x.re}{y.im}\\
\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))) < 1.9999999999999998e250Initial program 79.8%
*-un-lft-identity79.8%
add-sqr-sqrt79.8%
times-frac79.8%
hypot-def79.8%
hypot-def95.2%
Applied egg-rr95.2%
if 1.9999999999999998e250 < (/.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 17.3%
div-sub8.9%
*-un-lft-identity8.9%
add-sqr-sqrt8.9%
times-frac8.9%
fma-neg8.9%
hypot-def8.9%
hypot-def15.1%
associate-/l*27.1%
add-sqr-sqrt27.1%
pow227.1%
hypot-def27.1%
Applied egg-rr27.1%
associate-/l*58.9%
distribute-neg-frac58.9%
Simplified58.9%
fma-udef58.9%
associate-/r/57.5%
associate-/r/53.8%
Applied egg-rr53.8%
+-commutative53.8%
*-commutative53.8%
associate-*l/54.0%
*-lft-identity54.0%
*-commutative54.0%
Simplified54.0%
Taylor expanded in y.im around inf 74.3%
neg-mul-174.3%
distribute-neg-frac74.3%
Simplified74.3%
Final simplification89.2%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (<= y.re -7e+81)
(/ (- x.im (* x.re (/ y.im y.re))) y.re)
(if (<= y.re 6.5e+91)
(-
(/ (* y.re (/ x.im (hypot y.re y.im))) (hypot y.re y.im))
(/ x.re y.im))
(- (/ x.im y.re) (* (/ y.im y.re) (/ x.re y.re))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_re <= -7e+81) {
tmp = (x_46_im - (x_46_re * (y_46_im / y_46_re))) / y_46_re;
} else if (y_46_re <= 6.5e+91) {
tmp = ((y_46_re * (x_46_im / hypot(y_46_re, y_46_im))) / hypot(y_46_re, y_46_im)) - (x_46_re / y_46_im);
} else {
tmp = (x_46_im / y_46_re) - ((y_46_im / y_46_re) * (x_46_re / 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 <= -7e+81) {
tmp = (x_46_im - (x_46_re * (y_46_im / y_46_re))) / y_46_re;
} else if (y_46_re <= 6.5e+91) {
tmp = ((y_46_re * (x_46_im / Math.hypot(y_46_re, y_46_im))) / Math.hypot(y_46_re, y_46_im)) - (x_46_re / y_46_im);
} else {
tmp = (x_46_im / y_46_re) - ((y_46_im / y_46_re) * (x_46_re / y_46_re));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if y_46_re <= -7e+81: tmp = (x_46_im - (x_46_re * (y_46_im / y_46_re))) / y_46_re elif y_46_re <= 6.5e+91: tmp = ((y_46_re * (x_46_im / math.hypot(y_46_re, y_46_im))) / math.hypot(y_46_re, y_46_im)) - (x_46_re / y_46_im) else: tmp = (x_46_im / y_46_re) - ((y_46_im / y_46_re) * (x_46_re / y_46_re)) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if (y_46_re <= -7e+81) tmp = Float64(Float64(x_46_im - Float64(x_46_re * Float64(y_46_im / y_46_re))) / y_46_re); elseif (y_46_re <= 6.5e+91) tmp = Float64(Float64(Float64(y_46_re * Float64(x_46_im / hypot(y_46_re, y_46_im))) / hypot(y_46_re, y_46_im)) - Float64(x_46_re / y_46_im)); else tmp = Float64(Float64(x_46_im / y_46_re) - Float64(Float64(y_46_im / y_46_re) * Float64(x_46_re / y_46_re))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if (y_46_re <= -7e+81) tmp = (x_46_im - (x_46_re * (y_46_im / y_46_re))) / y_46_re; elseif (y_46_re <= 6.5e+91) tmp = ((y_46_re * (x_46_im / hypot(y_46_re, y_46_im))) / hypot(y_46_re, y_46_im)) - (x_46_re / y_46_im); else tmp = (x_46_im / y_46_re) - ((y_46_im / y_46_re) * (x_46_re / y_46_re)); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[y$46$re, -7e+81], N[(N[(x$46$im - N[(x$46$re * N[(y$46$im / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y$46$re), $MachinePrecision], If[LessEqual[y$46$re, 6.5e+91], N[(N[(N[(y$46$re * N[(x$46$im / N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision]), $MachinePrecision] - N[(x$46$re / y$46$im), $MachinePrecision]), $MachinePrecision], N[(N[(x$46$im / y$46$re), $MachinePrecision] - N[(N[(y$46$im / y$46$re), $MachinePrecision] * N[(x$46$re / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq -7 \cdot 10^{+81}:\\
\;\;\;\;\frac{x.im - x.re \cdot \frac{y.im}{y.re}}{y.re}\\
\mathbf{elif}\;y.re \leq 6.5 \cdot 10^{+91}:\\
\;\;\;\;\frac{y.re \cdot \frac{x.im}{\mathsf{hypot}\left(y.re, y.im\right)}}{\mathsf{hypot}\left(y.re, y.im\right)} - \frac{x.re}{y.im}\\
\mathbf{else}:\\
\;\;\;\;\frac{x.im}{y.re} - \frac{y.im}{y.re} \cdot \frac{x.re}{y.re}\\
\end{array}
\end{array}
if y.re < -7.0000000000000001e81Initial program 44.6%
div-sub44.6%
*-un-lft-identity44.6%
add-sqr-sqrt44.6%
times-frac44.5%
fma-neg44.5%
hypot-def44.5%
hypot-def57.8%
associate-/l*62.0%
add-sqr-sqrt62.0%
pow262.0%
hypot-def62.0%
Applied egg-rr62.0%
associate-/l*84.8%
distribute-neg-frac84.8%
Simplified84.8%
Taylor expanded in y.re around inf 73.3%
+-commutative73.3%
mul-1-neg73.3%
unsub-neg73.3%
*-commutative73.3%
unpow273.3%
times-frac85.4%
Simplified85.4%
associate-*r/85.5%
sub-div85.5%
Applied egg-rr85.5%
if -7.0000000000000001e81 < y.re < 6.4999999999999997e91Initial program 75.6%
div-sub68.5%
*-un-lft-identity68.5%
add-sqr-sqrt68.5%
times-frac68.5%
fma-neg68.5%
hypot-def68.5%
hypot-def73.7%
associate-/l*79.7%
add-sqr-sqrt79.7%
pow279.7%
hypot-def79.7%
Applied egg-rr79.7%
associate-/l*81.2%
distribute-neg-frac81.2%
Simplified81.2%
fma-udef80.6%
associate-/r/78.8%
associate-/r/73.0%
Applied egg-rr73.0%
+-commutative73.0%
*-commutative73.0%
associate-*l/73.0%
*-lft-identity73.0%
*-commutative73.0%
Simplified73.0%
Taylor expanded in y.im around inf 83.2%
neg-mul-183.2%
distribute-neg-frac83.2%
Simplified83.2%
if 6.4999999999999997e91 < y.re Initial program 35.7%
div-sub35.7%
*-un-lft-identity35.7%
add-sqr-sqrt35.7%
times-frac35.8%
fma-neg35.8%
hypot-def35.8%
hypot-def55.5%
associate-/l*57.7%
add-sqr-sqrt57.7%
pow257.7%
hypot-def57.7%
Applied egg-rr57.7%
associate-/l*87.8%
distribute-neg-frac87.8%
Simplified87.8%
Taylor expanded in y.re around inf 76.0%
+-commutative76.0%
mul-1-neg76.0%
unsub-neg76.0%
*-commutative76.0%
unpow276.0%
times-frac88.0%
Simplified88.0%
Final simplification84.5%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (<= y.re -1.22e+14)
(/ (- x.im (* x.re (/ y.im y.re))) y.re)
(if (<= y.re 1.1e-73)
(- (/ (* x.im (/ y.re y.im)) y.im) (/ x.re y.im))
(if (<= y.re 1.15e+95)
(/ (- (* x.im y.re) (* x.re y.im)) (+ (* y.re y.re) (* y.im y.im)))
(- (/ x.im y.re) (* (/ y.im y.re) (/ x.re y.re)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_re <= -1.22e+14) {
tmp = (x_46_im - (x_46_re * (y_46_im / y_46_re))) / y_46_re;
} else if (y_46_re <= 1.1e-73) {
tmp = ((x_46_im * (y_46_re / y_46_im)) / y_46_im) - (x_46_re / y_46_im);
} else if (y_46_re <= 1.15e+95) {
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));
} else {
tmp = (x_46_im / y_46_re) - ((y_46_im / y_46_re) * (x_46_re / y_46_re));
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: tmp
if (y_46re <= (-1.22d+14)) then
tmp = (x_46im - (x_46re * (y_46im / y_46re))) / y_46re
else if (y_46re <= 1.1d-73) then
tmp = ((x_46im * (y_46re / y_46im)) / y_46im) - (x_46re / y_46im)
else if (y_46re <= 1.15d+95) then
tmp = ((x_46im * y_46re) - (x_46re * y_46im)) / ((y_46re * y_46re) + (y_46im * y_46im))
else
tmp = (x_46im / y_46re) - ((y_46im / y_46re) * (x_46re / y_46re))
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_re <= -1.22e+14) {
tmp = (x_46_im - (x_46_re * (y_46_im / y_46_re))) / y_46_re;
} else if (y_46_re <= 1.1e-73) {
tmp = ((x_46_im * (y_46_re / y_46_im)) / y_46_im) - (x_46_re / y_46_im);
} else if (y_46_re <= 1.15e+95) {
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));
} else {
tmp = (x_46_im / y_46_re) - ((y_46_im / y_46_re) * (x_46_re / y_46_re));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if y_46_re <= -1.22e+14: tmp = (x_46_im - (x_46_re * (y_46_im / y_46_re))) / y_46_re elif y_46_re <= 1.1e-73: tmp = ((x_46_im * (y_46_re / y_46_im)) / y_46_im) - (x_46_re / y_46_im) elif y_46_re <= 1.15e+95: 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)) else: tmp = (x_46_im / y_46_re) - ((y_46_im / y_46_re) * (x_46_re / y_46_re)) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if (y_46_re <= -1.22e+14) tmp = Float64(Float64(x_46_im - Float64(x_46_re * Float64(y_46_im / y_46_re))) / y_46_re); elseif (y_46_re <= 1.1e-73) tmp = Float64(Float64(Float64(x_46_im * Float64(y_46_re / y_46_im)) / y_46_im) - Float64(x_46_re / y_46_im)); elseif (y_46_re <= 1.15e+95) tmp = 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))); else tmp = Float64(Float64(x_46_im / y_46_re) - Float64(Float64(y_46_im / y_46_re) * Float64(x_46_re / y_46_re))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if (y_46_re <= -1.22e+14) tmp = (x_46_im - (x_46_re * (y_46_im / y_46_re))) / y_46_re; elseif (y_46_re <= 1.1e-73) tmp = ((x_46_im * (y_46_re / y_46_im)) / y_46_im) - (x_46_re / y_46_im); elseif (y_46_re <= 1.15e+95) 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)); else tmp = (x_46_im / y_46_re) - ((y_46_im / y_46_re) * (x_46_re / y_46_re)); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[y$46$re, -1.22e+14], N[(N[(x$46$im - N[(x$46$re * N[(y$46$im / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y$46$re), $MachinePrecision], If[LessEqual[y$46$re, 1.1e-73], N[(N[(N[(x$46$im * N[(y$46$re / y$46$im), $MachinePrecision]), $MachinePrecision] / y$46$im), $MachinePrecision] - N[(x$46$re / y$46$im), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 1.15e+95], 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], N[(N[(x$46$im / y$46$re), $MachinePrecision] - N[(N[(y$46$im / y$46$re), $MachinePrecision] * N[(x$46$re / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq -1.22 \cdot 10^{+14}:\\
\;\;\;\;\frac{x.im - x.re \cdot \frac{y.im}{y.re}}{y.re}\\
\mathbf{elif}\;y.re \leq 1.1 \cdot 10^{-73}:\\
\;\;\;\;\frac{x.im \cdot \frac{y.re}{y.im}}{y.im} - \frac{x.re}{y.im}\\
\mathbf{elif}\;y.re \leq 1.15 \cdot 10^{+95}:\\
\;\;\;\;\frac{x.im \cdot y.re - x.re \cdot y.im}{y.re \cdot y.re + y.im \cdot y.im}\\
\mathbf{else}:\\
\;\;\;\;\frac{x.im}{y.re} - \frac{y.im}{y.re} \cdot \frac{x.re}{y.re}\\
\end{array}
\end{array}
if y.re < -1.22e14Initial program 50.6%
div-sub50.6%
*-un-lft-identity50.6%
add-sqr-sqrt50.6%
times-frac50.6%
fma-neg50.6%
hypot-def50.6%
hypot-def62.0%
associate-/l*65.3%
add-sqr-sqrt65.3%
pow265.3%
hypot-def65.3%
Applied egg-rr65.3%
associate-/l*85.5%
distribute-neg-frac85.5%
Simplified85.5%
Taylor expanded in y.re around inf 71.1%
+-commutative71.1%
mul-1-neg71.1%
unsub-neg71.1%
*-commutative71.1%
unpow271.1%
times-frac80.3%
Simplified80.3%
associate-*r/80.3%
sub-div80.3%
Applied egg-rr80.3%
if -1.22e14 < y.re < 1.1e-73Initial program 74.4%
div-sub64.7%
*-un-lft-identity64.7%
add-sqr-sqrt64.7%
times-frac64.7%
fma-neg64.7%
hypot-def64.7%
hypot-def71.0%
associate-/l*79.1%
add-sqr-sqrt79.1%
pow279.1%
hypot-def79.1%
Applied egg-rr79.1%
associate-/l*79.5%
distribute-neg-frac79.5%
Simplified79.5%
Taylor expanded in y.re around 0 78.7%
+-commutative78.7%
mul-1-neg78.7%
unsub-neg78.7%
*-commutative78.7%
unpow278.7%
times-frac82.7%
Simplified82.7%
associate-*r/85.2%
Applied egg-rr85.2%
if 1.1e-73 < y.re < 1.14999999999999999e95Initial program 86.1%
if 1.14999999999999999e95 < y.re Initial program 31.5%
div-sub31.5%
*-un-lft-identity31.5%
add-sqr-sqrt31.5%
times-frac31.5%
fma-neg31.5%
hypot-def31.5%
hypot-def52.6%
associate-/l*54.9%
add-sqr-sqrt54.9%
pow254.9%
hypot-def54.9%
Applied egg-rr54.9%
associate-/l*87.1%
distribute-neg-frac87.1%
Simplified87.1%
Taylor expanded in y.re around inf 76.6%
+-commutative76.6%
mul-1-neg76.6%
unsub-neg76.6%
*-commutative76.6%
unpow276.6%
times-frac89.4%
Simplified89.4%
Final simplification84.8%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (- (* y.re (/ x.im (* y.im y.im))) (/ x.re y.im))))
(if (<= y.re -3.7e+14)
(/ (- x.im (* x.re (/ y.im y.re))) y.re)
(if (<= y.re -8.7e-221)
t_0
(if (<= y.re 1.16e-206)
(/ (- x.re) y.im)
(if (<= y.re 8.2e+49)
t_0
(/ (- x.im (* y.im (/ x.re y.re))) 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 * y_46_im))) - (x_46_re / y_46_im);
double tmp;
if (y_46_re <= -3.7e+14) {
tmp = (x_46_im - (x_46_re * (y_46_im / y_46_re))) / y_46_re;
} else if (y_46_re <= -8.7e-221) {
tmp = t_0;
} else if (y_46_re <= 1.16e-206) {
tmp = -x_46_re / y_46_im;
} else if (y_46_re <= 8.2e+49) {
tmp = t_0;
} else {
tmp = (x_46_im - (y_46_im * (x_46_re / y_46_re))) / y_46_re;
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
real(8) :: tmp
t_0 = (y_46re * (x_46im / (y_46im * y_46im))) - (x_46re / y_46im)
if (y_46re <= (-3.7d+14)) then
tmp = (x_46im - (x_46re * (y_46im / y_46re))) / y_46re
else if (y_46re <= (-8.7d-221)) then
tmp = t_0
else if (y_46re <= 1.16d-206) then
tmp = -x_46re / y_46im
else if (y_46re <= 8.2d+49) then
tmp = t_0
else
tmp = (x_46im - (y_46im * (x_46re / y_46re))) / y_46re
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = (y_46_re * (x_46_im / (y_46_im * y_46_im))) - (x_46_re / y_46_im);
double tmp;
if (y_46_re <= -3.7e+14) {
tmp = (x_46_im - (x_46_re * (y_46_im / y_46_re))) / y_46_re;
} else if (y_46_re <= -8.7e-221) {
tmp = t_0;
} else if (y_46_re <= 1.16e-206) {
tmp = -x_46_re / y_46_im;
} else if (y_46_re <= 8.2e+49) {
tmp = t_0;
} else {
tmp = (x_46_im - (y_46_im * (x_46_re / y_46_re))) / 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 * y_46_im))) - (x_46_re / y_46_im) tmp = 0 if y_46_re <= -3.7e+14: tmp = (x_46_im - (x_46_re * (y_46_im / y_46_re))) / y_46_re elif y_46_re <= -8.7e-221: tmp = t_0 elif y_46_re <= 1.16e-206: tmp = -x_46_re / y_46_im elif y_46_re <= 8.2e+49: tmp = t_0 else: tmp = (x_46_im - (y_46_im * (x_46_re / y_46_re))) / y_46_re return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(Float64(y_46_re * Float64(x_46_im / Float64(y_46_im * y_46_im))) - Float64(x_46_re / y_46_im)) tmp = 0.0 if (y_46_re <= -3.7e+14) tmp = Float64(Float64(x_46_im - Float64(x_46_re * Float64(y_46_im / y_46_re))) / y_46_re); elseif (y_46_re <= -8.7e-221) tmp = t_0; elseif (y_46_re <= 1.16e-206) tmp = Float64(Float64(-x_46_re) / y_46_im); elseif (y_46_re <= 8.2e+49) tmp = t_0; else tmp = Float64(Float64(x_46_im - Float64(y_46_im * Float64(x_46_re / y_46_re))) / y_46_re); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = (y_46_re * (x_46_im / (y_46_im * y_46_im))) - (x_46_re / y_46_im); tmp = 0.0; if (y_46_re <= -3.7e+14) tmp = (x_46_im - (x_46_re * (y_46_im / y_46_re))) / y_46_re; elseif (y_46_re <= -8.7e-221) tmp = t_0; elseif (y_46_re <= 1.16e-206) tmp = -x_46_re / y_46_im; elseif (y_46_re <= 8.2e+49) tmp = t_0; else tmp = (x_46_im - (y_46_im * (x_46_re / y_46_re))) / 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[(y$46$re * N[(x$46$im / N[(y$46$im * y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x$46$re / y$46$im), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -3.7e+14], N[(N[(x$46$im - N[(x$46$re * N[(y$46$im / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y$46$re), $MachinePrecision], If[LessEqual[y$46$re, -8.7e-221], t$95$0, If[LessEqual[y$46$re, 1.16e-206], N[((-x$46$re) / y$46$im), $MachinePrecision], If[LessEqual[y$46$re, 8.2e+49], t$95$0, N[(N[(x$46$im - N[(y$46$im * N[(x$46$re / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y$46$re), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \frac{x.im}{y.im \cdot y.im} - \frac{x.re}{y.im}\\
\mathbf{if}\;y.re \leq -3.7 \cdot 10^{+14}:\\
\;\;\;\;\frac{x.im - x.re \cdot \frac{y.im}{y.re}}{y.re}\\
\mathbf{elif}\;y.re \leq -8.7 \cdot 10^{-221}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y.re \leq 1.16 \cdot 10^{-206}:\\
\;\;\;\;\frac{-x.re}{y.im}\\
\mathbf{elif}\;y.re \leq 8.2 \cdot 10^{+49}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{x.im - y.im \cdot \frac{x.re}{y.re}}{y.re}\\
\end{array}
\end{array}
if y.re < -3.7e14Initial program 50.6%
div-sub50.6%
*-un-lft-identity50.6%
add-sqr-sqrt50.6%
times-frac50.6%
fma-neg50.6%
hypot-def50.6%
hypot-def62.0%
associate-/l*65.3%
add-sqr-sqrt65.3%
pow265.3%
hypot-def65.3%
Applied egg-rr65.3%
associate-/l*85.5%
distribute-neg-frac85.5%
Simplified85.5%
Taylor expanded in y.re around inf 71.1%
+-commutative71.1%
mul-1-neg71.1%
unsub-neg71.1%
*-commutative71.1%
unpow271.1%
times-frac80.3%
Simplified80.3%
associate-*r/80.3%
sub-div80.3%
Applied egg-rr80.3%
if -3.7e14 < y.re < -8.7000000000000003e-221 or 1.16000000000000004e-206 < y.re < 8.2e49Initial program 77.0%
Taylor expanded in y.re around 0 76.7%
+-commutative76.7%
mul-1-neg76.7%
unsub-neg76.7%
unpow276.7%
associate-/l*74.6%
associate-/r/76.7%
Simplified76.7%
if -8.7000000000000003e-221 < y.re < 1.16000000000000004e-206Initial program 70.9%
Taylor expanded in y.re around 0 83.8%
associate-*r/83.8%
neg-mul-183.8%
Simplified83.8%
if 8.2e49 < y.re Initial program 44.8%
div-sub44.8%
*-un-lft-identity44.8%
add-sqr-sqrt44.8%
times-frac44.8%
fma-neg44.8%
hypot-def44.8%
hypot-def61.7%
associate-/l*63.6%
add-sqr-sqrt63.6%
pow263.6%
hypot-def63.6%
Applied egg-rr63.6%
associate-/l*89.5%
distribute-neg-frac89.5%
Simplified89.5%
Taylor expanded in y.re around inf 72.7%
+-commutative72.7%
mul-1-neg72.7%
unsub-neg72.7%
*-commutative72.7%
unpow272.7%
times-frac83.0%
Simplified83.0%
associate-*l/82.9%
sub-div82.9%
Applied egg-rr82.9%
Final simplification80.3%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (<= y.re -5.6e+14)
(/ (- x.im (* x.re (/ y.im y.re))) y.re)
(if (<= y.re 2.4e+49)
(- (* (/ y.re y.im) (/ x.im y.im)) (/ x.re y.im))
(/ (- x.im (* y.im (/ x.re y.re))) y.re))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_re <= -5.6e+14) {
tmp = (x_46_im - (x_46_re * (y_46_im / y_46_re))) / y_46_re;
} else if (y_46_re <= 2.4e+49) {
tmp = ((y_46_re / y_46_im) * (x_46_im / y_46_im)) - (x_46_re / y_46_im);
} else {
tmp = (x_46_im - (y_46_im * (x_46_re / y_46_re))) / y_46_re;
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: tmp
if (y_46re <= (-5.6d+14)) then
tmp = (x_46im - (x_46re * (y_46im / y_46re))) / y_46re
else if (y_46re <= 2.4d+49) then
tmp = ((y_46re / y_46im) * (x_46im / y_46im)) - (x_46re / y_46im)
else
tmp = (x_46im - (y_46im * (x_46re / y_46re))) / y_46re
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_re <= -5.6e+14) {
tmp = (x_46_im - (x_46_re * (y_46_im / y_46_re))) / y_46_re;
} else if (y_46_re <= 2.4e+49) {
tmp = ((y_46_re / y_46_im) * (x_46_im / y_46_im)) - (x_46_re / y_46_im);
} else {
tmp = (x_46_im - (y_46_im * (x_46_re / y_46_re))) / y_46_re;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if y_46_re <= -5.6e+14: tmp = (x_46_im - (x_46_re * (y_46_im / y_46_re))) / y_46_re elif y_46_re <= 2.4e+49: tmp = ((y_46_re / y_46_im) * (x_46_im / y_46_im)) - (x_46_re / y_46_im) else: tmp = (x_46_im - (y_46_im * (x_46_re / y_46_re))) / y_46_re return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if (y_46_re <= -5.6e+14) tmp = Float64(Float64(x_46_im - Float64(x_46_re * Float64(y_46_im / y_46_re))) / y_46_re); elseif (y_46_re <= 2.4e+49) tmp = Float64(Float64(Float64(y_46_re / y_46_im) * Float64(x_46_im / y_46_im)) - Float64(x_46_re / y_46_im)); else tmp = Float64(Float64(x_46_im - Float64(y_46_im * Float64(x_46_re / y_46_re))) / y_46_re); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if (y_46_re <= -5.6e+14) tmp = (x_46_im - (x_46_re * (y_46_im / y_46_re))) / y_46_re; elseif (y_46_re <= 2.4e+49) tmp = ((y_46_re / y_46_im) * (x_46_im / y_46_im)) - (x_46_re / y_46_im); else tmp = (x_46_im - (y_46_im * (x_46_re / y_46_re))) / y_46_re; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[y$46$re, -5.6e+14], N[(N[(x$46$im - N[(x$46$re * N[(y$46$im / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y$46$re), $MachinePrecision], If[LessEqual[y$46$re, 2.4e+49], N[(N[(N[(y$46$re / y$46$im), $MachinePrecision] * N[(x$46$im / y$46$im), $MachinePrecision]), $MachinePrecision] - N[(x$46$re / y$46$im), $MachinePrecision]), $MachinePrecision], N[(N[(x$46$im - N[(y$46$im * N[(x$46$re / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y$46$re), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq -5.6 \cdot 10^{+14}:\\
\;\;\;\;\frac{x.im - x.re \cdot \frac{y.im}{y.re}}{y.re}\\
\mathbf{elif}\;y.re \leq 2.4 \cdot 10^{+49}:\\
\;\;\;\;\frac{y.re}{y.im} \cdot \frac{x.im}{y.im} - \frac{x.re}{y.im}\\
\mathbf{else}:\\
\;\;\;\;\frac{x.im - y.im \cdot \frac{x.re}{y.re}}{y.re}\\
\end{array}
\end{array}
if y.re < -5.6e14Initial program 50.6%
div-sub50.6%
*-un-lft-identity50.6%
add-sqr-sqrt50.6%
times-frac50.6%
fma-neg50.6%
hypot-def50.6%
hypot-def62.0%
associate-/l*65.3%
add-sqr-sqrt65.3%
pow265.3%
hypot-def65.3%
Applied egg-rr65.3%
associate-/l*85.5%
distribute-neg-frac85.5%
Simplified85.5%
Taylor expanded in y.re around inf 71.1%
+-commutative71.1%
mul-1-neg71.1%
unsub-neg71.1%
*-commutative71.1%
unpow271.1%
times-frac80.3%
Simplified80.3%
associate-*r/80.3%
sub-div80.3%
Applied egg-rr80.3%
if -5.6e14 < y.re < 2.4e49Initial program 74.9%
div-sub66.5%
*-un-lft-identity66.5%
add-sqr-sqrt66.5%
times-frac66.5%
fma-neg66.5%
hypot-def66.5%
hypot-def71.9%
associate-/l*79.0%
add-sqr-sqrt79.0%
pow279.0%
hypot-def79.0%
Applied egg-rr79.0%
associate-/l*79.4%
distribute-neg-frac79.4%
Simplified79.4%
Taylor expanded in y.re around 0 76.9%
+-commutative76.9%
mul-1-neg76.9%
unsub-neg76.9%
*-commutative76.9%
unpow276.9%
times-frac80.4%
Simplified80.4%
if 2.4e49 < y.re Initial program 44.8%
div-sub44.8%
*-un-lft-identity44.8%
add-sqr-sqrt44.8%
times-frac44.8%
fma-neg44.8%
hypot-def44.8%
hypot-def61.7%
associate-/l*63.6%
add-sqr-sqrt63.6%
pow263.6%
hypot-def63.6%
Applied egg-rr63.6%
associate-/l*89.5%
distribute-neg-frac89.5%
Simplified89.5%
Taylor expanded in y.re around inf 72.7%
+-commutative72.7%
mul-1-neg72.7%
unsub-neg72.7%
*-commutative72.7%
unpow272.7%
times-frac83.0%
Simplified83.0%
associate-*l/82.9%
sub-div82.9%
Applied egg-rr82.9%
Final simplification80.9%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (<= y.re -22000000000000.0)
(/ (- x.im (* x.re (/ y.im y.re))) y.re)
(if (<= y.re 1.8e+50)
(- (* (/ y.re y.im) (/ x.im y.im)) (/ x.re y.im))
(- (/ x.im y.re) (* (/ y.im y.re) (/ x.re y.re))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_re <= -22000000000000.0) {
tmp = (x_46_im - (x_46_re * (y_46_im / y_46_re))) / y_46_re;
} else if (y_46_re <= 1.8e+50) {
tmp = ((y_46_re / y_46_im) * (x_46_im / y_46_im)) - (x_46_re / y_46_im);
} else {
tmp = (x_46_im / y_46_re) - ((y_46_im / y_46_re) * (x_46_re / y_46_re));
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: tmp
if (y_46re <= (-22000000000000.0d0)) then
tmp = (x_46im - (x_46re * (y_46im / y_46re))) / y_46re
else if (y_46re <= 1.8d+50) then
tmp = ((y_46re / y_46im) * (x_46im / y_46im)) - (x_46re / y_46im)
else
tmp = (x_46im / y_46re) - ((y_46im / y_46re) * (x_46re / y_46re))
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_re <= -22000000000000.0) {
tmp = (x_46_im - (x_46_re * (y_46_im / y_46_re))) / y_46_re;
} else if (y_46_re <= 1.8e+50) {
tmp = ((y_46_re / y_46_im) * (x_46_im / y_46_im)) - (x_46_re / y_46_im);
} else {
tmp = (x_46_im / y_46_re) - ((y_46_im / y_46_re) * (x_46_re / y_46_re));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if y_46_re <= -22000000000000.0: tmp = (x_46_im - (x_46_re * (y_46_im / y_46_re))) / y_46_re elif y_46_re <= 1.8e+50: tmp = ((y_46_re / y_46_im) * (x_46_im / y_46_im)) - (x_46_re / y_46_im) else: tmp = (x_46_im / y_46_re) - ((y_46_im / y_46_re) * (x_46_re / y_46_re)) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if (y_46_re <= -22000000000000.0) tmp = Float64(Float64(x_46_im - Float64(x_46_re * Float64(y_46_im / y_46_re))) / y_46_re); elseif (y_46_re <= 1.8e+50) tmp = Float64(Float64(Float64(y_46_re / y_46_im) * Float64(x_46_im / y_46_im)) - Float64(x_46_re / y_46_im)); else tmp = Float64(Float64(x_46_im / y_46_re) - Float64(Float64(y_46_im / y_46_re) * Float64(x_46_re / y_46_re))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if (y_46_re <= -22000000000000.0) tmp = (x_46_im - (x_46_re * (y_46_im / y_46_re))) / y_46_re; elseif (y_46_re <= 1.8e+50) tmp = ((y_46_re / y_46_im) * (x_46_im / y_46_im)) - (x_46_re / y_46_im); else tmp = (x_46_im / y_46_re) - ((y_46_im / y_46_re) * (x_46_re / y_46_re)); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[y$46$re, -22000000000000.0], N[(N[(x$46$im - N[(x$46$re * N[(y$46$im / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y$46$re), $MachinePrecision], If[LessEqual[y$46$re, 1.8e+50], N[(N[(N[(y$46$re / y$46$im), $MachinePrecision] * N[(x$46$im / y$46$im), $MachinePrecision]), $MachinePrecision] - N[(x$46$re / y$46$im), $MachinePrecision]), $MachinePrecision], N[(N[(x$46$im / y$46$re), $MachinePrecision] - N[(N[(y$46$im / y$46$re), $MachinePrecision] * N[(x$46$re / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq -22000000000000:\\
\;\;\;\;\frac{x.im - x.re \cdot \frac{y.im}{y.re}}{y.re}\\
\mathbf{elif}\;y.re \leq 1.8 \cdot 10^{+50}:\\
\;\;\;\;\frac{y.re}{y.im} \cdot \frac{x.im}{y.im} - \frac{x.re}{y.im}\\
\mathbf{else}:\\
\;\;\;\;\frac{x.im}{y.re} - \frac{y.im}{y.re} \cdot \frac{x.re}{y.re}\\
\end{array}
\end{array}
if y.re < -2.2e13Initial program 50.6%
div-sub50.6%
*-un-lft-identity50.6%
add-sqr-sqrt50.6%
times-frac50.6%
fma-neg50.6%
hypot-def50.6%
hypot-def62.0%
associate-/l*65.3%
add-sqr-sqrt65.3%
pow265.3%
hypot-def65.3%
Applied egg-rr65.3%
associate-/l*85.5%
distribute-neg-frac85.5%
Simplified85.5%
Taylor expanded in y.re around inf 71.1%
+-commutative71.1%
mul-1-neg71.1%
unsub-neg71.1%
*-commutative71.1%
unpow271.1%
times-frac80.3%
Simplified80.3%
associate-*r/80.3%
sub-div80.3%
Applied egg-rr80.3%
if -2.2e13 < y.re < 1.79999999999999993e50Initial program 74.9%
div-sub66.5%
*-un-lft-identity66.5%
add-sqr-sqrt66.5%
times-frac66.5%
fma-neg66.5%
hypot-def66.5%
hypot-def71.9%
associate-/l*79.0%
add-sqr-sqrt79.0%
pow279.0%
hypot-def79.0%
Applied egg-rr79.0%
associate-/l*79.4%
distribute-neg-frac79.4%
Simplified79.4%
Taylor expanded in y.re around 0 76.9%
+-commutative76.9%
mul-1-neg76.9%
unsub-neg76.9%
*-commutative76.9%
unpow276.9%
times-frac80.4%
Simplified80.4%
if 1.79999999999999993e50 < y.re Initial program 44.8%
div-sub44.8%
*-un-lft-identity44.8%
add-sqr-sqrt44.8%
times-frac44.8%
fma-neg44.8%
hypot-def44.8%
hypot-def61.7%
associate-/l*63.6%
add-sqr-sqrt63.6%
pow263.6%
hypot-def63.6%
Applied egg-rr63.6%
associate-/l*89.5%
distribute-neg-frac89.5%
Simplified89.5%
Taylor expanded in y.re around inf 72.7%
+-commutative72.7%
mul-1-neg72.7%
unsub-neg72.7%
*-commutative72.7%
unpow272.7%
times-frac83.0%
Simplified83.0%
Final simplification80.9%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (<= y.re -3.8e+14)
(/ (- x.im (* x.re (/ y.im y.re))) y.re)
(if (<= y.re 2.7e+51)
(- (/ (* x.im (/ y.re y.im)) y.im) (/ x.re y.im))
(- (/ x.im y.re) (* (/ y.im y.re) (/ x.re y.re))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_re <= -3.8e+14) {
tmp = (x_46_im - (x_46_re * (y_46_im / y_46_re))) / y_46_re;
} else if (y_46_re <= 2.7e+51) {
tmp = ((x_46_im * (y_46_re / y_46_im)) / y_46_im) - (x_46_re / y_46_im);
} else {
tmp = (x_46_im / y_46_re) - ((y_46_im / y_46_re) * (x_46_re / y_46_re));
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: tmp
if (y_46re <= (-3.8d+14)) then
tmp = (x_46im - (x_46re * (y_46im / y_46re))) / y_46re
else if (y_46re <= 2.7d+51) then
tmp = ((x_46im * (y_46re / y_46im)) / y_46im) - (x_46re / y_46im)
else
tmp = (x_46im / y_46re) - ((y_46im / y_46re) * (x_46re / y_46re))
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_re <= -3.8e+14) {
tmp = (x_46_im - (x_46_re * (y_46_im / y_46_re))) / y_46_re;
} else if (y_46_re <= 2.7e+51) {
tmp = ((x_46_im * (y_46_re / y_46_im)) / y_46_im) - (x_46_re / y_46_im);
} else {
tmp = (x_46_im / y_46_re) - ((y_46_im / y_46_re) * (x_46_re / y_46_re));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if y_46_re <= -3.8e+14: tmp = (x_46_im - (x_46_re * (y_46_im / y_46_re))) / y_46_re elif y_46_re <= 2.7e+51: tmp = ((x_46_im * (y_46_re / y_46_im)) / y_46_im) - (x_46_re / y_46_im) else: tmp = (x_46_im / y_46_re) - ((y_46_im / y_46_re) * (x_46_re / y_46_re)) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if (y_46_re <= -3.8e+14) tmp = Float64(Float64(x_46_im - Float64(x_46_re * Float64(y_46_im / y_46_re))) / y_46_re); elseif (y_46_re <= 2.7e+51) tmp = Float64(Float64(Float64(x_46_im * Float64(y_46_re / y_46_im)) / y_46_im) - Float64(x_46_re / y_46_im)); else tmp = Float64(Float64(x_46_im / y_46_re) - Float64(Float64(y_46_im / y_46_re) * Float64(x_46_re / y_46_re))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if (y_46_re <= -3.8e+14) tmp = (x_46_im - (x_46_re * (y_46_im / y_46_re))) / y_46_re; elseif (y_46_re <= 2.7e+51) tmp = ((x_46_im * (y_46_re / y_46_im)) / y_46_im) - (x_46_re / y_46_im); else tmp = (x_46_im / y_46_re) - ((y_46_im / y_46_re) * (x_46_re / y_46_re)); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[y$46$re, -3.8e+14], N[(N[(x$46$im - N[(x$46$re * N[(y$46$im / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y$46$re), $MachinePrecision], If[LessEqual[y$46$re, 2.7e+51], N[(N[(N[(x$46$im * N[(y$46$re / y$46$im), $MachinePrecision]), $MachinePrecision] / y$46$im), $MachinePrecision] - N[(x$46$re / y$46$im), $MachinePrecision]), $MachinePrecision], N[(N[(x$46$im / y$46$re), $MachinePrecision] - N[(N[(y$46$im / y$46$re), $MachinePrecision] * N[(x$46$re / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq -3.8 \cdot 10^{+14}:\\
\;\;\;\;\frac{x.im - x.re \cdot \frac{y.im}{y.re}}{y.re}\\
\mathbf{elif}\;y.re \leq 2.7 \cdot 10^{+51}:\\
\;\;\;\;\frac{x.im \cdot \frac{y.re}{y.im}}{y.im} - \frac{x.re}{y.im}\\
\mathbf{else}:\\
\;\;\;\;\frac{x.im}{y.re} - \frac{y.im}{y.re} \cdot \frac{x.re}{y.re}\\
\end{array}
\end{array}
if y.re < -3.8e14Initial program 50.6%
div-sub50.6%
*-un-lft-identity50.6%
add-sqr-sqrt50.6%
times-frac50.6%
fma-neg50.6%
hypot-def50.6%
hypot-def62.0%
associate-/l*65.3%
add-sqr-sqrt65.3%
pow265.3%
hypot-def65.3%
Applied egg-rr65.3%
associate-/l*85.5%
distribute-neg-frac85.5%
Simplified85.5%
Taylor expanded in y.re around inf 71.1%
+-commutative71.1%
mul-1-neg71.1%
unsub-neg71.1%
*-commutative71.1%
unpow271.1%
times-frac80.3%
Simplified80.3%
associate-*r/80.3%
sub-div80.3%
Applied egg-rr80.3%
if -3.8e14 < y.re < 2.69999999999999992e51Initial program 74.9%
div-sub66.5%
*-un-lft-identity66.5%
add-sqr-sqrt66.5%
times-frac66.5%
fma-neg66.5%
hypot-def66.5%
hypot-def71.9%
associate-/l*79.0%
add-sqr-sqrt79.0%
pow279.0%
hypot-def79.0%
Applied egg-rr79.0%
associate-/l*79.4%
distribute-neg-frac79.4%
Simplified79.4%
Taylor expanded in y.re around 0 76.9%
+-commutative76.9%
mul-1-neg76.9%
unsub-neg76.9%
*-commutative76.9%
unpow276.9%
times-frac80.4%
Simplified80.4%
associate-*r/82.5%
Applied egg-rr82.5%
if 2.69999999999999992e51 < y.re Initial program 44.8%
div-sub44.8%
*-un-lft-identity44.8%
add-sqr-sqrt44.8%
times-frac44.8%
fma-neg44.8%
hypot-def44.8%
hypot-def61.7%
associate-/l*63.6%
add-sqr-sqrt63.6%
pow263.6%
hypot-def63.6%
Applied egg-rr63.6%
associate-/l*89.5%
distribute-neg-frac89.5%
Simplified89.5%
Taylor expanded in y.re around inf 72.7%
+-commutative72.7%
mul-1-neg72.7%
unsub-neg72.7%
*-commutative72.7%
unpow272.7%
times-frac83.0%
Simplified83.0%
Final simplification82.1%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (or (<= y.re -420000000000.0) (not (<= y.re 1.35e+47))) (/ (- x.im (* y.im (/ x.re y.re))) 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 <= -420000000000.0) || !(y_46_re <= 1.35e+47)) {
tmp = (x_46_im - (y_46_im * (x_46_re / y_46_re))) / 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 <= (-420000000000.0d0)) .or. (.not. (y_46re <= 1.35d+47))) then
tmp = (x_46im - (y_46im * (x_46re / y_46re))) / 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 <= -420000000000.0) || !(y_46_re <= 1.35e+47)) {
tmp = (x_46_im - (y_46_im * (x_46_re / y_46_re))) / 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 <= -420000000000.0) or not (y_46_re <= 1.35e+47): tmp = (x_46_im - (y_46_im * (x_46_re / y_46_re))) / 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 <= -420000000000.0) || !(y_46_re <= 1.35e+47)) tmp = Float64(Float64(x_46_im - Float64(y_46_im * Float64(x_46_re / y_46_re))) / 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 <= -420000000000.0) || ~((y_46_re <= 1.35e+47))) tmp = (x_46_im - (y_46_im * (x_46_re / y_46_re))) / 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, -420000000000.0], N[Not[LessEqual[y$46$re, 1.35e+47]], $MachinePrecision]], N[(N[(x$46$im - N[(y$46$im * N[(x$46$re / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y$46$re), $MachinePrecision], N[((-x$46$re) / y$46$im), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq -420000000000 \lor \neg \left(y.re \leq 1.35 \cdot 10^{+47}\right):\\
\;\;\;\;\frac{x.im - y.im \cdot \frac{x.re}{y.re}}{y.re}\\
\mathbf{else}:\\
\;\;\;\;\frac{-x.re}{y.im}\\
\end{array}
\end{array}
if y.re < -4.2e11 or 1.34999999999999998e47 < y.re Initial program 48.0%
div-sub48.0%
*-un-lft-identity48.0%
add-sqr-sqrt48.0%
times-frac47.9%
fma-neg47.9%
hypot-def47.9%
hypot-def61.9%
associate-/l*64.5%
add-sqr-sqrt64.5%
pow264.5%
hypot-def64.5%
Applied egg-rr64.5%
associate-/l*87.3%
distribute-neg-frac87.3%
Simplified87.3%
Taylor expanded in y.re around inf 71.8%
+-commutative71.8%
mul-1-neg71.8%
unsub-neg71.8%
*-commutative71.8%
unpow271.8%
times-frac81.5%
Simplified81.5%
associate-*l/81.5%
sub-div81.5%
Applied egg-rr81.5%
if -4.2e11 < y.re < 1.34999999999999998e47Initial program 74.9%
Taylor expanded in y.re around 0 65.2%
associate-*r/65.2%
neg-mul-165.2%
Simplified65.2%
Final simplification73.1%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (or (<= y.im -1.8e+128) (not (<= y.im 1.1e+141))) (/ (- x.re) y.im) (/ (- x.im (* x.re (/ y.im y.re))) y.re)))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_im <= -1.8e+128) || !(y_46_im <= 1.1e+141)) {
tmp = -x_46_re / y_46_im;
} else {
tmp = (x_46_im - (x_46_re * (y_46_im / y_46_re))) / y_46_re;
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: tmp
if ((y_46im <= (-1.8d+128)) .or. (.not. (y_46im <= 1.1d+141))) then
tmp = -x_46re / y_46im
else
tmp = (x_46im - (x_46re * (y_46im / y_46re))) / y_46re
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_im <= -1.8e+128) || !(y_46_im <= 1.1e+141)) {
tmp = -x_46_re / y_46_im;
} else {
tmp = (x_46_im - (x_46_re * (y_46_im / y_46_re))) / y_46_re;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if (y_46_im <= -1.8e+128) or not (y_46_im <= 1.1e+141): tmp = -x_46_re / y_46_im else: tmp = (x_46_im - (x_46_re * (y_46_im / y_46_re))) / y_46_re return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if ((y_46_im <= -1.8e+128) || !(y_46_im <= 1.1e+141)) tmp = Float64(Float64(-x_46_re) / y_46_im); else tmp = Float64(Float64(x_46_im - Float64(x_46_re * Float64(y_46_im / y_46_re))) / y_46_re); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if ((y_46_im <= -1.8e+128) || ~((y_46_im <= 1.1e+141))) tmp = -x_46_re / y_46_im; else tmp = (x_46_im - (x_46_re * (y_46_im / y_46_re))) / y_46_re; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[Or[LessEqual[y$46$im, -1.8e+128], N[Not[LessEqual[y$46$im, 1.1e+141]], $MachinePrecision]], N[((-x$46$re) / y$46$im), $MachinePrecision], N[(N[(x$46$im - N[(x$46$re * N[(y$46$im / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y$46$re), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.im \leq -1.8 \cdot 10^{+128} \lor \neg \left(y.im \leq 1.1 \cdot 10^{+141}\right):\\
\;\;\;\;\frac{-x.re}{y.im}\\
\mathbf{else}:\\
\;\;\;\;\frac{x.im - x.re \cdot \frac{y.im}{y.re}}{y.re}\\
\end{array}
\end{array}
if y.im < -1.80000000000000014e128 or 1.1e141 < y.im Initial program 45.0%
Taylor expanded in y.re around 0 78.2%
associate-*r/78.2%
neg-mul-178.2%
Simplified78.2%
if -1.80000000000000014e128 < y.im < 1.1e141Initial program 69.2%
div-sub63.0%
*-un-lft-identity63.0%
add-sqr-sqrt63.0%
times-frac63.0%
fma-neg63.0%
hypot-def63.0%
hypot-def75.5%
associate-/l*81.5%
add-sqr-sqrt81.5%
pow281.5%
hypot-def81.5%
Applied egg-rr81.5%
associate-/l*92.5%
distribute-neg-frac92.5%
Simplified92.5%
Taylor expanded in y.re around inf 61.1%
+-commutative61.1%
mul-1-neg61.1%
unsub-neg61.1%
*-commutative61.1%
unpow261.1%
times-frac68.9%
Simplified68.9%
associate-*r/69.5%
sub-div71.2%
Applied egg-rr71.2%
Final simplification73.3%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (<= y.re -2.5e-10) (/ x.im y.re) (if (<= y.re 2.75e+51) (/ (- 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_re <= -2.5e-10) {
tmp = x_46_im / y_46_re;
} else if (y_46_re <= 2.75e+51) {
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_46re <= (-2.5d-10)) then
tmp = x_46im / y_46re
else if (y_46re <= 2.75d+51) 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_re <= -2.5e-10) {
tmp = x_46_im / y_46_re;
} else if (y_46_re <= 2.75e+51) {
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_re <= -2.5e-10: tmp = x_46_im / y_46_re elif y_46_re <= 2.75e+51: 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_re <= -2.5e-10) tmp = Float64(x_46_im / y_46_re); elseif (y_46_re <= 2.75e+51) tmp = Float64(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_re <= -2.5e-10) tmp = x_46_im / y_46_re; elseif (y_46_re <= 2.75e+51) 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[LessEqual[y$46$re, -2.5e-10], N[(x$46$im / y$46$re), $MachinePrecision], If[LessEqual[y$46$re, 2.75e+51], 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.re \leq -2.5 \cdot 10^{-10}:\\
\;\;\;\;\frac{x.im}{y.re}\\
\mathbf{elif}\;y.re \leq 2.75 \cdot 10^{+51}:\\
\;\;\;\;\frac{-x.re}{y.im}\\
\mathbf{else}:\\
\;\;\;\;\frac{x.im}{y.re}\\
\end{array}
\end{array}
if y.re < -2.50000000000000016e-10 or 2.75e51 < y.re Initial program 48.8%
Taylor expanded in y.re around inf 68.5%
if -2.50000000000000016e-10 < y.re < 2.75e51Initial program 74.9%
Taylor expanded in y.re around 0 65.7%
associate-*r/65.7%
neg-mul-165.7%
Simplified65.7%
Final simplification67.1%
(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 62.0%
Taylor expanded in y.re around inf 41.8%
Final simplification41.8%
herbie shell --seed 2023275
(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))))