
(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 17 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 62.0%
div-sub59.9%
*-commutative59.9%
fma-define59.9%
add-sqr-sqrt59.9%
times-frac64.1%
fma-neg64.1%
fma-define64.0%
hypot-define64.1%
fma-define64.1%
hypot-define77.6%
associate-/l*81.7%
fma-define81.7%
add-sqr-sqrt81.7%
pow281.7%
Applied egg-rr81.7%
*-un-lft-identity81.7%
unpow281.7%
times-frac97.0%
hypot-undefine81.7%
+-commutative81.7%
hypot-define97.0%
hypot-undefine81.7%
+-commutative81.7%
hypot-define97.0%
Applied egg-rr97.0%
associate-*l/97.0%
*-un-lft-identity97.0%
Applied egg-rr97.0%
associate-*r/98.6%
Applied egg-rr98.6%
Final simplification98.6%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (/ y.re (hypot y.re y.im)))
(t_1 (/ x.im (hypot y.re y.im)))
(t_2 (fma t_0 t_1 (* x.re (/ y.im (- (pow (hypot y.re y.im) 2.0)))))))
(if (<= y.im -5e+149)
(fma t_0 t_1 (* x.re (* (/ y.im (hypot y.im y.re)) (/ 1.0 y.im))))
(if (<= y.im -1.02e-227)
t_2
(if (<= y.im 5.1e-241)
(fma t_0 t_1 (* x.re (/ (/ y.im y.re) (- (hypot y.im y.re)))))
(if (<= y.im 4.3e+136)
t_2
(fma t_0 t_1 (* x.re (/ -1.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_re / hypot(y_46_re, y_46_im);
double t_1 = x_46_im / hypot(y_46_re, y_46_im);
double t_2 = fma(t_0, t_1, (x_46_re * (y_46_im / -pow(hypot(y_46_re, y_46_im), 2.0))));
double tmp;
if (y_46_im <= -5e+149) {
tmp = fma(t_0, t_1, (x_46_re * ((y_46_im / hypot(y_46_im, y_46_re)) * (1.0 / y_46_im))));
} else if (y_46_im <= -1.02e-227) {
tmp = t_2;
} else if (y_46_im <= 5.1e-241) {
tmp = fma(t_0, t_1, (x_46_re * ((y_46_im / y_46_re) / -hypot(y_46_im, y_46_re))));
} else if (y_46_im <= 4.3e+136) {
tmp = t_2;
} else {
tmp = fma(t_0, t_1, (x_46_re * (-1.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_re / hypot(y_46_re, y_46_im)) t_1 = Float64(x_46_im / hypot(y_46_re, y_46_im)) t_2 = fma(t_0, t_1, Float64(x_46_re * Float64(y_46_im / Float64(-(hypot(y_46_re, y_46_im) ^ 2.0))))) tmp = 0.0 if (y_46_im <= -5e+149) tmp = fma(t_0, t_1, Float64(x_46_re * Float64(Float64(y_46_im / hypot(y_46_im, y_46_re)) * Float64(1.0 / y_46_im)))); elseif (y_46_im <= -1.02e-227) tmp = t_2; elseif (y_46_im <= 5.1e-241) tmp = fma(t_0, t_1, Float64(x_46_re * Float64(Float64(y_46_im / y_46_re) / Float64(-hypot(y_46_im, y_46_re))))); elseif (y_46_im <= 4.3e+136) tmp = t_2; else tmp = fma(t_0, t_1, Float64(x_46_re * Float64(-1.0 / 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[(x$46$im / N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$0 * t$95$1 + 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, -5e+149], N[(t$95$0 * t$95$1 + N[(x$46$re * N[(N[(y$46$im / N[Sqrt[y$46$im ^ 2 + y$46$re ^ 2], $MachinePrecision]), $MachinePrecision] * N[(1.0 / y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, -1.02e-227], t$95$2, If[LessEqual[y$46$im, 5.1e-241], N[(t$95$0 * t$95$1 + N[(x$46$re * N[(N[(y$46$im / y$46$re), $MachinePrecision] / (-N[Sqrt[y$46$im ^ 2 + y$46$re ^ 2], $MachinePrecision])), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 4.3e+136], t$95$2, N[(t$95$0 * t$95$1 + N[(x$46$re * N[(-1.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.re}{\mathsf{hypot}\left(y.re, y.im\right)}\\
t_1 := \frac{x.im}{\mathsf{hypot}\left(y.re, y.im\right)}\\
t_2 := \mathsf{fma}\left(t\_0, t\_1, x.re \cdot \frac{y.im}{-{\left(\mathsf{hypot}\left(y.re, y.im\right)\right)}^{2}}\right)\\
\mathbf{if}\;y.im \leq -5 \cdot 10^{+149}:\\
\;\;\;\;\mathsf{fma}\left(t\_0, t\_1, x.re \cdot \left(\frac{y.im}{\mathsf{hypot}\left(y.im, y.re\right)} \cdot \frac{1}{y.im}\right)\right)\\
\mathbf{elif}\;y.im \leq -1.02 \cdot 10^{-227}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y.im \leq 5.1 \cdot 10^{-241}:\\
\;\;\;\;\mathsf{fma}\left(t\_0, t\_1, x.re \cdot \frac{\frac{y.im}{y.re}}{-\mathsf{hypot}\left(y.im, y.re\right)}\right)\\
\mathbf{elif}\;y.im \leq 4.3 \cdot 10^{+136}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(t\_0, t\_1, x.re \cdot \frac{-1}{\mathsf{hypot}\left(y.im, y.re\right)}\right)\\
\end{array}
\end{array}
if y.im < -4.9999999999999999e149Initial program 43.1%
div-sub43.1%
*-commutative43.1%
fma-define43.1%
add-sqr-sqrt43.1%
times-frac43.4%
fma-neg43.4%
fma-define43.4%
hypot-define43.4%
fma-define43.4%
hypot-define49.2%
associate-/l*53.6%
fma-define53.6%
add-sqr-sqrt53.6%
pow253.6%
Applied egg-rr53.6%
*-un-lft-identity53.6%
unpow253.6%
times-frac96.8%
hypot-undefine53.6%
+-commutative53.6%
hypot-define96.8%
hypot-undefine53.6%
+-commutative53.6%
hypot-define96.8%
Applied egg-rr96.8%
Taylor expanded in y.im around -inf 92.7%
if -4.9999999999999999e149 < y.im < -1.02e-227 or 5.0999999999999998e-241 < y.im < 4.2999999999999999e136Initial program 72.5%
div-sub70.4%
*-commutative70.4%
fma-define70.4%
add-sqr-sqrt70.4%
times-frac75.4%
fma-neg75.4%
fma-define75.4%
hypot-define75.4%
fma-define75.4%
hypot-define89.6%
associate-/l*95.3%
fma-define95.3%
add-sqr-sqrt95.3%
pow295.3%
Applied egg-rr95.3%
if -1.02e-227 < y.im < 5.0999999999999998e-241Initial program 59.7%
div-sub53.6%
*-commutative53.6%
fma-define53.6%
add-sqr-sqrt53.6%
times-frac62.0%
fma-neg62.0%
fma-define62.0%
hypot-define62.0%
fma-define62.0%
hypot-define80.5%
associate-/l*78.2%
fma-define78.2%
add-sqr-sqrt78.2%
pow278.2%
Applied egg-rr78.2%
*-un-lft-identity78.2%
unpow278.2%
times-frac94.6%
hypot-undefine78.3%
+-commutative78.3%
hypot-define94.6%
hypot-undefine78.3%
+-commutative78.3%
hypot-define94.6%
Applied egg-rr94.6%
associate-*l/94.6%
*-un-lft-identity94.6%
Applied egg-rr94.6%
Taylor expanded in y.im around 0 94.8%
if 4.2999999999999999e136 < y.im Initial program 38.3%
div-sub38.3%
*-commutative38.3%
fma-define38.3%
add-sqr-sqrt38.3%
times-frac38.5%
fma-neg38.5%
fma-define38.5%
hypot-define38.5%
fma-define38.5%
hypot-define51.2%
associate-/l*55.0%
fma-define55.0%
add-sqr-sqrt55.0%
pow255.0%
Applied egg-rr55.0%
*-un-lft-identity55.0%
unpow255.0%
times-frac98.3%
hypot-undefine55.0%
+-commutative55.0%
hypot-define98.3%
hypot-undefine55.0%
+-commutative55.0%
hypot-define98.3%
Applied egg-rr98.3%
associate-*l/98.3%
*-un-lft-identity98.3%
Applied egg-rr98.3%
Taylor expanded in y.im around inf 95.9%
Final simplification95.0%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (/ y.re (hypot y.re y.im))) (t_1 (/ x.im (hypot y.re y.im))))
(if (<= y.im -5e+154)
(fma t_0 t_1 (* x.re (* (/ y.im (hypot y.im y.re)) (/ 1.0 y.im))))
(if (<= y.im -5e-227)
(fma t_0 t_1 (* x.re (/ y.im (- (pow (hypot y.re y.im) 2.0)))))
(if (<= y.im 1.1e-240)
(fma t_0 t_1 (* x.re (/ (/ y.im y.re) (- (hypot y.im y.re)))))
(if (<= y.im 1.65e+155)
(fma t_0 t_1 (* x.re (* y.im (- (pow (hypot y.im y.re) -2.0)))))
(fma t_0 t_1 (* x.re (/ -1.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_re / hypot(y_46_re, y_46_im);
double t_1 = x_46_im / hypot(y_46_re, y_46_im);
double tmp;
if (y_46_im <= -5e+154) {
tmp = fma(t_0, t_1, (x_46_re * ((y_46_im / hypot(y_46_im, y_46_re)) * (1.0 / y_46_im))));
} else if (y_46_im <= -5e-227) {
tmp = fma(t_0, t_1, (x_46_re * (y_46_im / -pow(hypot(y_46_re, y_46_im), 2.0))));
} else if (y_46_im <= 1.1e-240) {
tmp = fma(t_0, t_1, (x_46_re * ((y_46_im / y_46_re) / -hypot(y_46_im, y_46_re))));
} else if (y_46_im <= 1.65e+155) {
tmp = fma(t_0, t_1, (x_46_re * (y_46_im * -pow(hypot(y_46_im, y_46_re), -2.0))));
} else {
tmp = fma(t_0, t_1, (x_46_re * (-1.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_re / hypot(y_46_re, y_46_im)) t_1 = Float64(x_46_im / hypot(y_46_re, y_46_im)) tmp = 0.0 if (y_46_im <= -5e+154) tmp = fma(t_0, t_1, Float64(x_46_re * Float64(Float64(y_46_im / hypot(y_46_im, y_46_re)) * Float64(1.0 / y_46_im)))); elseif (y_46_im <= -5e-227) tmp = fma(t_0, t_1, Float64(x_46_re * Float64(y_46_im / Float64(-(hypot(y_46_re, y_46_im) ^ 2.0))))); elseif (y_46_im <= 1.1e-240) tmp = fma(t_0, t_1, Float64(x_46_re * Float64(Float64(y_46_im / y_46_re) / Float64(-hypot(y_46_im, y_46_re))))); elseif (y_46_im <= 1.65e+155) tmp = fma(t_0, t_1, Float64(x_46_re * Float64(y_46_im * Float64(-(hypot(y_46_im, y_46_re) ^ -2.0))))); else tmp = fma(t_0, t_1, Float64(x_46_re * Float64(-1.0 / 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[(x$46$im / N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -5e+154], N[(t$95$0 * t$95$1 + N[(x$46$re * N[(N[(y$46$im / N[Sqrt[y$46$im ^ 2 + y$46$re ^ 2], $MachinePrecision]), $MachinePrecision] * N[(1.0 / y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, -5e-227], N[(t$95$0 * t$95$1 + 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.1e-240], N[(t$95$0 * t$95$1 + N[(x$46$re * N[(N[(y$46$im / y$46$re), $MachinePrecision] / (-N[Sqrt[y$46$im ^ 2 + y$46$re ^ 2], $MachinePrecision])), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 1.65e+155], N[(t$95$0 * t$95$1 + N[(x$46$re * N[(y$46$im * (-N[Power[N[Sqrt[y$46$im ^ 2 + y$46$re ^ 2], $MachinePrecision], -2.0], $MachinePrecision])), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 * t$95$1 + N[(x$46$re * N[(-1.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.re}{\mathsf{hypot}\left(y.re, y.im\right)}\\
t_1 := \frac{x.im}{\mathsf{hypot}\left(y.re, y.im\right)}\\
\mathbf{if}\;y.im \leq -5 \cdot 10^{+154}:\\
\;\;\;\;\mathsf{fma}\left(t\_0, t\_1, x.re \cdot \left(\frac{y.im}{\mathsf{hypot}\left(y.im, y.re\right)} \cdot \frac{1}{y.im}\right)\right)\\
\mathbf{elif}\;y.im \leq -5 \cdot 10^{-227}:\\
\;\;\;\;\mathsf{fma}\left(t\_0, t\_1, x.re \cdot \frac{y.im}{-{\left(\mathsf{hypot}\left(y.re, y.im\right)\right)}^{2}}\right)\\
\mathbf{elif}\;y.im \leq 1.1 \cdot 10^{-240}:\\
\;\;\;\;\mathsf{fma}\left(t\_0, t\_1, x.re \cdot \frac{\frac{y.im}{y.re}}{-\mathsf{hypot}\left(y.im, y.re\right)}\right)\\
\mathbf{elif}\;y.im \leq 1.65 \cdot 10^{+155}:\\
\;\;\;\;\mathsf{fma}\left(t\_0, t\_1, x.re \cdot \left(y.im \cdot \left(-{\left(\mathsf{hypot}\left(y.im, y.re\right)\right)}^{-2}\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(t\_0, t\_1, x.re \cdot \frac{-1}{\mathsf{hypot}\left(y.im, y.re\right)}\right)\\
\end{array}
\end{array}
if y.im < -5.00000000000000004e154Initial program 43.1%
div-sub43.1%
*-commutative43.1%
fma-define43.1%
add-sqr-sqrt43.1%
times-frac43.4%
fma-neg43.4%
fma-define43.4%
hypot-define43.4%
fma-define43.4%
hypot-define49.2%
associate-/l*53.6%
fma-define53.6%
add-sqr-sqrt53.6%
pow253.6%
Applied egg-rr53.6%
*-un-lft-identity53.6%
unpow253.6%
times-frac96.8%
hypot-undefine53.6%
+-commutative53.6%
hypot-define96.8%
hypot-undefine53.6%
+-commutative53.6%
hypot-define96.8%
Applied egg-rr96.8%
Taylor expanded in y.im around -inf 92.7%
if -5.00000000000000004e154 < y.im < -4.99999999999999961e-227Initial program 73.2%
div-sub71.0%
*-commutative71.0%
fma-define71.0%
add-sqr-sqrt71.0%
times-frac75.8%
fma-neg75.8%
fma-define75.8%
hypot-define75.8%
fma-define75.8%
hypot-define91.5%
associate-/l*95.7%
fma-define95.7%
add-sqr-sqrt95.7%
pow295.7%
Applied egg-rr95.7%
if -4.99999999999999961e-227 < y.im < 1.1e-240Initial program 59.7%
div-sub53.6%
*-commutative53.6%
fma-define53.6%
add-sqr-sqrt53.6%
times-frac62.0%
fma-neg62.0%
fma-define62.0%
hypot-define62.0%
fma-define62.0%
hypot-define80.5%
associate-/l*78.2%
fma-define78.2%
add-sqr-sqrt78.2%
pow278.2%
Applied egg-rr78.2%
*-un-lft-identity78.2%
unpow278.2%
times-frac94.6%
hypot-undefine78.3%
+-commutative78.3%
hypot-define94.6%
hypot-undefine78.3%
+-commutative78.3%
hypot-define94.6%
Applied egg-rr94.6%
associate-*l/94.6%
*-un-lft-identity94.6%
Applied egg-rr94.6%
Taylor expanded in y.im around 0 94.8%
if 1.1e-240 < y.im < 1.6499999999999999e155Initial program 69.6%
div-sub67.9%
*-commutative67.9%
fma-define67.9%
add-sqr-sqrt67.9%
times-frac72.9%
fma-neg72.9%
fma-define72.9%
hypot-define72.9%
fma-define72.9%
hypot-define85.5%
associate-/l*95.0%
fma-define95.0%
add-sqr-sqrt94.9%
pow294.9%
Applied egg-rr95.0%
add-log-exp55.2%
exp-prod50.7%
div-inv50.7%
pow-flip50.7%
hypot-undefine50.7%
+-commutative50.7%
hypot-define50.7%
metadata-eval50.7%
Applied egg-rr50.7%
log-pow38.4%
rem-log-exp95.0%
Simplified95.0%
if 1.6499999999999999e155 < y.im Initial program 38.4%
div-sub38.4%
*-commutative38.4%
fma-define38.4%
add-sqr-sqrt38.4%
times-frac38.6%
fma-neg38.6%
fma-define38.6%
hypot-define38.6%
fma-define38.6%
hypot-define49.8%
associate-/l*51.2%
fma-define51.2%
add-sqr-sqrt51.2%
pow251.2%
Applied egg-rr51.2%
*-un-lft-identity51.2%
unpow251.2%
times-frac98.2%
hypot-undefine51.2%
+-commutative51.2%
hypot-define98.2%
hypot-undefine51.2%
+-commutative51.2%
hypot-define98.2%
Applied egg-rr98.2%
associate-*l/98.2%
*-un-lft-identity98.2%
Applied egg-rr98.2%
Taylor expanded in y.im around inf 95.6%
Final simplification95.0%
(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 62.0%
div-sub59.9%
*-commutative59.9%
fma-define59.9%
add-sqr-sqrt59.9%
times-frac64.1%
fma-neg64.1%
fma-define64.0%
hypot-define64.1%
fma-define64.1%
hypot-define77.6%
associate-/l*81.7%
fma-define81.7%
add-sqr-sqrt81.7%
pow281.7%
Applied egg-rr81.7%
*-un-lft-identity81.7%
unpow281.7%
times-frac97.0%
hypot-undefine81.7%
+-commutative81.7%
hypot-define97.0%
hypot-undefine81.7%
+-commutative81.7%
hypot-define97.0%
Applied egg-rr97.0%
associate-*l/97.0%
*-un-lft-identity97.0%
Applied egg-rr97.0%
Final simplification97.0%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (- (/ x.im y.re) (* x.re (/ y.im (pow y.re 2.0)))))
(t_1 (/ y.re (hypot y.re y.im)))
(t_2 (/ x.im (hypot y.re y.im))))
(if (<= y.im -2.8e-82)
(fma t_1 t_2 (* x.re (/ 1.0 (hypot y.im y.re))))
(if (<= y.im -4.8e-228)
t_0
(if (<= y.im 1.65e-193)
(/ (* x.im (/ y.re (hypot y.im y.re))) (hypot y.im y.re))
(if (<= y.im 0.0012)
t_0
(fma t_1 t_2 (* x.re (/ -1.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 = (x_46_im / y_46_re) - (x_46_re * (y_46_im / pow(y_46_re, 2.0)));
double t_1 = y_46_re / hypot(y_46_re, y_46_im);
double t_2 = x_46_im / hypot(y_46_re, y_46_im);
double tmp;
if (y_46_im <= -2.8e-82) {
tmp = fma(t_1, t_2, (x_46_re * (1.0 / hypot(y_46_im, y_46_re))));
} else if (y_46_im <= -4.8e-228) {
tmp = t_0;
} else if (y_46_im <= 1.65e-193) {
tmp = (x_46_im * (y_46_re / hypot(y_46_im, y_46_re))) / hypot(y_46_im, y_46_re);
} else if (y_46_im <= 0.0012) {
tmp = t_0;
} else {
tmp = fma(t_1, t_2, (x_46_re * (-1.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(Float64(x_46_im / y_46_re) - Float64(x_46_re * Float64(y_46_im / (y_46_re ^ 2.0)))) t_1 = Float64(y_46_re / hypot(y_46_re, y_46_im)) t_2 = Float64(x_46_im / hypot(y_46_re, y_46_im)) tmp = 0.0 if (y_46_im <= -2.8e-82) tmp = fma(t_1, t_2, Float64(x_46_re * Float64(1.0 / hypot(y_46_im, y_46_re)))); elseif (y_46_im <= -4.8e-228) tmp = t_0; elseif (y_46_im <= 1.65e-193) tmp = Float64(Float64(x_46_im * Float64(y_46_re / hypot(y_46_im, y_46_re))) / hypot(y_46_im, y_46_re)); elseif (y_46_im <= 0.0012) tmp = t_0; else tmp = fma(t_1, t_2, Float64(x_46_re * Float64(-1.0 / 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[(N[(x$46$im / y$46$re), $MachinePrecision] - N[(x$46$re * N[(y$46$im / N[Power[y$46$re, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(y$46$re / N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x$46$im / N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -2.8e-82], N[(t$95$1 * t$95$2 + N[(x$46$re * N[(1.0 / N[Sqrt[y$46$im ^ 2 + y$46$re ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, -4.8e-228], t$95$0, If[LessEqual[y$46$im, 1.65e-193], N[(N[(x$46$im * N[(y$46$re / 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], If[LessEqual[y$46$im, 0.0012], t$95$0, N[(t$95$1 * t$95$2 + N[(x$46$re * N[(-1.0 / N[Sqrt[y$46$im ^ 2 + y$46$re ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x.im}{y.re} - x.re \cdot \frac{y.im}{{y.re}^{2}}\\
t_1 := \frac{y.re}{\mathsf{hypot}\left(y.re, y.im\right)}\\
t_2 := \frac{x.im}{\mathsf{hypot}\left(y.re, y.im\right)}\\
\mathbf{if}\;y.im \leq -2.8 \cdot 10^{-82}:\\
\;\;\;\;\mathsf{fma}\left(t\_1, t\_2, x.re \cdot \frac{1}{\mathsf{hypot}\left(y.im, y.re\right)}\right)\\
\mathbf{elif}\;y.im \leq -4.8 \cdot 10^{-228}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y.im \leq 1.65 \cdot 10^{-193}:\\
\;\;\;\;\frac{x.im \cdot \frac{y.re}{\mathsf{hypot}\left(y.im, y.re\right)}}{\mathsf{hypot}\left(y.im, y.re\right)}\\
\mathbf{elif}\;y.im \leq 0.0012:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(t\_1, t\_2, x.re \cdot \frac{-1}{\mathsf{hypot}\left(y.im, y.re\right)}\right)\\
\end{array}
\end{array}
if y.im < -2.80000000000000024e-82Initial program 61.7%
div-sub61.7%
*-commutative61.7%
fma-define61.7%
add-sqr-sqrt61.7%
times-frac63.2%
fma-neg63.2%
fma-define63.2%
hypot-define63.2%
fma-define63.2%
hypot-define75.0%
associate-/l*80.8%
fma-define80.8%
add-sqr-sqrt80.8%
pow280.8%
Applied egg-rr80.8%
*-un-lft-identity80.8%
unpow280.8%
times-frac96.6%
hypot-undefine80.8%
+-commutative80.8%
hypot-define96.6%
hypot-undefine80.8%
+-commutative80.8%
hypot-define96.6%
Applied egg-rr96.6%
associate-*l/96.7%
*-un-lft-identity96.7%
Applied egg-rr96.7%
Taylor expanded in y.im around -inf 85.7%
if -2.80000000000000024e-82 < y.im < -4.80000000000000004e-228 or 1.6499999999999999e-193 < y.im < 0.00119999999999999989Initial program 70.5%
Taylor expanded in y.re around inf 85.8%
+-commutative85.8%
mul-1-neg85.8%
unsub-neg85.8%
associate-/l*85.8%
Simplified85.8%
if -4.80000000000000004e-228 < y.im < 1.6499999999999999e-193Initial program 60.8%
fma-define60.8%
Simplified60.8%
Taylor expanded in x.im around inf 51.9%
*-commutative51.9%
Simplified51.9%
fma-define51.9%
add-sqr-sqrt51.9%
hypot-undefine51.9%
hypot-undefine51.9%
frac-times86.5%
hypot-undefine59.4%
+-commutative59.4%
hypot-define86.5%
hypot-undefine59.4%
+-commutative59.4%
hypot-define86.5%
Applied egg-rr86.5%
associate-*r/88.8%
Applied egg-rr88.8%
if 0.00119999999999999989 < y.im Initial program 55.1%
div-sub55.1%
*-commutative55.1%
fma-define55.1%
add-sqr-sqrt55.1%
times-frac55.2%
fma-neg55.2%
fma-define55.2%
hypot-define55.2%
fma-define55.2%
hypot-define62.6%
associate-/l*72.3%
fma-define72.3%
add-sqr-sqrt72.3%
pow272.3%
Applied egg-rr72.3%
*-un-lft-identity72.3%
unpow272.3%
times-frac98.8%
hypot-undefine72.3%
+-commutative72.3%
hypot-define98.8%
hypot-undefine72.3%
+-commutative72.3%
hypot-define98.8%
Applied egg-rr98.8%
associate-*l/98.8%
*-un-lft-identity98.8%
Applied egg-rr98.8%
Taylor expanded in y.im around inf 90.6%
Final simplification87.5%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (/ y.re (hypot y.re y.im))) (t_1 (/ x.im (hypot y.re y.im))))
(if (<= y.im -5.5e-119)
(fma t_0 t_1 (* x.re (/ 1.0 (hypot y.im y.re))))
(if (<= y.im 0.046)
(fma t_0 t_1 (* x.re (/ (/ y.im y.re) (- (hypot y.im y.re)))))
(fma t_0 t_1 (* x.re (/ -1.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_re / hypot(y_46_re, y_46_im);
double t_1 = x_46_im / hypot(y_46_re, y_46_im);
double tmp;
if (y_46_im <= -5.5e-119) {
tmp = fma(t_0, t_1, (x_46_re * (1.0 / hypot(y_46_im, y_46_re))));
} else if (y_46_im <= 0.046) {
tmp = fma(t_0, t_1, (x_46_re * ((y_46_im / y_46_re) / -hypot(y_46_im, y_46_re))));
} else {
tmp = fma(t_0, t_1, (x_46_re * (-1.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_re / hypot(y_46_re, y_46_im)) t_1 = Float64(x_46_im / hypot(y_46_re, y_46_im)) tmp = 0.0 if (y_46_im <= -5.5e-119) tmp = fma(t_0, t_1, Float64(x_46_re * Float64(1.0 / hypot(y_46_im, y_46_re)))); elseif (y_46_im <= 0.046) tmp = fma(t_0, t_1, Float64(x_46_re * Float64(Float64(y_46_im / y_46_re) / Float64(-hypot(y_46_im, y_46_re))))); else tmp = fma(t_0, t_1, Float64(x_46_re * Float64(-1.0 / 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[(x$46$im / N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -5.5e-119], N[(t$95$0 * t$95$1 + N[(x$46$re * N[(1.0 / N[Sqrt[y$46$im ^ 2 + y$46$re ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 0.046], N[(t$95$0 * t$95$1 + N[(x$46$re * N[(N[(y$46$im / y$46$re), $MachinePrecision] / (-N[Sqrt[y$46$im ^ 2 + y$46$re ^ 2], $MachinePrecision])), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 * t$95$1 + N[(x$46$re * N[(-1.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.re}{\mathsf{hypot}\left(y.re, y.im\right)}\\
t_1 := \frac{x.im}{\mathsf{hypot}\left(y.re, y.im\right)}\\
\mathbf{if}\;y.im \leq -5.5 \cdot 10^{-119}:\\
\;\;\;\;\mathsf{fma}\left(t\_0, t\_1, x.re \cdot \frac{1}{\mathsf{hypot}\left(y.im, y.re\right)}\right)\\
\mathbf{elif}\;y.im \leq 0.046:\\
\;\;\;\;\mathsf{fma}\left(t\_0, t\_1, x.re \cdot \frac{\frac{y.im}{y.re}}{-\mathsf{hypot}\left(y.im, y.re\right)}\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(t\_0, t\_1, x.re \cdot \frac{-1}{\mathsf{hypot}\left(y.im, y.re\right)}\right)\\
\end{array}
\end{array}
if y.im < -5.49999999999999959e-119Initial program 62.6%
div-sub62.6%
*-commutative62.6%
fma-define62.6%
add-sqr-sqrt62.6%
times-frac64.1%
fma-neg64.1%
fma-define64.1%
hypot-define64.1%
fma-define64.1%
hypot-define76.3%
associate-/l*81.8%
fma-define81.8%
add-sqr-sqrt81.8%
pow281.8%
Applied egg-rr81.8%
*-un-lft-identity81.8%
unpow281.8%
times-frac96.8%
hypot-undefine81.8%
+-commutative81.8%
hypot-define96.8%
hypot-undefine81.8%
+-commutative81.8%
hypot-define96.8%
Applied egg-rr96.8%
associate-*l/96.9%
*-un-lft-identity96.9%
Applied egg-rr96.9%
Taylor expanded in y.im around -inf 84.5%
if -5.49999999999999959e-119 < y.im < 0.045999999999999999Initial program 65.8%
div-sub60.4%
*-commutative60.4%
fma-define60.4%
add-sqr-sqrt60.3%
times-frac69.8%
fma-neg69.8%
fma-define69.8%
hypot-define69.8%
fma-define69.8%
hypot-define88.7%
associate-/l*87.9%
fma-define87.9%
add-sqr-sqrt87.9%
pow287.9%
Applied egg-rr87.9%
*-un-lft-identity87.9%
unpow287.9%
times-frac96.0%
hypot-undefine87.9%
+-commutative87.9%
hypot-define96.0%
hypot-undefine87.9%
+-commutative87.9%
hypot-define96.0%
Applied egg-rr96.0%
associate-*l/96.0%
*-un-lft-identity96.0%
Applied egg-rr96.0%
Taylor expanded in y.im around 0 87.8%
if 0.045999999999999999 < y.im Initial program 55.1%
div-sub55.1%
*-commutative55.1%
fma-define55.1%
add-sqr-sqrt55.1%
times-frac55.2%
fma-neg55.2%
fma-define55.2%
hypot-define55.2%
fma-define55.2%
hypot-define62.6%
associate-/l*72.3%
fma-define72.3%
add-sqr-sqrt72.3%
pow272.3%
Applied egg-rr72.3%
*-un-lft-identity72.3%
unpow272.3%
times-frac98.8%
hypot-undefine72.3%
+-commutative72.3%
hypot-define98.8%
hypot-undefine72.3%
+-commutative72.3%
hypot-define98.8%
Applied egg-rr98.8%
associate-*l/98.8%
*-un-lft-identity98.8%
Applied egg-rr98.8%
Taylor expanded in y.im around inf 90.6%
Final simplification87.3%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (/ y.re (hypot y.re y.im))) (t_1 (/ x.im (hypot y.re y.im))))
(if (<= y.im -2.7e-232)
(fma t_0 t_1 (* x.re (* (/ y.im (hypot y.im y.re)) (/ 1.0 y.im))))
(if (<= y.im 0.0018)
(fma t_0 t_1 (* x.re (/ (/ y.im y.re) (- (hypot y.im y.re)))))
(fma t_0 t_1 (* x.re (/ -1.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_re / hypot(y_46_re, y_46_im);
double t_1 = x_46_im / hypot(y_46_re, y_46_im);
double tmp;
if (y_46_im <= -2.7e-232) {
tmp = fma(t_0, t_1, (x_46_re * ((y_46_im / hypot(y_46_im, y_46_re)) * (1.0 / y_46_im))));
} else if (y_46_im <= 0.0018) {
tmp = fma(t_0, t_1, (x_46_re * ((y_46_im / y_46_re) / -hypot(y_46_im, y_46_re))));
} else {
tmp = fma(t_0, t_1, (x_46_re * (-1.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_re / hypot(y_46_re, y_46_im)) t_1 = Float64(x_46_im / hypot(y_46_re, y_46_im)) tmp = 0.0 if (y_46_im <= -2.7e-232) tmp = fma(t_0, t_1, Float64(x_46_re * Float64(Float64(y_46_im / hypot(y_46_im, y_46_re)) * Float64(1.0 / y_46_im)))); elseif (y_46_im <= 0.0018) tmp = fma(t_0, t_1, Float64(x_46_re * Float64(Float64(y_46_im / y_46_re) / Float64(-hypot(y_46_im, y_46_re))))); else tmp = fma(t_0, t_1, Float64(x_46_re * Float64(-1.0 / 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[(x$46$im / N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -2.7e-232], N[(t$95$0 * t$95$1 + N[(x$46$re * N[(N[(y$46$im / N[Sqrt[y$46$im ^ 2 + y$46$re ^ 2], $MachinePrecision]), $MachinePrecision] * N[(1.0 / y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 0.0018], N[(t$95$0 * t$95$1 + N[(x$46$re * N[(N[(y$46$im / y$46$re), $MachinePrecision] / (-N[Sqrt[y$46$im ^ 2 + y$46$re ^ 2], $MachinePrecision])), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 * t$95$1 + N[(x$46$re * N[(-1.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.re}{\mathsf{hypot}\left(y.re, y.im\right)}\\
t_1 := \frac{x.im}{\mathsf{hypot}\left(y.re, y.im\right)}\\
\mathbf{if}\;y.im \leq -2.7 \cdot 10^{-232}:\\
\;\;\;\;\mathsf{fma}\left(t\_0, t\_1, x.re \cdot \left(\frac{y.im}{\mathsf{hypot}\left(y.im, y.re\right)} \cdot \frac{1}{y.im}\right)\right)\\
\mathbf{elif}\;y.im \leq 0.0018:\\
\;\;\;\;\mathsf{fma}\left(t\_0, t\_1, x.re \cdot \frac{\frac{y.im}{y.re}}{-\mathsf{hypot}\left(y.im, y.re\right)}\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(t\_0, t\_1, x.re \cdot \frac{-1}{\mathsf{hypot}\left(y.im, y.re\right)}\right)\\
\end{array}
\end{array}
if y.im < -2.6999999999999999e-232Initial program 64.8%
div-sub63.2%
*-commutative63.2%
fma-define63.3%
add-sqr-sqrt63.2%
times-frac67.5%
fma-neg67.5%
fma-define67.5%
hypot-define67.5%
fma-define67.5%
hypot-define80.2%
associate-/l*84.3%
fma-define84.3%
add-sqr-sqrt84.3%
pow284.3%
Applied egg-rr84.3%
*-un-lft-identity84.3%
unpow284.3%
times-frac97.6%
hypot-undefine84.3%
+-commutative84.3%
hypot-define97.6%
hypot-undefine84.3%
+-commutative84.3%
hypot-define97.6%
Applied egg-rr97.6%
Taylor expanded in y.im around -inf 85.5%
if -2.6999999999999999e-232 < y.im < 0.0018Initial program 63.0%
div-sub57.9%
*-commutative57.9%
fma-define57.9%
add-sqr-sqrt57.9%
times-frac66.0%
fma-neg66.0%
fma-define66.0%
hypot-define66.0%
fma-define66.0%
hypot-define87.3%
associate-/l*86.0%
fma-define86.0%
add-sqr-sqrt86.0%
pow286.0%
Applied egg-rr86.0%
*-un-lft-identity86.0%
unpow286.0%
times-frac93.9%
hypot-undefine86.0%
+-commutative86.0%
hypot-define93.9%
hypot-undefine86.0%
+-commutative86.0%
hypot-define93.9%
Applied egg-rr93.9%
associate-*l/93.9%
*-un-lft-identity93.9%
Applied egg-rr93.9%
Taylor expanded in y.im around 0 89.0%
if 0.0018 < y.im Initial program 55.1%
div-sub55.1%
*-commutative55.1%
fma-define55.1%
add-sqr-sqrt55.1%
times-frac55.2%
fma-neg55.2%
fma-define55.2%
hypot-define55.2%
fma-define55.2%
hypot-define62.6%
associate-/l*72.3%
fma-define72.3%
add-sqr-sqrt72.3%
pow272.3%
Applied egg-rr72.3%
*-un-lft-identity72.3%
unpow272.3%
times-frac98.8%
hypot-undefine72.3%
+-commutative72.3%
hypot-define98.8%
hypot-undefine72.3%
+-commutative72.3%
hypot-define98.8%
Applied egg-rr98.8%
associate-*l/98.8%
*-un-lft-identity98.8%
Applied egg-rr98.8%
Taylor expanded in y.im around inf 90.6%
Final simplification87.6%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (- (/ x.im y.re) (* x.re (/ y.im (pow y.re 2.0)))))
(t_1 (/ y.re (hypot y.re y.im)))
(t_2 (/ x.im (hypot y.re y.im))))
(if (<= y.im -5.5e-85)
(fma t_1 t_2 (* x.re (/ 1.0 (hypot y.im y.re))))
(if (<= y.im -1.05e-227)
t_0
(if (<= y.im 8.5e-198)
(/ (* x.im (/ y.re (hypot y.im y.re))) (hypot y.im y.re))
(if (<= y.im 4.5e-20)
t_0
(if (<= y.im 1.65e+79)
(/
(- (* y.re x.im) (* y.im x.re))
(+ (* y.re y.re) (* y.im y.im)))
(fma t_1 t_2 (* x.re (/ -1.0 y.im))))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = (x_46_im / y_46_re) - (x_46_re * (y_46_im / pow(y_46_re, 2.0)));
double t_1 = y_46_re / hypot(y_46_re, y_46_im);
double t_2 = x_46_im / hypot(y_46_re, y_46_im);
double tmp;
if (y_46_im <= -5.5e-85) {
tmp = fma(t_1, t_2, (x_46_re * (1.0 / hypot(y_46_im, y_46_re))));
} else if (y_46_im <= -1.05e-227) {
tmp = t_0;
} else if (y_46_im <= 8.5e-198) {
tmp = (x_46_im * (y_46_re / hypot(y_46_im, y_46_re))) / hypot(y_46_im, y_46_re);
} else if (y_46_im <= 4.5e-20) {
tmp = t_0;
} else if (y_46_im <= 1.65e+79) {
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 {
tmp = fma(t_1, t_2, (x_46_re * (-1.0 / y_46_im)));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(Float64(x_46_im / y_46_re) - Float64(x_46_re * Float64(y_46_im / (y_46_re ^ 2.0)))) t_1 = Float64(y_46_re / hypot(y_46_re, y_46_im)) t_2 = Float64(x_46_im / hypot(y_46_re, y_46_im)) tmp = 0.0 if (y_46_im <= -5.5e-85) tmp = fma(t_1, t_2, Float64(x_46_re * Float64(1.0 / hypot(y_46_im, y_46_re)))); elseif (y_46_im <= -1.05e-227) tmp = t_0; elseif (y_46_im <= 8.5e-198) tmp = Float64(Float64(x_46_im * Float64(y_46_re / hypot(y_46_im, y_46_re))) / hypot(y_46_im, y_46_re)); elseif (y_46_im <= 4.5e-20) tmp = t_0; elseif (y_46_im <= 1.65e+79) 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))); else tmp = fma(t_1, t_2, Float64(x_46_re * Float64(-1.0 / y_46_im))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[(x$46$im / y$46$re), $MachinePrecision] - N[(x$46$re * N[(y$46$im / N[Power[y$46$re, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(y$46$re / N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x$46$im / N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -5.5e-85], N[(t$95$1 * t$95$2 + N[(x$46$re * N[(1.0 / N[Sqrt[y$46$im ^ 2 + y$46$re ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, -1.05e-227], t$95$0, If[LessEqual[y$46$im, 8.5e-198], N[(N[(x$46$im * N[(y$46$re / 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], If[LessEqual[y$46$im, 4.5e-20], t$95$0, If[LessEqual[y$46$im, 1.65e+79], 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], N[(t$95$1 * t$95$2 + N[(x$46$re * N[(-1.0 / y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x.im}{y.re} - x.re \cdot \frac{y.im}{{y.re}^{2}}\\
t_1 := \frac{y.re}{\mathsf{hypot}\left(y.re, y.im\right)}\\
t_2 := \frac{x.im}{\mathsf{hypot}\left(y.re, y.im\right)}\\
\mathbf{if}\;y.im \leq -5.5 \cdot 10^{-85}:\\
\;\;\;\;\mathsf{fma}\left(t\_1, t\_2, x.re \cdot \frac{1}{\mathsf{hypot}\left(y.im, y.re\right)}\right)\\
\mathbf{elif}\;y.im \leq -1.05 \cdot 10^{-227}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y.im \leq 8.5 \cdot 10^{-198}:\\
\;\;\;\;\frac{x.im \cdot \frac{y.re}{\mathsf{hypot}\left(y.im, y.re\right)}}{\mathsf{hypot}\left(y.im, y.re\right)}\\
\mathbf{elif}\;y.im \leq 4.5 \cdot 10^{-20}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y.im \leq 1.65 \cdot 10^{+79}:\\
\;\;\;\;\frac{y.re \cdot x.im - y.im \cdot x.re}{y.re \cdot y.re + y.im \cdot y.im}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(t\_1, t\_2, x.re \cdot \frac{-1}{y.im}\right)\\
\end{array}
\end{array}
if y.im < -5.4999999999999997e-85Initial program 61.7%
div-sub61.7%
*-commutative61.7%
fma-define61.7%
add-sqr-sqrt61.7%
times-frac63.2%
fma-neg63.2%
fma-define63.2%
hypot-define63.2%
fma-define63.2%
hypot-define75.0%
associate-/l*80.8%
fma-define80.8%
add-sqr-sqrt80.8%
pow280.8%
Applied egg-rr80.8%
*-un-lft-identity80.8%
unpow280.8%
times-frac96.6%
hypot-undefine80.8%
+-commutative80.8%
hypot-define96.6%
hypot-undefine80.8%
+-commutative80.8%
hypot-define96.6%
Applied egg-rr96.6%
associate-*l/96.7%
*-un-lft-identity96.7%
Applied egg-rr96.7%
Taylor expanded in y.im around -inf 85.7%
if -5.4999999999999997e-85 < y.im < -1.05e-227 or 8.4999999999999994e-198 < y.im < 4.5000000000000001e-20Initial program 67.2%
Taylor expanded in y.re around inf 87.8%
+-commutative87.8%
mul-1-neg87.8%
unsub-neg87.8%
associate-/l*87.8%
Simplified87.8%
if -1.05e-227 < y.im < 8.4999999999999994e-198Initial program 60.8%
fma-define60.8%
Simplified60.8%
Taylor expanded in x.im around inf 51.9%
*-commutative51.9%
Simplified51.9%
fma-define51.9%
add-sqr-sqrt51.9%
hypot-undefine51.9%
hypot-undefine51.9%
frac-times86.5%
hypot-undefine59.4%
+-commutative59.4%
hypot-define86.5%
hypot-undefine59.4%
+-commutative59.4%
hypot-define86.5%
Applied egg-rr86.5%
associate-*r/88.8%
Applied egg-rr88.8%
if 4.5000000000000001e-20 < y.im < 1.6500000000000001e79Initial program 99.5%
if 1.6500000000000001e79 < y.im Initial program 43.8%
div-sub43.8%
*-commutative43.8%
fma-define43.8%
add-sqr-sqrt43.8%
times-frac43.9%
fma-neg43.9%
fma-define43.9%
hypot-define43.9%
fma-define43.9%
hypot-define53.2%
associate-/l*65.4%
fma-define65.4%
add-sqr-sqrt65.4%
pow265.4%
Applied egg-rr65.4%
Taylor expanded in y.im around inf 88.5%
Final simplification88.3%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0
(fma
(/ y.re (hypot y.re y.im))
(/ x.im (hypot y.re y.im))
(* x.re (/ -1.0 y.im)))))
(if (<= y.im -120.0)
t_0
(if (<= y.im 1.55e-19)
(- (/ x.im y.re) (* x.re (/ y.im (pow y.re 2.0))))
(if (<= y.im 1.05e+77)
(/ (- (* y.re x.im) (* y.im x.re)) (+ (* 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 = fma((y_46_re / hypot(y_46_re, y_46_im)), (x_46_im / hypot(y_46_re, y_46_im)), (x_46_re * (-1.0 / y_46_im)));
double tmp;
if (y_46_im <= -120.0) {
tmp = t_0;
} else if (y_46_im <= 1.55e-19) {
tmp = (x_46_im / y_46_re) - (x_46_re * (y_46_im / pow(y_46_re, 2.0)));
} else if (y_46_im <= 1.05e+77) {
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 {
tmp = t_0;
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = fma(Float64(y_46_re / hypot(y_46_re, y_46_im)), Float64(x_46_im / hypot(y_46_re, y_46_im)), Float64(x_46_re * Float64(-1.0 / y_46_im))) tmp = 0.0 if (y_46_im <= -120.0) tmp = t_0; elseif (y_46_im <= 1.55e-19) tmp = Float64(Float64(x_46_im / y_46_re) - Float64(x_46_re * Float64(y_46_im / (y_46_re ^ 2.0)))); elseif (y_46_im <= 1.05e+77) 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))); 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[(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[(-1.0 / y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -120.0], t$95$0, If[LessEqual[y$46$im, 1.55e-19], N[(N[(x$46$im / y$46$re), $MachinePrecision] - N[(x$46$re * N[(y$46$im / N[Power[y$46$re, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 1.05e+77], 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], t$95$0]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \mathsf{fma}\left(\frac{y.re}{\mathsf{hypot}\left(y.re, y.im\right)}, \frac{x.im}{\mathsf{hypot}\left(y.re, y.im\right)}, x.re \cdot \frac{-1}{y.im}\right)\\
\mathbf{if}\;y.im \leq -120:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y.im \leq 1.55 \cdot 10^{-19}:\\
\;\;\;\;\frac{x.im}{y.re} - x.re \cdot \frac{y.im}{{y.re}^{2}}\\
\mathbf{elif}\;y.im \leq 1.05 \cdot 10^{+77}:\\
\;\;\;\;\frac{y.re \cdot x.im - y.im \cdot x.re}{y.re \cdot y.re + y.im \cdot y.im}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if y.im < -120 or 1.0499999999999999e77 < y.im Initial program 51.9%
div-sub51.9%
*-commutative51.9%
fma-define51.9%
add-sqr-sqrt51.9%
times-frac52.9%
fma-neg52.9%
fma-define52.9%
hypot-define52.9%
fma-define52.9%
hypot-define62.4%
associate-/l*71.9%
fma-define71.9%
add-sqr-sqrt71.9%
pow271.9%
Applied egg-rr71.9%
Taylor expanded in y.im around inf 87.5%
if -120 < y.im < 1.5499999999999999e-19Initial program 66.3%
Taylor expanded in y.re around inf 80.5%
+-commutative80.5%
mul-1-neg80.5%
unsub-neg80.5%
associate-/l*79.9%
Simplified79.9%
if 1.5499999999999999e-19 < y.im < 1.0499999999999999e77Initial program 99.5%
Final simplification84.9%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (- (* y.re (* (/ 1.0 y.im) (/ x.im y.im))) (/ x.re y.im))))
(if (<= y.im -2.2e+65)
t_0
(if (<= y.im -2.1e-53)
(* (pow (hypot y.im y.re) -2.0) (fma x.re (- y.im) (* y.re x.im)))
(if (<= y.im 5.4e-20)
(- (/ x.im y.re) (* x.re (/ y.im (pow y.re 2.0))))
(if (<= y.im 3e+74)
(/ (- (* y.re x.im) (* y.im x.re)) (+ (* 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 * ((1.0 / y_46_im) * (x_46_im / y_46_im))) - (x_46_re / y_46_im);
double tmp;
if (y_46_im <= -2.2e+65) {
tmp = t_0;
} else if (y_46_im <= -2.1e-53) {
tmp = pow(hypot(y_46_im, y_46_re), -2.0) * fma(x_46_re, -y_46_im, (y_46_re * x_46_im));
} else if (y_46_im <= 5.4e-20) {
tmp = (x_46_im / y_46_re) - (x_46_re * (y_46_im / pow(y_46_re, 2.0)));
} else if (y_46_im <= 3e+74) {
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 {
tmp = t_0;
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(Float64(y_46_re * Float64(Float64(1.0 / y_46_im) * Float64(x_46_im / y_46_im))) - Float64(x_46_re / y_46_im)) tmp = 0.0 if (y_46_im <= -2.2e+65) tmp = t_0; elseif (y_46_im <= -2.1e-53) tmp = Float64((hypot(y_46_im, y_46_re) ^ -2.0) * fma(x_46_re, Float64(-y_46_im), Float64(y_46_re * x_46_im))); elseif (y_46_im <= 5.4e-20) tmp = Float64(Float64(x_46_im / y_46_re) - Float64(x_46_re * Float64(y_46_im / (y_46_re ^ 2.0)))); elseif (y_46_im <= 3e+74) 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))); 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[(y$46$re * N[(N[(1.0 / y$46$im), $MachinePrecision] * N[(x$46$im / y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x$46$re / y$46$im), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -2.2e+65], t$95$0, If[LessEqual[y$46$im, -2.1e-53], N[(N[Power[N[Sqrt[y$46$im ^ 2 + y$46$re ^ 2], $MachinePrecision], -2.0], $MachinePrecision] * N[(x$46$re * (-y$46$im) + N[(y$46$re * x$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 5.4e-20], N[(N[(x$46$im / y$46$re), $MachinePrecision] - N[(x$46$re * N[(y$46$im / N[Power[y$46$re, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 3e+74], 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], t$95$0]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot \left(\frac{1}{y.im} \cdot \frac{x.im}{y.im}\right) - \frac{x.re}{y.im}\\
\mathbf{if}\;y.im \leq -2.2 \cdot 10^{+65}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y.im \leq -2.1 \cdot 10^{-53}:\\
\;\;\;\;{\left(\mathsf{hypot}\left(y.im, y.re\right)\right)}^{-2} \cdot \mathsf{fma}\left(x.re, -y.im, y.re \cdot x.im\right)\\
\mathbf{elif}\;y.im \leq 5.4 \cdot 10^{-20}:\\
\;\;\;\;\frac{x.im}{y.re} - x.re \cdot \frac{y.im}{{y.re}^{2}}\\
\mathbf{elif}\;y.im \leq 3 \cdot 10^{+74}:\\
\;\;\;\;\frac{y.re \cdot x.im - y.im \cdot x.re}{y.re \cdot y.re + y.im \cdot y.im}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if y.im < -2.1999999999999998e65 or 3e74 < y.im Initial program 48.3%
Taylor expanded in y.re around 0 77.8%
+-commutative77.8%
mul-1-neg77.8%
unsub-neg77.8%
*-commutative77.8%
associate-/l*82.0%
Simplified82.0%
*-un-lft-identity82.0%
unpow282.0%
times-frac85.3%
Applied egg-rr85.3%
if -2.1999999999999998e65 < y.im < -2.09999999999999977e-53Initial program 77.7%
div-sub77.7%
*-commutative77.7%
fma-define77.7%
add-sqr-sqrt77.7%
times-frac75.3%
fma-neg75.3%
fma-define75.2%
hypot-define75.3%
fma-define75.3%
hypot-define90.7%
associate-/l*93.9%
fma-define93.9%
add-sqr-sqrt93.9%
pow293.9%
Applied egg-rr93.9%
fma-undefine93.9%
frac-times77.8%
hypot-undefine77.7%
hypot-undefine77.7%
add-sqr-sqrt77.7%
fma-define77.8%
fma-define77.7%
sub-neg77.7%
add-sqr-sqrt77.7%
hypot-undefine77.7%
hypot-undefine77.8%
unpow277.8%
*-commutative77.8%
associate-*r/77.7%
Applied egg-rr46.0%
*-commutative46.0%
distribute-lft-out--46.0%
Simplified46.0%
*-un-lft-identity46.0%
metadata-eval46.0%
pow-prod-up45.8%
times-frac49.1%
metadata-eval49.1%
unpow249.1%
frac-times49.0%
inv-pow49.0%
inv-pow49.0%
pow-prod-up49.1%
metadata-eval49.1%
*-commutative49.1%
Applied egg-rr49.1%
*-commutative49.1%
*-lft-identity49.1%
times-frac67.5%
/-rgt-identity67.5%
*-inverses77.8%
*-rgt-identity77.8%
sub-neg77.8%
+-commutative77.8%
distribute-rgt-neg-in77.8%
fma-define77.8%
Simplified77.8%
if -2.09999999999999977e-53 < y.im < 5.3999999999999999e-20Initial program 64.3%
Taylor expanded in y.re around inf 83.2%
+-commutative83.2%
mul-1-neg83.2%
unsub-neg83.2%
associate-/l*82.4%
Simplified82.4%
if 5.3999999999999999e-20 < y.im < 3e74Initial program 99.5%
Final simplification84.2%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0
(/ (- (* y.re x.im) (* y.im x.re)) (+ (* y.re y.re) (* y.im y.im))))
(t_1 (- (* y.re (* (/ 1.0 y.im) (/ x.im y.im))) (/ x.re y.im))))
(if (<= y.im -2.4e+65)
t_1
(if (<= y.im -1.15e-49)
t_0
(if (<= y.im 4.1e-20)
(- (/ x.im y.re) (* x.re (/ y.im (pow y.re 2.0))))
(if (<= y.im 4.4e+76) t_0 t_1))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = ((y_46_re * x_46_im) - (y_46_im * x_46_re)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im));
double t_1 = (y_46_re * ((1.0 / y_46_im) * (x_46_im / y_46_im))) - (x_46_re / y_46_im);
double tmp;
if (y_46_im <= -2.4e+65) {
tmp = t_1;
} else if (y_46_im <= -1.15e-49) {
tmp = t_0;
} else if (y_46_im <= 4.1e-20) {
tmp = (x_46_im / y_46_re) - (x_46_re * (y_46_im / pow(y_46_re, 2.0)));
} else if (y_46_im <= 4.4e+76) {
tmp = t_0;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = ((y_46re * x_46im) - (y_46im * x_46re)) / ((y_46re * y_46re) + (y_46im * y_46im))
t_1 = (y_46re * ((1.0d0 / y_46im) * (x_46im / y_46im))) - (x_46re / y_46im)
if (y_46im <= (-2.4d+65)) then
tmp = t_1
else if (y_46im <= (-1.15d-49)) then
tmp = t_0
else if (y_46im <= 4.1d-20) then
tmp = (x_46im / y_46re) - (x_46re * (y_46im / (y_46re ** 2.0d0)))
else if (y_46im <= 4.4d+76) then
tmp = t_0
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = ((y_46_re * x_46_im) - (y_46_im * x_46_re)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im));
double t_1 = (y_46_re * ((1.0 / y_46_im) * (x_46_im / y_46_im))) - (x_46_re / y_46_im);
double tmp;
if (y_46_im <= -2.4e+65) {
tmp = t_1;
} else if (y_46_im <= -1.15e-49) {
tmp = t_0;
} else if (y_46_im <= 4.1e-20) {
tmp = (x_46_im / y_46_re) - (x_46_re * (y_46_im / Math.pow(y_46_re, 2.0)));
} else if (y_46_im <= 4.4e+76) {
tmp = t_0;
} else {
tmp = t_1;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = ((y_46_re * x_46_im) - (y_46_im * x_46_re)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im)) t_1 = (y_46_re * ((1.0 / y_46_im) * (x_46_im / y_46_im))) - (x_46_re / y_46_im) tmp = 0 if y_46_im <= -2.4e+65: tmp = t_1 elif y_46_im <= -1.15e-49: tmp = t_0 elif y_46_im <= 4.1e-20: tmp = (x_46_im / y_46_re) - (x_46_re * (y_46_im / math.pow(y_46_re, 2.0))) elif y_46_im <= 4.4e+76: tmp = t_0 else: tmp = t_1 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(Float64(Float64(y_46_re * x_46_im) - Float64(y_46_im * x_46_re)) / Float64(Float64(y_46_re * y_46_re) + Float64(y_46_im * y_46_im))) t_1 = Float64(Float64(y_46_re * Float64(Float64(1.0 / y_46_im) * Float64(x_46_im / y_46_im))) - Float64(x_46_re / y_46_im)) tmp = 0.0 if (y_46_im <= -2.4e+65) tmp = t_1; elseif (y_46_im <= -1.15e-49) tmp = t_0; elseif (y_46_im <= 4.1e-20) tmp = Float64(Float64(x_46_im / y_46_re) - Float64(x_46_re * Float64(y_46_im / (y_46_re ^ 2.0)))); elseif (y_46_im <= 4.4e+76) tmp = t_0; else tmp = t_1; end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = ((y_46_re * x_46_im) - (y_46_im * x_46_re)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im)); t_1 = (y_46_re * ((1.0 / y_46_im) * (x_46_im / y_46_im))) - (x_46_re / y_46_im); tmp = 0.0; if (y_46_im <= -2.4e+65) tmp = t_1; elseif (y_46_im <= -1.15e-49) tmp = t_0; elseif (y_46_im <= 4.1e-20) tmp = (x_46_im / y_46_re) - (x_46_re * (y_46_im / (y_46_re ^ 2.0))); elseif (y_46_im <= 4.4e+76) tmp = t_0; else tmp = t_1; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[(N[(y$46$re * x$46$im), $MachinePrecision] - N[(y$46$im * x$46$re), $MachinePrecision]), $MachinePrecision] / N[(N[(y$46$re * y$46$re), $MachinePrecision] + N[(y$46$im * y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(y$46$re * N[(N[(1.0 / y$46$im), $MachinePrecision] * N[(x$46$im / y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x$46$re / y$46$im), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -2.4e+65], t$95$1, If[LessEqual[y$46$im, -1.15e-49], t$95$0, If[LessEqual[y$46$im, 4.1e-20], N[(N[(x$46$im / y$46$re), $MachinePrecision] - N[(x$46$re * N[(y$46$im / N[Power[y$46$re, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 4.4e+76], t$95$0, t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{y.re \cdot x.im - y.im \cdot x.re}{y.re \cdot y.re + y.im \cdot y.im}\\
t_1 := y.re \cdot \left(\frac{1}{y.im} \cdot \frac{x.im}{y.im}\right) - \frac{x.re}{y.im}\\
\mathbf{if}\;y.im \leq -2.4 \cdot 10^{+65}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y.im \leq -1.15 \cdot 10^{-49}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y.im \leq 4.1 \cdot 10^{-20}:\\
\;\;\;\;\frac{x.im}{y.re} - x.re \cdot \frac{y.im}{{y.re}^{2}}\\
\mathbf{elif}\;y.im \leq 4.4 \cdot 10^{+76}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y.im < -2.4000000000000002e65 or 4.4000000000000001e76 < y.im Initial program 48.3%
Taylor expanded in y.re around 0 77.8%
+-commutative77.8%
mul-1-neg77.8%
unsub-neg77.8%
*-commutative77.8%
associate-/l*82.0%
Simplified82.0%
*-un-lft-identity82.0%
unpow282.0%
times-frac85.3%
Applied egg-rr85.3%
if -2.4000000000000002e65 < y.im < -1.15e-49 or 4.1000000000000001e-20 < y.im < 4.4000000000000001e76Initial program 85.7%
if -1.15e-49 < y.im < 4.1000000000000001e-20Initial program 64.3%
Taylor expanded in y.re around inf 83.2%
+-commutative83.2%
mul-1-neg83.2%
unsub-neg83.2%
associate-/l*82.4%
Simplified82.4%
Final simplification84.2%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (- (* y.re x.im) (* y.im x.re)))
(t_1 (- (* y.re (* (/ 1.0 y.im) (/ x.im y.im))) (/ x.re y.im))))
(if (<= y.im -1.05e+65)
t_1
(if (<= y.im -7.8e-52)
(/ t_0 (fma y.re y.re (* y.im y.im)))
(if (<= y.im 9.6e-20)
(- (/ x.im y.re) (* x.re (/ y.im (pow y.re 2.0))))
(if (<= y.im 7.6e+75)
(/ t_0 (+ (* y.re y.re) (* y.im y.im)))
t_1))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = (y_46_re * x_46_im) - (y_46_im * x_46_re);
double t_1 = (y_46_re * ((1.0 / y_46_im) * (x_46_im / y_46_im))) - (x_46_re / y_46_im);
double tmp;
if (y_46_im <= -1.05e+65) {
tmp = t_1;
} else if (y_46_im <= -7.8e-52) {
tmp = t_0 / fma(y_46_re, y_46_re, (y_46_im * y_46_im));
} else if (y_46_im <= 9.6e-20) {
tmp = (x_46_im / y_46_re) - (x_46_re * (y_46_im / pow(y_46_re, 2.0)));
} else if (y_46_im <= 7.6e+75) {
tmp = t_0 / ((y_46_re * y_46_re) + (y_46_im * y_46_im));
} else {
tmp = t_1;
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(Float64(y_46_re * x_46_im) - Float64(y_46_im * x_46_re)) t_1 = Float64(Float64(y_46_re * Float64(Float64(1.0 / y_46_im) * Float64(x_46_im / y_46_im))) - Float64(x_46_re / y_46_im)) tmp = 0.0 if (y_46_im <= -1.05e+65) tmp = t_1; elseif (y_46_im <= -7.8e-52) tmp = Float64(t_0 / fma(y_46_re, y_46_re, Float64(y_46_im * y_46_im))); elseif (y_46_im <= 9.6e-20) tmp = Float64(Float64(x_46_im / y_46_re) - Float64(x_46_re * Float64(y_46_im / (y_46_re ^ 2.0)))); elseif (y_46_im <= 7.6e+75) tmp = Float64(t_0 / Float64(Float64(y_46_re * y_46_re) + Float64(y_46_im * y_46_im))); else tmp = t_1; end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[(y$46$re * x$46$im), $MachinePrecision] - N[(y$46$im * x$46$re), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(y$46$re * N[(N[(1.0 / y$46$im), $MachinePrecision] * N[(x$46$im / y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x$46$re / y$46$im), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -1.05e+65], t$95$1, If[LessEqual[y$46$im, -7.8e-52], N[(t$95$0 / N[(y$46$re * y$46$re + N[(y$46$im * y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 9.6e-20], N[(N[(x$46$im / y$46$re), $MachinePrecision] - N[(x$46$re * N[(y$46$im / N[Power[y$46$re, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 7.6e+75], N[(t$95$0 / N[(N[(y$46$re * y$46$re), $MachinePrecision] + N[(y$46$im * y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot x.im - y.im \cdot x.re\\
t_1 := y.re \cdot \left(\frac{1}{y.im} \cdot \frac{x.im}{y.im}\right) - \frac{x.re}{y.im}\\
\mathbf{if}\;y.im \leq -1.05 \cdot 10^{+65}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y.im \leq -7.8 \cdot 10^{-52}:\\
\;\;\;\;\frac{t\_0}{\mathsf{fma}\left(y.re, y.re, y.im \cdot y.im\right)}\\
\mathbf{elif}\;y.im \leq 9.6 \cdot 10^{-20}:\\
\;\;\;\;\frac{x.im}{y.re} - x.re \cdot \frac{y.im}{{y.re}^{2}}\\
\mathbf{elif}\;y.im \leq 7.6 \cdot 10^{+75}:\\
\;\;\;\;\frac{t\_0}{y.re \cdot y.re + y.im \cdot y.im}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y.im < -1.04999999999999996e65 or 7.6000000000000005e75 < y.im Initial program 48.3%
Taylor expanded in y.re around 0 77.8%
+-commutative77.8%
mul-1-neg77.8%
unsub-neg77.8%
*-commutative77.8%
associate-/l*82.0%
Simplified82.0%
*-un-lft-identity82.0%
unpow282.0%
times-frac85.3%
Applied egg-rr85.3%
if -1.04999999999999996e65 < y.im < -7.80000000000000036e-52Initial program 77.7%
fma-define77.7%
Simplified77.7%
if -7.80000000000000036e-52 < y.im < 9.59999999999999971e-20Initial program 64.3%
Taylor expanded in y.re around inf 83.2%
+-commutative83.2%
mul-1-neg83.2%
unsub-neg83.2%
associate-/l*82.4%
Simplified82.4%
if 9.59999999999999971e-20 < y.im < 7.6000000000000005e75Initial program 99.5%
Final simplification84.2%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0
(/ (- (* y.re x.im) (* y.im x.re)) (+ (* y.re y.re) (* y.im y.im))))
(t_1 (- (* y.re (* (/ 1.0 y.im) (/ x.im y.im))) (/ x.re y.im))))
(if (<= y.im -2.05e+65)
t_1
(if (<= y.im -5e-192)
t_0
(if (<= y.im 5.3e-108) (/ x.im y.re) (if (<= y.im 8.6e+75) t_0 t_1))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = ((y_46_re * x_46_im) - (y_46_im * x_46_re)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im));
double t_1 = (y_46_re * ((1.0 / y_46_im) * (x_46_im / y_46_im))) - (x_46_re / y_46_im);
double tmp;
if (y_46_im <= -2.05e+65) {
tmp = t_1;
} else if (y_46_im <= -5e-192) {
tmp = t_0;
} else if (y_46_im <= 5.3e-108) {
tmp = x_46_im / y_46_re;
} else if (y_46_im <= 8.6e+75) {
tmp = t_0;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = ((y_46re * x_46im) - (y_46im * x_46re)) / ((y_46re * y_46re) + (y_46im * y_46im))
t_1 = (y_46re * ((1.0d0 / y_46im) * (x_46im / y_46im))) - (x_46re / y_46im)
if (y_46im <= (-2.05d+65)) then
tmp = t_1
else if (y_46im <= (-5d-192)) then
tmp = t_0
else if (y_46im <= 5.3d-108) then
tmp = x_46im / y_46re
else if (y_46im <= 8.6d+75) then
tmp = t_0
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = ((y_46_re * x_46_im) - (y_46_im * x_46_re)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im));
double t_1 = (y_46_re * ((1.0 / y_46_im) * (x_46_im / y_46_im))) - (x_46_re / y_46_im);
double tmp;
if (y_46_im <= -2.05e+65) {
tmp = t_1;
} else if (y_46_im <= -5e-192) {
tmp = t_0;
} else if (y_46_im <= 5.3e-108) {
tmp = x_46_im / y_46_re;
} else if (y_46_im <= 8.6e+75) {
tmp = t_0;
} else {
tmp = t_1;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = ((y_46_re * x_46_im) - (y_46_im * x_46_re)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im)) t_1 = (y_46_re * ((1.0 / y_46_im) * (x_46_im / y_46_im))) - (x_46_re / y_46_im) tmp = 0 if y_46_im <= -2.05e+65: tmp = t_1 elif y_46_im <= -5e-192: tmp = t_0 elif y_46_im <= 5.3e-108: tmp = x_46_im / y_46_re elif y_46_im <= 8.6e+75: tmp = t_0 else: tmp = t_1 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(Float64(Float64(y_46_re * x_46_im) - Float64(y_46_im * x_46_re)) / Float64(Float64(y_46_re * y_46_re) + Float64(y_46_im * y_46_im))) t_1 = Float64(Float64(y_46_re * Float64(Float64(1.0 / y_46_im) * Float64(x_46_im / y_46_im))) - Float64(x_46_re / y_46_im)) tmp = 0.0 if (y_46_im <= -2.05e+65) tmp = t_1; elseif (y_46_im <= -5e-192) tmp = t_0; elseif (y_46_im <= 5.3e-108) tmp = Float64(x_46_im / y_46_re); elseif (y_46_im <= 8.6e+75) tmp = t_0; else tmp = t_1; end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = ((y_46_re * x_46_im) - (y_46_im * x_46_re)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im)); t_1 = (y_46_re * ((1.0 / y_46_im) * (x_46_im / y_46_im))) - (x_46_re / y_46_im); tmp = 0.0; if (y_46_im <= -2.05e+65) tmp = t_1; elseif (y_46_im <= -5e-192) tmp = t_0; elseif (y_46_im <= 5.3e-108) tmp = x_46_im / y_46_re; elseif (y_46_im <= 8.6e+75) tmp = t_0; else tmp = t_1; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[(N[(y$46$re * x$46$im), $MachinePrecision] - N[(y$46$im * x$46$re), $MachinePrecision]), $MachinePrecision] / N[(N[(y$46$re * y$46$re), $MachinePrecision] + N[(y$46$im * y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(y$46$re * N[(N[(1.0 / y$46$im), $MachinePrecision] * N[(x$46$im / y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x$46$re / y$46$im), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -2.05e+65], t$95$1, If[LessEqual[y$46$im, -5e-192], t$95$0, If[LessEqual[y$46$im, 5.3e-108], N[(x$46$im / y$46$re), $MachinePrecision], If[LessEqual[y$46$im, 8.6e+75], t$95$0, t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{y.re \cdot x.im - y.im \cdot x.re}{y.re \cdot y.re + y.im \cdot y.im}\\
t_1 := y.re \cdot \left(\frac{1}{y.im} \cdot \frac{x.im}{y.im}\right) - \frac{x.re}{y.im}\\
\mathbf{if}\;y.im \leq -2.05 \cdot 10^{+65}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y.im \leq -5 \cdot 10^{-192}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y.im \leq 5.3 \cdot 10^{-108}:\\
\;\;\;\;\frac{x.im}{y.re}\\
\mathbf{elif}\;y.im \leq 8.6 \cdot 10^{+75}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y.im < -2.0500000000000001e65 or 8.6000000000000002e75 < y.im Initial program 48.3%
Taylor expanded in y.re around 0 77.8%
+-commutative77.8%
mul-1-neg77.8%
unsub-neg77.8%
*-commutative77.8%
associate-/l*82.0%
Simplified82.0%
*-un-lft-identity82.0%
unpow282.0%
times-frac85.3%
Applied egg-rr85.3%
if -2.0500000000000001e65 < y.im < -5.0000000000000001e-192 or 5.29999999999999989e-108 < y.im < 8.6000000000000002e75Initial program 80.9%
if -5.0000000000000001e-192 < y.im < 5.29999999999999989e-108Initial program 58.0%
Taylor expanded in y.re around inf 82.3%
Final simplification83.0%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (or (<= y.im -160.0) (not (<= y.im 8.6))) (- (* y.re (* (/ 1.0 y.im) (/ x.im y.im))) (/ 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 <= -160.0) || !(y_46_im <= 8.6)) {
tmp = (y_46_re * ((1.0 / y_46_im) * (x_46_im / y_46_im))) - (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 <= (-160.0d0)) .or. (.not. (y_46im <= 8.6d0))) then
tmp = (y_46re * ((1.0d0 / y_46im) * (x_46im / y_46im))) - (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 <= -160.0) || !(y_46_im <= 8.6)) {
tmp = (y_46_re * ((1.0 / y_46_im) * (x_46_im / y_46_im))) - (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 <= -160.0) or not (y_46_im <= 8.6): tmp = (y_46_re * ((1.0 / y_46_im) * (x_46_im / y_46_im))) - (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 <= -160.0) || !(y_46_im <= 8.6)) tmp = Float64(Float64(y_46_re * Float64(Float64(1.0 / y_46_im) * Float64(x_46_im / y_46_im))) - 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 <= -160.0) || ~((y_46_im <= 8.6))) tmp = (y_46_re * ((1.0 / y_46_im) * (x_46_im / y_46_im))) - (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, -160.0], N[Not[LessEqual[y$46$im, 8.6]], $MachinePrecision]], N[(N[(y$46$re * N[(N[(1.0 / y$46$im), $MachinePrecision] * N[(x$46$im / y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x$46$re / y$46$im), $MachinePrecision]), $MachinePrecision], N[(x$46$im / y$46$re), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.im \leq -160 \lor \neg \left(y.im \leq 8.6\right):\\
\;\;\;\;y.re \cdot \left(\frac{1}{y.im} \cdot \frac{x.im}{y.im}\right) - \frac{x.re}{y.im}\\
\mathbf{else}:\\
\;\;\;\;\frac{x.im}{y.re}\\
\end{array}
\end{array}
if y.im < -160 or 8.59999999999999964 < y.im Initial program 56.5%
Taylor expanded in y.re around 0 74.3%
+-commutative74.3%
mul-1-neg74.3%
unsub-neg74.3%
*-commutative74.3%
associate-/l*77.5%
Simplified77.5%
*-un-lft-identity77.5%
unpow277.5%
times-frac80.0%
Applied egg-rr80.0%
if -160 < y.im < 8.59999999999999964Initial program 67.9%
Taylor expanded in y.re around inf 70.0%
Final simplification75.2%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (or (<= y.im -7e+64) (not (<= y.im 1050.0))) (/ 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 <= -7e+64) || !(y_46_im <= 1050.0)) {
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 <= (-7d+64)) .or. (.not. (y_46im <= 1050.0d0))) 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 <= -7e+64) || !(y_46_im <= 1050.0)) {
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 <= -7e+64) or not (y_46_im <= 1050.0): 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 <= -7e+64) || !(y_46_im <= 1050.0)) tmp = Float64(x_46_re / Float64(-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 <= -7e+64) || ~((y_46_im <= 1050.0))) 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, -7e+64], N[Not[LessEqual[y$46$im, 1050.0]], $MachinePrecision]], N[(x$46$re / (-y$46$im)), $MachinePrecision], N[(x$46$im / y$46$re), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.im \leq -7 \cdot 10^{+64} \lor \neg \left(y.im \leq 1050\right):\\
\;\;\;\;\frac{x.re}{-y.im}\\
\mathbf{else}:\\
\;\;\;\;\frac{x.im}{y.re}\\
\end{array}
\end{array}
if y.im < -6.9999999999999997e64 or 1050 < y.im Initial program 53.6%
Taylor expanded in y.re around 0 73.2%
associate-*r/73.2%
neg-mul-173.2%
Simplified73.2%
if -6.9999999999999997e64 < y.im < 1050Initial program 68.8%
Taylor expanded in y.re around inf 65.8%
Final simplification69.2%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (<= y.im 1.25e+242) (/ x.im y.re) (/ x.im y.im)))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_im <= 1.25e+242) {
tmp = x_46_im / y_46_re;
} else {
tmp = x_46_im / y_46_im;
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: tmp
if (y_46im <= 1.25d+242) then
tmp = x_46im / y_46re
else
tmp = x_46im / y_46im
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_im <= 1.25e+242) {
tmp = x_46_im / y_46_re;
} else {
tmp = x_46_im / y_46_im;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if y_46_im <= 1.25e+242: tmp = x_46_im / y_46_re else: tmp = x_46_im / y_46_im return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if (y_46_im <= 1.25e+242) tmp = Float64(x_46_im / y_46_re); else tmp = Float64(x_46_im / y_46_im); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if (y_46_im <= 1.25e+242) tmp = x_46_im / y_46_re; else tmp = x_46_im / y_46_im; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[y$46$im, 1.25e+242], N[(x$46$im / y$46$re), $MachinePrecision], N[(x$46$im / y$46$im), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.im \leq 1.25 \cdot 10^{+242}:\\
\;\;\;\;\frac{x.im}{y.re}\\
\mathbf{else}:\\
\;\;\;\;\frac{x.im}{y.im}\\
\end{array}
\end{array}
if y.im < 1.2500000000000001e242Initial program 62.2%
Taylor expanded in y.re around inf 46.9%
if 1.2500000000000001e242 < y.im Initial program 58.3%
fma-define58.3%
Simplified58.3%
Taylor expanded in x.im around inf 59.9%
*-commutative59.9%
Simplified59.9%
fma-define59.9%
add-sqr-sqrt59.9%
hypot-undefine59.9%
hypot-undefine59.9%
frac-times59.9%
hypot-undefine59.9%
+-commutative59.9%
hypot-define59.9%
hypot-undefine59.9%
+-commutative59.9%
hypot-define59.9%
Applied egg-rr59.9%
Taylor expanded in y.re around 0 59.9%
Taylor expanded in y.re around inf 52.5%
Final simplification47.3%
(FPCore (x.re x.im y.re y.im) :precision binary64 (/ x.im y.im))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return x_46_im / y_46_im;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
code = x_46im / y_46im
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return x_46_im / y_46_im;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): return x_46_im / y_46_im
function code(x_46_re, x_46_im, y_46_re, y_46_im) return Float64(x_46_im / y_46_im) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = x_46_im / y_46_im; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[(x$46$im / y$46$im), $MachinePrecision]
\begin{array}{l}
\\
\frac{x.im}{y.im}
\end{array}
Initial program 62.0%
fma-define62.0%
Simplified62.0%
Taylor expanded in x.im around inf 42.7%
*-commutative42.7%
Simplified42.7%
fma-define42.7%
add-sqr-sqrt42.7%
hypot-undefine42.7%
hypot-undefine42.7%
frac-times61.9%
hypot-undefine47.4%
+-commutative47.4%
hypot-define61.9%
hypot-undefine47.4%
+-commutative47.4%
hypot-define61.9%
Applied egg-rr61.9%
Taylor expanded in y.re around 0 19.6%
Taylor expanded in y.re around inf 11.7%
Final simplification11.7%
herbie shell --seed 2024044
(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))))