
(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 12 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x.re x.im y.re y.im) :precision binary64 (/ (- (* x.im y.re) (* x.re y.im)) (+ (* y.re y.re) (* y.im y.im))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return ((x_46_im * y_46_re) - (x_46_re * y_46_im)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im));
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
code = ((x_46im * y_46re) - (x_46re * y_46im)) / ((y_46re * y_46re) + (y_46im * y_46im))
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return ((x_46_im * y_46_re) - (x_46_re * y_46_im)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im));
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): return ((x_46_im * y_46_re) - (x_46_re * y_46_im)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im))
function code(x_46_re, x_46_im, y_46_re, y_46_im) return Float64(Float64(Float64(x_46_im * y_46_re) - Float64(x_46_re * y_46_im)) / Float64(Float64(y_46_re * y_46_re) + Float64(y_46_im * y_46_im))) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = ((x_46_im * y_46_re) - (x_46_re * y_46_im)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im)); end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[(N[(N[(x$46$im * y$46$re), $MachinePrecision] - N[(x$46$re * y$46$im), $MachinePrecision]), $MachinePrecision] / N[(N[(y$46$re * y$46$re), $MachinePrecision] + N[(y$46$im * y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x.im \cdot y.re - x.re \cdot y.im}{y.re \cdot y.re + y.im \cdot y.im}
\end{array}
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0
(/ (- (* y.re x.im) (* x.re y.im)) (+ (* y.re y.re) (* y.im y.im))))
(t_1 (* x.re (/ y.im y.re))))
(if (<= y.re -2.6e+129)
(- (/ x.im y.re) (/ t_1 y.re))
(if (<= y.re -1.22e+51)
(* (/ y.re (hypot y.re y.im)) (/ x.im (hypot y.re y.im)))
(if (<= y.re -3.8e-79)
t_0
(if (<= y.re 4.4e-239)
(- (/ x.im (/ (pow y.im 2.0) y.re)) (/ x.re y.im))
(if (<= y.re 2.5e+68) t_0 (/ (- x.im t_1) (hypot y.re y.im)))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = ((y_46_re * x_46_im) - (x_46_re * y_46_im)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im));
double t_1 = x_46_re * (y_46_im / y_46_re);
double tmp;
if (y_46_re <= -2.6e+129) {
tmp = (x_46_im / y_46_re) - (t_1 / y_46_re);
} else if (y_46_re <= -1.22e+51) {
tmp = (y_46_re / hypot(y_46_re, y_46_im)) * (x_46_im / hypot(y_46_re, y_46_im));
} else if (y_46_re <= -3.8e-79) {
tmp = t_0;
} else if (y_46_re <= 4.4e-239) {
tmp = (x_46_im / (pow(y_46_im, 2.0) / y_46_re)) - (x_46_re / y_46_im);
} else if (y_46_re <= 2.5e+68) {
tmp = t_0;
} else {
tmp = (x_46_im - t_1) / hypot(y_46_re, y_46_im);
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = ((y_46_re * x_46_im) - (x_46_re * y_46_im)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im));
double t_1 = x_46_re * (y_46_im / y_46_re);
double tmp;
if (y_46_re <= -2.6e+129) {
tmp = (x_46_im / y_46_re) - (t_1 / y_46_re);
} else if (y_46_re <= -1.22e+51) {
tmp = (y_46_re / Math.hypot(y_46_re, y_46_im)) * (x_46_im / Math.hypot(y_46_re, y_46_im));
} else if (y_46_re <= -3.8e-79) {
tmp = t_0;
} else if (y_46_re <= 4.4e-239) {
tmp = (x_46_im / (Math.pow(y_46_im, 2.0) / y_46_re)) - (x_46_re / y_46_im);
} else if (y_46_re <= 2.5e+68) {
tmp = t_0;
} else {
tmp = (x_46_im - t_1) / Math.hypot(y_46_re, y_46_im);
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = ((y_46_re * x_46_im) - (x_46_re * y_46_im)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im)) t_1 = x_46_re * (y_46_im / y_46_re) tmp = 0 if y_46_re <= -2.6e+129: tmp = (x_46_im / y_46_re) - (t_1 / y_46_re) elif y_46_re <= -1.22e+51: tmp = (y_46_re / math.hypot(y_46_re, y_46_im)) * (x_46_im / math.hypot(y_46_re, y_46_im)) elif y_46_re <= -3.8e-79: tmp = t_0 elif y_46_re <= 4.4e-239: tmp = (x_46_im / (math.pow(y_46_im, 2.0) / y_46_re)) - (x_46_re / y_46_im) elif y_46_re <= 2.5e+68: tmp = t_0 else: tmp = (x_46_im - t_1) / math.hypot(y_46_re, y_46_im) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(Float64(Float64(y_46_re * x_46_im) - Float64(x_46_re * y_46_im)) / Float64(Float64(y_46_re * y_46_re) + Float64(y_46_im * y_46_im))) t_1 = Float64(x_46_re * Float64(y_46_im / y_46_re)) tmp = 0.0 if (y_46_re <= -2.6e+129) tmp = Float64(Float64(x_46_im / y_46_re) - Float64(t_1 / y_46_re)); elseif (y_46_re <= -1.22e+51) tmp = Float64(Float64(y_46_re / hypot(y_46_re, y_46_im)) * Float64(x_46_im / hypot(y_46_re, y_46_im))); elseif (y_46_re <= -3.8e-79) tmp = t_0; elseif (y_46_re <= 4.4e-239) tmp = Float64(Float64(x_46_im / Float64((y_46_im ^ 2.0) / y_46_re)) - Float64(x_46_re / y_46_im)); elseif (y_46_re <= 2.5e+68) tmp = t_0; else tmp = Float64(Float64(x_46_im - t_1) / hypot(y_46_re, y_46_im)); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = ((y_46_re * x_46_im) - (x_46_re * y_46_im)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im)); t_1 = x_46_re * (y_46_im / y_46_re); tmp = 0.0; if (y_46_re <= -2.6e+129) tmp = (x_46_im / y_46_re) - (t_1 / y_46_re); elseif (y_46_re <= -1.22e+51) tmp = (y_46_re / hypot(y_46_re, y_46_im)) * (x_46_im / hypot(y_46_re, y_46_im)); elseif (y_46_re <= -3.8e-79) tmp = t_0; elseif (y_46_re <= 4.4e-239) tmp = (x_46_im / ((y_46_im ^ 2.0) / y_46_re)) - (x_46_re / y_46_im); elseif (y_46_re <= 2.5e+68) tmp = t_0; else tmp = (x_46_im - t_1) / hypot(y_46_re, y_46_im); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[(N[(y$46$re * x$46$im), $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]}, Block[{t$95$1 = N[(x$46$re * N[(y$46$im / y$46$re), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -2.6e+129], N[(N[(x$46$im / y$46$re), $MachinePrecision] - N[(t$95$1 / y$46$re), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, -1.22e+51], 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]), $MachinePrecision], If[LessEqual[y$46$re, -3.8e-79], t$95$0, If[LessEqual[y$46$re, 4.4e-239], N[(N[(x$46$im / N[(N[Power[y$46$im, 2.0], $MachinePrecision] / y$46$re), $MachinePrecision]), $MachinePrecision] - N[(x$46$re / y$46$im), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 2.5e+68], t$95$0, N[(N[(x$46$im - t$95$1), $MachinePrecision] / N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{y.re \cdot x.im - x.re \cdot y.im}{y.re \cdot y.re + y.im \cdot y.im}\\
t_1 := x.re \cdot \frac{y.im}{y.re}\\
\mathbf{if}\;y.re \leq -2.6 \cdot 10^{+129}:\\
\;\;\;\;\frac{x.im}{y.re} - \frac{t_1}{y.re}\\
\mathbf{elif}\;y.re \leq -1.22 \cdot 10^{+51}:\\
\;\;\;\;\frac{y.re}{\mathsf{hypot}\left(y.re, y.im\right)} \cdot \frac{x.im}{\mathsf{hypot}\left(y.re, y.im\right)}\\
\mathbf{elif}\;y.re \leq -3.8 \cdot 10^{-79}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y.re \leq 4.4 \cdot 10^{-239}:\\
\;\;\;\;\frac{x.im}{\frac{{y.im}^{2}}{y.re}} - \frac{x.re}{y.im}\\
\mathbf{elif}\;y.re \leq 2.5 \cdot 10^{+68}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{x.im - t_1}{\mathsf{hypot}\left(y.re, y.im\right)}\\
\end{array}
\end{array}
if y.re < -2.60000000000000012e129Initial program 35.3%
Taylor expanded in y.re around inf 71.5%
+-commutative71.5%
mul-1-neg71.5%
unsub-neg71.5%
associate-/l*74.4%
associate-/r/76.4%
Simplified76.4%
associate-*l/71.5%
unpow271.5%
associate-/r*83.9%
associate-*l/92.9%
associate-/r/92.8%
div-inv92.9%
clear-num92.8%
Applied egg-rr92.8%
if -2.60000000000000012e129 < y.re < -1.22000000000000005e51Initial program 55.3%
Taylor expanded in x.im around inf 55.6%
associate-/l*71.8%
unpow271.8%
fma-udef71.8%
Simplified71.8%
add-sqr-sqrt0.0%
sqrt-div0.0%
fma-udef0.0%
+-commutative0.0%
pow20.0%
hypot-udef0.0%
sqrt-div0.0%
fma-udef0.0%
+-commutative0.0%
pow20.0%
hypot-udef0.0%
times-frac0.0%
add-sqr-sqrt71.8%
*-un-lft-identity71.8%
times-frac71.9%
/-rgt-identity71.9%
Applied egg-rr71.9%
*-un-lft-identity71.9%
*-commutative71.9%
times-frac89.2%
clear-num89.2%
Applied egg-rr89.2%
if -1.22000000000000005e51 < y.re < -3.8000000000000001e-79 or 4.39999999999999965e-239 < y.re < 2.5000000000000002e68Initial program 83.0%
if -3.8000000000000001e-79 < y.re < 4.39999999999999965e-239Initial program 78.0%
Taylor expanded in x.im around 0 78.0%
mul-1-neg78.0%
+-commutative78.0%
*-commutative78.0%
fma-def78.0%
distribute-rgt-neg-in78.0%
Simplified78.0%
Taylor expanded in y.re around 0 92.2%
+-commutative92.2%
mul-1-neg92.2%
unsub-neg92.2%
associate-/l*90.8%
Simplified90.8%
if 2.5000000000000002e68 < y.re Initial program 30.1%
fma-neg30.1%
*-commutative30.1%
distribute-rgt-neg-out30.1%
*-un-lft-identity30.1%
fma-def30.1%
add-sqr-sqrt30.1%
times-frac30.1%
fma-def30.1%
hypot-def30.1%
*-commutative30.1%
add-sqr-sqrt15.6%
sqrt-unprod20.1%
sqr-neg20.1%
sqrt-unprod12.3%
add-sqr-sqrt27.8%
fma-def27.8%
hypot-def46.6%
Applied egg-rr46.6%
Taylor expanded in y.re around -inf 25.4%
mul-1-neg25.4%
unsub-neg25.4%
neg-mul-125.4%
associate-/l*30.2%
Simplified30.2%
associate-*l/30.2%
*-un-lft-identity30.2%
add-sqr-sqrt14.8%
sqrt-unprod46.4%
sqr-neg46.4%
sqrt-unprod49.8%
add-sqr-sqrt91.0%
div-inv91.0%
clear-num91.0%
Applied egg-rr91.0%
Final simplification88.4%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0
(/ (- (* y.re x.im) (* x.re y.im)) (+ (* y.re y.re) (* y.im y.im))))
(t_1 (* x.re (/ y.im y.re))))
(if (<= y.re -8.8e+89)
(- (/ x.im y.re) (/ t_1 y.re))
(if (<= y.re -7e-79)
t_0
(if (<= y.re 1.45e-237)
(- (/ x.im (/ (pow y.im 2.0) y.re)) (/ x.re y.im))
(if (<= y.re 1.12e+74) t_0 (/ (- x.im t_1) (hypot y.re y.im))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = ((y_46_re * x_46_im) - (x_46_re * y_46_im)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im));
double t_1 = x_46_re * (y_46_im / y_46_re);
double tmp;
if (y_46_re <= -8.8e+89) {
tmp = (x_46_im / y_46_re) - (t_1 / y_46_re);
} else if (y_46_re <= -7e-79) {
tmp = t_0;
} else if (y_46_re <= 1.45e-237) {
tmp = (x_46_im / (pow(y_46_im, 2.0) / y_46_re)) - (x_46_re / y_46_im);
} else if (y_46_re <= 1.12e+74) {
tmp = t_0;
} else {
tmp = (x_46_im - t_1) / hypot(y_46_re, y_46_im);
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = ((y_46_re * x_46_im) - (x_46_re * y_46_im)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im));
double t_1 = x_46_re * (y_46_im / y_46_re);
double tmp;
if (y_46_re <= -8.8e+89) {
tmp = (x_46_im / y_46_re) - (t_1 / y_46_re);
} else if (y_46_re <= -7e-79) {
tmp = t_0;
} else if (y_46_re <= 1.45e-237) {
tmp = (x_46_im / (Math.pow(y_46_im, 2.0) / y_46_re)) - (x_46_re / y_46_im);
} else if (y_46_re <= 1.12e+74) {
tmp = t_0;
} else {
tmp = (x_46_im - t_1) / Math.hypot(y_46_re, y_46_im);
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = ((y_46_re * x_46_im) - (x_46_re * y_46_im)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im)) t_1 = x_46_re * (y_46_im / y_46_re) tmp = 0 if y_46_re <= -8.8e+89: tmp = (x_46_im / y_46_re) - (t_1 / y_46_re) elif y_46_re <= -7e-79: tmp = t_0 elif y_46_re <= 1.45e-237: tmp = (x_46_im / (math.pow(y_46_im, 2.0) / y_46_re)) - (x_46_re / y_46_im) elif y_46_re <= 1.12e+74: tmp = t_0 else: tmp = (x_46_im - t_1) / math.hypot(y_46_re, y_46_im) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(Float64(Float64(y_46_re * x_46_im) - Float64(x_46_re * y_46_im)) / Float64(Float64(y_46_re * y_46_re) + Float64(y_46_im * y_46_im))) t_1 = Float64(x_46_re * Float64(y_46_im / y_46_re)) tmp = 0.0 if (y_46_re <= -8.8e+89) tmp = Float64(Float64(x_46_im / y_46_re) - Float64(t_1 / y_46_re)); elseif (y_46_re <= -7e-79) tmp = t_0; elseif (y_46_re <= 1.45e-237) tmp = Float64(Float64(x_46_im / Float64((y_46_im ^ 2.0) / y_46_re)) - Float64(x_46_re / y_46_im)); elseif (y_46_re <= 1.12e+74) tmp = t_0; else tmp = Float64(Float64(x_46_im - t_1) / hypot(y_46_re, y_46_im)); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = ((y_46_re * x_46_im) - (x_46_re * y_46_im)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im)); t_1 = x_46_re * (y_46_im / y_46_re); tmp = 0.0; if (y_46_re <= -8.8e+89) tmp = (x_46_im / y_46_re) - (t_1 / y_46_re); elseif (y_46_re <= -7e-79) tmp = t_0; elseif (y_46_re <= 1.45e-237) tmp = (x_46_im / ((y_46_im ^ 2.0) / y_46_re)) - (x_46_re / y_46_im); elseif (y_46_re <= 1.12e+74) tmp = t_0; else tmp = (x_46_im - t_1) / hypot(y_46_re, y_46_im); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[(N[(y$46$re * x$46$im), $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]}, Block[{t$95$1 = N[(x$46$re * N[(y$46$im / y$46$re), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -8.8e+89], N[(N[(x$46$im / y$46$re), $MachinePrecision] - N[(t$95$1 / y$46$re), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, -7e-79], t$95$0, If[LessEqual[y$46$re, 1.45e-237], N[(N[(x$46$im / N[(N[Power[y$46$im, 2.0], $MachinePrecision] / y$46$re), $MachinePrecision]), $MachinePrecision] - N[(x$46$re / y$46$im), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 1.12e+74], t$95$0, N[(N[(x$46$im - t$95$1), $MachinePrecision] / N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{y.re \cdot x.im - x.re \cdot y.im}{y.re \cdot y.re + y.im \cdot y.im}\\
t_1 := x.re \cdot \frac{y.im}{y.re}\\
\mathbf{if}\;y.re \leq -8.8 \cdot 10^{+89}:\\
\;\;\;\;\frac{x.im}{y.re} - \frac{t_1}{y.re}\\
\mathbf{elif}\;y.re \leq -7 \cdot 10^{-79}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y.re \leq 1.45 \cdot 10^{-237}:\\
\;\;\;\;\frac{x.im}{\frac{{y.im}^{2}}{y.re}} - \frac{x.re}{y.im}\\
\mathbf{elif}\;y.re \leq 1.12 \cdot 10^{+74}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{x.im - t_1}{\mathsf{hypot}\left(y.re, y.im\right)}\\
\end{array}
\end{array}
if y.re < -8.8000000000000001e89Initial program 37.4%
Taylor expanded in y.re around inf 69.0%
+-commutative69.0%
mul-1-neg69.0%
unsub-neg69.0%
associate-/l*71.5%
associate-/r/73.2%
Simplified73.2%
associate-*l/69.0%
unpow269.0%
associate-/r*79.3%
associate-*l/86.8%
associate-/r/86.8%
div-inv86.8%
clear-num86.8%
Applied egg-rr86.8%
if -8.8000000000000001e89 < y.re < -7.00000000000000059e-79 or 1.45000000000000005e-237 < y.re < 1.12000000000000003e74Initial program 81.2%
if -7.00000000000000059e-79 < y.re < 1.45000000000000005e-237Initial program 78.0%
Taylor expanded in x.im around 0 78.0%
mul-1-neg78.0%
+-commutative78.0%
*-commutative78.0%
fma-def78.0%
distribute-rgt-neg-in78.0%
Simplified78.0%
Taylor expanded in y.re around 0 92.2%
+-commutative92.2%
mul-1-neg92.2%
unsub-neg92.2%
associate-/l*90.8%
Simplified90.8%
if 1.12000000000000003e74 < y.re Initial program 30.1%
fma-neg30.1%
*-commutative30.1%
distribute-rgt-neg-out30.1%
*-un-lft-identity30.1%
fma-def30.1%
add-sqr-sqrt30.1%
times-frac30.1%
fma-def30.1%
hypot-def30.1%
*-commutative30.1%
add-sqr-sqrt15.6%
sqrt-unprod20.1%
sqr-neg20.1%
sqrt-unprod12.3%
add-sqr-sqrt27.8%
fma-def27.8%
hypot-def46.6%
Applied egg-rr46.6%
Taylor expanded in y.re around -inf 25.4%
mul-1-neg25.4%
unsub-neg25.4%
neg-mul-125.4%
associate-/l*30.2%
Simplified30.2%
associate-*l/30.2%
*-un-lft-identity30.2%
add-sqr-sqrt14.8%
sqrt-unprod46.4%
sqr-neg46.4%
sqrt-unprod49.8%
add-sqr-sqrt91.0%
div-inv91.0%
clear-num91.0%
Applied egg-rr91.0%
Final simplification86.4%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0
(/ (- (* y.re x.im) (* x.re y.im)) (+ (* y.re y.re) (* y.im y.im))))
(t_1 (- (/ x.im y.re) (/ (* x.re (/ y.im y.re)) y.re))))
(if (<= y.re -3.1e+88)
t_1
(if (<= y.re -1.1e-78)
t_0
(if (<= y.re 1.95e-306)
(- (* y.re (/ x.im (pow y.im 2.0))) (/ x.re y.im))
(if (<= y.re 6.1e+74) 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) - (x_46_re * y_46_im)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im));
double t_1 = (x_46_im / y_46_re) - ((x_46_re * (y_46_im / y_46_re)) / y_46_re);
double tmp;
if (y_46_re <= -3.1e+88) {
tmp = t_1;
} else if (y_46_re <= -1.1e-78) {
tmp = t_0;
} else if (y_46_re <= 1.95e-306) {
tmp = (y_46_re * (x_46_im / pow(y_46_im, 2.0))) - (x_46_re / y_46_im);
} else if (y_46_re <= 6.1e+74) {
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) - (x_46re * y_46im)) / ((y_46re * y_46re) + (y_46im * y_46im))
t_1 = (x_46im / y_46re) - ((x_46re * (y_46im / y_46re)) / y_46re)
if (y_46re <= (-3.1d+88)) then
tmp = t_1
else if (y_46re <= (-1.1d-78)) then
tmp = t_0
else if (y_46re <= 1.95d-306) then
tmp = (y_46re * (x_46im / (y_46im ** 2.0d0))) - (x_46re / y_46im)
else if (y_46re <= 6.1d+74) 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) - (x_46_re * y_46_im)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im));
double t_1 = (x_46_im / y_46_re) - ((x_46_re * (y_46_im / y_46_re)) / y_46_re);
double tmp;
if (y_46_re <= -3.1e+88) {
tmp = t_1;
} else if (y_46_re <= -1.1e-78) {
tmp = t_0;
} else if (y_46_re <= 1.95e-306) {
tmp = (y_46_re * (x_46_im / Math.pow(y_46_im, 2.0))) - (x_46_re / y_46_im);
} else if (y_46_re <= 6.1e+74) {
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) - (x_46_re * y_46_im)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im)) t_1 = (x_46_im / y_46_re) - ((x_46_re * (y_46_im / y_46_re)) / y_46_re) tmp = 0 if y_46_re <= -3.1e+88: tmp = t_1 elif y_46_re <= -1.1e-78: tmp = t_0 elif y_46_re <= 1.95e-306: tmp = (y_46_re * (x_46_im / math.pow(y_46_im, 2.0))) - (x_46_re / y_46_im) elif y_46_re <= 6.1e+74: 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(x_46_re * y_46_im)) / Float64(Float64(y_46_re * y_46_re) + Float64(y_46_im * y_46_im))) t_1 = Float64(Float64(x_46_im / y_46_re) - Float64(Float64(x_46_re * Float64(y_46_im / y_46_re)) / y_46_re)) tmp = 0.0 if (y_46_re <= -3.1e+88) tmp = t_1; elseif (y_46_re <= -1.1e-78) tmp = t_0; elseif (y_46_re <= 1.95e-306) tmp = Float64(Float64(y_46_re * Float64(x_46_im / (y_46_im ^ 2.0))) - Float64(x_46_re / y_46_im)); elseif (y_46_re <= 6.1e+74) 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) - (x_46_re * y_46_im)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im)); t_1 = (x_46_im / y_46_re) - ((x_46_re * (y_46_im / y_46_re)) / y_46_re); tmp = 0.0; if (y_46_re <= -3.1e+88) tmp = t_1; elseif (y_46_re <= -1.1e-78) tmp = t_0; elseif (y_46_re <= 1.95e-306) tmp = (y_46_re * (x_46_im / (y_46_im ^ 2.0))) - (x_46_re / y_46_im); elseif (y_46_re <= 6.1e+74) 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[(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]}, Block[{t$95$1 = N[(N[(x$46$im / y$46$re), $MachinePrecision] - N[(N[(x$46$re * N[(y$46$im / y$46$re), $MachinePrecision]), $MachinePrecision] / y$46$re), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -3.1e+88], t$95$1, If[LessEqual[y$46$re, -1.1e-78], t$95$0, If[LessEqual[y$46$re, 1.95e-306], N[(N[(y$46$re * N[(x$46$im / N[Power[y$46$im, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x$46$re / y$46$im), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 6.1e+74], t$95$0, t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{y.re \cdot x.im - x.re \cdot y.im}{y.re \cdot y.re + y.im \cdot y.im}\\
t_1 := \frac{x.im}{y.re} - \frac{x.re \cdot \frac{y.im}{y.re}}{y.re}\\
\mathbf{if}\;y.re \leq -3.1 \cdot 10^{+88}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y.re \leq -1.1 \cdot 10^{-78}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y.re \leq 1.95 \cdot 10^{-306}:\\
\;\;\;\;y.re \cdot \frac{x.im}{{y.im}^{2}} - \frac{x.re}{y.im}\\
\mathbf{elif}\;y.re \leq 6.1 \cdot 10^{+74}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y.re < -3.1000000000000001e88 or 6.0999999999999997e74 < y.re Initial program 34.2%
Taylor expanded in y.re around inf 74.6%
+-commutative74.6%
mul-1-neg74.6%
unsub-neg74.6%
associate-/l*76.2%
associate-/r/78.0%
Simplified78.0%
associate-*l/74.6%
unpow274.6%
associate-/r*82.4%
associate-*l/88.6%
associate-/r/88.6%
div-inv88.6%
clear-num88.6%
Applied egg-rr88.6%
if -3.1000000000000001e88 < y.re < -1.0999999999999999e-78 or 1.95e-306 < y.re < 6.0999999999999997e74Initial program 81.8%
if -1.0999999999999999e-78 < y.re < 1.95e-306Initial program 76.2%
Taylor expanded in y.re around 0 92.8%
+-commutative92.8%
mul-1-neg92.8%
unsub-neg92.8%
associate-/l*91.1%
associate-/r/89.5%
Simplified89.5%
Final simplification86.0%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0
(/ (- (* y.re x.im) (* x.re y.im)) (+ (* y.re y.re) (* y.im y.im))))
(t_1 (- (/ x.im y.re) (/ (* x.re (/ y.im y.re)) y.re))))
(if (<= y.re -1.65e+89)
t_1
(if (<= y.re -1.2e-78)
t_0
(if (<= y.re 9.2e-240)
(- (/ x.im (/ (pow y.im 2.0) y.re)) (/ x.re y.im))
(if (<= y.re 6.1e+74) 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) - (x_46_re * y_46_im)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im));
double t_1 = (x_46_im / y_46_re) - ((x_46_re * (y_46_im / y_46_re)) / y_46_re);
double tmp;
if (y_46_re <= -1.65e+89) {
tmp = t_1;
} else if (y_46_re <= -1.2e-78) {
tmp = t_0;
} else if (y_46_re <= 9.2e-240) {
tmp = (x_46_im / (pow(y_46_im, 2.0) / y_46_re)) - (x_46_re / y_46_im);
} else if (y_46_re <= 6.1e+74) {
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) - (x_46re * y_46im)) / ((y_46re * y_46re) + (y_46im * y_46im))
t_1 = (x_46im / y_46re) - ((x_46re * (y_46im / y_46re)) / y_46re)
if (y_46re <= (-1.65d+89)) then
tmp = t_1
else if (y_46re <= (-1.2d-78)) then
tmp = t_0
else if (y_46re <= 9.2d-240) then
tmp = (x_46im / ((y_46im ** 2.0d0) / y_46re)) - (x_46re / y_46im)
else if (y_46re <= 6.1d+74) 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) - (x_46_re * y_46_im)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im));
double t_1 = (x_46_im / y_46_re) - ((x_46_re * (y_46_im / y_46_re)) / y_46_re);
double tmp;
if (y_46_re <= -1.65e+89) {
tmp = t_1;
} else if (y_46_re <= -1.2e-78) {
tmp = t_0;
} else if (y_46_re <= 9.2e-240) {
tmp = (x_46_im / (Math.pow(y_46_im, 2.0) / y_46_re)) - (x_46_re / y_46_im);
} else if (y_46_re <= 6.1e+74) {
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) - (x_46_re * y_46_im)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im)) t_1 = (x_46_im / y_46_re) - ((x_46_re * (y_46_im / y_46_re)) / y_46_re) tmp = 0 if y_46_re <= -1.65e+89: tmp = t_1 elif y_46_re <= -1.2e-78: tmp = t_0 elif y_46_re <= 9.2e-240: tmp = (x_46_im / (math.pow(y_46_im, 2.0) / y_46_re)) - (x_46_re / y_46_im) elif y_46_re <= 6.1e+74: 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(x_46_re * y_46_im)) / Float64(Float64(y_46_re * y_46_re) + Float64(y_46_im * y_46_im))) t_1 = Float64(Float64(x_46_im / y_46_re) - Float64(Float64(x_46_re * Float64(y_46_im / y_46_re)) / y_46_re)) tmp = 0.0 if (y_46_re <= -1.65e+89) tmp = t_1; elseif (y_46_re <= -1.2e-78) tmp = t_0; elseif (y_46_re <= 9.2e-240) tmp = Float64(Float64(x_46_im / Float64((y_46_im ^ 2.0) / y_46_re)) - Float64(x_46_re / y_46_im)); elseif (y_46_re <= 6.1e+74) 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) - (x_46_re * y_46_im)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im)); t_1 = (x_46_im / y_46_re) - ((x_46_re * (y_46_im / y_46_re)) / y_46_re); tmp = 0.0; if (y_46_re <= -1.65e+89) tmp = t_1; elseif (y_46_re <= -1.2e-78) tmp = t_0; elseif (y_46_re <= 9.2e-240) tmp = (x_46_im / ((y_46_im ^ 2.0) / y_46_re)) - (x_46_re / y_46_im); elseif (y_46_re <= 6.1e+74) 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[(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]}, Block[{t$95$1 = N[(N[(x$46$im / y$46$re), $MachinePrecision] - N[(N[(x$46$re * N[(y$46$im / y$46$re), $MachinePrecision]), $MachinePrecision] / y$46$re), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -1.65e+89], t$95$1, If[LessEqual[y$46$re, -1.2e-78], t$95$0, If[LessEqual[y$46$re, 9.2e-240], N[(N[(x$46$im / N[(N[Power[y$46$im, 2.0], $MachinePrecision] / y$46$re), $MachinePrecision]), $MachinePrecision] - N[(x$46$re / y$46$im), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 6.1e+74], t$95$0, t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{y.re \cdot x.im - x.re \cdot y.im}{y.re \cdot y.re + y.im \cdot y.im}\\
t_1 := \frac{x.im}{y.re} - \frac{x.re \cdot \frac{y.im}{y.re}}{y.re}\\
\mathbf{if}\;y.re \leq -1.65 \cdot 10^{+89}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y.re \leq -1.2 \cdot 10^{-78}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y.re \leq 9.2 \cdot 10^{-240}:\\
\;\;\;\;\frac{x.im}{\frac{{y.im}^{2}}{y.re}} - \frac{x.re}{y.im}\\
\mathbf{elif}\;y.re \leq 6.1 \cdot 10^{+74}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y.re < -1.64999999999999987e89 or 6.0999999999999997e74 < y.re Initial program 34.2%
Taylor expanded in y.re around inf 74.6%
+-commutative74.6%
mul-1-neg74.6%
unsub-neg74.6%
associate-/l*76.2%
associate-/r/78.0%
Simplified78.0%
associate-*l/74.6%
unpow274.6%
associate-/r*82.4%
associate-*l/88.6%
associate-/r/88.6%
div-inv88.6%
clear-num88.6%
Applied egg-rr88.6%
if -1.64999999999999987e89 < y.re < -1.2e-78 or 9.19999999999999972e-240 < y.re < 6.0999999999999997e74Initial program 81.2%
if -1.2e-78 < y.re < 9.19999999999999972e-240Initial program 78.0%
Taylor expanded in x.im around 0 78.0%
mul-1-neg78.0%
+-commutative78.0%
*-commutative78.0%
fma-def78.0%
distribute-rgt-neg-in78.0%
Simplified78.0%
Taylor expanded in y.re around 0 92.2%
+-commutative92.2%
mul-1-neg92.2%
unsub-neg92.2%
associate-/l*90.8%
Simplified90.8%
Final simplification86.3%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0
(/ (- (* y.re x.im) (* x.re y.im)) (+ (* y.re y.re) (* y.im y.im))))
(t_1 (- (/ x.im y.re) (/ (* x.re (/ y.im y.re)) y.re))))
(if (<= y.re -5.4e+93)
t_1
(if (<= y.re -3.4e-79)
t_0
(if (<= y.re -2.6e-205)
(- (/ x.re y.im))
(if (<= y.re 2.5e+70) 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) - (x_46_re * y_46_im)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im));
double t_1 = (x_46_im / y_46_re) - ((x_46_re * (y_46_im / y_46_re)) / y_46_re);
double tmp;
if (y_46_re <= -5.4e+93) {
tmp = t_1;
} else if (y_46_re <= -3.4e-79) {
tmp = t_0;
} else if (y_46_re <= -2.6e-205) {
tmp = -(x_46_re / y_46_im);
} else if (y_46_re <= 2.5e+70) {
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) - (x_46re * y_46im)) / ((y_46re * y_46re) + (y_46im * y_46im))
t_1 = (x_46im / y_46re) - ((x_46re * (y_46im / y_46re)) / y_46re)
if (y_46re <= (-5.4d+93)) then
tmp = t_1
else if (y_46re <= (-3.4d-79)) then
tmp = t_0
else if (y_46re <= (-2.6d-205)) then
tmp = -(x_46re / y_46im)
else if (y_46re <= 2.5d+70) 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) - (x_46_re * y_46_im)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im));
double t_1 = (x_46_im / y_46_re) - ((x_46_re * (y_46_im / y_46_re)) / y_46_re);
double tmp;
if (y_46_re <= -5.4e+93) {
tmp = t_1;
} else if (y_46_re <= -3.4e-79) {
tmp = t_0;
} else if (y_46_re <= -2.6e-205) {
tmp = -(x_46_re / y_46_im);
} else if (y_46_re <= 2.5e+70) {
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) - (x_46_re * y_46_im)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im)) t_1 = (x_46_im / y_46_re) - ((x_46_re * (y_46_im / y_46_re)) / y_46_re) tmp = 0 if y_46_re <= -5.4e+93: tmp = t_1 elif y_46_re <= -3.4e-79: tmp = t_0 elif y_46_re <= -2.6e-205: tmp = -(x_46_re / y_46_im) elif y_46_re <= 2.5e+70: 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(x_46_re * y_46_im)) / Float64(Float64(y_46_re * y_46_re) + Float64(y_46_im * y_46_im))) t_1 = Float64(Float64(x_46_im / y_46_re) - Float64(Float64(x_46_re * Float64(y_46_im / y_46_re)) / y_46_re)) tmp = 0.0 if (y_46_re <= -5.4e+93) tmp = t_1; elseif (y_46_re <= -3.4e-79) tmp = t_0; elseif (y_46_re <= -2.6e-205) tmp = Float64(-Float64(x_46_re / y_46_im)); elseif (y_46_re <= 2.5e+70) 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) - (x_46_re * y_46_im)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im)); t_1 = (x_46_im / y_46_re) - ((x_46_re * (y_46_im / y_46_re)) / y_46_re); tmp = 0.0; if (y_46_re <= -5.4e+93) tmp = t_1; elseif (y_46_re <= -3.4e-79) tmp = t_0; elseif (y_46_re <= -2.6e-205) tmp = -(x_46_re / y_46_im); elseif (y_46_re <= 2.5e+70) 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[(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]}, Block[{t$95$1 = N[(N[(x$46$im / y$46$re), $MachinePrecision] - N[(N[(x$46$re * N[(y$46$im / y$46$re), $MachinePrecision]), $MachinePrecision] / y$46$re), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -5.4e+93], t$95$1, If[LessEqual[y$46$re, -3.4e-79], t$95$0, If[LessEqual[y$46$re, -2.6e-205], (-N[(x$46$re / y$46$im), $MachinePrecision]), If[LessEqual[y$46$re, 2.5e+70], t$95$0, t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{y.re \cdot x.im - x.re \cdot y.im}{y.re \cdot y.re + y.im \cdot y.im}\\
t_1 := \frac{x.im}{y.re} - \frac{x.re \cdot \frac{y.im}{y.re}}{y.re}\\
\mathbf{if}\;y.re \leq -5.4 \cdot 10^{+93}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y.re \leq -3.4 \cdot 10^{-79}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y.re \leq -2.6 \cdot 10^{-205}:\\
\;\;\;\;-\frac{x.re}{y.im}\\
\mathbf{elif}\;y.re \leq 2.5 \cdot 10^{+70}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y.re < -5.3999999999999999e93 or 2.5000000000000001e70 < y.re Initial program 34.2%
Taylor expanded in y.re around inf 74.6%
+-commutative74.6%
mul-1-neg74.6%
unsub-neg74.6%
associate-/l*76.2%
associate-/r/78.0%
Simplified78.0%
associate-*l/74.6%
unpow274.6%
associate-/r*82.4%
associate-*l/88.6%
associate-/r/88.6%
div-inv88.6%
clear-num88.6%
Applied egg-rr88.6%
if -5.3999999999999999e93 < y.re < -3.39999999999999976e-79 or -2.5999999999999998e-205 < y.re < 2.5000000000000001e70Initial program 81.8%
if -3.39999999999999976e-79 < y.re < -2.5999999999999998e-205Initial program 72.4%
Taylor expanded in y.re around 0 90.9%
associate-*r/90.9%
neg-mul-190.9%
Simplified90.9%
Final simplification85.4%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (- (/ x.im y.re) (/ (* x.re (/ y.im y.re)) y.re))))
(if (<= y.re -2.35e+86)
t_0
(if (<= y.re -2.5e+65)
(/ x.im (* y.im (/ y.im y.re)))
(if (or (<= y.re -3.5e-78) (not (<= y.re 0.12)))
t_0
(- (/ 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_im / y_46_re) - ((x_46_re * (y_46_im / y_46_re)) / y_46_re);
double tmp;
if (y_46_re <= -2.35e+86) {
tmp = t_0;
} else if (y_46_re <= -2.5e+65) {
tmp = x_46_im / (y_46_im * (y_46_im / y_46_re));
} else if ((y_46_re <= -3.5e-78) || !(y_46_re <= 0.12)) {
tmp = t_0;
} else {
tmp = -(x_46_re / y_46_im);
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
real(8) :: tmp
t_0 = (x_46im / y_46re) - ((x_46re * (y_46im / y_46re)) / y_46re)
if (y_46re <= (-2.35d+86)) then
tmp = t_0
else if (y_46re <= (-2.5d+65)) then
tmp = x_46im / (y_46im * (y_46im / y_46re))
else if ((y_46re <= (-3.5d-78)) .or. (.not. (y_46re <= 0.12d0))) then
tmp = t_0
else
tmp = -(x_46re / y_46im)
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = (x_46_im / y_46_re) - ((x_46_re * (y_46_im / y_46_re)) / y_46_re);
double tmp;
if (y_46_re <= -2.35e+86) {
tmp = t_0;
} else if (y_46_re <= -2.5e+65) {
tmp = x_46_im / (y_46_im * (y_46_im / y_46_re));
} else if ((y_46_re <= -3.5e-78) || !(y_46_re <= 0.12)) {
tmp = t_0;
} else {
tmp = -(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_im / y_46_re) - ((x_46_re * (y_46_im / y_46_re)) / y_46_re) tmp = 0 if y_46_re <= -2.35e+86: tmp = t_0 elif y_46_re <= -2.5e+65: tmp = x_46_im / (y_46_im * (y_46_im / y_46_re)) elif (y_46_re <= -3.5e-78) or not (y_46_re <= 0.12): tmp = t_0 else: tmp = -(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(x_46_im / y_46_re) - Float64(Float64(x_46_re * Float64(y_46_im / y_46_re)) / y_46_re)) tmp = 0.0 if (y_46_re <= -2.35e+86) tmp = t_0; elseif (y_46_re <= -2.5e+65) tmp = Float64(x_46_im / Float64(y_46_im * Float64(y_46_im / y_46_re))); elseif ((y_46_re <= -3.5e-78) || !(y_46_re <= 0.12)) tmp = t_0; else tmp = Float64(-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_im / y_46_re) - ((x_46_re * (y_46_im / y_46_re)) / y_46_re); tmp = 0.0; if (y_46_re <= -2.35e+86) tmp = t_0; elseif (y_46_re <= -2.5e+65) tmp = x_46_im / (y_46_im * (y_46_im / y_46_re)); elseif ((y_46_re <= -3.5e-78) || ~((y_46_re <= 0.12))) tmp = t_0; else tmp = -(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[(x$46$im / y$46$re), $MachinePrecision] - N[(N[(x$46$re * N[(y$46$im / y$46$re), $MachinePrecision]), $MachinePrecision] / y$46$re), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -2.35e+86], t$95$0, If[LessEqual[y$46$re, -2.5e+65], N[(x$46$im / N[(y$46$im * N[(y$46$im / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y$46$re, -3.5e-78], N[Not[LessEqual[y$46$re, 0.12]], $MachinePrecision]], t$95$0, (-N[(x$46$re / y$46$im), $MachinePrecision])]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x.im}{y.re} - \frac{x.re \cdot \frac{y.im}{y.re}}{y.re}\\
\mathbf{if}\;y.re \leq -2.35 \cdot 10^{+86}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y.re \leq -2.5 \cdot 10^{+65}:\\
\;\;\;\;\frac{x.im}{y.im \cdot \frac{y.im}{y.re}}\\
\mathbf{elif}\;y.re \leq -3.5 \cdot 10^{-78} \lor \neg \left(y.re \leq 0.12\right):\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;-\frac{x.re}{y.im}\\
\end{array}
\end{array}
if y.re < -2.3500000000000001e86 or -2.49999999999999986e65 < y.re < -3.4999999999999999e-78 or 0.12 < y.re Initial program 49.3%
Taylor expanded in y.re around inf 69.7%
+-commutative69.7%
mul-1-neg69.7%
unsub-neg69.7%
associate-/l*70.8%
associate-/r/71.4%
Simplified71.4%
associate-*l/69.7%
unpow269.7%
associate-/r*75.0%
associate-*l/79.3%
associate-/r/79.3%
div-inv79.3%
clear-num79.3%
Applied egg-rr79.3%
if -2.3500000000000001e86 < y.re < -2.49999999999999986e65Initial program 66.5%
Taylor expanded in x.im around inf 66.5%
associate-/l*93.6%
unpow293.6%
fma-udef93.6%
Simplified93.6%
Taylor expanded in y.im around inf 80.3%
div-inv80.3%
unpow280.3%
associate-*l*80.3%
div-inv80.3%
Applied egg-rr80.3%
if -3.4999999999999999e-78 < y.re < 0.12Initial program 80.0%
Taylor expanded in y.re around 0 71.1%
associate-*r/71.1%
neg-mul-171.1%
Simplified71.1%
Final simplification75.8%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (- (/ x.im y.re) (/ (* x.re (/ y.im y.re)) y.re))))
(if (<= y.re -2.35e+86)
t_0
(if (<= y.re -1.3e+51)
(* (/ -1.0 y.im) (- (- x.re) (/ x.im (/ y.im y.re))))
(if (or (<= y.re -1.3e-78) (not (<= y.re 35.0)))
t_0
(- (/ 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_im / y_46_re) - ((x_46_re * (y_46_im / y_46_re)) / y_46_re);
double tmp;
if (y_46_re <= -2.35e+86) {
tmp = t_0;
} else if (y_46_re <= -1.3e+51) {
tmp = (-1.0 / y_46_im) * (-x_46_re - (x_46_im / (y_46_im / y_46_re)));
} else if ((y_46_re <= -1.3e-78) || !(y_46_re <= 35.0)) {
tmp = t_0;
} else {
tmp = -(x_46_re / y_46_im);
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
real(8) :: tmp
t_0 = (x_46im / y_46re) - ((x_46re * (y_46im / y_46re)) / y_46re)
if (y_46re <= (-2.35d+86)) then
tmp = t_0
else if (y_46re <= (-1.3d+51)) then
tmp = ((-1.0d0) / y_46im) * (-x_46re - (x_46im / (y_46im / y_46re)))
else if ((y_46re <= (-1.3d-78)) .or. (.not. (y_46re <= 35.0d0))) then
tmp = t_0
else
tmp = -(x_46re / y_46im)
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = (x_46_im / y_46_re) - ((x_46_re * (y_46_im / y_46_re)) / y_46_re);
double tmp;
if (y_46_re <= -2.35e+86) {
tmp = t_0;
} else if (y_46_re <= -1.3e+51) {
tmp = (-1.0 / y_46_im) * (-x_46_re - (x_46_im / (y_46_im / y_46_re)));
} else if ((y_46_re <= -1.3e-78) || !(y_46_re <= 35.0)) {
tmp = t_0;
} else {
tmp = -(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_im / y_46_re) - ((x_46_re * (y_46_im / y_46_re)) / y_46_re) tmp = 0 if y_46_re <= -2.35e+86: tmp = t_0 elif y_46_re <= -1.3e+51: tmp = (-1.0 / y_46_im) * (-x_46_re - (x_46_im / (y_46_im / y_46_re))) elif (y_46_re <= -1.3e-78) or not (y_46_re <= 35.0): tmp = t_0 else: tmp = -(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(x_46_im / y_46_re) - Float64(Float64(x_46_re * Float64(y_46_im / y_46_re)) / y_46_re)) tmp = 0.0 if (y_46_re <= -2.35e+86) tmp = t_0; elseif (y_46_re <= -1.3e+51) tmp = Float64(Float64(-1.0 / y_46_im) * Float64(Float64(-x_46_re) - Float64(x_46_im / Float64(y_46_im / y_46_re)))); elseif ((y_46_re <= -1.3e-78) || !(y_46_re <= 35.0)) tmp = t_0; else tmp = Float64(-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_im / y_46_re) - ((x_46_re * (y_46_im / y_46_re)) / y_46_re); tmp = 0.0; if (y_46_re <= -2.35e+86) tmp = t_0; elseif (y_46_re <= -1.3e+51) tmp = (-1.0 / y_46_im) * (-x_46_re - (x_46_im / (y_46_im / y_46_re))); elseif ((y_46_re <= -1.3e-78) || ~((y_46_re <= 35.0))) tmp = t_0; else tmp = -(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[(x$46$im / y$46$re), $MachinePrecision] - N[(N[(x$46$re * N[(y$46$im / y$46$re), $MachinePrecision]), $MachinePrecision] / y$46$re), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -2.35e+86], t$95$0, If[LessEqual[y$46$re, -1.3e+51], N[(N[(-1.0 / y$46$im), $MachinePrecision] * N[((-x$46$re) - N[(x$46$im / N[(y$46$im / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y$46$re, -1.3e-78], N[Not[LessEqual[y$46$re, 35.0]], $MachinePrecision]], t$95$0, (-N[(x$46$re / y$46$im), $MachinePrecision])]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x.im}{y.re} - \frac{x.re \cdot \frac{y.im}{y.re}}{y.re}\\
\mathbf{if}\;y.re \leq -2.35 \cdot 10^{+86}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y.re \leq -1.3 \cdot 10^{+51}:\\
\;\;\;\;\frac{-1}{y.im} \cdot \left(\left(-x.re\right) - \frac{x.im}{\frac{y.im}{y.re}}\right)\\
\mathbf{elif}\;y.re \leq -1.3 \cdot 10^{-78} \lor \neg \left(y.re \leq 35\right):\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;-\frac{x.re}{y.im}\\
\end{array}
\end{array}
if y.re < -2.3500000000000001e86 or -1.3000000000000001e51 < y.re < -1.3000000000000001e-78 or 35 < y.re Initial program 49.2%
Taylor expanded in y.re around inf 70.0%
+-commutative70.0%
mul-1-neg70.0%
unsub-neg70.0%
associate-/l*71.1%
associate-/r/71.7%
Simplified71.7%
associate-*l/70.0%
unpow270.0%
associate-/r*75.4%
associate-*l/79.7%
associate-/r/79.7%
div-inv79.7%
clear-num79.7%
Applied egg-rr79.7%
if -2.3500000000000001e86 < y.re < -1.3000000000000001e51Initial program 62.8%
fma-neg62.8%
*-commutative62.8%
distribute-rgt-neg-out62.8%
*-un-lft-identity62.8%
fma-def62.8%
add-sqr-sqrt62.8%
times-frac62.8%
fma-def62.8%
hypot-def62.8%
*-commutative62.8%
add-sqr-sqrt29.0%
sqrt-unprod62.3%
sqr-neg62.3%
sqrt-unprod33.8%
add-sqr-sqrt62.8%
fma-def62.8%
hypot-def67.9%
Applied egg-rr67.9%
Taylor expanded in y.im around -inf 51.7%
mul-1-neg51.7%
unsub-neg51.7%
mul-1-neg51.7%
associate-/l*63.0%
Simplified63.0%
Taylor expanded in y.im around -inf 78.7%
if -1.3000000000000001e-78 < y.re < 35Initial program 80.0%
Taylor expanded in y.re around 0 71.1%
associate-*r/71.1%
neg-mul-171.1%
Simplified71.1%
Final simplification76.0%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (or (<= y.re -5.3e-65) (not (<= y.re 50.0))) (- (/ x.im y.re) (* y.im (/ (/ x.re y.re) 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_re <= -5.3e-65) || !(y_46_re <= 50.0)) {
tmp = (x_46_im / y_46_re) - (y_46_im * ((x_46_re / y_46_re) / y_46_re));
} else {
tmp = -(x_46_re / y_46_im);
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: tmp
if ((y_46re <= (-5.3d-65)) .or. (.not. (y_46re <= 50.0d0))) then
tmp = (x_46im / y_46re) - (y_46im * ((x_46re / y_46re) / y_46re))
else
tmp = -(x_46re / y_46im)
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_re <= -5.3e-65) || !(y_46_re <= 50.0)) {
tmp = (x_46_im / y_46_re) - (y_46_im * ((x_46_re / y_46_re) / y_46_re));
} else {
tmp = -(x_46_re / y_46_im);
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if (y_46_re <= -5.3e-65) or not (y_46_re <= 50.0): tmp = (x_46_im / y_46_re) - (y_46_im * ((x_46_re / y_46_re) / y_46_re)) else: tmp = -(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_re <= -5.3e-65) || !(y_46_re <= 50.0)) tmp = Float64(Float64(x_46_im / y_46_re) - Float64(y_46_im * Float64(Float64(x_46_re / y_46_re) / y_46_re))); else tmp = Float64(-Float64(x_46_re / y_46_im)); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if ((y_46_re <= -5.3e-65) || ~((y_46_re <= 50.0))) tmp = (x_46_im / y_46_re) - (y_46_im * ((x_46_re / y_46_re) / y_46_re)); else tmp = -(x_46_re / y_46_im); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[Or[LessEqual[y$46$re, -5.3e-65], N[Not[LessEqual[y$46$re, 50.0]], $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], (-N[(x$46$re / y$46$im), $MachinePrecision])]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq -5.3 \cdot 10^{-65} \lor \neg \left(y.re \leq 50\right):\\
\;\;\;\;\frac{x.im}{y.re} - y.im \cdot \frac{\frac{x.re}{y.re}}{y.re}\\
\mathbf{else}:\\
\;\;\;\;-\frac{x.re}{y.im}\\
\end{array}
\end{array}
if y.re < -5.30000000000000037e-65 or 50 < y.re Initial program 49.0%
Taylor expanded in y.re around inf 67.2%
+-commutative67.2%
mul-1-neg67.2%
unsub-neg67.2%
associate-/l*68.3%
associate-/r/70.9%
Simplified70.9%
*-un-lft-identity70.9%
unpow270.9%
times-frac74.5%
Applied egg-rr74.5%
associate-*l/74.5%
*-lft-identity74.5%
Simplified74.5%
if -5.30000000000000037e-65 < y.re < 50Initial program 80.5%
Taylor expanded in y.re around 0 70.2%
associate-*r/70.2%
neg-mul-170.2%
Simplified70.2%
Final simplification72.6%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (or (<= y.re -0.00017) (not (<= y.re 90.0))) (/ 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_re <= -0.00017) || !(y_46_re <= 90.0)) {
tmp = x_46_im / y_46_re;
} else {
tmp = -(x_46_re / y_46_im);
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: tmp
if ((y_46re <= (-0.00017d0)) .or. (.not. (y_46re <= 90.0d0))) then
tmp = x_46im / y_46re
else
tmp = -(x_46re / y_46im)
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_re <= -0.00017) || !(y_46_re <= 90.0)) {
tmp = x_46_im / y_46_re;
} else {
tmp = -(x_46_re / y_46_im);
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if (y_46_re <= -0.00017) or not (y_46_re <= 90.0): tmp = x_46_im / y_46_re else: tmp = -(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_re <= -0.00017) || !(y_46_re <= 90.0)) tmp = Float64(x_46_im / y_46_re); else tmp = Float64(-Float64(x_46_re / y_46_im)); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if ((y_46_re <= -0.00017) || ~((y_46_re <= 90.0))) tmp = x_46_im / y_46_re; else tmp = -(x_46_re / y_46_im); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[Or[LessEqual[y$46$re, -0.00017], N[Not[LessEqual[y$46$re, 90.0]], $MachinePrecision]], N[(x$46$im / y$46$re), $MachinePrecision], (-N[(x$46$re / y$46$im), $MachinePrecision])]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq -0.00017 \lor \neg \left(y.re \leq 90\right):\\
\;\;\;\;\frac{x.im}{y.re}\\
\mathbf{else}:\\
\;\;\;\;-\frac{x.re}{y.im}\\
\end{array}
\end{array}
if y.re < -1.7e-4 or 90 < y.re Initial program 45.5%
Taylor expanded in y.re around inf 66.6%
if -1.7e-4 < y.re < 90Initial program 80.9%
Taylor expanded in y.re around 0 67.3%
associate-*r/67.3%
neg-mul-167.3%
Simplified67.3%
Final simplification66.9%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (<= y.im 6.5e+200) (/ 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 <= 6.5e+200) {
tmp = x_46_im / y_46_re;
} else {
tmp = x_46_re / y_46_im;
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: tmp
if (y_46im <= 6.5d+200) then
tmp = x_46im / y_46re
else
tmp = x_46re / y_46im
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_im <= 6.5e+200) {
tmp = x_46_im / y_46_re;
} else {
tmp = x_46_re / y_46_im;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if y_46_im <= 6.5e+200: tmp = x_46_im / y_46_re else: tmp = 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 <= 6.5e+200) tmp = Float64(x_46_im / y_46_re); else tmp = Float64(x_46_re / y_46_im); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if (y_46_im <= 6.5e+200) tmp = x_46_im / y_46_re; else tmp = x_46_re / y_46_im; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[y$46$im, 6.5e+200], N[(x$46$im / y$46$re), $MachinePrecision], N[(x$46$re / y$46$im), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.im \leq 6.5 \cdot 10^{+200}:\\
\;\;\;\;\frac{x.im}{y.re}\\
\mathbf{else}:\\
\;\;\;\;\frac{x.re}{y.im}\\
\end{array}
\end{array}
if y.im < 6.49999999999999963e200Initial program 65.4%
Taylor expanded in y.re around inf 48.7%
if 6.49999999999999963e200 < y.im Initial program 39.8%
fma-neg39.8%
*-commutative39.8%
distribute-rgt-neg-out39.8%
*-un-lft-identity39.8%
fma-def39.8%
add-sqr-sqrt39.8%
times-frac39.8%
fma-def39.8%
hypot-def39.8%
*-commutative39.8%
add-sqr-sqrt26.3%
sqrt-unprod39.8%
sqr-neg39.8%
sqrt-unprod13.5%
add-sqr-sqrt39.8%
fma-def39.8%
hypot-def48.9%
Applied egg-rr48.9%
Taylor expanded in y.re around 0 41.0%
Final simplification47.9%
(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 62.9%
fma-neg62.9%
*-commutative62.9%
distribute-rgt-neg-out62.9%
*-un-lft-identity62.9%
fma-def62.9%
add-sqr-sqrt62.9%
times-frac63.0%
fma-def63.0%
hypot-def63.0%
*-commutative63.0%
add-sqr-sqrt29.8%
sqrt-unprod41.8%
sqr-neg41.8%
sqrt-unprod18.2%
add-sqr-sqrt37.0%
fma-def37.0%
hypot-def44.6%
Applied egg-rr44.6%
Taylor expanded in y.im around -inf 32.6%
mul-1-neg32.6%
unsub-neg32.6%
mul-1-neg32.6%
associate-/l*33.8%
Simplified33.8%
Taylor expanded in y.re around -inf 10.2%
Final simplification10.2%
(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 62.9%
Taylor expanded in y.re around inf 44.6%
Final simplification44.6%
herbie shell --seed 2024021
(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))))