
(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 (hypot y.re y.im)) (/ x.im (hypot y.re y.im))))
(t_1 (pow (hypot y.re y.im) 2.0))
(t_2 (- t_0 (* y.im (/ x.re t_1)))))
(if (<= y.im -3.8e+101)
(-
(/ x.im (/ t_1 y.re))
(/ (* y.im (/ x.re (hypot y.re y.im))) (hypot y.re y.im)))
(if (<= y.im -2.9e-113)
t_2
(if (<= y.im 2.3e-163)
(- (/ x.im y.re) (/ x.re (* y.re (* y.re (/ 1.0 y.im)))))
(if (<= y.im 4.8e+87) t_2 (- 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 = (y_46_re / hypot(y_46_re, y_46_im)) * (x_46_im / hypot(y_46_re, y_46_im));
double t_1 = pow(hypot(y_46_re, y_46_im), 2.0);
double t_2 = t_0 - (y_46_im * (x_46_re / t_1));
double tmp;
if (y_46_im <= -3.8e+101) {
tmp = (x_46_im / (t_1 / y_46_re)) - ((y_46_im * (x_46_re / hypot(y_46_re, y_46_im))) / hypot(y_46_re, y_46_im));
} else if (y_46_im <= -2.9e-113) {
tmp = t_2;
} else if (y_46_im <= 2.3e-163) {
tmp = (x_46_im / y_46_re) - (x_46_re / (y_46_re * (y_46_re * (1.0 / y_46_im))));
} else if (y_46_im <= 4.8e+87) {
tmp = t_2;
} else {
tmp = t_0 - (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 = (y_46_re / Math.hypot(y_46_re, y_46_im)) * (x_46_im / Math.hypot(y_46_re, y_46_im));
double t_1 = Math.pow(Math.hypot(y_46_re, y_46_im), 2.0);
double t_2 = t_0 - (y_46_im * (x_46_re / t_1));
double tmp;
if (y_46_im <= -3.8e+101) {
tmp = (x_46_im / (t_1 / y_46_re)) - ((y_46_im * (x_46_re / Math.hypot(y_46_re, y_46_im))) / Math.hypot(y_46_re, y_46_im));
} else if (y_46_im <= -2.9e-113) {
tmp = t_2;
} else if (y_46_im <= 2.3e-163) {
tmp = (x_46_im / y_46_re) - (x_46_re / (y_46_re * (y_46_re * (1.0 / y_46_im))));
} else if (y_46_im <= 4.8e+87) {
tmp = t_2;
} else {
tmp = t_0 - (x_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 / math.hypot(y_46_re, y_46_im)) * (x_46_im / math.hypot(y_46_re, y_46_im)) t_1 = math.pow(math.hypot(y_46_re, y_46_im), 2.0) t_2 = t_0 - (y_46_im * (x_46_re / t_1)) tmp = 0 if y_46_im <= -3.8e+101: tmp = (x_46_im / (t_1 / y_46_re)) - ((y_46_im * (x_46_re / math.hypot(y_46_re, y_46_im))) / math.hypot(y_46_re, y_46_im)) elif y_46_im <= -2.9e-113: tmp = t_2 elif y_46_im <= 2.3e-163: tmp = (x_46_im / y_46_re) - (x_46_re / (y_46_re * (y_46_re * (1.0 / y_46_im)))) elif y_46_im <= 4.8e+87: tmp = t_2 else: tmp = t_0 - (x_46_re / y_46_im) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(Float64(y_46_re / hypot(y_46_re, y_46_im)) * Float64(x_46_im / hypot(y_46_re, y_46_im))) t_1 = hypot(y_46_re, y_46_im) ^ 2.0 t_2 = Float64(t_0 - Float64(y_46_im * Float64(x_46_re / t_1))) tmp = 0.0 if (y_46_im <= -3.8e+101) tmp = Float64(Float64(x_46_im / Float64(t_1 / y_46_re)) - Float64(Float64(y_46_im * Float64(x_46_re / hypot(y_46_re, y_46_im))) / hypot(y_46_re, y_46_im))); elseif (y_46_im <= -2.9e-113) tmp = t_2; elseif (y_46_im <= 2.3e-163) tmp = Float64(Float64(x_46_im / y_46_re) - Float64(x_46_re / Float64(y_46_re * Float64(y_46_re * Float64(1.0 / y_46_im))))); elseif (y_46_im <= 4.8e+87) tmp = t_2; else tmp = Float64(t_0 - 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 = (y_46_re / hypot(y_46_re, y_46_im)) * (x_46_im / hypot(y_46_re, y_46_im)); t_1 = hypot(y_46_re, y_46_im) ^ 2.0; t_2 = t_0 - (y_46_im * (x_46_re / t_1)); tmp = 0.0; if (y_46_im <= -3.8e+101) tmp = (x_46_im / (t_1 / y_46_re)) - ((y_46_im * (x_46_re / hypot(y_46_re, y_46_im))) / hypot(y_46_re, y_46_im)); elseif (y_46_im <= -2.9e-113) tmp = t_2; elseif (y_46_im <= 2.3e-163) tmp = (x_46_im / y_46_re) - (x_46_re / (y_46_re * (y_46_re * (1.0 / y_46_im)))); elseif (y_46_im <= 4.8e+87) tmp = t_2; else tmp = t_0 - (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[(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]}, Block[{t$95$1 = N[Power[N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision], 2.0], $MachinePrecision]}, Block[{t$95$2 = N[(t$95$0 - N[(y$46$im * N[(x$46$re / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -3.8e+101], N[(N[(x$46$im / N[(t$95$1 / y$46$re), $MachinePrecision]), $MachinePrecision] - N[(N[(y$46$im * N[(x$46$re / N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, -2.9e-113], t$95$2, If[LessEqual[y$46$im, 2.3e-163], N[(N[(x$46$im / y$46$re), $MachinePrecision] - N[(x$46$re / N[(y$46$re * N[(y$46$re * N[(1.0 / y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 4.8e+87], t$95$2, N[(t$95$0 - N[(x$46$re / y$46$im), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{y.re}{\mathsf{hypot}\left(y.re, y.im\right)} \cdot \frac{x.im}{\mathsf{hypot}\left(y.re, y.im\right)}\\
t_1 := {\left(\mathsf{hypot}\left(y.re, y.im\right)\right)}^{2}\\
t_2 := t_0 - y.im \cdot \frac{x.re}{t_1}\\
\mathbf{if}\;y.im \leq -3.8 \cdot 10^{+101}:\\
\;\;\;\;\frac{x.im}{\frac{t_1}{y.re}} - \frac{y.im \cdot \frac{x.re}{\mathsf{hypot}\left(y.re, y.im\right)}}{\mathsf{hypot}\left(y.re, y.im\right)}\\
\mathbf{elif}\;y.im \leq -2.9 \cdot 10^{-113}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y.im \leq 2.3 \cdot 10^{-163}:\\
\;\;\;\;\frac{x.im}{y.re} - \frac{x.re}{y.re \cdot \left(y.re \cdot \frac{1}{y.im}\right)}\\
\mathbf{elif}\;y.im \leq 4.8 \cdot 10^{+87}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_0 - \frac{x.re}{y.im}\\
\end{array}
\end{array}
if y.im < -3.7999999999999998e101Initial program 39.5%
div-sub39.5%
sub-neg39.5%
add-sqr-sqrt39.5%
pow239.5%
hypot-def39.5%
associate-/l*48.1%
add-sqr-sqrt48.1%
pow248.1%
hypot-def48.1%
Applied egg-rr48.1%
sub-neg48.1%
associate-/l*46.5%
associate-/r/44.6%
Simplified44.6%
*-un-lft-identity44.6%
unpow244.6%
times-frac73.4%
Applied egg-rr73.4%
associate-*l/73.6%
*-lft-identity73.6%
Simplified73.6%
associate-*l/90.3%
Applied egg-rr90.3%
if -3.7999999999999998e101 < y.im < -2.90000000000000004e-113 or 2.2999999999999999e-163 < y.im < 4.79999999999999963e87Initial program 72.1%
div-sub72.1%
sub-neg72.1%
add-sqr-sqrt72.1%
pow272.1%
hypot-def72.1%
associate-/l*73.1%
add-sqr-sqrt73.1%
pow273.1%
hypot-def73.1%
Applied egg-rr73.1%
sub-neg73.1%
associate-/l*75.6%
associate-/r/73.0%
Simplified73.0%
div-inv72.9%
clear-num72.9%
div-inv72.9%
associate-*l*70.3%
*-commutative70.3%
div-inv70.4%
unpow270.4%
times-frac92.5%
Applied egg-rr92.5%
if -2.90000000000000004e-113 < y.im < 2.2999999999999999e-163Initial program 65.1%
Taylor expanded in y.re around inf 73.5%
+-commutative73.5%
mul-1-neg73.5%
unsub-neg73.5%
associate-/l*74.2%
Simplified74.2%
pow274.2%
div-inv74.2%
associate-*l*87.1%
Applied egg-rr87.1%
if 4.79999999999999963e87 < y.im Initial program 36.5%
div-sub36.5%
sub-neg36.5%
add-sqr-sqrt36.5%
pow236.5%
hypot-def36.5%
associate-/l*39.8%
add-sqr-sqrt39.8%
pow239.8%
hypot-def39.8%
Applied egg-rr39.8%
sub-neg39.8%
associate-/l*40.4%
associate-/r/36.6%
Simplified36.6%
div-inv36.6%
clear-num36.5%
div-inv36.5%
associate-*l*36.0%
*-commutative36.0%
div-inv36.0%
unpow236.0%
times-frac53.6%
Applied egg-rr53.6%
Taylor expanded in y.re around 0 94.1%
Final simplification91.3%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* (/ y.re (hypot y.re y.im)) (/ x.im (hypot y.re y.im))))
(t_1 (- t_0 (* y.im (/ x.re (pow (hypot y.re y.im) 2.0)))))
(t_2 (- t_0 (/ x.re y.im))))
(if (<= y.im -6.8e+105)
t_2
(if (<= y.im -2.9e-113)
t_1
(if (<= y.im 6.6e-163)
(- (/ x.im y.re) (/ x.re (* y.re (* y.re (/ 1.0 y.im)))))
(if (<= y.im 4.8e+87) t_1 t_2))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = (y_46_re / hypot(y_46_re, y_46_im)) * (x_46_im / hypot(y_46_re, y_46_im));
double t_1 = t_0 - (y_46_im * (x_46_re / pow(hypot(y_46_re, y_46_im), 2.0)));
double t_2 = t_0 - (x_46_re / y_46_im);
double tmp;
if (y_46_im <= -6.8e+105) {
tmp = t_2;
} else if (y_46_im <= -2.9e-113) {
tmp = t_1;
} else if (y_46_im <= 6.6e-163) {
tmp = (x_46_im / y_46_re) - (x_46_re / (y_46_re * (y_46_re * (1.0 / y_46_im))));
} else if (y_46_im <= 4.8e+87) {
tmp = t_1;
} else {
tmp = t_2;
}
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 / Math.hypot(y_46_re, y_46_im)) * (x_46_im / Math.hypot(y_46_re, y_46_im));
double t_1 = t_0 - (y_46_im * (x_46_re / Math.pow(Math.hypot(y_46_re, y_46_im), 2.0)));
double t_2 = t_0 - (x_46_re / y_46_im);
double tmp;
if (y_46_im <= -6.8e+105) {
tmp = t_2;
} else if (y_46_im <= -2.9e-113) {
tmp = t_1;
} else if (y_46_im <= 6.6e-163) {
tmp = (x_46_im / y_46_re) - (x_46_re / (y_46_re * (y_46_re * (1.0 / y_46_im))));
} else if (y_46_im <= 4.8e+87) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = (y_46_re / math.hypot(y_46_re, y_46_im)) * (x_46_im / math.hypot(y_46_re, y_46_im)) t_1 = t_0 - (y_46_im * (x_46_re / math.pow(math.hypot(y_46_re, y_46_im), 2.0))) t_2 = t_0 - (x_46_re / y_46_im) tmp = 0 if y_46_im <= -6.8e+105: tmp = t_2 elif y_46_im <= -2.9e-113: tmp = t_1 elif y_46_im <= 6.6e-163: tmp = (x_46_im / y_46_re) - (x_46_re / (y_46_re * (y_46_re * (1.0 / y_46_im)))) elif y_46_im <= 4.8e+87: tmp = t_1 else: tmp = t_2 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(Float64(y_46_re / hypot(y_46_re, y_46_im)) * Float64(x_46_im / hypot(y_46_re, y_46_im))) t_1 = Float64(t_0 - Float64(y_46_im * Float64(x_46_re / (hypot(y_46_re, y_46_im) ^ 2.0)))) t_2 = Float64(t_0 - Float64(x_46_re / y_46_im)) tmp = 0.0 if (y_46_im <= -6.8e+105) tmp = t_2; elseif (y_46_im <= -2.9e-113) tmp = t_1; elseif (y_46_im <= 6.6e-163) tmp = Float64(Float64(x_46_im / y_46_re) - Float64(x_46_re / Float64(y_46_re * Float64(y_46_re * Float64(1.0 / y_46_im))))); elseif (y_46_im <= 4.8e+87) tmp = t_1; else tmp = t_2; 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 / hypot(y_46_re, y_46_im)) * (x_46_im / hypot(y_46_re, y_46_im)); t_1 = t_0 - (y_46_im * (x_46_re / (hypot(y_46_re, y_46_im) ^ 2.0))); t_2 = t_0 - (x_46_re / y_46_im); tmp = 0.0; if (y_46_im <= -6.8e+105) tmp = t_2; elseif (y_46_im <= -2.9e-113) tmp = t_1; elseif (y_46_im <= 6.6e-163) tmp = (x_46_im / y_46_re) - (x_46_re / (y_46_re * (y_46_re * (1.0 / y_46_im)))); elseif (y_46_im <= 4.8e+87) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[(y$46$re / N[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]}, Block[{t$95$1 = N[(t$95$0 - N[(y$46$im * N[(x$46$re / N[Power[N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$0 - N[(x$46$re / y$46$im), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -6.8e+105], t$95$2, If[LessEqual[y$46$im, -2.9e-113], t$95$1, If[LessEqual[y$46$im, 6.6e-163], N[(N[(x$46$im / y$46$re), $MachinePrecision] - N[(x$46$re / N[(y$46$re * N[(y$46$re * N[(1.0 / y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 4.8e+87], t$95$1, t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{y.re}{\mathsf{hypot}\left(y.re, y.im\right)} \cdot \frac{x.im}{\mathsf{hypot}\left(y.re, y.im\right)}\\
t_1 := t_0 - y.im \cdot \frac{x.re}{{\left(\mathsf{hypot}\left(y.re, y.im\right)\right)}^{2}}\\
t_2 := t_0 - \frac{x.re}{y.im}\\
\mathbf{if}\;y.im \leq -6.8 \cdot 10^{+105}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y.im \leq -2.9 \cdot 10^{-113}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y.im \leq 6.6 \cdot 10^{-163}:\\
\;\;\;\;\frac{x.im}{y.re} - \frac{x.re}{y.re \cdot \left(y.re \cdot \frac{1}{y.im}\right)}\\
\mathbf{elif}\;y.im \leq 4.8 \cdot 10^{+87}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if y.im < -6.7999999999999999e105 or 4.79999999999999963e87 < y.im Initial program 38.3%
div-sub38.3%
sub-neg38.3%
add-sqr-sqrt38.3%
pow238.3%
hypot-def38.3%
associate-/l*44.4%
add-sqr-sqrt44.4%
pow244.4%
hypot-def44.4%
Applied egg-rr44.4%
sub-neg44.4%
associate-/l*43.8%
associate-/r/41.0%
Simplified41.0%
div-inv40.9%
clear-num40.9%
div-inv40.9%
associate-*l*41.5%
*-commutative41.5%
div-inv41.5%
unpow241.5%
times-frac54.4%
Applied egg-rr54.4%
Taylor expanded in y.re around 0 88.5%
if -6.7999999999999999e105 < y.im < -2.90000000000000004e-113 or 6.60000000000000002e-163 < y.im < 4.79999999999999963e87Initial program 71.5%
div-sub71.5%
sub-neg71.5%
add-sqr-sqrt71.4%
pow271.4%
hypot-def71.4%
associate-/l*72.4%
add-sqr-sqrt72.4%
pow272.4%
hypot-def72.4%
Applied egg-rr72.4%
sub-neg72.4%
associate-/l*75.0%
associate-/r/72.4%
Simplified72.4%
div-inv72.2%
clear-num72.2%
div-inv72.3%
associate-*l*69.7%
*-commutative69.7%
div-inv69.8%
unpow269.8%
times-frac91.7%
Applied egg-rr91.7%
if -2.90000000000000004e-113 < y.im < 6.60000000000000002e-163Initial program 65.1%
Taylor expanded in y.re around inf 73.5%
+-commutative73.5%
mul-1-neg73.5%
unsub-neg73.5%
associate-/l*74.2%
Simplified74.2%
pow274.2%
div-inv74.2%
associate-*l*87.1%
Applied egg-rr87.1%
Final simplification89.5%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0
(-
(* (/ y.re (hypot y.re y.im)) (/ x.im (hypot y.re y.im)))
(/ x.re y.im)))
(t_1 (pow (hypot y.re y.im) 2.0)))
(if (<= y.im -4.8e+91)
t_0
(if (<= y.im -9.8e-104)
(-
(/ x.im y.re)
(* y.im (/ (/ x.re (hypot y.re y.im)) (hypot y.re y.im))))
(if (<= y.im 9e-70)
(- (/ x.im y.re) (/ x.re (* y.re (* y.re (/ 1.0 y.im)))))
(if (<= y.im 1.6e+87)
(- (/ x.im (/ t_1 y.re)) (* y.im (/ x.re t_1)))
t_0))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = ((y_46_re / hypot(y_46_re, y_46_im)) * (x_46_im / hypot(y_46_re, y_46_im))) - (x_46_re / y_46_im);
double t_1 = pow(hypot(y_46_re, y_46_im), 2.0);
double tmp;
if (y_46_im <= -4.8e+91) {
tmp = t_0;
} else if (y_46_im <= -9.8e-104) {
tmp = (x_46_im / y_46_re) - (y_46_im * ((x_46_re / hypot(y_46_re, y_46_im)) / hypot(y_46_re, y_46_im)));
} else if (y_46_im <= 9e-70) {
tmp = (x_46_im / y_46_re) - (x_46_re / (y_46_re * (y_46_re * (1.0 / y_46_im))));
} else if (y_46_im <= 1.6e+87) {
tmp = (x_46_im / (t_1 / y_46_re)) - (y_46_im * (x_46_re / t_1));
} else {
tmp = t_0;
}
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 / Math.hypot(y_46_re, y_46_im)) * (x_46_im / Math.hypot(y_46_re, y_46_im))) - (x_46_re / y_46_im);
double t_1 = Math.pow(Math.hypot(y_46_re, y_46_im), 2.0);
double tmp;
if (y_46_im <= -4.8e+91) {
tmp = t_0;
} else if (y_46_im <= -9.8e-104) {
tmp = (x_46_im / y_46_re) - (y_46_im * ((x_46_re / Math.hypot(y_46_re, y_46_im)) / Math.hypot(y_46_re, y_46_im)));
} else if (y_46_im <= 9e-70) {
tmp = (x_46_im / y_46_re) - (x_46_re / (y_46_re * (y_46_re * (1.0 / y_46_im))));
} else if (y_46_im <= 1.6e+87) {
tmp = (x_46_im / (t_1 / y_46_re)) - (y_46_im * (x_46_re / t_1));
} else {
tmp = t_0;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = ((y_46_re / math.hypot(y_46_re, y_46_im)) * (x_46_im / math.hypot(y_46_re, y_46_im))) - (x_46_re / y_46_im) t_1 = math.pow(math.hypot(y_46_re, y_46_im), 2.0) tmp = 0 if y_46_im <= -4.8e+91: tmp = t_0 elif y_46_im <= -9.8e-104: tmp = (x_46_im / y_46_re) - (y_46_im * ((x_46_re / math.hypot(y_46_re, y_46_im)) / math.hypot(y_46_re, y_46_im))) elif y_46_im <= 9e-70: tmp = (x_46_im / y_46_re) - (x_46_re / (y_46_re * (y_46_re * (1.0 / y_46_im)))) elif y_46_im <= 1.6e+87: tmp = (x_46_im / (t_1 / y_46_re)) - (y_46_im * (x_46_re / t_1)) else: tmp = t_0 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(Float64(Float64(y_46_re / hypot(y_46_re, y_46_im)) * Float64(x_46_im / hypot(y_46_re, y_46_im))) - Float64(x_46_re / y_46_im)) t_1 = hypot(y_46_re, y_46_im) ^ 2.0 tmp = 0.0 if (y_46_im <= -4.8e+91) tmp = t_0; elseif (y_46_im <= -9.8e-104) tmp = Float64(Float64(x_46_im / y_46_re) - Float64(y_46_im * Float64(Float64(x_46_re / hypot(y_46_re, y_46_im)) / hypot(y_46_re, y_46_im)))); elseif (y_46_im <= 9e-70) tmp = Float64(Float64(x_46_im / y_46_re) - Float64(x_46_re / Float64(y_46_re * Float64(y_46_re * Float64(1.0 / y_46_im))))); elseif (y_46_im <= 1.6e+87) tmp = Float64(Float64(x_46_im / Float64(t_1 / y_46_re)) - Float64(y_46_im * Float64(x_46_re / t_1))); else tmp = t_0; end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = ((y_46_re / hypot(y_46_re, y_46_im)) * (x_46_im / hypot(y_46_re, y_46_im))) - (x_46_re / y_46_im); t_1 = hypot(y_46_re, y_46_im) ^ 2.0; tmp = 0.0; if (y_46_im <= -4.8e+91) tmp = t_0; elseif (y_46_im <= -9.8e-104) tmp = (x_46_im / y_46_re) - (y_46_im * ((x_46_re / hypot(y_46_re, y_46_im)) / hypot(y_46_re, y_46_im))); elseif (y_46_im <= 9e-70) tmp = (x_46_im / y_46_re) - (x_46_re / (y_46_re * (y_46_re * (1.0 / y_46_im)))); elseif (y_46_im <= 1.6e+87) tmp = (x_46_im / (t_1 / y_46_re)) - (y_46_im * (x_46_re / t_1)); 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[(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] - N[(x$46$re / y$46$im), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Power[N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision], 2.0], $MachinePrecision]}, If[LessEqual[y$46$im, -4.8e+91], t$95$0, If[LessEqual[y$46$im, -9.8e-104], N[(N[(x$46$im / y$46$re), $MachinePrecision] - N[(y$46$im * N[(N[(x$46$re / N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision]), $MachinePrecision] / N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 9e-70], N[(N[(x$46$im / y$46$re), $MachinePrecision] - N[(x$46$re / N[(y$46$re * N[(y$46$re * N[(1.0 / y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 1.6e+87], N[(N[(x$46$im / N[(t$95$1 / y$46$re), $MachinePrecision]), $MachinePrecision] - N[(y$46$im * N[(x$46$re / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{y.re}{\mathsf{hypot}\left(y.re, y.im\right)} \cdot \frac{x.im}{\mathsf{hypot}\left(y.re, y.im\right)} - \frac{x.re}{y.im}\\
t_1 := {\left(\mathsf{hypot}\left(y.re, y.im\right)\right)}^{2}\\
\mathbf{if}\;y.im \leq -4.8 \cdot 10^{+91}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y.im \leq -9.8 \cdot 10^{-104}:\\
\;\;\;\;\frac{x.im}{y.re} - y.im \cdot \frac{\frac{x.re}{\mathsf{hypot}\left(y.re, y.im\right)}}{\mathsf{hypot}\left(y.re, y.im\right)}\\
\mathbf{elif}\;y.im \leq 9 \cdot 10^{-70}:\\
\;\;\;\;\frac{x.im}{y.re} - \frac{x.re}{y.re \cdot \left(y.re \cdot \frac{1}{y.im}\right)}\\
\mathbf{elif}\;y.im \leq 1.6 \cdot 10^{+87}:\\
\;\;\;\;\frac{x.im}{\frac{t_1}{y.re}} - y.im \cdot \frac{x.re}{t_1}\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if y.im < -4.79999999999999966e91 or 1.6e87 < y.im Initial program 39.8%
div-sub39.8%
sub-neg39.8%
add-sqr-sqrt39.8%
pow239.8%
hypot-def39.8%
associate-/l*45.6%
add-sqr-sqrt45.6%
pow245.6%
hypot-def45.6%
Applied egg-rr45.6%
sub-neg45.6%
associate-/l*45.1%
associate-/r/42.3%
Simplified42.3%
div-inv42.3%
clear-num42.3%
div-inv42.3%
associate-*l*42.8%
*-commutative42.8%
div-inv42.8%
unpow242.8%
times-frac55.2%
Applied egg-rr55.2%
Taylor expanded in y.re around 0 88.0%
if -4.79999999999999966e91 < y.im < -9.8000000000000006e-104Initial program 73.3%
div-sub73.3%
sub-neg73.3%
add-sqr-sqrt73.3%
pow273.3%
hypot-def73.3%
associate-/l*76.2%
add-sqr-sqrt76.2%
pow276.2%
hypot-def76.2%
Applied egg-rr76.2%
sub-neg76.2%
associate-/l*77.0%
associate-/r/74.3%
Simplified74.3%
*-un-lft-identity74.3%
unpow274.3%
times-frac74.3%
Applied egg-rr74.3%
associate-*l/74.4%
*-lft-identity74.4%
Simplified74.4%
Taylor expanded in y.re around inf 83.7%
if -9.8000000000000006e-104 < y.im < 9.00000000000000044e-70Initial program 64.0%
Taylor expanded in y.re around inf 75.8%
+-commutative75.8%
mul-1-neg75.8%
unsub-neg75.8%
associate-/l*76.2%
Simplified76.2%
pow276.2%
div-inv76.2%
associate-*l*84.8%
Applied egg-rr84.8%
if 9.00000000000000044e-70 < y.im < 1.6e87Initial program 75.8%
div-sub75.8%
sub-neg75.8%
add-sqr-sqrt75.8%
pow275.8%
hypot-def75.8%
associate-/l*75.9%
add-sqr-sqrt75.9%
pow275.9%
hypot-def75.9%
Applied egg-rr75.9%
sub-neg75.9%
associate-/l*78.9%
associate-/r/78.8%
Simplified78.8%
Final simplification85.0%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0
(-
(/ x.im y.re)
(* y.im (/ (/ x.re (hypot y.re y.im)) (hypot y.re y.im)))))
(t_1
(-
(* (/ y.re (hypot y.re y.im)) (/ x.im (hypot y.re y.im)))
(/ x.re y.im))))
(if (<= y.im -4.8e+91)
t_1
(if (<= y.im -1.9e-103)
t_0
(if (<= y.im 4.5e-95)
(- (/ x.im y.re) (/ x.re (* y.re (* y.re (/ 1.0 y.im)))))
(if (<= y.im 1.45e+48) 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 = (x_46_im / y_46_re) - (y_46_im * ((x_46_re / hypot(y_46_re, y_46_im)) / hypot(y_46_re, y_46_im)));
double t_1 = ((y_46_re / hypot(y_46_re, y_46_im)) * (x_46_im / hypot(y_46_re, y_46_im))) - (x_46_re / y_46_im);
double tmp;
if (y_46_im <= -4.8e+91) {
tmp = t_1;
} else if (y_46_im <= -1.9e-103) {
tmp = t_0;
} else if (y_46_im <= 4.5e-95) {
tmp = (x_46_im / y_46_re) - (x_46_re / (y_46_re * (y_46_re * (1.0 / y_46_im))));
} else if (y_46_im <= 1.45e+48) {
tmp = t_0;
} else {
tmp = t_1;
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = (x_46_im / y_46_re) - (y_46_im * ((x_46_re / Math.hypot(y_46_re, y_46_im)) / Math.hypot(y_46_re, y_46_im)));
double t_1 = ((y_46_re / Math.hypot(y_46_re, y_46_im)) * (x_46_im / Math.hypot(y_46_re, y_46_im))) - (x_46_re / y_46_im);
double tmp;
if (y_46_im <= -4.8e+91) {
tmp = t_1;
} else if (y_46_im <= -1.9e-103) {
tmp = t_0;
} else if (y_46_im <= 4.5e-95) {
tmp = (x_46_im / y_46_re) - (x_46_re / (y_46_re * (y_46_re * (1.0 / y_46_im))));
} else if (y_46_im <= 1.45e+48) {
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 = (x_46_im / y_46_re) - (y_46_im * ((x_46_re / math.hypot(y_46_re, y_46_im)) / math.hypot(y_46_re, y_46_im))) t_1 = ((y_46_re / math.hypot(y_46_re, y_46_im)) * (x_46_im / math.hypot(y_46_re, y_46_im))) - (x_46_re / y_46_im) tmp = 0 if y_46_im <= -4.8e+91: tmp = t_1 elif y_46_im <= -1.9e-103: tmp = t_0 elif y_46_im <= 4.5e-95: tmp = (x_46_im / y_46_re) - (x_46_re / (y_46_re * (y_46_re * (1.0 / y_46_im)))) elif y_46_im <= 1.45e+48: 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(x_46_im / y_46_re) - Float64(y_46_im * Float64(Float64(x_46_re / hypot(y_46_re, y_46_im)) / hypot(y_46_re, y_46_im)))) t_1 = Float64(Float64(Float64(y_46_re / hypot(y_46_re, y_46_im)) * Float64(x_46_im / hypot(y_46_re, y_46_im))) - Float64(x_46_re / y_46_im)) tmp = 0.0 if (y_46_im <= -4.8e+91) tmp = t_1; elseif (y_46_im <= -1.9e-103) tmp = t_0; elseif (y_46_im <= 4.5e-95) tmp = Float64(Float64(x_46_im / y_46_re) - Float64(x_46_re / Float64(y_46_re * Float64(y_46_re * Float64(1.0 / y_46_im))))); elseif (y_46_im <= 1.45e+48) 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 = (x_46_im / y_46_re) - (y_46_im * ((x_46_re / hypot(y_46_re, y_46_im)) / hypot(y_46_re, y_46_im))); t_1 = ((y_46_re / hypot(y_46_re, y_46_im)) * (x_46_im / hypot(y_46_re, y_46_im))) - (x_46_re / y_46_im); tmp = 0.0; if (y_46_im <= -4.8e+91) tmp = t_1; elseif (y_46_im <= -1.9e-103) tmp = t_0; elseif (y_46_im <= 4.5e-95) tmp = (x_46_im / y_46_re) - (x_46_re / (y_46_re * (y_46_re * (1.0 / y_46_im)))); elseif (y_46_im <= 1.45e+48) 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[(x$46$im / y$46$re), $MachinePrecision] - N[(y$46$im * N[(N[(x$46$re / N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision]), $MachinePrecision] / N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(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] - N[(x$46$re / y$46$im), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -4.8e+91], t$95$1, If[LessEqual[y$46$im, -1.9e-103], t$95$0, If[LessEqual[y$46$im, 4.5e-95], N[(N[(x$46$im / y$46$re), $MachinePrecision] - N[(x$46$re / N[(y$46$re * N[(y$46$re * N[(1.0 / y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 1.45e+48], t$95$0, t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x.im}{y.re} - y.im \cdot \frac{\frac{x.re}{\mathsf{hypot}\left(y.re, y.im\right)}}{\mathsf{hypot}\left(y.re, y.im\right)}\\
t_1 := \frac{y.re}{\mathsf{hypot}\left(y.re, y.im\right)} \cdot \frac{x.im}{\mathsf{hypot}\left(y.re, y.im\right)} - \frac{x.re}{y.im}\\
\mathbf{if}\;y.im \leq -4.8 \cdot 10^{+91}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y.im \leq -1.9 \cdot 10^{-103}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y.im \leq 4.5 \cdot 10^{-95}:\\
\;\;\;\;\frac{x.im}{y.re} - \frac{x.re}{y.re \cdot \left(y.re \cdot \frac{1}{y.im}\right)}\\
\mathbf{elif}\;y.im \leq 1.45 \cdot 10^{+48}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y.im < -4.79999999999999966e91 or 1.4499999999999999e48 < y.im Initial program 41.6%
div-sub41.6%
sub-neg41.6%
add-sqr-sqrt41.6%
pow241.6%
hypot-def41.6%
associate-/l*47.2%
add-sqr-sqrt47.2%
pow247.2%
hypot-def47.2%
Applied egg-rr47.2%
sub-neg47.2%
associate-/l*46.7%
associate-/r/44.1%
Simplified44.1%
div-inv44.1%
clear-num44.1%
div-inv44.1%
associate-*l*44.6%
*-commutative44.6%
div-inv44.5%
unpow244.5%
times-frac57.3%
Applied egg-rr57.3%
Taylor expanded in y.re around 0 87.7%
if -4.79999999999999966e91 < y.im < -1.9e-103 or 4.5e-95 < y.im < 1.4499999999999999e48Initial program 71.9%
div-sub71.9%
sub-neg71.9%
add-sqr-sqrt71.9%
pow271.9%
hypot-def71.9%
associate-/l*73.2%
add-sqr-sqrt73.2%
pow273.2%
hypot-def73.2%
Applied egg-rr73.2%
sub-neg73.2%
associate-/l*76.5%
associate-/r/75.2%
Simplified75.2%
*-un-lft-identity75.2%
unpow275.2%
times-frac77.8%
Applied egg-rr77.8%
associate-*l/78.0%
*-lft-identity78.0%
Simplified78.0%
Taylor expanded in y.re around inf 80.0%
if -1.9e-103 < y.im < 4.5e-95Initial program 65.7%
Taylor expanded in y.re around inf 75.4%
+-commutative75.4%
mul-1-neg75.4%
unsub-neg75.4%
associate-/l*75.8%
Simplified75.8%
pow275.8%
div-inv75.8%
associate-*l*85.0%
Applied egg-rr85.0%
Final simplification84.7%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0
(-
(* (/ y.re (hypot y.re y.im)) (/ x.im (hypot y.re y.im)))
(/ x.re y.im))))
(if (<= y.im -1.65e-31)
t_0
(if (<= y.im 5.6e-72)
(- (/ x.im y.re) (/ x.re (* y.re (* y.re (/ 1.0 y.im)))))
(if (<= y.im 3.8e+14)
(/ (fma x.im y.re (* y.im (- x.re))) (fma y.re y.re (* y.im y.im)))
t_0)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = ((y_46_re / hypot(y_46_re, y_46_im)) * (x_46_im / hypot(y_46_re, y_46_im))) - (x_46_re / y_46_im);
double tmp;
if (y_46_im <= -1.65e-31) {
tmp = t_0;
} else if (y_46_im <= 5.6e-72) {
tmp = (x_46_im / y_46_re) - (x_46_re / (y_46_re * (y_46_re * (1.0 / y_46_im))));
} else if (y_46_im <= 3.8e+14) {
tmp = fma(x_46_im, y_46_re, (y_46_im * -x_46_re)) / fma(y_46_re, y_46_re, (y_46_im * y_46_im));
} else {
tmp = t_0;
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(Float64(Float64(y_46_re / hypot(y_46_re, y_46_im)) * Float64(x_46_im / hypot(y_46_re, y_46_im))) - Float64(x_46_re / y_46_im)) tmp = 0.0 if (y_46_im <= -1.65e-31) tmp = t_0; elseif (y_46_im <= 5.6e-72) tmp = Float64(Float64(x_46_im / y_46_re) - Float64(x_46_re / Float64(y_46_re * Float64(y_46_re * Float64(1.0 / y_46_im))))); elseif (y_46_im <= 3.8e+14) tmp = Float64(fma(x_46_im, y_46_re, Float64(y_46_im * Float64(-x_46_re))) / fma(y_46_re, y_46_re, Float64(y_46_im * y_46_im))); else tmp = t_0; end return 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 / 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] - N[(x$46$re / y$46$im), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -1.65e-31], t$95$0, If[LessEqual[y$46$im, 5.6e-72], N[(N[(x$46$im / y$46$re), $MachinePrecision] - N[(x$46$re / N[(y$46$re * N[(y$46$re * N[(1.0 / y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 3.8e+14], N[(N[(x$46$im * y$46$re + N[(y$46$im * (-x$46$re)), $MachinePrecision]), $MachinePrecision] / N[(y$46$re * y$46$re + N[(y$46$im * y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{y.re}{\mathsf{hypot}\left(y.re, y.im\right)} \cdot \frac{x.im}{\mathsf{hypot}\left(y.re, y.im\right)} - \frac{x.re}{y.im}\\
\mathbf{if}\;y.im \leq -1.65 \cdot 10^{-31}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y.im \leq 5.6 \cdot 10^{-72}:\\
\;\;\;\;\frac{x.im}{y.re} - \frac{x.re}{y.re \cdot \left(y.re \cdot \frac{1}{y.im}\right)}\\
\mathbf{elif}\;y.im \leq 3.8 \cdot 10^{+14}:\\
\;\;\;\;\frac{\mathsf{fma}\left(x.im, y.re, y.im \cdot \left(-x.re\right)\right)}{\mathsf{fma}\left(y.re, y.re, y.im \cdot y.im\right)}\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if y.im < -1.65e-31 or 3.8e14 < y.im Initial program 45.1%
div-sub45.1%
sub-neg45.1%
add-sqr-sqrt45.1%
pow245.1%
hypot-def45.1%
associate-/l*50.4%
add-sqr-sqrt50.4%
pow250.4%
hypot-def50.4%
Applied egg-rr50.4%
sub-neg50.4%
associate-/l*50.2%
associate-/r/47.4%
Simplified47.4%
div-inv47.4%
clear-num47.4%
div-inv47.4%
associate-*l*47.5%
*-commutative47.5%
div-inv47.5%
unpow247.5%
times-frac63.8%
Applied egg-rr63.8%
Taylor expanded in y.re around 0 82.1%
if -1.65e-31 < y.im < 5.5999999999999996e-72Initial program 66.4%
Taylor expanded in y.re around inf 75.3%
+-commutative75.3%
mul-1-neg75.3%
unsub-neg75.3%
associate-/l*74.7%
Simplified74.7%
pow274.7%
div-inv74.7%
associate-*l*82.0%
Applied egg-rr82.0%
if 5.5999999999999996e-72 < y.im < 3.8e14Initial program 83.5%
fma-neg83.5%
distribute-lft-neg-out83.5%
*-commutative83.5%
fma-def83.5%
Simplified83.5%
Final simplification82.2%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (<= y.im -4.8e+91)
(- (/ y.re (/ (pow y.im 2.0) x.im)) (/ x.re y.im))
(if (<= y.im 1e-71)
(- (/ x.im y.re) (/ x.re (* y.re (* y.re (/ 1.0 y.im)))))
(if (<= y.im 2e+45)
(/ (fma x.im y.re (* y.im (- x.re))) (fma y.re y.re (* y.im y.im)))
(- (/ x.im (* y.im (/ y.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 <= -4.8e+91) {
tmp = (y_46_re / (pow(y_46_im, 2.0) / x_46_im)) - (x_46_re / y_46_im);
} else if (y_46_im <= 1e-71) {
tmp = (x_46_im / y_46_re) - (x_46_re / (y_46_re * (y_46_re * (1.0 / y_46_im))));
} else if (y_46_im <= 2e+45) {
tmp = fma(x_46_im, y_46_re, (y_46_im * -x_46_re)) / fma(y_46_re, y_46_re, (y_46_im * y_46_im));
} else {
tmp = (x_46_im / (y_46_im * (y_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 <= -4.8e+91) tmp = Float64(Float64(y_46_re / Float64((y_46_im ^ 2.0) / x_46_im)) - Float64(x_46_re / y_46_im)); elseif (y_46_im <= 1e-71) tmp = Float64(Float64(x_46_im / y_46_re) - Float64(x_46_re / Float64(y_46_re * Float64(y_46_re * Float64(1.0 / y_46_im))))); elseif (y_46_im <= 2e+45) tmp = Float64(fma(x_46_im, y_46_re, Float64(y_46_im * Float64(-x_46_re))) / fma(y_46_re, y_46_re, Float64(y_46_im * y_46_im))); else tmp = Float64(Float64(x_46_im / Float64(y_46_im * Float64(y_46_im / 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, -4.8e+91], N[(N[(y$46$re / N[(N[Power[y$46$im, 2.0], $MachinePrecision] / x$46$im), $MachinePrecision]), $MachinePrecision] - N[(x$46$re / y$46$im), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 1e-71], N[(N[(x$46$im / y$46$re), $MachinePrecision] - N[(x$46$re / N[(y$46$re * N[(y$46$re * N[(1.0 / y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 2e+45], N[(N[(x$46$im * y$46$re + N[(y$46$im * (-x$46$re)), $MachinePrecision]), $MachinePrecision] / N[(y$46$re * y$46$re + N[(y$46$im * y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x$46$im / N[(y$46$im * N[(y$46$im / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x$46$re / y$46$im), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.im \leq -4.8 \cdot 10^{+91}:\\
\;\;\;\;\frac{y.re}{\frac{{y.im}^{2}}{x.im}} - \frac{x.re}{y.im}\\
\mathbf{elif}\;y.im \leq 10^{-71}:\\
\;\;\;\;\frac{x.im}{y.re} - \frac{x.re}{y.re \cdot \left(y.re \cdot \frac{1}{y.im}\right)}\\
\mathbf{elif}\;y.im \leq 2 \cdot 10^{+45}:\\
\;\;\;\;\frac{\mathsf{fma}\left(x.im, y.re, y.im \cdot \left(-x.re\right)\right)}{\mathsf{fma}\left(y.re, y.re, y.im \cdot y.im\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x.im}{y.im \cdot \frac{y.im}{y.re}} - \frac{x.re}{y.im}\\
\end{array}
\end{array}
if y.im < -4.79999999999999966e91Initial program 42.9%
Taylor expanded in y.re around 0 74.7%
+-commutative74.7%
mul-1-neg74.7%
unsub-neg74.7%
*-commutative74.7%
associate-/l*76.8%
Simplified76.8%
if -4.79999999999999966e91 < y.im < 9.9999999999999992e-72Initial program 66.7%
Taylor expanded in y.re around inf 72.7%
+-commutative72.7%
mul-1-neg72.7%
unsub-neg72.7%
associate-/l*72.1%
Simplified72.1%
pow272.1%
div-inv72.2%
associate-*l*78.2%
Applied egg-rr78.2%
if 9.9999999999999992e-72 < y.im < 1.9999999999999999e45Initial program 76.7%
fma-neg76.8%
distribute-lft-neg-out76.8%
*-commutative76.8%
fma-def76.8%
Simplified76.8%
if 1.9999999999999999e45 < y.im Initial program 40.8%
div-sub40.8%
sub-neg40.8%
add-sqr-sqrt40.8%
pow240.8%
hypot-def40.8%
associate-/l*43.7%
add-sqr-sqrt43.7%
pow243.7%
hypot-def43.7%
Applied egg-rr43.7%
sub-neg43.7%
associate-/l*44.3%
associate-/r/41.0%
Simplified41.0%
Taylor expanded in y.re around 0 76.6%
Taylor expanded in y.re around 0 76.6%
pow276.6%
*-un-lft-identity76.6%
times-frac78.4%
Applied egg-rr78.4%
Final simplification77.8%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (<= y.im -4.8e+91)
(- (/ y.re (/ (pow y.im 2.0) x.im)) (/ x.re y.im))
(if (<= y.im 2.02e-72)
(- (/ x.im y.re) (/ x.re (* y.re (* y.re (/ 1.0 y.im)))))
(if (<= y.im 1.16e+45)
(/ (- (* x.im y.re) (* y.im x.re)) (+ (* y.im y.im) (* y.re y.re)))
(- (/ x.im (* y.im (/ y.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 <= -4.8e+91) {
tmp = (y_46_re / (pow(y_46_im, 2.0) / x_46_im)) - (x_46_re / y_46_im);
} else if (y_46_im <= 2.02e-72) {
tmp = (x_46_im / y_46_re) - (x_46_re / (y_46_re * (y_46_re * (1.0 / y_46_im))));
} else if (y_46_im <= 1.16e+45) {
tmp = ((x_46_im * y_46_re) - (y_46_im * x_46_re)) / ((y_46_im * y_46_im) + (y_46_re * y_46_re));
} else {
tmp = (x_46_im / (y_46_im * (y_46_im / y_46_re))) - (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 <= (-4.8d+91)) then
tmp = (y_46re / ((y_46im ** 2.0d0) / x_46im)) - (x_46re / y_46im)
else if (y_46im <= 2.02d-72) then
tmp = (x_46im / y_46re) - (x_46re / (y_46re * (y_46re * (1.0d0 / y_46im))))
else if (y_46im <= 1.16d+45) then
tmp = ((x_46im * y_46re) - (y_46im * x_46re)) / ((y_46im * y_46im) + (y_46re * y_46re))
else
tmp = (x_46im / (y_46im * (y_46im / y_46re))) - (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 <= -4.8e+91) {
tmp = (y_46_re / (Math.pow(y_46_im, 2.0) / x_46_im)) - (x_46_re / y_46_im);
} else if (y_46_im <= 2.02e-72) {
tmp = (x_46_im / y_46_re) - (x_46_re / (y_46_re * (y_46_re * (1.0 / y_46_im))));
} else if (y_46_im <= 1.16e+45) {
tmp = ((x_46_im * y_46_re) - (y_46_im * x_46_re)) / ((y_46_im * y_46_im) + (y_46_re * y_46_re));
} else {
tmp = (x_46_im / (y_46_im * (y_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): tmp = 0 if y_46_im <= -4.8e+91: tmp = (y_46_re / (math.pow(y_46_im, 2.0) / x_46_im)) - (x_46_re / y_46_im) elif y_46_im <= 2.02e-72: tmp = (x_46_im / y_46_re) - (x_46_re / (y_46_re * (y_46_re * (1.0 / y_46_im)))) elif y_46_im <= 1.16e+45: tmp = ((x_46_im * y_46_re) - (y_46_im * x_46_re)) / ((y_46_im * y_46_im) + (y_46_re * y_46_re)) else: tmp = (x_46_im / (y_46_im * (y_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 <= -4.8e+91) tmp = Float64(Float64(y_46_re / Float64((y_46_im ^ 2.0) / x_46_im)) - Float64(x_46_re / y_46_im)); elseif (y_46_im <= 2.02e-72) tmp = Float64(Float64(x_46_im / y_46_re) - Float64(x_46_re / Float64(y_46_re * Float64(y_46_re * Float64(1.0 / y_46_im))))); elseif (y_46_im <= 1.16e+45) tmp = Float64(Float64(Float64(x_46_im * y_46_re) - Float64(y_46_im * x_46_re)) / Float64(Float64(y_46_im * y_46_im) + Float64(y_46_re * y_46_re))); else tmp = Float64(Float64(x_46_im / Float64(y_46_im * Float64(y_46_im / 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) tmp = 0.0; if (y_46_im <= -4.8e+91) tmp = (y_46_re / ((y_46_im ^ 2.0) / x_46_im)) - (x_46_re / y_46_im); elseif (y_46_im <= 2.02e-72) tmp = (x_46_im / y_46_re) - (x_46_re / (y_46_re * (y_46_re * (1.0 / y_46_im)))); elseif (y_46_im <= 1.16e+45) tmp = ((x_46_im * y_46_re) - (y_46_im * x_46_re)) / ((y_46_im * y_46_im) + (y_46_re * y_46_re)); else tmp = (x_46_im / (y_46_im * (y_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_] := If[LessEqual[y$46$im, -4.8e+91], N[(N[(y$46$re / N[(N[Power[y$46$im, 2.0], $MachinePrecision] / x$46$im), $MachinePrecision]), $MachinePrecision] - N[(x$46$re / y$46$im), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 2.02e-72], N[(N[(x$46$im / y$46$re), $MachinePrecision] - N[(x$46$re / N[(y$46$re * N[(y$46$re * N[(1.0 / y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 1.16e+45], N[(N[(N[(x$46$im * y$46$re), $MachinePrecision] - N[(y$46$im * x$46$re), $MachinePrecision]), $MachinePrecision] / N[(N[(y$46$im * y$46$im), $MachinePrecision] + N[(y$46$re * y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x$46$im / N[(y$46$im * N[(y$46$im / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x$46$re / y$46$im), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.im \leq -4.8 \cdot 10^{+91}:\\
\;\;\;\;\frac{y.re}{\frac{{y.im}^{2}}{x.im}} - \frac{x.re}{y.im}\\
\mathbf{elif}\;y.im \leq 2.02 \cdot 10^{-72}:\\
\;\;\;\;\frac{x.im}{y.re} - \frac{x.re}{y.re \cdot \left(y.re \cdot \frac{1}{y.im}\right)}\\
\mathbf{elif}\;y.im \leq 1.16 \cdot 10^{+45}:\\
\;\;\;\;\frac{x.im \cdot y.re - y.im \cdot x.re}{y.im \cdot y.im + y.re \cdot y.re}\\
\mathbf{else}:\\
\;\;\;\;\frac{x.im}{y.im \cdot \frac{y.im}{y.re}} - \frac{x.re}{y.im}\\
\end{array}
\end{array}
if y.im < -4.79999999999999966e91Initial program 42.9%
Taylor expanded in y.re around 0 74.7%
+-commutative74.7%
mul-1-neg74.7%
unsub-neg74.7%
*-commutative74.7%
associate-/l*76.8%
Simplified76.8%
if -4.79999999999999966e91 < y.im < 2.02e-72Initial program 66.7%
Taylor expanded in y.re around inf 72.7%
+-commutative72.7%
mul-1-neg72.7%
unsub-neg72.7%
associate-/l*72.1%
Simplified72.1%
pow272.1%
div-inv72.2%
associate-*l*78.2%
Applied egg-rr78.2%
if 2.02e-72 < y.im < 1.1600000000000001e45Initial program 76.7%
if 1.1600000000000001e45 < y.im Initial program 40.8%
div-sub40.8%
sub-neg40.8%
add-sqr-sqrt40.8%
pow240.8%
hypot-def40.8%
associate-/l*43.7%
add-sqr-sqrt43.7%
pow243.7%
hypot-def43.7%
Applied egg-rr43.7%
sub-neg43.7%
associate-/l*44.3%
associate-/r/41.0%
Simplified41.0%
Taylor expanded in y.re around 0 76.6%
Taylor expanded in y.re around 0 76.6%
pow276.6%
*-un-lft-identity76.6%
times-frac78.4%
Applied egg-rr78.4%
Final simplification77.8%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (- (/ x.im y.re) (/ x.re (* y.re (* y.re (/ 1.0 y.im)))))))
(if (<= y.re -9e+88)
t_0
(if (<= y.re 4.7e-157)
(- (/ x.im (* y.im (/ y.im y.re))) (/ x.re y.im))
(if (<= y.re 5.2e+126)
(/ (- (* x.im y.re) (* y.im x.re)) (+ (* y.im y.im) (* y.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_re) - (x_46_re / (y_46_re * (y_46_re * (1.0 / y_46_im))));
double tmp;
if (y_46_re <= -9e+88) {
tmp = t_0;
} else if (y_46_re <= 4.7e-157) {
tmp = (x_46_im / (y_46_im * (y_46_im / y_46_re))) - (x_46_re / y_46_im);
} else if (y_46_re <= 5.2e+126) {
tmp = ((x_46_im * y_46_re) - (y_46_im * x_46_re)) / ((y_46_im * y_46_im) + (y_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_46re) - (x_46re / (y_46re * (y_46re * (1.0d0 / y_46im))))
if (y_46re <= (-9d+88)) then
tmp = t_0
else if (y_46re <= 4.7d-157) then
tmp = (x_46im / (y_46im * (y_46im / y_46re))) - (x_46re / y_46im)
else if (y_46re <= 5.2d+126) then
tmp = ((x_46im * y_46re) - (y_46im * x_46re)) / ((y_46im * y_46im) + (y_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_re) - (x_46_re / (y_46_re * (y_46_re * (1.0 / y_46_im))));
double tmp;
if (y_46_re <= -9e+88) {
tmp = t_0;
} else if (y_46_re <= 4.7e-157) {
tmp = (x_46_im / (y_46_im * (y_46_im / y_46_re))) - (x_46_re / y_46_im);
} else if (y_46_re <= 5.2e+126) {
tmp = ((x_46_im * y_46_re) - (y_46_im * x_46_re)) / ((y_46_im * y_46_im) + (y_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_re) - (x_46_re / (y_46_re * (y_46_re * (1.0 / y_46_im)))) tmp = 0 if y_46_re <= -9e+88: tmp = t_0 elif y_46_re <= 4.7e-157: tmp = (x_46_im / (y_46_im * (y_46_im / y_46_re))) - (x_46_re / y_46_im) elif y_46_re <= 5.2e+126: tmp = ((x_46_im * y_46_re) - (y_46_im * x_46_re)) / ((y_46_im * y_46_im) + (y_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_re) - Float64(x_46_re / Float64(y_46_re * Float64(y_46_re * Float64(1.0 / y_46_im))))) tmp = 0.0 if (y_46_re <= -9e+88) tmp = t_0; elseif (y_46_re <= 4.7e-157) tmp = Float64(Float64(x_46_im / Float64(y_46_im * Float64(y_46_im / y_46_re))) - Float64(x_46_re / y_46_im)); elseif (y_46_re <= 5.2e+126) tmp = Float64(Float64(Float64(x_46_im * y_46_re) - Float64(y_46_im * x_46_re)) / Float64(Float64(y_46_im * y_46_im) + Float64(y_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_re) - (x_46_re / (y_46_re * (y_46_re * (1.0 / y_46_im)))); tmp = 0.0; if (y_46_re <= -9e+88) tmp = t_0; elseif (y_46_re <= 4.7e-157) tmp = (x_46_im / (y_46_im * (y_46_im / y_46_re))) - (x_46_re / y_46_im); elseif (y_46_re <= 5.2e+126) tmp = ((x_46_im * y_46_re) - (y_46_im * x_46_re)) / ((y_46_im * y_46_im) + (y_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$re), $MachinePrecision] - N[(x$46$re / N[(y$46$re * N[(y$46$re * N[(1.0 / y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -9e+88], t$95$0, If[LessEqual[y$46$re, 4.7e-157], N[(N[(x$46$im / N[(y$46$im * N[(y$46$im / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x$46$re / y$46$im), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 5.2e+126], N[(N[(N[(x$46$im * y$46$re), $MachinePrecision] - N[(y$46$im * x$46$re), $MachinePrecision]), $MachinePrecision] / N[(N[(y$46$im * y$46$im), $MachinePrecision] + N[(y$46$re * y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x.im}{y.re} - \frac{x.re}{y.re \cdot \left(y.re \cdot \frac{1}{y.im}\right)}\\
\mathbf{if}\;y.re \leq -9 \cdot 10^{+88}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y.re \leq 4.7 \cdot 10^{-157}:\\
\;\;\;\;\frac{x.im}{y.im \cdot \frac{y.im}{y.re}} - \frac{x.re}{y.im}\\
\mathbf{elif}\;y.re \leq 5.2 \cdot 10^{+126}:\\
\;\;\;\;\frac{x.im \cdot y.re - y.im \cdot x.re}{y.im \cdot y.im + y.re \cdot y.re}\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if y.re < -9e88 or 5.1999999999999999e126 < y.re Initial program 33.8%
Taylor expanded in y.re around inf 71.9%
+-commutative71.9%
mul-1-neg71.9%
unsub-neg71.9%
associate-/l*72.3%
Simplified72.3%
pow272.3%
div-inv72.3%
associate-*l*78.4%
Applied egg-rr78.4%
if -9e88 < y.re < 4.7000000000000002e-157Initial program 66.0%
div-sub61.2%
sub-neg61.2%
add-sqr-sqrt61.1%
pow261.1%
hypot-def61.1%
associate-/l*67.0%
add-sqr-sqrt67.0%
pow267.0%
hypot-def67.0%
Applied egg-rr67.0%
sub-neg67.0%
associate-/l*67.2%
associate-/r/62.9%
Simplified62.9%
Taylor expanded in y.re around 0 78.2%
Taylor expanded in y.re around 0 73.9%
pow273.9%
*-un-lft-identity73.9%
times-frac78.4%
Applied egg-rr78.4%
if 4.7000000000000002e-157 < y.re < 5.1999999999999999e126Initial program 78.9%
Final simplification78.5%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (or (<= y.im -4.9e+92) (not (<= y.im 1.2e+45))) (/ (- x.re) y.im) (- (/ x.im y.re) (/ x.re (* y.re (* y.re (/ 1.0 y.im)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_im <= -4.9e+92) || !(y_46_im <= 1.2e+45)) {
tmp = -x_46_re / y_46_im;
} else {
tmp = (x_46_im / y_46_re) - (x_46_re / (y_46_re * (y_46_re * (1.0 / y_46_im))));
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: tmp
if ((y_46im <= (-4.9d+92)) .or. (.not. (y_46im <= 1.2d+45))) then
tmp = -x_46re / y_46im
else
tmp = (x_46im / y_46re) - (x_46re / (y_46re * (y_46re * (1.0d0 / y_46im))))
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_im <= -4.9e+92) || !(y_46_im <= 1.2e+45)) {
tmp = -x_46_re / y_46_im;
} else {
tmp = (x_46_im / y_46_re) - (x_46_re / (y_46_re * (y_46_re * (1.0 / y_46_im))));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if (y_46_im <= -4.9e+92) or not (y_46_im <= 1.2e+45): tmp = -x_46_re / y_46_im else: tmp = (x_46_im / y_46_re) - (x_46_re / (y_46_re * (y_46_re * (1.0 / y_46_im)))) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if ((y_46_im <= -4.9e+92) || !(y_46_im <= 1.2e+45)) tmp = Float64(Float64(-x_46_re) / y_46_im); else tmp = Float64(Float64(x_46_im / y_46_re) - Float64(x_46_re / Float64(y_46_re * Float64(y_46_re * Float64(1.0 / y_46_im))))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if ((y_46_im <= -4.9e+92) || ~((y_46_im <= 1.2e+45))) tmp = -x_46_re / y_46_im; else tmp = (x_46_im / y_46_re) - (x_46_re / (y_46_re * (y_46_re * (1.0 / y_46_im)))); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[Or[LessEqual[y$46$im, -4.9e+92], N[Not[LessEqual[y$46$im, 1.2e+45]], $MachinePrecision]], N[((-x$46$re) / y$46$im), $MachinePrecision], N[(N[(x$46$im / y$46$re), $MachinePrecision] - N[(x$46$re / N[(y$46$re * N[(y$46$re * N[(1.0 / y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.im \leq -4.9 \cdot 10^{+92} \lor \neg \left(y.im \leq 1.2 \cdot 10^{+45}\right):\\
\;\;\;\;\frac{-x.re}{y.im}\\
\mathbf{else}:\\
\;\;\;\;\frac{x.im}{y.re} - \frac{x.re}{y.re \cdot \left(y.re \cdot \frac{1}{y.im}\right)}\\
\end{array}
\end{array}
if y.im < -4.9000000000000002e92 or 1.19999999999999995e45 < y.im Initial program 41.3%
Taylor expanded in y.re around 0 71.2%
associate-*r/71.2%
neg-mul-171.2%
Simplified71.2%
if -4.9000000000000002e92 < y.im < 1.19999999999999995e45Initial program 69.3%
Taylor expanded in y.re around inf 69.5%
+-commutative69.5%
mul-1-neg69.5%
unsub-neg69.5%
associate-/l*69.0%
Simplified69.0%
pow269.0%
div-inv69.1%
associate-*l*73.7%
Applied egg-rr73.7%
Final simplification72.6%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (or (<= y.im -7e+91) (not (<= y.im 2.7e+42))) (- (/ x.im (* y.im (/ y.im y.re))) (/ x.re y.im)) (- (/ x.im y.re) (/ x.re (* y.re (* y.re (/ 1.0 y.im)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_im <= -7e+91) || !(y_46_im <= 2.7e+42)) {
tmp = (x_46_im / (y_46_im * (y_46_im / y_46_re))) - (x_46_re / y_46_im);
} else {
tmp = (x_46_im / y_46_re) - (x_46_re / (y_46_re * (y_46_re * (1.0 / y_46_im))));
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: tmp
if ((y_46im <= (-7d+91)) .or. (.not. (y_46im <= 2.7d+42))) then
tmp = (x_46im / (y_46im * (y_46im / y_46re))) - (x_46re / y_46im)
else
tmp = (x_46im / y_46re) - (x_46re / (y_46re * (y_46re * (1.0d0 / y_46im))))
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_im <= -7e+91) || !(y_46_im <= 2.7e+42)) {
tmp = (x_46_im / (y_46_im * (y_46_im / y_46_re))) - (x_46_re / y_46_im);
} else {
tmp = (x_46_im / y_46_re) - (x_46_re / (y_46_re * (y_46_re * (1.0 / y_46_im))));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if (y_46_im <= -7e+91) or not (y_46_im <= 2.7e+42): tmp = (x_46_im / (y_46_im * (y_46_im / y_46_re))) - (x_46_re / y_46_im) else: tmp = (x_46_im / y_46_re) - (x_46_re / (y_46_re * (y_46_re * (1.0 / y_46_im)))) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if ((y_46_im <= -7e+91) || !(y_46_im <= 2.7e+42)) tmp = Float64(Float64(x_46_im / Float64(y_46_im * Float64(y_46_im / y_46_re))) - Float64(x_46_re / y_46_im)); else tmp = Float64(Float64(x_46_im / y_46_re) - Float64(x_46_re / Float64(y_46_re * Float64(y_46_re * Float64(1.0 / y_46_im))))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if ((y_46_im <= -7e+91) || ~((y_46_im <= 2.7e+42))) tmp = (x_46_im / (y_46_im * (y_46_im / y_46_re))) - (x_46_re / y_46_im); else tmp = (x_46_im / y_46_re) - (x_46_re / (y_46_re * (y_46_re * (1.0 / y_46_im)))); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[Or[LessEqual[y$46$im, -7e+91], N[Not[LessEqual[y$46$im, 2.7e+42]], $MachinePrecision]], N[(N[(x$46$im / N[(y$46$im * N[(y$46$im / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x$46$re / y$46$im), $MachinePrecision]), $MachinePrecision], N[(N[(x$46$im / y$46$re), $MachinePrecision] - N[(x$46$re / N[(y$46$re * N[(y$46$re * N[(1.0 / y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.im \leq -7 \cdot 10^{+91} \lor \neg \left(y.im \leq 2.7 \cdot 10^{+42}\right):\\
\;\;\;\;\frac{x.im}{y.im \cdot \frac{y.im}{y.re}} - \frac{x.re}{y.im}\\
\mathbf{else}:\\
\;\;\;\;\frac{x.im}{y.re} - \frac{x.re}{y.re \cdot \left(y.re \cdot \frac{1}{y.im}\right)}\\
\end{array}
\end{array}
if y.im < -7.00000000000000001e91 or 2.7000000000000001e42 < y.im Initial program 41.8%
div-sub41.8%
sub-neg41.8%
add-sqr-sqrt41.8%
pow241.8%
hypot-def41.8%
associate-/l*47.3%
add-sqr-sqrt47.3%
pow247.3%
hypot-def47.3%
Applied egg-rr47.3%
sub-neg47.3%
associate-/l*46.8%
associate-/r/44.2%
Simplified44.2%
Taylor expanded in y.re around 0 75.8%
Taylor expanded in y.re around 0 75.8%
pow275.8%
*-un-lft-identity75.8%
times-frac76.8%
Applied egg-rr76.8%
if -7.00000000000000001e91 < y.im < 2.7000000000000001e42Initial program 69.1%
Taylor expanded in y.re around inf 69.9%
+-commutative69.9%
mul-1-neg69.9%
unsub-neg69.9%
associate-/l*69.5%
Simplified69.5%
pow269.5%
div-inv69.5%
associate-*l*74.1%
Applied egg-rr74.1%
Final simplification75.3%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (or (<= y.im -1.65e+44) (not (<= y.im 4.6e+43))) (/ (- x.re) y.im) (/ x.im y.re)))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_im <= -1.65e+44) || !(y_46_im <= 4.6e+43)) {
tmp = -x_46_re / y_46_im;
} else {
tmp = x_46_im / y_46_re;
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: tmp
if ((y_46im <= (-1.65d+44)) .or. (.not. (y_46im <= 4.6d+43))) then
tmp = -x_46re / y_46im
else
tmp = x_46im / y_46re
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_im <= -1.65e+44) || !(y_46_im <= 4.6e+43)) {
tmp = -x_46_re / y_46_im;
} else {
tmp = x_46_im / y_46_re;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if (y_46_im <= -1.65e+44) or not (y_46_im <= 4.6e+43): tmp = -x_46_re / y_46_im else: tmp = x_46_im / y_46_re return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if ((y_46_im <= -1.65e+44) || !(y_46_im <= 4.6e+43)) tmp = Float64(Float64(-x_46_re) / y_46_im); else tmp = Float64(x_46_im / y_46_re); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if ((y_46_im <= -1.65e+44) || ~((y_46_im <= 4.6e+43))) tmp = -x_46_re / y_46_im; else tmp = x_46_im / y_46_re; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[Or[LessEqual[y$46$im, -1.65e+44], N[Not[LessEqual[y$46$im, 4.6e+43]], $MachinePrecision]], N[((-x$46$re) / y$46$im), $MachinePrecision], N[(x$46$im / y$46$re), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.im \leq -1.65 \cdot 10^{+44} \lor \neg \left(y.im \leq 4.6 \cdot 10^{+43}\right):\\
\;\;\;\;\frac{-x.re}{y.im}\\
\mathbf{else}:\\
\;\;\;\;\frac{x.im}{y.re}\\
\end{array}
\end{array}
if y.im < -1.65000000000000007e44 or 4.6000000000000005e43 < y.im Initial program 44.1%
Taylor expanded in y.re around 0 68.6%
associate-*r/68.6%
neg-mul-168.6%
Simplified68.6%
if -1.65000000000000007e44 < y.im < 4.6000000000000005e43Initial program 68.7%
Taylor expanded in y.re around inf 62.9%
Final simplification65.5%
(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 57.3%
Taylor expanded in y.re around inf 41.2%
Final simplification41.2%
herbie shell --seed 2024010
(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))))