
(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 10 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 (* (/ 1.0 (hypot y.re y.im)) (- (/ y.re (/ (hypot y.re y.im) x.im)) (/ y.im (/ (hypot y.re y.im) x.re)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return (1.0 / hypot(y_46_re, y_46_im)) * ((y_46_re / (hypot(y_46_re, y_46_im) / x_46_im)) - (y_46_im / (hypot(y_46_re, y_46_im) / x_46_re)));
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return (1.0 / Math.hypot(y_46_re, y_46_im)) * ((y_46_re / (Math.hypot(y_46_re, y_46_im) / x_46_im)) - (y_46_im / (Math.hypot(y_46_re, y_46_im) / x_46_re)));
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): return (1.0 / math.hypot(y_46_re, y_46_im)) * ((y_46_re / (math.hypot(y_46_re, y_46_im) / x_46_im)) - (y_46_im / (math.hypot(y_46_re, y_46_im) / x_46_re)))
function code(x_46_re, x_46_im, y_46_re, y_46_im) return Float64(Float64(1.0 / hypot(y_46_re, y_46_im)) * Float64(Float64(y_46_re / Float64(hypot(y_46_re, y_46_im) / x_46_im)) - Float64(y_46_im / Float64(hypot(y_46_re, y_46_im) / x_46_re)))) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = (1.0 / hypot(y_46_re, y_46_im)) * ((y_46_re / (hypot(y_46_re, y_46_im) / x_46_im)) - (y_46_im / (hypot(y_46_re, y_46_im) / x_46_re))); end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[(N[(1.0 / N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision]), $MachinePrecision] * N[(N[(y$46$re / N[(N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision] / x$46$im), $MachinePrecision]), $MachinePrecision] - N[(y$46$im / N[(N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision] / x$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{1}{\mathsf{hypot}\left(y.re, y.im\right)} \cdot \left(\frac{y.re}{\frac{\mathsf{hypot}\left(y.re, y.im\right)}{x.im}} - \frac{y.im}{\frac{\mathsf{hypot}\left(y.re, y.im\right)}{x.re}}\right)
\end{array}
Initial program 54.6%
*-un-lft-identity54.6%
add-sqr-sqrt54.6%
times-frac54.5%
hypot-def54.6%
hypot-def69.8%
Applied egg-rr69.8%
div-sub69.8%
Applied egg-rr69.8%
*-commutative69.8%
associate-/l*82.3%
*-commutative82.3%
associate-/l*98.3%
Simplified98.3%
Final simplification98.3%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* x.re (/ y.im (hypot y.im y.re)))))
(if (<= y.re -8e+154)
(- (/ x.im y.re) (* (/ x.re y.re) (/ y.im y.re)))
(if (<= y.re 3e+89)
(/ (- (/ (* y.re x.im) (hypot y.im y.re)) t_0) (hypot y.im y.re))
(/ (- x.im t_0) (hypot y.im y.re))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = x_46_re * (y_46_im / hypot(y_46_im, y_46_re));
double tmp;
if (y_46_re <= -8e+154) {
tmp = (x_46_im / y_46_re) - ((x_46_re / y_46_re) * (y_46_im / y_46_re));
} else if (y_46_re <= 3e+89) {
tmp = (((y_46_re * x_46_im) / hypot(y_46_im, y_46_re)) - t_0) / hypot(y_46_im, y_46_re);
} else {
tmp = (x_46_im - t_0) / hypot(y_46_im, y_46_re);
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = x_46_re * (y_46_im / Math.hypot(y_46_im, y_46_re));
double tmp;
if (y_46_re <= -8e+154) {
tmp = (x_46_im / y_46_re) - ((x_46_re / y_46_re) * (y_46_im / y_46_re));
} else if (y_46_re <= 3e+89) {
tmp = (((y_46_re * x_46_im) / Math.hypot(y_46_im, y_46_re)) - t_0) / Math.hypot(y_46_im, y_46_re);
} else {
tmp = (x_46_im - t_0) / Math.hypot(y_46_im, y_46_re);
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = x_46_re * (y_46_im / math.hypot(y_46_im, y_46_re)) tmp = 0 if y_46_re <= -8e+154: tmp = (x_46_im / y_46_re) - ((x_46_re / y_46_re) * (y_46_im / y_46_re)) elif y_46_re <= 3e+89: tmp = (((y_46_re * x_46_im) / math.hypot(y_46_im, y_46_re)) - t_0) / math.hypot(y_46_im, y_46_re) else: tmp = (x_46_im - t_0) / math.hypot(y_46_im, y_46_re) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(x_46_re * Float64(y_46_im / hypot(y_46_im, y_46_re))) tmp = 0.0 if (y_46_re <= -8e+154) tmp = Float64(Float64(x_46_im / y_46_re) - Float64(Float64(x_46_re / y_46_re) * Float64(y_46_im / y_46_re))); elseif (y_46_re <= 3e+89) tmp = Float64(Float64(Float64(Float64(y_46_re * x_46_im) / hypot(y_46_im, y_46_re)) - t_0) / hypot(y_46_im, y_46_re)); else tmp = Float64(Float64(x_46_im - t_0) / hypot(y_46_im, y_46_re)); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = x_46_re * (y_46_im / hypot(y_46_im, y_46_re)); tmp = 0.0; if (y_46_re <= -8e+154) tmp = (x_46_im / y_46_re) - ((x_46_re / y_46_re) * (y_46_im / y_46_re)); elseif (y_46_re <= 3e+89) tmp = (((y_46_re * x_46_im) / hypot(y_46_im, y_46_re)) - t_0) / hypot(y_46_im, y_46_re); else tmp = (x_46_im - t_0) / hypot(y_46_im, y_46_re); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(x$46$re * N[(y$46$im / N[Sqrt[y$46$im ^ 2 + y$46$re ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -8e+154], N[(N[(x$46$im / y$46$re), $MachinePrecision] - N[(N[(x$46$re / y$46$re), $MachinePrecision] * N[(y$46$im / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 3e+89], N[(N[(N[(N[(y$46$re * x$46$im), $MachinePrecision] / N[Sqrt[y$46$im ^ 2 + y$46$re ^ 2], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision] / N[Sqrt[y$46$im ^ 2 + y$46$re ^ 2], $MachinePrecision]), $MachinePrecision], N[(N[(x$46$im - t$95$0), $MachinePrecision] / N[Sqrt[y$46$im ^ 2 + y$46$re ^ 2], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x.re \cdot \frac{y.im}{\mathsf{hypot}\left(y.im, y.re\right)}\\
\mathbf{if}\;y.re \leq -8 \cdot 10^{+154}:\\
\;\;\;\;\frac{x.im}{y.re} - \frac{x.re}{y.re} \cdot \frac{y.im}{y.re}\\
\mathbf{elif}\;y.re \leq 3 \cdot 10^{+89}:\\
\;\;\;\;\frac{\frac{y.re \cdot x.im}{\mathsf{hypot}\left(y.im, y.re\right)} - t_0}{\mathsf{hypot}\left(y.im, y.re\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x.im - t_0}{\mathsf{hypot}\left(y.im, y.re\right)}\\
\end{array}
\end{array}
if y.re < -8.0000000000000003e154Initial program 22.3%
Taylor expanded in y.re around inf 77.3%
mul-1-neg77.3%
unsub-neg77.3%
unpow277.3%
times-frac84.5%
Simplified84.5%
if -8.0000000000000003e154 < y.re < 3.00000000000000013e89Initial program 66.0%
*-un-lft-identity66.0%
add-sqr-sqrt66.0%
times-frac65.9%
hypot-def65.9%
hypot-def79.9%
Applied egg-rr79.9%
div-sub79.9%
Applied egg-rr79.9%
*-commutative79.9%
associate-/l*82.0%
*-commutative82.0%
associate-/l*97.8%
Simplified97.8%
expm1-log1p-u72.9%
expm1-udef36.7%
Applied egg-rr37.1%
expm1-def73.0%
expm1-log1p99.2%
associate-*l/96.1%
*-commutative96.1%
Simplified96.1%
if 3.00000000000000013e89 < y.re Initial program 25.8%
*-un-lft-identity25.8%
add-sqr-sqrt25.8%
times-frac25.8%
hypot-def25.8%
hypot-def40.5%
Applied egg-rr40.5%
div-sub40.5%
Applied egg-rr40.5%
*-commutative40.5%
associate-/l*78.3%
*-commutative78.3%
associate-/l*99.6%
Simplified99.6%
expm1-log1p-u86.8%
expm1-udef22.3%
Applied egg-rr22.3%
expm1-def87.1%
expm1-log1p99.8%
associate-*l/52.4%
*-commutative52.4%
Simplified52.4%
Taylor expanded in y.re around inf 88.3%
Final simplification93.5%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (- (* y.re x.im) (* y.im x.re)))
(t_1 (/ t_0 (+ (* y.re y.re) (* y.im y.im)))))
(if (or (<= t_1 -2e+289) (not (<= t_1 5e+231)))
(/ (- x.im (* x.re (/ y.im (hypot y.im y.re)))) (hypot y.im y.re))
(* (/ 1.0 (hypot y.re y.im)) (/ t_0 (hypot y.re y.im))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = (y_46_re * x_46_im) - (y_46_im * x_46_re);
double t_1 = t_0 / ((y_46_re * y_46_re) + (y_46_im * y_46_im));
double tmp;
if ((t_1 <= -2e+289) || !(t_1 <= 5e+231)) {
tmp = (x_46_im - (x_46_re * (y_46_im / hypot(y_46_im, y_46_re)))) / hypot(y_46_im, y_46_re);
} else {
tmp = (1.0 / hypot(y_46_re, y_46_im)) * (t_0 / hypot(y_46_re, y_46_im));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = (y_46_re * x_46_im) - (y_46_im * x_46_re);
double t_1 = t_0 / ((y_46_re * y_46_re) + (y_46_im * y_46_im));
double tmp;
if ((t_1 <= -2e+289) || !(t_1 <= 5e+231)) {
tmp = (x_46_im - (x_46_re * (y_46_im / Math.hypot(y_46_im, y_46_re)))) / Math.hypot(y_46_im, y_46_re);
} else {
tmp = (1.0 / Math.hypot(y_46_re, y_46_im)) * (t_0 / Math.hypot(y_46_re, y_46_im));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = (y_46_re * x_46_im) - (y_46_im * x_46_re) t_1 = t_0 / ((y_46_re * y_46_re) + (y_46_im * y_46_im)) tmp = 0 if (t_1 <= -2e+289) or not (t_1 <= 5e+231): tmp = (x_46_im - (x_46_re * (y_46_im / math.hypot(y_46_im, y_46_re)))) / math.hypot(y_46_im, y_46_re) else: tmp = (1.0 / math.hypot(y_46_re, y_46_im)) * (t_0 / math.hypot(y_46_re, y_46_im)) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(Float64(y_46_re * x_46_im) - Float64(y_46_im * x_46_re)) t_1 = Float64(t_0 / Float64(Float64(y_46_re * y_46_re) + Float64(y_46_im * y_46_im))) tmp = 0.0 if ((t_1 <= -2e+289) || !(t_1 <= 5e+231)) tmp = Float64(Float64(x_46_im - Float64(x_46_re * Float64(y_46_im / hypot(y_46_im, y_46_re)))) / hypot(y_46_im, y_46_re)); else tmp = Float64(Float64(1.0 / hypot(y_46_re, y_46_im)) * Float64(t_0 / hypot(y_46_re, y_46_im))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = (y_46_re * x_46_im) - (y_46_im * x_46_re); t_1 = t_0 / ((y_46_re * y_46_re) + (y_46_im * y_46_im)); tmp = 0.0; if ((t_1 <= -2e+289) || ~((t_1 <= 5e+231))) tmp = (x_46_im - (x_46_re * (y_46_im / hypot(y_46_im, y_46_re)))) / hypot(y_46_im, y_46_re); else tmp = (1.0 / hypot(y_46_re, y_46_im)) * (t_0 / hypot(y_46_re, y_46_im)); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[(y$46$re * x$46$im), $MachinePrecision] - N[(y$46$im * x$46$re), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(t$95$0 / N[(N[(y$46$re * y$46$re), $MachinePrecision] + N[(y$46$im * y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -2e+289], N[Not[LessEqual[t$95$1, 5e+231]], $MachinePrecision]], N[(N[(x$46$im - N[(x$46$re * N[(y$46$im / N[Sqrt[y$46$im ^ 2 + y$46$re ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sqrt[y$46$im ^ 2 + y$46$re ^ 2], $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision]), $MachinePrecision] * N[(t$95$0 / N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot x.im - y.im \cdot x.re\\
t_1 := \frac{t_0}{y.re \cdot y.re + y.im \cdot y.im}\\
\mathbf{if}\;t_1 \leq -2 \cdot 10^{+289} \lor \neg \left(t_1 \leq 5 \cdot 10^{+231}\right):\\
\;\;\;\;\frac{x.im - x.re \cdot \frac{y.im}{\mathsf{hypot}\left(y.im, y.re\right)}}{\mathsf{hypot}\left(y.im, y.re\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\mathsf{hypot}\left(y.re, y.im\right)} \cdot \frac{t_0}{\mathsf{hypot}\left(y.re, y.im\right)}\\
\end{array}
\end{array}
if (/.f64 (-.f64 (*.f64 x.im y.re) (*.f64 x.re y.im)) (+.f64 (*.f64 y.re y.re) (*.f64 y.im y.im))) < -2.0000000000000001e289 or 5.00000000000000028e231 < (/.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 13.6%
*-un-lft-identity13.6%
add-sqr-sqrt13.6%
times-frac13.6%
hypot-def13.6%
hypot-def25.3%
Applied egg-rr25.3%
div-sub25.3%
Applied egg-rr25.3%
*-commutative25.3%
associate-/l*55.6%
*-commutative55.6%
associate-/l*97.7%
Simplified97.7%
expm1-log1p-u73.3%
expm1-udef37.7%
Applied egg-rr37.7%
expm1-def73.6%
expm1-log1p99.9%
associate-*l/61.1%
*-commutative61.1%
Simplified61.1%
Taylor expanded in y.re around inf 73.8%
if -2.0000000000000001e289 < (/.f64 (-.f64 (*.f64 x.im y.re) (*.f64 x.re y.im)) (+.f64 (*.f64 y.re y.re) (*.f64 y.im y.im))) < 5.00000000000000028e231Initial program 80.9%
*-un-lft-identity80.9%
add-sqr-sqrt80.9%
times-frac80.8%
hypot-def80.8%
hypot-def98.3%
Applied egg-rr98.3%
Final simplification88.7%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (<= y.im -1.6e-11)
(/ (- (* y.re (/ x.im y.im)) x.re) y.im)
(if (<= y.im 3.9e-154)
(/ (- x.im (* y.im (/ x.re y.re))) y.re)
(if (<= y.im 1.9e+97)
(/ (- (* y.re x.im) (* y.im x.re)) (+ (* y.re y.re) (* y.im y.im)))
(/ (- (* x.im (/ 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 tmp;
if (y_46_im <= -1.6e-11) {
tmp = ((y_46_re * (x_46_im / y_46_im)) - x_46_re) / y_46_im;
} else if (y_46_im <= 3.9e-154) {
tmp = (x_46_im - (y_46_im * (x_46_re / y_46_re))) / y_46_re;
} else if (y_46_im <= 1.9e+97) {
tmp = ((y_46_re * x_46_im) - (y_46_im * x_46_re)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im));
} else {
tmp = ((x_46_im * (y_46_re / 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-11)) then
tmp = ((y_46re * (x_46im / y_46im)) - x_46re) / y_46im
else if (y_46im <= 3.9d-154) then
tmp = (x_46im - (y_46im * (x_46re / y_46re))) / y_46re
else if (y_46im <= 1.9d+97) then
tmp = ((y_46re * x_46im) - (y_46im * x_46re)) / ((y_46re * y_46re) + (y_46im * y_46im))
else
tmp = ((x_46im * (y_46re / 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-11) {
tmp = ((y_46_re * (x_46_im / y_46_im)) - x_46_re) / y_46_im;
} else if (y_46_im <= 3.9e-154) {
tmp = (x_46_im - (y_46_im * (x_46_re / y_46_re))) / y_46_re;
} else if (y_46_im <= 1.9e+97) {
tmp = ((y_46_re * x_46_im) - (y_46_im * x_46_re)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im));
} else {
tmp = ((x_46_im * (y_46_re / y_46_im)) - x_46_re) / y_46_im;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if y_46_im <= -1.6e-11: tmp = ((y_46_re * (x_46_im / y_46_im)) - x_46_re) / y_46_im elif y_46_im <= 3.9e-154: tmp = (x_46_im - (y_46_im * (x_46_re / y_46_re))) / y_46_re elif y_46_im <= 1.9e+97: tmp = ((y_46_re * x_46_im) - (y_46_im * x_46_re)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im)) else: tmp = ((x_46_im * (y_46_re / y_46_im)) - x_46_re) / y_46_im return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if (y_46_im <= -1.6e-11) tmp = Float64(Float64(Float64(y_46_re * Float64(x_46_im / y_46_im)) - x_46_re) / y_46_im); elseif (y_46_im <= 3.9e-154) tmp = Float64(Float64(x_46_im - Float64(y_46_im * Float64(x_46_re / y_46_re))) / y_46_re); elseif (y_46_im <= 1.9e+97) tmp = Float64(Float64(Float64(y_46_re * x_46_im) - Float64(y_46_im * x_46_re)) / Float64(Float64(y_46_re * y_46_re) + Float64(y_46_im * y_46_im))); else tmp = Float64(Float64(Float64(x_46_im * Float64(y_46_re / 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-11) tmp = ((y_46_re * (x_46_im / y_46_im)) - x_46_re) / y_46_im; elseif (y_46_im <= 3.9e-154) tmp = (x_46_im - (y_46_im * (x_46_re / y_46_re))) / y_46_re; elseif (y_46_im <= 1.9e+97) tmp = ((y_46_re * x_46_im) - (y_46_im * x_46_re)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im)); else tmp = ((x_46_im * (y_46_re / y_46_im)) - x_46_re) / y_46_im; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[y$46$im, -1.6e-11], 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, 3.9e-154], N[(N[(x$46$im - N[(y$46$im * N[(x$46$re / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y$46$re), $MachinePrecision], If[LessEqual[y$46$im, 1.9e+97], N[(N[(N[(y$46$re * x$46$im), $MachinePrecision] - N[(y$46$im * x$46$re), $MachinePrecision]), $MachinePrecision] / N[(N[(y$46$re * y$46$re), $MachinePrecision] + N[(y$46$im * y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x$46$im * N[(y$46$re / 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^{-11}:\\
\;\;\;\;\frac{y.re \cdot \frac{x.im}{y.im} - x.re}{y.im}\\
\mathbf{elif}\;y.im \leq 3.9 \cdot 10^{-154}:\\
\;\;\;\;\frac{x.im - y.im \cdot \frac{x.re}{y.re}}{y.re}\\
\mathbf{elif}\;y.im \leq 1.9 \cdot 10^{+97}:\\
\;\;\;\;\frac{y.re \cdot x.im - y.im \cdot x.re}{y.re \cdot y.re + y.im \cdot y.im}\\
\mathbf{else}:\\
\;\;\;\;\frac{x.im \cdot \frac{y.re}{y.im} - x.re}{y.im}\\
\end{array}
\end{array}
if y.im < -1.59999999999999997e-11Initial program 45.2%
*-un-lft-identity45.2%
add-sqr-sqrt45.2%
times-frac45.2%
hypot-def45.2%
hypot-def65.7%
Applied egg-rr65.7%
Taylor expanded in y.re around 0 74.0%
neg-mul-174.0%
+-commutative74.0%
unpow274.1%
*-commutative74.1%
times-frac82.5%
fma-udef82.5%
fma-neg82.5%
associate-*r/83.7%
*-commutative83.7%
div-sub83.7%
Simplified83.7%
if -1.59999999999999997e-11 < y.im < 3.90000000000000032e-154Initial program 54.7%
*-un-lft-identity54.7%
add-sqr-sqrt54.7%
times-frac54.6%
hypot-def54.6%
hypot-def73.4%
Applied egg-rr73.4%
Taylor expanded in y.re around inf 71.5%
mul-1-neg71.5%
unsub-neg71.5%
unpow271.5%
associate-/r*82.4%
div-sub83.7%
*-commutative83.7%
associate-*r/85.4%
Simplified85.4%
if 3.90000000000000032e-154 < y.im < 1.90000000000000018e97Initial program 80.2%
if 1.90000000000000018e97 < y.im Initial program 36.8%
Taylor expanded in y.re around 0 77.7%
+-commutative77.7%
mul-1-neg77.7%
unsub-neg77.7%
unpow277.7%
times-frac88.1%
Simplified88.1%
associate-*r/88.1%
sub-div88.1%
Applied egg-rr88.1%
Final simplification84.2%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (or (<= y.im -2e-11) (not (<= y.im 1.72e+25))) (- (/ x.re y.im)) (/ (- x.im (* y.im (/ x.re y.re))) y.re)))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_im <= -2e-11) || !(y_46_im <= 1.72e+25)) {
tmp = -(x_46_re / y_46_im);
} else {
tmp = (x_46_im - (y_46_im * (x_46_re / y_46_re))) / y_46_re;
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: tmp
if ((y_46im <= (-2d-11)) .or. (.not. (y_46im <= 1.72d+25))) then
tmp = -(x_46re / y_46im)
else
tmp = (x_46im - (y_46im * (x_46re / y_46re))) / y_46re
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_im <= -2e-11) || !(y_46_im <= 1.72e+25)) {
tmp = -(x_46_re / y_46_im);
} else {
tmp = (x_46_im - (y_46_im * (x_46_re / y_46_re))) / y_46_re;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if (y_46_im <= -2e-11) or not (y_46_im <= 1.72e+25): tmp = -(x_46_re / y_46_im) else: tmp = (x_46_im - (y_46_im * (x_46_re / y_46_re))) / y_46_re return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if ((y_46_im <= -2e-11) || !(y_46_im <= 1.72e+25)) tmp = Float64(-Float64(x_46_re / y_46_im)); else tmp = Float64(Float64(x_46_im - Float64(y_46_im * Float64(x_46_re / y_46_re))) / y_46_re); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if ((y_46_im <= -2e-11) || ~((y_46_im <= 1.72e+25))) tmp = -(x_46_re / y_46_im); else tmp = (x_46_im - (y_46_im * (x_46_re / y_46_re))) / y_46_re; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[Or[LessEqual[y$46$im, -2e-11], N[Not[LessEqual[y$46$im, 1.72e+25]], $MachinePrecision]], (-N[(x$46$re / y$46$im), $MachinePrecision]), N[(N[(x$46$im - N[(y$46$im * N[(x$46$re / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y$46$re), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.im \leq -2 \cdot 10^{-11} \lor \neg \left(y.im \leq 1.72 \cdot 10^{+25}\right):\\
\;\;\;\;-\frac{x.re}{y.im}\\
\mathbf{else}:\\
\;\;\;\;\frac{x.im - y.im \cdot \frac{x.re}{y.re}}{y.re}\\
\end{array}
\end{array}
if y.im < -1.99999999999999988e-11 or 1.71999999999999995e25 < y.im Initial program 47.3%
Taylor expanded in y.re around 0 72.9%
associate-*r/72.9%
neg-mul-172.9%
Simplified72.9%
if -1.99999999999999988e-11 < y.im < 1.71999999999999995e25Initial program 63.2%
*-un-lft-identity63.2%
add-sqr-sqrt63.2%
times-frac63.1%
hypot-def63.1%
hypot-def78.3%
Applied egg-rr78.3%
Taylor expanded in y.re around inf 65.8%
mul-1-neg65.8%
unsub-neg65.8%
unpow265.8%
associate-/r*74.5%
div-sub75.4%
*-commutative75.4%
associate-*r/76.6%
Simplified76.6%
Final simplification74.6%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (or (<= y.im -2.4e-11) (not (<= y.im 2.6e-123))) (/ (- (* y.re (/ x.im y.im)) x.re) y.im) (/ (- x.im (* y.im (/ x.re y.re))) y.re)))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_im <= -2.4e-11) || !(y_46_im <= 2.6e-123)) {
tmp = ((y_46_re * (x_46_im / y_46_im)) - x_46_re) / y_46_im;
} else {
tmp = (x_46_im - (y_46_im * (x_46_re / y_46_re))) / y_46_re;
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: tmp
if ((y_46im <= (-2.4d-11)) .or. (.not. (y_46im <= 2.6d-123))) then
tmp = ((y_46re * (x_46im / y_46im)) - x_46re) / y_46im
else
tmp = (x_46im - (y_46im * (x_46re / y_46re))) / y_46re
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_im <= -2.4e-11) || !(y_46_im <= 2.6e-123)) {
tmp = ((y_46_re * (x_46_im / y_46_im)) - x_46_re) / y_46_im;
} else {
tmp = (x_46_im - (y_46_im * (x_46_re / y_46_re))) / y_46_re;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if (y_46_im <= -2.4e-11) or not (y_46_im <= 2.6e-123): tmp = ((y_46_re * (x_46_im / y_46_im)) - x_46_re) / y_46_im else: tmp = (x_46_im - (y_46_im * (x_46_re / y_46_re))) / y_46_re return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if ((y_46_im <= -2.4e-11) || !(y_46_im <= 2.6e-123)) tmp = Float64(Float64(Float64(y_46_re * Float64(x_46_im / y_46_im)) - x_46_re) / y_46_im); else tmp = Float64(Float64(x_46_im - Float64(y_46_im * Float64(x_46_re / y_46_re))) / y_46_re); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if ((y_46_im <= -2.4e-11) || ~((y_46_im <= 2.6e-123))) tmp = ((y_46_re * (x_46_im / y_46_im)) - x_46_re) / y_46_im; else tmp = (x_46_im - (y_46_im * (x_46_re / y_46_re))) / y_46_re; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[Or[LessEqual[y$46$im, -2.4e-11], N[Not[LessEqual[y$46$im, 2.6e-123]], $MachinePrecision]], N[(N[(N[(y$46$re * N[(x$46$im / y$46$im), $MachinePrecision]), $MachinePrecision] - x$46$re), $MachinePrecision] / y$46$im), $MachinePrecision], N[(N[(x$46$im - N[(y$46$im * N[(x$46$re / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y$46$re), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.im \leq -2.4 \cdot 10^{-11} \lor \neg \left(y.im \leq 2.6 \cdot 10^{-123}\right):\\
\;\;\;\;\frac{y.re \cdot \frac{x.im}{y.im} - x.re}{y.im}\\
\mathbf{else}:\\
\;\;\;\;\frac{x.im - y.im \cdot \frac{x.re}{y.re}}{y.re}\\
\end{array}
\end{array}
if y.im < -2.4000000000000001e-11 or 2.59999999999999995e-123 < y.im Initial program 52.9%
*-un-lft-identity52.9%
add-sqr-sqrt52.9%
times-frac52.9%
hypot-def52.9%
hypot-def66.8%
Applied egg-rr66.8%
Taylor expanded in y.re around 0 71.8%
neg-mul-171.8%
+-commutative71.8%
unpow271.8%
*-commutative71.8%
times-frac78.3%
fma-udef78.3%
fma-neg78.3%
associate-*r/78.8%
*-commutative78.8%
div-sub78.8%
Simplified78.8%
if -2.4000000000000001e-11 < y.im < 2.59999999999999995e-123Initial program 57.7%
*-un-lft-identity57.7%
add-sqr-sqrt57.7%
times-frac57.6%
hypot-def57.6%
hypot-def75.1%
Applied egg-rr75.1%
Taylor expanded in y.re around inf 71.3%
mul-1-neg71.3%
unsub-neg71.3%
unpow271.3%
associate-/r*81.6%
div-sub82.8%
*-commutative82.8%
associate-*r/84.3%
Simplified84.3%
Final simplification80.8%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (or (<= y.im -2.25e-11) (not (<= y.im 4.8e+22))) (- (/ x.re y.im)) (/ x.im y.re)))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_im <= -2.25e-11) || !(y_46_im <= 4.8e+22)) {
tmp = -(x_46_re / y_46_im);
} else {
tmp = x_46_im / y_46_re;
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: tmp
if ((y_46im <= (-2.25d-11)) .or. (.not. (y_46im <= 4.8d+22))) then
tmp = -(x_46re / y_46im)
else
tmp = x_46im / y_46re
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_im <= -2.25e-11) || !(y_46_im <= 4.8e+22)) {
tmp = -(x_46_re / y_46_im);
} else {
tmp = x_46_im / y_46_re;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if (y_46_im <= -2.25e-11) or not (y_46_im <= 4.8e+22): tmp = -(x_46_re / y_46_im) else: tmp = x_46_im / y_46_re return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if ((y_46_im <= -2.25e-11) || !(y_46_im <= 4.8e+22)) 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_im <= -2.25e-11) || ~((y_46_im <= 4.8e+22))) tmp = -(x_46_re / y_46_im); else tmp = x_46_im / y_46_re; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[Or[LessEqual[y$46$im, -2.25e-11], N[Not[LessEqual[y$46$im, 4.8e+22]], $MachinePrecision]], (-N[(x$46$re / y$46$im), $MachinePrecision]), N[(x$46$im / y$46$re), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.im \leq -2.25 \cdot 10^{-11} \lor \neg \left(y.im \leq 4.8 \cdot 10^{+22}\right):\\
\;\;\;\;-\frac{x.re}{y.im}\\
\mathbf{else}:\\
\;\;\;\;\frac{x.im}{y.re}\\
\end{array}
\end{array}
if y.im < -2.25e-11 or 4.8e22 < y.im Initial program 47.3%
Taylor expanded in y.re around 0 72.9%
associate-*r/72.9%
neg-mul-172.9%
Simplified72.9%
if -2.25e-11 < y.im < 4.8e22Initial program 63.2%
Taylor expanded in y.re around inf 61.2%
Final simplification67.5%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (<= y.im -2.1e+196) (/ x.re y.im) (if (<= y.im 1.36e+118) (/ 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+196) {
tmp = x_46_re / y_46_im;
} else if (y_46_im <= 1.36e+118) {
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+196)) then
tmp = x_46re / y_46im
else if (y_46im <= 1.36d+118) 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+196) {
tmp = x_46_re / y_46_im;
} else if (y_46_im <= 1.36e+118) {
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+196: tmp = x_46_re / y_46_im elif y_46_im <= 1.36e+118: 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+196) tmp = Float64(x_46_re / y_46_im); elseif (y_46_im <= 1.36e+118) 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+196) tmp = x_46_re / y_46_im; elseif (y_46_im <= 1.36e+118) 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+196], N[(x$46$re / y$46$im), $MachinePrecision], If[LessEqual[y$46$im, 1.36e+118], 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^{+196}:\\
\;\;\;\;\frac{x.re}{y.im}\\
\mathbf{elif}\;y.im \leq 1.36 \cdot 10^{+118}:\\
\;\;\;\;\frac{x.im}{y.re}\\
\mathbf{else}:\\
\;\;\;\;\frac{x.re}{y.im}\\
\end{array}
\end{array}
if y.im < -2.10000000000000015e196 or 1.36e118 < y.im Initial program 32.0%
*-un-lft-identity32.0%
add-sqr-sqrt32.0%
times-frac32.0%
hypot-def32.0%
hypot-def49.6%
Applied egg-rr49.6%
Taylor expanded in y.im around -inf 49.3%
Taylor expanded in y.re around 0 28.0%
if -2.10000000000000015e196 < y.im < 1.36e118Initial program 61.5%
Taylor expanded in y.re around inf 45.0%
Final simplification41.0%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (<= y.im -1.35e+168) (/ 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.35e+168) {
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.35d+168)) 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.35e+168) {
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.35e+168: 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.35e+168) 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.35e+168) 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.35e+168], 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.35 \cdot 10^{+168}:\\
\;\;\;\;\frac{x.im}{y.im}\\
\mathbf{else}:\\
\;\;\;\;\frac{x.im}{y.re}\\
\end{array}
\end{array}
if y.im < -1.35000000000000008e168Initial program 20.1%
*-un-lft-identity20.1%
add-sqr-sqrt20.1%
times-frac20.1%
hypot-def20.1%
hypot-def52.7%
Applied egg-rr52.7%
Taylor expanded in y.re around -inf 17.7%
neg-mul-117.7%
Simplified17.7%
Taylor expanded in y.im around -inf 17.5%
if -1.35000000000000008e168 < y.im Initial program 59.3%
Taylor expanded in y.re around inf 41.0%
Final simplification38.1%
(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 54.6%
*-un-lft-identity54.6%
add-sqr-sqrt54.6%
times-frac54.5%
hypot-def54.6%
hypot-def69.8%
Applied egg-rr69.8%
Taylor expanded in y.re around -inf 23.1%
neg-mul-123.1%
Simplified23.1%
Taylor expanded in y.im around -inf 8.7%
Final simplification8.7%
herbie shell --seed 2023201
(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))))