
(FPCore (x.re x.im y.re y.im) :precision binary64 (/ (+ (* x.re y.re) (* x.im 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_re * y_46_re) + (x_46_im * 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_46re * y_46re) + (x_46im * 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_re * y_46_re) + (x_46_im * 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_re * y_46_re) + (x_46_im * 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_re * y_46_re) + Float64(x_46_im * 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_re * y_46_re) + (x_46_im * 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$re * y$46$re), $MachinePrecision] + N[(x$46$im * 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.re \cdot y.re + x.im \cdot y.im}{y.re \cdot y.re + y.im \cdot y.im}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 11 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x.re x.im y.re y.im) :precision binary64 (/ (+ (* x.re y.re) (* x.im 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_re * y_46_re) + (x_46_im * 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_46re * y_46re) + (x_46im * 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_re * y_46_re) + (x_46_im * 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_re * y_46_re) + (x_46_im * 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_re * y_46_re) + Float64(x_46_im * 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_re * y_46_re) + (x_46_im * 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$re * y$46$re), $MachinePrecision] + N[(x$46$im * 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.re \cdot y.re + x.im \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
(/ (+ (* x.re y.re) (* x.im y.im)) (+ (* y.re y.re) (* y.im y.im)))))
(if (<= t_0 (- INFINITY))
(/
(+ y.im (* (/ y.im x.im) (/ x.re (/ y.im y.re))))
(* y.im (/ y.im x.im)))
(if (<= t_0 1e+294)
(*
(/ 1.0 (hypot y.re y.im))
(/ (fma x.re y.re (* x.im y.im)) (hypot y.re y.im)))
(+ (/ x.im y.im) (/ (* y.re (/ x.re y.im)) y.im))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = ((x_46_re * y_46_re) + (x_46_im * y_46_im)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im));
double tmp;
if (t_0 <= -((double) INFINITY)) {
tmp = (y_46_im + ((y_46_im / x_46_im) * (x_46_re / (y_46_im / y_46_re)))) / (y_46_im * (y_46_im / x_46_im));
} else if (t_0 <= 1e+294) {
tmp = (1.0 / hypot(y_46_re, y_46_im)) * (fma(x_46_re, y_46_re, (x_46_im * y_46_im)) / hypot(y_46_re, y_46_im));
} else {
tmp = (x_46_im / y_46_im) + ((y_46_re * (x_46_re / y_46_im)) / y_46_im);
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(Float64(Float64(x_46_re * y_46_re) + Float64(x_46_im * y_46_im)) / Float64(Float64(y_46_re * y_46_re) + Float64(y_46_im * y_46_im))) tmp = 0.0 if (t_0 <= Float64(-Inf)) tmp = Float64(Float64(y_46_im + Float64(Float64(y_46_im / x_46_im) * Float64(x_46_re / Float64(y_46_im / y_46_re)))) / Float64(y_46_im * Float64(y_46_im / x_46_im))); elseif (t_0 <= 1e+294) tmp = Float64(Float64(1.0 / hypot(y_46_re, y_46_im)) * Float64(fma(x_46_re, y_46_re, Float64(x_46_im * y_46_im)) / hypot(y_46_re, y_46_im))); else tmp = Float64(Float64(x_46_im / y_46_im) + Float64(Float64(y_46_re * Float64(x_46_re / y_46_im)) / 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[(N[(x$46$re * y$46$re), $MachinePrecision] + N[(x$46$im * y$46$im), $MachinePrecision]), $MachinePrecision] / N[(N[(y$46$re * y$46$re), $MachinePrecision] + N[(y$46$im * y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, (-Infinity)], N[(N[(y$46$im + N[(N[(y$46$im / x$46$im), $MachinePrecision] * N[(x$46$re / N[(y$46$im / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y$46$im * N[(y$46$im / x$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 1e+294], N[(N[(1.0 / N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision]), $MachinePrecision] * N[(N[(x$46$re * y$46$re + N[(x$46$im * y$46$im), $MachinePrecision]), $MachinePrecision] / N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x$46$im / y$46$im), $MachinePrecision] + N[(N[(y$46$re * N[(x$46$re / y$46$im), $MachinePrecision]), $MachinePrecision] / y$46$im), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x.re \cdot y.re + x.im \cdot y.im}{y.re \cdot y.re + y.im \cdot y.im}\\
\mathbf{if}\;t_0 \leq -\infty:\\
\;\;\;\;\frac{y.im + \frac{y.im}{x.im} \cdot \frac{x.re}{\frac{y.im}{y.re}}}{y.im \cdot \frac{y.im}{x.im}}\\
\mathbf{elif}\;t_0 \leq 10^{+294}:\\
\;\;\;\;\frac{1}{\mathsf{hypot}\left(y.re, y.im\right)} \cdot \frac{\mathsf{fma}\left(x.re, y.re, x.im \cdot y.im\right)}{\mathsf{hypot}\left(y.re, y.im\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x.im}{y.im} + \frac{y.re \cdot \frac{x.re}{y.im}}{y.im}\\
\end{array}
\end{array}
if (/.f64 (+.f64 (*.f64 x.re y.re) (*.f64 x.im y.im)) (+.f64 (*.f64 y.re y.re) (*.f64 y.im y.im))) < -inf.0Initial program 49.5%
Taylor expanded in y.re around 0 67.2%
associate-/l*73.7%
associate-/r/73.7%
Simplified73.7%
*-un-lft-identity73.7%
unpow273.7%
times-frac80.0%
Applied egg-rr80.0%
associate-*l/80.0%
*-un-lft-identity80.0%
associate-*l/80.0%
Applied egg-rr80.0%
clear-num79.8%
frac-add73.8%
*-un-lft-identity73.8%
associate-*l/81.0%
associate-/l*87.1%
Applied egg-rr87.1%
if -inf.0 < (/.f64 (+.f64 (*.f64 x.re y.re) (*.f64 x.im y.im)) (+.f64 (*.f64 y.re y.re) (*.f64 y.im y.im))) < 1.00000000000000007e294Initial program 79.2%
*-un-lft-identity79.2%
+-commutative79.2%
fma-udef79.2%
add-sqr-sqrt79.2%
times-frac79.2%
fma-udef79.2%
+-commutative79.2%
hypot-def79.2%
fma-def79.2%
fma-udef79.2%
+-commutative79.2%
hypot-def99.0%
Applied egg-rr99.0%
if 1.00000000000000007e294 < (/.f64 (+.f64 (*.f64 x.re y.re) (*.f64 x.im y.im)) (+.f64 (*.f64 y.re y.re) (*.f64 y.im y.im))) Initial program 9.5%
Taylor expanded in y.re around 0 40.8%
associate-/l*45.5%
associate-/r/45.5%
Simplified45.5%
*-un-lft-identity45.5%
unpow245.5%
times-frac54.6%
Applied egg-rr54.6%
associate-*l/54.5%
*-un-lft-identity54.5%
associate-*l/58.0%
Applied egg-rr58.0%
Final simplification91.0%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (<= y.im -1.16e+63)
(+ (/ x.im y.im) (/ (* x.re (/ y.re y.im)) y.im))
(if (<= y.im -1.4e-83)
(/ (+ (* x.re y.re) (* x.im y.im)) (+ (* y.re y.re) (* y.im y.im)))
(if (<= y.im 4.2e-96)
(+ (/ x.re y.re) (/ x.im (/ (pow y.re 2.0) y.im)))
(if (<= y.im 2.25e+63)
(/ (fma x.re y.re (* x.im y.im)) (fma y.im y.im (* y.re y.re)))
(* (/ 1.0 (hypot y.re y.im)) (+ x.im (* y.re (/ 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.16e+63) {
tmp = (x_46_im / y_46_im) + ((x_46_re * (y_46_re / y_46_im)) / y_46_im);
} else if (y_46_im <= -1.4e-83) {
tmp = ((x_46_re * y_46_re) + (x_46_im * y_46_im)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im));
} else if (y_46_im <= 4.2e-96) {
tmp = (x_46_re / y_46_re) + (x_46_im / (pow(y_46_re, 2.0) / y_46_im));
} else if (y_46_im <= 2.25e+63) {
tmp = fma(x_46_re, y_46_re, (x_46_im * y_46_im)) / fma(y_46_im, y_46_im, (y_46_re * y_46_re));
} else {
tmp = (1.0 / hypot(y_46_re, y_46_im)) * (x_46_im + (y_46_re * (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.16e+63) tmp = Float64(Float64(x_46_im / y_46_im) + Float64(Float64(x_46_re * Float64(y_46_re / y_46_im)) / y_46_im)); elseif (y_46_im <= -1.4e-83) tmp = Float64(Float64(Float64(x_46_re * y_46_re) + Float64(x_46_im * y_46_im)) / Float64(Float64(y_46_re * y_46_re) + Float64(y_46_im * y_46_im))); elseif (y_46_im <= 4.2e-96) tmp = Float64(Float64(x_46_re / y_46_re) + Float64(x_46_im / Float64((y_46_re ^ 2.0) / y_46_im))); elseif (y_46_im <= 2.25e+63) tmp = Float64(fma(x_46_re, y_46_re, Float64(x_46_im * y_46_im)) / fma(y_46_im, y_46_im, Float64(y_46_re * y_46_re))); else tmp = Float64(Float64(1.0 / hypot(y_46_re, y_46_im)) * Float64(x_46_im + Float64(y_46_re * Float64(x_46_re / y_46_im)))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[y$46$im, -1.16e+63], N[(N[(x$46$im / y$46$im), $MachinePrecision] + N[(N[(x$46$re * N[(y$46$re / y$46$im), $MachinePrecision]), $MachinePrecision] / y$46$im), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, -1.4e-83], N[(N[(N[(x$46$re * y$46$re), $MachinePrecision] + N[(x$46$im * y$46$im), $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.2e-96], N[(N[(x$46$re / y$46$re), $MachinePrecision] + N[(x$46$im / N[(N[Power[y$46$re, 2.0], $MachinePrecision] / y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 2.25e+63], N[(N[(x$46$re * y$46$re + N[(x$46$im * y$46$im), $MachinePrecision]), $MachinePrecision] / N[(y$46$im * y$46$im + N[(y$46$re * y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision]), $MachinePrecision] * N[(x$46$im + N[(y$46$re * N[(x$46$re / y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.im \leq -1.16 \cdot 10^{+63}:\\
\;\;\;\;\frac{x.im}{y.im} + \frac{x.re \cdot \frac{y.re}{y.im}}{y.im}\\
\mathbf{elif}\;y.im \leq -1.4 \cdot 10^{-83}:\\
\;\;\;\;\frac{x.re \cdot y.re + x.im \cdot y.im}{y.re \cdot y.re + y.im \cdot y.im}\\
\mathbf{elif}\;y.im \leq 4.2 \cdot 10^{-96}:\\
\;\;\;\;\frac{x.re}{y.re} + \frac{x.im}{\frac{{y.re}^{2}}{y.im}}\\
\mathbf{elif}\;y.im \leq 2.25 \cdot 10^{+63}:\\
\;\;\;\;\frac{\mathsf{fma}\left(x.re, y.re, x.im \cdot y.im\right)}{\mathsf{fma}\left(y.im, y.im, y.re \cdot y.re\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\mathsf{hypot}\left(y.re, y.im\right)} \cdot \left(x.im + y.re \cdot \frac{x.re}{y.im}\right)\\
\end{array}
\end{array}
if y.im < -1.15999999999999994e63Initial program 37.8%
Taylor expanded in y.re around 0 81.8%
associate-/l*80.6%
associate-/r/83.7%
Simplified83.7%
*-un-lft-identity83.7%
unpow283.7%
times-frac89.8%
Applied egg-rr89.8%
associate-*l/89.8%
*-un-lft-identity89.8%
associate-*l/92.1%
Applied egg-rr92.1%
Taylor expanded in x.re around 0 87.3%
*-commutative87.3%
associate-*l/92.1%
*-commutative92.1%
Simplified92.1%
if -1.15999999999999994e63 < y.im < -1.4e-83Initial program 83.7%
if -1.4e-83 < y.im < 4.20000000000000002e-96Initial program 78.8%
Taylor expanded in y.re around inf 89.9%
associate-/l*90.1%
Simplified90.1%
if 4.20000000000000002e-96 < y.im < 2.25000000000000008e63Initial program 76.6%
fma-def76.6%
+-commutative76.6%
fma-def76.6%
Simplified76.6%
if 2.25000000000000008e63 < y.im Initial program 55.5%
*-un-lft-identity55.5%
+-commutative55.5%
fma-udef55.5%
add-sqr-sqrt55.5%
times-frac55.4%
fma-udef55.4%
+-commutative55.4%
hypot-def55.4%
fma-def55.4%
fma-udef55.4%
+-commutative55.4%
hypot-def71.6%
Applied egg-rr71.6%
Taylor expanded in y.re around 0 80.0%
associate-/l*82.0%
associate-/r/84.1%
Simplified84.1%
Final simplification86.7%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0
(/ (+ (* x.re y.re) (* x.im y.im)) (+ (* y.re y.re) (* y.im y.im)))))
(if (<= y.im -6.6e+64)
(+ (/ x.im y.im) (/ (* x.re (/ y.re y.im)) y.im))
(if (<= y.im -4.2e-83)
t_0
(if (<= y.im 3.55e-97)
(+ (/ x.re y.re) (/ x.im (/ (pow y.re 2.0) y.im)))
(if (<= y.im 5.8e+65)
t_0
(* (/ 1.0 (hypot y.re y.im)) (+ x.im (* y.re (/ x.re y.im))))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = ((x_46_re * y_46_re) + (x_46_im * y_46_im)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im));
double tmp;
if (y_46_im <= -6.6e+64) {
tmp = (x_46_im / y_46_im) + ((x_46_re * (y_46_re / y_46_im)) / y_46_im);
} else if (y_46_im <= -4.2e-83) {
tmp = t_0;
} else if (y_46_im <= 3.55e-97) {
tmp = (x_46_re / y_46_re) + (x_46_im / (pow(y_46_re, 2.0) / y_46_im));
} else if (y_46_im <= 5.8e+65) {
tmp = t_0;
} else {
tmp = (1.0 / hypot(y_46_re, y_46_im)) * (x_46_im + (y_46_re * (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 t_0 = ((x_46_re * y_46_re) + (x_46_im * y_46_im)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im));
double tmp;
if (y_46_im <= -6.6e+64) {
tmp = (x_46_im / y_46_im) + ((x_46_re * (y_46_re / y_46_im)) / y_46_im);
} else if (y_46_im <= -4.2e-83) {
tmp = t_0;
} else if (y_46_im <= 3.55e-97) {
tmp = (x_46_re / y_46_re) + (x_46_im / (Math.pow(y_46_re, 2.0) / y_46_im));
} else if (y_46_im <= 5.8e+65) {
tmp = t_0;
} else {
tmp = (1.0 / Math.hypot(y_46_re, y_46_im)) * (x_46_im + (y_46_re * (x_46_re / y_46_im)));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = ((x_46_re * y_46_re) + (x_46_im * y_46_im)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im)) tmp = 0 if y_46_im <= -6.6e+64: tmp = (x_46_im / y_46_im) + ((x_46_re * (y_46_re / y_46_im)) / y_46_im) elif y_46_im <= -4.2e-83: tmp = t_0 elif y_46_im <= 3.55e-97: tmp = (x_46_re / y_46_re) + (x_46_im / (math.pow(y_46_re, 2.0) / y_46_im)) elif y_46_im <= 5.8e+65: tmp = t_0 else: tmp = (1.0 / math.hypot(y_46_re, y_46_im)) * (x_46_im + (y_46_re * (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(Float64(x_46_re * y_46_re) + Float64(x_46_im * y_46_im)) / Float64(Float64(y_46_re * y_46_re) + Float64(y_46_im * y_46_im))) tmp = 0.0 if (y_46_im <= -6.6e+64) tmp = Float64(Float64(x_46_im / y_46_im) + Float64(Float64(x_46_re * Float64(y_46_re / y_46_im)) / y_46_im)); elseif (y_46_im <= -4.2e-83) tmp = t_0; elseif (y_46_im <= 3.55e-97) tmp = Float64(Float64(x_46_re / y_46_re) + Float64(x_46_im / Float64((y_46_re ^ 2.0) / y_46_im))); elseif (y_46_im <= 5.8e+65) tmp = t_0; else tmp = Float64(Float64(1.0 / hypot(y_46_re, y_46_im)) * Float64(x_46_im + Float64(y_46_re * Float64(x_46_re / y_46_im)))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = ((x_46_re * y_46_re) + (x_46_im * y_46_im)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im)); tmp = 0.0; if (y_46_im <= -6.6e+64) tmp = (x_46_im / y_46_im) + ((x_46_re * (y_46_re / y_46_im)) / y_46_im); elseif (y_46_im <= -4.2e-83) tmp = t_0; elseif (y_46_im <= 3.55e-97) tmp = (x_46_re / y_46_re) + (x_46_im / ((y_46_re ^ 2.0) / y_46_im)); elseif (y_46_im <= 5.8e+65) tmp = t_0; else tmp = (1.0 / hypot(y_46_re, y_46_im)) * (x_46_im + (y_46_re * (x_46_re / y_46_im))); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[(N[(x$46$re * y$46$re), $MachinePrecision] + N[(x$46$im * y$46$im), $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, -6.6e+64], N[(N[(x$46$im / y$46$im), $MachinePrecision] + N[(N[(x$46$re * N[(y$46$re / y$46$im), $MachinePrecision]), $MachinePrecision] / y$46$im), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, -4.2e-83], t$95$0, If[LessEqual[y$46$im, 3.55e-97], N[(N[(x$46$re / y$46$re), $MachinePrecision] + N[(x$46$im / N[(N[Power[y$46$re, 2.0], $MachinePrecision] / y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 5.8e+65], t$95$0, N[(N[(1.0 / N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision]), $MachinePrecision] * N[(x$46$im + N[(y$46$re * N[(x$46$re / y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x.re \cdot y.re + x.im \cdot y.im}{y.re \cdot y.re + y.im \cdot y.im}\\
\mathbf{if}\;y.im \leq -6.6 \cdot 10^{+64}:\\
\;\;\;\;\frac{x.im}{y.im} + \frac{x.re \cdot \frac{y.re}{y.im}}{y.im}\\
\mathbf{elif}\;y.im \leq -4.2 \cdot 10^{-83}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y.im \leq 3.55 \cdot 10^{-97}:\\
\;\;\;\;\frac{x.re}{y.re} + \frac{x.im}{\frac{{y.re}^{2}}{y.im}}\\
\mathbf{elif}\;y.im \leq 5.8 \cdot 10^{+65}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\mathsf{hypot}\left(y.re, y.im\right)} \cdot \left(x.im + y.re \cdot \frac{x.re}{y.im}\right)\\
\end{array}
\end{array}
if y.im < -6.59999999999999976e64Initial program 37.8%
Taylor expanded in y.re around 0 81.8%
associate-/l*80.6%
associate-/r/83.7%
Simplified83.7%
*-un-lft-identity83.7%
unpow283.7%
times-frac89.8%
Applied egg-rr89.8%
associate-*l/89.8%
*-un-lft-identity89.8%
associate-*l/92.1%
Applied egg-rr92.1%
Taylor expanded in x.re around 0 87.3%
*-commutative87.3%
associate-*l/92.1%
*-commutative92.1%
Simplified92.1%
if -6.59999999999999976e64 < y.im < -4.1999999999999998e-83 or 3.55000000000000008e-97 < y.im < 5.8000000000000001e65Initial program 79.7%
if -4.1999999999999998e-83 < y.im < 3.55000000000000008e-97Initial program 78.8%
Taylor expanded in y.re around inf 89.9%
associate-/l*90.1%
Simplified90.1%
if 5.8000000000000001e65 < y.im Initial program 55.5%
*-un-lft-identity55.5%
+-commutative55.5%
fma-udef55.5%
add-sqr-sqrt55.5%
times-frac55.4%
fma-udef55.4%
+-commutative55.4%
hypot-def55.4%
fma-def55.4%
fma-udef55.4%
+-commutative55.4%
hypot-def71.6%
Applied egg-rr71.6%
Taylor expanded in y.re around 0 80.0%
associate-/l*82.0%
associate-/r/84.1%
Simplified84.1%
Final simplification86.7%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0
(/ (+ (* x.re y.re) (* x.im y.im)) (+ (* y.re y.re) (* y.im y.im)))))
(if (<= y.im -2.05e+64)
(+ (/ x.im y.im) (/ (* x.re (/ y.re y.im)) y.im))
(if (<= y.im -4.4e-83)
t_0
(if (<= y.im 1.9e-97)
(+ (/ x.re y.re) (/ x.im (/ (pow y.re 2.0) y.im)))
(if (<= y.im 3.3e+60)
t_0
(+ (/ x.im y.im) (/ (* y.re (/ x.re y.im)) y.im))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = ((x_46_re * y_46_re) + (x_46_im * y_46_im)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im));
double tmp;
if (y_46_im <= -2.05e+64) {
tmp = (x_46_im / y_46_im) + ((x_46_re * (y_46_re / y_46_im)) / y_46_im);
} else if (y_46_im <= -4.4e-83) {
tmp = t_0;
} else if (y_46_im <= 1.9e-97) {
tmp = (x_46_re / y_46_re) + (x_46_im / (pow(y_46_re, 2.0) / y_46_im));
} else if (y_46_im <= 3.3e+60) {
tmp = t_0;
} else {
tmp = (x_46_im / y_46_im) + ((y_46_re * (x_46_re / y_46_im)) / y_46_im);
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
real(8) :: tmp
t_0 = ((x_46re * y_46re) + (x_46im * y_46im)) / ((y_46re * y_46re) + (y_46im * y_46im))
if (y_46im <= (-2.05d+64)) then
tmp = (x_46im / y_46im) + ((x_46re * (y_46re / y_46im)) / y_46im)
else if (y_46im <= (-4.4d-83)) then
tmp = t_0
else if (y_46im <= 1.9d-97) then
tmp = (x_46re / y_46re) + (x_46im / ((y_46re ** 2.0d0) / y_46im))
else if (y_46im <= 3.3d+60) then
tmp = t_0
else
tmp = (x_46im / y_46im) + ((y_46re * (x_46re / y_46im)) / y_46im)
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = ((x_46_re * y_46_re) + (x_46_im * y_46_im)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im));
double tmp;
if (y_46_im <= -2.05e+64) {
tmp = (x_46_im / y_46_im) + ((x_46_re * (y_46_re / y_46_im)) / y_46_im);
} else if (y_46_im <= -4.4e-83) {
tmp = t_0;
} else if (y_46_im <= 1.9e-97) {
tmp = (x_46_re / y_46_re) + (x_46_im / (Math.pow(y_46_re, 2.0) / y_46_im));
} else if (y_46_im <= 3.3e+60) {
tmp = t_0;
} else {
tmp = (x_46_im / y_46_im) + ((y_46_re * (x_46_re / y_46_im)) / y_46_im);
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = ((x_46_re * y_46_re) + (x_46_im * y_46_im)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im)) tmp = 0 if y_46_im <= -2.05e+64: tmp = (x_46_im / y_46_im) + ((x_46_re * (y_46_re / y_46_im)) / y_46_im) elif y_46_im <= -4.4e-83: tmp = t_0 elif y_46_im <= 1.9e-97: tmp = (x_46_re / y_46_re) + (x_46_im / (math.pow(y_46_re, 2.0) / y_46_im)) elif y_46_im <= 3.3e+60: tmp = t_0 else: tmp = (x_46_im / y_46_im) + ((y_46_re * (x_46_re / y_46_im)) / y_46_im) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(Float64(Float64(x_46_re * y_46_re) + Float64(x_46_im * y_46_im)) / Float64(Float64(y_46_re * y_46_re) + Float64(y_46_im * y_46_im))) tmp = 0.0 if (y_46_im <= -2.05e+64) tmp = Float64(Float64(x_46_im / y_46_im) + Float64(Float64(x_46_re * Float64(y_46_re / y_46_im)) / y_46_im)); elseif (y_46_im <= -4.4e-83) tmp = t_0; elseif (y_46_im <= 1.9e-97) tmp = Float64(Float64(x_46_re / y_46_re) + Float64(x_46_im / Float64((y_46_re ^ 2.0) / y_46_im))); elseif (y_46_im <= 3.3e+60) tmp = t_0; else tmp = Float64(Float64(x_46_im / y_46_im) + Float64(Float64(y_46_re * Float64(x_46_re / y_46_im)) / y_46_im)); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = ((x_46_re * y_46_re) + (x_46_im * y_46_im)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im)); tmp = 0.0; if (y_46_im <= -2.05e+64) tmp = (x_46_im / y_46_im) + ((x_46_re * (y_46_re / y_46_im)) / y_46_im); elseif (y_46_im <= -4.4e-83) tmp = t_0; elseif (y_46_im <= 1.9e-97) tmp = (x_46_re / y_46_re) + (x_46_im / ((y_46_re ^ 2.0) / y_46_im)); elseif (y_46_im <= 3.3e+60) tmp = t_0; else tmp = (x_46_im / y_46_im) + ((y_46_re * (x_46_re / y_46_im)) / y_46_im); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[(N[(x$46$re * y$46$re), $MachinePrecision] + N[(x$46$im * y$46$im), $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, -2.05e+64], N[(N[(x$46$im / y$46$im), $MachinePrecision] + N[(N[(x$46$re * N[(y$46$re / y$46$im), $MachinePrecision]), $MachinePrecision] / y$46$im), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, -4.4e-83], t$95$0, If[LessEqual[y$46$im, 1.9e-97], N[(N[(x$46$re / y$46$re), $MachinePrecision] + N[(x$46$im / N[(N[Power[y$46$re, 2.0], $MachinePrecision] / y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 3.3e+60], t$95$0, N[(N[(x$46$im / y$46$im), $MachinePrecision] + N[(N[(y$46$re * N[(x$46$re / y$46$im), $MachinePrecision]), $MachinePrecision] / y$46$im), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x.re \cdot y.re + x.im \cdot y.im}{y.re \cdot y.re + y.im \cdot y.im}\\
\mathbf{if}\;y.im \leq -2.05 \cdot 10^{+64}:\\
\;\;\;\;\frac{x.im}{y.im} + \frac{x.re \cdot \frac{y.re}{y.im}}{y.im}\\
\mathbf{elif}\;y.im \leq -4.4 \cdot 10^{-83}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y.im \leq 1.9 \cdot 10^{-97}:\\
\;\;\;\;\frac{x.re}{y.re} + \frac{x.im}{\frac{{y.re}^{2}}{y.im}}\\
\mathbf{elif}\;y.im \leq 3.3 \cdot 10^{+60}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{x.im}{y.im} + \frac{y.re \cdot \frac{x.re}{y.im}}{y.im}\\
\end{array}
\end{array}
if y.im < -2.04999999999999989e64Initial program 37.8%
Taylor expanded in y.re around 0 81.8%
associate-/l*80.6%
associate-/r/83.7%
Simplified83.7%
*-un-lft-identity83.7%
unpow283.7%
times-frac89.8%
Applied egg-rr89.8%
associate-*l/89.8%
*-un-lft-identity89.8%
associate-*l/92.1%
Applied egg-rr92.1%
Taylor expanded in x.re around 0 87.3%
*-commutative87.3%
associate-*l/92.1%
*-commutative92.1%
Simplified92.1%
if -2.04999999999999989e64 < y.im < -4.40000000000000015e-83 or 1.9e-97 < y.im < 3.2999999999999998e60Initial program 79.7%
if -4.40000000000000015e-83 < y.im < 1.9e-97Initial program 78.8%
Taylor expanded in y.re around inf 89.9%
associate-/l*90.1%
Simplified90.1%
if 3.2999999999999998e60 < y.im Initial program 55.5%
Taylor expanded in y.re around 0 78.3%
associate-/l*78.4%
associate-/r/80.4%
Simplified80.4%
*-un-lft-identity80.4%
unpow280.4%
times-frac81.2%
Applied egg-rr81.2%
associate-*l/81.1%
*-un-lft-identity81.1%
associate-*l/82.4%
Applied egg-rr82.4%
Final simplification86.4%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (or (<= y.im -1.05e-57)
(not (or (<= y.im 4e-88) (and (not (<= y.im 3.2)) (<= y.im 4e+39)))))
(+ (/ x.im y.im) (* y.re (/ x.re (* y.im y.im))))
(/ x.re y.re)))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_im <= -1.05e-57) || !((y_46_im <= 4e-88) || (!(y_46_im <= 3.2) && (y_46_im <= 4e+39)))) {
tmp = (x_46_im / y_46_im) + (y_46_re * (x_46_re / (y_46_im * y_46_im)));
} else {
tmp = x_46_re / y_46_re;
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: tmp
if ((y_46im <= (-1.05d-57)) .or. (.not. (y_46im <= 4d-88) .or. (.not. (y_46im <= 3.2d0)) .and. (y_46im <= 4d+39))) then
tmp = (x_46im / y_46im) + (y_46re * (x_46re / (y_46im * y_46im)))
else
tmp = x_46re / y_46re
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_im <= -1.05e-57) || !((y_46_im <= 4e-88) || (!(y_46_im <= 3.2) && (y_46_im <= 4e+39)))) {
tmp = (x_46_im / y_46_im) + (y_46_re * (x_46_re / (y_46_im * y_46_im)));
} else {
tmp = x_46_re / y_46_re;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if (y_46_im <= -1.05e-57) or not ((y_46_im <= 4e-88) or (not (y_46_im <= 3.2) and (y_46_im <= 4e+39))): tmp = (x_46_im / y_46_im) + (y_46_re * (x_46_re / (y_46_im * y_46_im))) else: tmp = x_46_re / y_46_re return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if ((y_46_im <= -1.05e-57) || !((y_46_im <= 4e-88) || (!(y_46_im <= 3.2) && (y_46_im <= 4e+39)))) tmp = Float64(Float64(x_46_im / y_46_im) + Float64(y_46_re * Float64(x_46_re / Float64(y_46_im * y_46_im)))); else tmp = Float64(x_46_re / y_46_re); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if ((y_46_im <= -1.05e-57) || ~(((y_46_im <= 4e-88) || (~((y_46_im <= 3.2)) && (y_46_im <= 4e+39))))) tmp = (x_46_im / y_46_im) + (y_46_re * (x_46_re / (y_46_im * y_46_im))); else tmp = x_46_re / y_46_re; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[Or[LessEqual[y$46$im, -1.05e-57], N[Not[Or[LessEqual[y$46$im, 4e-88], And[N[Not[LessEqual[y$46$im, 3.2]], $MachinePrecision], LessEqual[y$46$im, 4e+39]]]], $MachinePrecision]], N[(N[(x$46$im / y$46$im), $MachinePrecision] + N[(y$46$re * N[(x$46$re / N[(y$46$im * y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x$46$re / y$46$re), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.im \leq -1.05 \cdot 10^{-57} \lor \neg \left(y.im \leq 4 \cdot 10^{-88} \lor \neg \left(y.im \leq 3.2\right) \land y.im \leq 4 \cdot 10^{+39}\right):\\
\;\;\;\;\frac{x.im}{y.im} + y.re \cdot \frac{x.re}{y.im \cdot y.im}\\
\mathbf{else}:\\
\;\;\;\;\frac{x.re}{y.re}\\
\end{array}
\end{array}
if y.im < -1.05e-57 or 3.99999999999999974e-88 < y.im < 3.2000000000000002 or 3.99999999999999976e39 < y.im Initial program 57.6%
Taylor expanded in y.re around 0 73.4%
associate-/l*73.5%
associate-/r/74.7%
Simplified74.7%
unpow274.7%
Applied egg-rr74.7%
if -1.05e-57 < y.im < 3.99999999999999974e-88 or 3.2000000000000002 < y.im < 3.99999999999999976e39Initial program 77.2%
Taylor expanded in y.re around inf 72.5%
Final simplification73.9%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (+ (/ x.im y.im) (* y.re (/ (/ x.re y.im) y.im)))))
(if (<= y.im -1.2e-57)
t_0
(if (<= y.im 5.6e-89)
(/ x.re y.re)
(if (<= y.im 4.0)
(+ (/ x.im y.im) (* y.re (/ x.re (* y.im y.im))))
(if (<= y.im 4.1e+40) (/ x.re y.re) t_0))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = (x_46_im / y_46_im) + (y_46_re * ((x_46_re / y_46_im) / y_46_im));
double tmp;
if (y_46_im <= -1.2e-57) {
tmp = t_0;
} else if (y_46_im <= 5.6e-89) {
tmp = x_46_re / y_46_re;
} else if (y_46_im <= 4.0) {
tmp = (x_46_im / y_46_im) + (y_46_re * (x_46_re / (y_46_im * y_46_im)));
} else if (y_46_im <= 4.1e+40) {
tmp = x_46_re / y_46_re;
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
real(8) :: tmp
t_0 = (x_46im / y_46im) + (y_46re * ((x_46re / y_46im) / y_46im))
if (y_46im <= (-1.2d-57)) then
tmp = t_0
else if (y_46im <= 5.6d-89) then
tmp = x_46re / y_46re
else if (y_46im <= 4.0d0) then
tmp = (x_46im / y_46im) + (y_46re * (x_46re / (y_46im * y_46im)))
else if (y_46im <= 4.1d+40) then
tmp = x_46re / y_46re
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = (x_46_im / y_46_im) + (y_46_re * ((x_46_re / y_46_im) / y_46_im));
double tmp;
if (y_46_im <= -1.2e-57) {
tmp = t_0;
} else if (y_46_im <= 5.6e-89) {
tmp = x_46_re / y_46_re;
} else if (y_46_im <= 4.0) {
tmp = (x_46_im / y_46_im) + (y_46_re * (x_46_re / (y_46_im * y_46_im)));
} else if (y_46_im <= 4.1e+40) {
tmp = x_46_re / y_46_re;
} else {
tmp = t_0;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = (x_46_im / y_46_im) + (y_46_re * ((x_46_re / y_46_im) / y_46_im)) tmp = 0 if y_46_im <= -1.2e-57: tmp = t_0 elif y_46_im <= 5.6e-89: tmp = x_46_re / y_46_re elif y_46_im <= 4.0: tmp = (x_46_im / y_46_im) + (y_46_re * (x_46_re / (y_46_im * y_46_im))) elif y_46_im <= 4.1e+40: tmp = x_46_re / y_46_re else: tmp = t_0 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(Float64(x_46_im / y_46_im) + Float64(y_46_re * Float64(Float64(x_46_re / y_46_im) / y_46_im))) tmp = 0.0 if (y_46_im <= -1.2e-57) tmp = t_0; elseif (y_46_im <= 5.6e-89) tmp = Float64(x_46_re / y_46_re); elseif (y_46_im <= 4.0) tmp = Float64(Float64(x_46_im / y_46_im) + Float64(y_46_re * Float64(x_46_re / Float64(y_46_im * y_46_im)))); elseif (y_46_im <= 4.1e+40) tmp = Float64(x_46_re / y_46_re); else tmp = t_0; end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = (x_46_im / y_46_im) + (y_46_re * ((x_46_re / y_46_im) / y_46_im)); tmp = 0.0; if (y_46_im <= -1.2e-57) tmp = t_0; elseif (y_46_im <= 5.6e-89) tmp = x_46_re / y_46_re; elseif (y_46_im <= 4.0) tmp = (x_46_im / y_46_im) + (y_46_re * (x_46_re / (y_46_im * y_46_im))); elseif (y_46_im <= 4.1e+40) tmp = x_46_re / y_46_re; else tmp = t_0; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[(x$46$im / y$46$im), $MachinePrecision] + N[(y$46$re * N[(N[(x$46$re / y$46$im), $MachinePrecision] / y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -1.2e-57], t$95$0, If[LessEqual[y$46$im, 5.6e-89], N[(x$46$re / y$46$re), $MachinePrecision], If[LessEqual[y$46$im, 4.0], N[(N[(x$46$im / y$46$im), $MachinePrecision] + N[(y$46$re * N[(x$46$re / N[(y$46$im * y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 4.1e+40], N[(x$46$re / y$46$re), $MachinePrecision], t$95$0]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x.im}{y.im} + y.re \cdot \frac{\frac{x.re}{y.im}}{y.im}\\
\mathbf{if}\;y.im \leq -1.2 \cdot 10^{-57}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y.im \leq 5.6 \cdot 10^{-89}:\\
\;\;\;\;\frac{x.re}{y.re}\\
\mathbf{elif}\;y.im \leq 4:\\
\;\;\;\;\frac{x.im}{y.im} + y.re \cdot \frac{x.re}{y.im \cdot y.im}\\
\mathbf{elif}\;y.im \leq 4.1 \cdot 10^{+40}:\\
\;\;\;\;\frac{x.re}{y.re}\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if y.im < -1.20000000000000003e-57 or 4.1000000000000002e40 < y.im Initial program 54.5%
Taylor expanded in y.re around 0 74.0%
associate-/l*74.2%
associate-/r/76.3%
Simplified76.3%
*-un-lft-identity76.3%
unpow276.3%
times-frac79.2%
Applied egg-rr79.2%
associate-*l/79.2%
*-un-lft-identity79.2%
Applied egg-rr79.2%
if -1.20000000000000003e-57 < y.im < 5.5999999999999998e-89 or 4 < y.im < 4.1000000000000002e40Initial program 77.2%
Taylor expanded in y.re around inf 72.5%
if 5.5999999999999998e-89 < y.im < 4Initial program 77.6%
Taylor expanded in y.re around 0 69.2%
associate-/l*69.3%
associate-/r/65.0%
Simplified65.0%
unpow265.0%
Applied egg-rr65.0%
Final simplification75.5%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (+ (/ x.im y.im) (/ (* x.re (/ y.re y.im)) y.im))))
(if (<= y.im -1.16e-57)
t_0
(if (<= y.im 1.15e-102)
(/ x.re y.re)
(if (<= y.im 4.0)
t_0
(if (<= y.im 4e+39)
(/ x.re y.re)
(+ (/ x.im y.im) (* y.re (/ (/ x.re y.im) y.im)))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = (x_46_im / y_46_im) + ((x_46_re * (y_46_re / y_46_im)) / y_46_im);
double tmp;
if (y_46_im <= -1.16e-57) {
tmp = t_0;
} else if (y_46_im <= 1.15e-102) {
tmp = x_46_re / y_46_re;
} else if (y_46_im <= 4.0) {
tmp = t_0;
} else if (y_46_im <= 4e+39) {
tmp = x_46_re / y_46_re;
} else {
tmp = (x_46_im / y_46_im) + (y_46_re * ((x_46_re / y_46_im) / y_46_im));
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
real(8) :: tmp
t_0 = (x_46im / y_46im) + ((x_46re * (y_46re / y_46im)) / y_46im)
if (y_46im <= (-1.16d-57)) then
tmp = t_0
else if (y_46im <= 1.15d-102) then
tmp = x_46re / y_46re
else if (y_46im <= 4.0d0) then
tmp = t_0
else if (y_46im <= 4d+39) then
tmp = x_46re / y_46re
else
tmp = (x_46im / y_46im) + (y_46re * ((x_46re / y_46im) / y_46im))
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = (x_46_im / y_46_im) + ((x_46_re * (y_46_re / y_46_im)) / y_46_im);
double tmp;
if (y_46_im <= -1.16e-57) {
tmp = t_0;
} else if (y_46_im <= 1.15e-102) {
tmp = x_46_re / y_46_re;
} else if (y_46_im <= 4.0) {
tmp = t_0;
} else if (y_46_im <= 4e+39) {
tmp = x_46_re / y_46_re;
} else {
tmp = (x_46_im / y_46_im) + (y_46_re * ((x_46_re / y_46_im) / y_46_im));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = (x_46_im / y_46_im) + ((x_46_re * (y_46_re / y_46_im)) / y_46_im) tmp = 0 if y_46_im <= -1.16e-57: tmp = t_0 elif y_46_im <= 1.15e-102: tmp = x_46_re / y_46_re elif y_46_im <= 4.0: tmp = t_0 elif y_46_im <= 4e+39: tmp = x_46_re / y_46_re else: tmp = (x_46_im / y_46_im) + (y_46_re * ((x_46_re / y_46_im) / y_46_im)) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(Float64(x_46_im / y_46_im) + Float64(Float64(x_46_re * Float64(y_46_re / y_46_im)) / y_46_im)) tmp = 0.0 if (y_46_im <= -1.16e-57) tmp = t_0; elseif (y_46_im <= 1.15e-102) tmp = Float64(x_46_re / y_46_re); elseif (y_46_im <= 4.0) tmp = t_0; elseif (y_46_im <= 4e+39) tmp = Float64(x_46_re / y_46_re); else tmp = Float64(Float64(x_46_im / y_46_im) + Float64(y_46_re * Float64(Float64(x_46_re / y_46_im) / y_46_im))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = (x_46_im / y_46_im) + ((x_46_re * (y_46_re / y_46_im)) / y_46_im); tmp = 0.0; if (y_46_im <= -1.16e-57) tmp = t_0; elseif (y_46_im <= 1.15e-102) tmp = x_46_re / y_46_re; elseif (y_46_im <= 4.0) tmp = t_0; elseif (y_46_im <= 4e+39) tmp = x_46_re / y_46_re; else tmp = (x_46_im / y_46_im) + (y_46_re * ((x_46_re / y_46_im) / y_46_im)); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[(x$46$im / y$46$im), $MachinePrecision] + N[(N[(x$46$re * N[(y$46$re / y$46$im), $MachinePrecision]), $MachinePrecision] / y$46$im), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -1.16e-57], t$95$0, If[LessEqual[y$46$im, 1.15e-102], N[(x$46$re / y$46$re), $MachinePrecision], If[LessEqual[y$46$im, 4.0], t$95$0, If[LessEqual[y$46$im, 4e+39], N[(x$46$re / y$46$re), $MachinePrecision], N[(N[(x$46$im / y$46$im), $MachinePrecision] + N[(y$46$re * N[(N[(x$46$re / y$46$im), $MachinePrecision] / y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x.im}{y.im} + \frac{x.re \cdot \frac{y.re}{y.im}}{y.im}\\
\mathbf{if}\;y.im \leq -1.16 \cdot 10^{-57}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y.im \leq 1.15 \cdot 10^{-102}:\\
\;\;\;\;\frac{x.re}{y.re}\\
\mathbf{elif}\;y.im \leq 4:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y.im \leq 4 \cdot 10^{+39}:\\
\;\;\;\;\frac{x.re}{y.re}\\
\mathbf{else}:\\
\;\;\;\;\frac{x.im}{y.im} + y.re \cdot \frac{\frac{x.re}{y.im}}{y.im}\\
\end{array}
\end{array}
if y.im < -1.15999999999999996e-57 or 1.14999999999999993e-102 < y.im < 4Initial program 56.1%
Taylor expanded in y.re around 0 71.7%
associate-/l*72.0%
associate-/r/72.0%
Simplified72.0%
*-un-lft-identity72.0%
unpow272.0%
times-frac75.4%
Applied egg-rr75.4%
associate-*l/75.4%
*-un-lft-identity75.4%
associate-*l/77.5%
Applied egg-rr77.5%
Taylor expanded in x.re around 0 74.7%
*-commutative74.7%
associate-*l/78.4%
*-commutative78.4%
Simplified78.4%
if -1.15999999999999996e-57 < y.im < 1.14999999999999993e-102 or 4 < y.im < 3.99999999999999976e39Initial program 78.4%
Taylor expanded in y.re around inf 74.5%
if 3.99999999999999976e39 < y.im Initial program 60.3%
Taylor expanded in y.re around 0 74.9%
associate-/l*75.0%
associate-/r/76.8%
Simplified76.8%
*-un-lft-identity76.8%
unpow276.8%
times-frac77.4%
Applied egg-rr77.4%
associate-*l/77.4%
*-un-lft-identity77.4%
Applied egg-rr77.4%
Final simplification76.8%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (+ (/ x.im y.im) (/ (* x.re (/ y.re y.im)) y.im))))
(if (<= y.im -1.2e-57)
t_0
(if (<= y.im 2.05e-103)
(/ x.re y.re)
(if (<= y.im 4.2)
t_0
(if (<= y.im 5.1e+39)
(/ x.re y.re)
(+ (/ x.im y.im) (/ (* y.re (/ x.re y.im)) y.im))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = (x_46_im / y_46_im) + ((x_46_re * (y_46_re / y_46_im)) / y_46_im);
double tmp;
if (y_46_im <= -1.2e-57) {
tmp = t_0;
} else if (y_46_im <= 2.05e-103) {
tmp = x_46_re / y_46_re;
} else if (y_46_im <= 4.2) {
tmp = t_0;
} else if (y_46_im <= 5.1e+39) {
tmp = x_46_re / y_46_re;
} else {
tmp = (x_46_im / y_46_im) + ((y_46_re * (x_46_re / y_46_im)) / y_46_im);
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
real(8) :: tmp
t_0 = (x_46im / y_46im) + ((x_46re * (y_46re / y_46im)) / y_46im)
if (y_46im <= (-1.2d-57)) then
tmp = t_0
else if (y_46im <= 2.05d-103) then
tmp = x_46re / y_46re
else if (y_46im <= 4.2d0) then
tmp = t_0
else if (y_46im <= 5.1d+39) then
tmp = x_46re / y_46re
else
tmp = (x_46im / y_46im) + ((y_46re * (x_46re / y_46im)) / y_46im)
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = (x_46_im / y_46_im) + ((x_46_re * (y_46_re / y_46_im)) / y_46_im);
double tmp;
if (y_46_im <= -1.2e-57) {
tmp = t_0;
} else if (y_46_im <= 2.05e-103) {
tmp = x_46_re / y_46_re;
} else if (y_46_im <= 4.2) {
tmp = t_0;
} else if (y_46_im <= 5.1e+39) {
tmp = x_46_re / y_46_re;
} else {
tmp = (x_46_im / y_46_im) + ((y_46_re * (x_46_re / y_46_im)) / y_46_im);
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = (x_46_im / y_46_im) + ((x_46_re * (y_46_re / y_46_im)) / y_46_im) tmp = 0 if y_46_im <= -1.2e-57: tmp = t_0 elif y_46_im <= 2.05e-103: tmp = x_46_re / y_46_re elif y_46_im <= 4.2: tmp = t_0 elif y_46_im <= 5.1e+39: tmp = x_46_re / y_46_re else: tmp = (x_46_im / y_46_im) + ((y_46_re * (x_46_re / y_46_im)) / y_46_im) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(Float64(x_46_im / y_46_im) + Float64(Float64(x_46_re * Float64(y_46_re / y_46_im)) / y_46_im)) tmp = 0.0 if (y_46_im <= -1.2e-57) tmp = t_0; elseif (y_46_im <= 2.05e-103) tmp = Float64(x_46_re / y_46_re); elseif (y_46_im <= 4.2) tmp = t_0; elseif (y_46_im <= 5.1e+39) tmp = Float64(x_46_re / y_46_re); else tmp = Float64(Float64(x_46_im / y_46_im) + Float64(Float64(y_46_re * Float64(x_46_re / y_46_im)) / y_46_im)); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = (x_46_im / y_46_im) + ((x_46_re * (y_46_re / y_46_im)) / y_46_im); tmp = 0.0; if (y_46_im <= -1.2e-57) tmp = t_0; elseif (y_46_im <= 2.05e-103) tmp = x_46_re / y_46_re; elseif (y_46_im <= 4.2) tmp = t_0; elseif (y_46_im <= 5.1e+39) tmp = x_46_re / y_46_re; else tmp = (x_46_im / y_46_im) + ((y_46_re * (x_46_re / y_46_im)) / y_46_im); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[(x$46$im / y$46$im), $MachinePrecision] + N[(N[(x$46$re * N[(y$46$re / y$46$im), $MachinePrecision]), $MachinePrecision] / y$46$im), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -1.2e-57], t$95$0, If[LessEqual[y$46$im, 2.05e-103], N[(x$46$re / y$46$re), $MachinePrecision], If[LessEqual[y$46$im, 4.2], t$95$0, If[LessEqual[y$46$im, 5.1e+39], N[(x$46$re / y$46$re), $MachinePrecision], N[(N[(x$46$im / y$46$im), $MachinePrecision] + N[(N[(y$46$re * N[(x$46$re / y$46$im), $MachinePrecision]), $MachinePrecision] / y$46$im), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x.im}{y.im} + \frac{x.re \cdot \frac{y.re}{y.im}}{y.im}\\
\mathbf{if}\;y.im \leq -1.2 \cdot 10^{-57}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y.im \leq 2.05 \cdot 10^{-103}:\\
\;\;\;\;\frac{x.re}{y.re}\\
\mathbf{elif}\;y.im \leq 4.2:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y.im \leq 5.1 \cdot 10^{+39}:\\
\;\;\;\;\frac{x.re}{y.re}\\
\mathbf{else}:\\
\;\;\;\;\frac{x.im}{y.im} + \frac{y.re \cdot \frac{x.re}{y.im}}{y.im}\\
\end{array}
\end{array}
if y.im < -1.20000000000000003e-57 or 2.04999999999999998e-103 < y.im < 4.20000000000000018Initial program 56.1%
Taylor expanded in y.re around 0 71.7%
associate-/l*72.0%
associate-/r/72.0%
Simplified72.0%
*-un-lft-identity72.0%
unpow272.0%
times-frac75.4%
Applied egg-rr75.4%
associate-*l/75.4%
*-un-lft-identity75.4%
associate-*l/77.5%
Applied egg-rr77.5%
Taylor expanded in x.re around 0 74.7%
*-commutative74.7%
associate-*l/78.4%
*-commutative78.4%
Simplified78.4%
if -1.20000000000000003e-57 < y.im < 2.04999999999999998e-103 or 4.20000000000000018 < y.im < 5.0999999999999998e39Initial program 78.4%
Taylor expanded in y.re around inf 74.5%
if 5.0999999999999998e39 < y.im Initial program 60.3%
Taylor expanded in y.re around 0 74.9%
associate-/l*75.0%
associate-/r/76.8%
Simplified76.8%
*-un-lft-identity76.8%
unpow276.8%
times-frac77.4%
Applied egg-rr77.4%
associate-*l/77.4%
*-un-lft-identity77.4%
associate-*l/78.5%
Applied egg-rr78.5%
Final simplification77.0%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (<= y.im -6.8e+65)
(+ (/ x.im y.im) (/ (* x.re (/ y.re y.im)) y.im))
(if (<= y.im 1.28e+61)
(/ (+ (* x.re y.re) (* x.im y.im)) (+ (* y.re y.re) (* y.im y.im)))
(+ (/ x.im y.im) (/ (* y.re (/ x.re y.im)) y.im)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_im <= -6.8e+65) {
tmp = (x_46_im / y_46_im) + ((x_46_re * (y_46_re / y_46_im)) / y_46_im);
} else if (y_46_im <= 1.28e+61) {
tmp = ((x_46_re * y_46_re) + (x_46_im * y_46_im)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im));
} else {
tmp = (x_46_im / y_46_im) + ((y_46_re * (x_46_re / y_46_im)) / y_46_im);
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: tmp
if (y_46im <= (-6.8d+65)) then
tmp = (x_46im / y_46im) + ((x_46re * (y_46re / y_46im)) / y_46im)
else if (y_46im <= 1.28d+61) then
tmp = ((x_46re * y_46re) + (x_46im * y_46im)) / ((y_46re * y_46re) + (y_46im * y_46im))
else
tmp = (x_46im / y_46im) + ((y_46re * (x_46re / y_46im)) / y_46im)
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_im <= -6.8e+65) {
tmp = (x_46_im / y_46_im) + ((x_46_re * (y_46_re / y_46_im)) / y_46_im);
} else if (y_46_im <= 1.28e+61) {
tmp = ((x_46_re * y_46_re) + (x_46_im * y_46_im)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im));
} else {
tmp = (x_46_im / y_46_im) + ((y_46_re * (x_46_re / y_46_im)) / y_46_im);
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if y_46_im <= -6.8e+65: tmp = (x_46_im / y_46_im) + ((x_46_re * (y_46_re / y_46_im)) / y_46_im) elif y_46_im <= 1.28e+61: tmp = ((x_46_re * y_46_re) + (x_46_im * y_46_im)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im)) else: tmp = (x_46_im / y_46_im) + ((y_46_re * (x_46_re / y_46_im)) / y_46_im) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if (y_46_im <= -6.8e+65) tmp = Float64(Float64(x_46_im / y_46_im) + Float64(Float64(x_46_re * Float64(y_46_re / y_46_im)) / y_46_im)); elseif (y_46_im <= 1.28e+61) tmp = Float64(Float64(Float64(x_46_re * y_46_re) + Float64(x_46_im * y_46_im)) / Float64(Float64(y_46_re * y_46_re) + Float64(y_46_im * y_46_im))); else tmp = Float64(Float64(x_46_im / y_46_im) + Float64(Float64(y_46_re * Float64(x_46_re / y_46_im)) / y_46_im)); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if (y_46_im <= -6.8e+65) tmp = (x_46_im / y_46_im) + ((x_46_re * (y_46_re / y_46_im)) / y_46_im); elseif (y_46_im <= 1.28e+61) tmp = ((x_46_re * y_46_re) + (x_46_im * y_46_im)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im)); else tmp = (x_46_im / y_46_im) + ((y_46_re * (x_46_re / y_46_im)) / y_46_im); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[y$46$im, -6.8e+65], N[(N[(x$46$im / y$46$im), $MachinePrecision] + N[(N[(x$46$re * N[(y$46$re / y$46$im), $MachinePrecision]), $MachinePrecision] / y$46$im), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 1.28e+61], N[(N[(N[(x$46$re * y$46$re), $MachinePrecision] + N[(x$46$im * y$46$im), $MachinePrecision]), $MachinePrecision] / N[(N[(y$46$re * y$46$re), $MachinePrecision] + N[(y$46$im * y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x$46$im / y$46$im), $MachinePrecision] + N[(N[(y$46$re * N[(x$46$re / y$46$im), $MachinePrecision]), $MachinePrecision] / y$46$im), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.im \leq -6.8 \cdot 10^{+65}:\\
\;\;\;\;\frac{x.im}{y.im} + \frac{x.re \cdot \frac{y.re}{y.im}}{y.im}\\
\mathbf{elif}\;y.im \leq 1.28 \cdot 10^{+61}:\\
\;\;\;\;\frac{x.re \cdot y.re + x.im \cdot y.im}{y.re \cdot y.re + y.im \cdot y.im}\\
\mathbf{else}:\\
\;\;\;\;\frac{x.im}{y.im} + \frac{y.re \cdot \frac{x.re}{y.im}}{y.im}\\
\end{array}
\end{array}
if y.im < -6.7999999999999999e65Initial program 37.8%
Taylor expanded in y.re around 0 81.8%
associate-/l*80.6%
associate-/r/83.7%
Simplified83.7%
*-un-lft-identity83.7%
unpow283.7%
times-frac89.8%
Applied egg-rr89.8%
associate-*l/89.8%
*-un-lft-identity89.8%
associate-*l/92.1%
Applied egg-rr92.1%
Taylor expanded in x.re around 0 87.3%
*-commutative87.3%
associate-*l/92.1%
*-commutative92.1%
Simplified92.1%
if -6.7999999999999999e65 < y.im < 1.27999999999999996e61Initial program 79.2%
if 1.27999999999999996e61 < y.im Initial program 55.5%
Taylor expanded in y.re around 0 78.3%
associate-/l*78.4%
associate-/r/80.4%
Simplified80.4%
*-un-lft-identity80.4%
unpow280.4%
times-frac81.2%
Applied egg-rr81.2%
associate-*l/81.1%
*-un-lft-identity81.1%
associate-*l/82.4%
Applied egg-rr82.4%
Final simplification82.9%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (or (<= y.im -2.55e-27)
(not
(or (<= y.im 1.5e-88) (and (not (<= y.im 3.3)) (<= y.im 9.5e+31)))))
(/ x.im y.im)
(/ x.re y.re)))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_im <= -2.55e-27) || !((y_46_im <= 1.5e-88) || (!(y_46_im <= 3.3) && (y_46_im <= 9.5e+31)))) {
tmp = x_46_im / y_46_im;
} else {
tmp = x_46_re / y_46_re;
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: tmp
if ((y_46im <= (-2.55d-27)) .or. (.not. (y_46im <= 1.5d-88) .or. (.not. (y_46im <= 3.3d0)) .and. (y_46im <= 9.5d+31))) then
tmp = x_46im / y_46im
else
tmp = x_46re / y_46re
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_im <= -2.55e-27) || !((y_46_im <= 1.5e-88) || (!(y_46_im <= 3.3) && (y_46_im <= 9.5e+31)))) {
tmp = x_46_im / y_46_im;
} else {
tmp = x_46_re / y_46_re;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if (y_46_im <= -2.55e-27) or not ((y_46_im <= 1.5e-88) or (not (y_46_im <= 3.3) and (y_46_im <= 9.5e+31))): tmp = x_46_im / y_46_im else: tmp = x_46_re / y_46_re return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if ((y_46_im <= -2.55e-27) || !((y_46_im <= 1.5e-88) || (!(y_46_im <= 3.3) && (y_46_im <= 9.5e+31)))) tmp = Float64(x_46_im / y_46_im); else tmp = Float64(x_46_re / y_46_re); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if ((y_46_im <= -2.55e-27) || ~(((y_46_im <= 1.5e-88) || (~((y_46_im <= 3.3)) && (y_46_im <= 9.5e+31))))) tmp = x_46_im / y_46_im; else tmp = x_46_re / y_46_re; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[Or[LessEqual[y$46$im, -2.55e-27], N[Not[Or[LessEqual[y$46$im, 1.5e-88], And[N[Not[LessEqual[y$46$im, 3.3]], $MachinePrecision], LessEqual[y$46$im, 9.5e+31]]]], $MachinePrecision]], N[(x$46$im / y$46$im), $MachinePrecision], N[(x$46$re / y$46$re), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.im \leq -2.55 \cdot 10^{-27} \lor \neg \left(y.im \leq 1.5 \cdot 10^{-88} \lor \neg \left(y.im \leq 3.3\right) \land y.im \leq 9.5 \cdot 10^{+31}\right):\\
\;\;\;\;\frac{x.im}{y.im}\\
\mathbf{else}:\\
\;\;\;\;\frac{x.re}{y.re}\\
\end{array}
\end{array}
if y.im < -2.55e-27 or 1.5e-88 < y.im < 3.2999999999999998 or 9.5000000000000008e31 < y.im Initial program 57.1%
Taylor expanded in y.re around 0 65.0%
if -2.55e-27 < y.im < 1.5e-88 or 3.2999999999999998 < y.im < 9.5000000000000008e31Initial program 78.2%
Taylor expanded in y.re around inf 72.5%
Final simplification67.8%
(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.9%
Taylor expanded in y.re around 0 45.9%
Final simplification45.9%
herbie shell --seed 2023326
(FPCore (x.re x.im y.re y.im)
:name "_divideComplex, real part"
:precision binary64
(/ (+ (* x.re y.re) (* x.im y.im)) (+ (* y.re y.re) (* y.im y.im))))