
(FPCore (x.re x.im y.re y.im) :precision binary64 (/ (- (* x.im y.re) (* x.re y.im)) (+ (* y.re y.re) (* y.im y.im))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return ((x_46_im * y_46_re) - (x_46_re * y_46_im)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im));
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
code = ((x_46im * y_46re) - (x_46re * y_46im)) / ((y_46re * y_46re) + (y_46im * y_46im))
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return ((x_46_im * y_46_re) - (x_46_re * y_46_im)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im));
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): return ((x_46_im * y_46_re) - (x_46_re * y_46_im)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im))
function code(x_46_re, x_46_im, y_46_re, y_46_im) return Float64(Float64(Float64(x_46_im * y_46_re) - Float64(x_46_re * y_46_im)) / Float64(Float64(y_46_re * y_46_re) + Float64(y_46_im * y_46_im))) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = ((x_46_im * y_46_re) - (x_46_re * y_46_im)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im)); end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[(N[(N[(x$46$im * y$46$re), $MachinePrecision] - N[(x$46$re * y$46$im), $MachinePrecision]), $MachinePrecision] / N[(N[(y$46$re * y$46$re), $MachinePrecision] + N[(y$46$im * y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x.im \cdot y.re - x.re \cdot y.im}{y.re \cdot y.re + y.im \cdot y.im}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 13 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x.re x.im y.re y.im) :precision binary64 (/ (- (* x.im y.re) (* x.re y.im)) (+ (* y.re y.re) (* y.im y.im))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return ((x_46_im * y_46_re) - (x_46_re * y_46_im)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im));
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
code = ((x_46im * y_46re) - (x_46re * y_46im)) / ((y_46re * y_46re) + (y_46im * y_46im))
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return ((x_46_im * y_46_re) - (x_46_re * y_46_im)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im));
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): return ((x_46_im * y_46_re) - (x_46_re * y_46_im)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im))
function code(x_46_re, x_46_im, y_46_re, y_46_im) return Float64(Float64(Float64(x_46_im * y_46_re) - Float64(x_46_re * y_46_im)) / Float64(Float64(y_46_re * y_46_re) + Float64(y_46_im * y_46_im))) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = ((x_46_im * y_46_re) - (x_46_re * y_46_im)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im)); end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[(N[(N[(x$46$im * y$46$re), $MachinePrecision] - N[(x$46$re * y$46$im), $MachinePrecision]), $MachinePrecision] / N[(N[(y$46$re * y$46$re), $MachinePrecision] + N[(y$46$im * y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x.im \cdot y.re - x.re \cdot y.im}{y.re \cdot y.re + y.im \cdot y.im}
\end{array}
(FPCore (x.re x.im y.re y.im) :precision binary64 (fma (/ y.re (hypot y.re y.im)) (/ x.im (hypot y.re y.im)) (/ (* x.re (/ y.im (hypot y.im y.re))) (- (hypot y.im y.re)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return fma((y_46_re / hypot(y_46_re, y_46_im)), (x_46_im / hypot(y_46_re, y_46_im)), ((x_46_re * (y_46_im / hypot(y_46_im, y_46_re))) / -hypot(y_46_im, y_46_re)));
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) return fma(Float64(y_46_re / hypot(y_46_re, y_46_im)), Float64(x_46_im / hypot(y_46_re, y_46_im)), Float64(Float64(x_46_re * Float64(y_46_im / hypot(y_46_im, y_46_re))) / Float64(-hypot(y_46_im, y_46_re)))) end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[(N[(y$46$re / N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision]), $MachinePrecision] * N[(x$46$im / N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision]), $MachinePrecision] + N[(N[(x$46$re * N[(y$46$im / N[Sqrt[y$46$im ^ 2 + y$46$re ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / (-N[Sqrt[y$46$im ^ 2 + y$46$re ^ 2], $MachinePrecision])), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(\frac{y.re}{\mathsf{hypot}\left(y.re, y.im\right)}, \frac{x.im}{\mathsf{hypot}\left(y.re, y.im\right)}, \frac{x.re \cdot \frac{y.im}{\mathsf{hypot}\left(y.im, y.re\right)}}{-\mathsf{hypot}\left(y.im, y.re\right)}\right)
\end{array}
Initial program 61.3%
div-sub60.1%
*-commutative60.1%
add-sqr-sqrt60.1%
times-frac60.5%
fma-neg60.5%
hypot-define60.5%
hypot-define76.8%
associate-/l*78.8%
add-sqr-sqrt78.8%
pow278.8%
hypot-define78.8%
Applied egg-rr78.8%
*-un-lft-identity78.8%
unpow278.8%
times-frac95.5%
hypot-undefine78.8%
+-commutative78.8%
hypot-define95.5%
hypot-undefine78.8%
+-commutative78.8%
hypot-define95.5%
Applied egg-rr95.5%
associate-*l/95.5%
*-un-lft-identity95.5%
Applied egg-rr95.5%
associate-*r/97.7%
Applied egg-rr97.7%
Final simplification97.7%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (/ y.re (hypot y.re y.im)))
(t_1
(fma
t_0
(/ x.im (hypot y.re y.im))
(* x.re (/ (- y.im) (pow (hypot y.re y.im) 2.0))))))
(if (<= y.im -1.65e+103)
(/ (- (* y.re (/ x.im y.im)) x.re) y.im)
(if (<= y.im -9.6e-76)
t_1
(if (<= y.im 1.8e-166)
(/ (- x.im (/ (* y.im x.re) y.re)) y.re)
(if (<= y.im 1.55e+153)
t_1
(fma
t_0
(/ x.im y.im)
(*
x.re
(/ (/ y.im (hypot y.im y.re)) (- (hypot y.im y.re)))))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re / hypot(y_46_re, y_46_im);
double t_1 = fma(t_0, (x_46_im / hypot(y_46_re, y_46_im)), (x_46_re * (-y_46_im / pow(hypot(y_46_re, y_46_im), 2.0))));
double tmp;
if (y_46_im <= -1.65e+103) {
tmp = ((y_46_re * (x_46_im / y_46_im)) - x_46_re) / y_46_im;
} else if (y_46_im <= -9.6e-76) {
tmp = t_1;
} else if (y_46_im <= 1.8e-166) {
tmp = (x_46_im - ((y_46_im * x_46_re) / y_46_re)) / y_46_re;
} else if (y_46_im <= 1.55e+153) {
tmp = t_1;
} else {
tmp = fma(t_0, (x_46_im / y_46_im), (x_46_re * ((y_46_im / hypot(y_46_im, y_46_re)) / -hypot(y_46_im, y_46_re))));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_re / hypot(y_46_re, y_46_im)) t_1 = fma(t_0, Float64(x_46_im / hypot(y_46_re, y_46_im)), Float64(x_46_re * Float64(Float64(-y_46_im) / (hypot(y_46_re, y_46_im) ^ 2.0)))) tmp = 0.0 if (y_46_im <= -1.65e+103) tmp = Float64(Float64(Float64(y_46_re * Float64(x_46_im / y_46_im)) - x_46_re) / y_46_im); elseif (y_46_im <= -9.6e-76) tmp = t_1; elseif (y_46_im <= 1.8e-166) tmp = Float64(Float64(x_46_im - Float64(Float64(y_46_im * x_46_re) / y_46_re)) / y_46_re); elseif (y_46_im <= 1.55e+153) tmp = t_1; else tmp = fma(t_0, Float64(x_46_im / y_46_im), Float64(x_46_re * Float64(Float64(y_46_im / hypot(y_46_im, y_46_re)) / Float64(-hypot(y_46_im, y_46_re))))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$re / N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(t$95$0 * N[(x$46$im / N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision]), $MachinePrecision] + N[(x$46$re * N[((-y$46$im) / N[Power[N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -1.65e+103], N[(N[(N[(y$46$re * N[(x$46$im / y$46$im), $MachinePrecision]), $MachinePrecision] - x$46$re), $MachinePrecision] / y$46$im), $MachinePrecision], If[LessEqual[y$46$im, -9.6e-76], t$95$1, If[LessEqual[y$46$im, 1.8e-166], N[(N[(x$46$im - N[(N[(y$46$im * x$46$re), $MachinePrecision] / y$46$re), $MachinePrecision]), $MachinePrecision] / y$46$re), $MachinePrecision], If[LessEqual[y$46$im, 1.55e+153], t$95$1, N[(t$95$0 * N[(x$46$im / y$46$im), $MachinePrecision] + N[(x$46$re * N[(N[(y$46$im / N[Sqrt[y$46$im ^ 2 + y$46$re ^ 2], $MachinePrecision]), $MachinePrecision] / (-N[Sqrt[y$46$im ^ 2 + y$46$re ^ 2], $MachinePrecision])), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{y.re}{\mathsf{hypot}\left(y.re, y.im\right)}\\
t_1 := \mathsf{fma}\left(t\_0, \frac{x.im}{\mathsf{hypot}\left(y.re, y.im\right)}, x.re \cdot \frac{-y.im}{{\left(\mathsf{hypot}\left(y.re, y.im\right)\right)}^{2}}\right)\\
\mathbf{if}\;y.im \leq -1.65 \cdot 10^{+103}:\\
\;\;\;\;\frac{y.re \cdot \frac{x.im}{y.im} - x.re}{y.im}\\
\mathbf{elif}\;y.im \leq -9.6 \cdot 10^{-76}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y.im \leq 1.8 \cdot 10^{-166}:\\
\;\;\;\;\frac{x.im - \frac{y.im \cdot x.re}{y.re}}{y.re}\\
\mathbf{elif}\;y.im \leq 1.55 \cdot 10^{+153}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(t\_0, \frac{x.im}{y.im}, x.re \cdot \frac{\frac{y.im}{\mathsf{hypot}\left(y.im, y.re\right)}}{-\mathsf{hypot}\left(y.im, y.re\right)}\right)\\
\end{array}
\end{array}
if y.im < -1.65000000000000004e103Initial program 42.2%
Taylor expanded in y.re around 0 82.4%
+-commutative82.4%
mul-1-neg82.4%
unsub-neg82.4%
unpow282.4%
associate-/r*82.7%
div-sub82.7%
*-commutative82.7%
associate-/l*89.4%
Simplified89.4%
if -1.65000000000000004e103 < y.im < -9.60000000000000053e-76 or 1.8e-166 < y.im < 1.55e153Initial program 74.4%
div-sub74.4%
*-commutative74.4%
add-sqr-sqrt74.4%
times-frac76.5%
fma-neg76.5%
hypot-define76.5%
hypot-define93.2%
associate-/l*95.1%
add-sqr-sqrt95.1%
pow295.1%
hypot-define95.1%
Applied egg-rr95.1%
if -9.60000000000000053e-76 < y.im < 1.8e-166Initial program 72.0%
Taylor expanded in y.re around inf 96.0%
remove-double-neg96.0%
mul-1-neg96.0%
neg-mul-196.0%
distribute-lft-in96.0%
distribute-lft-in96.0%
mul-1-neg96.0%
unsub-neg96.0%
neg-mul-196.0%
mul-1-neg96.0%
remove-double-neg96.0%
associate-/l*94.0%
Simplified94.0%
Taylor expanded in x.re around 0 96.0%
if 1.55e153 < y.im Initial program 25.6%
div-sub25.6%
*-commutative25.6%
add-sqr-sqrt25.6%
times-frac25.8%
fma-neg25.8%
hypot-define25.8%
hypot-define39.8%
associate-/l*44.4%
add-sqr-sqrt44.4%
pow244.4%
hypot-define44.4%
Applied egg-rr44.4%
*-un-lft-identity44.4%
unpow244.4%
times-frac97.5%
hypot-undefine44.4%
+-commutative44.4%
hypot-define97.5%
hypot-undefine44.4%
+-commutative44.4%
hypot-define97.5%
Applied egg-rr97.5%
associate-*l/97.5%
*-un-lft-identity97.5%
Applied egg-rr97.5%
Taylor expanded in y.re around 0 95.0%
Final simplification94.4%
(FPCore (x.re x.im y.re y.im) :precision binary64 (fma (/ y.re (hypot y.re y.im)) (/ x.im (hypot y.re y.im)) (* x.re (/ (/ y.im (hypot y.im y.re)) (- (hypot y.im y.re))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return fma((y_46_re / hypot(y_46_re, y_46_im)), (x_46_im / hypot(y_46_re, y_46_im)), (x_46_re * ((y_46_im / hypot(y_46_im, y_46_re)) / -hypot(y_46_im, y_46_re))));
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) return fma(Float64(y_46_re / hypot(y_46_re, y_46_im)), Float64(x_46_im / hypot(y_46_re, y_46_im)), Float64(x_46_re * Float64(Float64(y_46_im / hypot(y_46_im, y_46_re)) / Float64(-hypot(y_46_im, y_46_re))))) end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[(N[(y$46$re / N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision]), $MachinePrecision] * N[(x$46$im / N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision]), $MachinePrecision] + N[(x$46$re * N[(N[(y$46$im / N[Sqrt[y$46$im ^ 2 + y$46$re ^ 2], $MachinePrecision]), $MachinePrecision] / (-N[Sqrt[y$46$im ^ 2 + y$46$re ^ 2], $MachinePrecision])), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(\frac{y.re}{\mathsf{hypot}\left(y.re, y.im\right)}, \frac{x.im}{\mathsf{hypot}\left(y.re, y.im\right)}, x.re \cdot \frac{\frac{y.im}{\mathsf{hypot}\left(y.im, y.re\right)}}{-\mathsf{hypot}\left(y.im, y.re\right)}\right)
\end{array}
Initial program 61.3%
div-sub60.1%
*-commutative60.1%
add-sqr-sqrt60.1%
times-frac60.5%
fma-neg60.5%
hypot-define60.5%
hypot-define76.8%
associate-/l*78.8%
add-sqr-sqrt78.8%
pow278.8%
hypot-define78.8%
Applied egg-rr78.8%
*-un-lft-identity78.8%
unpow278.8%
times-frac95.5%
hypot-undefine78.8%
+-commutative78.8%
hypot-define95.5%
hypot-undefine78.8%
+-commutative78.8%
hypot-define95.5%
Applied egg-rr95.5%
associate-*l/95.5%
*-un-lft-identity95.5%
Applied egg-rr95.5%
Final simplification95.5%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (/ y.im (hypot y.im y.re))) (t_1 (/ y.re (hypot y.re y.im))))
(if (<= y.im -2.1e+83)
(/ (- (* y.re (/ x.im y.im)) x.re) y.im)
(if (<= y.im -2.3e-80)
(/ (- (* y.re x.im) (* y.im x.re)) (+ (* y.re y.re) (* y.im y.im)))
(if (<= y.im 8e-168)
(/ (- x.im (/ (* y.im x.re) y.re)) y.re)
(if (<= y.im 1.65e+110)
(/ (fma x.im y.re (* x.re (- y.im))) (fma y.im y.im (* y.re y.re)))
(if (<= y.im 6.2e+144)
(fma
t_1
(/ x.im (hypot y.re y.im))
(* x.re (* t_0 (/ -1.0 y.re))))
(fma
t_1
(/ x.im y.im)
(* x.re (/ t_0 (- (hypot y.im y.re))))))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_im / hypot(y_46_im, y_46_re);
double t_1 = y_46_re / hypot(y_46_re, y_46_im);
double tmp;
if (y_46_im <= -2.1e+83) {
tmp = ((y_46_re * (x_46_im / y_46_im)) - x_46_re) / y_46_im;
} else if (y_46_im <= -2.3e-80) {
tmp = ((y_46_re * x_46_im) - (y_46_im * x_46_re)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im));
} else if (y_46_im <= 8e-168) {
tmp = (x_46_im - ((y_46_im * x_46_re) / y_46_re)) / y_46_re;
} else if (y_46_im <= 1.65e+110) {
tmp = fma(x_46_im, y_46_re, (x_46_re * -y_46_im)) / fma(y_46_im, y_46_im, (y_46_re * y_46_re));
} else if (y_46_im <= 6.2e+144) {
tmp = fma(t_1, (x_46_im / hypot(y_46_re, y_46_im)), (x_46_re * (t_0 * (-1.0 / y_46_re))));
} else {
tmp = fma(t_1, (x_46_im / y_46_im), (x_46_re * (t_0 / -hypot(y_46_im, y_46_re))));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(y_46_im / hypot(y_46_im, y_46_re)) t_1 = Float64(y_46_re / hypot(y_46_re, y_46_im)) tmp = 0.0 if (y_46_im <= -2.1e+83) tmp = Float64(Float64(Float64(y_46_re * Float64(x_46_im / y_46_im)) - x_46_re) / y_46_im); elseif (y_46_im <= -2.3e-80) tmp = Float64(Float64(Float64(y_46_re * x_46_im) - Float64(y_46_im * x_46_re)) / Float64(Float64(y_46_re * y_46_re) + Float64(y_46_im * y_46_im))); elseif (y_46_im <= 8e-168) tmp = Float64(Float64(x_46_im - Float64(Float64(y_46_im * x_46_re) / y_46_re)) / y_46_re); elseif (y_46_im <= 1.65e+110) tmp = Float64(fma(x_46_im, y_46_re, Float64(x_46_re * Float64(-y_46_im))) / fma(y_46_im, y_46_im, Float64(y_46_re * y_46_re))); elseif (y_46_im <= 6.2e+144) tmp = fma(t_1, Float64(x_46_im / hypot(y_46_re, y_46_im)), Float64(x_46_re * Float64(t_0 * Float64(-1.0 / y_46_re)))); else tmp = fma(t_1, Float64(x_46_im / y_46_im), Float64(x_46_re * Float64(t_0 / Float64(-hypot(y_46_im, y_46_re))))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(y$46$im / N[Sqrt[y$46$im ^ 2 + y$46$re ^ 2], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(y$46$re / N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -2.1e+83], N[(N[(N[(y$46$re * N[(x$46$im / y$46$im), $MachinePrecision]), $MachinePrecision] - x$46$re), $MachinePrecision] / y$46$im), $MachinePrecision], If[LessEqual[y$46$im, -2.3e-80], N[(N[(N[(y$46$re * x$46$im), $MachinePrecision] - N[(y$46$im * x$46$re), $MachinePrecision]), $MachinePrecision] / N[(N[(y$46$re * y$46$re), $MachinePrecision] + N[(y$46$im * y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 8e-168], N[(N[(x$46$im - N[(N[(y$46$im * x$46$re), $MachinePrecision] / y$46$re), $MachinePrecision]), $MachinePrecision] / y$46$re), $MachinePrecision], If[LessEqual[y$46$im, 1.65e+110], N[(N[(x$46$im * y$46$re + N[(x$46$re * (-y$46$im)), $MachinePrecision]), $MachinePrecision] / N[(y$46$im * y$46$im + N[(y$46$re * y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 6.2e+144], N[(t$95$1 * N[(x$46$im / N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision]), $MachinePrecision] + N[(x$46$re * N[(t$95$0 * N[(-1.0 / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[(x$46$im / y$46$im), $MachinePrecision] + N[(x$46$re * N[(t$95$0 / (-N[Sqrt[y$46$im ^ 2 + y$46$re ^ 2], $MachinePrecision])), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{y.im}{\mathsf{hypot}\left(y.im, y.re\right)}\\
t_1 := \frac{y.re}{\mathsf{hypot}\left(y.re, y.im\right)}\\
\mathbf{if}\;y.im \leq -2.1 \cdot 10^{+83}:\\
\;\;\;\;\frac{y.re \cdot \frac{x.im}{y.im} - x.re}{y.im}\\
\mathbf{elif}\;y.im \leq -2.3 \cdot 10^{-80}:\\
\;\;\;\;\frac{y.re \cdot x.im - y.im \cdot x.re}{y.re \cdot y.re + y.im \cdot y.im}\\
\mathbf{elif}\;y.im \leq 8 \cdot 10^{-168}:\\
\;\;\;\;\frac{x.im - \frac{y.im \cdot x.re}{y.re}}{y.re}\\
\mathbf{elif}\;y.im \leq 1.65 \cdot 10^{+110}:\\
\;\;\;\;\frac{\mathsf{fma}\left(x.im, y.re, x.re \cdot \left(-y.im\right)\right)}{\mathsf{fma}\left(y.im, y.im, y.re \cdot y.re\right)}\\
\mathbf{elif}\;y.im \leq 6.2 \cdot 10^{+144}:\\
\;\;\;\;\mathsf{fma}\left(t\_1, \frac{x.im}{\mathsf{hypot}\left(y.re, y.im\right)}, x.re \cdot \left(t\_0 \cdot \frac{-1}{y.re}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(t\_1, \frac{x.im}{y.im}, x.re \cdot \frac{t\_0}{-\mathsf{hypot}\left(y.im, y.re\right)}\right)\\
\end{array}
\end{array}
if y.im < -2.10000000000000002e83Initial program 40.9%
Taylor expanded in y.re around 0 79.9%
+-commutative79.9%
mul-1-neg79.9%
unsub-neg79.9%
unpow279.9%
associate-/r*80.1%
div-sub80.1%
*-commutative80.1%
associate-/l*86.3%
Simplified86.3%
if -2.10000000000000002e83 < y.im < -2.2999999999999998e-80Initial program 80.2%
if -2.2999999999999998e-80 < y.im < 8.0000000000000004e-168Initial program 70.8%
Taylor expanded in y.re around inf 95.9%
remove-double-neg95.9%
mul-1-neg95.9%
neg-mul-195.9%
distribute-lft-in95.9%
distribute-lft-in95.9%
mul-1-neg95.9%
unsub-neg95.9%
neg-mul-195.9%
mul-1-neg95.9%
remove-double-neg95.9%
associate-/l*93.8%
Simplified93.8%
Taylor expanded in x.re around 0 95.9%
if 8.0000000000000004e-168 < y.im < 1.64999999999999986e110Initial program 82.2%
fma-neg82.2%
distribute-rgt-neg-out82.2%
+-commutative82.2%
fma-define82.2%
Simplified82.2%
if 1.64999999999999986e110 < y.im < 6.2000000000000003e144Initial program 28.7%
div-sub28.7%
*-commutative28.7%
add-sqr-sqrt28.7%
times-frac41.2%
fma-neg41.2%
hypot-define41.2%
hypot-define87.3%
associate-/l*99.8%
add-sqr-sqrt99.8%
pow299.8%
hypot-define99.8%
Applied egg-rr99.8%
*-un-lft-identity99.8%
unpow299.8%
times-frac99.8%
hypot-undefine99.8%
+-commutative99.8%
hypot-define99.8%
hypot-undefine99.8%
+-commutative99.8%
hypot-define99.8%
Applied egg-rr99.8%
Taylor expanded in y.im around 0 99.8%
if 6.2000000000000003e144 < y.im Initial program 25.6%
div-sub25.6%
*-commutative25.6%
add-sqr-sqrt25.6%
times-frac25.8%
fma-neg25.8%
hypot-define25.8%
hypot-define39.8%
associate-/l*44.4%
add-sqr-sqrt44.4%
pow244.4%
hypot-define44.4%
Applied egg-rr44.4%
*-un-lft-identity44.4%
unpow244.4%
times-frac97.5%
hypot-undefine44.4%
+-commutative44.4%
hypot-define97.5%
hypot-undefine44.4%
+-commutative44.4%
hypot-define97.5%
Applied egg-rr97.5%
associate-*l/97.5%
*-un-lft-identity97.5%
Applied egg-rr97.5%
Taylor expanded in y.re around 0 95.0%
Final simplification88.8%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (<= y.im -7.5e+84)
(/ (- (* y.re (/ x.im y.im)) x.re) y.im)
(if (<= y.im -3.3e-83)
(/ (- (* y.re x.im) (* y.im x.re)) (+ (* y.re y.re) (* y.im y.im)))
(if (<= y.im 8e-168)
(/ (- x.im (/ (* y.im x.re) y.re)) y.re)
(if (<= y.im 2.1e+19)
(/ (fma x.im y.re (* x.re (- y.im))) (fma y.im y.im (* y.re y.re)))
(if (<= y.im 7.8e+43)
(/ (- x.im (* x.re (/ y.im y.re))) y.re)
(fma
(/ y.re (hypot y.re y.im))
(/ x.im y.im)
(*
x.re
(/ (/ y.im (hypot y.im y.re)) (- (hypot y.im y.re)))))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_im <= -7.5e+84) {
tmp = ((y_46_re * (x_46_im / y_46_im)) - x_46_re) / y_46_im;
} else if (y_46_im <= -3.3e-83) {
tmp = ((y_46_re * x_46_im) - (y_46_im * x_46_re)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im));
} else if (y_46_im <= 8e-168) {
tmp = (x_46_im - ((y_46_im * x_46_re) / y_46_re)) / y_46_re;
} else if (y_46_im <= 2.1e+19) {
tmp = fma(x_46_im, y_46_re, (x_46_re * -y_46_im)) / fma(y_46_im, y_46_im, (y_46_re * y_46_re));
} else if (y_46_im <= 7.8e+43) {
tmp = (x_46_im - (x_46_re * (y_46_im / y_46_re))) / y_46_re;
} else {
tmp = fma((y_46_re / hypot(y_46_re, y_46_im)), (x_46_im / y_46_im), (x_46_re * ((y_46_im / hypot(y_46_im, y_46_re)) / -hypot(y_46_im, y_46_re))));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if (y_46_im <= -7.5e+84) tmp = Float64(Float64(Float64(y_46_re * Float64(x_46_im / y_46_im)) - x_46_re) / y_46_im); elseif (y_46_im <= -3.3e-83) tmp = Float64(Float64(Float64(y_46_re * x_46_im) - Float64(y_46_im * x_46_re)) / Float64(Float64(y_46_re * y_46_re) + Float64(y_46_im * y_46_im))); elseif (y_46_im <= 8e-168) tmp = Float64(Float64(x_46_im - Float64(Float64(y_46_im * x_46_re) / y_46_re)) / y_46_re); elseif (y_46_im <= 2.1e+19) tmp = Float64(fma(x_46_im, y_46_re, Float64(x_46_re * Float64(-y_46_im))) / fma(y_46_im, y_46_im, Float64(y_46_re * y_46_re))); elseif (y_46_im <= 7.8e+43) tmp = Float64(Float64(x_46_im - Float64(x_46_re * Float64(y_46_im / y_46_re))) / y_46_re); else tmp = fma(Float64(y_46_re / hypot(y_46_re, y_46_im)), Float64(x_46_im / y_46_im), Float64(x_46_re * Float64(Float64(y_46_im / hypot(y_46_im, y_46_re)) / Float64(-hypot(y_46_im, y_46_re))))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[y$46$im, -7.5e+84], N[(N[(N[(y$46$re * N[(x$46$im / y$46$im), $MachinePrecision]), $MachinePrecision] - x$46$re), $MachinePrecision] / y$46$im), $MachinePrecision], If[LessEqual[y$46$im, -3.3e-83], N[(N[(N[(y$46$re * x$46$im), $MachinePrecision] - N[(y$46$im * x$46$re), $MachinePrecision]), $MachinePrecision] / N[(N[(y$46$re * y$46$re), $MachinePrecision] + N[(y$46$im * y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 8e-168], N[(N[(x$46$im - N[(N[(y$46$im * x$46$re), $MachinePrecision] / y$46$re), $MachinePrecision]), $MachinePrecision] / y$46$re), $MachinePrecision], If[LessEqual[y$46$im, 2.1e+19], N[(N[(x$46$im * y$46$re + N[(x$46$re * (-y$46$im)), $MachinePrecision]), $MachinePrecision] / N[(y$46$im * y$46$im + N[(y$46$re * y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 7.8e+43], N[(N[(x$46$im - N[(x$46$re * N[(y$46$im / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y$46$re), $MachinePrecision], N[(N[(y$46$re / N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision]), $MachinePrecision] * N[(x$46$im / y$46$im), $MachinePrecision] + N[(x$46$re * N[(N[(y$46$im / N[Sqrt[y$46$im ^ 2 + y$46$re ^ 2], $MachinePrecision]), $MachinePrecision] / (-N[Sqrt[y$46$im ^ 2 + y$46$re ^ 2], $MachinePrecision])), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.im \leq -7.5 \cdot 10^{+84}:\\
\;\;\;\;\frac{y.re \cdot \frac{x.im}{y.im} - x.re}{y.im}\\
\mathbf{elif}\;y.im \leq -3.3 \cdot 10^{-83}:\\
\;\;\;\;\frac{y.re \cdot x.im - y.im \cdot x.re}{y.re \cdot y.re + y.im \cdot y.im}\\
\mathbf{elif}\;y.im \leq 8 \cdot 10^{-168}:\\
\;\;\;\;\frac{x.im - \frac{y.im \cdot x.re}{y.re}}{y.re}\\
\mathbf{elif}\;y.im \leq 2.1 \cdot 10^{+19}:\\
\;\;\;\;\frac{\mathsf{fma}\left(x.im, y.re, x.re \cdot \left(-y.im\right)\right)}{\mathsf{fma}\left(y.im, y.im, y.re \cdot y.re\right)}\\
\mathbf{elif}\;y.im \leq 7.8 \cdot 10^{+43}:\\
\;\;\;\;\frac{x.im - x.re \cdot \frac{y.im}{y.re}}{y.re}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y.re}{\mathsf{hypot}\left(y.re, y.im\right)}, \frac{x.im}{y.im}, x.re \cdot \frac{\frac{y.im}{\mathsf{hypot}\left(y.im, y.re\right)}}{-\mathsf{hypot}\left(y.im, y.re\right)}\right)\\
\end{array}
\end{array}
if y.im < -7.5000000000000001e84Initial program 40.9%
Taylor expanded in y.re around 0 79.9%
+-commutative79.9%
mul-1-neg79.9%
unsub-neg79.9%
unpow279.9%
associate-/r*80.1%
div-sub80.1%
*-commutative80.1%
associate-/l*86.3%
Simplified86.3%
if -7.5000000000000001e84 < y.im < -3.2999999999999999e-83Initial program 80.2%
if -3.2999999999999999e-83 < y.im < 8.0000000000000004e-168Initial program 70.8%
Taylor expanded in y.re around inf 95.9%
remove-double-neg95.9%
mul-1-neg95.9%
neg-mul-195.9%
distribute-lft-in95.9%
distribute-lft-in95.9%
mul-1-neg95.9%
unsub-neg95.9%
neg-mul-195.9%
mul-1-neg95.9%
remove-double-neg95.9%
associate-/l*93.8%
Simplified93.8%
Taylor expanded in x.re around 0 95.9%
if 8.0000000000000004e-168 < y.im < 2.1e19Initial program 81.9%
fma-neg81.9%
distribute-rgt-neg-out81.9%
+-commutative81.9%
fma-define81.9%
Simplified81.9%
if 2.1e19 < y.im < 7.8000000000000001e43Initial program 60.0%
Taylor expanded in y.re around inf 100.0%
remove-double-neg100.0%
mul-1-neg100.0%
neg-mul-1100.0%
distribute-lft-in100.0%
distribute-lft-in100.0%
mul-1-neg100.0%
unsub-neg100.0%
neg-mul-1100.0%
mul-1-neg100.0%
remove-double-neg100.0%
associate-/l*100.0%
Simplified100.0%
if 7.8000000000000001e43 < y.im Initial program 36.3%
div-sub36.3%
*-commutative36.3%
add-sqr-sqrt36.3%
times-frac38.3%
fma-neg38.3%
hypot-define38.3%
hypot-define55.5%
associate-/l*60.7%
add-sqr-sqrt60.7%
pow260.7%
hypot-define60.7%
Applied egg-rr60.7%
*-un-lft-identity60.7%
unpow260.7%
times-frac98.2%
hypot-undefine60.7%
+-commutative60.7%
hypot-define98.2%
hypot-undefine60.7%
+-commutative60.7%
hypot-define98.2%
Applied egg-rr98.2%
associate-*l/98.1%
*-un-lft-identity98.1%
Applied egg-rr98.1%
Taylor expanded in y.re around 0 86.4%
Final simplification87.6%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (<= y.im -4.6e+81)
(/ (- (* y.re (/ x.im y.im)) x.re) y.im)
(if (<= y.im -6e-85)
(/ (- (* y.re x.im) (* y.im x.re)) (+ (* y.re y.re) (* y.im y.im)))
(if (<= y.im 8e-168)
(/ (- x.im (/ (* y.im x.re) y.re)) y.re)
(if (<= y.im 2.9e+130)
(/ (fma x.im y.re (* y.im (- x.re))) (fma y.im y.im (* y.re y.re)))
(/ (- (* x.im (/ y.re y.im)) x.re) y.im))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_im <= -4.6e+81) {
tmp = ((y_46_re * (x_46_im / y_46_im)) - x_46_re) / y_46_im;
} else if (y_46_im <= -6e-85) {
tmp = ((y_46_re * x_46_im) - (y_46_im * x_46_re)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im));
} else if (y_46_im <= 8e-168) {
tmp = (x_46_im - ((y_46_im * x_46_re) / y_46_re)) / y_46_re;
} else if (y_46_im <= 2.9e+130) {
tmp = fma(x_46_im, y_46_re, (y_46_im * -x_46_re)) / fma(y_46_im, y_46_im, (y_46_re * y_46_re));
} else {
tmp = ((x_46_im * (y_46_re / y_46_im)) - x_46_re) / y_46_im;
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if (y_46_im <= -4.6e+81) tmp = Float64(Float64(Float64(y_46_re * Float64(x_46_im / y_46_im)) - x_46_re) / y_46_im); elseif (y_46_im <= -6e-85) tmp = Float64(Float64(Float64(y_46_re * x_46_im) - Float64(y_46_im * x_46_re)) / Float64(Float64(y_46_re * y_46_re) + Float64(y_46_im * y_46_im))); elseif (y_46_im <= 8e-168) tmp = Float64(Float64(x_46_im - Float64(Float64(y_46_im * x_46_re) / y_46_re)) / y_46_re); elseif (y_46_im <= 2.9e+130) tmp = Float64(fma(x_46_im, y_46_re, Float64(y_46_im * Float64(-x_46_re))) / fma(y_46_im, y_46_im, Float64(y_46_re * y_46_re))); else tmp = Float64(Float64(Float64(x_46_im * Float64(y_46_re / y_46_im)) - 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.6e+81], N[(N[(N[(y$46$re * N[(x$46$im / y$46$im), $MachinePrecision]), $MachinePrecision] - x$46$re), $MachinePrecision] / y$46$im), $MachinePrecision], If[LessEqual[y$46$im, -6e-85], N[(N[(N[(y$46$re * x$46$im), $MachinePrecision] - N[(y$46$im * x$46$re), $MachinePrecision]), $MachinePrecision] / N[(N[(y$46$re * y$46$re), $MachinePrecision] + N[(y$46$im * y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 8e-168], N[(N[(x$46$im - N[(N[(y$46$im * x$46$re), $MachinePrecision] / y$46$re), $MachinePrecision]), $MachinePrecision] / y$46$re), $MachinePrecision], If[LessEqual[y$46$im, 2.9e+130], N[(N[(x$46$im * y$46$re + N[(y$46$im * (-x$46$re)), $MachinePrecision]), $MachinePrecision] / N[(y$46$im * y$46$im + N[(y$46$re * y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x$46$im * N[(y$46$re / y$46$im), $MachinePrecision]), $MachinePrecision] - x$46$re), $MachinePrecision] / y$46$im), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.im \leq -4.6 \cdot 10^{+81}:\\
\;\;\;\;\frac{y.re \cdot \frac{x.im}{y.im} - x.re}{y.im}\\
\mathbf{elif}\;y.im \leq -6 \cdot 10^{-85}:\\
\;\;\;\;\frac{y.re \cdot x.im - y.im \cdot x.re}{y.re \cdot y.re + y.im \cdot y.im}\\
\mathbf{elif}\;y.im \leq 8 \cdot 10^{-168}:\\
\;\;\;\;\frac{x.im - \frac{y.im \cdot x.re}{y.re}}{y.re}\\
\mathbf{elif}\;y.im \leq 2.9 \cdot 10^{+130}:\\
\;\;\;\;\frac{\mathsf{fma}\left(x.im, y.re, y.im \cdot \left(-x.re\right)\right)}{\mathsf{fma}\left(y.im, y.im, y.re \cdot y.re\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x.im \cdot \frac{y.re}{y.im} - x.re}{y.im}\\
\end{array}
\end{array}
if y.im < -4.5999999999999998e81Initial program 40.9%
Taylor expanded in y.re around 0 79.9%
+-commutative79.9%
mul-1-neg79.9%
unsub-neg79.9%
unpow279.9%
associate-/r*80.1%
div-sub80.1%
*-commutative80.1%
associate-/l*86.3%
Simplified86.3%
if -4.5999999999999998e81 < y.im < -6.00000000000000044e-85Initial program 80.2%
if -6.00000000000000044e-85 < y.im < 8.0000000000000004e-168Initial program 70.8%
Taylor expanded in y.re around inf 95.9%
remove-double-neg95.9%
mul-1-neg95.9%
neg-mul-195.9%
distribute-lft-in95.9%
distribute-lft-in95.9%
mul-1-neg95.9%
unsub-neg95.9%
neg-mul-195.9%
mul-1-neg95.9%
remove-double-neg95.9%
associate-/l*93.8%
Simplified93.8%
Taylor expanded in x.re around 0 95.9%
if 8.0000000000000004e-168 < y.im < 2.8999999999999999e130Initial program 79.5%
fma-neg79.5%
distribute-rgt-neg-out79.5%
+-commutative79.5%
fma-define79.5%
Simplified79.5%
if 2.8999999999999999e130 < y.im Initial program 25.5%
div-sub25.5%
*-commutative25.5%
add-sqr-sqrt25.5%
times-frac28.0%
fma-neg28.0%
hypot-define28.0%
hypot-define44.7%
associate-/l*51.2%
add-sqr-sqrt51.2%
pow251.2%
hypot-define51.2%
Applied egg-rr51.2%
*-un-lft-identity51.2%
unpow251.2%
times-frac97.8%
hypot-undefine51.2%
+-commutative51.2%
hypot-define97.8%
hypot-undefine51.2%
+-commutative51.2%
hypot-define97.8%
Applied egg-rr97.8%
Taylor expanded in y.im around inf 78.6%
associate-/l*83.4%
Simplified83.4%
Final simplification86.1%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0
(/ (- (* y.re x.im) (* y.im x.re)) (+ (* y.re y.re) (* y.im y.im)))))
(if (<= y.im -2.5e+84)
(/ (- (* y.re (/ x.im y.im)) x.re) y.im)
(if (<= y.im -1.3e-82)
t_0
(if (<= y.im 8e-168)
(/ (- x.im (/ (* y.im x.re) y.re)) y.re)
(if (<= y.im 4.2e+130)
t_0
(/ (- (* x.im (/ y.re y.im)) x.re) y.im)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = ((y_46_re * x_46_im) - (y_46_im * x_46_re)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im));
double tmp;
if (y_46_im <= -2.5e+84) {
tmp = ((y_46_re * (x_46_im / y_46_im)) - x_46_re) / y_46_im;
} else if (y_46_im <= -1.3e-82) {
tmp = t_0;
} else if (y_46_im <= 8e-168) {
tmp = (x_46_im - ((y_46_im * x_46_re) / y_46_re)) / y_46_re;
} else if (y_46_im <= 4.2e+130) {
tmp = t_0;
} else {
tmp = ((x_46_im * (y_46_re / y_46_im)) - 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 = ((y_46re * x_46im) - (y_46im * x_46re)) / ((y_46re * y_46re) + (y_46im * y_46im))
if (y_46im <= (-2.5d+84)) then
tmp = ((y_46re * (x_46im / y_46im)) - x_46re) / y_46im
else if (y_46im <= (-1.3d-82)) then
tmp = t_0
else if (y_46im <= 8d-168) then
tmp = (x_46im - ((y_46im * x_46re) / y_46re)) / y_46re
else if (y_46im <= 4.2d+130) then
tmp = t_0
else
tmp = ((x_46im * (y_46re / y_46im)) - 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 = ((y_46_re * x_46_im) - (y_46_im * x_46_re)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im));
double tmp;
if (y_46_im <= -2.5e+84) {
tmp = ((y_46_re * (x_46_im / y_46_im)) - x_46_re) / y_46_im;
} else if (y_46_im <= -1.3e-82) {
tmp = t_0;
} else if (y_46_im <= 8e-168) {
tmp = (x_46_im - ((y_46_im * x_46_re) / y_46_re)) / y_46_re;
} else if (y_46_im <= 4.2e+130) {
tmp = t_0;
} else {
tmp = ((x_46_im * (y_46_re / y_46_im)) - 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 * x_46_im) - (y_46_im * x_46_re)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im)) tmp = 0 if y_46_im <= -2.5e+84: tmp = ((y_46_re * (x_46_im / y_46_im)) - x_46_re) / y_46_im elif y_46_im <= -1.3e-82: tmp = t_0 elif y_46_im <= 8e-168: tmp = (x_46_im - ((y_46_im * x_46_re) / y_46_re)) / y_46_re elif y_46_im <= 4.2e+130: tmp = t_0 else: tmp = ((x_46_im * (y_46_re / y_46_im)) - x_46_re) / y_46_im return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(Float64(Float64(y_46_re * x_46_im) - Float64(y_46_im * x_46_re)) / Float64(Float64(y_46_re * y_46_re) + Float64(y_46_im * y_46_im))) tmp = 0.0 if (y_46_im <= -2.5e+84) tmp = Float64(Float64(Float64(y_46_re * Float64(x_46_im / y_46_im)) - x_46_re) / y_46_im); elseif (y_46_im <= -1.3e-82) tmp = t_0; elseif (y_46_im <= 8e-168) tmp = Float64(Float64(x_46_im - Float64(Float64(y_46_im * x_46_re) / y_46_re)) / y_46_re); elseif (y_46_im <= 4.2e+130) tmp = t_0; else tmp = Float64(Float64(Float64(x_46_im * Float64(y_46_re / y_46_im)) - 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 * x_46_im) - (y_46_im * x_46_re)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im)); tmp = 0.0; if (y_46_im <= -2.5e+84) tmp = ((y_46_re * (x_46_im / y_46_im)) - x_46_re) / y_46_im; elseif (y_46_im <= -1.3e-82) tmp = t_0; elseif (y_46_im <= 8e-168) tmp = (x_46_im - ((y_46_im * x_46_re) / y_46_re)) / y_46_re; elseif (y_46_im <= 4.2e+130) tmp = t_0; else tmp = ((x_46_im * (y_46_re / y_46_im)) - x_46_re) / y_46_im; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[(N[(y$46$re * x$46$im), $MachinePrecision] - N[(y$46$im * x$46$re), $MachinePrecision]), $MachinePrecision] / N[(N[(y$46$re * y$46$re), $MachinePrecision] + N[(y$46$im * y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -2.5e+84], N[(N[(N[(y$46$re * N[(x$46$im / y$46$im), $MachinePrecision]), $MachinePrecision] - x$46$re), $MachinePrecision] / y$46$im), $MachinePrecision], If[LessEqual[y$46$im, -1.3e-82], t$95$0, If[LessEqual[y$46$im, 8e-168], N[(N[(x$46$im - N[(N[(y$46$im * x$46$re), $MachinePrecision] / y$46$re), $MachinePrecision]), $MachinePrecision] / y$46$re), $MachinePrecision], If[LessEqual[y$46$im, 4.2e+130], t$95$0, N[(N[(N[(x$46$im * N[(y$46$re / y$46$im), $MachinePrecision]), $MachinePrecision] - x$46$re), $MachinePrecision] / y$46$im), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{y.re \cdot x.im - y.im \cdot x.re}{y.re \cdot y.re + y.im \cdot y.im}\\
\mathbf{if}\;y.im \leq -2.5 \cdot 10^{+84}:\\
\;\;\;\;\frac{y.re \cdot \frac{x.im}{y.im} - x.re}{y.im}\\
\mathbf{elif}\;y.im \leq -1.3 \cdot 10^{-82}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y.im \leq 8 \cdot 10^{-168}:\\
\;\;\;\;\frac{x.im - \frac{y.im \cdot x.re}{y.re}}{y.re}\\
\mathbf{elif}\;y.im \leq 4.2 \cdot 10^{+130}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{x.im \cdot \frac{y.re}{y.im} - x.re}{y.im}\\
\end{array}
\end{array}
if y.im < -2.5e84Initial program 40.9%
Taylor expanded in y.re around 0 79.9%
+-commutative79.9%
mul-1-neg79.9%
unsub-neg79.9%
unpow279.9%
associate-/r*80.1%
div-sub80.1%
*-commutative80.1%
associate-/l*86.3%
Simplified86.3%
if -2.5e84 < y.im < -1.3e-82 or 8.0000000000000004e-168 < y.im < 4.19999999999999981e130Initial program 79.8%
if -1.3e-82 < y.im < 8.0000000000000004e-168Initial program 70.8%
Taylor expanded in y.re around inf 95.9%
remove-double-neg95.9%
mul-1-neg95.9%
neg-mul-195.9%
distribute-lft-in95.9%
distribute-lft-in95.9%
mul-1-neg95.9%
unsub-neg95.9%
neg-mul-195.9%
mul-1-neg95.9%
remove-double-neg95.9%
associate-/l*93.8%
Simplified93.8%
Taylor expanded in x.re around 0 95.9%
if 4.19999999999999981e130 < y.im Initial program 25.5%
div-sub25.5%
*-commutative25.5%
add-sqr-sqrt25.5%
times-frac28.0%
fma-neg28.0%
hypot-define28.0%
hypot-define44.7%
associate-/l*51.2%
add-sqr-sqrt51.2%
pow251.2%
hypot-define51.2%
Applied egg-rr51.2%
*-un-lft-identity51.2%
unpow251.2%
times-frac97.8%
hypot-undefine51.2%
+-commutative51.2%
hypot-define97.8%
hypot-undefine51.2%
+-commutative51.2%
hypot-define97.8%
Applied egg-rr97.8%
Taylor expanded in y.im around inf 78.6%
associate-/l*83.4%
Simplified83.4%
Final simplification86.1%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (/ (- (* x.im (/ y.re y.im)) x.re) y.im))
(t_1 (/ (- x.im (* y.im (/ x.re y.re))) y.re)))
(if (<= y.re -1.58e+60)
t_1
(if (<= y.re -3.3e-49)
t_0
(if (<= y.re -5e-68)
(/ (- x.im (/ (* y.im x.re) y.re)) y.re)
(if (<= y.re 23000.0) 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) / y_46_im;
double t_1 = (x_46_im - (y_46_im * (x_46_re / y_46_re))) / y_46_re;
double tmp;
if (y_46_re <= -1.58e+60) {
tmp = t_1;
} else if (y_46_re <= -3.3e-49) {
tmp = t_0;
} else if (y_46_re <= -5e-68) {
tmp = (x_46_im - ((y_46_im * x_46_re) / y_46_re)) / y_46_re;
} else if (y_46_re <= 23000.0) {
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 = ((x_46im * (y_46re / y_46im)) - x_46re) / y_46im
t_1 = (x_46im - (y_46im * (x_46re / y_46re))) / y_46re
if (y_46re <= (-1.58d+60)) then
tmp = t_1
else if (y_46re <= (-3.3d-49)) then
tmp = t_0
else if (y_46re <= (-5d-68)) then
tmp = (x_46im - ((y_46im * x_46re) / y_46re)) / y_46re
else if (y_46re <= 23000.0d0) 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 = ((x_46_im * (y_46_re / y_46_im)) - x_46_re) / y_46_im;
double t_1 = (x_46_im - (y_46_im * (x_46_re / y_46_re))) / y_46_re;
double tmp;
if (y_46_re <= -1.58e+60) {
tmp = t_1;
} else if (y_46_re <= -3.3e-49) {
tmp = t_0;
} else if (y_46_re <= -5e-68) {
tmp = (x_46_im - ((y_46_im * x_46_re) / y_46_re)) / y_46_re;
} else if (y_46_re <= 23000.0) {
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) / y_46_im t_1 = (x_46_im - (y_46_im * (x_46_re / y_46_re))) / y_46_re tmp = 0 if y_46_re <= -1.58e+60: tmp = t_1 elif y_46_re <= -3.3e-49: tmp = t_0 elif y_46_re <= -5e-68: tmp = (x_46_im - ((y_46_im * x_46_re) / y_46_re)) / y_46_re elif y_46_re <= 23000.0: 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(x_46_im * Float64(y_46_re / y_46_im)) - x_46_re) / y_46_im) t_1 = Float64(Float64(x_46_im - Float64(y_46_im * Float64(x_46_re / y_46_re))) / y_46_re) tmp = 0.0 if (y_46_re <= -1.58e+60) tmp = t_1; elseif (y_46_re <= -3.3e-49) tmp = t_0; elseif (y_46_re <= -5e-68) tmp = Float64(Float64(x_46_im - Float64(Float64(y_46_im * x_46_re) / y_46_re)) / y_46_re); elseif (y_46_re <= 23000.0) 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) / y_46_im; t_1 = (x_46_im - (y_46_im * (x_46_re / y_46_re))) / y_46_re; tmp = 0.0; if (y_46_re <= -1.58e+60) tmp = t_1; elseif (y_46_re <= -3.3e-49) tmp = t_0; elseif (y_46_re <= -5e-68) tmp = (x_46_im - ((y_46_im * x_46_re) / y_46_re)) / y_46_re; elseif (y_46_re <= 23000.0) 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[(x$46$im * N[(y$46$re / y$46$im), $MachinePrecision]), $MachinePrecision] - x$46$re), $MachinePrecision] / y$46$im), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x$46$im - N[(y$46$im * N[(x$46$re / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y$46$re), $MachinePrecision]}, If[LessEqual[y$46$re, -1.58e+60], t$95$1, If[LessEqual[y$46$re, -3.3e-49], t$95$0, If[LessEqual[y$46$re, -5e-68], N[(N[(x$46$im - N[(N[(y$46$im * x$46$re), $MachinePrecision] / y$46$re), $MachinePrecision]), $MachinePrecision] / y$46$re), $MachinePrecision], If[LessEqual[y$46$re, 23000.0], t$95$0, t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x.im \cdot \frac{y.re}{y.im} - x.re}{y.im}\\
t_1 := \frac{x.im - y.im \cdot \frac{x.re}{y.re}}{y.re}\\
\mathbf{if}\;y.re \leq -1.58 \cdot 10^{+60}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y.re \leq -3.3 \cdot 10^{-49}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y.re \leq -5 \cdot 10^{-68}:\\
\;\;\;\;\frac{x.im - \frac{y.im \cdot x.re}{y.re}}{y.re}\\
\mathbf{elif}\;y.re \leq 23000:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y.re < -1.58e60 or 23000 < y.re Initial program 53.6%
Taylor expanded in y.re around inf 78.7%
remove-double-neg78.7%
mul-1-neg78.7%
neg-mul-178.7%
distribute-lft-in78.7%
distribute-lft-in78.7%
mul-1-neg78.7%
unsub-neg78.7%
neg-mul-178.7%
mul-1-neg78.7%
remove-double-neg78.7%
associate-/l*80.9%
Simplified80.9%
clear-num80.9%
un-div-inv80.9%
Applied egg-rr80.9%
associate-/r/83.1%
Simplified83.1%
if -1.58e60 < y.re < -3.3e-49 or -4.99999999999999971e-68 < y.re < 23000Initial program 67.6%
div-sub65.0%
*-commutative65.0%
add-sqr-sqrt65.0%
times-frac62.1%
fma-neg62.1%
hypot-define62.1%
hypot-define65.5%
associate-/l*70.0%
add-sqr-sqrt70.0%
pow270.0%
hypot-define70.0%
Applied egg-rr70.0%
*-un-lft-identity70.0%
unpow270.0%
times-frac96.5%
hypot-undefine70.0%
+-commutative70.0%
hypot-define96.5%
hypot-undefine70.0%
+-commutative70.0%
hypot-define96.5%
Applied egg-rr96.5%
Taylor expanded in y.im around inf 85.0%
associate-/l*85.0%
Simplified85.0%
if -3.3e-49 < y.re < -4.99999999999999971e-68Initial program 99.4%
Taylor expanded in y.re around inf 99.7%
remove-double-neg99.7%
mul-1-neg99.7%
neg-mul-199.7%
distribute-lft-in99.7%
distribute-lft-in99.7%
mul-1-neg99.7%
unsub-neg99.7%
neg-mul-199.7%
mul-1-neg99.7%
remove-double-neg99.7%
associate-/l*99.4%
Simplified99.4%
Taylor expanded in x.re around 0 99.7%
Final simplification84.4%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (/ (- x.im (* y.im (/ x.re y.re))) y.re)))
(if (<= y.re -3.3e+66)
t_0
(if (<= y.re -2.35e-49)
(/ (- (* x.im (/ y.re y.im)) x.re) y.im)
(if (<= y.re -8.6e-67)
(/ (- x.im (/ (* y.im x.re) y.re)) y.re)
(if (<= y.re 1400000.0)
(/ (- (/ (* y.re x.im) y.im) x.re) y.im)
t_0))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = (x_46_im - (y_46_im * (x_46_re / y_46_re))) / y_46_re;
double tmp;
if (y_46_re <= -3.3e+66) {
tmp = t_0;
} else if (y_46_re <= -2.35e-49) {
tmp = ((x_46_im * (y_46_re / y_46_im)) - x_46_re) / y_46_im;
} else if (y_46_re <= -8.6e-67) {
tmp = (x_46_im - ((y_46_im * x_46_re) / y_46_re)) / y_46_re;
} else if (y_46_re <= 1400000.0) {
tmp = (((y_46_re * x_46_im) / y_46_im) - x_46_re) / y_46_im;
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
real(8) :: tmp
t_0 = (x_46im - (y_46im * (x_46re / y_46re))) / y_46re
if (y_46re <= (-3.3d+66)) then
tmp = t_0
else if (y_46re <= (-2.35d-49)) then
tmp = ((x_46im * (y_46re / y_46im)) - x_46re) / y_46im
else if (y_46re <= (-8.6d-67)) then
tmp = (x_46im - ((y_46im * x_46re) / y_46re)) / y_46re
else if (y_46re <= 1400000.0d0) then
tmp = (((y_46re * x_46im) / y_46im) - x_46re) / y_46im
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = (x_46_im - (y_46_im * (x_46_re / y_46_re))) / y_46_re;
double tmp;
if (y_46_re <= -3.3e+66) {
tmp = t_0;
} else if (y_46_re <= -2.35e-49) {
tmp = ((x_46_im * (y_46_re / y_46_im)) - x_46_re) / y_46_im;
} else if (y_46_re <= -8.6e-67) {
tmp = (x_46_im - ((y_46_im * x_46_re) / y_46_re)) / y_46_re;
} else if (y_46_re <= 1400000.0) {
tmp = (((y_46_re * x_46_im) / y_46_im) - x_46_re) / y_46_im;
} else {
tmp = t_0;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = (x_46_im - (y_46_im * (x_46_re / y_46_re))) / y_46_re tmp = 0 if y_46_re <= -3.3e+66: tmp = t_0 elif y_46_re <= -2.35e-49: tmp = ((x_46_im * (y_46_re / y_46_im)) - x_46_re) / y_46_im elif y_46_re <= -8.6e-67: tmp = (x_46_im - ((y_46_im * x_46_re) / y_46_re)) / y_46_re elif y_46_re <= 1400000.0: tmp = (((y_46_re * x_46_im) / y_46_im) - x_46_re) / y_46_im else: tmp = t_0 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(Float64(x_46_im - Float64(y_46_im * Float64(x_46_re / y_46_re))) / y_46_re) tmp = 0.0 if (y_46_re <= -3.3e+66) tmp = t_0; elseif (y_46_re <= -2.35e-49) tmp = Float64(Float64(Float64(x_46_im * Float64(y_46_re / y_46_im)) - x_46_re) / y_46_im); elseif (y_46_re <= -8.6e-67) tmp = Float64(Float64(x_46_im - Float64(Float64(y_46_im * x_46_re) / y_46_re)) / y_46_re); elseif (y_46_re <= 1400000.0) tmp = Float64(Float64(Float64(Float64(y_46_re * x_46_im) / y_46_im) - x_46_re) / y_46_im); else tmp = t_0; end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = (x_46_im - (y_46_im * (x_46_re / y_46_re))) / y_46_re; tmp = 0.0; if (y_46_re <= -3.3e+66) tmp = t_0; elseif (y_46_re <= -2.35e-49) tmp = ((x_46_im * (y_46_re / y_46_im)) - x_46_re) / y_46_im; elseif (y_46_re <= -8.6e-67) tmp = (x_46_im - ((y_46_im * x_46_re) / y_46_re)) / y_46_re; elseif (y_46_re <= 1400000.0) tmp = (((y_46_re * x_46_im) / y_46_im) - x_46_re) / y_46_im; else tmp = t_0; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[(x$46$im - N[(y$46$im * N[(x$46$re / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y$46$re), $MachinePrecision]}, If[LessEqual[y$46$re, -3.3e+66], t$95$0, If[LessEqual[y$46$re, -2.35e-49], N[(N[(N[(x$46$im * N[(y$46$re / y$46$im), $MachinePrecision]), $MachinePrecision] - x$46$re), $MachinePrecision] / y$46$im), $MachinePrecision], If[LessEqual[y$46$re, -8.6e-67], N[(N[(x$46$im - N[(N[(y$46$im * x$46$re), $MachinePrecision] / y$46$re), $MachinePrecision]), $MachinePrecision] / y$46$re), $MachinePrecision], If[LessEqual[y$46$re, 1400000.0], N[(N[(N[(N[(y$46$re * x$46$im), $MachinePrecision] / y$46$im), $MachinePrecision] - x$46$re), $MachinePrecision] / y$46$im), $MachinePrecision], t$95$0]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x.im - y.im \cdot \frac{x.re}{y.re}}{y.re}\\
\mathbf{if}\;y.re \leq -3.3 \cdot 10^{+66}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y.re \leq -2.35 \cdot 10^{-49}:\\
\;\;\;\;\frac{x.im \cdot \frac{y.re}{y.im} - x.re}{y.im}\\
\mathbf{elif}\;y.re \leq -8.6 \cdot 10^{-67}:\\
\;\;\;\;\frac{x.im - \frac{y.im \cdot x.re}{y.re}}{y.re}\\
\mathbf{elif}\;y.re \leq 1400000:\\
\;\;\;\;\frac{\frac{y.re \cdot x.im}{y.im} - x.re}{y.im}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if y.re < -3.3000000000000001e66 or 1.4e6 < y.re Initial program 53.6%
Taylor expanded in y.re around inf 78.7%
remove-double-neg78.7%
mul-1-neg78.7%
neg-mul-178.7%
distribute-lft-in78.7%
distribute-lft-in78.7%
mul-1-neg78.7%
unsub-neg78.7%
neg-mul-178.7%
mul-1-neg78.7%
remove-double-neg78.7%
associate-/l*80.9%
Simplified80.9%
clear-num80.9%
un-div-inv80.9%
Applied egg-rr80.9%
associate-/r/83.1%
Simplified83.1%
if -3.3000000000000001e66 < y.re < -2.35000000000000011e-49Initial program 56.1%
div-sub56.1%
*-commutative56.1%
add-sqr-sqrt56.1%
times-frac56.1%
fma-neg56.1%
hypot-define56.1%
hypot-define61.6%
associate-/l*70.6%
add-sqr-sqrt70.6%
pow270.6%
hypot-define70.6%
Applied egg-rr70.6%
*-un-lft-identity70.6%
unpow270.6%
times-frac99.6%
hypot-undefine70.6%
+-commutative70.6%
hypot-define99.6%
hypot-undefine70.6%
+-commutative70.6%
hypot-define99.6%
Applied egg-rr99.6%
Taylor expanded in y.im around inf 62.5%
associate-/l*66.7%
Simplified66.7%
if -2.35000000000000011e-49 < y.re < -8.60000000000000053e-67Initial program 99.4%
Taylor expanded in y.re around inf 99.7%
remove-double-neg99.7%
mul-1-neg99.7%
neg-mul-199.7%
distribute-lft-in99.7%
distribute-lft-in99.7%
mul-1-neg99.7%
unsub-neg99.7%
neg-mul-199.7%
mul-1-neg99.7%
remove-double-neg99.7%
associate-/l*99.4%
Simplified99.4%
Taylor expanded in x.re around 0 99.7%
if -8.60000000000000053e-67 < y.re < 1.4e6Initial program 70.2%
Taylor expanded in y.re around 0 84.9%
+-commutative84.9%
mul-1-neg84.9%
unsub-neg84.9%
unpow284.9%
associate-/r*90.1%
+-rgt-identity90.1%
div-sub90.1%
+-rgt-identity90.1%
*-commutative90.1%
Simplified90.1%
Final simplification84.7%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (or (<= y.im -95000000.0) (not (<= y.im 1.1e+149))) (/ x.re (- y.im)) (/ (- x.im (* x.re (/ y.im y.re))) y.re)))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_im <= -95000000.0) || !(y_46_im <= 1.1e+149)) {
tmp = x_46_re / -y_46_im;
} else {
tmp = (x_46_im - (x_46_re * (y_46_im / y_46_re))) / y_46_re;
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: tmp
if ((y_46im <= (-95000000.0d0)) .or. (.not. (y_46im <= 1.1d+149))) then
tmp = x_46re / -y_46im
else
tmp = (x_46im - (x_46re * (y_46im / y_46re))) / y_46re
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_im <= -95000000.0) || !(y_46_im <= 1.1e+149)) {
tmp = x_46_re / -y_46_im;
} else {
tmp = (x_46_im - (x_46_re * (y_46_im / y_46_re))) / y_46_re;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if (y_46_im <= -95000000.0) or not (y_46_im <= 1.1e+149): tmp = x_46_re / -y_46_im else: tmp = (x_46_im - (x_46_re * (y_46_im / y_46_re))) / y_46_re return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if ((y_46_im <= -95000000.0) || !(y_46_im <= 1.1e+149)) tmp = Float64(x_46_re / Float64(-y_46_im)); else tmp = Float64(Float64(x_46_im - Float64(x_46_re * Float64(y_46_im / y_46_re))) / y_46_re); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if ((y_46_im <= -95000000.0) || ~((y_46_im <= 1.1e+149))) tmp = x_46_re / -y_46_im; else tmp = (x_46_im - (x_46_re * (y_46_im / y_46_re))) / y_46_re; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[Or[LessEqual[y$46$im, -95000000.0], N[Not[LessEqual[y$46$im, 1.1e+149]], $MachinePrecision]], N[(x$46$re / (-y$46$im)), $MachinePrecision], N[(N[(x$46$im - N[(x$46$re * N[(y$46$im / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y$46$re), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.im \leq -95000000 \lor \neg \left(y.im \leq 1.1 \cdot 10^{+149}\right):\\
\;\;\;\;\frac{x.re}{-y.im}\\
\mathbf{else}:\\
\;\;\;\;\frac{x.im - x.re \cdot \frac{y.im}{y.re}}{y.re}\\
\end{array}
\end{array}
if y.im < -9.5e7 or 1.1e149 < y.im Initial program 43.8%
Taylor expanded in y.re around 0 72.5%
associate-*r/72.5%
neg-mul-172.5%
Simplified72.5%
if -9.5e7 < y.im < 1.1e149Initial program 73.5%
Taylor expanded in y.re around inf 79.2%
remove-double-neg79.2%
mul-1-neg79.2%
neg-mul-179.2%
distribute-lft-in79.2%
distribute-lft-in79.2%
mul-1-neg79.2%
unsub-neg79.2%
neg-mul-179.2%
mul-1-neg79.2%
remove-double-neg79.2%
associate-/l*78.9%
Simplified78.9%
Final simplification76.2%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (or (<= y.re -3.7e-11) (not (<= y.re 38000.0))) (/ (- x.im (* 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 <= -3.7e-11) || !(y_46_re <= 38000.0)) {
tmp = (x_46_im - (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 <= (-3.7d-11)) .or. (.not. (y_46re <= 38000.0d0))) then
tmp = (x_46im - (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 <= -3.7e-11) || !(y_46_re <= 38000.0)) {
tmp = (x_46_im - (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 <= -3.7e-11) or not (y_46_re <= 38000.0): tmp = (x_46_im - (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 <= -3.7e-11) || !(y_46_re <= 38000.0)) tmp = Float64(Float64(x_46_im - Float64(y_46_im * Float64(x_46_re / y_46_re))) / y_46_re); else tmp = Float64(x_46_re / Float64(-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 <= -3.7e-11) || ~((y_46_re <= 38000.0))) tmp = (x_46_im - (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, -3.7e-11], N[Not[LessEqual[y$46$re, 38000.0]], $MachinePrecision]], N[(N[(x$46$im - N[(y$46$im * N[(x$46$re / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y$46$re), $MachinePrecision], N[(x$46$re / (-y$46$im)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq -3.7 \cdot 10^{-11} \lor \neg \left(y.re \leq 38000\right):\\
\;\;\;\;\frac{x.im - y.im \cdot \frac{x.re}{y.re}}{y.re}\\
\mathbf{else}:\\
\;\;\;\;\frac{x.re}{-y.im}\\
\end{array}
\end{array}
if y.re < -3.7000000000000001e-11 or 38000 < y.re Initial program 54.2%
Taylor expanded in y.re around inf 75.5%
remove-double-neg75.5%
mul-1-neg75.5%
neg-mul-175.5%
distribute-lft-in75.5%
distribute-lft-in75.5%
mul-1-neg75.5%
unsub-neg75.5%
neg-mul-175.5%
mul-1-neg75.5%
remove-double-neg75.5%
associate-/l*77.4%
Simplified77.4%
clear-num77.4%
un-div-inv77.4%
Applied egg-rr77.4%
associate-/r/79.4%
Simplified79.4%
if -3.7000000000000001e-11 < y.re < 38000Initial program 70.1%
Taylor expanded in y.re around 0 73.2%
associate-*r/73.2%
neg-mul-173.2%
Simplified73.2%
Final simplification76.6%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (or (<= y.re -8e+74) (not (<= y.re 290000.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 <= -8e+74) || !(y_46_re <= 290000.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 <= (-8d+74)) .or. (.not. (y_46re <= 290000.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 <= -8e+74) || !(y_46_re <= 290000.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 <= -8e+74) or not (y_46_re <= 290000.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 <= -8e+74) || !(y_46_re <= 290000.0)) tmp = Float64(x_46_im / y_46_re); else tmp = Float64(x_46_re / Float64(-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 <= -8e+74) || ~((y_46_re <= 290000.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, -8e+74], N[Not[LessEqual[y$46$re, 290000.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 -8 \cdot 10^{+74} \lor \neg \left(y.re \leq 290000\right):\\
\;\;\;\;\frac{x.im}{y.re}\\
\mathbf{else}:\\
\;\;\;\;\frac{x.re}{-y.im}\\
\end{array}
\end{array}
if y.re < -7.99999999999999961e74 or 2.9e5 < y.re Initial program 53.2%
Taylor expanded in y.re around inf 69.6%
if -7.99999999999999961e74 < y.re < 2.9e5Initial program 69.1%
Taylor expanded in y.re around 0 68.2%
associate-*r/68.2%
neg-mul-168.2%
Simplified68.2%
Final simplification68.9%
(FPCore (x.re x.im y.re y.im) :precision binary64 (/ x.im y.re))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return x_46_im / y_46_re;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
code = x_46im / y_46re
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return x_46_im / y_46_re;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): return x_46_im / y_46_re
function code(x_46_re, x_46_im, y_46_re, y_46_im) return Float64(x_46_im / y_46_re) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = x_46_im / y_46_re; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[(x$46$im / y$46$re), $MachinePrecision]
\begin{array}{l}
\\
\frac{x.im}{y.re}
\end{array}
Initial program 61.3%
Taylor expanded in y.re around inf 41.6%
Final simplification41.6%
herbie shell --seed 2024085
(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))))