
(FPCore (x.re x.im y.re y.im) :precision binary64 (/ (- (* x.im y.re) (* x.re y.im)) (+ (* y.re y.re) (* y.im y.im))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return ((x_46_im * y_46_re) - (x_46_re * y_46_im)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im));
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
code = ((x_46im * y_46re) - (x_46re * y_46im)) / ((y_46re * y_46re) + (y_46im * y_46im))
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return ((x_46_im * y_46_re) - (x_46_re * y_46_im)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im));
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): return ((x_46_im * y_46_re) - (x_46_re * y_46_im)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im))
function code(x_46_re, x_46_im, y_46_re, y_46_im) return Float64(Float64(Float64(x_46_im * y_46_re) - Float64(x_46_re * y_46_im)) / Float64(Float64(y_46_re * y_46_re) + Float64(y_46_im * y_46_im))) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = ((x_46_im * y_46_re) - (x_46_re * y_46_im)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im)); end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[(N[(N[(x$46$im * y$46$re), $MachinePrecision] - N[(x$46$re * y$46$im), $MachinePrecision]), $MachinePrecision] / N[(N[(y$46$re * y$46$re), $MachinePrecision] + N[(y$46$im * y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x.im \cdot y.re - x.re \cdot y.im}{y.re \cdot y.re + y.im \cdot y.im}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 13 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x.re x.im y.re y.im) :precision binary64 (/ (- (* x.im y.re) (* x.re y.im)) (+ (* y.re y.re) (* y.im y.im))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return ((x_46_im * y_46_re) - (x_46_re * y_46_im)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im));
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
code = ((x_46im * y_46re) - (x_46re * y_46im)) / ((y_46re * y_46re) + (y_46im * y_46im))
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return ((x_46_im * y_46_re) - (x_46_re * y_46_im)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im));
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): return ((x_46_im * y_46_re) - (x_46_re * y_46_im)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im))
function code(x_46_re, x_46_im, y_46_re, y_46_im) return Float64(Float64(Float64(x_46_im * y_46_re) - Float64(x_46_re * y_46_im)) / Float64(Float64(y_46_re * y_46_re) + Float64(y_46_im * y_46_im))) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = ((x_46_im * y_46_re) - (x_46_re * y_46_im)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im)); end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[(N[(N[(x$46$im * y$46$re), $MachinePrecision] - N[(x$46$re * y$46$im), $MachinePrecision]), $MachinePrecision] / N[(N[(y$46$re * y$46$re), $MachinePrecision] + N[(y$46$im * y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x.im \cdot y.re - x.re \cdot y.im}{y.re \cdot y.re + y.im \cdot y.im}
\end{array}
(FPCore (x.re x.im y.re y.im) :precision binary64 (fma (/ y.re (hypot y.re y.im)) (/ x.im (hypot y.re y.im)) (/ (* (/ y.im (hypot y.re y.im)) (- x.re)) (hypot y.re y.im))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return fma((y_46_re / hypot(y_46_re, y_46_im)), (x_46_im / hypot(y_46_re, y_46_im)), (((y_46_im / hypot(y_46_re, y_46_im)) * -x_46_re) / hypot(y_46_re, y_46_im)));
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) return 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(Float64(y_46_im / hypot(y_46_re, y_46_im)) * Float64(-x_46_re)) / hypot(y_46_re, y_46_im))) end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := 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[(N[(N[(y$46$im / N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision]), $MachinePrecision] * (-x$46$re)), $MachinePrecision] / N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\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{\frac{y.im}{\mathsf{hypot}\left(y.re, y.im\right)} \cdot \left(-x.re\right)}{\mathsf{hypot}\left(y.re, y.im\right)}\right)
\end{array}
Initial program 64.9%
div-sub62.8%
sub-neg62.8%
*-commutative62.8%
add-sqr-sqrt62.8%
times-frac65.5%
fma-def65.5%
hypot-def65.5%
hypot-def79.2%
associate-/l*83.3%
add-sqr-sqrt83.3%
pow283.3%
hypot-def83.3%
Applied egg-rr83.3%
Applied egg-rr97.8%
associate-*r/98.2%
Simplified98.2%
Final simplification98.2%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (/ y.re (hypot y.re y.im)))
(t_1 (/ x.im (hypot y.re y.im)))
(t_2 (/ 1.0 (hypot y.re y.im))))
(if (<= y.im -1.32e+154)
(* t_2 (- x.re (/ y.re (/ y.im x.im))))
(if (<= y.im -3.6e-240)
(fma t_0 t_1 (/ (- x.re) (/ (pow (hypot y.re y.im) 2.0) y.im)))
(if (<= y.im 1.25e+98)
(* t_2 (/ (- (* y.re x.im) (* y.im x.re)) (hypot y.re y.im)))
(fma t_0 t_1 (- (/ 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 / hypot(y_46_re, y_46_im);
double t_1 = x_46_im / hypot(y_46_re, y_46_im);
double t_2 = 1.0 / hypot(y_46_re, y_46_im);
double tmp;
if (y_46_im <= -1.32e+154) {
tmp = t_2 * (x_46_re - (y_46_re / (y_46_im / x_46_im)));
} else if (y_46_im <= -3.6e-240) {
tmp = fma(t_0, t_1, (-x_46_re / (pow(hypot(y_46_re, y_46_im), 2.0) / y_46_im)));
} else if (y_46_im <= 1.25e+98) {
tmp = t_2 * (((y_46_re * x_46_im) - (y_46_im * x_46_re)) / hypot(y_46_re, y_46_im));
} else {
tmp = fma(t_0, t_1, -(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(y_46_re / hypot(y_46_re, y_46_im)) t_1 = Float64(x_46_im / hypot(y_46_re, y_46_im)) t_2 = Float64(1.0 / hypot(y_46_re, y_46_im)) tmp = 0.0 if (y_46_im <= -1.32e+154) tmp = Float64(t_2 * Float64(x_46_re - Float64(y_46_re / Float64(y_46_im / x_46_im)))); elseif (y_46_im <= -3.6e-240) tmp = fma(t_0, t_1, Float64(Float64(-x_46_re) / Float64((hypot(y_46_re, y_46_im) ^ 2.0) / y_46_im))); elseif (y_46_im <= 1.25e+98) tmp = Float64(t_2 * Float64(Float64(Float64(y_46_re * x_46_im) - Float64(y_46_im * x_46_re)) / hypot(y_46_re, y_46_im))); else tmp = fma(t_0, t_1, 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[(y$46$re / N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x$46$im / N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(1.0 / N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -1.32e+154], N[(t$95$2 * N[(x$46$re - N[(y$46$re / N[(y$46$im / x$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, -3.6e-240], N[(t$95$0 * t$95$1 + N[((-x$46$re) / N[(N[Power[N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision], 2.0], $MachinePrecision] / y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 1.25e+98], N[(t$95$2 * N[(N[(N[(y$46$re * x$46$im), $MachinePrecision] - N[(y$46$im * x$46$re), $MachinePrecision]), $MachinePrecision] / N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 * t$95$1 + (-N[(x$46$re / y$46$im), $MachinePrecision])), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{y.re}{\mathsf{hypot}\left(y.re, y.im\right)}\\
t_1 := \frac{x.im}{\mathsf{hypot}\left(y.re, y.im\right)}\\
t_2 := \frac{1}{\mathsf{hypot}\left(y.re, y.im\right)}\\
\mathbf{if}\;y.im \leq -1.32 \cdot 10^{+154}:\\
\;\;\;\;t_2 \cdot \left(x.re - \frac{y.re}{\frac{y.im}{x.im}}\right)\\
\mathbf{elif}\;y.im \leq -3.6 \cdot 10^{-240}:\\
\;\;\;\;\mathsf{fma}\left(t_0, t_1, \frac{-x.re}{\frac{{\left(\mathsf{hypot}\left(y.re, y.im\right)\right)}^{2}}{y.im}}\right)\\
\mathbf{elif}\;y.im \leq 1.25 \cdot 10^{+98}:\\
\;\;\;\;t_2 \cdot \frac{y.re \cdot x.im - y.im \cdot x.re}{\mathsf{hypot}\left(y.re, y.im\right)}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(t_0, t_1, -\frac{x.re}{y.im}\right)\\
\end{array}
\end{array}
if y.im < -1.31999999999999998e154Initial program 34.7%
*-un-lft-identity34.7%
add-sqr-sqrt34.7%
times-frac34.7%
hypot-def34.7%
hypot-def68.5%
Applied egg-rr68.5%
Taylor expanded in y.im around -inf 84.7%
mul-1-neg84.7%
unsub-neg84.7%
*-commutative84.7%
associate-/l*88.6%
Simplified88.6%
if -1.31999999999999998e154 < y.im < -3.5999999999999999e-240Initial program 66.6%
div-sub65.5%
sub-neg65.5%
*-commutative65.5%
add-sqr-sqrt65.5%
times-frac70.6%
fma-def70.5%
hypot-def70.6%
hypot-def87.6%
associate-/l*95.4%
add-sqr-sqrt95.4%
pow295.4%
hypot-def95.4%
Applied egg-rr95.4%
if -3.5999999999999999e-240 < y.im < 1.25e98Initial program 79.8%
*-un-lft-identity79.8%
add-sqr-sqrt79.8%
times-frac79.7%
hypot-def79.7%
hypot-def93.4%
Applied egg-rr93.4%
if 1.25e98 < y.im Initial program 49.8%
div-sub49.8%
sub-neg49.8%
*-commutative49.8%
add-sqr-sqrt49.8%
times-frac52.3%
fma-def52.3%
hypot-def52.3%
hypot-def63.1%
associate-/l*70.2%
add-sqr-sqrt70.2%
pow270.2%
hypot-def70.2%
Applied egg-rr70.2%
Taylor expanded in y.re around 0 96.7%
Final simplification94.2%
(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))) 1e+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))) <= 1e+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))) <= 1e+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], 1e+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 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))) < 9.9999999999999993e260Initial program 80.2%
*-un-lft-identity80.2%
add-sqr-sqrt80.2%
times-frac80.1%
hypot-def80.1%
hypot-def95.6%
Applied egg-rr95.6%
if 9.9999999999999993e260 < (/.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 17.2%
div-sub12.1%
sub-neg12.1%
*-commutative12.1%
add-sqr-sqrt12.1%
times-frac19.8%
fma-def19.8%
hypot-def19.8%
hypot-def57.1%
associate-/l*69.0%
add-sqr-sqrt69.0%
pow269.0%
hypot-def69.0%
Applied egg-rr69.0%
Taylor expanded in y.re around 0 72.5%
Final simplification90.0%
(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))) 1e+265)
(* (/ 1.0 (hypot y.re y.im)) (/ t_0 (hypot y.re y.im)))
(- (/ 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 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))) <= 1e+265) {
tmp = (1.0 / hypot(y_46_re, y_46_im)) * (t_0 / hypot(y_46_re, y_46_im));
} else {
tmp = (x_46_im / y_46_re) - (x_46_re / (y_46_re * (y_46_re / y_46_im)));
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = (y_46_re * x_46_im) - (y_46_im * x_46_re);
double tmp;
if ((t_0 / ((y_46_re * y_46_re) + (y_46_im * y_46_im))) <= 1e+265) {
tmp = (1.0 / Math.hypot(y_46_re, y_46_im)) * (t_0 / Math.hypot(y_46_re, y_46_im));
} else {
tmp = (x_46_im / 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): t_0 = (y_46_re * x_46_im) - (y_46_im * x_46_re) tmp = 0 if (t_0 / ((y_46_re * y_46_re) + (y_46_im * y_46_im))) <= 1e+265: tmp = (1.0 / math.hypot(y_46_re, y_46_im)) * (t_0 / math.hypot(y_46_re, y_46_im)) else: tmp = (x_46_im / 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) 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))) <= 1e+265) tmp = Float64(Float64(1.0 / hypot(y_46_re, y_46_im)) * Float64(t_0 / hypot(y_46_re, y_46_im))); else tmp = Float64(Float64(x_46_im / 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) t_0 = (y_46_re * x_46_im) - (y_46_im * x_46_re); tmp = 0.0; if ((t_0 / ((y_46_re * y_46_re) + (y_46_im * y_46_im))) <= 1e+265) tmp = (1.0 / hypot(y_46_re, y_46_im)) * (t_0 / hypot(y_46_re, y_46_im)); 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_] := 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], 1e+265], N[(N[(1.0 / N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision]), $MachinePrecision] * N[(t$95$0 / N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x$46$im / 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}
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 10^{+265}:\\
\;\;\;\;\frac{1}{\mathsf{hypot}\left(y.re, y.im\right)} \cdot \frac{t_0}{\mathsf{hypot}\left(y.re, y.im\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x.im}{y.re} - \frac{x.re}{y.re \cdot \frac{y.re}{y.im}}\\
\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))) < 1.00000000000000007e265Initial program 80.3%
*-un-lft-identity80.3%
add-sqr-sqrt80.3%
times-frac80.2%
hypot-def80.2%
hypot-def95.6%
Applied egg-rr95.6%
if 1.00000000000000007e265 < (/.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 15.9%
div-sub10.6%
sub-neg10.6%
*-commutative10.6%
add-sqr-sqrt10.6%
times-frac18.5%
fma-def18.5%
hypot-def18.5%
hypot-def56.4%
associate-/l*68.4%
add-sqr-sqrt68.4%
pow268.4%
hypot-def68.4%
Applied egg-rr68.4%
Taylor expanded in y.re around inf 52.7%
+-commutative52.7%
mul-1-neg52.7%
unsub-neg52.7%
associate-/l*57.9%
Simplified57.9%
unpow257.9%
*-un-lft-identity57.9%
times-frac64.5%
Applied egg-rr64.5%
Final simplification88.2%
(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 (/ y.im x.im))))
(if (<= y.im -1.02e-86)
(* t_0 (- x.re t_1))
(if (<= y.im 4.2e-191)
(- (/ x.im y.re) (/ x.re (* y.re (/ y.re y.im))))
(if (<= y.im 9.2e+98)
(/ (fma (- y.im) x.re (* y.re x.im)) (+ (* y.re y.re) (* y.im y.im)))
(* t_0 (- t_1 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 / (y_46_im / x_46_im);
double tmp;
if (y_46_im <= -1.02e-86) {
tmp = t_0 * (x_46_re - t_1);
} else if (y_46_im <= 4.2e-191) {
tmp = (x_46_im / y_46_re) - (x_46_re / (y_46_re * (y_46_re / y_46_im)));
} else if (y_46_im <= 9.2e+98) {
tmp = fma(-y_46_im, x_46_re, (y_46_re * x_46_im)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im));
} else {
tmp = t_0 * (t_1 - 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(y_46_re / Float64(y_46_im / x_46_im)) tmp = 0.0 if (y_46_im <= -1.02e-86) tmp = Float64(t_0 * Float64(x_46_re - t_1)); elseif (y_46_im <= 4.2e-191) tmp = Float64(Float64(x_46_im / y_46_re) - Float64(x_46_re / Float64(y_46_re * Float64(y_46_re / y_46_im)))); elseif (y_46_im <= 9.2e+98) tmp = Float64(fma(Float64(-y_46_im), x_46_re, Float64(y_46_re * x_46_im)) / Float64(Float64(y_46_re * y_46_re) + Float64(y_46_im * y_46_im))); else tmp = Float64(t_0 * Float64(t_1 - x_46_re)); end return 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[(y$46$re / N[(y$46$im / x$46$im), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -1.02e-86], N[(t$95$0 * N[(x$46$re - t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 4.2e-191], 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], If[LessEqual[y$46$im, 9.2e+98], N[(N[((-y$46$im) * x$46$re + N[(y$46$re * x$46$im), $MachinePrecision]), $MachinePrecision] / N[(N[(y$46$re * y$46$re), $MachinePrecision] + N[(y$46$im * y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[(t$95$1 - 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 := \frac{y.re}{\frac{y.im}{x.im}}\\
\mathbf{if}\;y.im \leq -1.02 \cdot 10^{-86}:\\
\;\;\;\;t_0 \cdot \left(x.re - t_1\right)\\
\mathbf{elif}\;y.im \leq 4.2 \cdot 10^{-191}:\\
\;\;\;\;\frac{x.im}{y.re} - \frac{x.re}{y.re \cdot \frac{y.re}{y.im}}\\
\mathbf{elif}\;y.im \leq 9.2 \cdot 10^{+98}:\\
\;\;\;\;\frac{\mathsf{fma}\left(-y.im, x.re, y.re \cdot x.im\right)}{y.re \cdot y.re + y.im \cdot y.im}\\
\mathbf{else}:\\
\;\;\;\;t_0 \cdot \left(t_1 - x.re\right)\\
\end{array}
\end{array}
if y.im < -1.02000000000000005e-86Initial program 56.1%
*-un-lft-identity56.1%
add-sqr-sqrt56.1%
times-frac56.1%
hypot-def56.1%
hypot-def71.7%
Applied egg-rr71.7%
Taylor expanded in y.im around -inf 76.3%
mul-1-neg76.3%
unsub-neg76.3%
*-commutative76.3%
associate-/l*78.0%
Simplified78.0%
if -1.02000000000000005e-86 < y.im < 4.19999999999999971e-191Initial program 68.7%
div-sub61.5%
sub-neg61.5%
*-commutative61.5%
add-sqr-sqrt61.5%
times-frac66.1%
fma-def66.1%
hypot-def66.2%
hypot-def87.0%
associate-/l*89.8%
add-sqr-sqrt89.8%
pow289.8%
hypot-def89.8%
Applied egg-rr89.8%
Taylor expanded in y.re around inf 84.5%
+-commutative84.5%
mul-1-neg84.5%
unsub-neg84.5%
associate-/l*87.2%
Simplified87.2%
unpow287.2%
*-un-lft-identity87.2%
times-frac93.5%
Applied egg-rr93.5%
if 4.19999999999999971e-191 < y.im < 9.20000000000000053e98Initial program 85.9%
sub-neg85.9%
+-commutative85.9%
*-commutative85.9%
distribute-lft-neg-in85.9%
fma-def85.9%
Applied egg-rr85.9%
if 9.20000000000000053e98 < y.im Initial program 49.8%
*-un-lft-identity49.8%
add-sqr-sqrt49.8%
times-frac49.7%
hypot-def49.7%
hypot-def64.6%
Applied egg-rr64.6%
Taylor expanded in y.re around 0 81.2%
neg-mul-181.2%
+-commutative81.2%
unsub-neg81.2%
*-commutative81.2%
associate-/l*86.1%
Simplified86.1%
Final simplification85.8%
(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 (/ y.im x.im))))
(if (<= y.im -1.02e-86)
(* t_0 (- x.re t_1))
(if (<= y.im 4.2e-191)
(- (/ x.im y.re) (/ x.re (* y.re (/ y.re y.im))))
(if (<= y.im 5.6e+97)
(/ (- (* y.re x.im) (* y.im x.re)) (+ (* y.re y.re) (* y.im y.im)))
(* t_0 (- t_1 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 / (y_46_im / x_46_im);
double tmp;
if (y_46_im <= -1.02e-86) {
tmp = t_0 * (x_46_re - t_1);
} else if (y_46_im <= 4.2e-191) {
tmp = (x_46_im / y_46_re) - (x_46_re / (y_46_re * (y_46_re / y_46_im)));
} else if (y_46_im <= 5.6e+97) {
tmp = ((y_46_re * x_46_im) - (y_46_im * x_46_re)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im));
} else {
tmp = t_0 * (t_1 - 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 / (y_46_im / x_46_im);
double tmp;
if (y_46_im <= -1.02e-86) {
tmp = t_0 * (x_46_re - t_1);
} else if (y_46_im <= 4.2e-191) {
tmp = (x_46_im / y_46_re) - (x_46_re / (y_46_re * (y_46_re / y_46_im)));
} else if (y_46_im <= 5.6e+97) {
tmp = ((y_46_re * x_46_im) - (y_46_im * x_46_re)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im));
} else {
tmp = t_0 * (t_1 - 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 / (y_46_im / x_46_im) tmp = 0 if y_46_im <= -1.02e-86: tmp = t_0 * (x_46_re - t_1) elif y_46_im <= 4.2e-191: tmp = (x_46_im / y_46_re) - (x_46_re / (y_46_re * (y_46_re / y_46_im))) elif y_46_im <= 5.6e+97: tmp = ((y_46_re * x_46_im) - (y_46_im * x_46_re)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im)) else: tmp = t_0 * (t_1 - 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(y_46_re / Float64(y_46_im / x_46_im)) tmp = 0.0 if (y_46_im <= -1.02e-86) tmp = Float64(t_0 * Float64(x_46_re - t_1)); elseif (y_46_im <= 4.2e-191) tmp = Float64(Float64(x_46_im / y_46_re) - Float64(x_46_re / Float64(y_46_re * Float64(y_46_re / y_46_im)))); elseif (y_46_im <= 5.6e+97) tmp = Float64(Float64(Float64(y_46_re * x_46_im) - Float64(y_46_im * x_46_re)) / Float64(Float64(y_46_re * y_46_re) + Float64(y_46_im * y_46_im))); else tmp = Float64(t_0 * Float64(t_1 - 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 / (y_46_im / x_46_im); tmp = 0.0; if (y_46_im <= -1.02e-86) tmp = t_0 * (x_46_re - t_1); elseif (y_46_im <= 4.2e-191) tmp = (x_46_im / y_46_re) - (x_46_re / (y_46_re * (y_46_re / y_46_im))); elseif (y_46_im <= 5.6e+97) tmp = ((y_46_re * x_46_im) - (y_46_im * x_46_re)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im)); else tmp = t_0 * (t_1 - 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[(y$46$re / N[(y$46$im / x$46$im), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -1.02e-86], N[(t$95$0 * N[(x$46$re - t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 4.2e-191], 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], If[LessEqual[y$46$im, 5.6e+97], N[(N[(N[(y$46$re * x$46$im), $MachinePrecision] - N[(y$46$im * x$46$re), $MachinePrecision]), $MachinePrecision] / N[(N[(y$46$re * y$46$re), $MachinePrecision] + N[(y$46$im * y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[(t$95$1 - 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 := \frac{y.re}{\frac{y.im}{x.im}}\\
\mathbf{if}\;y.im \leq -1.02 \cdot 10^{-86}:\\
\;\;\;\;t_0 \cdot \left(x.re - t_1\right)\\
\mathbf{elif}\;y.im \leq 4.2 \cdot 10^{-191}:\\
\;\;\;\;\frac{x.im}{y.re} - \frac{x.re}{y.re \cdot \frac{y.re}{y.im}}\\
\mathbf{elif}\;y.im \leq 5.6 \cdot 10^{+97}:\\
\;\;\;\;\frac{y.re \cdot x.im - y.im \cdot x.re}{y.re \cdot y.re + y.im \cdot y.im}\\
\mathbf{else}:\\
\;\;\;\;t_0 \cdot \left(t_1 - x.re\right)\\
\end{array}
\end{array}
if y.im < -1.02000000000000005e-86Initial program 56.1%
*-un-lft-identity56.1%
add-sqr-sqrt56.1%
times-frac56.1%
hypot-def56.1%
hypot-def71.7%
Applied egg-rr71.7%
Taylor expanded in y.im around -inf 76.3%
mul-1-neg76.3%
unsub-neg76.3%
*-commutative76.3%
associate-/l*78.0%
Simplified78.0%
if -1.02000000000000005e-86 < y.im < 4.19999999999999971e-191Initial program 68.7%
div-sub61.5%
sub-neg61.5%
*-commutative61.5%
add-sqr-sqrt61.5%
times-frac66.1%
fma-def66.1%
hypot-def66.2%
hypot-def87.0%
associate-/l*89.8%
add-sqr-sqrt89.8%
pow289.8%
hypot-def89.8%
Applied egg-rr89.8%
Taylor expanded in y.re around inf 84.5%
+-commutative84.5%
mul-1-neg84.5%
unsub-neg84.5%
associate-/l*87.2%
Simplified87.2%
unpow287.2%
*-un-lft-identity87.2%
times-frac93.5%
Applied egg-rr93.5%
if 4.19999999999999971e-191 < y.im < 5.5999999999999998e97Initial program 85.9%
if 5.5999999999999998e97 < y.im Initial program 49.8%
*-un-lft-identity49.8%
add-sqr-sqrt49.8%
times-frac49.7%
hypot-def49.7%
hypot-def64.6%
Applied egg-rr64.6%
Taylor expanded in y.re around 0 81.2%
neg-mul-181.2%
+-commutative81.2%
unsub-neg81.2%
*-commutative81.2%
associate-/l*86.1%
Simplified86.1%
Final simplification85.8%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (<= y.im -1.02e-86)
(* (/ 1.0 (hypot y.re y.im)) (- x.re (/ y.re (/ y.im x.im))))
(if (<= y.im 4.2e-191)
(- (/ x.im y.re) (/ x.re (* y.re (/ y.re y.im))))
(if (<= y.im 5.8e+97)
(/ (- (* y.re x.im) (* y.im x.re)) (+ (* y.re y.re) (* y.im y.im)))
(- (/ y.re (* y.im (* y.im (/ 1.0 x.im)))) (/ x.re y.im))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_im <= -1.02e-86) {
tmp = (1.0 / hypot(y_46_re, y_46_im)) * (x_46_re - (y_46_re / (y_46_im / x_46_im)));
} else if (y_46_im <= 4.2e-191) {
tmp = (x_46_im / y_46_re) - (x_46_re / (y_46_re * (y_46_re / y_46_im)));
} else if (y_46_im <= 5.8e+97) {
tmp = ((y_46_re * x_46_im) - (y_46_im * x_46_re)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im));
} else {
tmp = (y_46_re / (y_46_im * (y_46_im * (1.0 / x_46_im)))) - (x_46_re / y_46_im);
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_im <= -1.02e-86) {
tmp = (1.0 / Math.hypot(y_46_re, y_46_im)) * (x_46_re - (y_46_re / (y_46_im / x_46_im)));
} else if (y_46_im <= 4.2e-191) {
tmp = (x_46_im / y_46_re) - (x_46_re / (y_46_re * (y_46_re / y_46_im)));
} else if (y_46_im <= 5.8e+97) {
tmp = ((y_46_re * x_46_im) - (y_46_im * x_46_re)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im));
} else {
tmp = (y_46_re / (y_46_im * (y_46_im * (1.0 / x_46_im)))) - (x_46_re / y_46_im);
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if y_46_im <= -1.02e-86: tmp = (1.0 / math.hypot(y_46_re, y_46_im)) * (x_46_re - (y_46_re / (y_46_im / x_46_im))) elif y_46_im <= 4.2e-191: tmp = (x_46_im / y_46_re) - (x_46_re / (y_46_re * (y_46_re / y_46_im))) elif y_46_im <= 5.8e+97: tmp = ((y_46_re * x_46_im) - (y_46_im * x_46_re)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im)) else: tmp = (y_46_re / (y_46_im * (y_46_im * (1.0 / x_46_im)))) - (x_46_re / y_46_im) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if (y_46_im <= -1.02e-86) tmp = Float64(Float64(1.0 / hypot(y_46_re, y_46_im)) * Float64(x_46_re - Float64(y_46_re / Float64(y_46_im / x_46_im)))); elseif (y_46_im <= 4.2e-191) tmp = Float64(Float64(x_46_im / y_46_re) - Float64(x_46_re / Float64(y_46_re * Float64(y_46_re / y_46_im)))); elseif (y_46_im <= 5.8e+97) tmp = Float64(Float64(Float64(y_46_re * x_46_im) - Float64(y_46_im * x_46_re)) / Float64(Float64(y_46_re * y_46_re) + Float64(y_46_im * y_46_im))); else tmp = Float64(Float64(y_46_re / Float64(y_46_im * Float64(y_46_im * Float64(1.0 / x_46_im)))) - Float64(x_46_re / y_46_im)); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if (y_46_im <= -1.02e-86) tmp = (1.0 / hypot(y_46_re, y_46_im)) * (x_46_re - (y_46_re / (y_46_im / x_46_im))); elseif (y_46_im <= 4.2e-191) tmp = (x_46_im / y_46_re) - (x_46_re / (y_46_re * (y_46_re / y_46_im))); elseif (y_46_im <= 5.8e+97) tmp = ((y_46_re * x_46_im) - (y_46_im * x_46_re)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im)); else tmp = (y_46_re / (y_46_im * (y_46_im * (1.0 / x_46_im)))) - (x_46_re / y_46_im); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[y$46$im, -1.02e-86], N[(N[(1.0 / N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision]), $MachinePrecision] * N[(x$46$re - N[(y$46$re / N[(y$46$im / x$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 4.2e-191], 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], If[LessEqual[y$46$im, 5.8e+97], N[(N[(N[(y$46$re * x$46$im), $MachinePrecision] - N[(y$46$im * x$46$re), $MachinePrecision]), $MachinePrecision] / N[(N[(y$46$re * y$46$re), $MachinePrecision] + N[(y$46$im * y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y$46$re / N[(y$46$im * N[(y$46$im * N[(1.0 / x$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x$46$re / y$46$im), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.im \leq -1.02 \cdot 10^{-86}:\\
\;\;\;\;\frac{1}{\mathsf{hypot}\left(y.re, y.im\right)} \cdot \left(x.re - \frac{y.re}{\frac{y.im}{x.im}}\right)\\
\mathbf{elif}\;y.im \leq 4.2 \cdot 10^{-191}:\\
\;\;\;\;\frac{x.im}{y.re} - \frac{x.re}{y.re \cdot \frac{y.re}{y.im}}\\
\mathbf{elif}\;y.im \leq 5.8 \cdot 10^{+97}:\\
\;\;\;\;\frac{y.re \cdot x.im - y.im \cdot x.re}{y.re \cdot y.re + y.im \cdot y.im}\\
\mathbf{else}:\\
\;\;\;\;\frac{y.re}{y.im \cdot \left(y.im \cdot \frac{1}{x.im}\right)} - \frac{x.re}{y.im}\\
\end{array}
\end{array}
if y.im < -1.02000000000000005e-86Initial program 56.1%
*-un-lft-identity56.1%
add-sqr-sqrt56.1%
times-frac56.1%
hypot-def56.1%
hypot-def71.7%
Applied egg-rr71.7%
Taylor expanded in y.im around -inf 76.3%
mul-1-neg76.3%
unsub-neg76.3%
*-commutative76.3%
associate-/l*78.0%
Simplified78.0%
if -1.02000000000000005e-86 < y.im < 4.19999999999999971e-191Initial program 68.7%
div-sub61.5%
sub-neg61.5%
*-commutative61.5%
add-sqr-sqrt61.5%
times-frac66.1%
fma-def66.1%
hypot-def66.2%
hypot-def87.0%
associate-/l*89.8%
add-sqr-sqrt89.8%
pow289.8%
hypot-def89.8%
Applied egg-rr89.8%
Taylor expanded in y.re around inf 84.5%
+-commutative84.5%
mul-1-neg84.5%
unsub-neg84.5%
associate-/l*87.2%
Simplified87.2%
unpow287.2%
*-un-lft-identity87.2%
times-frac93.5%
Applied egg-rr93.5%
if 4.19999999999999971e-191 < y.im < 5.79999999999999974e97Initial program 85.9%
if 5.79999999999999974e97 < y.im Initial program 49.8%
Taylor expanded in y.re around 0 79.3%
+-commutative79.3%
mul-1-neg79.3%
unsub-neg79.3%
*-commutative79.3%
associate-/l*82.0%
Simplified82.0%
pow282.0%
div-inv82.0%
associate-*l*84.2%
Applied egg-rr84.2%
Final simplification85.4%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (- (/ y.re (* y.im (* y.im (/ 1.0 x.im)))) (/ x.re y.im))))
(if (<= y.im -8.2e-25)
t_0
(if (<= y.im 3.7e-191)
(- (/ x.im y.re) (/ x.re (* y.re (/ y.re y.im))))
(if (<= y.im 1.18e+98)
(/ (- (* y.re x.im) (* y.im x.re)) (+ (* y.re y.re) (* y.im y.im)))
t_0)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = (y_46_re / (y_46_im * (y_46_im * (1.0 / x_46_im)))) - (x_46_re / y_46_im);
double tmp;
if (y_46_im <= -8.2e-25) {
tmp = t_0;
} else if (y_46_im <= 3.7e-191) {
tmp = (x_46_im / y_46_re) - (x_46_re / (y_46_re * (y_46_re / y_46_im)));
} else if (y_46_im <= 1.18e+98) {
tmp = ((y_46_re * x_46_im) - (y_46_im * x_46_re)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im));
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
real(8) :: tmp
t_0 = (y_46re / (y_46im * (y_46im * (1.0d0 / x_46im)))) - (x_46re / y_46im)
if (y_46im <= (-8.2d-25)) then
tmp = t_0
else if (y_46im <= 3.7d-191) then
tmp = (x_46im / y_46re) - (x_46re / (y_46re * (y_46re / y_46im)))
else if (y_46im <= 1.18d+98) then
tmp = ((y_46re * x_46im) - (y_46im * x_46re)) / ((y_46re * y_46re) + (y_46im * y_46im))
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = (y_46_re / (y_46_im * (y_46_im * (1.0 / x_46_im)))) - (x_46_re / y_46_im);
double tmp;
if (y_46_im <= -8.2e-25) {
tmp = t_0;
} else if (y_46_im <= 3.7e-191) {
tmp = (x_46_im / y_46_re) - (x_46_re / (y_46_re * (y_46_re / y_46_im)));
} else if (y_46_im <= 1.18e+98) {
tmp = ((y_46_re * x_46_im) - (y_46_im * x_46_re)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im));
} else {
tmp = t_0;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = (y_46_re / (y_46_im * (y_46_im * (1.0 / x_46_im)))) - (x_46_re / y_46_im) tmp = 0 if y_46_im <= -8.2e-25: tmp = t_0 elif y_46_im <= 3.7e-191: tmp = (x_46_im / y_46_re) - (x_46_re / (y_46_re * (y_46_re / y_46_im))) elif y_46_im <= 1.18e+98: tmp = ((y_46_re * x_46_im) - (y_46_im * x_46_re)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im)) else: tmp = t_0 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(Float64(y_46_re / Float64(y_46_im * Float64(y_46_im * Float64(1.0 / x_46_im)))) - Float64(x_46_re / y_46_im)) tmp = 0.0 if (y_46_im <= -8.2e-25) tmp = t_0; elseif (y_46_im <= 3.7e-191) tmp = Float64(Float64(x_46_im / y_46_re) - Float64(x_46_re / Float64(y_46_re * Float64(y_46_re / y_46_im)))); elseif (y_46_im <= 1.18e+98) tmp = Float64(Float64(Float64(y_46_re * x_46_im) - Float64(y_46_im * x_46_re)) / Float64(Float64(y_46_re * y_46_re) + Float64(y_46_im * y_46_im))); else tmp = t_0; end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = (y_46_re / (y_46_im * (y_46_im * (1.0 / x_46_im)))) - (x_46_re / y_46_im); tmp = 0.0; if (y_46_im <= -8.2e-25) tmp = t_0; elseif (y_46_im <= 3.7e-191) tmp = (x_46_im / y_46_re) - (x_46_re / (y_46_re * (y_46_re / y_46_im))); elseif (y_46_im <= 1.18e+98) tmp = ((y_46_re * x_46_im) - (y_46_im * x_46_re)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im)); else tmp = 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[(y$46$re / N[(y$46$im * N[(y$46$im * N[(1.0 / x$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x$46$re / y$46$im), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -8.2e-25], t$95$0, If[LessEqual[y$46$im, 3.7e-191], 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], If[LessEqual[y$46$im, 1.18e+98], 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], t$95$0]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{y.re}{y.im \cdot \left(y.im \cdot \frac{1}{x.im}\right)} - \frac{x.re}{y.im}\\
\mathbf{if}\;y.im \leq -8.2 \cdot 10^{-25}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y.im \leq 3.7 \cdot 10^{-191}:\\
\;\;\;\;\frac{x.im}{y.re} - \frac{x.re}{y.re \cdot \frac{y.re}{y.im}}\\
\mathbf{elif}\;y.im \leq 1.18 \cdot 10^{+98}:\\
\;\;\;\;\frac{y.re \cdot x.im - y.im \cdot x.re}{y.re \cdot y.re + y.im \cdot y.im}\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if y.im < -8.19999999999999974e-25 or 1.18000000000000002e98 < y.im Initial program 52.6%
Taylor expanded in y.re around 0 75.4%
+-commutative75.4%
mul-1-neg75.4%
unsub-neg75.4%
*-commutative75.4%
associate-/l*77.5%
Simplified77.5%
pow277.5%
div-inv77.5%
associate-*l*80.7%
Applied egg-rr80.7%
if -8.19999999999999974e-25 < y.im < 3.6999999999999997e-191Initial program 68.6%
div-sub62.2%
sub-neg62.2%
*-commutative62.2%
add-sqr-sqrt62.2%
times-frac65.3%
fma-def65.3%
hypot-def65.3%
hypot-def87.3%
associate-/l*88.6%
add-sqr-sqrt88.6%
pow288.6%
hypot-def88.6%
Applied egg-rr88.6%
Taylor expanded in y.re around inf 81.7%
+-commutative81.7%
mul-1-neg81.7%
unsub-neg81.7%
associate-/l*83.0%
Simplified83.0%
unpow283.0%
*-un-lft-identity83.0%
times-frac88.7%
Applied egg-rr88.7%
if 3.6999999999999997e-191 < y.im < 1.18000000000000002e98Initial program 85.9%
Final simplification84.5%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (- (/ x.re y.im))))
(if (<= y.im -8.5e-25)
t_0
(if (<= y.im 1.15e-144)
(/ x.im y.re)
(if (<= y.im 1.7e+98)
(/ (* x.re (- y.im)) (+ (* y.re y.re) (* y.im y.im)))
t_0)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = -(x_46_re / y_46_im);
double tmp;
if (y_46_im <= -8.5e-25) {
tmp = t_0;
} else if (y_46_im <= 1.15e-144) {
tmp = x_46_im / y_46_re;
} else if (y_46_im <= 1.7e+98) {
tmp = (x_46_re * -y_46_im) / ((y_46_re * y_46_re) + (y_46_im * y_46_im));
} 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 = -(x_46re / y_46im)
if (y_46im <= (-8.5d-25)) then
tmp = t_0
else if (y_46im <= 1.15d-144) then
tmp = x_46im / y_46re
else if (y_46im <= 1.7d+98) then
tmp = (x_46re * -y_46im) / ((y_46re * y_46re) + (y_46im * y_46im))
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 = -(x_46_re / y_46_im);
double tmp;
if (y_46_im <= -8.5e-25) {
tmp = t_0;
} else if (y_46_im <= 1.15e-144) {
tmp = x_46_im / y_46_re;
} else if (y_46_im <= 1.7e+98) {
tmp = (x_46_re * -y_46_im) / ((y_46_re * y_46_re) + (y_46_im * y_46_im));
} else {
tmp = t_0;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = -(x_46_re / y_46_im) tmp = 0 if y_46_im <= -8.5e-25: tmp = t_0 elif y_46_im <= 1.15e-144: tmp = x_46_im / y_46_re elif y_46_im <= 1.7e+98: tmp = (x_46_re * -y_46_im) / ((y_46_re * y_46_re) + (y_46_im * y_46_im)) else: tmp = t_0 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(-Float64(x_46_re / y_46_im)) tmp = 0.0 if (y_46_im <= -8.5e-25) tmp = t_0; elseif (y_46_im <= 1.15e-144) tmp = Float64(x_46_im / y_46_re); elseif (y_46_im <= 1.7e+98) tmp = Float64(Float64(x_46_re * Float64(-y_46_im)) / Float64(Float64(y_46_re * y_46_re) + Float64(y_46_im * y_46_im))); 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 = -(x_46_re / y_46_im); tmp = 0.0; if (y_46_im <= -8.5e-25) tmp = t_0; elseif (y_46_im <= 1.15e-144) tmp = x_46_im / y_46_re; elseif (y_46_im <= 1.7e+98) tmp = (x_46_re * -y_46_im) / ((y_46_re * y_46_re) + (y_46_im * y_46_im)); 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[(x$46$re / y$46$im), $MachinePrecision])}, If[LessEqual[y$46$im, -8.5e-25], t$95$0, If[LessEqual[y$46$im, 1.15e-144], N[(x$46$im / y$46$re), $MachinePrecision], If[LessEqual[y$46$im, 1.7e+98], N[(N[(x$46$re * (-y$46$im)), $MachinePrecision] / N[(N[(y$46$re * y$46$re), $MachinePrecision] + N[(y$46$im * y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := -\frac{x.re}{y.im}\\
\mathbf{if}\;y.im \leq -8.5 \cdot 10^{-25}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y.im \leq 1.15 \cdot 10^{-144}:\\
\;\;\;\;\frac{x.im}{y.re}\\
\mathbf{elif}\;y.im \leq 1.7 \cdot 10^{+98}:\\
\;\;\;\;\frac{x.re \cdot \left(-y.im\right)}{y.re \cdot y.re + y.im \cdot y.im}\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if y.im < -8.49999999999999981e-25 or 1.69999999999999986e98 < y.im Initial program 52.6%
Taylor expanded in y.re around 0 69.4%
associate-*r/69.4%
neg-mul-169.4%
Simplified69.4%
if -8.49999999999999981e-25 < y.im < 1.15e-144Initial program 70.6%
Taylor expanded in y.re around inf 79.6%
if 1.15e-144 < y.im < 1.69999999999999986e98Initial program 85.1%
Taylor expanded in x.im around 0 63.3%
associate-*r*63.3%
neg-mul-163.3%
*-commutative63.3%
Simplified63.3%
Final simplification72.0%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (or (<= y.im -5e-33) (not (<= y.im 9.5e-37))) (- (/ y.re (* y.im (* y.im (/ 1.0 x.im)))) (/ x.re y.im)) (- (/ 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 <= -5e-33) || !(y_46_im <= 9.5e-37)) {
tmp = (y_46_re / (y_46_im * (y_46_im * (1.0 / x_46_im)))) - (x_46_re / y_46_im);
} 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 <= (-5d-33)) .or. (.not. (y_46im <= 9.5d-37))) then
tmp = (y_46re / (y_46im * (y_46im * (1.0d0 / x_46im)))) - (x_46re / y_46im)
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 <= -5e-33) || !(y_46_im <= 9.5e-37)) {
tmp = (y_46_re / (y_46_im * (y_46_im * (1.0 / x_46_im)))) - (x_46_re / y_46_im);
} 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 <= -5e-33) or not (y_46_im <= 9.5e-37): tmp = (y_46_re / (y_46_im * (y_46_im * (1.0 / x_46_im)))) - (x_46_re / y_46_im) 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 <= -5e-33) || !(y_46_im <= 9.5e-37)) tmp = Float64(Float64(y_46_re / Float64(y_46_im * Float64(y_46_im * Float64(1.0 / x_46_im)))) - Float64(x_46_re / y_46_im)); 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 <= -5e-33) || ~((y_46_im <= 9.5e-37))) tmp = (y_46_re / (y_46_im * (y_46_im * (1.0 / x_46_im)))) - (x_46_re / y_46_im); 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, -5e-33], N[Not[LessEqual[y$46$im, 9.5e-37]], $MachinePrecision]], N[(N[(y$46$re / N[(y$46$im * N[(y$46$im * N[(1.0 / x$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x$46$re / y$46$im), $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 -5 \cdot 10^{-33} \lor \neg \left(y.im \leq 9.5 \cdot 10^{-37}\right):\\
\;\;\;\;\frac{y.re}{y.im \cdot \left(y.im \cdot \frac{1}{x.im}\right)} - \frac{x.re}{y.im}\\
\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 < -5.00000000000000028e-33 or 9.49999999999999927e-37 < y.im Initial program 59.4%
Taylor expanded in y.re around 0 74.0%
+-commutative74.0%
mul-1-neg74.0%
unsub-neg74.0%
*-commutative74.0%
associate-/l*75.7%
Simplified75.7%
pow275.7%
div-inv75.7%
associate-*l*78.3%
Applied egg-rr78.3%
if -5.00000000000000028e-33 < y.im < 9.49999999999999927e-37Initial program 72.1%
div-sub67.1%
sub-neg67.1%
*-commutative67.1%
add-sqr-sqrt67.1%
times-frac70.3%
fma-def70.3%
hypot-def70.3%
hypot-def88.6%
associate-/l*88.0%
add-sqr-sqrt88.0%
pow288.0%
hypot-def88.0%
Applied egg-rr88.0%
Taylor expanded in y.re around inf 81.8%
+-commutative81.8%
mul-1-neg81.8%
unsub-neg81.8%
associate-/l*81.2%
Simplified81.2%
unpow281.2%
*-un-lft-identity81.2%
times-frac85.5%
Applied egg-rr85.5%
Final simplification81.4%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (or (<= y.im -29500000000.0) (not (<= y.im 8.5e-16))) (- (/ x.re y.im)) (- (/ 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 <= -29500000000.0) || !(y_46_im <= 8.5e-16)) {
tmp = -(x_46_re / y_46_im);
} 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 <= (-29500000000.0d0)) .or. (.not. (y_46im <= 8.5d-16))) then
tmp = -(x_46re / y_46im)
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 <= -29500000000.0) || !(y_46_im <= 8.5e-16)) {
tmp = -(x_46_re / y_46_im);
} 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 <= -29500000000.0) or not (y_46_im <= 8.5e-16): tmp = -(x_46_re / y_46_im) 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 <= -29500000000.0) || !(y_46_im <= 8.5e-16)) tmp = Float64(-Float64(x_46_re / y_46_im)); 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 <= -29500000000.0) || ~((y_46_im <= 8.5e-16))) tmp = -(x_46_re / y_46_im); 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, -29500000000.0], N[Not[LessEqual[y$46$im, 8.5e-16]], $MachinePrecision]], (-N[(x$46$re / y$46$im), $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 -29500000000 \lor \neg \left(y.im \leq 8.5 \cdot 10^{-16}\right):\\
\;\;\;\;-\frac{x.re}{y.im}\\
\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 < -2.95e10 or 8.5000000000000001e-16 < y.im Initial program 57.9%
Taylor expanded in y.re around 0 68.2%
associate-*r/68.2%
neg-mul-168.2%
Simplified68.2%
if -2.95e10 < y.im < 8.5000000000000001e-16Initial program 72.7%
div-sub68.2%
sub-neg68.2%
*-commutative68.2%
add-sqr-sqrt68.2%
times-frac71.9%
fma-def71.9%
hypot-def72.0%
hypot-def89.5%
associate-/l*88.9%
add-sqr-sqrt88.9%
pow288.9%
hypot-def88.9%
Applied egg-rr88.9%
Taylor expanded in y.re around inf 78.6%
+-commutative78.6%
mul-1-neg78.6%
unsub-neg78.6%
associate-/l*78.0%
Simplified78.0%
unpow278.0%
*-un-lft-identity78.0%
times-frac82.0%
Applied egg-rr82.0%
Final simplification74.7%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (or (<= y.im -6.5e-26) (not (<= y.im 5.2e-16))) (- (/ 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 <= -6.5e-26) || !(y_46_im <= 5.2e-16)) {
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 <= (-6.5d-26)) .or. (.not. (y_46im <= 5.2d-16))) 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 <= -6.5e-26) || !(y_46_im <= 5.2e-16)) {
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 <= -6.5e-26) or not (y_46_im <= 5.2e-16): 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 <= -6.5e-26) || !(y_46_im <= 5.2e-16)) 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 <= -6.5e-26) || ~((y_46_im <= 5.2e-16))) 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, -6.5e-26], N[Not[LessEqual[y$46$im, 5.2e-16]], $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 -6.5 \cdot 10^{-26} \lor \neg \left(y.im \leq 5.2 \cdot 10^{-16}\right):\\
\;\;\;\;-\frac{x.re}{y.im}\\
\mathbf{else}:\\
\;\;\;\;\frac{x.im}{y.re}\\
\end{array}
\end{array}
if y.im < -6.5e-26 or 5.1999999999999997e-16 < y.im Initial program 58.4%
Taylor expanded in y.re around 0 67.0%
associate-*r/67.0%
neg-mul-167.0%
Simplified67.0%
if -6.5e-26 < y.im < 5.1999999999999997e-16Initial program 72.6%
Taylor expanded in y.re around inf 73.3%
Final simplification69.9%
(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 64.9%
Taylor expanded in y.re around inf 43.7%
Final simplification43.7%
herbie shell --seed 2023318
(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))))