
(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 12 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 (- (* x.im y.re) (* x.re y.im)))
(t_1 (/ t_0 (+ (* y.re y.re) (* y.im y.im))))
(t_2 (fma y.re y.re (* y.im y.im))))
(if (<= t_1 (- INFINITY))
(- (/ y.re (/ t_2 x.im)) (* y.im (/ x.re t_2)))
(if (<= t_1 INFINITY)
(* (/ 1.0 (hypot y.re y.im)) (/ t_0 (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 t_1 = t_0 / ((y_46_re * y_46_re) + (y_46_im * y_46_im));
double t_2 = fma(y_46_re, y_46_re, (y_46_im * y_46_im));
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = (y_46_re / (t_2 / x_46_im)) - (y_46_im * (x_46_re / t_2));
} else if (t_1 <= ((double) INFINITY)) {
tmp = (1.0 / hypot(y_46_re, y_46_im)) * (t_0 / hypot(y_46_re, y_46_im));
} 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(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 = fma(y_46_re, y_46_re, Float64(y_46_im * y_46_im)) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = Float64(Float64(y_46_re / Float64(t_2 / x_46_im)) - Float64(y_46_im * Float64(x_46_re / t_2))); elseif (t_1 <= Inf) tmp = Float64(Float64(1.0 / hypot(y_46_re, y_46_im)) * Float64(t_0 / hypot(y_46_re, y_46_im))); else tmp = Float64(Float64(-x_46_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[(y$46$re * y$46$re + N[(y$46$im * y$46$im), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(N[(y$46$re / N[(t$95$2 / x$46$im), $MachinePrecision]), $MachinePrecision] - N[(y$46$im * N[(x$46$re / t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, Infinity], 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[((-x$46$re) / y$46$im), $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 := \mathsf{fma}\left(y.re, y.re, y.im \cdot y.im\right)\\
\mathbf{if}\;t_1 \leq -\infty:\\
\;\;\;\;\frac{y.re}{\frac{t_2}{x.im}} - y.im \cdot \frac{x.re}{t_2}\\
\mathbf{elif}\;t_1 \leq \infty:\\
\;\;\;\;\frac{1}{\mathsf{hypot}\left(y.re, y.im\right)} \cdot \frac{t_0}{\mathsf{hypot}\left(y.re, y.im\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{-x.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))) < -inf.0Initial program 41.5%
Taylor expanded in x.im around 0 25.6%
mul-1-neg25.6%
unsub-neg25.6%
associate-/l*54.9%
unpow254.9%
unpow254.9%
fma-udef54.9%
associate-/l*84.9%
associate-/r/84.9%
unpow284.9%
unpow284.9%
fma-udef84.9%
Simplified84.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))) < +inf.0Initial program 78.4%
*-un-lft-identity78.4%
add-sqr-sqrt78.4%
times-frac78.3%
hypot-def78.3%
hypot-def94.3%
Applied egg-rr94.3%
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%
Taylor expanded in y.re around 0 55.2%
associate-*r/55.2%
neg-mul-155.2%
Simplified55.2%
Final simplification87.0%
(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))) INFINITY)
(* (/ 1.0 (hypot y.re y.im)) (/ t_0 (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))) <= ((double) INFINITY)) {
tmp = (1.0 / hypot(y_46_re, y_46_im)) * (t_0 / hypot(y_46_re, y_46_im));
} 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 = (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))) <= Double.POSITIVE_INFINITY) {
tmp = (1.0 / Math.hypot(y_46_re, y_46_im)) * (t_0 / Math.hypot(y_46_re, y_46_im));
} else {
tmp = -x_46_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))) <= math.inf: tmp = (1.0 / math.hypot(y_46_re, y_46_im)) * (t_0 / math.hypot(y_46_re, y_46_im)) else: tmp = -x_46_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))) <= Inf) tmp = Float64(Float64(1.0 / hypot(y_46_re, y_46_im)) * Float64(t_0 / hypot(y_46_re, y_46_im))); else tmp = Float64(Float64(-x_46_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))) <= Inf) tmp = (1.0 / hypot(y_46_re, y_46_im)) * (t_0 / hypot(y_46_re, y_46_im)); 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[(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], Infinity], 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[((-x$46$re) / y$46$im), $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 \infty:\\
\;\;\;\;\frac{1}{\mathsf{hypot}\left(y.re, y.im\right)} \cdot \frac{t_0}{\mathsf{hypot}\left(y.re, y.im\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{-x.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))) < +inf.0Initial program 76.1%
*-un-lft-identity76.1%
add-sqr-sqrt76.1%
times-frac76.0%
hypot-def76.0%
hypot-def91.5%
Applied egg-rr91.5%
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%
Taylor expanded in y.re around 0 55.2%
associate-*r/55.2%
neg-mul-155.2%
Simplified55.2%
Final simplification85.1%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (/ 1.0 (hypot y.re y.im))) (t_1 (/ y.re (/ y.im x.im))))
(if (<= y.im -8.2e+69)
(* t_0 (- x.re t_1))
(if (<= y.im 5.6e-132)
(/ (- x.im (/ (* x.re y.im) y.re)) y.re)
(if (<= y.im 1.35e+51)
(/ (- (* x.im y.re) (* x.re y.im)) (+ (* y.re y.re) (* y.im y.im)))
(* t_0 (- t_1 x.re)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = 1.0 / hypot(y_46_re, y_46_im);
double t_1 = y_46_re / (y_46_im / x_46_im);
double tmp;
if (y_46_im <= -8.2e+69) {
tmp = t_0 * (x_46_re - t_1);
} else if (y_46_im <= 5.6e-132) {
tmp = (x_46_im - ((x_46_re * y_46_im) / y_46_re)) / y_46_re;
} else if (y_46_im <= 1.35e+51) {
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 = t_0 * (t_1 - x_46_re);
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = 1.0 / Math.hypot(y_46_re, y_46_im);
double t_1 = y_46_re / (y_46_im / x_46_im);
double tmp;
if (y_46_im <= -8.2e+69) {
tmp = t_0 * (x_46_re - t_1);
} else if (y_46_im <= 5.6e-132) {
tmp = (x_46_im - ((x_46_re * y_46_im) / y_46_re)) / y_46_re;
} else if (y_46_im <= 1.35e+51) {
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 = t_0 * (t_1 - x_46_re);
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = 1.0 / math.hypot(y_46_re, y_46_im) t_1 = y_46_re / (y_46_im / x_46_im) tmp = 0 if y_46_im <= -8.2e+69: tmp = t_0 * (x_46_re - t_1) elif y_46_im <= 5.6e-132: tmp = (x_46_im - ((x_46_re * y_46_im) / y_46_re)) / y_46_re elif y_46_im <= 1.35e+51: 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 = t_0 * (t_1 - x_46_re) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(1.0 / hypot(y_46_re, y_46_im)) t_1 = Float64(y_46_re / Float64(y_46_im / x_46_im)) tmp = 0.0 if (y_46_im <= -8.2e+69) tmp = Float64(t_0 * Float64(x_46_re - t_1)); elseif (y_46_im <= 5.6e-132) tmp = Float64(Float64(x_46_im - Float64(Float64(x_46_re * y_46_im) / y_46_re)) / y_46_re); elseif (y_46_im <= 1.35e+51) 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(t_0 * Float64(t_1 - x_46_re)); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = 1.0 / hypot(y_46_re, y_46_im); t_1 = y_46_re / (y_46_im / x_46_im); tmp = 0.0; if (y_46_im <= -8.2e+69) tmp = t_0 * (x_46_re - t_1); elseif (y_46_im <= 5.6e-132) tmp = (x_46_im - ((x_46_re * y_46_im) / y_46_re)) / y_46_re; elseif (y_46_im <= 1.35e+51) 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 = t_0 * (t_1 - x_46_re); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(1.0 / N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(y$46$re / N[(y$46$im / x$46$im), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -8.2e+69], N[(t$95$0 * N[(x$46$re - t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 5.6e-132], N[(N[(x$46$im - N[(N[(x$46$re * y$46$im), $MachinePrecision] / y$46$re), $MachinePrecision]), $MachinePrecision] / y$46$re), $MachinePrecision], If[LessEqual[y$46$im, 1.35e+51], 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[(t$95$0 * N[(t$95$1 - x$46$re), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{1}{\mathsf{hypot}\left(y.re, y.im\right)}\\
t_1 := \frac{y.re}{\frac{y.im}{x.im}}\\
\mathbf{if}\;y.im \leq -8.2 \cdot 10^{+69}:\\
\;\;\;\;t_0 \cdot \left(x.re - t_1\right)\\
\mathbf{elif}\;y.im \leq 5.6 \cdot 10^{-132}:\\
\;\;\;\;\frac{x.im - \frac{x.re \cdot y.im}{y.re}}{y.re}\\
\mathbf{elif}\;y.im \leq 1.35 \cdot 10^{+51}:\\
\;\;\;\;\frac{x.im \cdot y.re - x.re \cdot y.im}{y.re \cdot y.re + y.im \cdot y.im}\\
\mathbf{else}:\\
\;\;\;\;t_0 \cdot \left(t_1 - x.re\right)\\
\end{array}
\end{array}
if y.im < -8.1999999999999998e69Initial program 55.1%
*-un-lft-identity55.1%
add-sqr-sqrt55.1%
times-frac55.0%
hypot-def55.0%
hypot-def67.5%
Applied egg-rr67.5%
Taylor expanded in y.im around -inf 92.6%
+-commutative92.6%
mul-1-neg92.6%
unsub-neg92.6%
associate-/l*92.8%
Simplified92.8%
if -8.1999999999999998e69 < y.im < 5.60000000000000005e-132Initial program 70.9%
*-un-lft-identity70.9%
add-sqr-sqrt70.9%
times-frac70.9%
hypot-def70.9%
hypot-def84.7%
Applied egg-rr84.7%
Taylor expanded in y.re around inf 77.5%
mul-1-neg77.5%
unsub-neg77.5%
*-commutative77.5%
unpow277.5%
times-frac84.9%
Simplified84.9%
associate-*r/86.5%
sub-div87.4%
Applied egg-rr87.4%
associate-*l/87.5%
Applied egg-rr87.5%
if 5.60000000000000005e-132 < y.im < 1.34999999999999996e51Initial program 85.2%
if 1.34999999999999996e51 < y.im Initial program 42.4%
*-un-lft-identity42.4%
add-sqr-sqrt42.4%
times-frac42.3%
hypot-def42.3%
hypot-def57.9%
Applied egg-rr57.9%
Taylor expanded in y.re around 0 76.4%
neg-mul-176.4%
unsub-neg76.4%
associate-/l*78.4%
Simplified78.4%
Final simplification86.2%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (<= y.im -5.8e+67)
(* (/ 1.0 (hypot y.re y.im)) (- x.re (/ y.re (/ y.im x.im))))
(if (<= y.im 2.6e-129)
(/ (- x.im (/ (* x.re y.im) y.re)) y.re)
(if (<= y.im 9.5e+62)
(/ (- (* x.im y.re) (* x.re y.im)) (+ (* y.re y.re) (* y.im y.im)))
(- (* (/ y.re y.im) (/ x.im y.im)) (/ x.re y.im))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_im <= -5.8e+67) {
tmp = (1.0 / hypot(y_46_re, y_46_im)) * (x_46_re - (y_46_re / (y_46_im / x_46_im)));
} else if (y_46_im <= 2.6e-129) {
tmp = (x_46_im - ((x_46_re * y_46_im) / y_46_re)) / y_46_re;
} else if (y_46_im <= 9.5e+62) {
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 = ((y_46_re / y_46_im) * (x_46_im / 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 tmp;
if (y_46_im <= -5.8e+67) {
tmp = (1.0 / Math.hypot(y_46_re, y_46_im)) * (x_46_re - (y_46_re / (y_46_im / x_46_im)));
} else if (y_46_im <= 2.6e-129) {
tmp = (x_46_im - ((x_46_re * y_46_im) / y_46_re)) / y_46_re;
} else if (y_46_im <= 9.5e+62) {
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 = ((y_46_re / y_46_im) * (x_46_im / y_46_im)) - (x_46_re / y_46_im);
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if y_46_im <= -5.8e+67: tmp = (1.0 / math.hypot(y_46_re, y_46_im)) * (x_46_re - (y_46_re / (y_46_im / x_46_im))) elif y_46_im <= 2.6e-129: tmp = (x_46_im - ((x_46_re * y_46_im) / y_46_re)) / y_46_re elif y_46_im <= 9.5e+62: 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 = ((y_46_re / y_46_im) * (x_46_im / y_46_im)) - (x_46_re / y_46_im) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if (y_46_im <= -5.8e+67) tmp = Float64(Float64(1.0 / hypot(y_46_re, y_46_im)) * Float64(x_46_re - Float64(y_46_re / Float64(y_46_im / x_46_im)))); elseif (y_46_im <= 2.6e-129) tmp = Float64(Float64(x_46_im - Float64(Float64(x_46_re * y_46_im) / y_46_re)) / y_46_re); elseif (y_46_im <= 9.5e+62) 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(Float64(y_46_re / y_46_im) * Float64(x_46_im / y_46_im)) - Float64(x_46_re / y_46_im)); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if (y_46_im <= -5.8e+67) tmp = (1.0 / hypot(y_46_re, y_46_im)) * (x_46_re - (y_46_re / (y_46_im / x_46_im))); elseif (y_46_im <= 2.6e-129) tmp = (x_46_im - ((x_46_re * y_46_im) / y_46_re)) / y_46_re; elseif (y_46_im <= 9.5e+62) 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 = ((y_46_re / y_46_im) * (x_46_im / y_46_im)) - (x_46_re / y_46_im); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[y$46$im, -5.8e+67], N[(N[(1.0 / N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision]), $MachinePrecision] * N[(x$46$re - N[(y$46$re / N[(y$46$im / x$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 2.6e-129], N[(N[(x$46$im - N[(N[(x$46$re * y$46$im), $MachinePrecision] / y$46$re), $MachinePrecision]), $MachinePrecision] / y$46$re), $MachinePrecision], If[LessEqual[y$46$im, 9.5e+62], 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[(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]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.im \leq -5.8 \cdot 10^{+67}:\\
\;\;\;\;\frac{1}{\mathsf{hypot}\left(y.re, y.im\right)} \cdot \left(x.re - \frac{y.re}{\frac{y.im}{x.im}}\right)\\
\mathbf{elif}\;y.im \leq 2.6 \cdot 10^{-129}:\\
\;\;\;\;\frac{x.im - \frac{x.re \cdot y.im}{y.re}}{y.re}\\
\mathbf{elif}\;y.im \leq 9.5 \cdot 10^{+62}:\\
\;\;\;\;\frac{x.im \cdot y.re - x.re \cdot y.im}{y.re \cdot y.re + y.im \cdot y.im}\\
\mathbf{else}:\\
\;\;\;\;\frac{y.re}{y.im} \cdot \frac{x.im}{y.im} - \frac{x.re}{y.im}\\
\end{array}
\end{array}
if y.im < -5.80000000000000047e67Initial program 55.1%
*-un-lft-identity55.1%
add-sqr-sqrt55.1%
times-frac55.0%
hypot-def55.0%
hypot-def67.5%
Applied egg-rr67.5%
Taylor expanded in y.im around -inf 92.6%
+-commutative92.6%
mul-1-neg92.6%
unsub-neg92.6%
associate-/l*92.8%
Simplified92.8%
if -5.80000000000000047e67 < y.im < 2.6000000000000001e-129Initial program 70.9%
*-un-lft-identity70.9%
add-sqr-sqrt70.9%
times-frac70.9%
hypot-def70.9%
hypot-def84.7%
Applied egg-rr84.7%
Taylor expanded in y.re around inf 77.5%
mul-1-neg77.5%
unsub-neg77.5%
*-commutative77.5%
unpow277.5%
times-frac84.9%
Simplified84.9%
associate-*r/86.5%
sub-div87.4%
Applied egg-rr87.4%
associate-*l/87.5%
Applied egg-rr87.5%
if 2.6000000000000001e-129 < y.im < 9.5000000000000003e62Initial program 79.9%
if 9.5000000000000003e62 < y.im Initial program 41.5%
Taylor expanded in y.re around 0 76.6%
+-commutative76.6%
mul-1-neg76.6%
unsub-neg76.6%
unpow276.6%
times-frac81.0%
Simplified81.0%
Final simplification86.1%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (<= y.im -1.15e+67)
(* (- x.re (/ y.re (/ y.im x.im))) (/ -1.0 y.im))
(if (<= y.im 5.7e-129)
(/ (- x.im (/ (* x.re y.im) y.re)) y.re)
(if (<= y.im 9.5e+62)
(/ (- (* x.im y.re) (* x.re y.im)) (+ (* y.re y.re) (* y.im y.im)))
(- (* (/ y.re y.im) (/ x.im y.im)) (/ x.re y.im))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_im <= -1.15e+67) {
tmp = (x_46_re - (y_46_re / (y_46_im / x_46_im))) * (-1.0 / y_46_im);
} else if (y_46_im <= 5.7e-129) {
tmp = (x_46_im - ((x_46_re * y_46_im) / y_46_re)) / y_46_re;
} else if (y_46_im <= 9.5e+62) {
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 = ((y_46_re / y_46_im) * (x_46_im / y_46_im)) - (x_46_re / y_46_im);
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: tmp
if (y_46im <= (-1.15d+67)) then
tmp = (x_46re - (y_46re / (y_46im / x_46im))) * ((-1.0d0) / y_46im)
else if (y_46im <= 5.7d-129) then
tmp = (x_46im - ((x_46re * y_46im) / y_46re)) / y_46re
else if (y_46im <= 9.5d+62) then
tmp = ((x_46im * y_46re) - (x_46re * y_46im)) / ((y_46re * y_46re) + (y_46im * y_46im))
else
tmp = ((y_46re / y_46im) * (x_46im / y_46im)) - (x_46re / y_46im)
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_im <= -1.15e+67) {
tmp = (x_46_re - (y_46_re / (y_46_im / x_46_im))) * (-1.0 / y_46_im);
} else if (y_46_im <= 5.7e-129) {
tmp = (x_46_im - ((x_46_re * y_46_im) / y_46_re)) / y_46_re;
} else if (y_46_im <= 9.5e+62) {
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 = ((y_46_re / y_46_im) * (x_46_im / y_46_im)) - (x_46_re / y_46_im);
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if y_46_im <= -1.15e+67: tmp = (x_46_re - (y_46_re / (y_46_im / x_46_im))) * (-1.0 / y_46_im) elif y_46_im <= 5.7e-129: tmp = (x_46_im - ((x_46_re * y_46_im) / y_46_re)) / y_46_re elif y_46_im <= 9.5e+62: 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 = ((y_46_re / y_46_im) * (x_46_im / y_46_im)) - (x_46_re / y_46_im) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if (y_46_im <= -1.15e+67) tmp = Float64(Float64(x_46_re - Float64(y_46_re / Float64(y_46_im / x_46_im))) * Float64(-1.0 / y_46_im)); elseif (y_46_im <= 5.7e-129) tmp = Float64(Float64(x_46_im - Float64(Float64(x_46_re * y_46_im) / y_46_re)) / y_46_re); elseif (y_46_im <= 9.5e+62) 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(Float64(y_46_re / y_46_im) * Float64(x_46_im / y_46_im)) - Float64(x_46_re / y_46_im)); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if (y_46_im <= -1.15e+67) tmp = (x_46_re - (y_46_re / (y_46_im / x_46_im))) * (-1.0 / y_46_im); elseif (y_46_im <= 5.7e-129) tmp = (x_46_im - ((x_46_re * y_46_im) / y_46_re)) / y_46_re; elseif (y_46_im <= 9.5e+62) 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 = ((y_46_re / y_46_im) * (x_46_im / y_46_im)) - (x_46_re / y_46_im); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[y$46$im, -1.15e+67], N[(N[(x$46$re - N[(y$46$re / N[(y$46$im / x$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(-1.0 / y$46$im), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 5.7e-129], N[(N[(x$46$im - N[(N[(x$46$re * y$46$im), $MachinePrecision] / y$46$re), $MachinePrecision]), $MachinePrecision] / y$46$re), $MachinePrecision], If[LessEqual[y$46$im, 9.5e+62], 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[(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]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.im \leq -1.15 \cdot 10^{+67}:\\
\;\;\;\;\left(x.re - \frac{y.re}{\frac{y.im}{x.im}}\right) \cdot \frac{-1}{y.im}\\
\mathbf{elif}\;y.im \leq 5.7 \cdot 10^{-129}:\\
\;\;\;\;\frac{x.im - \frac{x.re \cdot y.im}{y.re}}{y.re}\\
\mathbf{elif}\;y.im \leq 9.5 \cdot 10^{+62}:\\
\;\;\;\;\frac{x.im \cdot y.re - x.re \cdot y.im}{y.re \cdot y.re + y.im \cdot y.im}\\
\mathbf{else}:\\
\;\;\;\;\frac{y.re}{y.im} \cdot \frac{x.im}{y.im} - \frac{x.re}{y.im}\\
\end{array}
\end{array}
if y.im < -1.1499999999999999e67Initial program 55.1%
*-un-lft-identity55.1%
add-sqr-sqrt55.1%
times-frac55.0%
hypot-def55.0%
hypot-def67.5%
Applied egg-rr67.5%
Taylor expanded in y.im around -inf 92.6%
+-commutative92.6%
mul-1-neg92.6%
unsub-neg92.6%
associate-/l*92.8%
Simplified92.8%
Taylor expanded in y.im around -inf 90.9%
if -1.1499999999999999e67 < y.im < 5.7000000000000001e-129Initial program 70.9%
*-un-lft-identity70.9%
add-sqr-sqrt70.9%
times-frac70.9%
hypot-def70.9%
hypot-def84.7%
Applied egg-rr84.7%
Taylor expanded in y.re around inf 77.5%
mul-1-neg77.5%
unsub-neg77.5%
*-commutative77.5%
unpow277.5%
times-frac84.9%
Simplified84.9%
associate-*r/86.5%
sub-div87.4%
Applied egg-rr87.4%
associate-*l/87.5%
Applied egg-rr87.5%
if 5.7000000000000001e-129 < y.im < 9.5000000000000003e62Initial program 79.9%
if 9.5000000000000003e62 < y.im Initial program 41.5%
Taylor expanded in y.re around 0 76.6%
+-commutative76.6%
mul-1-neg76.6%
unsub-neg76.6%
unpow276.6%
times-frac81.0%
Simplified81.0%
Final simplification85.7%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (or (<= y.im -1.75e+67) (not (<= y.im 1.6e-19))) (* (- x.re (/ y.re (/ y.im x.im))) (/ -1.0 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.75e+67) || !(y_46_im <= 1.6e-19)) {
tmp = (x_46_re - (y_46_re / (y_46_im / x_46_im))) * (-1.0 / 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.75d+67)) .or. (.not. (y_46im <= 1.6d-19))) then
tmp = (x_46re - (y_46re / (y_46im / x_46im))) * ((-1.0d0) / 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.75e+67) || !(y_46_im <= 1.6e-19)) {
tmp = (x_46_re - (y_46_re / (y_46_im / x_46_im))) * (-1.0 / 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.75e+67) or not (y_46_im <= 1.6e-19): tmp = (x_46_re - (y_46_re / (y_46_im / x_46_im))) * (-1.0 / 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.75e+67) || !(y_46_im <= 1.6e-19)) tmp = Float64(Float64(x_46_re - Float64(y_46_re / Float64(y_46_im / x_46_im))) * Float64(-1.0 / y_46_im)); else tmp = Float64(Float64(x_46_im - Float64(Float64(x_46_re * 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.75e+67) || ~((y_46_im <= 1.6e-19))) tmp = (x_46_re - (y_46_re / (y_46_im / x_46_im))) * (-1.0 / 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.75e+67], N[Not[LessEqual[y$46$im, 1.6e-19]], $MachinePrecision]], N[(N[(x$46$re - N[(y$46$re / N[(y$46$im / x$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(-1.0 / y$46$im), $MachinePrecision]), $MachinePrecision], N[(N[(x$46$im - N[(N[(x$46$re * y$46$im), $MachinePrecision] / y$46$re), $MachinePrecision]), $MachinePrecision] / y$46$re), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.im \leq -1.75 \cdot 10^{+67} \lor \neg \left(y.im \leq 1.6 \cdot 10^{-19}\right):\\
\;\;\;\;\left(x.re - \frac{y.re}{\frac{y.im}{x.im}}\right) \cdot \frac{-1}{y.im}\\
\mathbf{else}:\\
\;\;\;\;\frac{x.im - \frac{x.re \cdot y.im}{y.re}}{y.re}\\
\end{array}
\end{array}
if y.im < -1.75e67 or 1.59999999999999991e-19 < y.im Initial program 51.0%
*-un-lft-identity51.0%
add-sqr-sqrt51.0%
times-frac50.9%
hypot-def50.9%
hypot-def64.6%
Applied egg-rr64.6%
Taylor expanded in y.im around -inf 51.5%
+-commutative51.5%
mul-1-neg51.5%
unsub-neg51.5%
associate-/l*51.7%
Simplified51.7%
Taylor expanded in y.im around -inf 82.2%
if -1.75e67 < y.im < 1.59999999999999991e-19Initial program 73.7%
*-un-lft-identity73.7%
add-sqr-sqrt73.7%
times-frac73.7%
hypot-def73.7%
hypot-def86.5%
Applied egg-rr86.5%
Taylor expanded in y.re around inf 75.1%
mul-1-neg75.1%
unsub-neg75.1%
*-commutative75.1%
unpow275.1%
times-frac81.9%
Simplified81.9%
associate-*r/83.3%
sub-div84.0%
Applied egg-rr84.0%
associate-*l/84.1%
Applied egg-rr84.1%
Final simplification83.2%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (<= y.im -1.75e+67)
(* (- x.re (/ y.re (/ y.im x.im))) (/ -1.0 y.im))
(if (<= y.im 1.15e-16)
(/ (- x.im (/ (* x.re y.im) y.re)) y.re)
(- (* (/ y.re y.im) (/ x.im y.im)) (/ x.re y.im)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_im <= -1.75e+67) {
tmp = (x_46_re - (y_46_re / (y_46_im / x_46_im))) * (-1.0 / y_46_im);
} else if (y_46_im <= 1.15e-16) {
tmp = (x_46_im - ((x_46_re * y_46_im) / y_46_re)) / y_46_re;
} else {
tmp = ((y_46_re / y_46_im) * (x_46_im / y_46_im)) - (x_46_re / y_46_im);
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: tmp
if (y_46im <= (-1.75d+67)) then
tmp = (x_46re - (y_46re / (y_46im / x_46im))) * ((-1.0d0) / y_46im)
else if (y_46im <= 1.15d-16) then
tmp = (x_46im - ((x_46re * y_46im) / y_46re)) / y_46re
else
tmp = ((y_46re / y_46im) * (x_46im / y_46im)) - (x_46re / y_46im)
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_im <= -1.75e+67) {
tmp = (x_46_re - (y_46_re / (y_46_im / x_46_im))) * (-1.0 / y_46_im);
} else if (y_46_im <= 1.15e-16) {
tmp = (x_46_im - ((x_46_re * y_46_im) / y_46_re)) / y_46_re;
} else {
tmp = ((y_46_re / y_46_im) * (x_46_im / y_46_im)) - (x_46_re / y_46_im);
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if y_46_im <= -1.75e+67: tmp = (x_46_re - (y_46_re / (y_46_im / x_46_im))) * (-1.0 / y_46_im) elif y_46_im <= 1.15e-16: tmp = (x_46_im - ((x_46_re * y_46_im) / y_46_re)) / y_46_re else: tmp = ((y_46_re / y_46_im) * (x_46_im / y_46_im)) - (x_46_re / y_46_im) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if (y_46_im <= -1.75e+67) tmp = Float64(Float64(x_46_re - Float64(y_46_re / Float64(y_46_im / x_46_im))) * Float64(-1.0 / y_46_im)); elseif (y_46_im <= 1.15e-16) tmp = Float64(Float64(x_46_im - Float64(Float64(x_46_re * y_46_im) / y_46_re)) / y_46_re); else tmp = Float64(Float64(Float64(y_46_re / y_46_im) * Float64(x_46_im / y_46_im)) - Float64(x_46_re / y_46_im)); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if (y_46_im <= -1.75e+67) tmp = (x_46_re - (y_46_re / (y_46_im / x_46_im))) * (-1.0 / y_46_im); elseif (y_46_im <= 1.15e-16) tmp = (x_46_im - ((x_46_re * y_46_im) / y_46_re)) / y_46_re; else tmp = ((y_46_re / y_46_im) * (x_46_im / y_46_im)) - (x_46_re / y_46_im); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[y$46$im, -1.75e+67], N[(N[(x$46$re - N[(y$46$re / N[(y$46$im / x$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(-1.0 / y$46$im), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 1.15e-16], N[(N[(x$46$im - N[(N[(x$46$re * y$46$im), $MachinePrecision] / y$46$re), $MachinePrecision]), $MachinePrecision] / y$46$re), $MachinePrecision], 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]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.im \leq -1.75 \cdot 10^{+67}:\\
\;\;\;\;\left(x.re - \frac{y.re}{\frac{y.im}{x.im}}\right) \cdot \frac{-1}{y.im}\\
\mathbf{elif}\;y.im \leq 1.15 \cdot 10^{-16}:\\
\;\;\;\;\frac{x.im - \frac{x.re \cdot y.im}{y.re}}{y.re}\\
\mathbf{else}:\\
\;\;\;\;\frac{y.re}{y.im} \cdot \frac{x.im}{y.im} - \frac{x.re}{y.im}\\
\end{array}
\end{array}
if y.im < -1.75e67Initial program 55.1%
*-un-lft-identity55.1%
add-sqr-sqrt55.1%
times-frac55.0%
hypot-def55.0%
hypot-def67.5%
Applied egg-rr67.5%
Taylor expanded in y.im around -inf 92.6%
+-commutative92.6%
mul-1-neg92.6%
unsub-neg92.6%
associate-/l*92.8%
Simplified92.8%
Taylor expanded in y.im around -inf 90.9%
if -1.75e67 < y.im < 1.15e-16Initial program 73.7%
*-un-lft-identity73.7%
add-sqr-sqrt73.7%
times-frac73.7%
hypot-def73.7%
hypot-def86.5%
Applied egg-rr86.5%
Taylor expanded in y.re around inf 75.1%
mul-1-neg75.1%
unsub-neg75.1%
*-commutative75.1%
unpow275.1%
times-frac81.9%
Simplified81.9%
associate-*r/83.3%
sub-div84.0%
Applied egg-rr84.0%
associate-*l/84.1%
Applied egg-rr84.1%
if 1.15e-16 < y.im Initial program 47.9%
Taylor expanded in y.re around 0 72.3%
+-commutative72.3%
mul-1-neg72.3%
unsub-neg72.3%
unpow272.3%
times-frac75.7%
Simplified75.7%
Final simplification83.2%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (or (<= y.im -1.56e+69) (not (<= y.im 2.25e+80))) (/ (- 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.56e+69) || !(y_46_im <= 2.25e+80)) {
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.56d+69)) .or. (.not. (y_46im <= 2.25d+80))) 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.56e+69) || !(y_46_im <= 2.25e+80)) {
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.56e+69) or not (y_46_im <= 2.25e+80): 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.56e+69) || !(y_46_im <= 2.25e+80)) 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.56e+69) || ~((y_46_im <= 2.25e+80))) 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.56e+69], N[Not[LessEqual[y$46$im, 2.25e+80]], $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.56 \cdot 10^{+69} \lor \neg \left(y.im \leq 2.25 \cdot 10^{+80}\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.56000000000000007e69 or 2.25000000000000003e80 < y.im Initial program 48.5%
Taylor expanded in y.re around 0 80.0%
associate-*r/80.0%
neg-mul-180.0%
Simplified80.0%
if -1.56000000000000007e69 < y.im < 2.25000000000000003e80Initial program 72.0%
*-un-lft-identity72.0%
add-sqr-sqrt72.0%
times-frac72.0%
hypot-def72.0%
hypot-def84.1%
Applied egg-rr84.1%
Taylor expanded in y.re around inf 68.3%
mul-1-neg68.3%
unsub-neg68.3%
*-commutative68.3%
unpow268.3%
times-frac76.5%
Simplified76.5%
associate-*r/77.7%
sub-div78.3%
Applied egg-rr78.3%
Final simplification79.0%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (<= y.re -1.1e-16) (/ x.im y.re) (if (<= y.re 1.1e-6) (/ (- 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 <= -1.1e-16) {
tmp = x_46_im / y_46_re;
} else if (y_46_re <= 1.1e-6) {
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 <= (-1.1d-16)) then
tmp = x_46im / y_46re
else if (y_46re <= 1.1d-6) 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 <= -1.1e-16) {
tmp = x_46_im / y_46_re;
} else if (y_46_re <= 1.1e-6) {
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 <= -1.1e-16: tmp = x_46_im / y_46_re elif y_46_re <= 1.1e-6: 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 <= -1.1e-16) tmp = Float64(x_46_im / y_46_re); elseif (y_46_re <= 1.1e-6) 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 <= -1.1e-16) tmp = x_46_im / y_46_re; elseif (y_46_re <= 1.1e-6) 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, -1.1e-16], N[(x$46$im / y$46$re), $MachinePrecision], If[LessEqual[y$46$re, 1.1e-6], 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 -1.1 \cdot 10^{-16}:\\
\;\;\;\;\frac{x.im}{y.re}\\
\mathbf{elif}\;y.re \leq 1.1 \cdot 10^{-6}:\\
\;\;\;\;\frac{-x.re}{y.im}\\
\mathbf{else}:\\
\;\;\;\;\frac{x.im}{y.re}\\
\end{array}
\end{array}
if y.re < -1.1e-16 or 1.1000000000000001e-6 < y.re Initial program 58.0%
Taylor expanded in y.re around inf 70.4%
if -1.1e-16 < y.re < 1.1000000000000001e-6Initial program 67.4%
Taylor expanded in y.re around 0 68.6%
associate-*r/68.6%
neg-mul-168.6%
Simplified68.6%
Final simplification69.5%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (<= y.im -2.32e+238) (/ x.re y.im) (if (<= y.im 4e+145) (/ 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_im <= -2.32e+238) {
tmp = x_46_re / y_46_im;
} else if (y_46_im <= 4e+145) {
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_46im <= (-2.32d+238)) then
tmp = x_46re / y_46im
else if (y_46im <= 4d+145) 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_im <= -2.32e+238) {
tmp = x_46_re / y_46_im;
} else if (y_46_im <= 4e+145) {
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_im <= -2.32e+238: tmp = x_46_re / y_46_im elif y_46_im <= 4e+145: 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_im <= -2.32e+238) tmp = Float64(x_46_re / y_46_im); elseif (y_46_im <= 4e+145) tmp = Float64(x_46_im / y_46_re); else tmp = Float64(x_46_re / y_46_im); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if (y_46_im <= -2.32e+238) tmp = x_46_re / y_46_im; elseif (y_46_im <= 4e+145) 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[LessEqual[y$46$im, -2.32e+238], N[(x$46$re / y$46$im), $MachinePrecision], If[LessEqual[y$46$im, 4e+145], 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.im \leq -2.32 \cdot 10^{+238}:\\
\;\;\;\;\frac{x.re}{y.im}\\
\mathbf{elif}\;y.im \leq 4 \cdot 10^{+145}:\\
\;\;\;\;\frac{x.im}{y.re}\\
\mathbf{else}:\\
\;\;\;\;\frac{x.re}{y.im}\\
\end{array}
\end{array}
if y.im < -2.32000000000000008e238 or 4e145 < y.im Initial program 47.5%
*-un-lft-identity47.5%
add-sqr-sqrt47.5%
times-frac47.5%
hypot-def47.5%
hypot-def64.2%
Applied egg-rr64.2%
Taylor expanded in y.im around -inf 61.6%
Taylor expanded in y.re around 0 48.0%
if -2.32000000000000008e238 < y.im < 4e145Initial program 66.3%
Taylor expanded in y.re around inf 51.6%
Final simplification50.9%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (<= y.im -1.4e+214) (/ x.im y.im) (/ x.im y.re)))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_im <= -1.4e+214) {
tmp = x_46_im / y_46_im;
} else {
tmp = x_46_im / y_46_re;
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: tmp
if (y_46im <= (-1.4d+214)) then
tmp = x_46im / y_46im
else
tmp = x_46im / y_46re
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_im <= -1.4e+214) {
tmp = x_46_im / y_46_im;
} else {
tmp = x_46_im / y_46_re;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if y_46_im <= -1.4e+214: tmp = x_46_im / y_46_im else: tmp = x_46_im / y_46_re return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if (y_46_im <= -1.4e+214) tmp = Float64(x_46_im / y_46_im); else tmp = Float64(x_46_im / y_46_re); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if (y_46_im <= -1.4e+214) tmp = x_46_im / 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$im, -1.4e+214], N[(x$46$im / y$46$im), $MachinePrecision], N[(x$46$im / y$46$re), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.im \leq -1.4 \cdot 10^{+214}:\\
\;\;\;\;\frac{x.im}{y.im}\\
\mathbf{else}:\\
\;\;\;\;\frac{x.im}{y.re}\\
\end{array}
\end{array}
if y.im < -1.3999999999999999e214Initial program 53.5%
*-un-lft-identity53.5%
add-sqr-sqrt53.5%
times-frac53.5%
hypot-def53.5%
hypot-def61.1%
Applied egg-rr61.1%
Taylor expanded in y.im around -inf 99.8%
+-commutative99.8%
mul-1-neg99.8%
unsub-neg99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in y.re around -inf 34.6%
if -1.3999999999999999e214 < y.im Initial program 63.7%
Taylor expanded in y.re around inf 47.5%
Final simplification46.2%
(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 62.7%
*-un-lft-identity62.7%
add-sqr-sqrt62.7%
times-frac62.7%
hypot-def62.7%
hypot-def75.9%
Applied egg-rr75.9%
Taylor expanded in y.im around -inf 32.4%
+-commutative32.4%
mul-1-neg32.4%
unsub-neg32.4%
associate-/l*33.0%
Simplified33.0%
Taylor expanded in y.re around -inf 11.8%
Final simplification11.8%
herbie shell --seed 2023187
(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))))