
(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 9 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(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 63.3%
div-sub60.6%
*-commutative60.6%
add-sqr-sqrt60.6%
times-frac61.8%
fma-neg61.8%
hypot-define61.8%
hypot-define73.6%
associate-/l*75.0%
add-sqr-sqrt75.0%
pow275.0%
hypot-define75.0%
Applied egg-rr75.0%
*-un-lft-identity75.0%
add-sqr-sqrt75.0%
sqrt-unprod64.2%
sqr-neg64.2%
unpow264.2%
hypot-undefine64.2%
hypot-undefine64.2%
add-sqr-sqrt64.2%
+-commutative64.2%
add-sqr-sqrt64.2%
hypot-undefine64.2%
hypot-undefine64.2%
unpow264.2%
unpow264.2%
hypot-undefine64.2%
hypot-undefine64.2%
add-sqr-sqrt64.2%
+-commutative64.2%
add-sqr-sqrt64.2%
hypot-undefine64.2%
hypot-undefine64.2%
unpow264.2%
Applied egg-rr93.1%
associate-*l/93.1%
*-lft-identity93.1%
Simplified93.1%
Final simplification93.1%
(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 (/ (- y.im) (pow (hypot y.re y.im) 2.0)))))
(t_1 (/ (- (* x.im (/ y.re y.im)) x.re) y.im)))
(if (<= y.im -3.3e+120)
t_1
(if (<= y.im -1.05e-130)
t_0
(if (<= y.im 9.5e-130)
(/ (- x.im (* x.re (/ y.im y.re))) y.re)
(if (<= y.im 7.5e+168) 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 = 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 / pow(hypot(y_46_re, y_46_im), 2.0))));
double t_1 = ((x_46_im * (y_46_re / y_46_im)) - x_46_re) / y_46_im;
double tmp;
if (y_46_im <= -3.3e+120) {
tmp = t_1;
} else if (y_46_im <= -1.05e-130) {
tmp = t_0;
} else if (y_46_im <= 9.5e-130) {
tmp = (x_46_im - (x_46_re * (y_46_im / y_46_re))) / y_46_re;
} else if (y_46_im <= 7.5e+168) {
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 = 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_re, y_46_im) ^ 2.0)))) t_1 = Float64(Float64(Float64(x_46_im * Float64(y_46_re / y_46_im)) - x_46_re) / y_46_im) tmp = 0.0 if (y_46_im <= -3.3e+120) tmp = t_1; elseif (y_46_im <= -1.05e-130) tmp = t_0; elseif (y_46_im <= 9.5e-130) tmp = Float64(Float64(x_46_im - Float64(x_46_re * Float64(y_46_im / y_46_re))) / y_46_re); elseif (y_46_im <= 7.5e+168) tmp = t_0; 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 / 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[((-y$46$im) / N[Power[N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = 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$im, -3.3e+120], t$95$1, If[LessEqual[y$46$im, -1.05e-130], t$95$0, If[LessEqual[y$46$im, 9.5e-130], N[(N[(x$46$im - N[(x$46$re * N[(y$46$im / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y$46$re), $MachinePrecision], If[LessEqual[y$46$im, 7.5e+168], t$95$0, t$95$1]]]]]]
\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{-y.im}{{\left(\mathsf{hypot}\left(y.re, y.im\right)\right)}^{2}}\right)\\
t_1 := \frac{x.im \cdot \frac{y.re}{y.im} - x.re}{y.im}\\
\mathbf{if}\;y.im \leq -3.3 \cdot 10^{+120}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y.im \leq -1.05 \cdot 10^{-130}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y.im \leq 9.5 \cdot 10^{-130}:\\
\;\;\;\;\frac{x.im - x.re \cdot \frac{y.im}{y.re}}{y.re}\\
\mathbf{elif}\;y.im \leq 7.5 \cdot 10^{+168}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y.im < -3.29999999999999991e120 or 7.4999999999999999e168 < y.im Initial program 33.4%
div-sub33.4%
*-commutative33.4%
add-sqr-sqrt33.4%
times-frac33.5%
fma-neg33.5%
hypot-define33.5%
hypot-define39.9%
associate-/l*46.5%
add-sqr-sqrt46.5%
pow246.5%
hypot-define46.5%
Applied egg-rr46.5%
Taylor expanded in y.im around inf 80.1%
associate-/l*87.9%
Simplified87.9%
if -3.29999999999999991e120 < y.im < -1.05000000000000001e-130 or 9.49999999999999962e-130 < y.im < 7.4999999999999999e168Initial program 76.2%
div-sub76.2%
*-commutative76.2%
add-sqr-sqrt76.2%
times-frac75.8%
fma-neg75.8%
hypot-define75.9%
hypot-define87.6%
associate-/l*88.9%
add-sqr-sqrt88.9%
pow288.9%
hypot-define88.9%
Applied egg-rr88.9%
if -1.05000000000000001e-130 < y.im < 9.49999999999999962e-130Initial program 76.2%
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%
mul-1-neg95.9%
distribute-neg-in95.9%
mul-1-neg95.9%
remove-double-neg95.9%
unsub-neg95.9%
associate-/l*97.1%
Simplified97.1%
Final simplification90.9%
(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 -1.55e+131)
t_0
(if (<= y.re -1.35e-74)
(fma
(/ y.re (hypot y.re y.im))
(/ x.im (- y.re))
(* x.re (/ (/ y.im (hypot y.im y.re)) (- (hypot y.im y.re)))))
(if (<= y.re 3.6e-79)
(/ (- (* x.im (/ y.re y.im)) x.re) y.im)
(if (<= y.re 1.65e+64)
(/ (- (* 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 = (x_46_im - (y_46_im * (x_46_re / y_46_re))) / y_46_re;
double tmp;
if (y_46_re <= -1.55e+131) {
tmp = t_0;
} else if (y_46_re <= -1.35e-74) {
tmp = fma((y_46_re / hypot(y_46_re, y_46_im)), (x_46_im / -y_46_re), (x_46_re * ((y_46_im / hypot(y_46_im, y_46_re)) / -hypot(y_46_im, y_46_re))));
} else if (y_46_re <= 3.6e-79) {
tmp = ((x_46_im * (y_46_re / y_46_im)) - x_46_re) / y_46_im;
} else if (y_46_re <= 1.65e+64) {
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(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.55e+131) tmp = t_0; elseif (y_46_re <= -1.35e-74) tmp = fma(Float64(y_46_re / hypot(y_46_re, y_46_im)), Float64(x_46_im / Float64(-y_46_re)), Float64(x_46_re * Float64(Float64(y_46_im / hypot(y_46_im, y_46_re)) / Float64(-hypot(y_46_im, y_46_re))))); elseif (y_46_re <= 3.6e-79) tmp = Float64(Float64(Float64(x_46_im * Float64(y_46_re / y_46_im)) - x_46_re) / y_46_im); elseif (y_46_re <= 1.65e+64) 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[(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.55e+131], t$95$0, If[LessEqual[y$46$re, -1.35e-74], N[(N[(y$46$re / N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision]), $MachinePrecision] * N[(x$46$im / (-y$46$re)), $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], If[LessEqual[y$46$re, 3.6e-79], 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, 1.65e+64], 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 := \frac{x.im - y.im \cdot \frac{x.re}{y.re}}{y.re}\\
\mathbf{if}\;y.re \leq -1.55 \cdot 10^{+131}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y.re \leq -1.35 \cdot 10^{-74}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y.re}{\mathsf{hypot}\left(y.re, y.im\right)}, \frac{x.im}{-y.re}, x.re \cdot \frac{\frac{y.im}{\mathsf{hypot}\left(y.im, y.re\right)}}{-\mathsf{hypot}\left(y.im, y.re\right)}\right)\\
\mathbf{elif}\;y.re \leq 3.6 \cdot 10^{-79}:\\
\;\;\;\;\frac{x.im \cdot \frac{y.re}{y.im} - x.re}{y.im}\\
\mathbf{elif}\;y.re \leq 1.65 \cdot 10^{+64}:\\
\;\;\;\;\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.re < -1.55000000000000008e131 or 1.64999999999999994e64 < y.re Initial program 36.7%
div-sub36.7%
*-commutative36.7%
add-sqr-sqrt36.7%
times-frac44.0%
fma-neg44.0%
hypot-define44.0%
hypot-define77.0%
associate-/l*79.3%
add-sqr-sqrt79.3%
pow279.3%
hypot-define79.3%
Applied egg-rr79.3%
Taylor expanded in y.re around inf 81.2%
mul-1-neg81.2%
*-commutative81.2%
associate-*r/91.6%
distribute-lft-neg-in91.6%
cancel-sign-sub-inv91.6%
Simplified91.6%
if -1.55000000000000008e131 < y.re < -1.35000000000000009e-74Initial program 66.4%
div-sub66.5%
*-commutative66.5%
add-sqr-sqrt66.5%
times-frac68.7%
fma-neg68.7%
hypot-define68.7%
hypot-define74.5%
associate-/l*73.3%
add-sqr-sqrt73.3%
pow273.3%
hypot-define73.3%
Applied egg-rr73.3%
*-un-lft-identity73.3%
add-sqr-sqrt73.3%
sqrt-unprod67.3%
sqr-neg67.3%
unpow267.3%
hypot-undefine67.3%
hypot-undefine67.3%
add-sqr-sqrt67.3%
+-commutative67.3%
add-sqr-sqrt67.3%
hypot-undefine67.3%
hypot-undefine67.3%
unpow267.3%
unpow267.3%
hypot-undefine67.3%
hypot-undefine67.3%
add-sqr-sqrt67.3%
+-commutative67.3%
add-sqr-sqrt67.3%
hypot-undefine67.3%
hypot-undefine67.3%
unpow267.3%
Applied egg-rr95.9%
associate-*l/95.9%
*-lft-identity95.9%
Simplified95.9%
Taylor expanded in y.re around -inf 77.7%
associate-*r/77.7%
mul-1-neg77.7%
Simplified77.7%
if -1.35000000000000009e-74 < y.re < 3.6000000000000002e-79Initial program 74.9%
div-sub67.2%
*-commutative67.2%
add-sqr-sqrt67.2%
times-frac63.2%
fma-neg63.2%
hypot-define63.2%
hypot-define65.4%
associate-/l*67.0%
add-sqr-sqrt67.0%
pow267.0%
hypot-define67.0%
Applied egg-rr67.0%
Taylor expanded in y.im around inf 94.8%
associate-/l*94.8%
Simplified94.8%
if 3.6000000000000002e-79 < y.re < 1.64999999999999994e64Initial program 84.8%
Final simplification89.1%
(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 -6.2e+68)
t_0
(if (<= y.re 3.8e-79)
(/ (- (* x.im (/ y.re y.im)) x.re) y.im)
(if (<= y.re 2.15e+64)
(/ (- (* 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 = (x_46_im - (y_46_im * (x_46_re / y_46_re))) / y_46_re;
double tmp;
if (y_46_re <= -6.2e+68) {
tmp = t_0;
} else if (y_46_re <= 3.8e-79) {
tmp = ((x_46_im * (y_46_re / y_46_im)) - x_46_re) / y_46_im;
} else if (y_46_re <= 2.15e+64) {
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;
}
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 <= (-6.2d+68)) then
tmp = t_0
else if (y_46re <= 3.8d-79) then
tmp = ((x_46im * (y_46re / y_46im)) - x_46re) / y_46im
else if (y_46re <= 2.15d+64) then
tmp = ((y_46re * x_46im) - (y_46im * x_46re)) / ((y_46re * y_46re) + (y_46im * 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 <= -6.2e+68) {
tmp = t_0;
} else if (y_46_re <= 3.8e-79) {
tmp = ((x_46_im * (y_46_re / y_46_im)) - x_46_re) / y_46_im;
} else if (y_46_re <= 2.15e+64) {
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;
}
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 <= -6.2e+68: tmp = t_0 elif y_46_re <= 3.8e-79: tmp = ((x_46_im * (y_46_re / y_46_im)) - x_46_re) / y_46_im elif y_46_re <= 2.15e+64: 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(x_46_im - Float64(y_46_im * Float64(x_46_re / y_46_re))) / y_46_re) tmp = 0.0 if (y_46_re <= -6.2e+68) tmp = t_0; elseif (y_46_re <= 3.8e-79) tmp = Float64(Float64(Float64(x_46_im * Float64(y_46_re / y_46_im)) - x_46_re) / y_46_im); elseif (y_46_re <= 2.15e+64) 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
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 <= -6.2e+68) tmp = t_0; elseif (y_46_re <= 3.8e-79) tmp = ((x_46_im * (y_46_re / y_46_im)) - x_46_re) / y_46_im; elseif (y_46_re <= 2.15e+64) 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; 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, -6.2e+68], t$95$0, If[LessEqual[y$46$re, 3.8e-79], 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, 2.15e+64], 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 := \frac{x.im - y.im \cdot \frac{x.re}{y.re}}{y.re}\\
\mathbf{if}\;y.re \leq -6.2 \cdot 10^{+68}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y.re \leq 3.8 \cdot 10^{-79}:\\
\;\;\;\;\frac{x.im \cdot \frac{y.re}{y.im} - x.re}{y.im}\\
\mathbf{elif}\;y.re \leq 2.15 \cdot 10^{+64}:\\
\;\;\;\;\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.re < -6.1999999999999997e68 or 2.1499999999999999e64 < y.re Initial program 42.6%
div-sub42.6%
*-commutative42.6%
add-sqr-sqrt42.6%
times-frac49.6%
fma-neg49.6%
hypot-define49.6%
hypot-define77.7%
associate-/l*79.6%
add-sqr-sqrt79.6%
pow279.6%
hypot-define79.6%
Applied egg-rr79.6%
Taylor expanded in y.re around inf 77.4%
mul-1-neg77.4%
*-commutative77.4%
associate-*r/86.0%
distribute-lft-neg-in86.0%
cancel-sign-sub-inv86.0%
Simplified86.0%
if -6.1999999999999997e68 < y.re < 3.8000000000000001e-79Initial program 72.4%
div-sub66.6%
*-commutative66.6%
add-sqr-sqrt66.6%
times-frac63.7%
fma-neg63.7%
hypot-define63.7%
hypot-define66.8%
associate-/l*67.6%
add-sqr-sqrt67.6%
pow267.6%
hypot-define67.6%
Applied egg-rr67.6%
Taylor expanded in y.im around inf 83.7%
associate-/l*85.3%
Simplified85.3%
if 3.8000000000000001e-79 < y.re < 2.1499999999999999e64Initial program 84.8%
Final simplification85.5%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (or (<= y.im -1.75e+34) (not (<= y.im 2.85e-22))) (/ (- (* x.im (/ y.re y.im)) 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 <= -1.75e+34) || !(y_46_im <= 2.85e-22)) {
tmp = ((x_46_im * (y_46_re / y_46_im)) - 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 <= (-1.75d+34)) .or. (.not. (y_46im <= 2.85d-22))) then
tmp = ((x_46im * (y_46re / y_46im)) - 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 <= -1.75e+34) || !(y_46_im <= 2.85e-22)) {
tmp = ((x_46_im * (y_46_re / y_46_im)) - 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 <= -1.75e+34) or not (y_46_im <= 2.85e-22): tmp = ((x_46_im * (y_46_re / y_46_im)) - 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 <= -1.75e+34) || !(y_46_im <= 2.85e-22)) tmp = Float64(Float64(Float64(x_46_im * Float64(y_46_re / y_46_im)) - x_46_re) / 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 <= -1.75e+34) || ~((y_46_im <= 2.85e-22))) tmp = ((x_46_im * (y_46_re / y_46_im)) - 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, -1.75e+34], N[Not[LessEqual[y$46$im, 2.85e-22]], $MachinePrecision]], N[(N[(N[(x$46$im * N[(y$46$re / y$46$im), $MachinePrecision]), $MachinePrecision] - x$46$re), $MachinePrecision] / 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 -1.75 \cdot 10^{+34} \lor \neg \left(y.im \leq 2.85 \cdot 10^{-22}\right):\\
\;\;\;\;\frac{x.im \cdot \frac{y.re}{y.im} - 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 < -1.74999999999999999e34 or 2.8499999999999998e-22 < y.im Initial program 50.1%
div-sub50.1%
*-commutative50.1%
add-sqr-sqrt50.1%
times-frac51.0%
fma-neg51.0%
hypot-define51.0%
hypot-define59.1%
associate-/l*64.6%
add-sqr-sqrt64.6%
pow264.6%
hypot-define64.6%
Applied egg-rr64.6%
Taylor expanded in y.im around inf 73.6%
associate-/l*78.2%
Simplified78.2%
if -1.74999999999999999e34 < y.im < 2.8499999999999998e-22Initial program 77.8%
Taylor expanded in y.re around inf 84.7%
remove-double-neg84.7%
mul-1-neg84.7%
neg-mul-184.7%
distribute-lft-in84.7%
mul-1-neg84.7%
distribute-neg-in84.7%
mul-1-neg84.7%
remove-double-neg84.7%
unsub-neg84.7%
associate-/l*85.3%
Simplified85.3%
Final simplification81.6%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (or (<= y.im -7e+28) (not (<= y.im 3.7e-20))) (/ 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 <= -7e+28) || !(y_46_im <= 3.7e-20)) {
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 <= (-7d+28)) .or. (.not. (y_46im <= 3.7d-20))) 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 <= -7e+28) || !(y_46_im <= 3.7e-20)) {
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 <= -7e+28) or not (y_46_im <= 3.7e-20): 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 <= -7e+28) || !(y_46_im <= 3.7e-20)) 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 <= -7e+28) || ~((y_46_im <= 3.7e-20))) 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, -7e+28], N[Not[LessEqual[y$46$im, 3.7e-20]], $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 -7 \cdot 10^{+28} \lor \neg \left(y.im \leq 3.7 \cdot 10^{-20}\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 < -6.9999999999999999e28 or 3.7000000000000001e-20 < y.im Initial program 50.1%
Taylor expanded in y.re around 0 71.0%
associate-*r/71.0%
neg-mul-171.0%
Simplified71.0%
if -6.9999999999999999e28 < y.im < 3.7000000000000001e-20Initial program 77.8%
Taylor expanded in y.re around inf 84.7%
remove-double-neg84.7%
mul-1-neg84.7%
neg-mul-184.7%
distribute-lft-in84.7%
mul-1-neg84.7%
distribute-neg-in84.7%
mul-1-neg84.7%
remove-double-neg84.7%
unsub-neg84.7%
associate-/l*85.3%
Simplified85.3%
Final simplification77.9%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (<= y.im -2.15e+26)
(/ (- (* y.re (/ x.im y.im)) x.re) y.im)
(if (<= y.im 7.2e-22)
(/ (- x.im (* x.re (/ 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 <= -2.15e+26) {
tmp = ((y_46_re * (x_46_im / y_46_im)) - x_46_re) / y_46_im;
} else if (y_46_im <= 7.2e-22) {
tmp = (x_46_im - (x_46_re * (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;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: tmp
if (y_46im <= (-2.15d+26)) then
tmp = ((y_46re * (x_46im / y_46im)) - x_46re) / y_46im
else if (y_46im <= 7.2d-22) then
tmp = (x_46im - (x_46re * (y_46im / y_46re))) / y_46re
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 tmp;
if (y_46_im <= -2.15e+26) {
tmp = ((y_46_re * (x_46_im / y_46_im)) - x_46_re) / y_46_im;
} else if (y_46_im <= 7.2e-22) {
tmp = (x_46_im - (x_46_re * (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;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if y_46_im <= -2.15e+26: tmp = ((y_46_re * (x_46_im / y_46_im)) - x_46_re) / y_46_im elif y_46_im <= 7.2e-22: tmp = (x_46_im - (x_46_re * (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 <= -2.15e+26) tmp = Float64(Float64(Float64(y_46_re * Float64(x_46_im / y_46_im)) - x_46_re) / y_46_im); elseif (y_46_im <= 7.2e-22) tmp = Float64(Float64(x_46_im - Float64(x_46_re * Float64(y_46_im / 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
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if (y_46_im <= -2.15e+26) tmp = ((y_46_re * (x_46_im / y_46_im)) - x_46_re) / y_46_im; elseif (y_46_im <= 7.2e-22) tmp = (x_46_im - (x_46_re * (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; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[y$46$im, -2.15e+26], 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, 7.2e-22], 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[(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 -2.15 \cdot 10^{+26}:\\
\;\;\;\;\frac{y.re \cdot \frac{x.im}{y.im} - x.re}{y.im}\\
\mathbf{elif}\;y.im \leq 7.2 \cdot 10^{-22}:\\
\;\;\;\;\frac{x.im - x.re \cdot \frac{y.im}{y.re}}{y.re}\\
\mathbf{else}:\\
\;\;\;\;\frac{x.im \cdot \frac{y.re}{y.im} - x.re}{y.im}\\
\end{array}
\end{array}
if y.im < -2.1499999999999999e26Initial program 51.8%
Taylor expanded in y.re around 0 75.5%
+-commutative75.5%
mul-1-neg75.5%
unsub-neg75.5%
unpow275.5%
associate-/r*75.8%
div-sub75.8%
*-commutative75.8%
associate-/l*80.8%
Simplified80.8%
if -2.1499999999999999e26 < y.im < 7.1999999999999996e-22Initial program 77.8%
Taylor expanded in y.re around inf 84.7%
remove-double-neg84.7%
mul-1-neg84.7%
neg-mul-184.7%
distribute-lft-in84.7%
mul-1-neg84.7%
distribute-neg-in84.7%
mul-1-neg84.7%
remove-double-neg84.7%
unsub-neg84.7%
associate-/l*85.3%
Simplified85.3%
if 7.1999999999999996e-22 < y.im Initial program 48.6%
div-sub48.6%
*-commutative48.6%
add-sqr-sqrt48.6%
times-frac50.3%
fma-neg50.3%
hypot-define50.3%
hypot-define63.4%
associate-/l*65.9%
add-sqr-sqrt65.9%
pow265.9%
hypot-define65.9%
Applied egg-rr65.9%
Taylor expanded in y.im around inf 71.7%
associate-/l*75.9%
Simplified75.9%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (or (<= y.im -8.6e+31) (not (<= y.im 2.65e-31))) (/ 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 <= -8.6e+31) || !(y_46_im <= 2.65e-31)) {
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 <= (-8.6d+31)) .or. (.not. (y_46im <= 2.65d-31))) 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 <= -8.6e+31) || !(y_46_im <= 2.65e-31)) {
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 <= -8.6e+31) or not (y_46_im <= 2.65e-31): 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 <= -8.6e+31) || !(y_46_im <= 2.65e-31)) 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 <= -8.6e+31) || ~((y_46_im <= 2.65e-31))) 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, -8.6e+31], N[Not[LessEqual[y$46$im, 2.65e-31]], $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 -8.6 \cdot 10^{+31} \lor \neg \left(y.im \leq 2.65 \cdot 10^{-31}\right):\\
\;\;\;\;\frac{x.re}{-y.im}\\
\mathbf{else}:\\
\;\;\;\;\frac{x.im}{y.re}\\
\end{array}
\end{array}
if y.im < -8.59999999999999978e31 or 2.65e-31 < y.im Initial program 50.2%
Taylor expanded in y.re around 0 70.7%
associate-*r/70.7%
neg-mul-170.7%
Simplified70.7%
if -8.59999999999999978e31 < y.im < 2.65e-31Initial program 78.2%
Taylor expanded in y.re around inf 64.6%
Final simplification67.8%
(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 63.3%
Taylor expanded in y.re around inf 39.6%
herbie shell --seed 2024108
(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))))