
(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 16 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x.re x.im y.re y.im) :precision binary64 (/ (- (* x.im y.re) (* x.re y.im)) (+ (* y.re y.re) (* y.im y.im))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return ((x_46_im * y_46_re) - (x_46_re * y_46_im)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im));
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
code = ((x_46im * y_46re) - (x_46re * y_46im)) / ((y_46re * y_46re) + (y_46im * y_46im))
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return ((x_46_im * y_46_re) - (x_46_re * y_46_im)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im));
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): return ((x_46_im * y_46_re) - (x_46_re * y_46_im)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im))
function code(x_46_re, x_46_im, y_46_re, y_46_im) return Float64(Float64(Float64(x_46_im * y_46_re) - Float64(x_46_re * y_46_im)) / Float64(Float64(y_46_re * y_46_re) + Float64(y_46_im * y_46_im))) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = ((x_46_im * y_46_re) - (x_46_re * y_46_im)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im)); end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[(N[(N[(x$46$im * y$46$re), $MachinePrecision] - N[(x$46$re * y$46$im), $MachinePrecision]), $MachinePrecision] / N[(N[(y$46$re * y$46$re), $MachinePrecision] + N[(y$46$im * y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x.im \cdot y.re - x.re \cdot y.im}{y.re \cdot y.re + y.im \cdot y.im}
\end{array}
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* y.re (/ x.im (hypot y.re y.im))))
(t_1 (/ 1.0 (hypot y.re y.im))))
(if (<= y.im -4.5e+145)
(- (* t_1 (/ y.re (/ (hypot y.re y.im) x.im))) (/ x.re y.im))
(if (<= y.im 7.5e+28)
(* t_1 (- t_0 (/ (* y.im x.re) (hypot y.re y.im))))
(* t_1 (- t_0 x.re))))))
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 / hypot(y_46_re, y_46_im));
double t_1 = 1.0 / hypot(y_46_re, y_46_im);
double tmp;
if (y_46_im <= -4.5e+145) {
tmp = (t_1 * (y_46_re / (hypot(y_46_re, y_46_im) / x_46_im))) - (x_46_re / y_46_im);
} else if (y_46_im <= 7.5e+28) {
tmp = t_1 * (t_0 - ((y_46_im * x_46_re) / hypot(y_46_re, y_46_im)));
} else {
tmp = t_1 * (t_0 - 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 = y_46_re * (x_46_im / Math.hypot(y_46_re, y_46_im));
double t_1 = 1.0 / Math.hypot(y_46_re, y_46_im);
double tmp;
if (y_46_im <= -4.5e+145) {
tmp = (t_1 * (y_46_re / (Math.hypot(y_46_re, y_46_im) / x_46_im))) - (x_46_re / y_46_im);
} else if (y_46_im <= 7.5e+28) {
tmp = t_1 * (t_0 - ((y_46_im * x_46_re) / Math.hypot(y_46_re, y_46_im)));
} else {
tmp = t_1 * (t_0 - x_46_re);
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = y_46_re * (x_46_im / math.hypot(y_46_re, y_46_im)) t_1 = 1.0 / math.hypot(y_46_re, y_46_im) tmp = 0 if y_46_im <= -4.5e+145: tmp = (t_1 * (y_46_re / (math.hypot(y_46_re, y_46_im) / x_46_im))) - (x_46_re / y_46_im) elif y_46_im <= 7.5e+28: tmp = t_1 * (t_0 - ((y_46_im * x_46_re) / math.hypot(y_46_re, y_46_im))) else: tmp = t_1 * (t_0 - x_46_re) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re * Float64(x_46_im / hypot(y_46_re, y_46_im))) t_1 = Float64(1.0 / hypot(y_46_re, y_46_im)) tmp = 0.0 if (y_46_im <= -4.5e+145) tmp = Float64(Float64(t_1 * Float64(y_46_re / Float64(hypot(y_46_re, y_46_im) / x_46_im))) - Float64(x_46_re / y_46_im)); elseif (y_46_im <= 7.5e+28) tmp = Float64(t_1 * Float64(t_0 - Float64(Float64(y_46_im * x_46_re) / hypot(y_46_re, y_46_im)))); else tmp = Float64(t_1 * Float64(t_0 - 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 = y_46_re * (x_46_im / hypot(y_46_re, y_46_im)); t_1 = 1.0 / hypot(y_46_re, y_46_im); tmp = 0.0; if (y_46_im <= -4.5e+145) tmp = (t_1 * (y_46_re / (hypot(y_46_re, y_46_im) / x_46_im))) - (x_46_re / y_46_im); elseif (y_46_im <= 7.5e+28) tmp = t_1 * (t_0 - ((y_46_im * x_46_re) / hypot(y_46_re, y_46_im))); else tmp = t_1 * (t_0 - 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[(y$46$re * N[(x$46$im / N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(1.0 / N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -4.5e+145], N[(N[(t$95$1 * N[(y$46$re / N[(N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision] / x$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x$46$re / y$46$im), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 7.5e+28], N[(t$95$1 * N[(t$95$0 - N[(N[(y$46$im * x$46$re), $MachinePrecision] / N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[(t$95$0 - x$46$re), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \frac{x.im}{\mathsf{hypot}\left(y.re, y.im\right)}\\
t_1 := \frac{1}{\mathsf{hypot}\left(y.re, y.im\right)}\\
\mathbf{if}\;y.im \leq -4.5 \cdot 10^{+145}:\\
\;\;\;\;t_1 \cdot \frac{y.re}{\frac{\mathsf{hypot}\left(y.re, y.im\right)}{x.im}} - \frac{x.re}{y.im}\\
\mathbf{elif}\;y.im \leq 7.5 \cdot 10^{+28}:\\
\;\;\;\;t_1 \cdot \left(t_0 - \frac{y.im \cdot x.re}{\mathsf{hypot}\left(y.re, y.im\right)}\right)\\
\mathbf{else}:\\
\;\;\;\;t_1 \cdot \left(t_0 - x.re\right)\\
\end{array}
\end{array}
if y.im < -4.4999999999999998e145Initial program 34.4%
div-sub34.4%
sub-neg34.4%
*-un-lft-identity34.4%
add-sqr-sqrt34.4%
times-frac34.4%
fma-def34.4%
hypot-def34.4%
hypot-def54.2%
associate-/l*58.3%
add-sqr-sqrt58.3%
pow258.3%
hypot-def58.3%
Applied egg-rr58.3%
fma-neg58.3%
*-commutative58.3%
associate-/l*56.3%
associate-/r/56.3%
*-commutative56.3%
Simplified56.3%
Taylor expanded in y.im around inf 94.9%
if -4.4999999999999998e145 < y.im < 7.4999999999999998e28Initial program 76.4%
*-un-lft-identity76.4%
add-sqr-sqrt76.4%
times-frac76.4%
hypot-def76.4%
hypot-def84.4%
Applied egg-rr84.4%
div-sub84.5%
sub-neg84.5%
Applied egg-rr84.5%
sub-neg84.5%
*-commutative84.5%
associate-*r/95.1%
Simplified95.1%
if 7.4999999999999998e28 < y.im Initial program 46.5%
*-un-lft-identity46.5%
add-sqr-sqrt46.5%
times-frac46.4%
hypot-def46.4%
hypot-def68.0%
Applied egg-rr68.0%
div-sub68.0%
sub-neg68.0%
Applied egg-rr68.0%
sub-neg68.0%
*-commutative68.0%
associate-*r/73.0%
Simplified73.0%
Taylor expanded in y.im around inf 96.4%
Final simplification95.4%
(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 (/ x.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 / 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 * (x_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 / 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 * (x_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 / 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 * (x_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(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(x_46_im / 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 / 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 * (x_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[(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[(x$46$im / N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision]), $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(y.re \cdot \frac{x.im}{\mathsf{hypot}\left(y.re, y.im\right)} - 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 77.7%
*-un-lft-identity77.7%
add-sqr-sqrt77.7%
times-frac77.7%
hypot-def77.7%
hypot-def94.7%
Applied egg-rr94.7%
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.6%
Applied egg-rr2.6%
div-sub2.6%
sub-neg2.6%
Applied egg-rr2.6%
sub-neg2.6%
*-commutative2.6%
associate-*r/44.7%
Simplified44.7%
Taylor expanded in y.im around inf 70.6%
Final simplification90.5%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (<=
(/ (- (* y.re x.im) (* y.im x.re)) (+ (* y.re y.re) (* y.im y.im)))
INFINITY)
(/
(/ (- (* y.im x.re) (* y.re x.im)) (hypot y.re y.im))
(- (hypot y.re y.im)))
(* (/ 1.0 (hypot y.re y.im)) (- (* y.re (/ x.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 tmp;
if ((((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) INFINITY)) {
tmp = (((y_46_im * x_46_re) - (y_46_re * x_46_im)) / hypot(y_46_re, y_46_im)) / -hypot(y_46_re, y_46_im);
} else {
tmp = (1.0 / hypot(y_46_re, y_46_im)) * ((y_46_re * (x_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 tmp;
if ((((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.POSITIVE_INFINITY) {
tmp = (((y_46_im * x_46_re) - (y_46_re * x_46_im)) / Math.hypot(y_46_re, y_46_im)) / -Math.hypot(y_46_re, y_46_im);
} else {
tmp = (1.0 / Math.hypot(y_46_re, y_46_im)) * ((y_46_re * (x_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): tmp = 0 if (((y_46_re * x_46_im) - (y_46_im * x_46_re)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im))) <= math.inf: tmp = (((y_46_im * x_46_re) - (y_46_re * x_46_im)) / math.hypot(y_46_re, y_46_im)) / -math.hypot(y_46_re, y_46_im) else: tmp = (1.0 / math.hypot(y_46_re, y_46_im)) * ((y_46_re * (x_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) tmp = 0.0 if (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))) <= Inf) tmp = Float64(Float64(Float64(Float64(y_46_im * x_46_re) - Float64(y_46_re * x_46_im)) / hypot(y_46_re, y_46_im)) / Float64(-hypot(y_46_re, y_46_im))); else tmp = Float64(Float64(1.0 / hypot(y_46_re, y_46_im)) * Float64(Float64(y_46_re * Float64(x_46_im / 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) tmp = 0.0; if ((((y_46_re * x_46_im) - (y_46_im * x_46_re)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im))) <= Inf) tmp = (((y_46_im * x_46_re) - (y_46_re * x_46_im)) / hypot(y_46_re, y_46_im)) / -hypot(y_46_re, y_46_im); else tmp = (1.0 / hypot(y_46_re, y_46_im)) * ((y_46_re * (x_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_] := If[LessEqual[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], Infinity], N[(N[(N[(N[(y$46$im * x$46$re), $MachinePrecision] - N[(y$46$re * x$46$im), $MachinePrecision]), $MachinePrecision] / N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision]), $MachinePrecision] / (-N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision])), $MachinePrecision], N[(N[(1.0 / N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision]), $MachinePrecision] * 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]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{y.re \cdot x.im - y.im \cdot x.re}{y.re \cdot y.re + y.im \cdot y.im} \leq \infty:\\
\;\;\;\;\frac{\frac{y.im \cdot x.re - y.re \cdot x.im}{\mathsf{hypot}\left(y.re, y.im\right)}}{-\mathsf{hypot}\left(y.re, y.im\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\mathsf{hypot}\left(y.re, y.im\right)} \cdot \left(y.re \cdot \frac{x.im}{\mathsf{hypot}\left(y.re, y.im\right)} - 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 77.7%
*-un-lft-identity77.7%
add-sqr-sqrt77.7%
times-frac77.7%
hypot-def77.7%
hypot-def94.7%
Applied egg-rr94.7%
associate-*l/94.8%
*-un-lft-identity94.8%
frac-2neg94.8%
fma-neg94.8%
distribute-rgt-neg-in94.8%
Applied egg-rr94.8%
distribute-neg-frac94.8%
fma-def94.8%
+-commutative94.8%
distribute-neg-in94.8%
distribute-rgt-neg-out94.8%
remove-double-neg94.8%
distribute-rgt-neg-in94.8%
Simplified94.8%
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.6%
Applied egg-rr2.6%
div-sub2.6%
sub-neg2.6%
Applied egg-rr2.6%
sub-neg2.6%
*-commutative2.6%
associate-*r/44.7%
Simplified44.7%
Taylor expanded in y.im around inf 70.6%
Final simplification90.7%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* (- (* y.re x.im) (* y.im x.re)) (pow (hypot y.re y.im) -2.0)))
(t_1 (* (/ 1.0 y.im) (- (* y.re (/ x.im y.im)) x.re))))
(if (<= y.im -3.4e+143)
t_1
(if (<= y.im -4.3e-76)
t_0
(if (<= y.im 7.7e-106)
(* (/ 1.0 y.re) (- x.im (/ (* y.im x.re) y.re)))
(if (<= y.im 7.5e+28) 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 = ((y_46_re * x_46_im) - (y_46_im * x_46_re)) * pow(hypot(y_46_re, y_46_im), -2.0);
double t_1 = (1.0 / y_46_im) * ((y_46_re * (x_46_im / y_46_im)) - x_46_re);
double tmp;
if (y_46_im <= -3.4e+143) {
tmp = t_1;
} else if (y_46_im <= -4.3e-76) {
tmp = t_0;
} else if (y_46_im <= 7.7e-106) {
tmp = (1.0 / y_46_re) * (x_46_im - ((y_46_im * x_46_re) / y_46_re));
} else if (y_46_im <= 7.5e+28) {
tmp = t_0;
} else {
tmp = t_1;
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = ((y_46_re * x_46_im) - (y_46_im * x_46_re)) * Math.pow(Math.hypot(y_46_re, y_46_im), -2.0);
double t_1 = (1.0 / y_46_im) * ((y_46_re * (x_46_im / y_46_im)) - x_46_re);
double tmp;
if (y_46_im <= -3.4e+143) {
tmp = t_1;
} else if (y_46_im <= -4.3e-76) {
tmp = t_0;
} else if (y_46_im <= 7.7e-106) {
tmp = (1.0 / y_46_re) * (x_46_im - ((y_46_im * x_46_re) / y_46_re));
} else if (y_46_im <= 7.5e+28) {
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 = ((y_46_re * x_46_im) - (y_46_im * x_46_re)) * math.pow(math.hypot(y_46_re, y_46_im), -2.0) t_1 = (1.0 / y_46_im) * ((y_46_re * (x_46_im / y_46_im)) - x_46_re) tmp = 0 if y_46_im <= -3.4e+143: tmp = t_1 elif y_46_im <= -4.3e-76: tmp = t_0 elif y_46_im <= 7.7e-106: tmp = (1.0 / y_46_re) * (x_46_im - ((y_46_im * x_46_re) / y_46_re)) elif y_46_im <= 7.5e+28: 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(Float64(y_46_re * x_46_im) - Float64(y_46_im * x_46_re)) * (hypot(y_46_re, y_46_im) ^ -2.0)) t_1 = Float64(Float64(1.0 / y_46_im) * Float64(Float64(y_46_re * Float64(x_46_im / y_46_im)) - x_46_re)) tmp = 0.0 if (y_46_im <= -3.4e+143) tmp = t_1; elseif (y_46_im <= -4.3e-76) tmp = t_0; elseif (y_46_im <= 7.7e-106) tmp = Float64(Float64(1.0 / y_46_re) * Float64(x_46_im - Float64(Float64(y_46_im * x_46_re) / y_46_re))); elseif (y_46_im <= 7.5e+28) 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 = ((y_46_re * x_46_im) - (y_46_im * x_46_re)) * (hypot(y_46_re, y_46_im) ^ -2.0); t_1 = (1.0 / y_46_im) * ((y_46_re * (x_46_im / y_46_im)) - x_46_re); tmp = 0.0; if (y_46_im <= -3.4e+143) tmp = t_1; elseif (y_46_im <= -4.3e-76) tmp = t_0; elseif (y_46_im <= 7.7e-106) tmp = (1.0 / y_46_re) * (x_46_im - ((y_46_im * x_46_re) / y_46_re)); elseif (y_46_im <= 7.5e+28) 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[(N[(y$46$re * x$46$im), $MachinePrecision] - N[(y$46$im * x$46$re), $MachinePrecision]), $MachinePrecision] * N[Power[N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(1.0 / y$46$im), $MachinePrecision] * N[(N[(y$46$re * N[(x$46$im / y$46$im), $MachinePrecision]), $MachinePrecision] - x$46$re), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -3.4e+143], t$95$1, If[LessEqual[y$46$im, -4.3e-76], t$95$0, If[LessEqual[y$46$im, 7.7e-106], N[(N[(1.0 / y$46$re), $MachinePrecision] * N[(x$46$im - N[(N[(y$46$im * x$46$re), $MachinePrecision] / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 7.5e+28], t$95$0, t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(y.re \cdot x.im - y.im \cdot x.re\right) \cdot {\left(\mathsf{hypot}\left(y.re, y.im\right)\right)}^{-2}\\
t_1 := \frac{1}{y.im} \cdot \left(y.re \cdot \frac{x.im}{y.im} - x.re\right)\\
\mathbf{if}\;y.im \leq -3.4 \cdot 10^{+143}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y.im \leq -4.3 \cdot 10^{-76}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y.im \leq 7.7 \cdot 10^{-106}:\\
\;\;\;\;\frac{1}{y.re} \cdot \left(x.im - \frac{y.im \cdot x.re}{y.re}\right)\\
\mathbf{elif}\;y.im \leq 7.5 \cdot 10^{+28}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y.im < -3.39999999999999982e143 or 7.4999999999999998e28 < y.im Initial program 44.0%
*-un-lft-identity44.0%
add-sqr-sqrt44.0%
times-frac44.0%
hypot-def44.0%
hypot-def69.5%
Applied egg-rr69.5%
Taylor expanded in y.re around 0 66.7%
neg-mul-166.7%
+-commutative66.7%
unsub-neg66.7%
associate-/l*67.8%
Simplified67.8%
Taylor expanded in y.re around 0 90.5%
associate-/r/92.6%
Applied egg-rr92.6%
if -3.39999999999999982e143 < y.im < -4.2999999999999999e-76 or 7.6999999999999996e-106 < y.im < 7.4999999999999998e28Initial program 83.1%
*-un-lft-identity83.1%
add-sqr-sqrt83.1%
times-frac82.9%
hypot-def82.9%
hypot-def88.0%
Applied egg-rr88.0%
frac-times83.1%
*-un-lft-identity83.1%
*-commutative83.1%
unpow283.1%
expm1-log1p-u66.5%
expm1-udef37.8%
div-inv37.8%
*-commutative37.8%
fma-neg37.8%
distribute-rgt-neg-in37.8%
pow-flip37.8%
metadata-eval37.8%
Applied egg-rr37.8%
expm1-def66.5%
expm1-log1p83.2%
fma-def83.2%
distribute-rgt-neg-out83.2%
unsub-neg83.2%
*-commutative83.2%
Simplified83.2%
if -4.2999999999999999e-76 < y.im < 7.6999999999999996e-106Initial program 70.0%
*-un-lft-identity70.0%
add-sqr-sqrt70.0%
times-frac70.1%
hypot-def70.1%
hypot-def80.9%
Applied egg-rr80.9%
Taylor expanded in y.re around inf 51.7%
associate-*r/51.7%
mul-1-neg51.7%
distribute-rgt-neg-out51.7%
Simplified51.7%
Taylor expanded in y.re around inf 88.4%
Final simplification88.4%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (<= y.im -3.4e+143)
(* (/ 1.0 y.im) (- (* y.re (/ x.im y.im)) x.re))
(if (<= y.im -3.9e-76)
(* (- (* y.re x.im) (* y.im x.re)) (pow (hypot y.re y.im) -2.0))
(if (<= y.im 5.8e-96)
(* (/ 1.0 y.re) (- x.im (/ (* y.im x.re) y.re)))
(*
(/ 1.0 (hypot y.re y.im))
(- (* y.re (/ x.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 tmp;
if (y_46_im <= -3.4e+143) {
tmp = (1.0 / y_46_im) * ((y_46_re * (x_46_im / y_46_im)) - x_46_re);
} else if (y_46_im <= -3.9e-76) {
tmp = ((y_46_re * x_46_im) - (y_46_im * x_46_re)) * pow(hypot(y_46_re, y_46_im), -2.0);
} else if (y_46_im <= 5.8e-96) {
tmp = (1.0 / y_46_re) * (x_46_im - ((y_46_im * x_46_re) / y_46_re));
} else {
tmp = (1.0 / hypot(y_46_re, y_46_im)) * ((y_46_re * (x_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 tmp;
if (y_46_im <= -3.4e+143) {
tmp = (1.0 / y_46_im) * ((y_46_re * (x_46_im / y_46_im)) - x_46_re);
} else if (y_46_im <= -3.9e-76) {
tmp = ((y_46_re * x_46_im) - (y_46_im * x_46_re)) * Math.pow(Math.hypot(y_46_re, y_46_im), -2.0);
} else if (y_46_im <= 5.8e-96) {
tmp = (1.0 / y_46_re) * (x_46_im - ((y_46_im * x_46_re) / y_46_re));
} else {
tmp = (1.0 / Math.hypot(y_46_re, y_46_im)) * ((y_46_re * (x_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): tmp = 0 if y_46_im <= -3.4e+143: tmp = (1.0 / y_46_im) * ((y_46_re * (x_46_im / y_46_im)) - x_46_re) elif y_46_im <= -3.9e-76: tmp = ((y_46_re * x_46_im) - (y_46_im * x_46_re)) * math.pow(math.hypot(y_46_re, y_46_im), -2.0) elif y_46_im <= 5.8e-96: tmp = (1.0 / y_46_re) * (x_46_im - ((y_46_im * x_46_re) / y_46_re)) else: tmp = (1.0 / math.hypot(y_46_re, y_46_im)) * ((y_46_re * (x_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) tmp = 0.0 if (y_46_im <= -3.4e+143) tmp = Float64(Float64(1.0 / y_46_im) * Float64(Float64(y_46_re * Float64(x_46_im / y_46_im)) - x_46_re)); elseif (y_46_im <= -3.9e-76) tmp = Float64(Float64(Float64(y_46_re * x_46_im) - Float64(y_46_im * x_46_re)) * (hypot(y_46_re, y_46_im) ^ -2.0)); elseif (y_46_im <= 5.8e-96) tmp = Float64(Float64(1.0 / y_46_re) * Float64(x_46_im - Float64(Float64(y_46_im * x_46_re) / y_46_re))); else tmp = Float64(Float64(1.0 / hypot(y_46_re, y_46_im)) * Float64(Float64(y_46_re * Float64(x_46_im / 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) tmp = 0.0; if (y_46_im <= -3.4e+143) tmp = (1.0 / y_46_im) * ((y_46_re * (x_46_im / y_46_im)) - x_46_re); elseif (y_46_im <= -3.9e-76) tmp = ((y_46_re * x_46_im) - (y_46_im * x_46_re)) * (hypot(y_46_re, y_46_im) ^ -2.0); elseif (y_46_im <= 5.8e-96) tmp = (1.0 / y_46_re) * (x_46_im - ((y_46_im * x_46_re) / y_46_re)); else tmp = (1.0 / hypot(y_46_re, y_46_im)) * ((y_46_re * (x_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_] := If[LessEqual[y$46$im, -3.4e+143], N[(N[(1.0 / y$46$im), $MachinePrecision] * N[(N[(y$46$re * N[(x$46$im / y$46$im), $MachinePrecision]), $MachinePrecision] - x$46$re), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, -3.9e-76], N[(N[(N[(y$46$re * x$46$im), $MachinePrecision] - N[(y$46$im * x$46$re), $MachinePrecision]), $MachinePrecision] * N[Power[N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 5.8e-96], N[(N[(1.0 / y$46$re), $MachinePrecision] * N[(x$46$im - N[(N[(y$46$im * x$46$re), $MachinePrecision] / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision]), $MachinePrecision] * 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]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.im \leq -3.4 \cdot 10^{+143}:\\
\;\;\;\;\frac{1}{y.im} \cdot \left(y.re \cdot \frac{x.im}{y.im} - x.re\right)\\
\mathbf{elif}\;y.im \leq -3.9 \cdot 10^{-76}:\\
\;\;\;\;\left(y.re \cdot x.im - y.im \cdot x.re\right) \cdot {\left(\mathsf{hypot}\left(y.re, y.im\right)\right)}^{-2}\\
\mathbf{elif}\;y.im \leq 5.8 \cdot 10^{-96}:\\
\;\;\;\;\frac{1}{y.re} \cdot \left(x.im - \frac{y.im \cdot x.re}{y.re}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\mathsf{hypot}\left(y.re, y.im\right)} \cdot \left(y.re \cdot \frac{x.im}{\mathsf{hypot}\left(y.re, y.im\right)} - x.re\right)\\
\end{array}
\end{array}
if y.im < -3.39999999999999982e143Initial program 39.9%
*-un-lft-identity39.9%
add-sqr-sqrt39.9%
times-frac40.0%
hypot-def40.0%
hypot-def72.0%
Applied egg-rr72.0%
Taylor expanded in y.re around 0 31.2%
neg-mul-131.2%
+-commutative31.2%
unsub-neg31.2%
associate-/l*31.2%
Simplified31.2%
Taylor expanded in y.re around 0 91.8%
associate-/r/94.5%
Applied egg-rr94.5%
if -3.39999999999999982e143 < y.im < -3.90000000000000025e-76Initial program 82.5%
*-un-lft-identity82.5%
add-sqr-sqrt82.6%
times-frac82.3%
hypot-def82.4%
hypot-def89.8%
Applied egg-rr89.8%
frac-times82.6%
*-un-lft-identity82.6%
*-commutative82.6%
unpow282.6%
expm1-log1p-u70.7%
expm1-udef39.1%
div-inv39.1%
*-commutative39.1%
fma-neg39.1%
distribute-rgt-neg-in39.1%
pow-flip39.1%
metadata-eval39.1%
Applied egg-rr39.1%
expm1-def70.6%
expm1-log1p82.6%
fma-def82.6%
distribute-rgt-neg-out82.6%
unsub-neg82.6%
*-commutative82.6%
Simplified82.6%
if -3.90000000000000025e-76 < y.im < 5.79999999999999987e-96Initial program 70.3%
*-un-lft-identity70.3%
add-sqr-sqrt70.3%
times-frac70.4%
hypot-def70.4%
hypot-def81.1%
Applied egg-rr81.1%
Taylor expanded in y.re around inf 51.2%
associate-*r/51.2%
mul-1-neg51.2%
distribute-rgt-neg-out51.2%
Simplified51.2%
Taylor expanded in y.re around inf 88.5%
if 5.79999999999999987e-96 < y.im Initial program 57.3%
*-un-lft-identity57.3%
add-sqr-sqrt57.3%
times-frac57.3%
hypot-def57.3%
hypot-def72.6%
Applied egg-rr72.6%
div-sub72.6%
sub-neg72.6%
Applied egg-rr72.6%
sub-neg72.6%
*-commutative72.6%
associate-*r/78.5%
Simplified78.5%
Taylor expanded in y.im around inf 91.7%
Final simplification89.2%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0
(/ (- (* y.re x.im) (* y.im x.re)) (+ (* y.re y.re) (* y.im y.im))))
(t_1 (* (/ 1.0 y.im) (- (* y.re (/ x.im y.im)) x.re))))
(if (<= y.im -3.4e+143)
t_1
(if (<= y.im -4.3e-78)
t_0
(if (<= y.im 2.5e-106)
(* (/ 1.0 y.re) (- x.im (/ (* y.im x.re) y.re)))
(if (<= y.im 7.5e+28) 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 = ((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 t_1 = (1.0 / y_46_im) * ((y_46_re * (x_46_im / y_46_im)) - x_46_re);
double tmp;
if (y_46_im <= -3.4e+143) {
tmp = t_1;
} else if (y_46_im <= -4.3e-78) {
tmp = t_0;
} else if (y_46_im <= 2.5e-106) {
tmp = (1.0 / y_46_re) * (x_46_im - ((y_46_im * x_46_re) / y_46_re));
} else if (y_46_im <= 7.5e+28) {
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 = ((y_46re * x_46im) - (y_46im * x_46re)) / ((y_46re * y_46re) + (y_46im * y_46im))
t_1 = (1.0d0 / y_46im) * ((y_46re * (x_46im / y_46im)) - x_46re)
if (y_46im <= (-3.4d+143)) then
tmp = t_1
else if (y_46im <= (-4.3d-78)) then
tmp = t_0
else if (y_46im <= 2.5d-106) then
tmp = (1.0d0 / y_46re) * (x_46im - ((y_46im * x_46re) / y_46re))
else if (y_46im <= 7.5d+28) 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 = ((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 t_1 = (1.0 / y_46_im) * ((y_46_re * (x_46_im / y_46_im)) - x_46_re);
double tmp;
if (y_46_im <= -3.4e+143) {
tmp = t_1;
} else if (y_46_im <= -4.3e-78) {
tmp = t_0;
} else if (y_46_im <= 2.5e-106) {
tmp = (1.0 / y_46_re) * (x_46_im - ((y_46_im * x_46_re) / y_46_re));
} else if (y_46_im <= 7.5e+28) {
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 = ((y_46_re * x_46_im) - (y_46_im * x_46_re)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im)) t_1 = (1.0 / y_46_im) * ((y_46_re * (x_46_im / y_46_im)) - x_46_re) tmp = 0 if y_46_im <= -3.4e+143: tmp = t_1 elif y_46_im <= -4.3e-78: tmp = t_0 elif y_46_im <= 2.5e-106: tmp = (1.0 / y_46_re) * (x_46_im - ((y_46_im * x_46_re) / y_46_re)) elif y_46_im <= 7.5e+28: 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(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))) t_1 = Float64(Float64(1.0 / y_46_im) * Float64(Float64(y_46_re * Float64(x_46_im / y_46_im)) - x_46_re)) tmp = 0.0 if (y_46_im <= -3.4e+143) tmp = t_1; elseif (y_46_im <= -4.3e-78) tmp = t_0; elseif (y_46_im <= 2.5e-106) tmp = Float64(Float64(1.0 / y_46_re) * Float64(x_46_im - Float64(Float64(y_46_im * x_46_re) / y_46_re))); elseif (y_46_im <= 7.5e+28) 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 = ((y_46_re * x_46_im) - (y_46_im * x_46_re)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im)); t_1 = (1.0 / y_46_im) * ((y_46_re * (x_46_im / y_46_im)) - x_46_re); tmp = 0.0; if (y_46_im <= -3.4e+143) tmp = t_1; elseif (y_46_im <= -4.3e-78) tmp = t_0; elseif (y_46_im <= 2.5e-106) tmp = (1.0 / y_46_re) * (x_46_im - ((y_46_im * x_46_re) / y_46_re)); elseif (y_46_im <= 7.5e+28) 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[(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]}, Block[{t$95$1 = N[(N[(1.0 / y$46$im), $MachinePrecision] * N[(N[(y$46$re * N[(x$46$im / y$46$im), $MachinePrecision]), $MachinePrecision] - x$46$re), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -3.4e+143], t$95$1, If[LessEqual[y$46$im, -4.3e-78], t$95$0, If[LessEqual[y$46$im, 2.5e-106], N[(N[(1.0 / y$46$re), $MachinePrecision] * N[(x$46$im - N[(N[(y$46$im * x$46$re), $MachinePrecision] / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 7.5e+28], t$95$0, t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{y.re \cdot x.im - y.im \cdot x.re}{y.re \cdot y.re + y.im \cdot y.im}\\
t_1 := \frac{1}{y.im} \cdot \left(y.re \cdot \frac{x.im}{y.im} - x.re\right)\\
\mathbf{if}\;y.im \leq -3.4 \cdot 10^{+143}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y.im \leq -4.3 \cdot 10^{-78}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y.im \leq 2.5 \cdot 10^{-106}:\\
\;\;\;\;\frac{1}{y.re} \cdot \left(x.im - \frac{y.im \cdot x.re}{y.re}\right)\\
\mathbf{elif}\;y.im \leq 7.5 \cdot 10^{+28}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y.im < -3.39999999999999982e143 or 7.4999999999999998e28 < y.im Initial program 44.0%
*-un-lft-identity44.0%
add-sqr-sqrt44.0%
times-frac44.0%
hypot-def44.0%
hypot-def69.5%
Applied egg-rr69.5%
Taylor expanded in y.re around 0 66.7%
neg-mul-166.7%
+-commutative66.7%
unsub-neg66.7%
associate-/l*67.8%
Simplified67.8%
Taylor expanded in y.re around 0 90.5%
associate-/r/92.6%
Applied egg-rr92.6%
if -3.39999999999999982e143 < y.im < -4.29999999999999994e-78 or 2.49999999999999991e-106 < y.im < 7.4999999999999998e28Initial program 83.1%
if -4.29999999999999994e-78 < y.im < 2.49999999999999991e-106Initial program 70.0%
*-un-lft-identity70.0%
add-sqr-sqrt70.0%
times-frac70.1%
hypot-def70.1%
hypot-def80.9%
Applied egg-rr80.9%
Taylor expanded in y.re around inf 51.7%
associate-*r/51.7%
mul-1-neg51.7%
distribute-rgt-neg-out51.7%
Simplified51.7%
Taylor expanded in y.re around inf 88.4%
Final simplification88.4%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (<= y.im -1.8e-69)
(* (/ 1.0 y.im) (- (* y.re (/ x.im y.im)) x.re))
(if (<= y.im 1.55e-72)
(- (/ x.im y.re) (* y.im (/ x.re (* y.re y.re))))
(/ (- (* x.im (/ y.re y.im)) x.re) y.im))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_im <= -1.8e-69) {
tmp = (1.0 / y_46_im) * ((y_46_re * (x_46_im / y_46_im)) - x_46_re);
} else if (y_46_im <= 1.55e-72) {
tmp = (x_46_im / y_46_re) - (y_46_im * (x_46_re / (y_46_re * y_46_re)));
} else {
tmp = ((x_46_im * (y_46_re / y_46_im)) - x_46_re) / y_46_im;
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: tmp
if (y_46im <= (-1.8d-69)) then
tmp = (1.0d0 / y_46im) * ((y_46re * (x_46im / y_46im)) - x_46re)
else if (y_46im <= 1.55d-72) then
tmp = (x_46im / y_46re) - (y_46im * (x_46re / (y_46re * y_46re)))
else
tmp = ((x_46im * (y_46re / y_46im)) - x_46re) / y_46im
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_im <= -1.8e-69) {
tmp = (1.0 / y_46_im) * ((y_46_re * (x_46_im / y_46_im)) - x_46_re);
} else if (y_46_im <= 1.55e-72) {
tmp = (x_46_im / y_46_re) - (y_46_im * (x_46_re / (y_46_re * y_46_re)));
} else {
tmp = ((x_46_im * (y_46_re / y_46_im)) - x_46_re) / y_46_im;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if y_46_im <= -1.8e-69: tmp = (1.0 / y_46_im) * ((y_46_re * (x_46_im / y_46_im)) - x_46_re) elif y_46_im <= 1.55e-72: tmp = (x_46_im / y_46_re) - (y_46_im * (x_46_re / (y_46_re * y_46_re))) else: tmp = ((x_46_im * (y_46_re / y_46_im)) - x_46_re) / y_46_im return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if (y_46_im <= -1.8e-69) tmp = Float64(Float64(1.0 / y_46_im) * Float64(Float64(y_46_re * Float64(x_46_im / y_46_im)) - x_46_re)); elseif (y_46_im <= 1.55e-72) tmp = Float64(Float64(x_46_im / y_46_re) - Float64(y_46_im * Float64(x_46_re / Float64(y_46_re * y_46_re)))); else tmp = Float64(Float64(Float64(x_46_im * Float64(y_46_re / y_46_im)) - x_46_re) / y_46_im); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if (y_46_im <= -1.8e-69) tmp = (1.0 / y_46_im) * ((y_46_re * (x_46_im / y_46_im)) - x_46_re); elseif (y_46_im <= 1.55e-72) tmp = (x_46_im / y_46_re) - (y_46_im * (x_46_re / (y_46_re * y_46_re))); else tmp = ((x_46_im * (y_46_re / y_46_im)) - x_46_re) / y_46_im; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[y$46$im, -1.8e-69], N[(N[(1.0 / y$46$im), $MachinePrecision] * N[(N[(y$46$re * N[(x$46$im / y$46$im), $MachinePrecision]), $MachinePrecision] - x$46$re), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 1.55e-72], N[(N[(x$46$im / y$46$re), $MachinePrecision] - N[(y$46$im * N[(x$46$re / N[(y$46$re * y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x$46$im * N[(y$46$re / y$46$im), $MachinePrecision]), $MachinePrecision] - x$46$re), $MachinePrecision] / y$46$im), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.im \leq -1.8 \cdot 10^{-69}:\\
\;\;\;\;\frac{1}{y.im} \cdot \left(y.re \cdot \frac{x.im}{y.im} - x.re\right)\\
\mathbf{elif}\;y.im \leq 1.55 \cdot 10^{-72}:\\
\;\;\;\;\frac{x.im}{y.re} - y.im \cdot \frac{x.re}{y.re \cdot y.re}\\
\mathbf{else}:\\
\;\;\;\;\frac{x.im \cdot \frac{y.re}{y.im} - x.re}{y.im}\\
\end{array}
\end{array}
if y.im < -1.80000000000000009e-69Initial program 63.7%
*-un-lft-identity63.7%
add-sqr-sqrt63.7%
times-frac63.7%
hypot-def63.7%
hypot-def81.9%
Applied egg-rr81.9%
Taylor expanded in y.re around 0 20.5%
neg-mul-120.5%
+-commutative20.5%
unsub-neg20.5%
associate-/l*20.5%
Simplified20.5%
Taylor expanded in y.re around 0 75.5%
associate-/r/76.6%
Applied egg-rr76.6%
if -1.80000000000000009e-69 < y.im < 1.5499999999999999e-72Initial program 71.7%
Taylor expanded in y.re around inf 78.9%
+-commutative78.9%
mul-1-neg78.9%
unsub-neg78.9%
associate-/l*77.2%
associate-/r/75.2%
Simplified75.2%
unpow275.2%
Applied egg-rr75.2%
if 1.5499999999999999e-72 < y.im Initial program 55.8%
*-un-lft-identity55.8%
add-sqr-sqrt55.8%
times-frac55.7%
hypot-def55.7%
hypot-def72.0%
Applied egg-rr72.0%
Taylor expanded in y.re around 0 82.4%
neg-mul-182.4%
+-commutative82.4%
unsub-neg82.4%
associate-/l*83.8%
Simplified83.8%
Taylor expanded in y.re around 0 83.6%
expm1-log1p-u69.3%
expm1-udef28.2%
associate-*l/28.2%
*-un-lft-identity28.2%
div-inv28.2%
clear-num28.2%
Applied egg-rr28.2%
expm1-def69.5%
expm1-log1p83.9%
Simplified83.9%
Final simplification78.3%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (<= y.im -1.75e-69)
(* (/ 1.0 y.im) (- (* y.re (/ x.im y.im)) x.re))
(if (<= y.im 1.35e-68)
(- (/ x.im y.re) (* x.re (/ y.im (* y.re y.re))))
(/ (- (* x.im (/ y.re y.im)) x.re) y.im))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_im <= -1.75e-69) {
tmp = (1.0 / y_46_im) * ((y_46_re * (x_46_im / y_46_im)) - x_46_re);
} else if (y_46_im <= 1.35e-68) {
tmp = (x_46_im / y_46_re) - (x_46_re * (y_46_im / (y_46_re * y_46_re)));
} else {
tmp = ((x_46_im * (y_46_re / y_46_im)) - x_46_re) / y_46_im;
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: tmp
if (y_46im <= (-1.75d-69)) then
tmp = (1.0d0 / y_46im) * ((y_46re * (x_46im / y_46im)) - x_46re)
else if (y_46im <= 1.35d-68) then
tmp = (x_46im / y_46re) - (x_46re * (y_46im / (y_46re * y_46re)))
else
tmp = ((x_46im * (y_46re / y_46im)) - x_46re) / y_46im
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_im <= -1.75e-69) {
tmp = (1.0 / y_46_im) * ((y_46_re * (x_46_im / y_46_im)) - x_46_re);
} else if (y_46_im <= 1.35e-68) {
tmp = (x_46_im / y_46_re) - (x_46_re * (y_46_im / (y_46_re * y_46_re)));
} else {
tmp = ((x_46_im * (y_46_re / y_46_im)) - x_46_re) / y_46_im;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if y_46_im <= -1.75e-69: tmp = (1.0 / y_46_im) * ((y_46_re * (x_46_im / y_46_im)) - x_46_re) elif y_46_im <= 1.35e-68: tmp = (x_46_im / y_46_re) - (x_46_re * (y_46_im / (y_46_re * y_46_re))) else: tmp = ((x_46_im * (y_46_re / y_46_im)) - x_46_re) / y_46_im return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if (y_46_im <= -1.75e-69) tmp = Float64(Float64(1.0 / y_46_im) * Float64(Float64(y_46_re * Float64(x_46_im / y_46_im)) - x_46_re)); elseif (y_46_im <= 1.35e-68) tmp = Float64(Float64(x_46_im / y_46_re) - Float64(x_46_re * Float64(y_46_im / Float64(y_46_re * y_46_re)))); else tmp = Float64(Float64(Float64(x_46_im * Float64(y_46_re / y_46_im)) - x_46_re) / y_46_im); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if (y_46_im <= -1.75e-69) tmp = (1.0 / y_46_im) * ((y_46_re * (x_46_im / y_46_im)) - x_46_re); elseif (y_46_im <= 1.35e-68) tmp = (x_46_im / y_46_re) - (x_46_re * (y_46_im / (y_46_re * y_46_re))); else tmp = ((x_46_im * (y_46_re / y_46_im)) - x_46_re) / y_46_im; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[y$46$im, -1.75e-69], N[(N[(1.0 / y$46$im), $MachinePrecision] * N[(N[(y$46$re * N[(x$46$im / y$46$im), $MachinePrecision]), $MachinePrecision] - x$46$re), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 1.35e-68], N[(N[(x$46$im / y$46$re), $MachinePrecision] - N[(x$46$re * N[(y$46$im / N[(y$46$re * y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x$46$im * N[(y$46$re / y$46$im), $MachinePrecision]), $MachinePrecision] - x$46$re), $MachinePrecision] / y$46$im), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.im \leq -1.75 \cdot 10^{-69}:\\
\;\;\;\;\frac{1}{y.im} \cdot \left(y.re \cdot \frac{x.im}{y.im} - x.re\right)\\
\mathbf{elif}\;y.im \leq 1.35 \cdot 10^{-68}:\\
\;\;\;\;\frac{x.im}{y.re} - x.re \cdot \frac{y.im}{y.re \cdot y.re}\\
\mathbf{else}:\\
\;\;\;\;\frac{x.im \cdot \frac{y.re}{y.im} - x.re}{y.im}\\
\end{array}
\end{array}
if y.im < -1.7500000000000001e-69Initial program 63.7%
*-un-lft-identity63.7%
add-sqr-sqrt63.7%
times-frac63.7%
hypot-def63.7%
hypot-def81.9%
Applied egg-rr81.9%
Taylor expanded in y.re around 0 20.5%
neg-mul-120.5%
+-commutative20.5%
unsub-neg20.5%
associate-/l*20.5%
Simplified20.5%
Taylor expanded in y.re around 0 75.5%
associate-/r/76.6%
Applied egg-rr76.6%
if -1.7500000000000001e-69 < y.im < 1.3500000000000001e-68Initial program 71.7%
Taylor expanded in y.re around inf 78.9%
+-commutative78.9%
mul-1-neg78.9%
unsub-neg78.9%
associate-/l*77.2%
associate-/r/75.2%
Simplified75.2%
*-commutative75.2%
clear-num75.2%
un-div-inv76.1%
Applied egg-rr76.1%
associate-/r/77.2%
Simplified77.2%
unpow275.2%
Applied egg-rr77.2%
if 1.3500000000000001e-68 < y.im Initial program 55.8%
*-un-lft-identity55.8%
add-sqr-sqrt55.8%
times-frac55.7%
hypot-def55.7%
hypot-def72.0%
Applied egg-rr72.0%
Taylor expanded in y.re around 0 82.4%
neg-mul-182.4%
+-commutative82.4%
unsub-neg82.4%
associate-/l*83.8%
Simplified83.8%
Taylor expanded in y.re around 0 83.6%
expm1-log1p-u69.3%
expm1-udef28.2%
associate-*l/28.2%
*-un-lft-identity28.2%
div-inv28.2%
clear-num28.2%
Applied egg-rr28.2%
expm1-def69.5%
expm1-log1p83.9%
Simplified83.9%
Final simplification79.0%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (<= y.im -1.8e-69)
(* (/ 1.0 y.im) (- (* y.re (/ x.im y.im)) x.re))
(if (<= y.im 1.12e-69)
(- (/ x.im y.re) (* y.im (/ (/ x.re y.re) y.re)))
(/ (- (* x.im (/ y.re y.im)) x.re) y.im))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_im <= -1.8e-69) {
tmp = (1.0 / y_46_im) * ((y_46_re * (x_46_im / y_46_im)) - x_46_re);
} else if (y_46_im <= 1.12e-69) {
tmp = (x_46_im / y_46_re) - (y_46_im * ((x_46_re / y_46_re) / y_46_re));
} else {
tmp = ((x_46_im * (y_46_re / y_46_im)) - x_46_re) / y_46_im;
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: tmp
if (y_46im <= (-1.8d-69)) then
tmp = (1.0d0 / y_46im) * ((y_46re * (x_46im / y_46im)) - x_46re)
else if (y_46im <= 1.12d-69) then
tmp = (x_46im / y_46re) - (y_46im * ((x_46re / y_46re) / y_46re))
else
tmp = ((x_46im * (y_46re / y_46im)) - x_46re) / y_46im
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_im <= -1.8e-69) {
tmp = (1.0 / y_46_im) * ((y_46_re * (x_46_im / y_46_im)) - x_46_re);
} else if (y_46_im <= 1.12e-69) {
tmp = (x_46_im / y_46_re) - (y_46_im * ((x_46_re / y_46_re) / y_46_re));
} else {
tmp = ((x_46_im * (y_46_re / y_46_im)) - x_46_re) / y_46_im;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if y_46_im <= -1.8e-69: tmp = (1.0 / y_46_im) * ((y_46_re * (x_46_im / y_46_im)) - x_46_re) elif y_46_im <= 1.12e-69: tmp = (x_46_im / y_46_re) - (y_46_im * ((x_46_re / y_46_re) / y_46_re)) else: tmp = ((x_46_im * (y_46_re / y_46_im)) - x_46_re) / y_46_im return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if (y_46_im <= -1.8e-69) tmp = Float64(Float64(1.0 / y_46_im) * Float64(Float64(y_46_re * Float64(x_46_im / y_46_im)) - x_46_re)); elseif (y_46_im <= 1.12e-69) tmp = Float64(Float64(x_46_im / y_46_re) - Float64(y_46_im * Float64(Float64(x_46_re / y_46_re) / y_46_re))); else tmp = Float64(Float64(Float64(x_46_im * Float64(y_46_re / y_46_im)) - x_46_re) / y_46_im); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if (y_46_im <= -1.8e-69) tmp = (1.0 / y_46_im) * ((y_46_re * (x_46_im / y_46_im)) - x_46_re); elseif (y_46_im <= 1.12e-69) tmp = (x_46_im / y_46_re) - (y_46_im * ((x_46_re / y_46_re) / y_46_re)); else tmp = ((x_46_im * (y_46_re / y_46_im)) - x_46_re) / y_46_im; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[y$46$im, -1.8e-69], N[(N[(1.0 / y$46$im), $MachinePrecision] * N[(N[(y$46$re * N[(x$46$im / y$46$im), $MachinePrecision]), $MachinePrecision] - x$46$re), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 1.12e-69], N[(N[(x$46$im / y$46$re), $MachinePrecision] - N[(y$46$im * N[(N[(x$46$re / y$46$re), $MachinePrecision] / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x$46$im * N[(y$46$re / y$46$im), $MachinePrecision]), $MachinePrecision] - x$46$re), $MachinePrecision] / y$46$im), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.im \leq -1.8 \cdot 10^{-69}:\\
\;\;\;\;\frac{1}{y.im} \cdot \left(y.re \cdot \frac{x.im}{y.im} - x.re\right)\\
\mathbf{elif}\;y.im \leq 1.12 \cdot 10^{-69}:\\
\;\;\;\;\frac{x.im}{y.re} - y.im \cdot \frac{\frac{x.re}{y.re}}{y.re}\\
\mathbf{else}:\\
\;\;\;\;\frac{x.im \cdot \frac{y.re}{y.im} - x.re}{y.im}\\
\end{array}
\end{array}
if y.im < -1.80000000000000009e-69Initial program 63.7%
*-un-lft-identity63.7%
add-sqr-sqrt63.7%
times-frac63.7%
hypot-def63.7%
hypot-def81.9%
Applied egg-rr81.9%
Taylor expanded in y.re around 0 20.5%
neg-mul-120.5%
+-commutative20.5%
unsub-neg20.5%
associate-/l*20.5%
Simplified20.5%
Taylor expanded in y.re around 0 75.5%
associate-/r/76.6%
Applied egg-rr76.6%
if -1.80000000000000009e-69 < y.im < 1.12e-69Initial program 71.7%
Taylor expanded in y.re around inf 78.9%
+-commutative78.9%
mul-1-neg78.9%
unsub-neg78.9%
associate-/l*77.2%
associate-/r/75.2%
Simplified75.2%
*-un-lft-identity75.2%
unpow275.2%
times-frac78.6%
Applied egg-rr78.6%
associate-*l/78.6%
*-lft-identity78.6%
Simplified78.6%
if 1.12e-69 < y.im Initial program 55.8%
*-un-lft-identity55.8%
add-sqr-sqrt55.8%
times-frac55.7%
hypot-def55.7%
hypot-def72.0%
Applied egg-rr72.0%
Taylor expanded in y.re around 0 82.4%
neg-mul-182.4%
+-commutative82.4%
unsub-neg82.4%
associate-/l*83.8%
Simplified83.8%
Taylor expanded in y.re around 0 83.6%
expm1-log1p-u69.3%
expm1-udef28.2%
associate-*l/28.2%
*-un-lft-identity28.2%
div-inv28.2%
clear-num28.2%
Applied egg-rr28.2%
expm1-def69.5%
expm1-log1p83.9%
Simplified83.9%
Final simplification79.5%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (<= y.im -1.7e-69)
(* (/ 1.0 y.im) (- (* y.re (/ x.im y.im)) x.re))
(if (<= y.im 7.2e-71)
(* (/ 1.0 y.re) (- x.im (/ (* y.im x.re) y.re)))
(/ (- (* x.im (/ y.re y.im)) x.re) y.im))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_im <= -1.7e-69) {
tmp = (1.0 / y_46_im) * ((y_46_re * (x_46_im / y_46_im)) - x_46_re);
} else if (y_46_im <= 7.2e-71) {
tmp = (1.0 / y_46_re) * (x_46_im - ((y_46_im * x_46_re) / y_46_re));
} else {
tmp = ((x_46_im * (y_46_re / y_46_im)) - x_46_re) / y_46_im;
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: tmp
if (y_46im <= (-1.7d-69)) then
tmp = (1.0d0 / y_46im) * ((y_46re * (x_46im / y_46im)) - x_46re)
else if (y_46im <= 7.2d-71) then
tmp = (1.0d0 / y_46re) * (x_46im - ((y_46im * x_46re) / y_46re))
else
tmp = ((x_46im * (y_46re / y_46im)) - x_46re) / y_46im
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_im <= -1.7e-69) {
tmp = (1.0 / y_46_im) * ((y_46_re * (x_46_im / y_46_im)) - x_46_re);
} else if (y_46_im <= 7.2e-71) {
tmp = (1.0 / y_46_re) * (x_46_im - ((y_46_im * x_46_re) / y_46_re));
} else {
tmp = ((x_46_im * (y_46_re / y_46_im)) - x_46_re) / y_46_im;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if y_46_im <= -1.7e-69: tmp = (1.0 / y_46_im) * ((y_46_re * (x_46_im / y_46_im)) - x_46_re) elif y_46_im <= 7.2e-71: tmp = (1.0 / y_46_re) * (x_46_im - ((y_46_im * x_46_re) / y_46_re)) else: tmp = ((x_46_im * (y_46_re / y_46_im)) - x_46_re) / y_46_im return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if (y_46_im <= -1.7e-69) tmp = Float64(Float64(1.0 / y_46_im) * Float64(Float64(y_46_re * Float64(x_46_im / y_46_im)) - x_46_re)); elseif (y_46_im <= 7.2e-71) tmp = Float64(Float64(1.0 / y_46_re) * Float64(x_46_im - Float64(Float64(y_46_im * x_46_re) / y_46_re))); else tmp = Float64(Float64(Float64(x_46_im * Float64(y_46_re / y_46_im)) - x_46_re) / y_46_im); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if (y_46_im <= -1.7e-69) tmp = (1.0 / y_46_im) * ((y_46_re * (x_46_im / y_46_im)) - x_46_re); elseif (y_46_im <= 7.2e-71) tmp = (1.0 / y_46_re) * (x_46_im - ((y_46_im * x_46_re) / y_46_re)); else tmp = ((x_46_im * (y_46_re / y_46_im)) - x_46_re) / y_46_im; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[y$46$im, -1.7e-69], N[(N[(1.0 / y$46$im), $MachinePrecision] * N[(N[(y$46$re * N[(x$46$im / y$46$im), $MachinePrecision]), $MachinePrecision] - x$46$re), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 7.2e-71], N[(N[(1.0 / y$46$re), $MachinePrecision] * N[(x$46$im - N[(N[(y$46$im * x$46$re), $MachinePrecision] / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x$46$im * N[(y$46$re / y$46$im), $MachinePrecision]), $MachinePrecision] - x$46$re), $MachinePrecision] / y$46$im), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.im \leq -1.7 \cdot 10^{-69}:\\
\;\;\;\;\frac{1}{y.im} \cdot \left(y.re \cdot \frac{x.im}{y.im} - x.re\right)\\
\mathbf{elif}\;y.im \leq 7.2 \cdot 10^{-71}:\\
\;\;\;\;\frac{1}{y.re} \cdot \left(x.im - \frac{y.im \cdot x.re}{y.re}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x.im \cdot \frac{y.re}{y.im} - x.re}{y.im}\\
\end{array}
\end{array}
if y.im < -1.70000000000000004e-69Initial program 63.7%
*-un-lft-identity63.7%
add-sqr-sqrt63.7%
times-frac63.7%
hypot-def63.7%
hypot-def81.9%
Applied egg-rr81.9%
Taylor expanded in y.re around 0 20.5%
neg-mul-120.5%
+-commutative20.5%
unsub-neg20.5%
associate-/l*20.5%
Simplified20.5%
Taylor expanded in y.re around 0 75.5%
associate-/r/76.6%
Applied egg-rr76.6%
if -1.70000000000000004e-69 < y.im < 7.2e-71Initial program 71.7%
*-un-lft-identity71.7%
add-sqr-sqrt71.7%
times-frac71.8%
hypot-def71.8%
hypot-def81.7%
Applied egg-rr81.7%
Taylor expanded in y.re around inf 51.2%
associate-*r/51.2%
mul-1-neg51.2%
distribute-rgt-neg-out51.2%
Simplified51.2%
Taylor expanded in y.re around inf 87.5%
if 7.2e-71 < y.im Initial program 55.8%
*-un-lft-identity55.8%
add-sqr-sqrt55.8%
times-frac55.7%
hypot-def55.7%
hypot-def72.0%
Applied egg-rr72.0%
Taylor expanded in y.re around 0 82.4%
neg-mul-182.4%
+-commutative82.4%
unsub-neg82.4%
associate-/l*83.8%
Simplified83.8%
Taylor expanded in y.re around 0 83.6%
expm1-log1p-u69.3%
expm1-udef28.2%
associate-*l/28.2%
*-un-lft-identity28.2%
div-inv28.2%
clear-num28.2%
Applied egg-rr28.2%
expm1-def69.5%
expm1-log1p83.9%
Simplified83.9%
Final simplification82.9%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (or (<= y.im -1.7e-69) (not (<= y.im 6.2e-69))) (/ (- (* x.im (/ y.re y.im)) 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 <= -1.7e-69) || !(y_46_im <= 6.2e-69)) {
tmp = ((x_46_im * (y_46_re / y_46_im)) - 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 <= (-1.7d-69)) .or. (.not. (y_46im <= 6.2d-69))) then
tmp = ((x_46im * (y_46re / y_46im)) - 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 <= -1.7e-69) || !(y_46_im <= 6.2e-69)) {
tmp = ((x_46_im * (y_46_re / y_46_im)) - 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 <= -1.7e-69) or not (y_46_im <= 6.2e-69): tmp = ((x_46_im * (y_46_re / y_46_im)) - 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 <= -1.7e-69) || !(y_46_im <= 6.2e-69)) tmp = Float64(Float64(Float64(x_46_im * Float64(y_46_re / y_46_im)) - 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 <= -1.7e-69) || ~((y_46_im <= 6.2e-69))) tmp = ((x_46_im * (y_46_re / y_46_im)) - 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, -1.7e-69], N[Not[LessEqual[y$46$im, 6.2e-69]], $MachinePrecision]], N[(N[(N[(x$46$im * N[(y$46$re / y$46$im), $MachinePrecision]), $MachinePrecision] - x$46$re), $MachinePrecision] / y$46$im), $MachinePrecision], N[(x$46$im / y$46$re), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.im \leq -1.7 \cdot 10^{-69} \lor \neg \left(y.im \leq 6.2 \cdot 10^{-69}\right):\\
\;\;\;\;\frac{x.im \cdot \frac{y.re}{y.im} - x.re}{y.im}\\
\mathbf{else}:\\
\;\;\;\;\frac{x.im}{y.re}\\
\end{array}
\end{array}
if y.im < -1.70000000000000004e-69 or 6.1999999999999999e-69 < y.im Initial program 59.9%
*-un-lft-identity59.9%
add-sqr-sqrt59.9%
times-frac59.8%
hypot-def59.8%
hypot-def77.1%
Applied egg-rr77.1%
Taylor expanded in y.re around 0 50.5%
neg-mul-150.5%
+-commutative50.5%
unsub-neg50.5%
associate-/l*51.1%
Simplified51.1%
Taylor expanded in y.re around 0 79.4%
expm1-log1p-u68.8%
expm1-udef31.8%
associate-*l/31.8%
*-un-lft-identity31.8%
div-inv31.8%
clear-num31.8%
Applied egg-rr31.8%
expm1-def68.9%
expm1-log1p79.6%
Simplified79.6%
if -1.70000000000000004e-69 < y.im < 6.1999999999999999e-69Initial program 71.7%
Taylor expanded in y.re around inf 71.2%
Final simplification76.4%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (<= y.im -1.8e-69)
(* (/ 1.0 y.im) (- (* y.re (/ x.im y.im)) x.re))
(if (<= y.im 3.9e-70)
(/ x.im y.re)
(/ (- (* x.im (/ y.re y.im)) x.re) y.im))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_im <= -1.8e-69) {
tmp = (1.0 / y_46_im) * ((y_46_re * (x_46_im / y_46_im)) - x_46_re);
} else if (y_46_im <= 3.9e-70) {
tmp = x_46_im / y_46_re;
} else {
tmp = ((x_46_im * (y_46_re / y_46_im)) - x_46_re) / y_46_im;
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: tmp
if (y_46im <= (-1.8d-69)) then
tmp = (1.0d0 / y_46im) * ((y_46re * (x_46im / y_46im)) - x_46re)
else if (y_46im <= 3.9d-70) then
tmp = x_46im / y_46re
else
tmp = ((x_46im * (y_46re / y_46im)) - x_46re) / y_46im
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_im <= -1.8e-69) {
tmp = (1.0 / y_46_im) * ((y_46_re * (x_46_im / y_46_im)) - x_46_re);
} else if (y_46_im <= 3.9e-70) {
tmp = x_46_im / y_46_re;
} else {
tmp = ((x_46_im * (y_46_re / y_46_im)) - x_46_re) / y_46_im;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if y_46_im <= -1.8e-69: tmp = (1.0 / y_46_im) * ((y_46_re * (x_46_im / y_46_im)) - x_46_re) elif y_46_im <= 3.9e-70: tmp = x_46_im / y_46_re else: tmp = ((x_46_im * (y_46_re / y_46_im)) - x_46_re) / y_46_im return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if (y_46_im <= -1.8e-69) tmp = Float64(Float64(1.0 / y_46_im) * Float64(Float64(y_46_re * Float64(x_46_im / y_46_im)) - x_46_re)); elseif (y_46_im <= 3.9e-70) tmp = Float64(x_46_im / y_46_re); else tmp = Float64(Float64(Float64(x_46_im * Float64(y_46_re / y_46_im)) - x_46_re) / y_46_im); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if (y_46_im <= -1.8e-69) tmp = (1.0 / y_46_im) * ((y_46_re * (x_46_im / y_46_im)) - x_46_re); elseif (y_46_im <= 3.9e-70) tmp = x_46_im / y_46_re; else tmp = ((x_46_im * (y_46_re / y_46_im)) - x_46_re) / y_46_im; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[y$46$im, -1.8e-69], N[(N[(1.0 / y$46$im), $MachinePrecision] * N[(N[(y$46$re * N[(x$46$im / y$46$im), $MachinePrecision]), $MachinePrecision] - x$46$re), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 3.9e-70], N[(x$46$im / y$46$re), $MachinePrecision], N[(N[(N[(x$46$im * N[(y$46$re / y$46$im), $MachinePrecision]), $MachinePrecision] - x$46$re), $MachinePrecision] / y$46$im), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.im \leq -1.8 \cdot 10^{-69}:\\
\;\;\;\;\frac{1}{y.im} \cdot \left(y.re \cdot \frac{x.im}{y.im} - x.re\right)\\
\mathbf{elif}\;y.im \leq 3.9 \cdot 10^{-70}:\\
\;\;\;\;\frac{x.im}{y.re}\\
\mathbf{else}:\\
\;\;\;\;\frac{x.im \cdot \frac{y.re}{y.im} - x.re}{y.im}\\
\end{array}
\end{array}
if y.im < -1.80000000000000009e-69Initial program 63.7%
*-un-lft-identity63.7%
add-sqr-sqrt63.7%
times-frac63.7%
hypot-def63.7%
hypot-def81.9%
Applied egg-rr81.9%
Taylor expanded in y.re around 0 20.5%
neg-mul-120.5%
+-commutative20.5%
unsub-neg20.5%
associate-/l*20.5%
Simplified20.5%
Taylor expanded in y.re around 0 75.5%
associate-/r/76.6%
Applied egg-rr76.6%
if -1.80000000000000009e-69 < y.im < 3.90000000000000019e-70Initial program 71.7%
Taylor expanded in y.re around inf 71.2%
if 3.90000000000000019e-70 < y.im Initial program 55.8%
*-un-lft-identity55.8%
add-sqr-sqrt55.8%
times-frac55.7%
hypot-def55.7%
hypot-def72.0%
Applied egg-rr72.0%
Taylor expanded in y.re around 0 82.4%
neg-mul-182.4%
+-commutative82.4%
unsub-neg82.4%
associate-/l*83.8%
Simplified83.8%
Taylor expanded in y.re around 0 83.6%
expm1-log1p-u69.3%
expm1-udef28.2%
associate-*l/28.2%
*-un-lft-identity28.2%
div-inv28.2%
clear-num28.2%
Applied egg-rr28.2%
expm1-def69.5%
expm1-log1p83.9%
Simplified83.9%
Final simplification76.7%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (or (<= y.im -2.65e-55) (not (<= y.im 1.66e-72))) (/ (- 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.65e-55) || !(y_46_im <= 1.66e-72)) {
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.65d-55)) .or. (.not. (y_46im <= 1.66d-72))) 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.65e-55) || !(y_46_im <= 1.66e-72)) {
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.65e-55) or not (y_46_im <= 1.66e-72): 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.65e-55) || !(y_46_im <= 1.66e-72)) tmp = Float64(Float64(-x_46_re) / y_46_im); else tmp = Float64(x_46_im / y_46_re); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if ((y_46_im <= -2.65e-55) || ~((y_46_im <= 1.66e-72))) 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.65e-55], N[Not[LessEqual[y$46$im, 1.66e-72]], $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.65 \cdot 10^{-55} \lor \neg \left(y.im \leq 1.66 \cdot 10^{-72}\right):\\
\;\;\;\;\frac{-x.re}{y.im}\\
\mathbf{else}:\\
\;\;\;\;\frac{x.im}{y.re}\\
\end{array}
\end{array}
if y.im < -2.6500000000000001e-55 or 1.6600000000000001e-72 < y.im Initial program 58.9%
Taylor expanded in y.re around 0 66.8%
associate-*r/66.8%
neg-mul-166.8%
Simplified66.8%
if -2.6500000000000001e-55 < y.im < 1.6600000000000001e-72Initial program 72.8%
Taylor expanded in y.re around inf 69.4%
Final simplification67.8%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (or (<= y.im -2.9e+130) (not (<= y.im 7.4e+184))) (/ 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.9e+130) || !(y_46_im <= 7.4e+184)) {
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.9d+130)) .or. (.not. (y_46im <= 7.4d+184))) 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.9e+130) || !(y_46_im <= 7.4e+184)) {
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.9e+130) or not (y_46_im <= 7.4e+184): 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.9e+130) || !(y_46_im <= 7.4e+184)) 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.9e+130) || ~((y_46_im <= 7.4e+184))) 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.9e+130], N[Not[LessEqual[y$46$im, 7.4e+184]], $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.9 \cdot 10^{+130} \lor \neg \left(y.im \leq 7.4 \cdot 10^{+184}\right):\\
\;\;\;\;\frac{x.re}{y.im}\\
\mathbf{else}:\\
\;\;\;\;\frac{x.im}{y.re}\\
\end{array}
\end{array}
if y.im < -2.8999999999999999e130 or 7.3999999999999995e184 < y.im Initial program 39.3%
*-un-lft-identity39.3%
add-sqr-sqrt39.3%
times-frac39.3%
hypot-def39.3%
hypot-def68.4%
Applied egg-rr68.4%
Taylor expanded in y.re around 0 61.3%
neg-mul-161.3%
+-commutative61.3%
unsub-neg61.3%
associate-/l*61.4%
Simplified61.4%
Taylor expanded in y.im around -inf 35.4%
if -2.8999999999999999e130 < y.im < 7.3999999999999995e184Initial program 72.9%
Taylor expanded in y.re around inf 48.7%
Final simplification45.3%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (<= y.im 2.7e+184) (/ x.im y.re) (/ x.im y.im)))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_im <= 2.7e+184) {
tmp = x_46_im / y_46_re;
} else {
tmp = x_46_im / y_46_im;
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: tmp
if (y_46im <= 2.7d+184) then
tmp = x_46im / y_46re
else
tmp = x_46im / y_46im
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_im <= 2.7e+184) {
tmp = x_46_im / y_46_re;
} else {
tmp = x_46_im / y_46_im;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if y_46_im <= 2.7e+184: tmp = x_46_im / y_46_re else: tmp = x_46_im / y_46_im return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if (y_46_im <= 2.7e+184) tmp = Float64(x_46_im / y_46_re); else tmp = Float64(x_46_im / y_46_im); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if (y_46_im <= 2.7e+184) tmp = x_46_im / y_46_re; else tmp = x_46_im / y_46_im; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[y$46$im, 2.7e+184], N[(x$46$im / y$46$re), $MachinePrecision], N[(x$46$im / y$46$im), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.im \leq 2.7 \cdot 10^{+184}:\\
\;\;\;\;\frac{x.im}{y.re}\\
\mathbf{else}:\\
\;\;\;\;\frac{x.im}{y.im}\\
\end{array}
\end{array}
if y.im < 2.6999999999999999e184Initial program 68.4%
Taylor expanded in y.re around inf 41.9%
if 2.6999999999999999e184 < y.im Initial program 29.1%
*-un-lft-identity29.1%
add-sqr-sqrt29.1%
times-frac29.1%
hypot-def29.1%
hypot-def58.6%
Applied egg-rr58.6%
Taylor expanded in y.re around -inf 23.4%
neg-mul-123.4%
Simplified23.4%
Taylor expanded in y.im around -inf 23.0%
Final simplification40.0%
(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 64.4%
*-un-lft-identity64.4%
add-sqr-sqrt64.4%
times-frac64.4%
hypot-def64.4%
hypot-def78.8%
Applied egg-rr78.8%
Taylor expanded in y.re around -inf 25.9%
neg-mul-125.9%
Simplified25.9%
Taylor expanded in y.im around -inf 10.1%
Final simplification10.1%
herbie shell --seed 2023320
(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))))