
(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 14 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
(fma
(/ y.re (hypot y.re y.im))
(/ x.im (hypot y.re y.im))
(/ (- x.re) (/ (pow (hypot y.re y.im) 2.0) y.im))))
(t_1 (/ 1.0 (hypot y.re y.im)))
(t_2 (/ x.im (/ y.im y.re))))
(if (<= y.im -5e+159)
(* t_1 (- x.re t_2))
(if (<= y.im -5.6e-189)
t_0
(if (<= y.im 4.5e-161)
(- (/ x.im y.re) (/ (/ x.re (/ y.re y.im)) y.re))
(if (<= y.im 1.35e+154) t_0 (* t_1 (- t_2 x.re))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = fma((y_46_re / hypot(y_46_re, y_46_im)), (x_46_im / hypot(y_46_re, y_46_im)), (-x_46_re / (pow(hypot(y_46_re, y_46_im), 2.0) / y_46_im)));
double t_1 = 1.0 / hypot(y_46_re, y_46_im);
double t_2 = x_46_im / (y_46_im / y_46_re);
double tmp;
if (y_46_im <= -5e+159) {
tmp = t_1 * (x_46_re - t_2);
} else if (y_46_im <= -5.6e-189) {
tmp = t_0;
} else if (y_46_im <= 4.5e-161) {
tmp = (x_46_im / y_46_re) - ((x_46_re / (y_46_re / y_46_im)) / y_46_re);
} else if (y_46_im <= 1.35e+154) {
tmp = t_0;
} else {
tmp = t_1 * (t_2 - x_46_re);
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = 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) / Float64((hypot(y_46_re, y_46_im) ^ 2.0) / y_46_im))) t_1 = Float64(1.0 / hypot(y_46_re, y_46_im)) t_2 = Float64(x_46_im / Float64(y_46_im / y_46_re)) tmp = 0.0 if (y_46_im <= -5e+159) tmp = Float64(t_1 * Float64(x_46_re - t_2)); elseif (y_46_im <= -5.6e-189) tmp = t_0; elseif (y_46_im <= 4.5e-161) tmp = Float64(Float64(x_46_im / y_46_re) - Float64(Float64(x_46_re / Float64(y_46_re / y_46_im)) / y_46_re)); elseif (y_46_im <= 1.35e+154) tmp = t_0; else tmp = Float64(t_1 * Float64(t_2 - 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[(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) / N[(N[Power[N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision], 2.0], $MachinePrecision] / y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(1.0 / N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x$46$im / N[(y$46$im / y$46$re), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -5e+159], N[(t$95$1 * N[(x$46$re - t$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, -5.6e-189], t$95$0, If[LessEqual[y$46$im, 4.5e-161], N[(N[(x$46$im / y$46$re), $MachinePrecision] - N[(N[(x$46$re / N[(y$46$re / y$46$im), $MachinePrecision]), $MachinePrecision] / y$46$re), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 1.35e+154], t$95$0, N[(t$95$1 * N[(t$95$2 - x$46$re), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \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}{\frac{{\left(\mathsf{hypot}\left(y.re, y.im\right)\right)}^{2}}{y.im}}\right)\\
t_1 := \frac{1}{\mathsf{hypot}\left(y.re, y.im\right)}\\
t_2 := \frac{x.im}{\frac{y.im}{y.re}}\\
\mathbf{if}\;y.im \leq -5 \cdot 10^{+159}:\\
\;\;\;\;t_1 \cdot \left(x.re - t_2\right)\\
\mathbf{elif}\;y.im \leq -5.6 \cdot 10^{-189}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y.im \leq 4.5 \cdot 10^{-161}:\\
\;\;\;\;\frac{x.im}{y.re} - \frac{\frac{x.re}{\frac{y.re}{y.im}}}{y.re}\\
\mathbf{elif}\;y.im \leq 1.35 \cdot 10^{+154}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;t_1 \cdot \left(t_2 - x.re\right)\\
\end{array}
\end{array}
if y.im < -5.00000000000000003e159Initial program 24.0%
*-un-lft-identity24.0%
add-sqr-sqrt24.0%
times-frac24.0%
hypot-def24.0%
hypot-def63.4%
Applied egg-rr63.4%
Taylor expanded in y.im around -inf 91.0%
mul-1-neg91.0%
unsub-neg91.0%
associate-/l*92.5%
Simplified92.5%
if -5.00000000000000003e159 < y.im < -5.5999999999999999e-189 or 4.4999999999999996e-161 < y.im < 1.35000000000000003e154Initial program 78.5%
div-sub78.5%
sub-neg78.5%
*-commutative78.5%
add-sqr-sqrt78.5%
times-frac79.7%
fma-def79.7%
hypot-def79.7%
hypot-def90.9%
associate-/l*94.1%
add-sqr-sqrt94.1%
pow294.1%
hypot-def94.1%
Applied egg-rr94.1%
if -5.5999999999999999e-189 < y.im < 4.4999999999999996e-161Initial program 73.9%
Taylor expanded in y.re around inf 83.6%
+-commutative83.6%
mul-1-neg83.6%
unsub-neg83.6%
associate-/l*85.4%
associate-/r/83.8%
Simplified83.8%
pow283.8%
associate-*l/83.6%
associate-/r*94.6%
Applied egg-rr94.6%
associate-/l/83.6%
times-frac91.9%
Applied egg-rr91.9%
associate-*r/91.9%
associate-/r/95.1%
Simplified95.1%
if 1.35000000000000003e154 < y.im Initial program 35.0%
*-un-lft-identity35.0%
add-sqr-sqrt35.0%
times-frac35.0%
hypot-def35.0%
hypot-def56.7%
Applied egg-rr56.7%
Taylor expanded in y.re around 0 92.5%
neg-mul-192.5%
+-commutative92.5%
unsub-neg92.5%
associate-/l*95.4%
Simplified95.4%
Final simplification94.3%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (/ 1.0 (hypot y.re y.im)))
(t_1
(-
(* t_0 (/ y.re (/ (hypot y.re y.im) x.im)))
(* y.im (/ x.re (pow (hypot y.re y.im) 2.0)))))
(t_2 (/ x.im (/ y.im y.re))))
(if (<= y.im -3.6e+149)
(* t_0 (- x.re t_2))
(if (<= y.im -1.9e-86)
t_1
(if (<= y.im 1.9e-89)
(- (/ x.im y.re) (/ (/ x.re (/ y.re y.im)) y.re))
(if (<= y.im 2.35e+147) t_1 (* t_0 (- t_2 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 = (t_0 * (y_46_re / (hypot(y_46_re, y_46_im) / x_46_im))) - (y_46_im * (x_46_re / pow(hypot(y_46_re, y_46_im), 2.0)));
double t_2 = x_46_im / (y_46_im / y_46_re);
double tmp;
if (y_46_im <= -3.6e+149) {
tmp = t_0 * (x_46_re - t_2);
} else if (y_46_im <= -1.9e-86) {
tmp = t_1;
} else if (y_46_im <= 1.9e-89) {
tmp = (x_46_im / y_46_re) - ((x_46_re / (y_46_re / y_46_im)) / y_46_re);
} else if (y_46_im <= 2.35e+147) {
tmp = t_1;
} else {
tmp = t_0 * (t_2 - 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 = (t_0 * (y_46_re / (Math.hypot(y_46_re, y_46_im) / x_46_im))) - (y_46_im * (x_46_re / Math.pow(Math.hypot(y_46_re, y_46_im), 2.0)));
double t_2 = x_46_im / (y_46_im / y_46_re);
double tmp;
if (y_46_im <= -3.6e+149) {
tmp = t_0 * (x_46_re - t_2);
} else if (y_46_im <= -1.9e-86) {
tmp = t_1;
} else if (y_46_im <= 1.9e-89) {
tmp = (x_46_im / y_46_re) - ((x_46_re / (y_46_re / y_46_im)) / y_46_re);
} else if (y_46_im <= 2.35e+147) {
tmp = t_1;
} else {
tmp = t_0 * (t_2 - 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 = (t_0 * (y_46_re / (math.hypot(y_46_re, y_46_im) / x_46_im))) - (y_46_im * (x_46_re / math.pow(math.hypot(y_46_re, y_46_im), 2.0))) t_2 = x_46_im / (y_46_im / y_46_re) tmp = 0 if y_46_im <= -3.6e+149: tmp = t_0 * (x_46_re - t_2) elif y_46_im <= -1.9e-86: tmp = t_1 elif y_46_im <= 1.9e-89: tmp = (x_46_im / y_46_re) - ((x_46_re / (y_46_re / y_46_im)) / y_46_re) elif y_46_im <= 2.35e+147: tmp = t_1 else: tmp = t_0 * (t_2 - 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(t_0 * Float64(y_46_re / Float64(hypot(y_46_re, y_46_im) / x_46_im))) - Float64(y_46_im * Float64(x_46_re / (hypot(y_46_re, y_46_im) ^ 2.0)))) t_2 = Float64(x_46_im / Float64(y_46_im / y_46_re)) tmp = 0.0 if (y_46_im <= -3.6e+149) tmp = Float64(t_0 * Float64(x_46_re - t_2)); elseif (y_46_im <= -1.9e-86) tmp = t_1; elseif (y_46_im <= 1.9e-89) tmp = Float64(Float64(x_46_im / y_46_re) - Float64(Float64(x_46_re / Float64(y_46_re / y_46_im)) / y_46_re)); elseif (y_46_im <= 2.35e+147) tmp = t_1; else tmp = Float64(t_0 * Float64(t_2 - 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 = (t_0 * (y_46_re / (hypot(y_46_re, y_46_im) / x_46_im))) - (y_46_im * (x_46_re / (hypot(y_46_re, y_46_im) ^ 2.0))); t_2 = x_46_im / (y_46_im / y_46_re); tmp = 0.0; if (y_46_im <= -3.6e+149) tmp = t_0 * (x_46_re - t_2); elseif (y_46_im <= -1.9e-86) tmp = t_1; elseif (y_46_im <= 1.9e-89) tmp = (x_46_im / y_46_re) - ((x_46_re / (y_46_re / y_46_im)) / y_46_re); elseif (y_46_im <= 2.35e+147) tmp = t_1; else tmp = t_0 * (t_2 - 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[(t$95$0 * N[(y$46$re / N[(N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision] / x$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y$46$im * N[(x$46$re / N[Power[N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x$46$im / N[(y$46$im / y$46$re), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -3.6e+149], N[(t$95$0 * N[(x$46$re - t$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, -1.9e-86], t$95$1, If[LessEqual[y$46$im, 1.9e-89], N[(N[(x$46$im / y$46$re), $MachinePrecision] - N[(N[(x$46$re / N[(y$46$re / y$46$im), $MachinePrecision]), $MachinePrecision] / y$46$re), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 2.35e+147], t$95$1, N[(t$95$0 * N[(t$95$2 - 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 := t_0 \cdot \frac{y.re}{\frac{\mathsf{hypot}\left(y.re, y.im\right)}{x.im}} - y.im \cdot \frac{x.re}{{\left(\mathsf{hypot}\left(y.re, y.im\right)\right)}^{2}}\\
t_2 := \frac{x.im}{\frac{y.im}{y.re}}\\
\mathbf{if}\;y.im \leq -3.6 \cdot 10^{+149}:\\
\;\;\;\;t_0 \cdot \left(x.re - t_2\right)\\
\mathbf{elif}\;y.im \leq -1.9 \cdot 10^{-86}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y.im \leq 1.9 \cdot 10^{-89}:\\
\;\;\;\;\frac{x.im}{y.re} - \frac{\frac{x.re}{\frac{y.re}{y.im}}}{y.re}\\
\mathbf{elif}\;y.im \leq 2.35 \cdot 10^{+147}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_0 \cdot \left(t_2 - x.re\right)\\
\end{array}
\end{array}
if y.im < -3.59999999999999995e149Initial program 27.0%
*-un-lft-identity27.0%
add-sqr-sqrt27.0%
times-frac27.1%
hypot-def27.1%
hypot-def64.7%
Applied egg-rr64.7%
Taylor expanded in y.im around -inf 89.3%
mul-1-neg89.3%
unsub-neg89.3%
associate-/l*90.6%
Simplified90.6%
if -3.59999999999999995e149 < y.im < -1.9e-86 or 1.9000000000000001e-89 < y.im < 2.3500000000000001e147Initial program 80.8%
div-sub80.7%
sub-neg80.7%
*-un-lft-identity80.7%
add-sqr-sqrt80.7%
times-frac80.7%
fma-def80.7%
hypot-def80.7%
hypot-def82.0%
associate-/l*86.1%
add-sqr-sqrt86.1%
pow286.1%
hypot-def86.1%
Applied egg-rr86.1%
fma-neg86.1%
*-commutative86.1%
associate-/l*96.0%
associate-/r/93.7%
*-commutative93.7%
Simplified93.7%
if -1.9e-86 < y.im < 1.9000000000000001e-89Initial program 73.8%
Taylor expanded in y.re around inf 84.0%
+-commutative84.0%
mul-1-neg84.0%
unsub-neg84.0%
associate-/l*85.3%
associate-/r/83.1%
Simplified83.1%
pow283.1%
associate-*l/84.0%
associate-/r*91.6%
Applied egg-rr91.6%
associate-/l/84.0%
times-frac88.8%
Applied egg-rr88.8%
associate-*r/88.7%
associate-/r/92.0%
Simplified92.0%
if 2.3500000000000001e147 < y.im Initial program 36.7%
*-un-lft-identity36.7%
add-sqr-sqrt36.7%
times-frac36.7%
hypot-def36.7%
hypot-def57.9%
Applied egg-rr57.9%
Taylor expanded in y.re around 0 92.6%
neg-mul-192.6%
+-commutative92.6%
unsub-neg92.6%
associate-/l*95.5%
Simplified95.5%
Final simplification93.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))) 2e+202)
(* (/ 1.0 (hypot y.re y.im)) (/ t_0 (hypot y.re y.im)))
(* (- (/ x.im (/ y.im y.re)) x.re) (/ 1.0 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))) <= 2e+202) {
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_im / y_46_re)) - x_46_re) * (1.0 / 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))) <= 2e+202) {
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_im / y_46_re)) - x_46_re) * (1.0 / 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))) <= 2e+202: 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_im / y_46_re)) - x_46_re) * (1.0 / 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))) <= 2e+202) 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(Float64(x_46_im / Float64(y_46_im / y_46_re)) - x_46_re) * Float64(1.0 / 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))) <= 2e+202) 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_im / y_46_re)) - x_46_re) * (1.0 / 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], 2e+202], 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[(N[(x$46$im / N[(y$46$im / y$46$re), $MachinePrecision]), $MachinePrecision] - x$46$re), $MachinePrecision] * N[(1.0 / 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 2 \cdot 10^{+202}:\\
\;\;\;\;\frac{1}{\mathsf{hypot}\left(y.re, y.im\right)} \cdot \frac{t_0}{\mathsf{hypot}\left(y.re, y.im\right)}\\
\mathbf{else}:\\
\;\;\;\;\left(\frac{x.im}{\frac{y.im}{y.re}} - x.re\right) \cdot \frac{1}{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.9999999999999998e202Initial program 80.4%
*-un-lft-identity80.4%
add-sqr-sqrt80.4%
times-frac80.4%
hypot-def80.4%
hypot-def96.7%
Applied egg-rr96.7%
if 1.9999999999999998e202 < (/.f64 (-.f64 (*.f64 x.im y.re) (*.f64 x.re y.im)) (+.f64 (*.f64 y.re y.re) (*.f64 y.im y.im))) Initial program 13.7%
*-un-lft-identity13.7%
add-sqr-sqrt13.7%
times-frac13.7%
hypot-def13.7%
hypot-def18.4%
Applied egg-rr18.4%
Taylor expanded in y.re around 0 34.0%
neg-mul-134.0%
+-commutative34.0%
unsub-neg34.0%
associate-/l*35.8%
Simplified35.8%
Taylor expanded in y.re around 0 60.6%
Final simplification88.1%
(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)))))
(if (<= y.im -4.7e+83)
(* (/ (/ y.im (hypot y.re y.im)) -1.0) (/ x.re (hypot y.re y.im)))
(if (<= y.im -3.8e-105)
t_0
(if (<= y.im 5.2e-114)
(- (/ x.im y.re) (/ (/ x.re (/ y.re y.im)) y.re))
(if (<= y.im 1.1e+97)
t_0
(* (/ 1.0 (hypot y.re y.im)) (- (/ x.im (/ y.im y.re)) 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) - (y_46_im * x_46_re)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im));
double tmp;
if (y_46_im <= -4.7e+83) {
tmp = ((y_46_im / hypot(y_46_re, y_46_im)) / -1.0) * (x_46_re / hypot(y_46_re, y_46_im));
} else if (y_46_im <= -3.8e-105) {
tmp = t_0;
} else if (y_46_im <= 5.2e-114) {
tmp = (x_46_im / y_46_re) - ((x_46_re / (y_46_re / y_46_im)) / y_46_re);
} else if (y_46_im <= 1.1e+97) {
tmp = t_0;
} else {
tmp = (1.0 / hypot(y_46_re, y_46_im)) * ((x_46_im / (y_46_im / y_46_re)) - 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) - (y_46_im * x_46_re)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im));
double tmp;
if (y_46_im <= -4.7e+83) {
tmp = ((y_46_im / Math.hypot(y_46_re, y_46_im)) / -1.0) * (x_46_re / Math.hypot(y_46_re, y_46_im));
} else if (y_46_im <= -3.8e-105) {
tmp = t_0;
} else if (y_46_im <= 5.2e-114) {
tmp = (x_46_im / y_46_re) - ((x_46_re / (y_46_re / y_46_im)) / y_46_re);
} else if (y_46_im <= 1.1e+97) {
tmp = t_0;
} else {
tmp = (1.0 / Math.hypot(y_46_re, y_46_im)) * ((x_46_im / (y_46_im / y_46_re)) - 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) - (y_46_im * x_46_re)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im)) tmp = 0 if y_46_im <= -4.7e+83: tmp = ((y_46_im / math.hypot(y_46_re, y_46_im)) / -1.0) * (x_46_re / math.hypot(y_46_re, y_46_im)) elif y_46_im <= -3.8e-105: tmp = t_0 elif y_46_im <= 5.2e-114: tmp = (x_46_im / y_46_re) - ((x_46_re / (y_46_re / y_46_im)) / y_46_re) elif y_46_im <= 1.1e+97: tmp = t_0 else: tmp = (1.0 / math.hypot(y_46_re, y_46_im)) * ((x_46_im / (y_46_im / y_46_re)) - x_46_re) 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))) tmp = 0.0 if (y_46_im <= -4.7e+83) tmp = Float64(Float64(Float64(y_46_im / hypot(y_46_re, y_46_im)) / -1.0) * Float64(x_46_re / hypot(y_46_re, y_46_im))); elseif (y_46_im <= -3.8e-105) tmp = t_0; elseif (y_46_im <= 5.2e-114) tmp = Float64(Float64(x_46_im / y_46_re) - Float64(Float64(x_46_re / Float64(y_46_re / y_46_im)) / y_46_re)); elseif (y_46_im <= 1.1e+97) tmp = t_0; else tmp = Float64(Float64(1.0 / hypot(y_46_re, y_46_im)) * Float64(Float64(x_46_im / Float64(y_46_im / y_46_re)) - 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) - (y_46_im * x_46_re)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im)); tmp = 0.0; if (y_46_im <= -4.7e+83) tmp = ((y_46_im / hypot(y_46_re, y_46_im)) / -1.0) * (x_46_re / hypot(y_46_re, y_46_im)); elseif (y_46_im <= -3.8e-105) tmp = t_0; elseif (y_46_im <= 5.2e-114) tmp = (x_46_im / y_46_re) - ((x_46_re / (y_46_re / y_46_im)) / y_46_re); elseif (y_46_im <= 1.1e+97) tmp = t_0; else tmp = (1.0 / hypot(y_46_re, y_46_im)) * ((x_46_im / (y_46_im / y_46_re)) - x_46_re); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[(N[(y$46$re * x$46$im), $MachinePrecision] - N[(y$46$im * x$46$re), $MachinePrecision]), $MachinePrecision] / N[(N[(y$46$re * y$46$re), $MachinePrecision] + N[(y$46$im * y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -4.7e+83], N[(N[(N[(y$46$im / N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision]), $MachinePrecision] / -1.0), $MachinePrecision] * N[(x$46$re / N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, -3.8e-105], t$95$0, If[LessEqual[y$46$im, 5.2e-114], N[(N[(x$46$im / y$46$re), $MachinePrecision] - N[(N[(x$46$re / N[(y$46$re / y$46$im), $MachinePrecision]), $MachinePrecision] / y$46$re), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 1.1e+97], t$95$0, N[(N[(1.0 / N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision]), $MachinePrecision] * N[(N[(x$46$im / N[(y$46$im / y$46$re), $MachinePrecision]), $MachinePrecision] - x$46$re), $MachinePrecision]), $MachinePrecision]]]]]]
\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}\\
\mathbf{if}\;y.im \leq -4.7 \cdot 10^{+83}:\\
\;\;\;\;\frac{\frac{y.im}{\mathsf{hypot}\left(y.re, y.im\right)}}{-1} \cdot \frac{x.re}{\mathsf{hypot}\left(y.re, y.im\right)}\\
\mathbf{elif}\;y.im \leq -3.8 \cdot 10^{-105}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y.im \leq 5.2 \cdot 10^{-114}:\\
\;\;\;\;\frac{x.im}{y.re} - \frac{\frac{x.re}{\frac{y.re}{y.im}}}{y.re}\\
\mathbf{elif}\;y.im \leq 1.1 \cdot 10^{+97}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\mathsf{hypot}\left(y.re, y.im\right)} \cdot \left(\frac{x.im}{\frac{y.im}{y.re}} - x.re\right)\\
\end{array}
\end{array}
if y.im < -4.6999999999999999e83Initial program 38.2%
*-un-lft-identity38.2%
add-sqr-sqrt38.2%
times-frac38.2%
hypot-def38.2%
hypot-def66.1%
Applied egg-rr66.1%
Taylor expanded in x.im around 0 63.1%
associate-*r*63.1%
neg-mul-163.1%
*-commutative63.1%
Simplified63.1%
associate-*l/63.3%
*-un-lft-identity63.3%
frac-2neg63.3%
Applied egg-rr84.5%
associate-/r/85.7%
neg-mul-185.7%
times-frac85.7%
Applied egg-rr85.7%
if -4.6999999999999999e83 < y.im < -3.7999999999999998e-105 or 5.20000000000000026e-114 < y.im < 1.1e97Initial program 85.9%
if -3.7999999999999998e-105 < y.im < 5.20000000000000026e-114Initial program 71.4%
Taylor expanded in y.re around inf 86.3%
+-commutative86.3%
mul-1-neg86.3%
unsub-neg86.3%
associate-/l*87.7%
associate-/r/85.4%
Simplified85.4%
pow285.4%
associate-*l/86.3%
associate-/r*94.7%
Applied egg-rr94.7%
associate-/l/86.3%
times-frac91.5%
Applied egg-rr91.5%
associate-*r/91.5%
associate-/r/95.1%
Simplified95.1%
if 1.1e97 < y.im Initial program 47.1%
*-un-lft-identity47.1%
add-sqr-sqrt47.1%
times-frac47.1%
hypot-def47.1%
hypot-def63.5%
Applied egg-rr63.5%
Taylor expanded in y.re around 0 92.2%
neg-mul-192.2%
+-commutative92.2%
unsub-neg92.2%
associate-/l*92.6%
Simplified92.6%
Final simplification89.9%
(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 (hypot y.re y.im)))
(t_2 (/ x.im (/ y.im y.re))))
(if (<= y.im -7e+84)
(* t_1 (- x.re t_2))
(if (<= y.im -4e-102)
t_0
(if (<= y.im 1.45e-113)
(- (/ x.im y.re) (/ (/ x.re (/ y.re y.im)) y.re))
(if (<= y.im 1.7e+93) t_0 (* t_1 (- t_2 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) - (y_46_im * x_46_re)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im));
double t_1 = 1.0 / hypot(y_46_re, y_46_im);
double t_2 = x_46_im / (y_46_im / y_46_re);
double tmp;
if (y_46_im <= -7e+84) {
tmp = t_1 * (x_46_re - t_2);
} else if (y_46_im <= -4e-102) {
tmp = t_0;
} else if (y_46_im <= 1.45e-113) {
tmp = (x_46_im / y_46_re) - ((x_46_re / (y_46_re / y_46_im)) / y_46_re);
} else if (y_46_im <= 1.7e+93) {
tmp = t_0;
} else {
tmp = t_1 * (t_2 - 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) - (y_46_im * x_46_re)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im));
double t_1 = 1.0 / Math.hypot(y_46_re, y_46_im);
double t_2 = x_46_im / (y_46_im / y_46_re);
double tmp;
if (y_46_im <= -7e+84) {
tmp = t_1 * (x_46_re - t_2);
} else if (y_46_im <= -4e-102) {
tmp = t_0;
} else if (y_46_im <= 1.45e-113) {
tmp = (x_46_im / y_46_re) - ((x_46_re / (y_46_re / y_46_im)) / y_46_re);
} else if (y_46_im <= 1.7e+93) {
tmp = t_0;
} else {
tmp = t_1 * (t_2 - 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) - (y_46_im * x_46_re)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im)) t_1 = 1.0 / math.hypot(y_46_re, y_46_im) t_2 = x_46_im / (y_46_im / y_46_re) tmp = 0 if y_46_im <= -7e+84: tmp = t_1 * (x_46_re - t_2) elif y_46_im <= -4e-102: tmp = t_0 elif y_46_im <= 1.45e-113: tmp = (x_46_im / y_46_re) - ((x_46_re / (y_46_re / y_46_im)) / y_46_re) elif y_46_im <= 1.7e+93: tmp = t_0 else: tmp = t_1 * (t_2 - x_46_re) 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(1.0 / hypot(y_46_re, y_46_im)) t_2 = Float64(x_46_im / Float64(y_46_im / y_46_re)) tmp = 0.0 if (y_46_im <= -7e+84) tmp = Float64(t_1 * Float64(x_46_re - t_2)); elseif (y_46_im <= -4e-102) tmp = t_0; elseif (y_46_im <= 1.45e-113) tmp = Float64(Float64(x_46_im / y_46_re) - Float64(Float64(x_46_re / Float64(y_46_re / y_46_im)) / y_46_re)); elseif (y_46_im <= 1.7e+93) tmp = t_0; else tmp = Float64(t_1 * Float64(t_2 - 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) - (y_46_im * x_46_re)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im)); t_1 = 1.0 / hypot(y_46_re, y_46_im); t_2 = x_46_im / (y_46_im / y_46_re); tmp = 0.0; if (y_46_im <= -7e+84) tmp = t_1 * (x_46_re - t_2); elseif (y_46_im <= -4e-102) tmp = t_0; elseif (y_46_im <= 1.45e-113) tmp = (x_46_im / y_46_re) - ((x_46_re / (y_46_re / y_46_im)) / y_46_re); elseif (y_46_im <= 1.7e+93) tmp = t_0; else tmp = t_1 * (t_2 - x_46_re); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[(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[(1.0 / N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x$46$im / N[(y$46$im / y$46$re), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -7e+84], N[(t$95$1 * N[(x$46$re - t$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, -4e-102], t$95$0, If[LessEqual[y$46$im, 1.45e-113], N[(N[(x$46$im / y$46$re), $MachinePrecision] - N[(N[(x$46$re / N[(y$46$re / y$46$im), $MachinePrecision]), $MachinePrecision] / y$46$re), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 1.7e+93], t$95$0, N[(t$95$1 * N[(t$95$2 - x$46$re), $MachinePrecision]), $MachinePrecision]]]]]]]]
\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}{\mathsf{hypot}\left(y.re, y.im\right)}\\
t_2 := \frac{x.im}{\frac{y.im}{y.re}}\\
\mathbf{if}\;y.im \leq -7 \cdot 10^{+84}:\\
\;\;\;\;t_1 \cdot \left(x.re - t_2\right)\\
\mathbf{elif}\;y.im \leq -4 \cdot 10^{-102}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y.im \leq 1.45 \cdot 10^{-113}:\\
\;\;\;\;\frac{x.im}{y.re} - \frac{\frac{x.re}{\frac{y.re}{y.im}}}{y.re}\\
\mathbf{elif}\;y.im \leq 1.7 \cdot 10^{+93}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;t_1 \cdot \left(t_2 - x.re\right)\\
\end{array}
\end{array}
if y.im < -6.9999999999999998e84Initial program 37.0%
*-un-lft-identity37.0%
add-sqr-sqrt37.0%
times-frac37.0%
hypot-def37.0%
hypot-def65.5%
Applied egg-rr65.5%
Taylor expanded in y.im around -inf 83.1%
mul-1-neg83.1%
unsub-neg83.1%
associate-/l*84.3%
Simplified84.3%
if -6.9999999999999998e84 < y.im < -3.99999999999999973e-102 or 1.45000000000000002e-113 < y.im < 1.7e93Initial program 86.0%
if -3.99999999999999973e-102 < y.im < 1.45000000000000002e-113Initial program 71.4%
Taylor expanded in y.re around inf 86.3%
+-commutative86.3%
mul-1-neg86.3%
unsub-neg86.3%
associate-/l*87.7%
associate-/r/85.4%
Simplified85.4%
pow285.4%
associate-*l/86.3%
associate-/r*94.7%
Applied egg-rr94.7%
associate-/l/86.3%
times-frac91.5%
Applied egg-rr91.5%
associate-*r/91.5%
associate-/r/95.1%
Simplified95.1%
if 1.7e93 < y.im Initial program 47.1%
*-un-lft-identity47.1%
add-sqr-sqrt47.1%
times-frac47.1%
hypot-def47.1%
hypot-def63.5%
Applied egg-rr63.5%
Taylor expanded in y.re around 0 92.2%
neg-mul-192.2%
+-commutative92.2%
unsub-neg92.2%
associate-/l*92.6%
Simplified92.6%
Final simplification89.7%
(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 (/ x.im (/ y.im y.re))))
(if (<= y.im -3.4e+87)
(* (/ 1.0 (hypot y.re y.im)) (- x.re t_1))
(if (<= y.im -2.75e-98)
t_0
(if (<= y.im 9e-114)
(- (/ x.im y.re) (/ (/ x.re (/ y.re y.im)) y.re))
(if (<= y.im 9e+95) t_0 (* (- t_1 x.re) (/ 1.0 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)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im));
double t_1 = x_46_im / (y_46_im / y_46_re);
double tmp;
if (y_46_im <= -3.4e+87) {
tmp = (1.0 / hypot(y_46_re, y_46_im)) * (x_46_re - t_1);
} else if (y_46_im <= -2.75e-98) {
tmp = t_0;
} else if (y_46_im <= 9e-114) {
tmp = (x_46_im / y_46_re) - ((x_46_re / (y_46_re / y_46_im)) / y_46_re);
} else if (y_46_im <= 9e+95) {
tmp = t_0;
} else {
tmp = (t_1 - x_46_re) * (1.0 / 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)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im));
double t_1 = x_46_im / (y_46_im / y_46_re);
double tmp;
if (y_46_im <= -3.4e+87) {
tmp = (1.0 / Math.hypot(y_46_re, y_46_im)) * (x_46_re - t_1);
} else if (y_46_im <= -2.75e-98) {
tmp = t_0;
} else if (y_46_im <= 9e-114) {
tmp = (x_46_im / y_46_re) - ((x_46_re / (y_46_re / y_46_im)) / y_46_re);
} else if (y_46_im <= 9e+95) {
tmp = t_0;
} else {
tmp = (t_1 - x_46_re) * (1.0 / 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)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im)) t_1 = x_46_im / (y_46_im / y_46_re) tmp = 0 if y_46_im <= -3.4e+87: tmp = (1.0 / math.hypot(y_46_re, y_46_im)) * (x_46_re - t_1) elif y_46_im <= -2.75e-98: tmp = t_0 elif y_46_im <= 9e-114: tmp = (x_46_im / y_46_re) - ((x_46_re / (y_46_re / y_46_im)) / y_46_re) elif y_46_im <= 9e+95: tmp = t_0 else: tmp = (t_1 - x_46_re) * (1.0 / y_46_im) 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(x_46_im / Float64(y_46_im / y_46_re)) tmp = 0.0 if (y_46_im <= -3.4e+87) tmp = Float64(Float64(1.0 / hypot(y_46_re, y_46_im)) * Float64(x_46_re - t_1)); elseif (y_46_im <= -2.75e-98) tmp = t_0; elseif (y_46_im <= 9e-114) tmp = Float64(Float64(x_46_im / y_46_re) - Float64(Float64(x_46_re / Float64(y_46_re / y_46_im)) / y_46_re)); elseif (y_46_im <= 9e+95) tmp = t_0; else tmp = Float64(Float64(t_1 - x_46_re) * Float64(1.0 / 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)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im)); t_1 = x_46_im / (y_46_im / y_46_re); tmp = 0.0; if (y_46_im <= -3.4e+87) tmp = (1.0 / hypot(y_46_re, y_46_im)) * (x_46_re - t_1); elseif (y_46_im <= -2.75e-98) tmp = t_0; elseif (y_46_im <= 9e-114) tmp = (x_46_im / y_46_re) - ((x_46_re / (y_46_re / y_46_im)) / y_46_re); elseif (y_46_im <= 9e+95) tmp = t_0; else tmp = (t_1 - x_46_re) * (1.0 / 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[(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[(x$46$im / N[(y$46$im / y$46$re), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -3.4e+87], N[(N[(1.0 / N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision]), $MachinePrecision] * N[(x$46$re - t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, -2.75e-98], t$95$0, If[LessEqual[y$46$im, 9e-114], N[(N[(x$46$im / y$46$re), $MachinePrecision] - N[(N[(x$46$re / N[(y$46$re / y$46$im), $MachinePrecision]), $MachinePrecision] / y$46$re), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 9e+95], t$95$0, N[(N[(t$95$1 - x$46$re), $MachinePrecision] * N[(1.0 / y$46$im), $MachinePrecision]), $MachinePrecision]]]]]]]
\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{x.im}{\frac{y.im}{y.re}}\\
\mathbf{if}\;y.im \leq -3.4 \cdot 10^{+87}:\\
\;\;\;\;\frac{1}{\mathsf{hypot}\left(y.re, y.im\right)} \cdot \left(x.re - t_1\right)\\
\mathbf{elif}\;y.im \leq -2.75 \cdot 10^{-98}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y.im \leq 9 \cdot 10^{-114}:\\
\;\;\;\;\frac{x.im}{y.re} - \frac{\frac{x.re}{\frac{y.re}{y.im}}}{y.re}\\
\mathbf{elif}\;y.im \leq 9 \cdot 10^{+95}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\left(t_1 - x.re\right) \cdot \frac{1}{y.im}\\
\end{array}
\end{array}
if y.im < -3.4000000000000002e87Initial program 37.0%
*-un-lft-identity37.0%
add-sqr-sqrt37.0%
times-frac37.0%
hypot-def37.0%
hypot-def65.5%
Applied egg-rr65.5%
Taylor expanded in y.im around -inf 83.1%
mul-1-neg83.1%
unsub-neg83.1%
associate-/l*84.3%
Simplified84.3%
if -3.4000000000000002e87 < y.im < -2.7499999999999999e-98 or 8.99999999999999937e-114 < y.im < 9.00000000000000033e95Initial program 86.0%
if -2.7499999999999999e-98 < y.im < 8.99999999999999937e-114Initial program 71.4%
Taylor expanded in y.re around inf 86.3%
+-commutative86.3%
mul-1-neg86.3%
unsub-neg86.3%
associate-/l*87.7%
associate-/r/85.4%
Simplified85.4%
pow285.4%
associate-*l/86.3%
associate-/r*94.7%
Applied egg-rr94.7%
associate-/l/86.3%
times-frac91.5%
Applied egg-rr91.5%
associate-*r/91.5%
associate-/r/95.1%
Simplified95.1%
if 9.00000000000000033e95 < y.im Initial program 47.1%
*-un-lft-identity47.1%
add-sqr-sqrt47.1%
times-frac47.1%
hypot-def47.1%
hypot-def63.5%
Applied egg-rr63.5%
Taylor expanded in y.re around 0 92.2%
neg-mul-192.2%
+-commutative92.2%
unsub-neg92.2%
associate-/l*92.6%
Simplified92.6%
Taylor expanded in y.re around 0 91.9%
Final simplification89.5%
(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 (* (- (/ x.im (/ y.im y.re)) x.re) (/ 1.0 y.im))))
(if (<= y.im -3.9e+86)
t_1
(if (<= y.im -7.4e-105)
t_0
(if (<= y.im 6.2e-114)
(- (/ x.im y.re) (/ (/ x.re (/ y.re y.im)) y.re))
(if (<= y.im 2.5e+95) 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 = ((x_46_im / (y_46_im / y_46_re)) - x_46_re) * (1.0 / y_46_im);
double tmp;
if (y_46_im <= -3.9e+86) {
tmp = t_1;
} else if (y_46_im <= -7.4e-105) {
tmp = t_0;
} else if (y_46_im <= 6.2e-114) {
tmp = (x_46_im / y_46_re) - ((x_46_re / (y_46_re / y_46_im)) / y_46_re);
} else if (y_46_im <= 2.5e+95) {
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 = ((x_46im / (y_46im / y_46re)) - x_46re) * (1.0d0 / y_46im)
if (y_46im <= (-3.9d+86)) then
tmp = t_1
else if (y_46im <= (-7.4d-105)) then
tmp = t_0
else if (y_46im <= 6.2d-114) then
tmp = (x_46im / y_46re) - ((x_46re / (y_46re / y_46im)) / y_46re)
else if (y_46im <= 2.5d+95) 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 = ((x_46_im / (y_46_im / y_46_re)) - x_46_re) * (1.0 / y_46_im);
double tmp;
if (y_46_im <= -3.9e+86) {
tmp = t_1;
} else if (y_46_im <= -7.4e-105) {
tmp = t_0;
} else if (y_46_im <= 6.2e-114) {
tmp = (x_46_im / y_46_re) - ((x_46_re / (y_46_re / y_46_im)) / y_46_re);
} else if (y_46_im <= 2.5e+95) {
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 = ((x_46_im / (y_46_im / y_46_re)) - x_46_re) * (1.0 / y_46_im) tmp = 0 if y_46_im <= -3.9e+86: tmp = t_1 elif y_46_im <= -7.4e-105: tmp = t_0 elif y_46_im <= 6.2e-114: tmp = (x_46_im / y_46_re) - ((x_46_re / (y_46_re / y_46_im)) / y_46_re) elif y_46_im <= 2.5e+95: 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(Float64(x_46_im / Float64(y_46_im / y_46_re)) - x_46_re) * Float64(1.0 / y_46_im)) tmp = 0.0 if (y_46_im <= -3.9e+86) tmp = t_1; elseif (y_46_im <= -7.4e-105) tmp = t_0; elseif (y_46_im <= 6.2e-114) tmp = Float64(Float64(x_46_im / y_46_re) - Float64(Float64(x_46_re / Float64(y_46_re / y_46_im)) / y_46_re)); elseif (y_46_im <= 2.5e+95) 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 = ((x_46_im / (y_46_im / y_46_re)) - x_46_re) * (1.0 / y_46_im); tmp = 0.0; if (y_46_im <= -3.9e+86) tmp = t_1; elseif (y_46_im <= -7.4e-105) tmp = t_0; elseif (y_46_im <= 6.2e-114) tmp = (x_46_im / y_46_re) - ((x_46_re / (y_46_re / y_46_im)) / y_46_re); elseif (y_46_im <= 2.5e+95) 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[(N[(x$46$im / N[(y$46$im / y$46$re), $MachinePrecision]), $MachinePrecision] - x$46$re), $MachinePrecision] * N[(1.0 / y$46$im), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -3.9e+86], t$95$1, If[LessEqual[y$46$im, -7.4e-105], t$95$0, If[LessEqual[y$46$im, 6.2e-114], N[(N[(x$46$im / y$46$re), $MachinePrecision] - N[(N[(x$46$re / N[(y$46$re / y$46$im), $MachinePrecision]), $MachinePrecision] / y$46$re), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 2.5e+95], 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 := \left(\frac{x.im}{\frac{y.im}{y.re}} - x.re\right) \cdot \frac{1}{y.im}\\
\mathbf{if}\;y.im \leq -3.9 \cdot 10^{+86}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y.im \leq -7.4 \cdot 10^{-105}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y.im \leq 6.2 \cdot 10^{-114}:\\
\;\;\;\;\frac{x.im}{y.re} - \frac{\frac{x.re}{\frac{y.re}{y.im}}}{y.re}\\
\mathbf{elif}\;y.im \leq 2.5 \cdot 10^{+95}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y.im < -3.9000000000000002e86 or 2.50000000000000012e95 < y.im Initial program 41.9%
*-un-lft-identity41.9%
add-sqr-sqrt41.9%
times-frac41.9%
hypot-def41.9%
hypot-def64.5%
Applied egg-rr64.5%
Taylor expanded in y.re around 0 54.9%
neg-mul-154.9%
+-commutative54.9%
unsub-neg54.9%
associate-/l*55.1%
Simplified55.1%
Taylor expanded in y.re around 0 87.9%
if -3.9000000000000002e86 < y.im < -7.40000000000000017e-105 or 6.2e-114 < y.im < 2.50000000000000012e95Initial program 86.0%
if -7.40000000000000017e-105 < y.im < 6.2e-114Initial program 71.4%
Taylor expanded in y.re around inf 86.3%
+-commutative86.3%
mul-1-neg86.3%
unsub-neg86.3%
associate-/l*87.7%
associate-/r/85.4%
Simplified85.4%
pow285.4%
associate-*l/86.3%
associate-/r*94.7%
Applied egg-rr94.7%
associate-/l/86.3%
times-frac91.5%
Applied egg-rr91.5%
associate-*r/91.5%
associate-/r/95.1%
Simplified95.1%
Final simplification89.5%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (or (<= y.re -6e+31) (not (<= y.re 0.6))) (/ x.im y.re) (* (- (/ x.im (/ y.im y.re)) x.re) (/ 1.0 y.im))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_re <= -6e+31) || !(y_46_re <= 0.6)) {
tmp = x_46_im / y_46_re;
} else {
tmp = ((x_46_im / (y_46_im / y_46_re)) - x_46_re) * (1.0 / y_46_im);
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: tmp
if ((y_46re <= (-6d+31)) .or. (.not. (y_46re <= 0.6d0))) then
tmp = x_46im / y_46re
else
tmp = ((x_46im / (y_46im / y_46re)) - x_46re) * (1.0d0 / y_46im)
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_re <= -6e+31) || !(y_46_re <= 0.6)) {
tmp = x_46_im / y_46_re;
} else {
tmp = ((x_46_im / (y_46_im / y_46_re)) - x_46_re) * (1.0 / y_46_im);
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if (y_46_re <= -6e+31) or not (y_46_re <= 0.6): tmp = x_46_im / y_46_re else: tmp = ((x_46_im / (y_46_im / y_46_re)) - x_46_re) * (1.0 / y_46_im) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if ((y_46_re <= -6e+31) || !(y_46_re <= 0.6)) tmp = Float64(x_46_im / y_46_re); else tmp = Float64(Float64(Float64(x_46_im / Float64(y_46_im / y_46_re)) - x_46_re) * Float64(1.0 / y_46_im)); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if ((y_46_re <= -6e+31) || ~((y_46_re <= 0.6))) tmp = x_46_im / y_46_re; else tmp = ((x_46_im / (y_46_im / y_46_re)) - x_46_re) * (1.0 / y_46_im); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[Or[LessEqual[y$46$re, -6e+31], N[Not[LessEqual[y$46$re, 0.6]], $MachinePrecision]], N[(x$46$im / y$46$re), $MachinePrecision], N[(N[(N[(x$46$im / N[(y$46$im / y$46$re), $MachinePrecision]), $MachinePrecision] - x$46$re), $MachinePrecision] * N[(1.0 / y$46$im), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq -6 \cdot 10^{+31} \lor \neg \left(y.re \leq 0.6\right):\\
\;\;\;\;\frac{x.im}{y.re}\\
\mathbf{else}:\\
\;\;\;\;\left(\frac{x.im}{\frac{y.im}{y.re}} - x.re\right) \cdot \frac{1}{y.im}\\
\end{array}
\end{array}
if y.re < -5.99999999999999978e31 or 0.599999999999999978 < y.re Initial program 51.4%
Taylor expanded in y.re around inf 69.3%
if -5.99999999999999978e31 < y.re < 0.599999999999999978Initial program 74.1%
*-un-lft-identity74.1%
add-sqr-sqrt74.0%
times-frac74.0%
hypot-def74.0%
hypot-def87.0%
Applied egg-rr87.0%
Taylor expanded in y.re around 0 45.3%
neg-mul-145.3%
+-commutative45.3%
unsub-neg45.3%
associate-/l*44.7%
Simplified44.7%
Taylor expanded in y.re around 0 81.2%
Final simplification76.2%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (or (<= y.im -4.2e-85) (not (<= y.im 7.8e-18))) (* (- (/ x.im (/ y.im y.re)) x.re) (/ 1.0 y.im)) (- (/ x.im y.re) (* y.im (/ (/ x.re y.re) y.re)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_im <= -4.2e-85) || !(y_46_im <= 7.8e-18)) {
tmp = ((x_46_im / (y_46_im / y_46_re)) - x_46_re) * (1.0 / y_46_im);
} else {
tmp = (x_46_im / y_46_re) - (y_46_im * ((x_46_re / y_46_re) / y_46_re));
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: tmp
if ((y_46im <= (-4.2d-85)) .or. (.not. (y_46im <= 7.8d-18))) then
tmp = ((x_46im / (y_46im / y_46re)) - x_46re) * (1.0d0 / y_46im)
else
tmp = (x_46im / y_46re) - (y_46im * ((x_46re / y_46re) / y_46re))
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_im <= -4.2e-85) || !(y_46_im <= 7.8e-18)) {
tmp = ((x_46_im / (y_46_im / y_46_re)) - x_46_re) * (1.0 / y_46_im);
} else {
tmp = (x_46_im / y_46_re) - (y_46_im * ((x_46_re / y_46_re) / y_46_re));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if (y_46_im <= -4.2e-85) or not (y_46_im <= 7.8e-18): tmp = ((x_46_im / (y_46_im / y_46_re)) - x_46_re) * (1.0 / y_46_im) else: tmp = (x_46_im / y_46_re) - (y_46_im * ((x_46_re / y_46_re) / y_46_re)) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if ((y_46_im <= -4.2e-85) || !(y_46_im <= 7.8e-18)) tmp = Float64(Float64(Float64(x_46_im / Float64(y_46_im / y_46_re)) - x_46_re) * Float64(1.0 / y_46_im)); else tmp = Float64(Float64(x_46_im / y_46_re) - Float64(y_46_im * Float64(Float64(x_46_re / y_46_re) / y_46_re))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if ((y_46_im <= -4.2e-85) || ~((y_46_im <= 7.8e-18))) tmp = ((x_46_im / (y_46_im / y_46_re)) - x_46_re) * (1.0 / y_46_im); else tmp = (x_46_im / y_46_re) - (y_46_im * ((x_46_re / y_46_re) / y_46_re)); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[Or[LessEqual[y$46$im, -4.2e-85], N[Not[LessEqual[y$46$im, 7.8e-18]], $MachinePrecision]], N[(N[(N[(x$46$im / N[(y$46$im / y$46$re), $MachinePrecision]), $MachinePrecision] - x$46$re), $MachinePrecision] * N[(1.0 / y$46$im), $MachinePrecision]), $MachinePrecision], 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]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.im \leq -4.2 \cdot 10^{-85} \lor \neg \left(y.im \leq 7.8 \cdot 10^{-18}\right):\\
\;\;\;\;\left(\frac{x.im}{\frac{y.im}{y.re}} - x.re\right) \cdot \frac{1}{y.im}\\
\mathbf{else}:\\
\;\;\;\;\frac{x.im}{y.re} - y.im \cdot \frac{\frac{x.re}{y.re}}{y.re}\\
\end{array}
\end{array}
if y.im < -4.2e-85 or 7.8000000000000001e-18 < y.im Initial program 57.3%
*-un-lft-identity57.3%
add-sqr-sqrt57.3%
times-frac57.3%
hypot-def57.3%
hypot-def72.7%
Applied egg-rr72.7%
Taylor expanded in y.re around 0 40.9%
neg-mul-140.9%
+-commutative40.9%
unsub-neg40.9%
associate-/l*41.0%
Simplified41.0%
Taylor expanded in y.re around 0 77.6%
if -4.2e-85 < y.im < 7.8000000000000001e-18Initial program 76.2%
Taylor expanded in y.re around inf 80.3%
+-commutative80.3%
mul-1-neg80.3%
unsub-neg80.3%
associate-/l*81.4%
associate-/r/79.6%
Simplified79.6%
*-un-lft-identity79.6%
pow279.6%
times-frac81.6%
Applied egg-rr81.6%
associate-*l/81.6%
*-un-lft-identity81.6%
Applied egg-rr81.6%
Final simplification79.1%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (or (<= y.im -1.3e-84) (not (<= y.im 6.2e-13))) (* (- (/ x.im (/ y.im y.re)) x.re) (/ 1.0 y.im)) (- (/ x.im y.re) (/ (/ x.re (/ y.re y.im)) y.re))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_im <= -1.3e-84) || !(y_46_im <= 6.2e-13)) {
tmp = ((x_46_im / (y_46_im / y_46_re)) - x_46_re) * (1.0 / y_46_im);
} else {
tmp = (x_46_im / y_46_re) - ((x_46_re / (y_46_re / y_46_im)) / y_46_re);
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: tmp
if ((y_46im <= (-1.3d-84)) .or. (.not. (y_46im <= 6.2d-13))) then
tmp = ((x_46im / (y_46im / y_46re)) - x_46re) * (1.0d0 / y_46im)
else
tmp = (x_46im / y_46re) - ((x_46re / (y_46re / y_46im)) / y_46re)
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_im <= -1.3e-84) || !(y_46_im <= 6.2e-13)) {
tmp = ((x_46_im / (y_46_im / y_46_re)) - x_46_re) * (1.0 / y_46_im);
} else {
tmp = (x_46_im / y_46_re) - ((x_46_re / (y_46_re / y_46_im)) / y_46_re);
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if (y_46_im <= -1.3e-84) or not (y_46_im <= 6.2e-13): tmp = ((x_46_im / (y_46_im / y_46_re)) - x_46_re) * (1.0 / y_46_im) else: tmp = (x_46_im / y_46_re) - ((x_46_re / (y_46_re / y_46_im)) / y_46_re) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if ((y_46_im <= -1.3e-84) || !(y_46_im <= 6.2e-13)) tmp = Float64(Float64(Float64(x_46_im / Float64(y_46_im / y_46_re)) - x_46_re) * Float64(1.0 / y_46_im)); else tmp = Float64(Float64(x_46_im / y_46_re) - Float64(Float64(x_46_re / Float64(y_46_re / y_46_im)) / y_46_re)); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if ((y_46_im <= -1.3e-84) || ~((y_46_im <= 6.2e-13))) tmp = ((x_46_im / (y_46_im / y_46_re)) - x_46_re) * (1.0 / y_46_im); else tmp = (x_46_im / y_46_re) - ((x_46_re / (y_46_re / y_46_im)) / y_46_re); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[Or[LessEqual[y$46$im, -1.3e-84], N[Not[LessEqual[y$46$im, 6.2e-13]], $MachinePrecision]], N[(N[(N[(x$46$im / N[(y$46$im / y$46$re), $MachinePrecision]), $MachinePrecision] - x$46$re), $MachinePrecision] * N[(1.0 / y$46$im), $MachinePrecision]), $MachinePrecision], N[(N[(x$46$im / y$46$re), $MachinePrecision] - N[(N[(x$46$re / N[(y$46$re / y$46$im), $MachinePrecision]), $MachinePrecision] / y$46$re), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.im \leq -1.3 \cdot 10^{-84} \lor \neg \left(y.im \leq 6.2 \cdot 10^{-13}\right):\\
\;\;\;\;\left(\frac{x.im}{\frac{y.im}{y.re}} - x.re\right) \cdot \frac{1}{y.im}\\
\mathbf{else}:\\
\;\;\;\;\frac{x.im}{y.re} - \frac{\frac{x.re}{\frac{y.re}{y.im}}}{y.re}\\
\end{array}
\end{array}
if y.im < -1.3e-84 or 6.1999999999999998e-13 < y.im Initial program 57.3%
*-un-lft-identity57.3%
add-sqr-sqrt57.3%
times-frac57.3%
hypot-def57.3%
hypot-def72.7%
Applied egg-rr72.7%
Taylor expanded in y.re around 0 40.9%
neg-mul-140.9%
+-commutative40.9%
unsub-neg40.9%
associate-/l*41.0%
Simplified41.0%
Taylor expanded in y.re around 0 77.6%
if -1.3e-84 < y.im < 6.1999999999999998e-13Initial program 76.2%
Taylor expanded in y.re around inf 80.3%
+-commutative80.3%
mul-1-neg80.3%
unsub-neg80.3%
associate-/l*81.4%
associate-/r/79.6%
Simplified79.6%
pow279.6%
associate-*l/80.3%
associate-/r*87.0%
Applied egg-rr87.0%
associate-/l/80.3%
times-frac84.5%
Applied egg-rr84.5%
associate-*r/84.4%
associate-/r/87.3%
Simplified87.3%
Final simplification81.3%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (or (<= y.im -2.05e-50) (not (<= y.im 3.8e-55))) (/ (- 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.05e-50) || !(y_46_im <= 3.8e-55)) {
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.05d-50)) .or. (.not. (y_46im <= 3.8d-55))) 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.05e-50) || !(y_46_im <= 3.8e-55)) {
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.05e-50) or not (y_46_im <= 3.8e-55): 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.05e-50) || !(y_46_im <= 3.8e-55)) 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.05e-50) || ~((y_46_im <= 3.8e-55))) 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.05e-50], N[Not[LessEqual[y$46$im, 3.8e-55]], $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.05 \cdot 10^{-50} \lor \neg \left(y.im \leq 3.8 \cdot 10^{-55}\right):\\
\;\;\;\;\frac{-x.re}{y.im}\\
\mathbf{else}:\\
\;\;\;\;\frac{x.im}{y.re}\\
\end{array}
\end{array}
if y.im < -2.04999999999999993e-50 or 3.7999999999999997e-55 < y.im Initial program 57.7%
Taylor expanded in y.re around 0 72.0%
associate-*r/72.0%
neg-mul-172.0%
Simplified72.0%
if -2.04999999999999993e-50 < y.im < 3.7999999999999997e-55Initial program 74.9%
Taylor expanded in y.re around inf 65.0%
Final simplification69.3%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (or (<= y.im -7.4e+158) (not (<= y.im 9e+166))) (/ 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 <= -7.4e+158) || !(y_46_im <= 9e+166)) {
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 <= (-7.4d+158)) .or. (.not. (y_46im <= 9d+166))) 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 <= -7.4e+158) || !(y_46_im <= 9e+166)) {
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 <= -7.4e+158) or not (y_46_im <= 9e+166): 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 <= -7.4e+158) || !(y_46_im <= 9e+166)) 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 <= -7.4e+158) || ~((y_46_im <= 9e+166))) 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, -7.4e+158], N[Not[LessEqual[y$46$im, 9e+166]], $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 -7.4 \cdot 10^{+158} \lor \neg \left(y.im \leq 9 \cdot 10^{+166}\right):\\
\;\;\;\;\frac{x.re}{y.im}\\
\mathbf{else}:\\
\;\;\;\;\frac{x.im}{y.re}\\
\end{array}
\end{array}
if y.im < -7.40000000000000021e158 or 9.00000000000000061e166 < y.im Initial program 31.6%
*-un-lft-identity31.6%
add-sqr-sqrt31.6%
times-frac31.6%
hypot-def31.6%
hypot-def60.4%
Applied egg-rr60.4%
Taylor expanded in y.re around 0 60.4%
neg-mul-160.4%
+-commutative60.4%
unsub-neg60.4%
associate-/l*62.0%
Simplified62.0%
Taylor expanded in y.im around -inf 32.1%
if -7.40000000000000021e158 < y.im < 9.00000000000000061e166Initial program 75.5%
Taylor expanded in y.re around inf 48.9%
Final simplification44.7%
(FPCore (x.re x.im y.re y.im) :precision binary64 (/ x.im y.im))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return x_46_im / y_46_im;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
code = x_46im / y_46im
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return x_46_im / y_46_im;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): return x_46_im / y_46_im
function code(x_46_re, x_46_im, y_46_re, y_46_im) return Float64(x_46_im / y_46_im) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = x_46_im / y_46_im; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[(x$46$im / y$46$im), $MachinePrecision]
\begin{array}{l}
\\
\frac{x.im}{y.im}
\end{array}
Initial program 64.5%
*-un-lft-identity64.5%
add-sqr-sqrt64.5%
times-frac64.5%
hypot-def64.5%
hypot-def78.0%
Applied egg-rr78.0%
Taylor expanded in y.re around 0 33.6%
neg-mul-133.6%
+-commutative33.6%
unsub-neg33.6%
associate-/l*33.6%
Simplified33.6%
Taylor expanded in y.re around inf 9.0%
Final simplification9.0%
(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.5%
Taylor expanded in y.re around inf 38.8%
Final simplification38.8%
herbie shell --seed 2024013
(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))))