
(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 15 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)) (- (/ x.im (/ (hypot y.re y.im) y.re)) (/ x.re (/ (hypot 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 (1.0 / hypot(y_46_re, y_46_im)) * ((x_46_im / (hypot(y_46_re, y_46_im) / y_46_re)) - (x_46_re / (hypot(y_46_re, y_46_im) / y_46_im)));
}
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)) * ((x_46_im / (Math.hypot(y_46_re, y_46_im) / y_46_re)) - (x_46_re / (Math.hypot(y_46_re, y_46_im) / y_46_im)));
}
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)) * ((x_46_im / (math.hypot(y_46_re, y_46_im) / y_46_re)) - (x_46_re / (math.hypot(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(1.0 / hypot(y_46_re, y_46_im)) * Float64(Float64(x_46_im / Float64(hypot(y_46_re, y_46_im) / y_46_re)) - Float64(x_46_re / Float64(hypot(y_46_re, y_46_im) / y_46_im)))) 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)) * ((x_46_im / (hypot(y_46_re, y_46_im) / y_46_re)) - (x_46_re / (hypot(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[(1.0 / N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision]), $MachinePrecision] * N[(N[(x$46$im / N[(N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision] / y$46$re), $MachinePrecision]), $MachinePrecision] - N[(x$46$re / N[(N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision] / y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{1}{\mathsf{hypot}\left(y.re, y.im\right)} \cdot \left(\frac{x.im}{\frac{\mathsf{hypot}\left(y.re, y.im\right)}{y.re}} - \frac{x.re}{\frac{\mathsf{hypot}\left(y.re, y.im\right)}{y.im}}\right)
\end{array}
Initial program 63.9%
*-un-lft-identity63.9%
add-sqr-sqrt63.9%
times-frac63.9%
hypot-def63.9%
hypot-def78.5%
Applied egg-rr78.5%
div-sub78.5%
Applied egg-rr78.5%
associate-/l*88.7%
associate-/l*99.3%
Simplified99.3%
Final simplification99.3%
(FPCore (x.re x.im y.re y.im) :precision binary64 (/ (- (* y.re (/ x.im (hypot y.re y.im))) (* y.im (/ x.re (hypot y.re y.im)))) (hypot y.re y.im)))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return ((y_46_re * (x_46_im / hypot(y_46_re, y_46_im))) - (y_46_im * (x_46_re / hypot(y_46_re, y_46_im)))) / hypot(y_46_re, y_46_im);
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return ((y_46_re * (x_46_im / Math.hypot(y_46_re, y_46_im))) - (y_46_im * (x_46_re / Math.hypot(y_46_re, y_46_im)))) / Math.hypot(y_46_re, y_46_im);
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): return ((y_46_re * (x_46_im / math.hypot(y_46_re, y_46_im))) - (y_46_im * (x_46_re / math.hypot(y_46_re, y_46_im)))) / math.hypot(y_46_re, y_46_im)
function code(x_46_re, x_46_im, y_46_re, y_46_im) return Float64(Float64(Float64(y_46_re * Float64(x_46_im / hypot(y_46_re, y_46_im))) - Float64(y_46_im * Float64(x_46_re / hypot(y_46_re, y_46_im)))) / hypot(y_46_re, y_46_im)) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = ((y_46_re * (x_46_im / hypot(y_46_re, y_46_im))) - (y_46_im * (x_46_re / hypot(y_46_re, y_46_im)))) / hypot(y_46_re, y_46_im); end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[(N[(N[(y$46$re * N[(x$46$im / N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y$46$im * N[(x$46$re / N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{y.re \cdot \frac{x.im}{\mathsf{hypot}\left(y.re, y.im\right)} - y.im \cdot \frac{x.re}{\mathsf{hypot}\left(y.re, y.im\right)}}{\mathsf{hypot}\left(y.re, y.im\right)}
\end{array}
Initial program 63.9%
*-un-lft-identity63.9%
add-sqr-sqrt63.9%
times-frac63.9%
hypot-def63.9%
hypot-def78.5%
Applied egg-rr78.5%
div-sub78.5%
Applied egg-rr78.5%
associate-/l*88.7%
associate-/l*99.3%
Simplified99.3%
expm1-log1p-u81.4%
expm1-udef35.3%
associate-*l/35.3%
*-un-lft-identity35.3%
div-inv35.3%
clear-num35.3%
div-inv35.3%
clear-num35.3%
Applied egg-rr35.3%
expm1-def81.6%
expm1-log1p99.5%
associate-*r/88.8%
associate-*l/98.7%
*-commutative98.7%
associate-*r/88.2%
associate-*l/98.0%
*-commutative98.0%
Simplified98.0%
Final simplification98.0%
(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 x.im) (* y.im x.re))))
(if (<= (/ t_1 (+ (* y.re y.re) (* y.im y.im))) 2e+236)
(* t_0 (/ t_1 (hypot y.re y.im)))
(* t_0 (- x.im (/ x.re (/ (hypot y.re y.im) y.im)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = 1.0 / hypot(y_46_re, y_46_im);
double t_1 = (y_46_re * x_46_im) - (y_46_im * x_46_re);
double tmp;
if ((t_1 / ((y_46_re * y_46_re) + (y_46_im * y_46_im))) <= 2e+236) {
tmp = t_0 * (t_1 / hypot(y_46_re, y_46_im));
} else {
tmp = t_0 * (x_46_im - (x_46_re / (hypot(y_46_re, y_46_im) / 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 = 1.0 / Math.hypot(y_46_re, y_46_im);
double t_1 = (y_46_re * x_46_im) - (y_46_im * x_46_re);
double tmp;
if ((t_1 / ((y_46_re * y_46_re) + (y_46_im * y_46_im))) <= 2e+236) {
tmp = t_0 * (t_1 / Math.hypot(y_46_re, y_46_im));
} else {
tmp = t_0 * (x_46_im - (x_46_re / (Math.hypot(y_46_re, y_46_im) / y_46_im)));
}
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 * x_46_im) - (y_46_im * x_46_re) tmp = 0 if (t_1 / ((y_46_re * y_46_re) + (y_46_im * y_46_im))) <= 2e+236: tmp = t_0 * (t_1 / math.hypot(y_46_re, y_46_im)) else: tmp = t_0 * (x_46_im - (x_46_re / (math.hypot(y_46_re, y_46_im) / y_46_im))) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(1.0 / hypot(y_46_re, y_46_im)) t_1 = Float64(Float64(y_46_re * x_46_im) - Float64(y_46_im * x_46_re)) tmp = 0.0 if (Float64(t_1 / Float64(Float64(y_46_re * y_46_re) + Float64(y_46_im * y_46_im))) <= 2e+236) tmp = Float64(t_0 * Float64(t_1 / hypot(y_46_re, y_46_im))); else tmp = Float64(t_0 * Float64(x_46_im - Float64(x_46_re / Float64(hypot(y_46_re, y_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) t_0 = 1.0 / hypot(y_46_re, y_46_im); t_1 = (y_46_re * x_46_im) - (y_46_im * x_46_re); tmp = 0.0; if ((t_1 / ((y_46_re * y_46_re) + (y_46_im * y_46_im))) <= 2e+236) tmp = t_0 * (t_1 / hypot(y_46_re, y_46_im)); else tmp = t_0 * (x_46_im - (x_46_re / (hypot(y_46_re, y_46_im) / 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[(1.0 / N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(y$46$re * x$46$im), $MachinePrecision] - N[(y$46$im * x$46$re), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(t$95$1 / N[(N[(y$46$re * y$46$re), $MachinePrecision] + N[(y$46$im * y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2e+236], N[(t$95$0 * N[(t$95$1 / N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[(x$46$im - N[(x$46$re / N[(N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision] / y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{1}{\mathsf{hypot}\left(y.re, y.im\right)}\\
t_1 := y.re \cdot x.im - y.im \cdot x.re\\
\mathbf{if}\;\frac{t_1}{y.re \cdot y.re + y.im \cdot y.im} \leq 2 \cdot 10^{+236}:\\
\;\;\;\;t_0 \cdot \frac{t_1}{\mathsf{hypot}\left(y.re, y.im\right)}\\
\mathbf{else}:\\
\;\;\;\;t_0 \cdot \left(x.im - \frac{x.re}{\frac{\mathsf{hypot}\left(y.re, y.im\right)}{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.00000000000000011e236Initial program 79.0%
*-un-lft-identity79.0%
add-sqr-sqrt78.9%
times-frac78.9%
hypot-def78.9%
hypot-def97.2%
Applied egg-rr97.2%
if 2.00000000000000011e236 < (/.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 16.7%
*-un-lft-identity16.7%
add-sqr-sqrt16.7%
times-frac16.7%
hypot-def16.7%
hypot-def19.9%
Applied egg-rr19.9%
div-sub19.9%
Applied egg-rr19.9%
associate-/l*60.6%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in y.re around inf 72.8%
Final simplification91.3%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (/ (- x.im (/ x.re (/ y.re y.im))) y.re)))
(if (<= y.im -7.5e+126)
(/ (- (* y.re (/ x.im y.im)) x.re) y.im)
(if (<= y.im -1.15e+85)
t_0
(if (<= y.im -2.4e-19)
(/ (- (* y.re x.im) (* y.im x.re)) (+ (* y.re y.re) (* y.im y.im)))
(if (<= y.im 1.45e-76)
t_0
(/
(- (* y.re (/ x.im (hypot y.re y.im))) x.re)
(hypot y.re y.im))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = (x_46_im - (x_46_re / (y_46_re / y_46_im))) / y_46_re;
double tmp;
if (y_46_im <= -7.5e+126) {
tmp = ((y_46_re * (x_46_im / y_46_im)) - x_46_re) / y_46_im;
} else if (y_46_im <= -1.15e+85) {
tmp = t_0;
} else if (y_46_im <= -2.4e-19) {
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 if (y_46_im <= 1.45e-76) {
tmp = t_0;
} else {
tmp = ((y_46_re * (x_46_im / hypot(y_46_re, y_46_im))) - x_46_re) / 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 = (x_46_im - (x_46_re / (y_46_re / y_46_im))) / y_46_re;
double tmp;
if (y_46_im <= -7.5e+126) {
tmp = ((y_46_re * (x_46_im / y_46_im)) - x_46_re) / y_46_im;
} else if (y_46_im <= -1.15e+85) {
tmp = t_0;
} else if (y_46_im <= -2.4e-19) {
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 if (y_46_im <= 1.45e-76) {
tmp = t_0;
} else {
tmp = ((y_46_re * (x_46_im / Math.hypot(y_46_re, y_46_im))) - x_46_re) / 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 = (x_46_im - (x_46_re / (y_46_re / y_46_im))) / y_46_re tmp = 0 if y_46_im <= -7.5e+126: tmp = ((y_46_re * (x_46_im / y_46_im)) - x_46_re) / y_46_im elif y_46_im <= -1.15e+85: tmp = t_0 elif y_46_im <= -2.4e-19: 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)) elif y_46_im <= 1.45e-76: tmp = t_0 else: tmp = ((y_46_re * (x_46_im / math.hypot(y_46_re, y_46_im))) - x_46_re) / 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(x_46_im - Float64(x_46_re / Float64(y_46_re / y_46_im))) / y_46_re) tmp = 0.0 if (y_46_im <= -7.5e+126) tmp = Float64(Float64(Float64(y_46_re * Float64(x_46_im / y_46_im)) - x_46_re) / y_46_im); elseif (y_46_im <= -1.15e+85) tmp = t_0; elseif (y_46_im <= -2.4e-19) 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))); elseif (y_46_im <= 1.45e-76) tmp = t_0; else tmp = Float64(Float64(Float64(y_46_re * Float64(x_46_im / hypot(y_46_re, y_46_im))) - x_46_re) / 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 = (x_46_im - (x_46_re / (y_46_re / y_46_im))) / y_46_re; tmp = 0.0; if (y_46_im <= -7.5e+126) tmp = ((y_46_re * (x_46_im / y_46_im)) - x_46_re) / y_46_im; elseif (y_46_im <= -1.15e+85) tmp = t_0; elseif (y_46_im <= -2.4e-19) 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)); elseif (y_46_im <= 1.45e-76) tmp = t_0; else tmp = ((y_46_re * (x_46_im / hypot(y_46_re, y_46_im))) - x_46_re) / 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[(x$46$im - N[(x$46$re / N[(y$46$re / y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y$46$re), $MachinePrecision]}, If[LessEqual[y$46$im, -7.5e+126], 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+85], t$95$0, If[LessEqual[y$46$im, -2.4e-19], N[(N[(N[(y$46$re * x$46$im), $MachinePrecision] - N[(y$46$im * x$46$re), $MachinePrecision]), $MachinePrecision] / N[(N[(y$46$re * y$46$re), $MachinePrecision] + N[(y$46$im * y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 1.45e-76], t$95$0, N[(N[(N[(y$46$re * N[(x$46$im / N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x$46$re), $MachinePrecision] / N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x.im - \frac{x.re}{\frac{y.re}{y.im}}}{y.re}\\
\mathbf{if}\;y.im \leq -7.5 \cdot 10^{+126}:\\
\;\;\;\;\frac{y.re \cdot \frac{x.im}{y.im} - x.re}{y.im}\\
\mathbf{elif}\;y.im \leq -1.15 \cdot 10^{+85}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y.im \leq -2.4 \cdot 10^{-19}:\\
\;\;\;\;\frac{y.re \cdot x.im - y.im \cdot x.re}{y.re \cdot y.re + y.im \cdot y.im}\\
\mathbf{elif}\;y.im \leq 1.45 \cdot 10^{-76}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{y.re \cdot \frac{x.im}{\mathsf{hypot}\left(y.re, y.im\right)} - x.re}{\mathsf{hypot}\left(y.re, y.im\right)}\\
\end{array}
\end{array}
if y.im < -7.5000000000000006e126Initial program 42.7%
*-un-lft-identity42.7%
add-sqr-sqrt42.7%
times-frac42.7%
hypot-def42.7%
hypot-def68.6%
Applied egg-rr68.6%
div-sub68.6%
Applied egg-rr68.6%
associate-/l*73.2%
associate-/l*97.4%
Simplified97.4%
Taylor expanded in y.re around 0 76.2%
neg-mul-176.2%
*-commutative76.2%
unpow276.2%
associate-/l*74.3%
associate-*l/73.8%
+-commutative73.8%
unsub-neg73.8%
associate-*l/74.3%
associate-/l*76.2%
associate-/r*85.7%
*-commutative85.7%
associate-*r/87.6%
div-sub87.6%
Simplified87.6%
if -7.5000000000000006e126 < y.im < -1.1499999999999999e85 or -2.40000000000000023e-19 < y.im < 1.4500000000000001e-76Initial program 68.4%
Taylor expanded in y.re around inf 82.0%
mul-1-neg82.0%
unsub-neg82.0%
unpow282.0%
associate-/r*85.3%
Simplified85.3%
sub-div88.9%
associate-/l*90.2%
Applied egg-rr90.2%
if -1.1499999999999999e85 < y.im < -2.40000000000000023e-19Initial program 80.2%
if 1.4500000000000001e-76 < y.im Initial program 65.2%
*-un-lft-identity65.2%
add-sqr-sqrt65.1%
times-frac65.2%
hypot-def65.2%
hypot-def77.5%
Applied egg-rr77.5%
div-sub77.6%
Applied egg-rr77.6%
associate-/l*83.7%
associate-/l*99.7%
Simplified99.7%
expm1-log1p-u83.4%
expm1-udef36.6%
associate-*l/36.6%
*-un-lft-identity36.6%
div-inv36.6%
clear-num36.6%
div-inv36.6%
clear-num36.6%
Applied egg-rr36.6%
expm1-def83.6%
expm1-log1p99.9%
associate-*r/92.5%
associate-*l/99.9%
*-commutative99.9%
associate-*r/83.9%
associate-*l/99.9%
*-commutative99.9%
Simplified99.9%
Taylor expanded in y.im around inf 91.7%
Final simplification89.5%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (<= y.re -4.2e+53)
(/ (- x.im (/ x.re (/ y.re y.im))) y.re)
(if (<= y.re -3.6e-152)
(/ (- (* y.re x.im) (* y.im x.re)) (+ (* y.re y.re) (* y.im y.im)))
(if (<= y.re 2e-53)
(/ (- (* (* y.re x.im) (/ 1.0 y.im)) x.re) y.im)
(*
(/ 1.0 (hypot y.re y.im))
(- x.im (/ x.re (/ (hypot y.re y.im) y.im))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_re <= -4.2e+53) {
tmp = (x_46_im - (x_46_re / (y_46_re / y_46_im))) / y_46_re;
} else if (y_46_re <= -3.6e-152) {
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 if (y_46_re <= 2e-53) {
tmp = (((y_46_re * x_46_im) * (1.0 / y_46_im)) - x_46_re) / y_46_im;
} else {
tmp = (1.0 / hypot(y_46_re, y_46_im)) * (x_46_im - (x_46_re / (hypot(y_46_re, y_46_im) / 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_re <= -4.2e+53) {
tmp = (x_46_im - (x_46_re / (y_46_re / y_46_im))) / y_46_re;
} else if (y_46_re <= -3.6e-152) {
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 if (y_46_re <= 2e-53) {
tmp = (((y_46_re * x_46_im) * (1.0 / y_46_im)) - x_46_re) / y_46_im;
} else {
tmp = (1.0 / Math.hypot(y_46_re, y_46_im)) * (x_46_im - (x_46_re / (Math.hypot(y_46_re, y_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_re <= -4.2e+53: tmp = (x_46_im - (x_46_re / (y_46_re / y_46_im))) / y_46_re elif y_46_re <= -3.6e-152: 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)) elif y_46_re <= 2e-53: tmp = (((y_46_re * x_46_im) * (1.0 / y_46_im)) - x_46_re) / y_46_im else: tmp = (1.0 / math.hypot(y_46_re, y_46_im)) * (x_46_im - (x_46_re / (math.hypot(y_46_re, y_46_im) / y_46_im))) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if (y_46_re <= -4.2e+53) tmp = Float64(Float64(x_46_im - Float64(x_46_re / Float64(y_46_re / y_46_im))) / y_46_re); elseif (y_46_re <= -3.6e-152) 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))); elseif (y_46_re <= 2e-53) tmp = Float64(Float64(Float64(Float64(y_46_re * x_46_im) * Float64(1.0 / y_46_im)) - x_46_re) / y_46_im); else tmp = Float64(Float64(1.0 / hypot(y_46_re, y_46_im)) * Float64(x_46_im - Float64(x_46_re / Float64(hypot(y_46_re, y_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_re <= -4.2e+53) tmp = (x_46_im - (x_46_re / (y_46_re / y_46_im))) / y_46_re; elseif (y_46_re <= -3.6e-152) 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)); elseif (y_46_re <= 2e-53) tmp = (((y_46_re * x_46_im) * (1.0 / y_46_im)) - x_46_re) / y_46_im; else tmp = (1.0 / hypot(y_46_re, y_46_im)) * (x_46_im - (x_46_re / (hypot(y_46_re, y_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$re, -4.2e+53], N[(N[(x$46$im - N[(x$46$re / N[(y$46$re / y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y$46$re), $MachinePrecision], If[LessEqual[y$46$re, -3.6e-152], N[(N[(N[(y$46$re * x$46$im), $MachinePrecision] - N[(y$46$im * x$46$re), $MachinePrecision]), $MachinePrecision] / N[(N[(y$46$re * y$46$re), $MachinePrecision] + N[(y$46$im * y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 2e-53], N[(N[(N[(N[(y$46$re * x$46$im), $MachinePrecision] * N[(1.0 / y$46$im), $MachinePrecision]), $MachinePrecision] - x$46$re), $MachinePrecision] / y$46$im), $MachinePrecision], N[(N[(1.0 / N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision]), $MachinePrecision] * N[(x$46$im - N[(x$46$re / N[(N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision] / y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq -4.2 \cdot 10^{+53}:\\
\;\;\;\;\frac{x.im - \frac{x.re}{\frac{y.re}{y.im}}}{y.re}\\
\mathbf{elif}\;y.re \leq -3.6 \cdot 10^{-152}:\\
\;\;\;\;\frac{y.re \cdot x.im - y.im \cdot x.re}{y.re \cdot y.re + y.im \cdot y.im}\\
\mathbf{elif}\;y.re \leq 2 \cdot 10^{-53}:\\
\;\;\;\;\frac{\left(y.re \cdot x.im\right) \cdot \frac{1}{y.im} - x.re}{y.im}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\mathsf{hypot}\left(y.re, y.im\right)} \cdot \left(x.im - \frac{x.re}{\frac{\mathsf{hypot}\left(y.re, y.im\right)}{y.im}}\right)\\
\end{array}
\end{array}
if y.re < -4.2000000000000004e53Initial program 52.9%
Taylor expanded in y.re around inf 85.0%
mul-1-neg85.0%
unsub-neg85.0%
unpow285.0%
associate-/r*86.6%
Simplified86.6%
sub-div86.6%
associate-/l*88.6%
Applied egg-rr88.6%
if -4.2000000000000004e53 < y.re < -3.6e-152Initial program 81.8%
if -3.6e-152 < y.re < 2.00000000000000006e-53Initial program 72.3%
Taylor expanded in y.re around 0 83.5%
+-commutative83.5%
mul-1-neg83.5%
unsub-neg83.5%
unpow283.5%
times-frac86.9%
Simplified86.9%
associate-*r/88.0%
sub-div91.5%
Applied egg-rr91.5%
associate-*l/92.5%
clear-num92.4%
Applied egg-rr92.4%
associate-/r/92.4%
Simplified92.4%
if 2.00000000000000006e-53 < y.re Initial program 50.8%
*-un-lft-identity50.8%
add-sqr-sqrt50.7%
times-frac50.7%
hypot-def50.7%
hypot-def69.4%
Applied egg-rr69.4%
div-sub69.4%
Applied egg-rr69.4%
associate-/l*89.4%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in y.re around inf 88.7%
Final simplification88.8%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (/ (- x.im (/ x.re (/ y.re y.im))) y.re))
(t_1 (+ (* y.re y.re) (* y.im y.im))))
(if (<= y.im -7.5e+126)
(/ (- (* y.re (/ x.im y.im)) x.re) y.im)
(if (<= y.im -1.15e+85)
t_0
(if (<= y.im -5.7e-19)
(/ (- (* y.re x.im) (* y.im x.re)) t_1)
(if (<= y.im 1.5e-84)
t_0
(if (<= y.im 1.02e+139)
(/ (fma y.re x.im (* x.re (- y.im))) t_1)
(- (/ y.re (* y.im (/ 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 t_0 = (x_46_im - (x_46_re / (y_46_re / y_46_im))) / y_46_re;
double t_1 = (y_46_re * y_46_re) + (y_46_im * y_46_im);
double tmp;
if (y_46_im <= -7.5e+126) {
tmp = ((y_46_re * (x_46_im / y_46_im)) - x_46_re) / y_46_im;
} else if (y_46_im <= -1.15e+85) {
tmp = t_0;
} else if (y_46_im <= -5.7e-19) {
tmp = ((y_46_re * x_46_im) - (y_46_im * x_46_re)) / t_1;
} else if (y_46_im <= 1.5e-84) {
tmp = t_0;
} else if (y_46_im <= 1.02e+139) {
tmp = fma(y_46_re, x_46_im, (x_46_re * -y_46_im)) / t_1;
} else {
tmp = (y_46_re / (y_46_im * (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) t_0 = Float64(Float64(x_46_im - Float64(x_46_re / Float64(y_46_re / y_46_im))) / y_46_re) t_1 = Float64(Float64(y_46_re * y_46_re) + Float64(y_46_im * y_46_im)) tmp = 0.0 if (y_46_im <= -7.5e+126) tmp = Float64(Float64(Float64(y_46_re * Float64(x_46_im / y_46_im)) - x_46_re) / y_46_im); elseif (y_46_im <= -1.15e+85) tmp = t_0; elseif (y_46_im <= -5.7e-19) tmp = Float64(Float64(Float64(y_46_re * x_46_im) - Float64(y_46_im * x_46_re)) / t_1); elseif (y_46_im <= 1.5e-84) tmp = t_0; elseif (y_46_im <= 1.02e+139) tmp = Float64(fma(y_46_re, x_46_im, Float64(x_46_re * Float64(-y_46_im))) / t_1); else tmp = Float64(Float64(y_46_re / Float64(y_46_im * Float64(y_46_im / x_46_im))) - 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 - N[(x$46$re / N[(y$46$re / y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y$46$re), $MachinePrecision]}, Block[{t$95$1 = N[(N[(y$46$re * y$46$re), $MachinePrecision] + N[(y$46$im * y$46$im), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -7.5e+126], 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+85], t$95$0, If[LessEqual[y$46$im, -5.7e-19], N[(N[(N[(y$46$re * x$46$im), $MachinePrecision] - N[(y$46$im * x$46$re), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], If[LessEqual[y$46$im, 1.5e-84], t$95$0, If[LessEqual[y$46$im, 1.02e+139], N[(N[(y$46$re * x$46$im + N[(x$46$re * (-y$46$im)), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], N[(N[(y$46$re / N[(y$46$im * N[(y$46$im / x$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x$46$re / y$46$im), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x.im - \frac{x.re}{\frac{y.re}{y.im}}}{y.re}\\
t_1 := y.re \cdot y.re + y.im \cdot y.im\\
\mathbf{if}\;y.im \leq -7.5 \cdot 10^{+126}:\\
\;\;\;\;\frac{y.re \cdot \frac{x.im}{y.im} - x.re}{y.im}\\
\mathbf{elif}\;y.im \leq -1.15 \cdot 10^{+85}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y.im \leq -5.7 \cdot 10^{-19}:\\
\;\;\;\;\frac{y.re \cdot x.im - y.im \cdot x.re}{t_1}\\
\mathbf{elif}\;y.im \leq 1.5 \cdot 10^{-84}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y.im \leq 1.02 \cdot 10^{+139}:\\
\;\;\;\;\frac{\mathsf{fma}\left(y.re, x.im, x.re \cdot \left(-y.im\right)\right)}{t_1}\\
\mathbf{else}:\\
\;\;\;\;\frac{y.re}{y.im \cdot \frac{y.im}{x.im}} - \frac{x.re}{y.im}\\
\end{array}
\end{array}
if y.im < -7.5000000000000006e126Initial program 42.7%
*-un-lft-identity42.7%
add-sqr-sqrt42.7%
times-frac42.7%
hypot-def42.7%
hypot-def68.6%
Applied egg-rr68.6%
div-sub68.6%
Applied egg-rr68.6%
associate-/l*73.2%
associate-/l*97.4%
Simplified97.4%
Taylor expanded in y.re around 0 76.2%
neg-mul-176.2%
*-commutative76.2%
unpow276.2%
associate-/l*74.3%
associate-*l/73.8%
+-commutative73.8%
unsub-neg73.8%
associate-*l/74.3%
associate-/l*76.2%
associate-/r*85.7%
*-commutative85.7%
associate-*r/87.6%
div-sub87.6%
Simplified87.6%
if -7.5000000000000006e126 < y.im < -1.1499999999999999e85 or -5.69999999999999952e-19 < y.im < 1.5000000000000001e-84Initial program 68.4%
Taylor expanded in y.re around inf 82.0%
mul-1-neg82.0%
unsub-neg82.0%
unpow282.0%
associate-/r*85.3%
Simplified85.3%
sub-div88.9%
associate-/l*90.2%
Applied egg-rr90.2%
if -1.1499999999999999e85 < y.im < -5.69999999999999952e-19Initial program 80.2%
if 1.5000000000000001e-84 < y.im < 1.02e139Initial program 87.2%
Taylor expanded in x.im around 0 87.2%
mul-1-neg87.2%
distribute-rgt-neg-out87.2%
+-commutative87.2%
fma-udef87.2%
distribute-rgt-neg-out87.2%
*-commutative87.2%
distribute-rgt-neg-in87.2%
Simplified87.2%
if 1.02e139 < y.im Initial program 32.8%
Taylor expanded in y.re around 0 81.9%
+-commutative81.9%
mul-1-neg81.9%
unsub-neg81.9%
unpow281.9%
times-frac91.0%
Simplified91.0%
*-commutative91.0%
clear-num91.0%
frac-times91.2%
*-un-lft-identity91.2%
Applied egg-rr91.2%
Final simplification88.6%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (/ (- x.im (/ x.re (/ y.re y.im))) y.re))
(t_1
(/ (- (* y.re x.im) (* y.im x.re)) (+ (* y.re y.re) (* y.im y.im)))))
(if (<= y.im -7.8e+126)
(/ (- (* y.re (/ x.im y.im)) x.re) y.im)
(if (<= y.im -1.15e+85)
t_0
(if (<= y.im -8.3e-19)
t_1
(if (<= y.im 2.95e-80)
t_0
(if (<= y.im 1.02e+139)
t_1
(- (/ y.re (* y.im (/ 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 t_0 = (x_46_im - (x_46_re / (y_46_re / y_46_im))) / y_46_re;
double t_1 = ((y_46_re * x_46_im) - (y_46_im * x_46_re)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im));
double tmp;
if (y_46_im <= -7.8e+126) {
tmp = ((y_46_re * (x_46_im / y_46_im)) - x_46_re) / y_46_im;
} else if (y_46_im <= -1.15e+85) {
tmp = t_0;
} else if (y_46_im <= -8.3e-19) {
tmp = t_1;
} else if (y_46_im <= 2.95e-80) {
tmp = t_0;
} else if (y_46_im <= 1.02e+139) {
tmp = t_1;
} else {
tmp = (y_46_re / (y_46_im * (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) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = (x_46im - (x_46re / (y_46re / y_46im))) / y_46re
t_1 = ((y_46re * x_46im) - (y_46im * x_46re)) / ((y_46re * y_46re) + (y_46im * y_46im))
if (y_46im <= (-7.8d+126)) then
tmp = ((y_46re * (x_46im / y_46im)) - x_46re) / y_46im
else if (y_46im <= (-1.15d+85)) then
tmp = t_0
else if (y_46im <= (-8.3d-19)) then
tmp = t_1
else if (y_46im <= 2.95d-80) then
tmp = t_0
else if (y_46im <= 1.02d+139) then
tmp = t_1
else
tmp = (y_46re / (y_46im * (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 t_0 = (x_46_im - (x_46_re / (y_46_re / y_46_im))) / y_46_re;
double t_1 = ((y_46_re * x_46_im) - (y_46_im * x_46_re)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im));
double tmp;
if (y_46_im <= -7.8e+126) {
tmp = ((y_46_re * (x_46_im / y_46_im)) - x_46_re) / y_46_im;
} else if (y_46_im <= -1.15e+85) {
tmp = t_0;
} else if (y_46_im <= -8.3e-19) {
tmp = t_1;
} else if (y_46_im <= 2.95e-80) {
tmp = t_0;
} else if (y_46_im <= 1.02e+139) {
tmp = t_1;
} else {
tmp = (y_46_re / (y_46_im * (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): t_0 = (x_46_im - (x_46_re / (y_46_re / y_46_im))) / y_46_re t_1 = ((y_46_re * x_46_im) - (y_46_im * x_46_re)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im)) tmp = 0 if y_46_im <= -7.8e+126: tmp = ((y_46_re * (x_46_im / y_46_im)) - x_46_re) / y_46_im elif y_46_im <= -1.15e+85: tmp = t_0 elif y_46_im <= -8.3e-19: tmp = t_1 elif y_46_im <= 2.95e-80: tmp = t_0 elif y_46_im <= 1.02e+139: tmp = t_1 else: tmp = (y_46_re / (y_46_im * (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) t_0 = Float64(Float64(x_46_im - Float64(x_46_re / Float64(y_46_re / y_46_im))) / y_46_re) t_1 = Float64(Float64(Float64(y_46_re * x_46_im) - Float64(y_46_im * x_46_re)) / Float64(Float64(y_46_re * y_46_re) + Float64(y_46_im * y_46_im))) tmp = 0.0 if (y_46_im <= -7.8e+126) tmp = Float64(Float64(Float64(y_46_re * Float64(x_46_im / y_46_im)) - x_46_re) / y_46_im); elseif (y_46_im <= -1.15e+85) tmp = t_0; elseif (y_46_im <= -8.3e-19) tmp = t_1; elseif (y_46_im <= 2.95e-80) tmp = t_0; elseif (y_46_im <= 1.02e+139) tmp = t_1; else tmp = Float64(Float64(y_46_re / Float64(y_46_im * Float64(y_46_im / x_46_im))) - Float64(x_46_re / y_46_im)); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = (x_46_im - (x_46_re / (y_46_re / y_46_im))) / y_46_re; t_1 = ((y_46_re * x_46_im) - (y_46_im * x_46_re)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im)); tmp = 0.0; if (y_46_im <= -7.8e+126) tmp = ((y_46_re * (x_46_im / y_46_im)) - x_46_re) / y_46_im; elseif (y_46_im <= -1.15e+85) tmp = t_0; elseif (y_46_im <= -8.3e-19) tmp = t_1; elseif (y_46_im <= 2.95e-80) tmp = t_0; elseif (y_46_im <= 1.02e+139) tmp = t_1; else tmp = (y_46_re / (y_46_im * (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_] := Block[{t$95$0 = N[(N[(x$46$im - N[(x$46$re / N[(y$46$re / y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y$46$re), $MachinePrecision]}, Block[{t$95$1 = N[(N[(N[(y$46$re * x$46$im), $MachinePrecision] - N[(y$46$im * x$46$re), $MachinePrecision]), $MachinePrecision] / N[(N[(y$46$re * y$46$re), $MachinePrecision] + N[(y$46$im * y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -7.8e+126], 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+85], t$95$0, If[LessEqual[y$46$im, -8.3e-19], t$95$1, If[LessEqual[y$46$im, 2.95e-80], t$95$0, If[LessEqual[y$46$im, 1.02e+139], t$95$1, N[(N[(y$46$re / N[(y$46$im * N[(y$46$im / x$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x$46$re / y$46$im), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x.im - \frac{x.re}{\frac{y.re}{y.im}}}{y.re}\\
t_1 := \frac{y.re \cdot x.im - y.im \cdot x.re}{y.re \cdot y.re + y.im \cdot y.im}\\
\mathbf{if}\;y.im \leq -7.8 \cdot 10^{+126}:\\
\;\;\;\;\frac{y.re \cdot \frac{x.im}{y.im} - x.re}{y.im}\\
\mathbf{elif}\;y.im \leq -1.15 \cdot 10^{+85}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y.im \leq -8.3 \cdot 10^{-19}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y.im \leq 2.95 \cdot 10^{-80}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y.im \leq 1.02 \cdot 10^{+139}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{y.re}{y.im \cdot \frac{y.im}{x.im}} - \frac{x.re}{y.im}\\
\end{array}
\end{array}
if y.im < -7.79999999999999986e126Initial program 42.7%
*-un-lft-identity42.7%
add-sqr-sqrt42.7%
times-frac42.7%
hypot-def42.7%
hypot-def68.6%
Applied egg-rr68.6%
div-sub68.6%
Applied egg-rr68.6%
associate-/l*73.2%
associate-/l*97.4%
Simplified97.4%
Taylor expanded in y.re around 0 76.2%
neg-mul-176.2%
*-commutative76.2%
unpow276.2%
associate-/l*74.3%
associate-*l/73.8%
+-commutative73.8%
unsub-neg73.8%
associate-*l/74.3%
associate-/l*76.2%
associate-/r*85.7%
*-commutative85.7%
associate-*r/87.6%
div-sub87.6%
Simplified87.6%
if -7.79999999999999986e126 < y.im < -1.1499999999999999e85 or -8.3000000000000001e-19 < y.im < 2.95e-80Initial program 68.4%
Taylor expanded in y.re around inf 82.0%
mul-1-neg82.0%
unsub-neg82.0%
unpow282.0%
associate-/r*85.3%
Simplified85.3%
sub-div88.9%
associate-/l*90.2%
Applied egg-rr90.2%
if -1.1499999999999999e85 < y.im < -8.3000000000000001e-19 or 2.95e-80 < y.im < 1.02e139Initial program 85.1%
if 1.02e139 < y.im Initial program 32.8%
Taylor expanded in y.re around 0 81.9%
+-commutative81.9%
mul-1-neg81.9%
unsub-neg81.9%
unpow281.9%
times-frac91.0%
Simplified91.0%
*-commutative91.0%
clear-num91.0%
frac-times91.2%
*-un-lft-identity91.2%
Applied egg-rr91.2%
Final simplification88.6%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (or (<= y.im -1.2e+127)
(not
(or (<= y.im -5.3e+63)
(and (not (<= y.im -5.2e-18)) (<= y.im 1650000.0)))))
(/ (- x.re) y.im)
(/ (- x.im (/ x.re (/ y.re y.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.2e+127) || !((y_46_im <= -5.3e+63) || (!(y_46_im <= -5.2e-18) && (y_46_im <= 1650000.0)))) {
tmp = -x_46_re / y_46_im;
} else {
tmp = (x_46_im - (x_46_re / (y_46_re / y_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.2d+127)) .or. (.not. (y_46im <= (-5.3d+63)) .or. (.not. (y_46im <= (-5.2d-18))) .and. (y_46im <= 1650000.0d0))) then
tmp = -x_46re / y_46im
else
tmp = (x_46im - (x_46re / (y_46re / y_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.2e+127) || !((y_46_im <= -5.3e+63) || (!(y_46_im <= -5.2e-18) && (y_46_im <= 1650000.0)))) {
tmp = -x_46_re / y_46_im;
} else {
tmp = (x_46_im - (x_46_re / (y_46_re / y_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.2e+127) or not ((y_46_im <= -5.3e+63) or (not (y_46_im <= -5.2e-18) and (y_46_im <= 1650000.0))): tmp = -x_46_re / y_46_im else: tmp = (x_46_im - (x_46_re / (y_46_re / y_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.2e+127) || !((y_46_im <= -5.3e+63) || (!(y_46_im <= -5.2e-18) && (y_46_im <= 1650000.0)))) tmp = Float64(Float64(-x_46_re) / y_46_im); else tmp = Float64(Float64(x_46_im - Float64(x_46_re / Float64(y_46_re / 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) tmp = 0.0; if ((y_46_im <= -1.2e+127) || ~(((y_46_im <= -5.3e+63) || (~((y_46_im <= -5.2e-18)) && (y_46_im <= 1650000.0))))) tmp = -x_46_re / y_46_im; else tmp = (x_46_im - (x_46_re / (y_46_re / y_46_im))) / y_46_re; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[Or[LessEqual[y$46$im, -1.2e+127], N[Not[Or[LessEqual[y$46$im, -5.3e+63], And[N[Not[LessEqual[y$46$im, -5.2e-18]], $MachinePrecision], LessEqual[y$46$im, 1650000.0]]]], $MachinePrecision]], N[((-x$46$re) / y$46$im), $MachinePrecision], N[(N[(x$46$im - N[(x$46$re / N[(y$46$re / y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y$46$re), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.im \leq -1.2 \cdot 10^{+127} \lor \neg \left(y.im \leq -5.3 \cdot 10^{+63} \lor \neg \left(y.im \leq -5.2 \cdot 10^{-18}\right) \land y.im \leq 1650000\right):\\
\;\;\;\;\frac{-x.re}{y.im}\\
\mathbf{else}:\\
\;\;\;\;\frac{x.im - \frac{x.re}{\frac{y.re}{y.im}}}{y.re}\\
\end{array}
\end{array}
if y.im < -1.2000000000000001e127 or -5.2999999999999999e63 < y.im < -5.2000000000000001e-18 or 1.65e6 < y.im Initial program 55.3%
Taylor expanded in y.re around 0 76.0%
associate-*r/76.0%
neg-mul-176.0%
Simplified76.0%
if -1.2000000000000001e127 < y.im < -5.2999999999999999e63 or -5.2000000000000001e-18 < y.im < 1.65e6Initial program 71.7%
Taylor expanded in y.re around inf 76.3%
mul-1-neg76.3%
unsub-neg76.3%
unpow276.3%
associate-/r*79.1%
Simplified79.1%
sub-div82.2%
associate-/l*83.3%
Applied egg-rr83.3%
Final simplification79.9%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (or (<= y.im -7.5e+126)
(not
(or (<= y.im -9.2e+84)
(and (not (<= y.im -5.4e-18)) (<= y.im 1.18e-54)))))
(/ (- (* y.re (/ x.im y.im)) x.re) y.im)
(/ (- x.im (/ x.re (/ y.re y.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 <= -7.5e+126) || !((y_46_im <= -9.2e+84) || (!(y_46_im <= -5.4e-18) && (y_46_im <= 1.18e-54)))) {
tmp = ((y_46_re * (x_46_im / y_46_im)) - x_46_re) / y_46_im;
} else {
tmp = (x_46_im - (x_46_re / (y_46_re / y_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 <= (-7.5d+126)) .or. (.not. (y_46im <= (-9.2d+84)) .or. (.not. (y_46im <= (-5.4d-18))) .and. (y_46im <= 1.18d-54))) then
tmp = ((y_46re * (x_46im / y_46im)) - x_46re) / y_46im
else
tmp = (x_46im - (x_46re / (y_46re / y_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 <= -7.5e+126) || !((y_46_im <= -9.2e+84) || (!(y_46_im <= -5.4e-18) && (y_46_im <= 1.18e-54)))) {
tmp = ((y_46_re * (x_46_im / y_46_im)) - x_46_re) / y_46_im;
} else {
tmp = (x_46_im - (x_46_re / (y_46_re / y_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 <= -7.5e+126) or not ((y_46_im <= -9.2e+84) or (not (y_46_im <= -5.4e-18) and (y_46_im <= 1.18e-54))): tmp = ((y_46_re * (x_46_im / y_46_im)) - x_46_re) / y_46_im else: tmp = (x_46_im - (x_46_re / (y_46_re / y_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 <= -7.5e+126) || !((y_46_im <= -9.2e+84) || (!(y_46_im <= -5.4e-18) && (y_46_im <= 1.18e-54)))) 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(x_46_re / Float64(y_46_re / 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) tmp = 0.0; if ((y_46_im <= -7.5e+126) || ~(((y_46_im <= -9.2e+84) || (~((y_46_im <= -5.4e-18)) && (y_46_im <= 1.18e-54))))) tmp = ((y_46_re * (x_46_im / y_46_im)) - x_46_re) / y_46_im; else tmp = (x_46_im - (x_46_re / (y_46_re / y_46_im))) / y_46_re; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[Or[LessEqual[y$46$im, -7.5e+126], N[Not[Or[LessEqual[y$46$im, -9.2e+84], And[N[Not[LessEqual[y$46$im, -5.4e-18]], $MachinePrecision], LessEqual[y$46$im, 1.18e-54]]]], $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[(x$46$re / N[(y$46$re / y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y$46$re), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.im \leq -7.5 \cdot 10^{+126} \lor \neg \left(y.im \leq -9.2 \cdot 10^{+84} \lor \neg \left(y.im \leq -5.4 \cdot 10^{-18}\right) \land y.im \leq 1.18 \cdot 10^{-54}\right):\\
\;\;\;\;\frac{y.re \cdot \frac{x.im}{y.im} - x.re}{y.im}\\
\mathbf{else}:\\
\;\;\;\;\frac{x.im - \frac{x.re}{\frac{y.re}{y.im}}}{y.re}\\
\end{array}
\end{array}
if y.im < -7.5000000000000006e126 or -9.1999999999999996e84 < y.im < -5.39999999999999977e-18 or 1.17999999999999996e-54 < y.im Initial program 59.5%
*-un-lft-identity59.5%
add-sqr-sqrt59.5%
times-frac59.5%
hypot-def59.5%
hypot-def76.0%
Applied egg-rr76.0%
div-sub76.0%
Applied egg-rr76.0%
associate-/l*82.3%
associate-/l*99.0%
Simplified99.0%
Taylor expanded in y.re around 0 74.8%
neg-mul-174.8%
*-commutative74.8%
unpow274.8%
associate-/l*75.0%
associate-*l/74.8%
+-commutative74.8%
unsub-neg74.8%
associate-*l/75.0%
associate-/l*74.8%
associate-/r*78.5%
*-commutative78.5%
associate-*r/80.5%
div-sub80.5%
Simplified80.5%
if -7.5000000000000006e126 < y.im < -9.1999999999999996e84 or -5.39999999999999977e-18 < y.im < 1.17999999999999996e-54Initial program 69.2%
Taylor expanded in y.re around inf 81.7%
mul-1-neg81.7%
unsub-neg81.7%
unpow281.7%
associate-/r*84.9%
Simplified84.9%
sub-div88.4%
associate-/l*89.7%
Applied egg-rr89.7%
Final simplification84.7%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (/ (- x.im (/ x.re (/ y.re y.im))) y.re))
(t_1 (/ (- (* y.re (/ x.im y.im)) x.re) y.im)))
(if (<= y.im -7.5e+126)
t_1
(if (<= y.im -1.12e+85)
t_0
(if (<= y.im -2e-18)
(/ (- x.re) (+ y.im (/ (* y.re y.re) y.im)))
(if (<= y.im 1.36e-52) t_0 t_1))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = (x_46_im - (x_46_re / (y_46_re / y_46_im))) / y_46_re;
double t_1 = ((y_46_re * (x_46_im / y_46_im)) - x_46_re) / y_46_im;
double tmp;
if (y_46_im <= -7.5e+126) {
tmp = t_1;
} else if (y_46_im <= -1.12e+85) {
tmp = t_0;
} else if (y_46_im <= -2e-18) {
tmp = -x_46_re / (y_46_im + ((y_46_re * y_46_re) / y_46_im));
} else if (y_46_im <= 1.36e-52) {
tmp = t_0;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = (x_46im - (x_46re / (y_46re / y_46im))) / y_46re
t_1 = ((y_46re * (x_46im / y_46im)) - x_46re) / y_46im
if (y_46im <= (-7.5d+126)) then
tmp = t_1
else if (y_46im <= (-1.12d+85)) then
tmp = t_0
else if (y_46im <= (-2d-18)) then
tmp = -x_46re / (y_46im + ((y_46re * y_46re) / y_46im))
else if (y_46im <= 1.36d-52) then
tmp = t_0
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = (x_46_im - (x_46_re / (y_46_re / y_46_im))) / y_46_re;
double t_1 = ((y_46_re * (x_46_im / y_46_im)) - x_46_re) / y_46_im;
double tmp;
if (y_46_im <= -7.5e+126) {
tmp = t_1;
} else if (y_46_im <= -1.12e+85) {
tmp = t_0;
} else if (y_46_im <= -2e-18) {
tmp = -x_46_re / (y_46_im + ((y_46_re * y_46_re) / y_46_im));
} else if (y_46_im <= 1.36e-52) {
tmp = t_0;
} else {
tmp = t_1;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = (x_46_im - (x_46_re / (y_46_re / y_46_im))) / y_46_re t_1 = ((y_46_re * (x_46_im / y_46_im)) - x_46_re) / y_46_im tmp = 0 if y_46_im <= -7.5e+126: tmp = t_1 elif y_46_im <= -1.12e+85: tmp = t_0 elif y_46_im <= -2e-18: tmp = -x_46_re / (y_46_im + ((y_46_re * y_46_re) / y_46_im)) elif y_46_im <= 1.36e-52: tmp = t_0 else: tmp = t_1 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(Float64(x_46_im - Float64(x_46_re / Float64(y_46_re / y_46_im))) / y_46_re) t_1 = 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 <= -7.5e+126) tmp = t_1; elseif (y_46_im <= -1.12e+85) tmp = t_0; elseif (y_46_im <= -2e-18) tmp = Float64(Float64(-x_46_re) / Float64(y_46_im + Float64(Float64(y_46_re * y_46_re) / y_46_im))); elseif (y_46_im <= 1.36e-52) tmp = t_0; else tmp = t_1; 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 - (x_46_re / (y_46_re / y_46_im))) / y_46_re; t_1 = ((y_46_re * (x_46_im / y_46_im)) - x_46_re) / y_46_im; tmp = 0.0; if (y_46_im <= -7.5e+126) tmp = t_1; elseif (y_46_im <= -1.12e+85) tmp = t_0; elseif (y_46_im <= -2e-18) tmp = -x_46_re / (y_46_im + ((y_46_re * y_46_re) / y_46_im)); elseif (y_46_im <= 1.36e-52) tmp = t_0; else tmp = t_1; 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 - N[(x$46$re / N[(y$46$re / y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y$46$re), $MachinePrecision]}, Block[{t$95$1 = 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, -7.5e+126], t$95$1, If[LessEqual[y$46$im, -1.12e+85], t$95$0, If[LessEqual[y$46$im, -2e-18], N[((-x$46$re) / N[(y$46$im + N[(N[(y$46$re * y$46$re), $MachinePrecision] / y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 1.36e-52], t$95$0, t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x.im - \frac{x.re}{\frac{y.re}{y.im}}}{y.re}\\
t_1 := \frac{y.re \cdot \frac{x.im}{y.im} - x.re}{y.im}\\
\mathbf{if}\;y.im \leq -7.5 \cdot 10^{+126}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y.im \leq -1.12 \cdot 10^{+85}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y.im \leq -2 \cdot 10^{-18}:\\
\;\;\;\;\frac{-x.re}{y.im + \frac{y.re \cdot y.re}{y.im}}\\
\mathbf{elif}\;y.im \leq 1.36 \cdot 10^{-52}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y.im < -7.5000000000000006e126 or 1.36e-52 < y.im Initial program 56.1%
*-un-lft-identity56.1%
add-sqr-sqrt56.0%
times-frac56.1%
hypot-def56.1%
hypot-def73.7%
Applied egg-rr73.7%
div-sub73.7%
Applied egg-rr73.7%
associate-/l*79.5%
associate-/l*98.9%
Simplified98.9%
Taylor expanded in y.re around 0 74.7%
neg-mul-174.7%
*-commutative74.7%
unpow274.7%
associate-/l*74.8%
associate-*l/74.7%
+-commutative74.7%
unsub-neg74.7%
associate-*l/74.8%
associate-/l*74.7%
associate-/r*78.9%
*-commutative78.9%
associate-*r/81.3%
div-sub81.3%
Simplified81.3%
if -7.5000000000000006e126 < y.im < -1.11999999999999993e85 or -2.0000000000000001e-18 < y.im < 1.36e-52Initial program 69.2%
Taylor expanded in y.re around inf 81.7%
mul-1-neg81.7%
unsub-neg81.7%
unpow281.7%
associate-/r*84.9%
Simplified84.9%
sub-div88.4%
associate-/l*89.7%
Applied egg-rr89.7%
if -1.11999999999999993e85 < y.im < -2.0000000000000001e-18Initial program 80.2%
*-un-lft-identity80.2%
add-sqr-sqrt80.2%
times-frac80.2%
hypot-def80.2%
hypot-def89.8%
Applied egg-rr89.8%
div-sub89.8%
Applied egg-rr89.8%
associate-/l*99.5%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in x.im around 0 75.8%
mul-1-neg75.8%
associate-/l*76.2%
unpow276.2%
unpow276.2%
Simplified76.2%
Taylor expanded in y.re around 0 76.2%
+-commutative76.2%
unpow276.2%
Simplified76.2%
Final simplification84.7%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (or (<= y.re -4.3e-52) (not (<= y.re 2.3e-49))) (/ (- x.im (/ x.re (/ y.re y.im))) y.re) (/ (- (* (* y.re x.im) (/ 1.0 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_re <= -4.3e-52) || !(y_46_re <= 2.3e-49)) {
tmp = (x_46_im - (x_46_re / (y_46_re / y_46_im))) / y_46_re;
} else {
tmp = (((y_46_re * x_46_im) * (1.0 / 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_46re <= (-4.3d-52)) .or. (.not. (y_46re <= 2.3d-49))) then
tmp = (x_46im - (x_46re / (y_46re / y_46im))) / y_46re
else
tmp = (((y_46re * x_46im) * (1.0d0 / 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_re <= -4.3e-52) || !(y_46_re <= 2.3e-49)) {
tmp = (x_46_im - (x_46_re / (y_46_re / y_46_im))) / y_46_re;
} else {
tmp = (((y_46_re * x_46_im) * (1.0 / 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_re <= -4.3e-52) or not (y_46_re <= 2.3e-49): tmp = (x_46_im - (x_46_re / (y_46_re / y_46_im))) / y_46_re else: tmp = (((y_46_re * x_46_im) * (1.0 / 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_re <= -4.3e-52) || !(y_46_re <= 2.3e-49)) tmp = Float64(Float64(x_46_im - Float64(x_46_re / Float64(y_46_re / y_46_im))) / y_46_re); else tmp = Float64(Float64(Float64(Float64(y_46_re * x_46_im) * Float64(1.0 / 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_re <= -4.3e-52) || ~((y_46_re <= 2.3e-49))) tmp = (x_46_im - (x_46_re / (y_46_re / y_46_im))) / y_46_re; else tmp = (((y_46_re * x_46_im) * (1.0 / 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[Or[LessEqual[y$46$re, -4.3e-52], N[Not[LessEqual[y$46$re, 2.3e-49]], $MachinePrecision]], N[(N[(x$46$im - N[(x$46$re / N[(y$46$re / y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y$46$re), $MachinePrecision], N[(N[(N[(N[(y$46$re * x$46$im), $MachinePrecision] * N[(1.0 / y$46$im), $MachinePrecision]), $MachinePrecision] - x$46$re), $MachinePrecision] / y$46$im), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq -4.3 \cdot 10^{-52} \lor \neg \left(y.re \leq 2.3 \cdot 10^{-49}\right):\\
\;\;\;\;\frac{x.im - \frac{x.re}{\frac{y.re}{y.im}}}{y.re}\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(y.re \cdot x.im\right) \cdot \frac{1}{y.im} - x.re}{y.im}\\
\end{array}
\end{array}
if y.re < -4.3000000000000003e-52 or 2.2999999999999999e-49 < y.re Initial program 54.4%
Taylor expanded in y.re around inf 73.4%
mul-1-neg73.4%
unsub-neg73.4%
unpow273.4%
associate-/r*74.7%
Simplified74.7%
sub-div74.7%
associate-/l*76.7%
Applied egg-rr76.7%
if -4.3000000000000003e-52 < y.re < 2.2999999999999999e-49Initial program 75.9%
Taylor expanded in y.re around 0 81.1%
+-commutative81.1%
mul-1-neg81.1%
unsub-neg81.1%
unpow281.1%
times-frac84.7%
Simplified84.7%
associate-*r/85.5%
sub-div88.3%
Applied egg-rr88.3%
associate-*l/89.0%
clear-num89.0%
Applied egg-rr89.0%
associate-/r/89.0%
Simplified89.0%
Final simplification82.1%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (or (<= y.im -3.1e+121)
(not
(or (<= y.im -2.3e+84)
(and (not (<= y.im -6.2e-18)) (<= y.im 6.2e-33)))))
(/ (- 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 <= -3.1e+121) || !((y_46_im <= -2.3e+84) || (!(y_46_im <= -6.2e-18) && (y_46_im <= 6.2e-33)))) {
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 <= (-3.1d+121)) .or. (.not. (y_46im <= (-2.3d+84)) .or. (.not. (y_46im <= (-6.2d-18))) .and. (y_46im <= 6.2d-33))) 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 <= -3.1e+121) || !((y_46_im <= -2.3e+84) || (!(y_46_im <= -6.2e-18) && (y_46_im <= 6.2e-33)))) {
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 <= -3.1e+121) or not ((y_46_im <= -2.3e+84) or (not (y_46_im <= -6.2e-18) and (y_46_im <= 6.2e-33))): 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 <= -3.1e+121) || !((y_46_im <= -2.3e+84) || (!(y_46_im <= -6.2e-18) && (y_46_im <= 6.2e-33)))) 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 <= -3.1e+121) || ~(((y_46_im <= -2.3e+84) || (~((y_46_im <= -6.2e-18)) && (y_46_im <= 6.2e-33))))) 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, -3.1e+121], N[Not[Or[LessEqual[y$46$im, -2.3e+84], And[N[Not[LessEqual[y$46$im, -6.2e-18]], $MachinePrecision], LessEqual[y$46$im, 6.2e-33]]]], $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 -3.1 \cdot 10^{+121} \lor \neg \left(y.im \leq -2.3 \cdot 10^{+84} \lor \neg \left(y.im \leq -6.2 \cdot 10^{-18}\right) \land y.im \leq 6.2 \cdot 10^{-33}\right):\\
\;\;\;\;\frac{-x.re}{y.im}\\
\mathbf{else}:\\
\;\;\;\;\frac{x.im}{y.re}\\
\end{array}
\end{array}
if y.im < -3.10000000000000008e121 or -2.2999999999999999e84 < y.im < -6.20000000000000014e-18 or 6.19999999999999994e-33 < y.im Initial program 57.5%
Taylor expanded in y.re around 0 71.3%
associate-*r/71.3%
neg-mul-171.3%
Simplified71.3%
if -3.10000000000000008e121 < y.im < -2.2999999999999999e84 or -6.20000000000000014e-18 < y.im < 6.19999999999999994e-33Initial program 71.3%
Taylor expanded in y.re around inf 74.5%
Final simplification72.8%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (<= y.im -1.65e+178) (/ (- 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.65e+178) {
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.65d+178)) 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.65e+178) {
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.65e+178: 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.65e+178) tmp = Float64(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.65e+178) 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.65e+178], 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.65 \cdot 10^{+178}:\\
\;\;\;\;\frac{-x.im}{y.im}\\
\mathbf{else}:\\
\;\;\;\;\frac{x.im}{y.re}\\
\end{array}
\end{array}
if y.im < -1.6499999999999999e178Initial program 44.2%
*-un-lft-identity44.2%
add-sqr-sqrt44.2%
times-frac44.2%
hypot-def44.2%
hypot-def64.4%
Applied egg-rr64.4%
Taylor expanded in y.re around -inf 26.7%
neg-mul-126.7%
Simplified26.7%
Taylor expanded in y.re around 0 27.0%
associate-*r/27.0%
mul-1-neg27.0%
Simplified27.0%
if -1.6499999999999999e178 < y.im Initial program 66.8%
Taylor expanded in y.re around inf 49.6%
Final simplification46.7%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (<= y.im -1.2e+157) (/ 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.2e+157) {
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.2d+157)) 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.2e+157) {
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.2e+157: 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.2e+157) 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.2e+157) 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.2e+157], 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.2 \cdot 10^{+157}:\\
\;\;\;\;\frac{x.im}{y.im}\\
\mathbf{else}:\\
\;\;\;\;\frac{x.im}{y.re}\\
\end{array}
\end{array}
if y.im < -1.2e157Initial program 40.9%
*-un-lft-identity40.9%
add-sqr-sqrt40.9%
times-frac40.9%
hypot-def40.9%
hypot-def67.2%
Applied egg-rr67.2%
Taylor expanded in y.re around -inf 24.8%
neg-mul-124.8%
Simplified24.8%
Taylor expanded in y.im around -inf 24.8%
if -1.2e157 < y.im Initial program 67.6%
Taylor expanded in y.re around inf 50.3%
Final simplification46.7%
(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 63.9%
*-un-lft-identity63.9%
add-sqr-sqrt63.9%
times-frac63.9%
hypot-def63.9%
hypot-def78.5%
Applied egg-rr78.5%
Taylor expanded in y.re around -inf 34.9%
neg-mul-134.9%
Simplified34.9%
Taylor expanded in y.im around -inf 11.9%
Final simplification11.9%
herbie shell --seed 2023217
(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))))