
(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 (- (* x.im y.re) (* x.re y.im)))
(t_1 (/ t_0 (+ (* y.re y.re) (* y.im y.im)))))
(if (<= t_1 (- INFINITY))
(/ (- (* x.im (/ y.re y.im)) x.re) y.im)
(if (<= t_1 5e+294)
(* (/ 1.0 (hypot y.re y.im)) (/ t_0 (hypot y.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 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 tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = ((x_46_im * (y_46_re / y_46_im)) - x_46_re) / y_46_im;
} else if (t_1 <= 5e+294) {
tmp = (1.0 / hypot(y_46_re, y_46_im)) * (t_0 / hypot(y_46_re, y_46_im));
} else {
tmp = (x_46_im - (x_46_re * (y_46_im / y_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 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 tmp;
if (t_1 <= -Double.POSITIVE_INFINITY) {
tmp = ((x_46_im * (y_46_re / y_46_im)) - x_46_re) / y_46_im;
} else if (t_1 <= 5e+294) {
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_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): t_0 = (x_46_im * y_46_re) - (x_46_re * y_46_im) t_1 = t_0 / ((y_46_re * y_46_re) + (y_46_im * y_46_im)) tmp = 0 if t_1 <= -math.inf: tmp = ((x_46_im * (y_46_re / y_46_im)) - x_46_re) / y_46_im elif t_1 <= 5e+294: 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_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) 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))) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = Float64(Float64(Float64(x_46_im * Float64(y_46_re / y_46_im)) - x_46_re) / y_46_im); elseif (t_1 <= 5e+294) 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_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) t_0 = (x_46_im * y_46_re) - (x_46_re * y_46_im); t_1 = t_0 / ((y_46_re * y_46_re) + (y_46_im * y_46_im)); tmp = 0.0; if (t_1 <= -Inf) tmp = ((x_46_im * (y_46_re / y_46_im)) - x_46_re) / y_46_im; elseif (t_1 <= 5e+294) tmp = (1.0 / hypot(y_46_re, y_46_im)) * (t_0 / hypot(y_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_] := 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]}, If[LessEqual[t$95$1, (-Infinity)], N[(N[(N[(x$46$im * N[(y$46$re / y$46$im), $MachinePrecision]), $MachinePrecision] - x$46$re), $MachinePrecision] / y$46$im), $MachinePrecision], If[LessEqual[t$95$1, 5e+294], 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[(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}
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}\\
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;\frac{x.im \cdot \frac{y.re}{y.im} - x.re}{y.im}\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+294}:\\
\;\;\;\;\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.im - x.re \cdot \frac{y.im}{y.re}}{y.re}\\
\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 31.2%
Taylor expanded in y.re around 0 43.1%
+-commutative43.1%
mul-1-neg43.1%
unsub-neg43.1%
unpow243.1%
associate-/r*78.4%
div-sub78.4%
associate-/l*78.5%
fma-neg78.5%
Simplified78.5%
fma-undefine78.5%
unsub-neg78.5%
Applied egg-rr78.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))) < 4.9999999999999999e294Initial program 81.6%
fma-neg81.6%
distribute-rgt-neg-out81.6%
*-un-lft-identity81.6%
add-sqr-sqrt81.5%
times-frac81.5%
hypot-define81.5%
add-sqr-sqrt49.1%
sqrt-unprod59.0%
distribute-rgt-neg-out59.0%
distribute-rgt-neg-out59.0%
sqr-neg59.0%
sqrt-unprod32.3%
add-sqr-sqrt54.0%
hypot-define65.4%
Applied egg-rr65.4%
add-sqr-sqrt38.6%
sqrt-unprod70.2%
sqr-neg70.2%
sqrt-unprod45.8%
add-sqr-sqrt99.5%
distribute-rgt-neg-in99.5%
fma-neg99.5%
Applied egg-rr99.5%
*-commutative99.5%
Simplified99.5%
if 4.9999999999999999e294 < (/.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 14.1%
Taylor expanded in y.re around inf 52.4%
mul-1-neg52.4%
unsub-neg52.4%
associate-/l*59.6%
Simplified59.6%
Final simplification87.3%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (/ (- (* y.re (/ x.im y.im)) x.re) y.im)))
(if (<= y.im -1.8e+78)
t_0
(if (<= y.im -6.6e-152)
(* (- (* x.im y.re) (* x.re y.im)) (pow (hypot y.re y.im) -2.0))
(if (<= y.im 5.2e-12) (/ (- x.im (* x.re (/ y.im y.re))) y.re) t_0)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = ((y_46_re * (x_46_im / y_46_im)) - x_46_re) / y_46_im;
double tmp;
if (y_46_im <= -1.8e+78) {
tmp = t_0;
} else if (y_46_im <= -6.6e-152) {
tmp = ((x_46_im * y_46_re) - (x_46_re * y_46_im)) * pow(hypot(y_46_re, y_46_im), -2.0);
} else if (y_46_im <= 5.2e-12) {
tmp = (x_46_im - (x_46_re * (y_46_im / y_46_re))) / y_46_re;
} else {
tmp = t_0;
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = ((y_46_re * (x_46_im / y_46_im)) - x_46_re) / y_46_im;
double tmp;
if (y_46_im <= -1.8e+78) {
tmp = t_0;
} else if (y_46_im <= -6.6e-152) {
tmp = ((x_46_im * y_46_re) - (x_46_re * y_46_im)) * Math.pow(Math.hypot(y_46_re, y_46_im), -2.0);
} else if (y_46_im <= 5.2e-12) {
tmp = (x_46_im - (x_46_re * (y_46_im / y_46_re))) / y_46_re;
} else {
tmp = t_0;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = ((y_46_re * (x_46_im / y_46_im)) - x_46_re) / y_46_im tmp = 0 if y_46_im <= -1.8e+78: tmp = t_0 elif y_46_im <= -6.6e-152: tmp = ((x_46_im * y_46_re) - (x_46_re * y_46_im)) * math.pow(math.hypot(y_46_re, y_46_im), -2.0) elif y_46_im <= 5.2e-12: tmp = (x_46_im - (x_46_re * (y_46_im / y_46_re))) / y_46_re else: tmp = t_0 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(Float64(Float64(y_46_re * Float64(x_46_im / y_46_im)) - x_46_re) / y_46_im) tmp = 0.0 if (y_46_im <= -1.8e+78) tmp = t_0; elseif (y_46_im <= -6.6e-152) tmp = Float64(Float64(Float64(x_46_im * y_46_re) - Float64(x_46_re * y_46_im)) * (hypot(y_46_re, y_46_im) ^ -2.0)); elseif (y_46_im <= 5.2e-12) tmp = Float64(Float64(x_46_im - Float64(x_46_re * Float64(y_46_im / y_46_re))) / y_46_re); else tmp = t_0; end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = ((y_46_re * (x_46_im / y_46_im)) - x_46_re) / y_46_im; tmp = 0.0; if (y_46_im <= -1.8e+78) tmp = t_0; elseif (y_46_im <= -6.6e-152) tmp = ((x_46_im * y_46_re) - (x_46_re * y_46_im)) * (hypot(y_46_re, y_46_im) ^ -2.0); elseif (y_46_im <= 5.2e-12) tmp = (x_46_im - (x_46_re * (y_46_im / y_46_re))) / y_46_re; else tmp = t_0; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[(N[(y$46$re * N[(x$46$im / y$46$im), $MachinePrecision]), $MachinePrecision] - x$46$re), $MachinePrecision] / y$46$im), $MachinePrecision]}, If[LessEqual[y$46$im, -1.8e+78], t$95$0, If[LessEqual[y$46$im, -6.6e-152], N[(N[(N[(x$46$im * y$46$re), $MachinePrecision] - N[(x$46$re * y$46$im), $MachinePrecision]), $MachinePrecision] * N[Power[N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 5.2e-12], N[(N[(x$46$im - N[(x$46$re * N[(y$46$im / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y$46$re), $MachinePrecision], t$95$0]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{y.re \cdot \frac{x.im}{y.im} - x.re}{y.im}\\
\mathbf{if}\;y.im \leq -1.8 \cdot 10^{+78}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y.im \leq -6.6 \cdot 10^{-152}:\\
\;\;\;\;\left(x.im \cdot y.re - x.re \cdot y.im\right) \cdot {\left(\mathsf{hypot}\left(y.re, y.im\right)\right)}^{-2}\\
\mathbf{elif}\;y.im \leq 5.2 \cdot 10^{-12}:\\
\;\;\;\;\frac{x.im - x.re \cdot \frac{y.im}{y.re}}{y.re}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if y.im < -1.8000000000000001e78 or 5.19999999999999965e-12 < y.im Initial program 44.1%
Taylor expanded in y.im around -inf 79.5%
mul-1-neg79.5%
distribute-neg-frac279.5%
mul-1-neg79.5%
unsub-neg79.5%
*-commutative79.5%
associate-/l*82.4%
Simplified82.4%
if -1.8000000000000001e78 < y.im < -6.59999999999999997e-152Initial program 79.6%
fma-neg79.6%
distribute-rgt-neg-out79.6%
*-un-lft-identity79.6%
add-sqr-sqrt79.6%
times-frac79.5%
hypot-define79.5%
add-sqr-sqrt58.4%
sqrt-unprod49.5%
distribute-rgt-neg-out49.5%
distribute-rgt-neg-out49.5%
sqr-neg49.5%
sqrt-unprod15.2%
add-sqr-sqrt31.2%
hypot-define39.0%
Applied egg-rr39.0%
add-sqr-sqrt0.0%
sqrt-unprod87.4%
sqr-neg87.4%
sqrt-unprod87.2%
add-sqr-sqrt87.4%
distribute-rgt-neg-in87.4%
fma-neg87.4%
Applied egg-rr87.4%
*-commutative87.4%
Simplified87.4%
pow187.4%
frac-times79.6%
*-un-lft-identity79.6%
hypot-undefine79.6%
hypot-undefine79.6%
add-sqr-sqrt79.6%
div-inv79.6%
fma-neg79.6%
inv-pow79.6%
add-sqr-sqrt79.6%
hypot-undefine79.6%
hypot-undefine79.6%
pow-prod-down80.0%
pow-prod-up80.2%
metadata-eval80.2%
Applied egg-rr80.2%
unpow180.2%
fma-neg80.2%
*-commutative80.2%
Simplified80.2%
if -6.59999999999999997e-152 < y.im < 5.19999999999999965e-12Initial program 66.0%
Taylor expanded in y.re around inf 89.6%
mul-1-neg89.6%
unsub-neg89.6%
associate-/l*90.9%
Simplified90.9%
Final simplification85.4%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (/ (- (* y.re (/ x.im y.im)) x.re) y.im)))
(if (<= y.im -1.48e+78)
t_0
(if (<= y.im -3.4e-152)
(/ (- (* x.im y.re) (* x.re y.im)) (fma y.im y.im (* y.re y.re)))
(if (<= y.im 6.5e-12) (/ (- x.im (* x.re (/ y.im y.re))) y.re) t_0)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = ((y_46_re * (x_46_im / y_46_im)) - x_46_re) / y_46_im;
double tmp;
if (y_46_im <= -1.48e+78) {
tmp = t_0;
} else if (y_46_im <= -3.4e-152) {
tmp = ((x_46_im * y_46_re) - (x_46_re * y_46_im)) / fma(y_46_im, y_46_im, (y_46_re * y_46_re));
} else if (y_46_im <= 6.5e-12) {
tmp = (x_46_im - (x_46_re * (y_46_im / y_46_re))) / y_46_re;
} else {
tmp = t_0;
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(Float64(Float64(y_46_re * Float64(x_46_im / y_46_im)) - x_46_re) / y_46_im) tmp = 0.0 if (y_46_im <= -1.48e+78) tmp = t_0; elseif (y_46_im <= -3.4e-152) tmp = Float64(Float64(Float64(x_46_im * y_46_re) - Float64(x_46_re * y_46_im)) / fma(y_46_im, y_46_im, Float64(y_46_re * y_46_re))); elseif (y_46_im <= 6.5e-12) tmp = Float64(Float64(x_46_im - Float64(x_46_re * Float64(y_46_im / y_46_re))) / y_46_re); else tmp = t_0; end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[(N[(y$46$re * N[(x$46$im / y$46$im), $MachinePrecision]), $MachinePrecision] - x$46$re), $MachinePrecision] / y$46$im), $MachinePrecision]}, If[LessEqual[y$46$im, -1.48e+78], t$95$0, If[LessEqual[y$46$im, -3.4e-152], N[(N[(N[(x$46$im * y$46$re), $MachinePrecision] - N[(x$46$re * y$46$im), $MachinePrecision]), $MachinePrecision] / N[(y$46$im * y$46$im + N[(y$46$re * y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 6.5e-12], N[(N[(x$46$im - N[(x$46$re * N[(y$46$im / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y$46$re), $MachinePrecision], t$95$0]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{y.re \cdot \frac{x.im}{y.im} - x.re}{y.im}\\
\mathbf{if}\;y.im \leq -1.48 \cdot 10^{+78}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y.im \leq -3.4 \cdot 10^{-152}:\\
\;\;\;\;\frac{x.im \cdot y.re - x.re \cdot y.im}{\mathsf{fma}\left(y.im, y.im, y.re \cdot y.re\right)}\\
\mathbf{elif}\;y.im \leq 6.5 \cdot 10^{-12}:\\
\;\;\;\;\frac{x.im - x.re \cdot \frac{y.im}{y.re}}{y.re}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if y.im < -1.47999999999999998e78 or 6.5000000000000002e-12 < y.im Initial program 44.1%
Taylor expanded in y.im around -inf 79.5%
mul-1-neg79.5%
distribute-neg-frac279.5%
mul-1-neg79.5%
unsub-neg79.5%
*-commutative79.5%
associate-/l*82.4%
Simplified82.4%
if -1.47999999999999998e78 < y.im < -3.39999999999999984e-152Initial program 79.6%
fma-neg79.6%
distribute-rgt-neg-out79.6%
+-commutative79.6%
fma-define79.7%
Simplified79.7%
distribute-rgt-neg-out79.7%
fma-neg79.7%
Applied egg-rr79.7%
if -3.39999999999999984e-152 < y.im < 6.5000000000000002e-12Initial program 66.0%
Taylor expanded in y.re around inf 89.6%
mul-1-neg89.6%
unsub-neg89.6%
associate-/l*90.9%
Simplified90.9%
Final simplification85.3%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (/ (- (* y.re (/ x.im y.im)) x.re) y.im)))
(if (<= y.im -1.15e+78)
t_0
(if (<= y.im -5.7e-152)
(/ (- (* x.im y.re) (* x.re y.im)) (+ (* y.re y.re) (* y.im y.im)))
(if (<= y.im 5.5e-12) (/ (- x.im (* x.re (/ y.im y.re))) y.re) t_0)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = ((y_46_re * (x_46_im / y_46_im)) - x_46_re) / y_46_im;
double tmp;
if (y_46_im <= -1.15e+78) {
tmp = t_0;
} else if (y_46_im <= -5.7e-152) {
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 if (y_46_im <= 5.5e-12) {
tmp = (x_46_im - (x_46_re * (y_46_im / y_46_re))) / y_46_re;
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
real(8) :: tmp
t_0 = ((y_46re * (x_46im / y_46im)) - x_46re) / y_46im
if (y_46im <= (-1.15d+78)) then
tmp = t_0
else if (y_46im <= (-5.7d-152)) then
tmp = ((x_46im * y_46re) - (x_46re * y_46im)) / ((y_46re * y_46re) + (y_46im * y_46im))
else if (y_46im <= 5.5d-12) then
tmp = (x_46im - (x_46re * (y_46im / y_46re))) / y_46re
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = ((y_46_re * (x_46_im / y_46_im)) - x_46_re) / y_46_im;
double tmp;
if (y_46_im <= -1.15e+78) {
tmp = t_0;
} else if (y_46_im <= -5.7e-152) {
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 if (y_46_im <= 5.5e-12) {
tmp = (x_46_im - (x_46_re * (y_46_im / y_46_re))) / y_46_re;
} else {
tmp = t_0;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = ((y_46_re * (x_46_im / y_46_im)) - x_46_re) / y_46_im tmp = 0 if y_46_im <= -1.15e+78: tmp = t_0 elif y_46_im <= -5.7e-152: 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)) elif y_46_im <= 5.5e-12: tmp = (x_46_im - (x_46_re * (y_46_im / y_46_re))) / y_46_re else: tmp = t_0 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(Float64(Float64(y_46_re * Float64(x_46_im / y_46_im)) - x_46_re) / y_46_im) tmp = 0.0 if (y_46_im <= -1.15e+78) tmp = t_0; elseif (y_46_im <= -5.7e-152) 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))); elseif (y_46_im <= 5.5e-12) tmp = Float64(Float64(x_46_im - Float64(x_46_re * Float64(y_46_im / y_46_re))) / y_46_re); else tmp = t_0; end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = ((y_46_re * (x_46_im / y_46_im)) - x_46_re) / y_46_im; tmp = 0.0; if (y_46_im <= -1.15e+78) tmp = t_0; elseif (y_46_im <= -5.7e-152) 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)); elseif (y_46_im <= 5.5e-12) tmp = (x_46_im - (x_46_re * (y_46_im / y_46_re))) / y_46_re; else tmp = t_0; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[(N[(y$46$re * N[(x$46$im / y$46$im), $MachinePrecision]), $MachinePrecision] - x$46$re), $MachinePrecision] / y$46$im), $MachinePrecision]}, If[LessEqual[y$46$im, -1.15e+78], t$95$0, If[LessEqual[y$46$im, -5.7e-152], 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], If[LessEqual[y$46$im, 5.5e-12], N[(N[(x$46$im - N[(x$46$re * N[(y$46$im / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y$46$re), $MachinePrecision], t$95$0]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{y.re \cdot \frac{x.im}{y.im} - x.re}{y.im}\\
\mathbf{if}\;y.im \leq -1.15 \cdot 10^{+78}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y.im \leq -5.7 \cdot 10^{-152}:\\
\;\;\;\;\frac{x.im \cdot y.re - x.re \cdot y.im}{y.re \cdot y.re + y.im \cdot y.im}\\
\mathbf{elif}\;y.im \leq 5.5 \cdot 10^{-12}:\\
\;\;\;\;\frac{x.im - x.re \cdot \frac{y.im}{y.re}}{y.re}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if y.im < -1.1500000000000001e78 or 5.5000000000000004e-12 < y.im Initial program 44.1%
Taylor expanded in y.im around -inf 79.5%
mul-1-neg79.5%
distribute-neg-frac279.5%
mul-1-neg79.5%
unsub-neg79.5%
*-commutative79.5%
associate-/l*82.4%
Simplified82.4%
if -1.1500000000000001e78 < y.im < -5.7000000000000004e-152Initial program 79.6%
if -5.7000000000000004e-152 < y.im < 5.5000000000000004e-12Initial program 66.0%
Taylor expanded in y.re around inf 89.6%
mul-1-neg89.6%
unsub-neg89.6%
associate-/l*90.9%
Simplified90.9%
Final simplification85.3%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (or (<= y.im -1.8e-41) (not (<= y.im 6.2e-12))) (/ (- (* x.im (/ y.re y.im)) 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-41) || !(y_46_im <= 6.2e-12)) {
tmp = ((x_46_im * (y_46_re / y_46_im)) - 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-41)) .or. (.not. (y_46im <= 6.2d-12))) then
tmp = ((x_46im * (y_46re / y_46im)) - 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-41) || !(y_46_im <= 6.2e-12)) {
tmp = ((x_46_im * (y_46_re / y_46_im)) - 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-41) or not (y_46_im <= 6.2e-12): tmp = ((x_46_im * (y_46_re / y_46_im)) - 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-41) || !(y_46_im <= 6.2e-12)) tmp = Float64(Float64(Float64(x_46_im * Float64(y_46_re / y_46_im)) - 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-41) || ~((y_46_im <= 6.2e-12))) tmp = ((x_46_im * (y_46_re / y_46_im)) - 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-41], N[Not[LessEqual[y$46$im, 6.2e-12]], $MachinePrecision]], N[(N[(N[(x$46$im * N[(y$46$re / y$46$im), $MachinePrecision]), $MachinePrecision] - x$46$re), $MachinePrecision] / 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^{-41} \lor \neg \left(y.im \leq 6.2 \cdot 10^{-12}\right):\\
\;\;\;\;\frac{x.im \cdot \frac{y.re}{y.im} - 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.8e-41 or 6.2000000000000002e-12 < y.im Initial program 49.2%
Taylor expanded in y.re around 0 72.5%
+-commutative72.5%
mul-1-neg72.5%
unsub-neg72.5%
unpow272.5%
associate-/r*76.2%
div-sub76.2%
associate-/l*78.6%
fma-neg78.6%
Simplified78.6%
fma-undefine78.6%
unsub-neg78.6%
Applied egg-rr78.6%
if -1.8e-41 < y.im < 6.2000000000000002e-12Initial program 69.7%
Taylor expanded in y.re around inf 83.1%
mul-1-neg83.1%
unsub-neg83.1%
associate-/l*84.1%
Simplified84.1%
Final simplification81.4%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (or (<= y.im -7.4e-6) (not (<= y.im 4.5e+73))) (/ 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 <= -7.4e-6) || !(y_46_im <= 4.5e+73)) {
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 <= (-7.4d-6)) .or. (.not. (y_46im <= 4.5d+73))) 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 <= -7.4e-6) || !(y_46_im <= 4.5e+73)) {
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 <= -7.4e-6) or not (y_46_im <= 4.5e+73): 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 <= -7.4e-6) || !(y_46_im <= 4.5e+73)) tmp = Float64(x_46_re / Float64(-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 <= -7.4e-6) || ~((y_46_im <= 4.5e+73))) 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, -7.4e-6], N[Not[LessEqual[y$46$im, 4.5e+73]], $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 -7.4 \cdot 10^{-6} \lor \neg \left(y.im \leq 4.5 \cdot 10^{+73}\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 < -7.4000000000000003e-6 or 4.49999999999999985e73 < y.im Initial program 43.1%
Taylor expanded in y.re around 0 71.3%
associate-*r/71.3%
neg-mul-171.3%
Simplified71.3%
if -7.4000000000000003e-6 < y.im < 4.49999999999999985e73Initial program 69.8%
Taylor expanded in y.re around inf 75.5%
mul-1-neg75.5%
unsub-neg75.5%
associate-/l*76.8%
Simplified76.8%
Final simplification74.7%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (<= y.im -1.6e-41)
(/ (- (/ x.im (/ y.im y.re)) x.re) y.im)
(if (<= y.im 5.8e-12)
(/ (- x.im (* x.re (/ y.im y.re))) y.re)
(/ (- (* y.re (/ 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.6e-41) {
tmp = ((x_46_im / (y_46_im / y_46_re)) - x_46_re) / y_46_im;
} else if (y_46_im <= 5.8e-12) {
tmp = (x_46_im - (x_46_re * (y_46_im / y_46_re))) / y_46_re;
} else {
tmp = ((y_46_re * (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.6d-41)) then
tmp = ((x_46im / (y_46im / y_46re)) - x_46re) / y_46im
else if (y_46im <= 5.8d-12) then
tmp = (x_46im - (x_46re * (y_46im / y_46re))) / y_46re
else
tmp = ((y_46re * (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.6e-41) {
tmp = ((x_46_im / (y_46_im / y_46_re)) - x_46_re) / y_46_im;
} else if (y_46_im <= 5.8e-12) {
tmp = (x_46_im - (x_46_re * (y_46_im / y_46_re))) / y_46_re;
} else {
tmp = ((y_46_re * (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.6e-41: tmp = ((x_46_im / (y_46_im / y_46_re)) - x_46_re) / y_46_im elif y_46_im <= 5.8e-12: tmp = (x_46_im - (x_46_re * (y_46_im / y_46_re))) / y_46_re else: tmp = ((y_46_re * (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.6e-41) tmp = Float64(Float64(Float64(x_46_im / Float64(y_46_im / y_46_re)) - x_46_re) / y_46_im); elseif (y_46_im <= 5.8e-12) tmp = Float64(Float64(x_46_im - Float64(x_46_re * Float64(y_46_im / y_46_re))) / y_46_re); else tmp = Float64(Float64(Float64(y_46_re * Float64(x_46_im / y_46_im)) - 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.6e-41) tmp = ((x_46_im / (y_46_im / y_46_re)) - x_46_re) / y_46_im; elseif (y_46_im <= 5.8e-12) tmp = (x_46_im - (x_46_re * (y_46_im / y_46_re))) / y_46_re; else tmp = ((y_46_re * (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.6e-41], N[(N[(N[(x$46$im / N[(y$46$im / y$46$re), $MachinePrecision]), $MachinePrecision] - x$46$re), $MachinePrecision] / y$46$im), $MachinePrecision], If[LessEqual[y$46$im, 5.8e-12], N[(N[(x$46$im - N[(x$46$re * N[(y$46$im / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y$46$re), $MachinePrecision], N[(N[(N[(y$46$re * N[(x$46$im / y$46$im), $MachinePrecision]), $MachinePrecision] - x$46$re), $MachinePrecision] / y$46$im), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.im \leq -1.6 \cdot 10^{-41}:\\
\;\;\;\;\frac{\frac{x.im}{\frac{y.im}{y.re}} - x.re}{y.im}\\
\mathbf{elif}\;y.im \leq 5.8 \cdot 10^{-12}:\\
\;\;\;\;\frac{x.im - x.re \cdot \frac{y.im}{y.re}}{y.re}\\
\mathbf{else}:\\
\;\;\;\;\frac{y.re \cdot \frac{x.im}{y.im} - x.re}{y.im}\\
\end{array}
\end{array}
if y.im < -1.60000000000000006e-41Initial program 42.7%
Taylor expanded in y.im around -inf 74.9%
mul-1-neg74.9%
distribute-neg-frac274.9%
mul-1-neg74.9%
unsub-neg74.9%
*-commutative74.9%
associate-/l*76.7%
Simplified76.7%
associate-*r/74.9%
*-commutative74.9%
div-inv74.9%
associate-*r*76.8%
div-inv76.8%
clear-num76.8%
un-div-inv76.8%
Applied egg-rr76.8%
if -1.60000000000000006e-41 < y.im < 5.8000000000000003e-12Initial program 69.7%
Taylor expanded in y.re around inf 83.1%
mul-1-neg83.1%
unsub-neg83.1%
associate-/l*84.1%
Simplified84.1%
if 5.8000000000000003e-12 < y.im Initial program 54.7%
Taylor expanded in y.im around -inf 77.3%
mul-1-neg77.3%
distribute-neg-frac277.3%
mul-1-neg77.3%
unsub-neg77.3%
*-commutative77.3%
associate-/l*80.2%
Simplified80.2%
Final simplification81.4%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (<= y.im -2.7e-41)
(/ (- (* x.im (/ y.re y.im)) x.re) y.im)
(if (<= y.im 6.5e-12)
(/ (- x.im (* x.re (/ y.im y.re))) y.re)
(/ (- (* y.re (/ 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 <= -2.7e-41) {
tmp = ((x_46_im * (y_46_re / y_46_im)) - x_46_re) / y_46_im;
} else if (y_46_im <= 6.5e-12) {
tmp = (x_46_im - (x_46_re * (y_46_im / y_46_re))) / y_46_re;
} else {
tmp = ((y_46_re * (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 <= (-2.7d-41)) then
tmp = ((x_46im * (y_46re / y_46im)) - x_46re) / y_46im
else if (y_46im <= 6.5d-12) then
tmp = (x_46im - (x_46re * (y_46im / y_46re))) / y_46re
else
tmp = ((y_46re * (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 <= -2.7e-41) {
tmp = ((x_46_im * (y_46_re / y_46_im)) - x_46_re) / y_46_im;
} else if (y_46_im <= 6.5e-12) {
tmp = (x_46_im - (x_46_re * (y_46_im / y_46_re))) / y_46_re;
} else {
tmp = ((y_46_re * (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 <= -2.7e-41: tmp = ((x_46_im * (y_46_re / y_46_im)) - x_46_re) / y_46_im elif y_46_im <= 6.5e-12: tmp = (x_46_im - (x_46_re * (y_46_im / y_46_re))) / y_46_re else: tmp = ((y_46_re * (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 <= -2.7e-41) tmp = Float64(Float64(Float64(x_46_im * Float64(y_46_re / y_46_im)) - x_46_re) / y_46_im); elseif (y_46_im <= 6.5e-12) tmp = Float64(Float64(x_46_im - Float64(x_46_re * Float64(y_46_im / y_46_re))) / y_46_re); else tmp = Float64(Float64(Float64(y_46_re * Float64(x_46_im / y_46_im)) - 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.7e-41) tmp = ((x_46_im * (y_46_re / y_46_im)) - x_46_re) / y_46_im; elseif (y_46_im <= 6.5e-12) tmp = (x_46_im - (x_46_re * (y_46_im / y_46_re))) / y_46_re; else tmp = ((y_46_re * (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, -2.7e-41], N[(N[(N[(x$46$im * N[(y$46$re / y$46$im), $MachinePrecision]), $MachinePrecision] - x$46$re), $MachinePrecision] / y$46$im), $MachinePrecision], If[LessEqual[y$46$im, 6.5e-12], N[(N[(x$46$im - N[(x$46$re * N[(y$46$im / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y$46$re), $MachinePrecision], N[(N[(N[(y$46$re * N[(x$46$im / y$46$im), $MachinePrecision]), $MachinePrecision] - x$46$re), $MachinePrecision] / y$46$im), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.im \leq -2.7 \cdot 10^{-41}:\\
\;\;\;\;\frac{x.im \cdot \frac{y.re}{y.im} - x.re}{y.im}\\
\mathbf{elif}\;y.im \leq 6.5 \cdot 10^{-12}:\\
\;\;\;\;\frac{x.im - x.re \cdot \frac{y.im}{y.re}}{y.re}\\
\mathbf{else}:\\
\;\;\;\;\frac{y.re \cdot \frac{x.im}{y.im} - x.re}{y.im}\\
\end{array}
\end{array}
if y.im < -2.7e-41Initial program 42.7%
Taylor expanded in y.re around 0 71.8%
+-commutative71.8%
mul-1-neg71.8%
unsub-neg71.8%
unpow271.8%
associate-/r*74.9%
div-sub74.9%
associate-/l*76.8%
fma-neg76.8%
Simplified76.8%
fma-undefine76.8%
unsub-neg76.8%
Applied egg-rr76.8%
if -2.7e-41 < y.im < 6.5000000000000002e-12Initial program 69.7%
Taylor expanded in y.re around inf 83.1%
mul-1-neg83.1%
unsub-neg83.1%
associate-/l*84.1%
Simplified84.1%
if 6.5000000000000002e-12 < y.im Initial program 54.7%
Taylor expanded in y.im around -inf 77.3%
mul-1-neg77.3%
distribute-neg-frac277.3%
mul-1-neg77.3%
unsub-neg77.3%
*-commutative77.3%
associate-/l*80.2%
Simplified80.2%
Final simplification81.4%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (<= y.im -2.6e-41)
(/ (- (* x.im (/ y.re y.im)) x.re) y.im)
(if (<= y.im 6.5e-12)
(/ (- x.im (* x.re (/ y.im y.re))) y.re)
(/ (- (/ y.re (/ y.im x.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 <= -2.6e-41) {
tmp = ((x_46_im * (y_46_re / y_46_im)) - x_46_re) / y_46_im;
} else if (y_46_im <= 6.5e-12) {
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)) - 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.6d-41)) then
tmp = ((x_46im * (y_46re / y_46im)) - x_46re) / y_46im
else if (y_46im <= 6.5d-12) then
tmp = (x_46im - (x_46re * (y_46im / y_46re))) / y_46re
else
tmp = ((y_46re / (y_46im / x_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 <= -2.6e-41) {
tmp = ((x_46_im * (y_46_re / y_46_im)) - x_46_re) / y_46_im;
} else if (y_46_im <= 6.5e-12) {
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)) - 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.6e-41: tmp = ((x_46_im * (y_46_re / y_46_im)) - x_46_re) / y_46_im elif y_46_im <= 6.5e-12: 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)) - 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.6e-41) tmp = Float64(Float64(Float64(x_46_im * Float64(y_46_re / y_46_im)) - x_46_re) / y_46_im); elseif (y_46_im <= 6.5e-12) tmp = Float64(Float64(x_46_im - Float64(x_46_re * Float64(y_46_im / y_46_re))) / y_46_re); else tmp = Float64(Float64(Float64(y_46_re / Float64(y_46_im / x_46_im)) - 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.6e-41) tmp = ((x_46_im * (y_46_re / y_46_im)) - x_46_re) / y_46_im; elseif (y_46_im <= 6.5e-12) 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)) - 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.6e-41], N[(N[(N[(x$46$im * N[(y$46$re / y$46$im), $MachinePrecision]), $MachinePrecision] - x$46$re), $MachinePrecision] / y$46$im), $MachinePrecision], If[LessEqual[y$46$im, 6.5e-12], N[(N[(x$46$im - N[(x$46$re * N[(y$46$im / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y$46$re), $MachinePrecision], N[(N[(N[(y$46$re / N[(y$46$im / x$46$im), $MachinePrecision]), $MachinePrecision] - x$46$re), $MachinePrecision] / y$46$im), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.im \leq -2.6 \cdot 10^{-41}:\\
\;\;\;\;\frac{x.im \cdot \frac{y.re}{y.im} - x.re}{y.im}\\
\mathbf{elif}\;y.im \leq 6.5 \cdot 10^{-12}:\\
\;\;\;\;\frac{x.im - x.re \cdot \frac{y.im}{y.re}}{y.re}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{y.re}{\frac{y.im}{x.im}} - x.re}{y.im}\\
\end{array}
\end{array}
if y.im < -2.5999999999999999e-41Initial program 42.7%
Taylor expanded in y.re around 0 71.8%
+-commutative71.8%
mul-1-neg71.8%
unsub-neg71.8%
unpow271.8%
associate-/r*74.9%
div-sub74.9%
associate-/l*76.8%
fma-neg76.8%
Simplified76.8%
fma-undefine76.8%
unsub-neg76.8%
Applied egg-rr76.8%
if -2.5999999999999999e-41 < y.im < 6.5000000000000002e-12Initial program 69.7%
Taylor expanded in y.re around inf 83.1%
mul-1-neg83.1%
unsub-neg83.1%
associate-/l*84.1%
Simplified84.1%
if 6.5000000000000002e-12 < y.im Initial program 54.7%
fma-neg54.7%
distribute-rgt-neg-out54.7%
+-commutative54.7%
fma-define54.7%
Simplified54.7%
distribute-rgt-neg-out54.7%
fma-neg54.7%
Applied egg-rr54.7%
Taylor expanded in y.im around inf 77.3%
associate-*r/80.1%
+-commutative80.1%
mul-1-neg80.1%
sub-neg80.1%
*-commutative80.1%
associate-/r/80.1%
Simplified80.1%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (or (<= y.re -4.2e+19) (not (<= y.re 1.04e+71))) (/ x.im y.re) (/ x.re (- y.im))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_re <= -4.2e+19) || !(y_46_re <= 1.04e+71)) {
tmp = x_46_im / y_46_re;
} else {
tmp = x_46_re / -y_46_im;
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: tmp
if ((y_46re <= (-4.2d+19)) .or. (.not. (y_46re <= 1.04d+71))) then
tmp = x_46im / y_46re
else
tmp = x_46re / -y_46im
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_re <= -4.2e+19) || !(y_46_re <= 1.04e+71)) {
tmp = x_46_im / y_46_re;
} else {
tmp = x_46_re / -y_46_im;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if (y_46_re <= -4.2e+19) or not (y_46_re <= 1.04e+71): tmp = x_46_im / y_46_re else: tmp = x_46_re / -y_46_im return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if ((y_46_re <= -4.2e+19) || !(y_46_re <= 1.04e+71)) tmp = Float64(x_46_im / y_46_re); else tmp = Float64(x_46_re / Float64(-y_46_im)); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if ((y_46_re <= -4.2e+19) || ~((y_46_re <= 1.04e+71))) tmp = x_46_im / y_46_re; else tmp = x_46_re / -y_46_im; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[Or[LessEqual[y$46$re, -4.2e+19], N[Not[LessEqual[y$46$re, 1.04e+71]], $MachinePrecision]], N[(x$46$im / y$46$re), $MachinePrecision], N[(x$46$re / (-y$46$im)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq -4.2 \cdot 10^{+19} \lor \neg \left(y.re \leq 1.04 \cdot 10^{+71}\right):\\
\;\;\;\;\frac{x.im}{y.re}\\
\mathbf{else}:\\
\;\;\;\;\frac{x.re}{-y.im}\\
\end{array}
\end{array}
if y.re < -4.2e19 or 1.04e71 < y.re Initial program 46.5%
Taylor expanded in y.re around inf 73.4%
if -4.2e19 < y.re < 1.04e71Initial program 69.7%
Taylor expanded in y.re around 0 63.0%
associate-*r/63.0%
neg-mul-163.0%
Simplified63.0%
Final simplification67.6%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (<= y.im 2.1e+131) (/ 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.1e+131) {
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.1d+131) 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.1e+131) {
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.1e+131: 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.1e+131) 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.1e+131) 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.1e+131], 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.1 \cdot 10^{+131}:\\
\;\;\;\;\frac{x.im}{y.re}\\
\mathbf{else}:\\
\;\;\;\;\frac{x.re}{y.im}\\
\end{array}
\end{array}
if y.im < 2.09999999999999985e131Initial program 63.1%
Taylor expanded in y.re around inf 50.0%
if 2.09999999999999985e131 < y.im Initial program 37.7%
fma-neg37.7%
distribute-rgt-neg-out37.7%
*-un-lft-identity37.7%
add-sqr-sqrt37.7%
times-frac37.6%
hypot-define37.6%
add-sqr-sqrt14.9%
sqrt-unprod28.4%
distribute-rgt-neg-out28.4%
distribute-rgt-neg-out28.4%
sqr-neg28.4%
sqrt-unprod20.0%
add-sqr-sqrt34.4%
hypot-define42.3%
Applied egg-rr42.3%
Taylor expanded in y.re around 0 28.1%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (<= y.im 6.8e+123) (/ x.im y.re) (/ x.im y.im)))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_im <= 6.8e+123) {
tmp = x_46_im / y_46_re;
} else {
tmp = x_46_im / y_46_im;
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: tmp
if (y_46im <= 6.8d+123) then
tmp = x_46im / y_46re
else
tmp = x_46im / y_46im
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_im <= 6.8e+123) {
tmp = x_46_im / y_46_re;
} else {
tmp = x_46_im / y_46_im;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if y_46_im <= 6.8e+123: tmp = x_46_im / y_46_re else: tmp = x_46_im / y_46_im return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if (y_46_im <= 6.8e+123) tmp = Float64(x_46_im / y_46_re); else tmp = Float64(x_46_im / y_46_im); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if (y_46_im <= 6.8e+123) tmp = x_46_im / y_46_re; else tmp = x_46_im / y_46_im; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[y$46$im, 6.8e+123], N[(x$46$im / y$46$re), $MachinePrecision], N[(x$46$im / y$46$im), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.im \leq 6.8 \cdot 10^{+123}:\\
\;\;\;\;\frac{x.im}{y.re}\\
\mathbf{else}:\\
\;\;\;\;\frac{x.im}{y.im}\\
\end{array}
\end{array}
if y.im < 6.80000000000000002e123Initial program 62.6%
Taylor expanded in y.re around inf 50.2%
if 6.80000000000000002e123 < y.im Initial program 42.4%
fma-neg42.4%
distribute-rgt-neg-out42.4%
*-un-lft-identity42.4%
add-sqr-sqrt42.4%
times-frac42.4%
hypot-define42.4%
add-sqr-sqrt18.9%
sqrt-unprod33.8%
distribute-rgt-neg-out33.8%
distribute-rgt-neg-out33.8%
sqr-neg33.8%
sqrt-unprod21.0%
add-sqr-sqrt39.4%
hypot-define46.7%
Applied egg-rr46.7%
Taylor expanded in y.re around 0 44.8%
Taylor expanded in y.re around inf 16.9%
(FPCore (x.re x.im y.re y.im) :precision binary64 (/ x.im y.im))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return x_46_im / y_46_im;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
code = x_46im / y_46im
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return x_46_im / y_46_im;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): return x_46_im / y_46_im
function code(x_46_re, x_46_im, y_46_re, y_46_im) return Float64(x_46_im / y_46_im) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = x_46_im / y_46_im; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[(x$46$im / y$46$im), $MachinePrecision]
\begin{array}{l}
\\
\frac{x.im}{y.im}
\end{array}
Initial program 59.6%
fma-neg59.6%
distribute-rgt-neg-out59.6%
*-un-lft-identity59.6%
add-sqr-sqrt59.6%
times-frac59.5%
hypot-define59.5%
add-sqr-sqrt35.0%
sqrt-unprod43.1%
distribute-rgt-neg-out43.1%
distribute-rgt-neg-out43.1%
sqr-neg43.1%
sqrt-unprod22.8%
add-sqr-sqrt37.8%
hypot-define46.6%
Applied egg-rr46.6%
Taylor expanded in y.re around 0 32.1%
Taylor expanded in y.re around inf 7.8%
herbie shell --seed 2024137
(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))))