
(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 18 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)) (pow (cbrt (* (/ y.im (hypot y.re y.im)) x.re)) 3.0))))
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)) - pow(cbrt(((y_46_im / hypot(y_46_re, y_46_im)) * x_46_re)), 3.0));
}
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)) - Math.pow(Math.cbrt(((y_46_im / Math.hypot(y_46_re, y_46_im)) * x_46_re)), 3.0));
}
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)) - (cbrt(Float64(Float64(y_46_im / hypot(y_46_re, y_46_im)) * x_46_re)) ^ 3.0))) 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[Power[N[Power[N[(N[(y$46$im / N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision]), $MachinePrecision] * x$46$re), $MachinePrecision], 1/3], $MachinePrecision], 3.0], $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}} - {\left(\sqrt[3]{\frac{y.im}{\mathsf{hypot}\left(y.re, y.im\right)} \cdot x.re}\right)}^{3}\right)
\end{array}
Initial program 61.5%
*-un-lft-identity61.5%
add-sqr-sqrt61.5%
times-frac61.4%
hypot-def61.5%
hypot-def73.2%
Applied egg-rr73.2%
div-sub73.2%
*-commutative73.2%
*-commutative73.2%
Applied egg-rr73.2%
associate-/l*83.7%
associate-/l*97.3%
Simplified97.3%
add-cube-cbrt96.7%
pow396.7%
associate-/r/97.6%
Applied egg-rr97.6%
Final simplification97.6%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (- (* y.re x.im) (* y.im x.re))))
(if (<= (/ t_0 (+ (* y.re y.re) (* y.im y.im))) 5e+261)
(* (/ 1.0 (hypot y.re y.im)) (/ t_0 (hypot y.re y.im)))
(fma
(/ y.re (hypot y.re y.im))
(/ x.im (hypot y.re y.im))
(/ (- x.re) y.im)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = (y_46_re * x_46_im) - (y_46_im * x_46_re);
double tmp;
if ((t_0 / ((y_46_re * y_46_re) + (y_46_im * y_46_im))) <= 5e+261) {
tmp = (1.0 / hypot(y_46_re, y_46_im)) * (t_0 / hypot(y_46_re, y_46_im));
} else {
tmp = fma((y_46_re / hypot(y_46_re, y_46_im)), (x_46_im / hypot(y_46_re, y_46_im)), (-x_46_re / y_46_im));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(Float64(y_46_re * x_46_im) - Float64(y_46_im * x_46_re)) tmp = 0.0 if (Float64(t_0 / Float64(Float64(y_46_re * y_46_re) + Float64(y_46_im * y_46_im))) <= 5e+261) tmp = Float64(Float64(1.0 / hypot(y_46_re, y_46_im)) * Float64(t_0 / hypot(y_46_re, y_46_im))); else tmp = fma(Float64(y_46_re / hypot(y_46_re, y_46_im)), Float64(x_46_im / hypot(y_46_re, y_46_im)), Float64(Float64(-x_46_re) / y_46_im)); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[(y$46$re * x$46$im), $MachinePrecision] - N[(y$46$im * x$46$re), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(t$95$0 / N[(N[(y$46$re * y$46$re), $MachinePrecision] + N[(y$46$im * y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 5e+261], N[(N[(1.0 / N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision]), $MachinePrecision] * N[(t$95$0 / N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y$46$re / N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision]), $MachinePrecision] * N[(x$46$im / N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision]), $MachinePrecision] + N[((-x$46$re) / y$46$im), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot x.im - y.im \cdot x.re\\
\mathbf{if}\;\frac{t_0}{y.re \cdot y.re + y.im \cdot y.im} \leq 5 \cdot 10^{+261}:\\
\;\;\;\;\frac{1}{\mathsf{hypot}\left(y.re, y.im\right)} \cdot \frac{t_0}{\mathsf{hypot}\left(y.re, y.im\right)}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y.re}{\mathsf{hypot}\left(y.re, y.im\right)}, \frac{x.im}{\mathsf{hypot}\left(y.re, y.im\right)}, \frac{-x.re}{y.im}\right)\\
\end{array}
\end{array}
if (/.f64 (-.f64 (*.f64 x.im y.re) (*.f64 x.re y.im)) (+.f64 (*.f64 y.re y.re) (*.f64 y.im y.im))) < 5.0000000000000001e261Initial program 81.7%
*-un-lft-identity81.7%
add-sqr-sqrt81.7%
times-frac81.6%
hypot-def81.7%
hypot-def95.9%
Applied egg-rr95.9%
if 5.0000000000000001e261 < (/.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 12.7%
div-sub9.7%
sub-neg9.7%
*-commutative9.7%
add-sqr-sqrt9.7%
times-frac13.7%
fma-def13.7%
hypot-def13.7%
hypot-def47.0%
associate-/l*53.8%
add-sqr-sqrt53.8%
pow253.8%
hypot-def53.8%
Applied egg-rr53.8%
Taylor expanded in y.re around 0 67.5%
Final simplification87.6%
(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 61.5%
*-un-lft-identity61.5%
add-sqr-sqrt61.5%
times-frac61.4%
hypot-def61.5%
hypot-def73.2%
Applied egg-rr73.2%
div-sub73.2%
*-commutative73.2%
*-commutative73.2%
Applied egg-rr73.2%
associate-/l*83.7%
associate-/l*97.3%
Simplified97.3%
Final simplification97.3%
(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))) INFINITY)
(* t_0 (/ t_1 (hypot y.re y.im)))
(* t_0 (- (/ y.re (/ (hypot y.re y.im) x.im)) x.re)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = 1.0 / hypot(y_46_re, y_46_im);
double t_1 = (y_46_re * 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))) <= ((double) INFINITY)) {
tmp = t_0 * (t_1 / hypot(y_46_re, y_46_im));
} else {
tmp = t_0 * ((y_46_re / (hypot(y_46_re, y_46_im) / x_46_im)) - x_46_re);
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = 1.0 / Math.hypot(y_46_re, y_46_im);
double t_1 = (y_46_re * 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))) <= Double.POSITIVE_INFINITY) {
tmp = t_0 * (t_1 / Math.hypot(y_46_re, y_46_im));
} else {
tmp = t_0 * ((y_46_re / (Math.hypot(y_46_re, y_46_im) / x_46_im)) - x_46_re);
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = 1.0 / math.hypot(y_46_re, y_46_im) t_1 = (y_46_re * 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))) <= math.inf: tmp = t_0 * (t_1 / math.hypot(y_46_re, y_46_im)) else: tmp = t_0 * ((y_46_re / (math.hypot(y_46_re, y_46_im) / x_46_im)) - x_46_re) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(1.0 / hypot(y_46_re, y_46_im)) t_1 = Float64(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))) <= Inf) tmp = Float64(t_0 * Float64(t_1 / hypot(y_46_re, y_46_im))); else tmp = Float64(t_0 * Float64(Float64(y_46_re / Float64(hypot(y_46_re, y_46_im) / x_46_im)) - x_46_re)); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = 1.0 / hypot(y_46_re, y_46_im); t_1 = (y_46_re * 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))) <= Inf) tmp = t_0 * (t_1 / hypot(y_46_re, y_46_im)); else tmp = t_0 * ((y_46_re / (hypot(y_46_re, y_46_im) / x_46_im)) - x_46_re); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(1.0 / N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(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], Infinity], 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[(N[(y$46$re / N[(N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision] / x$46$im), $MachinePrecision]), $MachinePrecision] - x$46$re), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{1}{\mathsf{hypot}\left(y.re, y.im\right)}\\
t_1 := 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 \infty:\\
\;\;\;\;t_0 \cdot \frac{t_1}{\mathsf{hypot}\left(y.re, y.im\right)}\\
\mathbf{else}:\\
\;\;\;\;t_0 \cdot \left(\frac{y.re}{\frac{\mathsf{hypot}\left(y.re, y.im\right)}{x.im}} - x.re\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))) < +inf.0Initial program 79.1%
*-un-lft-identity79.1%
add-sqr-sqrt79.1%
times-frac79.0%
hypot-def79.1%
hypot-def93.4%
Applied egg-rr93.4%
if +inf.0 < (/.f64 (-.f64 (*.f64 x.im y.re) (*.f64 x.re y.im)) (+.f64 (*.f64 y.re y.re) (*.f64 y.im y.im))) Initial program 0.0%
*-un-lft-identity0.0%
add-sqr-sqrt0.0%
times-frac0.0%
hypot-def0.0%
hypot-def2.7%
Applied egg-rr2.7%
div-sub2.7%
*-commutative2.7%
*-commutative2.7%
Applied egg-rr2.7%
associate-/l*48.7%
associate-/l*99.2%
Simplified99.2%
Taylor expanded in y.im around inf 63.8%
Final simplification86.8%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* (/ 1.0 y.im) (- (/ x.im (/ y.im y.re)) x.re))))
(if (<= y.re -3.6e+59)
(+ (/ x.im y.re) (* (/ y.im (/ y.re x.re)) (/ -1.0 y.re)))
(if (<= y.re -8.6e-51)
t_0
(if (<= y.re -1.45e-160)
(/ (- (* y.re x.im) (* y.im x.re)) (+ (* y.re y.re) (* y.im y.im)))
(if (<= y.re 7.2e-122)
t_0
(*
(/ 1.0 (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) {
double t_0 = (1.0 / y_46_im) * ((x_46_im / (y_46_im / y_46_re)) - x_46_re);
double tmp;
if (y_46_re <= -3.6e+59) {
tmp = (x_46_im / y_46_re) + ((y_46_im / (y_46_re / x_46_re)) * (-1.0 / y_46_re));
} else if (y_46_re <= -8.6e-51) {
tmp = t_0;
} else if (y_46_re <= -1.45e-160) {
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 <= 7.2e-122) {
tmp = t_0;
} else {
tmp = (1.0 / hypot(y_46_re, y_46_im)) * (x_46_im - (y_46_im / (hypot(y_46_re, y_46_im) / x_46_re)));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = (1.0 / y_46_im) * ((x_46_im / (y_46_im / y_46_re)) - x_46_re);
double tmp;
if (y_46_re <= -3.6e+59) {
tmp = (x_46_im / y_46_re) + ((y_46_im / (y_46_re / x_46_re)) * (-1.0 / y_46_re));
} else if (y_46_re <= -8.6e-51) {
tmp = t_0;
} else if (y_46_re <= -1.45e-160) {
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 <= 7.2e-122) {
tmp = t_0;
} else {
tmp = (1.0 / 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)));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = (1.0 / y_46_im) * ((x_46_im / (y_46_im / y_46_re)) - x_46_re) tmp = 0 if y_46_re <= -3.6e+59: tmp = (x_46_im / y_46_re) + ((y_46_im / (y_46_re / x_46_re)) * (-1.0 / y_46_re)) elif y_46_re <= -8.6e-51: tmp = t_0 elif y_46_re <= -1.45e-160: 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 <= 7.2e-122: tmp = t_0 else: tmp = (1.0 / 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))) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(Float64(1.0 / y_46_im) * Float64(Float64(x_46_im / Float64(y_46_im / y_46_re)) - x_46_re)) tmp = 0.0 if (y_46_re <= -3.6e+59) tmp = Float64(Float64(x_46_im / y_46_re) + Float64(Float64(y_46_im / Float64(y_46_re / x_46_re)) * Float64(-1.0 / y_46_re))); elseif (y_46_re <= -8.6e-51) tmp = t_0; elseif (y_46_re <= -1.45e-160) 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 <= 7.2e-122) tmp = t_0; else tmp = Float64(Float64(1.0 / hypot(y_46_re, y_46_im)) * Float64(x_46_im - Float64(y_46_im / Float64(hypot(y_46_re, y_46_im) / x_46_re)))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = (1.0 / y_46_im) * ((x_46_im / (y_46_im / y_46_re)) - x_46_re); tmp = 0.0; if (y_46_re <= -3.6e+59) tmp = (x_46_im / y_46_re) + ((y_46_im / (y_46_re / x_46_re)) * (-1.0 / y_46_re)); elseif (y_46_re <= -8.6e-51) tmp = t_0; elseif (y_46_re <= -1.45e-160) 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 <= 7.2e-122) tmp = t_0; else tmp = (1.0 / hypot(y_46_re, y_46_im)) * (x_46_im - (y_46_im / (hypot(y_46_re, y_46_im) / x_46_re))); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[(1.0 / y$46$im), $MachinePrecision] * N[(N[(x$46$im / N[(y$46$im / y$46$re), $MachinePrecision]), $MachinePrecision] - x$46$re), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -3.6e+59], N[(N[(x$46$im / y$46$re), $MachinePrecision] + N[(N[(y$46$im / N[(y$46$re / x$46$re), $MachinePrecision]), $MachinePrecision] * N[(-1.0 / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, -8.6e-51], t$95$0, If[LessEqual[y$46$re, -1.45e-160], 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, 7.2e-122], t$95$0, N[(N[(1.0 / N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision]), $MachinePrecision] * N[(x$46$im - 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}
\\
\begin{array}{l}
t_0 := \frac{1}{y.im} \cdot \left(\frac{x.im}{\frac{y.im}{y.re}} - x.re\right)\\
\mathbf{if}\;y.re \leq -3.6 \cdot 10^{+59}:\\
\;\;\;\;\frac{x.im}{y.re} + \frac{y.im}{\frac{y.re}{x.re}} \cdot \frac{-1}{y.re}\\
\mathbf{elif}\;y.re \leq -8.6 \cdot 10^{-51}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y.re \leq -1.45 \cdot 10^{-160}:\\
\;\;\;\;\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 7.2 \cdot 10^{-122}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\mathsf{hypot}\left(y.re, y.im\right)} \cdot \left(x.im - \frac{y.im}{\frac{\mathsf{hypot}\left(y.re, y.im\right)}{x.re}}\right)\\
\end{array}
\end{array}
if y.re < -3.5999999999999999e59Initial program 45.8%
Taylor expanded in y.re around inf 76.7%
*-un-lft-identity76.7%
pow276.7%
times-frac76.9%
*-commutative76.9%
Applied egg-rr76.9%
*-commutative76.9%
associate-/l*84.0%
Simplified84.0%
if -3.5999999999999999e59 < y.re < -8.5999999999999995e-51 or -1.45e-160 < y.re < 7.19999999999999989e-122Initial program 67.3%
*-un-lft-identity67.3%
add-sqr-sqrt67.3%
times-frac67.2%
hypot-def67.2%
hypot-def77.7%
Applied egg-rr77.7%
Taylor expanded in y.re around 0 50.0%
+-commutative50.0%
mul-1-neg50.0%
unsub-neg50.0%
associate-/l*50.4%
Simplified50.4%
Taylor expanded in y.re around 0 90.1%
if -8.5999999999999995e-51 < y.re < -1.45e-160Initial program 91.5%
if 7.19999999999999989e-122 < y.re Initial program 56.5%
*-un-lft-identity56.5%
add-sqr-sqrt56.5%
times-frac56.5%
hypot-def56.5%
hypot-def73.2%
Applied egg-rr73.2%
div-sub73.1%
*-commutative73.1%
*-commutative73.1%
Applied egg-rr73.1%
associate-/l*88.4%
associate-/l*99.5%
Simplified99.5%
Taylor expanded in y.re around inf 82.8%
Final simplification86.5%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (/ 1.0 (hypot y.re y.im))))
(if (<= y.im -15000.0)
(* t_0 (- x.re (/ x.im (/ y.im y.re))))
(if (<= y.im 8.2e-141)
(+ (* (/ (* y.im x.re) y.re) (/ -1.0 y.re)) (/ x.im y.re))
(if (<= y.im 2.05e-53)
(/ (- (* y.re x.im) (* y.im x.re)) (+ (* y.re y.re) (* y.im y.im)))
(if (<= y.im 1.16e-15)
(/ x.im y.re)
(* t_0 (- (/ y.re (/ (hypot y.re y.im) x.im)) x.re))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = 1.0 / hypot(y_46_re, y_46_im);
double tmp;
if (y_46_im <= -15000.0) {
tmp = t_0 * (x_46_re - (x_46_im / (y_46_im / y_46_re)));
} else if (y_46_im <= 8.2e-141) {
tmp = (((y_46_im * x_46_re) / y_46_re) * (-1.0 / y_46_re)) + (x_46_im / y_46_re);
} else if (y_46_im <= 2.05e-53) {
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.16e-15) {
tmp = x_46_im / y_46_re;
} else {
tmp = t_0 * ((y_46_re / (hypot(y_46_re, y_46_im) / x_46_im)) - x_46_re);
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = 1.0 / Math.hypot(y_46_re, y_46_im);
double tmp;
if (y_46_im <= -15000.0) {
tmp = t_0 * (x_46_re - (x_46_im / (y_46_im / y_46_re)));
} else if (y_46_im <= 8.2e-141) {
tmp = (((y_46_im * x_46_re) / y_46_re) * (-1.0 / y_46_re)) + (x_46_im / y_46_re);
} else if (y_46_im <= 2.05e-53) {
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.16e-15) {
tmp = x_46_im / y_46_re;
} else {
tmp = t_0 * ((y_46_re / (Math.hypot(y_46_re, y_46_im) / x_46_im)) - x_46_re);
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = 1.0 / math.hypot(y_46_re, y_46_im) tmp = 0 if y_46_im <= -15000.0: tmp = t_0 * (x_46_re - (x_46_im / (y_46_im / y_46_re))) elif y_46_im <= 8.2e-141: tmp = (((y_46_im * x_46_re) / y_46_re) * (-1.0 / y_46_re)) + (x_46_im / y_46_re) elif y_46_im <= 2.05e-53: 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.16e-15: tmp = x_46_im / y_46_re else: tmp = t_0 * ((y_46_re / (math.hypot(y_46_re, y_46_im) / x_46_im)) - x_46_re) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(1.0 / hypot(y_46_re, y_46_im)) tmp = 0.0 if (y_46_im <= -15000.0) tmp = Float64(t_0 * Float64(x_46_re - Float64(x_46_im / Float64(y_46_im / y_46_re)))); elseif (y_46_im <= 8.2e-141) tmp = Float64(Float64(Float64(Float64(y_46_im * x_46_re) / y_46_re) * Float64(-1.0 / y_46_re)) + Float64(x_46_im / y_46_re)); elseif (y_46_im <= 2.05e-53) 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.16e-15) tmp = Float64(x_46_im / y_46_re); else tmp = Float64(t_0 * Float64(Float64(y_46_re / Float64(hypot(y_46_re, y_46_im) / x_46_im)) - x_46_re)); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = 1.0 / hypot(y_46_re, y_46_im); tmp = 0.0; if (y_46_im <= -15000.0) tmp = t_0 * (x_46_re - (x_46_im / (y_46_im / y_46_re))); elseif (y_46_im <= 8.2e-141) tmp = (((y_46_im * x_46_re) / y_46_re) * (-1.0 / y_46_re)) + (x_46_im / y_46_re); elseif (y_46_im <= 2.05e-53) 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.16e-15) tmp = x_46_im / y_46_re; else tmp = t_0 * ((y_46_re / (hypot(y_46_re, y_46_im) / x_46_im)) - x_46_re); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(1.0 / N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -15000.0], N[(t$95$0 * N[(x$46$re - N[(x$46$im / N[(y$46$im / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 8.2e-141], N[(N[(N[(N[(y$46$im * x$46$re), $MachinePrecision] / y$46$re), $MachinePrecision] * N[(-1.0 / y$46$re), $MachinePrecision]), $MachinePrecision] + N[(x$46$im / y$46$re), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 2.05e-53], 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.16e-15], N[(x$46$im / y$46$re), $MachinePrecision], N[(t$95$0 * N[(N[(y$46$re / N[(N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision] / x$46$im), $MachinePrecision]), $MachinePrecision] - x$46$re), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{1}{\mathsf{hypot}\left(y.re, y.im\right)}\\
\mathbf{if}\;y.im \leq -15000:\\
\;\;\;\;t_0 \cdot \left(x.re - \frac{x.im}{\frac{y.im}{y.re}}\right)\\
\mathbf{elif}\;y.im \leq 8.2 \cdot 10^{-141}:\\
\;\;\;\;\frac{y.im \cdot x.re}{y.re} \cdot \frac{-1}{y.re} + \frac{x.im}{y.re}\\
\mathbf{elif}\;y.im \leq 2.05 \cdot 10^{-53}:\\
\;\;\;\;\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.16 \cdot 10^{-15}:\\
\;\;\;\;\frac{x.im}{y.re}\\
\mathbf{else}:\\
\;\;\;\;t_0 \cdot \left(\frac{y.re}{\frac{\mathsf{hypot}\left(y.re, y.im\right)}{x.im}} - x.re\right)\\
\end{array}
\end{array}
if y.im < -15000Initial program 52.1%
*-un-lft-identity52.1%
add-sqr-sqrt52.1%
times-frac52.1%
hypot-def52.1%
hypot-def64.7%
Applied egg-rr64.7%
Taylor expanded in y.im around -inf 75.8%
mul-1-neg75.8%
unsub-neg75.8%
associate-/l*82.8%
Simplified82.8%
if -15000 < y.im < 8.20000000000000005e-141Initial program 69.8%
Taylor expanded in y.re around inf 76.3%
*-un-lft-identity76.3%
pow276.3%
times-frac83.6%
*-commutative83.6%
Applied egg-rr83.6%
if 8.20000000000000005e-141 < y.im < 2.05e-53Initial program 93.4%
if 2.05e-53 < y.im < 1.1599999999999999e-15Initial program 42.5%
Taylor expanded in y.re around inf 100.0%
if 1.1599999999999999e-15 < y.im Initial program 53.2%
*-un-lft-identity53.2%
add-sqr-sqrt53.2%
times-frac53.2%
hypot-def53.2%
hypot-def65.5%
Applied egg-rr65.5%
div-sub65.5%
*-commutative65.5%
*-commutative65.5%
Applied egg-rr65.5%
associate-/l*75.9%
associate-/l*99.4%
Simplified99.4%
Taylor expanded in y.im around inf 93.8%
Final simplification86.9%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* (/ 1.0 y.im) (- (/ x.im (/ y.im y.re)) x.re)))
(t_1 (+ (/ x.im y.re) (* (/ y.im (/ y.re x.re)) (/ -1.0 y.re))))
(t_2
(/ (- (* y.re x.im) (* y.im x.re)) (+ (* y.re y.re) (* y.im y.im)))))
(if (<= y.re -5.1e+61)
t_1
(if (<= y.re -7.8e-51)
t_0
(if (<= y.re -3.8e-160)
t_2
(if (<= y.re 4.6e-141) t_0 (if (<= y.re 7.2e+73) t_2 t_1)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = (1.0 / y_46_im) * ((x_46_im / (y_46_im / y_46_re)) - x_46_re);
double t_1 = (x_46_im / y_46_re) + ((y_46_im / (y_46_re / x_46_re)) * (-1.0 / y_46_re));
double t_2 = ((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_re <= -5.1e+61) {
tmp = t_1;
} else if (y_46_re <= -7.8e-51) {
tmp = t_0;
} else if (y_46_re <= -3.8e-160) {
tmp = t_2;
} else if (y_46_re <= 4.6e-141) {
tmp = t_0;
} else if (y_46_re <= 7.2e+73) {
tmp = t_2;
} 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) :: t_2
real(8) :: tmp
t_0 = (1.0d0 / y_46im) * ((x_46im / (y_46im / y_46re)) - x_46re)
t_1 = (x_46im / y_46re) + ((y_46im / (y_46re / x_46re)) * ((-1.0d0) / y_46re))
t_2 = ((y_46re * x_46im) - (y_46im * x_46re)) / ((y_46re * y_46re) + (y_46im * y_46im))
if (y_46re <= (-5.1d+61)) then
tmp = t_1
else if (y_46re <= (-7.8d-51)) then
tmp = t_0
else if (y_46re <= (-3.8d-160)) then
tmp = t_2
else if (y_46re <= 4.6d-141) then
tmp = t_0
else if (y_46re <= 7.2d+73) then
tmp = t_2
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 = (1.0 / y_46_im) * ((x_46_im / (y_46_im / y_46_re)) - x_46_re);
double t_1 = (x_46_im / y_46_re) + ((y_46_im / (y_46_re / x_46_re)) * (-1.0 / y_46_re));
double t_2 = ((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_re <= -5.1e+61) {
tmp = t_1;
} else if (y_46_re <= -7.8e-51) {
tmp = t_0;
} else if (y_46_re <= -3.8e-160) {
tmp = t_2;
} else if (y_46_re <= 4.6e-141) {
tmp = t_0;
} else if (y_46_re <= 7.2e+73) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = (1.0 / y_46_im) * ((x_46_im / (y_46_im / y_46_re)) - x_46_re) t_1 = (x_46_im / y_46_re) + ((y_46_im / (y_46_re / x_46_re)) * (-1.0 / y_46_re)) t_2 = ((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_re <= -5.1e+61: tmp = t_1 elif y_46_re <= -7.8e-51: tmp = t_0 elif y_46_re <= -3.8e-160: tmp = t_2 elif y_46_re <= 4.6e-141: tmp = t_0 elif y_46_re <= 7.2e+73: tmp = t_2 else: tmp = t_1 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(Float64(1.0 / y_46_im) * Float64(Float64(x_46_im / Float64(y_46_im / y_46_re)) - x_46_re)) t_1 = Float64(Float64(x_46_im / y_46_re) + Float64(Float64(y_46_im / Float64(y_46_re / x_46_re)) * Float64(-1.0 / y_46_re))) t_2 = 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_re <= -5.1e+61) tmp = t_1; elseif (y_46_re <= -7.8e-51) tmp = t_0; elseif (y_46_re <= -3.8e-160) tmp = t_2; elseif (y_46_re <= 4.6e-141) tmp = t_0; elseif (y_46_re <= 7.2e+73) tmp = t_2; 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 = (1.0 / y_46_im) * ((x_46_im / (y_46_im / y_46_re)) - x_46_re); t_1 = (x_46_im / y_46_re) + ((y_46_im / (y_46_re / x_46_re)) * (-1.0 / y_46_re)); t_2 = ((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_re <= -5.1e+61) tmp = t_1; elseif (y_46_re <= -7.8e-51) tmp = t_0; elseif (y_46_re <= -3.8e-160) tmp = t_2; elseif (y_46_re <= 4.6e-141) tmp = t_0; elseif (y_46_re <= 7.2e+73) tmp = t_2; 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[(1.0 / y$46$im), $MachinePrecision] * N[(N[(x$46$im / N[(y$46$im / y$46$re), $MachinePrecision]), $MachinePrecision] - x$46$re), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x$46$im / y$46$re), $MachinePrecision] + N[(N[(y$46$im / N[(y$46$re / x$46$re), $MachinePrecision]), $MachinePrecision] * N[(-1.0 / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = 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, -5.1e+61], t$95$1, If[LessEqual[y$46$re, -7.8e-51], t$95$0, If[LessEqual[y$46$re, -3.8e-160], t$95$2, If[LessEqual[y$46$re, 4.6e-141], t$95$0, If[LessEqual[y$46$re, 7.2e+73], t$95$2, t$95$1]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{1}{y.im} \cdot \left(\frac{x.im}{\frac{y.im}{y.re}} - x.re\right)\\
t_1 := \frac{x.im}{y.re} + \frac{y.im}{\frac{y.re}{x.re}} \cdot \frac{-1}{y.re}\\
t_2 := \frac{y.re \cdot x.im - y.im \cdot x.re}{y.re \cdot y.re + y.im \cdot y.im}\\
\mathbf{if}\;y.re \leq -5.1 \cdot 10^{+61}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y.re \leq -7.8 \cdot 10^{-51}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y.re \leq -3.8 \cdot 10^{-160}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y.re \leq 4.6 \cdot 10^{-141}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y.re \leq 7.2 \cdot 10^{+73}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y.re < -5.1000000000000001e61 or 7.1999999999999998e73 < y.re Initial program 40.1%
Taylor expanded in y.re around inf 73.4%
*-un-lft-identity73.4%
pow273.4%
times-frac73.6%
*-commutative73.6%
Applied egg-rr73.6%
*-commutative73.6%
associate-/l*81.9%
Simplified81.9%
if -5.1000000000000001e61 < y.re < -7.7999999999999995e-51 or -3.7999999999999998e-160 < y.re < 4.5999999999999999e-141Initial program 66.6%
*-un-lft-identity66.6%
add-sqr-sqrt66.6%
times-frac66.6%
hypot-def66.6%
hypot-def77.2%
Applied egg-rr77.2%
Taylor expanded in y.re around 0 49.5%
+-commutative49.5%
mul-1-neg49.5%
unsub-neg49.5%
associate-/l*49.8%
Simplified49.8%
Taylor expanded in y.re around 0 89.9%
if -7.7999999999999995e-51 < y.re < -3.7999999999999998e-160 or 4.5999999999999999e-141 < y.re < 7.1999999999999998e73Initial program 86.1%
Final simplification86.0%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* (/ 1.0 y.im) (- (/ x.im (/ y.im y.re)) x.re))))
(if (<= y.im -4.1e+29)
t_0
(if (<= y.im -3.6e-54)
(/ (* y.im (- x.re)) (+ (* y.re y.re) (* y.im y.im)))
(if (<= y.im 1.3e-121)
(/ x.im y.re)
(if (<= y.im 1.45e-53)
(- (/ x.im (* y.im (/ y.im y.re))) (/ x.re y.im))
(if (<= y.im 0.1) (/ x.im y.re) t_0)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = (1.0 / y_46_im) * ((x_46_im / (y_46_im / y_46_re)) - x_46_re);
double tmp;
if (y_46_im <= -4.1e+29) {
tmp = t_0;
} else if (y_46_im <= -3.6e-54) {
tmp = (y_46_im * -x_46_re) / ((y_46_re * y_46_re) + (y_46_im * y_46_im));
} else if (y_46_im <= 1.3e-121) {
tmp = x_46_im / y_46_re;
} else if (y_46_im <= 1.45e-53) {
tmp = (x_46_im / (y_46_im * (y_46_im / y_46_re))) - (x_46_re / y_46_im);
} else if (y_46_im <= 0.1) {
tmp = x_46_im / y_46_re;
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
real(8) :: tmp
t_0 = (1.0d0 / y_46im) * ((x_46im / (y_46im / y_46re)) - x_46re)
if (y_46im <= (-4.1d+29)) then
tmp = t_0
else if (y_46im <= (-3.6d-54)) then
tmp = (y_46im * -x_46re) / ((y_46re * y_46re) + (y_46im * y_46im))
else if (y_46im <= 1.3d-121) then
tmp = x_46im / y_46re
else if (y_46im <= 1.45d-53) then
tmp = (x_46im / (y_46im * (y_46im / y_46re))) - (x_46re / y_46im)
else if (y_46im <= 0.1d0) then
tmp = x_46im / y_46re
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = (1.0 / y_46_im) * ((x_46_im / (y_46_im / y_46_re)) - x_46_re);
double tmp;
if (y_46_im <= -4.1e+29) {
tmp = t_0;
} else if (y_46_im <= -3.6e-54) {
tmp = (y_46_im * -x_46_re) / ((y_46_re * y_46_re) + (y_46_im * y_46_im));
} else if (y_46_im <= 1.3e-121) {
tmp = x_46_im / y_46_re;
} else if (y_46_im <= 1.45e-53) {
tmp = (x_46_im / (y_46_im * (y_46_im / y_46_re))) - (x_46_re / y_46_im);
} else if (y_46_im <= 0.1) {
tmp = x_46_im / y_46_re;
} else {
tmp = t_0;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = (1.0 / y_46_im) * ((x_46_im / (y_46_im / y_46_re)) - x_46_re) tmp = 0 if y_46_im <= -4.1e+29: tmp = t_0 elif y_46_im <= -3.6e-54: tmp = (y_46_im * -x_46_re) / ((y_46_re * y_46_re) + (y_46_im * y_46_im)) elif y_46_im <= 1.3e-121: tmp = x_46_im / y_46_re elif y_46_im <= 1.45e-53: tmp = (x_46_im / (y_46_im * (y_46_im / y_46_re))) - (x_46_re / y_46_im) elif y_46_im <= 0.1: tmp = x_46_im / y_46_re else: tmp = t_0 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(Float64(1.0 / y_46_im) * Float64(Float64(x_46_im / Float64(y_46_im / y_46_re)) - x_46_re)) tmp = 0.0 if (y_46_im <= -4.1e+29) tmp = t_0; elseif (y_46_im <= -3.6e-54) tmp = Float64(Float64(y_46_im * Float64(-x_46_re)) / Float64(Float64(y_46_re * y_46_re) + Float64(y_46_im * y_46_im))); elseif (y_46_im <= 1.3e-121) tmp = Float64(x_46_im / y_46_re); elseif (y_46_im <= 1.45e-53) tmp = Float64(Float64(x_46_im / Float64(y_46_im * Float64(y_46_im / y_46_re))) - Float64(x_46_re / y_46_im)); elseif (y_46_im <= 0.1) tmp = Float64(x_46_im / y_46_re); else tmp = t_0; end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = (1.0 / y_46_im) * ((x_46_im / (y_46_im / y_46_re)) - x_46_re); tmp = 0.0; if (y_46_im <= -4.1e+29) tmp = t_0; elseif (y_46_im <= -3.6e-54) tmp = (y_46_im * -x_46_re) / ((y_46_re * y_46_re) + (y_46_im * y_46_im)); elseif (y_46_im <= 1.3e-121) tmp = x_46_im / y_46_re; elseif (y_46_im <= 1.45e-53) tmp = (x_46_im / (y_46_im * (y_46_im / y_46_re))) - (x_46_re / y_46_im); elseif (y_46_im <= 0.1) tmp = x_46_im / y_46_re; else tmp = t_0; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[(1.0 / y$46$im), $MachinePrecision] * N[(N[(x$46$im / N[(y$46$im / y$46$re), $MachinePrecision]), $MachinePrecision] - x$46$re), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -4.1e+29], t$95$0, If[LessEqual[y$46$im, -3.6e-54], N[(N[(y$46$im * (-x$46$re)), $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.3e-121], N[(x$46$im / y$46$re), $MachinePrecision], If[LessEqual[y$46$im, 1.45e-53], N[(N[(x$46$im / N[(y$46$im * N[(y$46$im / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x$46$re / y$46$im), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 0.1], N[(x$46$im / y$46$re), $MachinePrecision], t$95$0]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{1}{y.im} \cdot \left(\frac{x.im}{\frac{y.im}{y.re}} - x.re\right)\\
\mathbf{if}\;y.im \leq -4.1 \cdot 10^{+29}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y.im \leq -3.6 \cdot 10^{-54}:\\
\;\;\;\;\frac{y.im \cdot \left(-x.re\right)}{y.re \cdot y.re + y.im \cdot y.im}\\
\mathbf{elif}\;y.im \leq 1.3 \cdot 10^{-121}:\\
\;\;\;\;\frac{x.im}{y.re}\\
\mathbf{elif}\;y.im \leq 1.45 \cdot 10^{-53}:\\
\;\;\;\;\frac{x.im}{y.im \cdot \frac{y.im}{y.re}} - \frac{x.re}{y.im}\\
\mathbf{elif}\;y.im \leq 0.1:\\
\;\;\;\;\frac{x.im}{y.re}\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if y.im < -4.1000000000000003e29 or 0.10000000000000001 < y.im Initial program 50.5%
*-un-lft-identity50.5%
add-sqr-sqrt50.5%
times-frac50.4%
hypot-def50.4%
hypot-def63.5%
Applied egg-rr63.5%
Taylor expanded in y.re around 0 47.9%
+-commutative47.9%
mul-1-neg47.9%
unsub-neg47.9%
associate-/l*49.6%
Simplified49.6%
Taylor expanded in y.re around 0 80.8%
if -4.1000000000000003e29 < y.im < -3.59999999999999976e-54Initial program 90.5%
Taylor expanded in x.im around 0 74.2%
associate-*r*74.2%
neg-mul-174.2%
*-commutative74.2%
Simplified74.2%
if -3.59999999999999976e-54 < y.im < 1.29999999999999993e-121 or 1.4499999999999999e-53 < y.im < 0.10000000000000001Initial program 66.3%
Taylor expanded in y.re around inf 76.7%
if 1.29999999999999993e-121 < y.im < 1.4499999999999999e-53Initial program 91.7%
Taylor expanded in y.re around 0 66.6%
+-commutative66.6%
mul-1-neg66.6%
unsub-neg66.6%
associate-/l*66.6%
Simplified66.6%
div-inv66.6%
unpow266.6%
associate-*l*66.6%
div-inv66.7%
Applied egg-rr66.7%
Final simplification78.1%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (or (<= y.im -1500.0)
(not
(or (<= y.im 8.4e-122) (and (not (<= y.im 3e-57)) (<= y.im 0.215)))))
(* (/ 1.0 y.im) (- (/ x.im (/ y.im y.re)) x.re))
(/ 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 <= -1500.0) || !((y_46_im <= 8.4e-122) || (!(y_46_im <= 3e-57) && (y_46_im <= 0.215)))) {
tmp = (1.0 / y_46_im) * ((x_46_im / (y_46_im / y_46_re)) - x_46_re);
} 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 <= (-1500.0d0)) .or. (.not. (y_46im <= 8.4d-122) .or. (.not. (y_46im <= 3d-57)) .and. (y_46im <= 0.215d0))) then
tmp = (1.0d0 / y_46im) * ((x_46im / (y_46im / y_46re)) - x_46re)
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 <= -1500.0) || !((y_46_im <= 8.4e-122) || (!(y_46_im <= 3e-57) && (y_46_im <= 0.215)))) {
tmp = (1.0 / y_46_im) * ((x_46_im / (y_46_im / y_46_re)) - x_46_re);
} 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 <= -1500.0) or not ((y_46_im <= 8.4e-122) or (not (y_46_im <= 3e-57) and (y_46_im <= 0.215))): tmp = (1.0 / y_46_im) * ((x_46_im / (y_46_im / y_46_re)) - x_46_re) 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 <= -1500.0) || !((y_46_im <= 8.4e-122) || (!(y_46_im <= 3e-57) && (y_46_im <= 0.215)))) tmp = Float64(Float64(1.0 / y_46_im) * Float64(Float64(x_46_im / Float64(y_46_im / y_46_re)) - x_46_re)); 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 <= -1500.0) || ~(((y_46_im <= 8.4e-122) || (~((y_46_im <= 3e-57)) && (y_46_im <= 0.215))))) tmp = (1.0 / y_46_im) * ((x_46_im / (y_46_im / y_46_re)) - x_46_re); 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, -1500.0], N[Not[Or[LessEqual[y$46$im, 8.4e-122], And[N[Not[LessEqual[y$46$im, 3e-57]], $MachinePrecision], LessEqual[y$46$im, 0.215]]]], $MachinePrecision]], N[(N[(1.0 / y$46$im), $MachinePrecision] * N[(N[(x$46$im / N[(y$46$im / y$46$re), $MachinePrecision]), $MachinePrecision] - x$46$re), $MachinePrecision]), $MachinePrecision], N[(x$46$im / y$46$re), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.im \leq -1500 \lor \neg \left(y.im \leq 8.4 \cdot 10^{-122} \lor \neg \left(y.im \leq 3 \cdot 10^{-57}\right) \land y.im \leq 0.215\right):\\
\;\;\;\;\frac{1}{y.im} \cdot \left(\frac{x.im}{\frac{y.im}{y.re}} - x.re\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x.im}{y.re}\\
\end{array}
\end{array}
if y.im < -1500 or 8.39999999999999969e-122 < y.im < 3.00000000000000001e-57 or 0.214999999999999997 < y.im Initial program 55.5%
*-un-lft-identity55.5%
add-sqr-sqrt55.5%
times-frac55.5%
hypot-def55.5%
hypot-def67.0%
Applied egg-rr67.0%
Taylor expanded in y.re around 0 48.0%
+-commutative48.0%
mul-1-neg48.0%
unsub-neg48.0%
associate-/l*49.5%
Simplified49.5%
Taylor expanded in y.re around 0 79.6%
if -1500 < y.im < 8.39999999999999969e-122 or 3.00000000000000001e-57 < y.im < 0.214999999999999997Initial program 69.7%
Taylor expanded in y.re around inf 71.4%
Final simplification76.2%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* (/ 1.0 y.im) (- (/ x.im (/ y.im y.re)) x.re))))
(if (<= y.im -1600.0)
t_0
(if (<= y.im 1e-121)
(/ x.im y.re)
(if (<= y.im 3.5e-57)
(- (/ x.im (* y.im (/ y.im y.re))) (/ x.re y.im))
(if (<= y.im 2100.0) (/ x.im y.re) t_0))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = (1.0 / y_46_im) * ((x_46_im / (y_46_im / y_46_re)) - x_46_re);
double tmp;
if (y_46_im <= -1600.0) {
tmp = t_0;
} else if (y_46_im <= 1e-121) {
tmp = x_46_im / y_46_re;
} else if (y_46_im <= 3.5e-57) {
tmp = (x_46_im / (y_46_im * (y_46_im / y_46_re))) - (x_46_re / y_46_im);
} else if (y_46_im <= 2100.0) {
tmp = x_46_im / y_46_re;
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
real(8) :: tmp
t_0 = (1.0d0 / y_46im) * ((x_46im / (y_46im / y_46re)) - x_46re)
if (y_46im <= (-1600.0d0)) then
tmp = t_0
else if (y_46im <= 1d-121) then
tmp = x_46im / y_46re
else if (y_46im <= 3.5d-57) then
tmp = (x_46im / (y_46im * (y_46im / y_46re))) - (x_46re / y_46im)
else if (y_46im <= 2100.0d0) then
tmp = x_46im / y_46re
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = (1.0 / y_46_im) * ((x_46_im / (y_46_im / y_46_re)) - x_46_re);
double tmp;
if (y_46_im <= -1600.0) {
tmp = t_0;
} else if (y_46_im <= 1e-121) {
tmp = x_46_im / y_46_re;
} else if (y_46_im <= 3.5e-57) {
tmp = (x_46_im / (y_46_im * (y_46_im / y_46_re))) - (x_46_re / y_46_im);
} else if (y_46_im <= 2100.0) {
tmp = x_46_im / y_46_re;
} else {
tmp = t_0;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = (1.0 / y_46_im) * ((x_46_im / (y_46_im / y_46_re)) - x_46_re) tmp = 0 if y_46_im <= -1600.0: tmp = t_0 elif y_46_im <= 1e-121: tmp = x_46_im / y_46_re elif y_46_im <= 3.5e-57: tmp = (x_46_im / (y_46_im * (y_46_im / y_46_re))) - (x_46_re / y_46_im) elif y_46_im <= 2100.0: tmp = x_46_im / y_46_re else: tmp = t_0 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(Float64(1.0 / y_46_im) * Float64(Float64(x_46_im / Float64(y_46_im / y_46_re)) - x_46_re)) tmp = 0.0 if (y_46_im <= -1600.0) tmp = t_0; elseif (y_46_im <= 1e-121) tmp = Float64(x_46_im / y_46_re); elseif (y_46_im <= 3.5e-57) tmp = Float64(Float64(x_46_im / Float64(y_46_im * Float64(y_46_im / y_46_re))) - Float64(x_46_re / y_46_im)); elseif (y_46_im <= 2100.0) tmp = Float64(x_46_im / y_46_re); else tmp = t_0; end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = (1.0 / y_46_im) * ((x_46_im / (y_46_im / y_46_re)) - x_46_re); tmp = 0.0; if (y_46_im <= -1600.0) tmp = t_0; elseif (y_46_im <= 1e-121) tmp = x_46_im / y_46_re; elseif (y_46_im <= 3.5e-57) tmp = (x_46_im / (y_46_im * (y_46_im / y_46_re))) - (x_46_re / y_46_im); elseif (y_46_im <= 2100.0) tmp = x_46_im / y_46_re; else tmp = t_0; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[(1.0 / y$46$im), $MachinePrecision] * N[(N[(x$46$im / N[(y$46$im / y$46$re), $MachinePrecision]), $MachinePrecision] - x$46$re), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -1600.0], t$95$0, If[LessEqual[y$46$im, 1e-121], N[(x$46$im / y$46$re), $MachinePrecision], If[LessEqual[y$46$im, 3.5e-57], N[(N[(x$46$im / N[(y$46$im * N[(y$46$im / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x$46$re / y$46$im), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 2100.0], N[(x$46$im / y$46$re), $MachinePrecision], t$95$0]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{1}{y.im} \cdot \left(\frac{x.im}{\frac{y.im}{y.re}} - x.re\right)\\
\mathbf{if}\;y.im \leq -1600:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y.im \leq 10^{-121}:\\
\;\;\;\;\frac{x.im}{y.re}\\
\mathbf{elif}\;y.im \leq 3.5 \cdot 10^{-57}:\\
\;\;\;\;\frac{x.im}{y.im \cdot \frac{y.im}{y.re}} - \frac{x.re}{y.im}\\
\mathbf{elif}\;y.im \leq 2100:\\
\;\;\;\;\frac{x.im}{y.re}\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if y.im < -1600 or 2100 < y.im Initial program 52.3%
*-un-lft-identity52.3%
add-sqr-sqrt52.3%
times-frac52.3%
hypot-def52.3%
hypot-def64.8%
Applied egg-rr64.8%
Taylor expanded in y.re around 0 46.3%
+-commutative46.3%
mul-1-neg46.3%
unsub-neg46.3%
associate-/l*47.9%
Simplified47.9%
Taylor expanded in y.re around 0 80.8%
if -1600 < y.im < 9.9999999999999998e-122 or 3.49999999999999991e-57 < y.im < 2100Initial program 69.7%
Taylor expanded in y.re around inf 71.4%
if 9.9999999999999998e-122 < y.im < 3.49999999999999991e-57Initial program 91.7%
Taylor expanded in y.re around 0 66.6%
+-commutative66.6%
mul-1-neg66.6%
unsub-neg66.6%
associate-/l*66.6%
Simplified66.6%
div-inv66.6%
unpow266.6%
associate-*l*66.6%
div-inv66.7%
Applied egg-rr66.7%
Final simplification76.2%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (or (<= y.im -6800000.0) (not (<= y.im 20000.0))) (* (/ 1.0 y.im) (- (/ x.im (/ y.im y.re)) x.re)) (+ (* (/ (* y.im x.re) y.re) (/ -1.0 y.re)) (/ 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 <= -6800000.0) || !(y_46_im <= 20000.0)) {
tmp = (1.0 / y_46_im) * ((x_46_im / (y_46_im / y_46_re)) - x_46_re);
} else {
tmp = (((y_46_im * x_46_re) / y_46_re) * (-1.0 / y_46_re)) + (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 <= (-6800000.0d0)) .or. (.not. (y_46im <= 20000.0d0))) then
tmp = (1.0d0 / y_46im) * ((x_46im / (y_46im / y_46re)) - x_46re)
else
tmp = (((y_46im * x_46re) / y_46re) * ((-1.0d0) / y_46re)) + (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 <= -6800000.0) || !(y_46_im <= 20000.0)) {
tmp = (1.0 / y_46_im) * ((x_46_im / (y_46_im / y_46_re)) - x_46_re);
} else {
tmp = (((y_46_im * x_46_re) / y_46_re) * (-1.0 / y_46_re)) + (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 <= -6800000.0) or not (y_46_im <= 20000.0): tmp = (1.0 / y_46_im) * ((x_46_im / (y_46_im / y_46_re)) - x_46_re) else: tmp = (((y_46_im * x_46_re) / y_46_re) * (-1.0 / y_46_re)) + (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 <= -6800000.0) || !(y_46_im <= 20000.0)) tmp = Float64(Float64(1.0 / y_46_im) * Float64(Float64(x_46_im / Float64(y_46_im / y_46_re)) - x_46_re)); else tmp = Float64(Float64(Float64(Float64(y_46_im * x_46_re) / y_46_re) * Float64(-1.0 / y_46_re)) + 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 <= -6800000.0) || ~((y_46_im <= 20000.0))) tmp = (1.0 / y_46_im) * ((x_46_im / (y_46_im / y_46_re)) - x_46_re); else tmp = (((y_46_im * x_46_re) / y_46_re) * (-1.0 / y_46_re)) + (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, -6800000.0], N[Not[LessEqual[y$46$im, 20000.0]], $MachinePrecision]], N[(N[(1.0 / y$46$im), $MachinePrecision] * N[(N[(x$46$im / N[(y$46$im / y$46$re), $MachinePrecision]), $MachinePrecision] - x$46$re), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(y$46$im * x$46$re), $MachinePrecision] / y$46$re), $MachinePrecision] * N[(-1.0 / y$46$re), $MachinePrecision]), $MachinePrecision] + N[(x$46$im / y$46$re), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.im \leq -6800000 \lor \neg \left(y.im \leq 20000\right):\\
\;\;\;\;\frac{1}{y.im} \cdot \left(\frac{x.im}{\frac{y.im}{y.re}} - x.re\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{y.im \cdot x.re}{y.re} \cdot \frac{-1}{y.re} + \frac{x.im}{y.re}\\
\end{array}
\end{array}
if y.im < -6.8e6 or 2e4 < y.im Initial program 52.3%
*-un-lft-identity52.3%
add-sqr-sqrt52.3%
times-frac52.3%
hypot-def52.3%
hypot-def64.8%
Applied egg-rr64.8%
Taylor expanded in y.re around 0 46.3%
+-commutative46.3%
mul-1-neg46.3%
unsub-neg46.3%
associate-/l*47.9%
Simplified47.9%
Taylor expanded in y.re around 0 80.8%
if -6.8e6 < y.im < 2e4Initial program 71.9%
Taylor expanded in y.re around inf 74.8%
*-un-lft-identity74.8%
pow274.8%
times-frac80.9%
*-commutative80.9%
Applied egg-rr80.9%
Final simplification80.9%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (or (<= y.im -3350.0) (not (<= y.im 0.086))) (* (/ 1.0 y.im) (- (/ x.im (/ y.im y.re)) x.re)) (- (/ x.im y.re) (* (/ y.im y.re) (/ x.re y.re)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_im <= -3350.0) || !(y_46_im <= 0.086)) {
tmp = (1.0 / y_46_im) * ((x_46_im / (y_46_im / y_46_re)) - x_46_re);
} else {
tmp = (x_46_im / y_46_re) - ((y_46_im / y_46_re) * (x_46_re / y_46_re));
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: tmp
if ((y_46im <= (-3350.0d0)) .or. (.not. (y_46im <= 0.086d0))) then
tmp = (1.0d0 / y_46im) * ((x_46im / (y_46im / y_46re)) - x_46re)
else
tmp = (x_46im / y_46re) - ((y_46im / y_46re) * (x_46re / y_46re))
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_im <= -3350.0) || !(y_46_im <= 0.086)) {
tmp = (1.0 / y_46_im) * ((x_46_im / (y_46_im / y_46_re)) - x_46_re);
} else {
tmp = (x_46_im / y_46_re) - ((y_46_im / y_46_re) * (x_46_re / y_46_re));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if (y_46_im <= -3350.0) or not (y_46_im <= 0.086): tmp = (1.0 / y_46_im) * ((x_46_im / (y_46_im / y_46_re)) - x_46_re) else: tmp = (x_46_im / y_46_re) - ((y_46_im / y_46_re) * (x_46_re / y_46_re)) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if ((y_46_im <= -3350.0) || !(y_46_im <= 0.086)) tmp = Float64(Float64(1.0 / y_46_im) * Float64(Float64(x_46_im / Float64(y_46_im / y_46_re)) - x_46_re)); else tmp = Float64(Float64(x_46_im / y_46_re) - Float64(Float64(y_46_im / y_46_re) * Float64(x_46_re / y_46_re))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if ((y_46_im <= -3350.0) || ~((y_46_im <= 0.086))) tmp = (1.0 / y_46_im) * ((x_46_im / (y_46_im / y_46_re)) - x_46_re); else tmp = (x_46_im / y_46_re) - ((y_46_im / y_46_re) * (x_46_re / y_46_re)); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[Or[LessEqual[y$46$im, -3350.0], N[Not[LessEqual[y$46$im, 0.086]], $MachinePrecision]], N[(N[(1.0 / y$46$im), $MachinePrecision] * N[(N[(x$46$im / N[(y$46$im / y$46$re), $MachinePrecision]), $MachinePrecision] - x$46$re), $MachinePrecision]), $MachinePrecision], N[(N[(x$46$im / y$46$re), $MachinePrecision] - N[(N[(y$46$im / y$46$re), $MachinePrecision] * N[(x$46$re / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.im \leq -3350 \lor \neg \left(y.im \leq 0.086\right):\\
\;\;\;\;\frac{1}{y.im} \cdot \left(\frac{x.im}{\frac{y.im}{y.re}} - x.re\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x.im}{y.re} - \frac{y.im}{y.re} \cdot \frac{x.re}{y.re}\\
\end{array}
\end{array}
if y.im < -3350 or 0.085999999999999993 < y.im Initial program 52.3%
*-un-lft-identity52.3%
add-sqr-sqrt52.3%
times-frac52.3%
hypot-def52.3%
hypot-def64.8%
Applied egg-rr64.8%
Taylor expanded in y.re around 0 46.3%
+-commutative46.3%
mul-1-neg46.3%
unsub-neg46.3%
associate-/l*47.9%
Simplified47.9%
Taylor expanded in y.re around 0 80.8%
if -3350 < y.im < 0.085999999999999993Initial program 71.9%
Taylor expanded in y.re around inf 74.8%
*-commutative74.8%
pow274.8%
times-frac78.5%
Applied egg-rr78.5%
Final simplification79.7%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (or (<= y.im -34000000.0) (not (<= y.im 10200.0))) (* (/ 1.0 y.im) (- (/ x.im (/ y.im y.re)) x.re)) (- (/ x.im y.re) (/ x.re (* y.re (/ y.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 <= -34000000.0) || !(y_46_im <= 10200.0)) {
tmp = (1.0 / y_46_im) * ((x_46_im / (y_46_im / y_46_re)) - x_46_re);
} else {
tmp = (x_46_im / y_46_re) - (x_46_re / (y_46_re * (y_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 <= (-34000000.0d0)) .or. (.not. (y_46im <= 10200.0d0))) then
tmp = (1.0d0 / y_46im) * ((x_46im / (y_46im / y_46re)) - x_46re)
else
tmp = (x_46im / y_46re) - (x_46re / (y_46re * (y_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 <= -34000000.0) || !(y_46_im <= 10200.0)) {
tmp = (1.0 / y_46_im) * ((x_46_im / (y_46_im / y_46_re)) - x_46_re);
} else {
tmp = (x_46_im / y_46_re) - (x_46_re / (y_46_re * (y_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 <= -34000000.0) or not (y_46_im <= 10200.0): tmp = (1.0 / y_46_im) * ((x_46_im / (y_46_im / y_46_re)) - x_46_re) else: tmp = (x_46_im / y_46_re) - (x_46_re / (y_46_re * (y_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 <= -34000000.0) || !(y_46_im <= 10200.0)) tmp = Float64(Float64(1.0 / y_46_im) * Float64(Float64(x_46_im / Float64(y_46_im / y_46_re)) - x_46_re)); else tmp = Float64(Float64(x_46_im / y_46_re) - Float64(x_46_re / Float64(y_46_re * Float64(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) tmp = 0.0; if ((y_46_im <= -34000000.0) || ~((y_46_im <= 10200.0))) tmp = (1.0 / y_46_im) * ((x_46_im / (y_46_im / y_46_re)) - x_46_re); else tmp = (x_46_im / y_46_re) - (x_46_re / (y_46_re * (y_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$im, -34000000.0], N[Not[LessEqual[y$46$im, 10200.0]], $MachinePrecision]], N[(N[(1.0 / y$46$im), $MachinePrecision] * N[(N[(x$46$im / N[(y$46$im / y$46$re), $MachinePrecision]), $MachinePrecision] - x$46$re), $MachinePrecision]), $MachinePrecision], N[(N[(x$46$im / y$46$re), $MachinePrecision] - N[(x$46$re / N[(y$46$re * N[(y$46$re / y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.im \leq -34000000 \lor \neg \left(y.im \leq 10200\right):\\
\;\;\;\;\frac{1}{y.im} \cdot \left(\frac{x.im}{\frac{y.im}{y.re}} - x.re\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x.im}{y.re} - \frac{x.re}{y.re \cdot \frac{y.re}{y.im}}\\
\end{array}
\end{array}
if y.im < -3.4e7 or 10200 < y.im Initial program 52.3%
*-un-lft-identity52.3%
add-sqr-sqrt52.3%
times-frac52.3%
hypot-def52.3%
hypot-def64.8%
Applied egg-rr64.8%
Taylor expanded in y.re around 0 46.3%
+-commutative46.3%
mul-1-neg46.3%
unsub-neg46.3%
associate-/l*47.9%
Simplified47.9%
Taylor expanded in y.re around 0 80.8%
if -3.4e7 < y.im < 10200Initial program 71.9%
Taylor expanded in y.re around inf 74.8%
*-commutative74.8%
pow274.8%
times-frac78.5%
Applied egg-rr78.5%
clear-num78.5%
frac-times79.3%
*-un-lft-identity79.3%
Applied egg-rr79.3%
Final simplification80.1%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (or (<= y.im -5500.0) (not (<= y.im 18000000000000.0))) (* (/ 1.0 y.im) (- (/ x.im (/ y.im y.re)) x.re)) (- (/ x.im y.re) (/ (/ 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 <= -5500.0) || !(y_46_im <= 18000000000000.0)) {
tmp = (1.0 / y_46_im) * ((x_46_im / (y_46_im / y_46_re)) - x_46_re);
} else {
tmp = (x_46_im / y_46_re) - ((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 <= (-5500.0d0)) .or. (.not. (y_46im <= 18000000000000.0d0))) then
tmp = (1.0d0 / y_46im) * ((x_46im / (y_46im / y_46re)) - x_46re)
else
tmp = (x_46im / y_46re) - ((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 <= -5500.0) || !(y_46_im <= 18000000000000.0)) {
tmp = (1.0 / y_46_im) * ((x_46_im / (y_46_im / y_46_re)) - x_46_re);
} else {
tmp = (x_46_im / y_46_re) - ((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 <= -5500.0) or not (y_46_im <= 18000000000000.0): tmp = (1.0 / y_46_im) * ((x_46_im / (y_46_im / y_46_re)) - x_46_re) else: tmp = (x_46_im / y_46_re) - ((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 <= -5500.0) || !(y_46_im <= 18000000000000.0)) tmp = Float64(Float64(1.0 / y_46_im) * Float64(Float64(x_46_im / Float64(y_46_im / y_46_re)) - x_46_re)); else tmp = Float64(Float64(x_46_im / y_46_re) - Float64(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 <= -5500.0) || ~((y_46_im <= 18000000000000.0))) tmp = (1.0 / y_46_im) * ((x_46_im / (y_46_im / y_46_re)) - x_46_re); else tmp = (x_46_im / y_46_re) - ((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, -5500.0], N[Not[LessEqual[y$46$im, 18000000000000.0]], $MachinePrecision]], N[(N[(1.0 / y$46$im), $MachinePrecision] * N[(N[(x$46$im / N[(y$46$im / y$46$re), $MachinePrecision]), $MachinePrecision] - x$46$re), $MachinePrecision]), $MachinePrecision], N[(N[(x$46$im / y$46$re), $MachinePrecision] - N[(N[(x$46$re / N[(y$46$re / y$46$im), $MachinePrecision]), $MachinePrecision] / y$46$re), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.im \leq -5500 \lor \neg \left(y.im \leq 18000000000000\right):\\
\;\;\;\;\frac{1}{y.im} \cdot \left(\frac{x.im}{\frac{y.im}{y.re}} - x.re\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x.im}{y.re} - \frac{\frac{x.re}{\frac{y.re}{y.im}}}{y.re}\\
\end{array}
\end{array}
if y.im < -5500 or 1.8e13 < y.im Initial program 52.3%
*-un-lft-identity52.3%
add-sqr-sqrt52.3%
times-frac52.3%
hypot-def52.3%
hypot-def64.8%
Applied egg-rr64.8%
Taylor expanded in y.re around 0 46.3%
+-commutative46.3%
mul-1-neg46.3%
unsub-neg46.3%
associate-/l*47.9%
Simplified47.9%
Taylor expanded in y.re around 0 80.8%
if -5500 < y.im < 1.8e13Initial program 71.9%
Taylor expanded in y.re around inf 74.8%
*-un-lft-identity74.8%
pow274.8%
times-frac80.9%
*-commutative80.9%
Applied egg-rr80.9%
associate-*l/80.9%
*-commutative80.9%
*-lft-identity80.9%
associate-/l*80.1%
Simplified80.1%
Final simplification80.5%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (or (<= y.im -9000000000.0) (not (<= y.im 1.5e+26))) (/ (- 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 <= -9000000000.0) || !(y_46_im <= 1.5e+26)) {
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 <= (-9000000000.0d0)) .or. (.not. (y_46im <= 1.5d+26))) 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 <= -9000000000.0) || !(y_46_im <= 1.5e+26)) {
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 <= -9000000000.0) or not (y_46_im <= 1.5e+26): 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 <= -9000000000.0) || !(y_46_im <= 1.5e+26)) 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 <= -9000000000.0) || ~((y_46_im <= 1.5e+26))) 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, -9000000000.0], N[Not[LessEqual[y$46$im, 1.5e+26]], $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 -9000000000 \lor \neg \left(y.im \leq 1.5 \cdot 10^{+26}\right):\\
\;\;\;\;\frac{-x.re}{y.im}\\
\mathbf{else}:\\
\;\;\;\;\frac{x.im}{y.re}\\
\end{array}
\end{array}
if y.im < -9e9 or 1.49999999999999999e26 < y.im Initial program 51.9%
Taylor expanded in y.re around 0 67.7%
associate-*r/67.7%
neg-mul-167.7%
Simplified67.7%
if -9e9 < y.im < 1.49999999999999999e26Initial program 72.1%
Taylor expanded in y.re around inf 66.6%
Final simplification67.1%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (or (<= y.im -2.2e+237) (not (<= y.im 9.2e+191))) (/ 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.2e+237) || !(y_46_im <= 9.2e+191)) {
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.2d+237)) .or. (.not. (y_46im <= 9.2d+191))) 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.2e+237) || !(y_46_im <= 9.2e+191)) {
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.2e+237) or not (y_46_im <= 9.2e+191): 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.2e+237) || !(y_46_im <= 9.2e+191)) tmp = 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.2e+237) || ~((y_46_im <= 9.2e+191))) 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.2e+237], N[Not[LessEqual[y$46$im, 9.2e+191]], $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.2 \cdot 10^{+237} \lor \neg \left(y.im \leq 9.2 \cdot 10^{+191}\right):\\
\;\;\;\;\frac{x.re}{y.im}\\
\mathbf{else}:\\
\;\;\;\;\frac{x.im}{y.re}\\
\end{array}
\end{array}
if y.im < -2.2e237 or 9.1999999999999997e191 < y.im Initial program 42.2%
*-un-lft-identity42.2%
add-sqr-sqrt42.2%
times-frac42.2%
hypot-def42.2%
hypot-def59.1%
Applied egg-rr59.1%
Taylor expanded in y.re around 0 64.9%
+-commutative64.9%
mul-1-neg64.9%
unsub-neg64.9%
associate-/l*69.4%
Simplified69.4%
Taylor expanded in y.im around -inf 43.2%
if -2.2e237 < y.im < 9.1999999999999997e191Initial program 65.9%
Taylor expanded in y.re around inf 47.5%
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 61.5%
*-un-lft-identity61.5%
add-sqr-sqrt61.5%
times-frac61.4%
hypot-def61.5%
hypot-def73.2%
Applied egg-rr73.2%
Taylor expanded in y.re around -inf 27.0%
neg-mul-127.0%
Simplified27.0%
Taylor expanded in y.im around -inf 10.7%
Final simplification10.7%
(FPCore (x.re x.im y.re y.im) :precision binary64 (/ x.im y.re))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return x_46_im / y_46_re;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
code = x_46im / y_46re
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return x_46_im / y_46_re;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): return x_46_im / y_46_re
function code(x_46_re, x_46_im, y_46_re, y_46_im) return Float64(x_46_im / y_46_re) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = x_46_im / y_46_re; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[(x$46$im / y$46$re), $MachinePrecision]
\begin{array}{l}
\\
\frac{x.im}{y.re}
\end{array}
Initial program 61.5%
Taylor expanded in y.re around inf 40.8%
Final simplification40.8%
herbie shell --seed 2023308
(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))))