
(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 11 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x.re x.im y.re y.im) :precision binary64 (/ (- (* x.im y.re) (* x.re y.im)) (+ (* y.re y.re) (* y.im y.im))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return ((x_46_im * y_46_re) - (x_46_re * y_46_im)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im));
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
code = ((x_46im * y_46re) - (x_46re * y_46im)) / ((y_46re * y_46re) + (y_46im * y_46im))
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return ((x_46_im * y_46_re) - (x_46_re * y_46_im)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im));
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): return ((x_46_im * y_46_re) - (x_46_re * y_46_im)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im))
function code(x_46_re, x_46_im, y_46_re, y_46_im) return Float64(Float64(Float64(x_46_im * y_46_re) - Float64(x_46_re * y_46_im)) / Float64(Float64(y_46_re * y_46_re) + Float64(y_46_im * y_46_im))) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = ((x_46_im * y_46_re) - (x_46_re * y_46_im)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im)); end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[(N[(N[(x$46$im * y$46$re), $MachinePrecision] - N[(x$46$re * y$46$im), $MachinePrecision]), $MachinePrecision] / N[(N[(y$46$re * y$46$re), $MachinePrecision] + N[(y$46$im * y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x.im \cdot y.re - x.re \cdot y.im}{y.re \cdot y.re + y.im \cdot y.im}
\end{array}
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (- (* x.im y.re) (* x.re y.im))))
(if (<= (/ t_0 (+ (* y.re y.re) (* y.im y.im))) 5e+225)
(/ (/ t_0 (hypot y.re y.im)) (hypot y.re y.im))
(/ (- (* x.im (/ y.re y.im)) x.re) y.im))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = (x_46_im * y_46_re) - (x_46_re * y_46_im);
double tmp;
if ((t_0 / ((y_46_re * y_46_re) + (y_46_im * y_46_im))) <= 5e+225) {
tmp = (t_0 / hypot(y_46_re, y_46_im)) / hypot(y_46_re, y_46_im);
} else {
tmp = ((x_46_im * (y_46_re / y_46_im)) - x_46_re) / y_46_im;
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = (x_46_im * y_46_re) - (x_46_re * y_46_im);
double tmp;
if ((t_0 / ((y_46_re * y_46_re) + (y_46_im * y_46_im))) <= 5e+225) {
tmp = (t_0 / Math.hypot(y_46_re, y_46_im)) / Math.hypot(y_46_re, y_46_im);
} else {
tmp = ((x_46_im * (y_46_re / y_46_im)) - x_46_re) / y_46_im;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = (x_46_im * y_46_re) - (x_46_re * y_46_im) tmp = 0 if (t_0 / ((y_46_re * y_46_re) + (y_46_im * y_46_im))) <= 5e+225: tmp = (t_0 / math.hypot(y_46_re, y_46_im)) / math.hypot(y_46_re, y_46_im) else: tmp = ((x_46_im * (y_46_re / y_46_im)) - x_46_re) / y_46_im return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(Float64(x_46_im * y_46_re) - Float64(x_46_re * y_46_im)) tmp = 0.0 if (Float64(t_0 / Float64(Float64(y_46_re * y_46_re) + Float64(y_46_im * y_46_im))) <= 5e+225) tmp = Float64(Float64(t_0 / hypot(y_46_re, y_46_im)) / hypot(y_46_re, y_46_im)); else tmp = Float64(Float64(Float64(x_46_im * Float64(y_46_re / y_46_im)) - x_46_re) / y_46_im); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = (x_46_im * y_46_re) - (x_46_re * y_46_im); tmp = 0.0; if ((t_0 / ((y_46_re * y_46_re) + (y_46_im * y_46_im))) <= 5e+225) tmp = (t_0 / hypot(y_46_re, y_46_im)) / hypot(y_46_re, y_46_im); else tmp = ((x_46_im * (y_46_re / y_46_im)) - x_46_re) / y_46_im; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[(x$46$im * y$46$re), $MachinePrecision] - N[(x$46$re * y$46$im), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(t$95$0 / N[(N[(y$46$re * y$46$re), $MachinePrecision] + N[(y$46$im * y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 5e+225], N[(N[(t$95$0 / N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision]), $MachinePrecision] / N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision]), $MachinePrecision], N[(N[(N[(x$46$im * N[(y$46$re / y$46$im), $MachinePrecision]), $MachinePrecision] - x$46$re), $MachinePrecision] / y$46$im), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x.im \cdot y.re - x.re \cdot y.im\\
\mathbf{if}\;\frac{t_0}{y.re \cdot y.re + y.im \cdot y.im} \leq 5 \cdot 10^{+225}:\\
\;\;\;\;\frac{\frac{t_0}{\mathsf{hypot}\left(y.re, y.im\right)}}{\mathsf{hypot}\left(y.re, y.im\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x.im \cdot \frac{y.re}{y.im} - x.re}{y.im}\\
\end{array}
\end{array}
if (/.f64 (-.f64 (*.f64 x.im y.re) (*.f64 x.re y.im)) (+.f64 (*.f64 y.re y.re) (*.f64 y.im y.im))) < 4.99999999999999981e225Initial program 81.6%
*-un-lft-identity81.6%
add-sqr-sqrt81.6%
times-frac81.6%
hypot-def81.6%
hypot-def96.2%
Applied egg-rr96.2%
associate-*l/96.3%
*-un-lft-identity96.3%
Applied egg-rr96.3%
if 4.99999999999999981e225 < (/.f64 (-.f64 (*.f64 x.im y.re) (*.f64 x.re y.im)) (+.f64 (*.f64 y.re y.re) (*.f64 y.im y.im))) Initial program 7.2%
Taylor expanded in y.re around 0 54.0%
+-commutative54.0%
mul-1-neg54.0%
unsub-neg54.0%
*-commutative54.0%
unpow254.0%
times-frac69.4%
Simplified69.4%
associate-*r/70.7%
sub-div70.7%
Applied egg-rr70.7%
Final simplification88.7%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (+ (* y.re y.re) (* y.im y.im))))
(if (<= y.im -4.4e+149)
(/ (- (* y.re (/ x.im y.im)) x.re) y.im)
(if (<= y.im -6.9e-162)
(fma -1.0 (/ x.re (/ t_0 y.im)) (/ x.im (/ t_0 y.re)))
(if (<= y.im 2.1e+27)
(/ (- x.im (* x.re (/ y.im y.re))) y.re)
(/ (- x.re) (+ y.im (/ y.re (/ 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 * y_46_re) + (y_46_im * y_46_im);
double tmp;
if (y_46_im <= -4.4e+149) {
tmp = ((y_46_re * (x_46_im / y_46_im)) - x_46_re) / y_46_im;
} else if (y_46_im <= -6.9e-162) {
tmp = fma(-1.0, (x_46_re / (t_0 / y_46_im)), (x_46_im / (t_0 / y_46_re)));
} else if (y_46_im <= 2.1e+27) {
tmp = (x_46_im - (x_46_re * (y_46_im / y_46_re))) / y_46_re;
} else {
tmp = -x_46_re / (y_46_im + (y_46_re / (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(y_46_re * y_46_re) + Float64(y_46_im * y_46_im)) tmp = 0.0 if (y_46_im <= -4.4e+149) tmp = Float64(Float64(Float64(y_46_re * Float64(x_46_im / y_46_im)) - x_46_re) / y_46_im); elseif (y_46_im <= -6.9e-162) tmp = fma(-1.0, Float64(x_46_re / Float64(t_0 / y_46_im)), Float64(x_46_im / Float64(t_0 / y_46_re))); elseif (y_46_im <= 2.1e+27) tmp = Float64(Float64(x_46_im - Float64(x_46_re * Float64(y_46_im / y_46_re))) / y_46_re); else tmp = Float64(Float64(-x_46_re) / Float64(y_46_im + Float64(y_46_re / Float64(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[(y$46$re * y$46$re), $MachinePrecision] + N[(y$46$im * y$46$im), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -4.4e+149], 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, -6.9e-162], N[(-1.0 * N[(x$46$re / N[(t$95$0 / y$46$im), $MachinePrecision]), $MachinePrecision] + N[(x$46$im / N[(t$95$0 / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 2.1e+27], N[(N[(x$46$im - N[(x$46$re * N[(y$46$im / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y$46$re), $MachinePrecision], N[((-x$46$re) / N[(y$46$im + N[(y$46$re / N[(y$46$im / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot y.re + y.im \cdot y.im\\
\mathbf{if}\;y.im \leq -4.4 \cdot 10^{+149}:\\
\;\;\;\;\frac{y.re \cdot \frac{x.im}{y.im} - x.re}{y.im}\\
\mathbf{elif}\;y.im \leq -6.9 \cdot 10^{-162}:\\
\;\;\;\;\mathsf{fma}\left(-1, \frac{x.re}{\frac{t_0}{y.im}}, \frac{x.im}{\frac{t_0}{y.re}}\right)\\
\mathbf{elif}\;y.im \leq 2.1 \cdot 10^{+27}:\\
\;\;\;\;\frac{x.im - x.re \cdot \frac{y.im}{y.re}}{y.re}\\
\mathbf{else}:\\
\;\;\;\;\frac{-x.re}{y.im + \frac{y.re}{\frac{y.im}{y.re}}}\\
\end{array}
\end{array}
if y.im < -4.4e149Initial program 26.5%
*-un-lft-identity26.5%
add-sqr-sqrt26.5%
times-frac26.5%
hypot-def26.5%
hypot-def41.4%
Applied egg-rr41.4%
Taylor expanded in y.re around 0 88.8%
neg-mul-188.8%
unpow288.8%
times-frac94.6%
*-commutative94.6%
+-commutative94.6%
unsub-neg94.6%
associate-*l/94.6%
div-sub94.6%
Simplified94.6%
if -4.4e149 < y.im < -6.9000000000000004e-162Initial program 78.5%
Taylor expanded in x.im around 0 78.5%
fma-def78.5%
associate-/l*86.1%
unpow286.1%
unpow286.1%
associate-/l*86.3%
unpow286.3%
unpow286.3%
Simplified86.3%
if -6.9000000000000004e-162 < y.im < 2.09999999999999995e27Initial program 72.1%
Taylor expanded in y.re around inf 77.7%
+-commutative77.7%
mul-1-neg77.7%
unsub-neg77.7%
*-commutative77.7%
unpow277.7%
times-frac81.7%
Simplified81.7%
associate-*r/82.6%
sub-div83.6%
Applied egg-rr83.6%
if 2.09999999999999995e27 < y.im Initial program 38.1%
*-un-lft-identity38.1%
add-sqr-sqrt38.1%
times-frac38.2%
hypot-def38.2%
hypot-def56.4%
Applied egg-rr56.4%
associate-*l/56.5%
*-un-lft-identity56.5%
Applied egg-rr56.5%
Taylor expanded in x.im around 0 35.2%
mul-1-neg35.2%
associate-/l*46.2%
unpow246.2%
unpow246.2%
Simplified46.2%
Taylor expanded in y.im around 0 75.4%
unpow275.4%
associate-/l*88.6%
Simplified88.6%
Final simplification86.8%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (<= y.im -1.1e+85)
(- (* (/ y.re y.im) (/ x.im y.im)) (/ x.re y.im))
(if (<= y.im -1.18e-161)
(/ (- (* x.im y.re) (* x.re y.im)) (+ (* y.re y.re) (* y.im y.im)))
(if (<= y.im 2.1e+27)
(/ (- x.im (* x.re (/ y.im y.re))) y.re)
(/ (- x.re) (+ y.im (/ y.re (/ y.im y.re))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_im <= -1.1e+85) {
tmp = ((y_46_re / y_46_im) * (x_46_im / y_46_im)) - (x_46_re / y_46_im);
} else if (y_46_im <= -1.18e-161) {
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));
} else if (y_46_im <= 2.1e+27) {
tmp = (x_46_im - (x_46_re * (y_46_im / y_46_re))) / y_46_re;
} else {
tmp = -x_46_re / (y_46_im + (y_46_re / (y_46_im / y_46_re)));
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: tmp
if (y_46im <= (-1.1d+85)) then
tmp = ((y_46re / y_46im) * (x_46im / y_46im)) - (x_46re / y_46im)
else if (y_46im <= (-1.18d-161)) then
tmp = ((x_46im * y_46re) - (x_46re * y_46im)) / ((y_46re * y_46re) + (y_46im * y_46im))
else if (y_46im <= 2.1d+27) then
tmp = (x_46im - (x_46re * (y_46im / y_46re))) / y_46re
else
tmp = -x_46re / (y_46im + (y_46re / (y_46im / y_46re)))
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_im <= -1.1e+85) {
tmp = ((y_46_re / y_46_im) * (x_46_im / y_46_im)) - (x_46_re / y_46_im);
} else if (y_46_im <= -1.18e-161) {
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));
} else if (y_46_im <= 2.1e+27) {
tmp = (x_46_im - (x_46_re * (y_46_im / y_46_re))) / y_46_re;
} else {
tmp = -x_46_re / (y_46_im + (y_46_re / (y_46_im / y_46_re)));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if y_46_im <= -1.1e+85: tmp = ((y_46_re / y_46_im) * (x_46_im / y_46_im)) - (x_46_re / y_46_im) elif y_46_im <= -1.18e-161: 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)) elif y_46_im <= 2.1e+27: tmp = (x_46_im - (x_46_re * (y_46_im / y_46_re))) / y_46_re else: tmp = -x_46_re / (y_46_im + (y_46_re / (y_46_im / y_46_re))) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if (y_46_im <= -1.1e+85) tmp = Float64(Float64(Float64(y_46_re / y_46_im) * Float64(x_46_im / y_46_im)) - Float64(x_46_re / y_46_im)); elseif (y_46_im <= -1.18e-161) tmp = 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))); elseif (y_46_im <= 2.1e+27) tmp = Float64(Float64(x_46_im - Float64(x_46_re * Float64(y_46_im / y_46_re))) / y_46_re); else tmp = Float64(Float64(-x_46_re) / Float64(y_46_im + Float64(y_46_re / Float64(y_46_im / y_46_re)))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if (y_46_im <= -1.1e+85) tmp = ((y_46_re / y_46_im) * (x_46_im / y_46_im)) - (x_46_re / y_46_im); elseif (y_46_im <= -1.18e-161) 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)); elseif (y_46_im <= 2.1e+27) tmp = (x_46_im - (x_46_re * (y_46_im / y_46_re))) / y_46_re; else tmp = -x_46_re / (y_46_im + (y_46_re / (y_46_im / y_46_re))); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[y$46$im, -1.1e+85], N[(N[(N[(y$46$re / y$46$im), $MachinePrecision] * N[(x$46$im / y$46$im), $MachinePrecision]), $MachinePrecision] - N[(x$46$re / y$46$im), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, -1.18e-161], 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], If[LessEqual[y$46$im, 2.1e+27], N[(N[(x$46$im - N[(x$46$re * N[(y$46$im / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y$46$re), $MachinePrecision], N[((-x$46$re) / N[(y$46$im + N[(y$46$re / N[(y$46$im / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.im \leq -1.1 \cdot 10^{+85}:\\
\;\;\;\;\frac{y.re}{y.im} \cdot \frac{x.im}{y.im} - \frac{x.re}{y.im}\\
\mathbf{elif}\;y.im \leq -1.18 \cdot 10^{-161}:\\
\;\;\;\;\frac{x.im \cdot y.re - x.re \cdot y.im}{y.re \cdot y.re + y.im \cdot y.im}\\
\mathbf{elif}\;y.im \leq 2.1 \cdot 10^{+27}:\\
\;\;\;\;\frac{x.im - x.re \cdot \frac{y.im}{y.re}}{y.re}\\
\mathbf{else}:\\
\;\;\;\;\frac{-x.re}{y.im + \frac{y.re}{\frac{y.im}{y.re}}}\\
\end{array}
\end{array}
if y.im < -1.1000000000000001e85Initial program 31.9%
Taylor expanded in y.re around 0 86.9%
+-commutative86.9%
mul-1-neg86.9%
unsub-neg86.9%
*-commutative86.9%
unpow286.9%
times-frac91.6%
Simplified91.6%
if -1.1000000000000001e85 < y.im < -1.17999999999999992e-161Initial program 85.0%
if -1.17999999999999992e-161 < y.im < 2.09999999999999995e27Initial program 72.1%
Taylor expanded in y.re around inf 77.7%
+-commutative77.7%
mul-1-neg77.7%
unsub-neg77.7%
*-commutative77.7%
unpow277.7%
times-frac81.7%
Simplified81.7%
associate-*r/82.6%
sub-div83.6%
Applied egg-rr83.6%
if 2.09999999999999995e27 < y.im Initial program 38.1%
*-un-lft-identity38.1%
add-sqr-sqrt38.1%
times-frac38.2%
hypot-def38.2%
hypot-def56.4%
Applied egg-rr56.4%
associate-*l/56.5%
*-un-lft-identity56.5%
Applied egg-rr56.5%
Taylor expanded in x.im around 0 35.2%
mul-1-neg35.2%
associate-/l*46.2%
unpow246.2%
unpow246.2%
Simplified46.2%
Taylor expanded in y.im around 0 75.4%
unpow275.4%
associate-/l*88.6%
Simplified88.6%
Final simplification86.4%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (<= y.im -1.05e-11)
(/ (- (* x.im (/ y.re y.im)) x.re) y.im)
(if (<= y.im 1.6e+28)
(/ (- x.im (* x.re (/ y.im y.re))) y.re)
(/ (- x.re) (+ y.im (/ y.re (/ y.im y.re)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_im <= -1.05e-11) {
tmp = ((x_46_im * (y_46_re / y_46_im)) - x_46_re) / y_46_im;
} else if (y_46_im <= 1.6e+28) {
tmp = (x_46_im - (x_46_re * (y_46_im / y_46_re))) / y_46_re;
} else {
tmp = -x_46_re / (y_46_im + (y_46_re / (y_46_im / y_46_re)));
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: tmp
if (y_46im <= (-1.05d-11)) then
tmp = ((x_46im * (y_46re / y_46im)) - x_46re) / y_46im
else if (y_46im <= 1.6d+28) then
tmp = (x_46im - (x_46re * (y_46im / y_46re))) / y_46re
else
tmp = -x_46re / (y_46im + (y_46re / (y_46im / y_46re)))
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_im <= -1.05e-11) {
tmp = ((x_46_im * (y_46_re / y_46_im)) - x_46_re) / y_46_im;
} else if (y_46_im <= 1.6e+28) {
tmp = (x_46_im - (x_46_re * (y_46_im / y_46_re))) / y_46_re;
} else {
tmp = -x_46_re / (y_46_im + (y_46_re / (y_46_im / y_46_re)));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if y_46_im <= -1.05e-11: tmp = ((x_46_im * (y_46_re / y_46_im)) - x_46_re) / y_46_im elif y_46_im <= 1.6e+28: tmp = (x_46_im - (x_46_re * (y_46_im / y_46_re))) / y_46_re else: tmp = -x_46_re / (y_46_im + (y_46_re / (y_46_im / y_46_re))) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if (y_46_im <= -1.05e-11) tmp = Float64(Float64(Float64(x_46_im * Float64(y_46_re / y_46_im)) - x_46_re) / y_46_im); elseif (y_46_im <= 1.6e+28) tmp = Float64(Float64(x_46_im - Float64(x_46_re * Float64(y_46_im / y_46_re))) / y_46_re); else tmp = Float64(Float64(-x_46_re) / Float64(y_46_im + Float64(y_46_re / Float64(y_46_im / y_46_re)))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if (y_46_im <= -1.05e-11) tmp = ((x_46_im * (y_46_re / y_46_im)) - x_46_re) / y_46_im; elseif (y_46_im <= 1.6e+28) tmp = (x_46_im - (x_46_re * (y_46_im / y_46_re))) / y_46_re; else tmp = -x_46_re / (y_46_im + (y_46_re / (y_46_im / y_46_re))); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[y$46$im, -1.05e-11], 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, 1.6e+28], N[(N[(x$46$im - N[(x$46$re * N[(y$46$im / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y$46$re), $MachinePrecision], N[((-x$46$re) / N[(y$46$im + N[(y$46$re / N[(y$46$im / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.im \leq -1.05 \cdot 10^{-11}:\\
\;\;\;\;\frac{x.im \cdot \frac{y.re}{y.im} - x.re}{y.im}\\
\mathbf{elif}\;y.im \leq 1.6 \cdot 10^{+28}:\\
\;\;\;\;\frac{x.im - x.re \cdot \frac{y.im}{y.re}}{y.re}\\
\mathbf{else}:\\
\;\;\;\;\frac{-x.re}{y.im + \frac{y.re}{\frac{y.im}{y.re}}}\\
\end{array}
\end{array}
if y.im < -1.0499999999999999e-11Initial program 46.6%
Taylor expanded in y.re around 0 78.5%
+-commutative78.5%
mul-1-neg78.5%
unsub-neg78.5%
*-commutative78.5%
unpow278.5%
times-frac81.8%
Simplified81.8%
associate-*r/81.8%
sub-div81.8%
Applied egg-rr81.8%
if -1.0499999999999999e-11 < y.im < 1.6e28Initial program 74.7%
Taylor expanded in y.re around inf 76.3%
+-commutative76.3%
mul-1-neg76.3%
unsub-neg76.3%
*-commutative76.3%
unpow276.3%
times-frac79.6%
Simplified79.6%
associate-*r/80.4%
sub-div81.1%
Applied egg-rr81.1%
if 1.6e28 < y.im Initial program 38.1%
*-un-lft-identity38.1%
add-sqr-sqrt38.1%
times-frac38.2%
hypot-def38.2%
hypot-def56.4%
Applied egg-rr56.4%
associate-*l/56.5%
*-un-lft-identity56.5%
Applied egg-rr56.5%
Taylor expanded in x.im around 0 35.2%
mul-1-neg35.2%
associate-/l*46.2%
unpow246.2%
unpow246.2%
Simplified46.2%
Taylor expanded in y.im around 0 75.4%
unpow275.4%
associate-/l*88.6%
Simplified88.6%
Final simplification83.0%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (or (<= y.im -8e+76) (not (<= y.im 4.2e+34))) (/ (- x.re) y.im) (/ (- x.im (* y.im (/ x.re 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 <= -8e+76) || !(y_46_im <= 4.2e+34)) {
tmp = -x_46_re / y_46_im;
} else {
tmp = (x_46_im - (y_46_im * (x_46_re / 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 <= (-8d+76)) .or. (.not. (y_46im <= 4.2d+34))) then
tmp = -x_46re / y_46im
else
tmp = (x_46im - (y_46im * (x_46re / 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 <= -8e+76) || !(y_46_im <= 4.2e+34)) {
tmp = -x_46_re / y_46_im;
} else {
tmp = (x_46_im - (y_46_im * (x_46_re / 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 <= -8e+76) or not (y_46_im <= 4.2e+34): tmp = -x_46_re / y_46_im else: tmp = (x_46_im - (y_46_im * (x_46_re / 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 <= -8e+76) || !(y_46_im <= 4.2e+34)) tmp = Float64(Float64(-x_46_re) / y_46_im); else tmp = Float64(Float64(x_46_im - Float64(y_46_im * Float64(x_46_re / 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 <= -8e+76) || ~((y_46_im <= 4.2e+34))) tmp = -x_46_re / y_46_im; else tmp = (x_46_im - (y_46_im * (x_46_re / 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, -8e+76], N[Not[LessEqual[y$46$im, 4.2e+34]], $MachinePrecision]], N[((-x$46$re) / y$46$im), $MachinePrecision], N[(N[(x$46$im - N[(y$46$im * N[(x$46$re / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y$46$re), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.im \leq -8 \cdot 10^{+76} \lor \neg \left(y.im \leq 4.2 \cdot 10^{+34}\right):\\
\;\;\;\;\frac{-x.re}{y.im}\\
\mathbf{else}:\\
\;\;\;\;\frac{x.im - y.im \cdot \frac{x.re}{y.re}}{y.re}\\
\end{array}
\end{array}
if y.im < -8.0000000000000004e76 or 4.20000000000000035e34 < y.im Initial program 36.0%
Taylor expanded in y.re around 0 80.9%
associate-*r/80.9%
neg-mul-180.9%
Simplified80.9%
if -8.0000000000000004e76 < y.im < 4.20000000000000035e34Initial program 75.6%
Taylor expanded in y.re around inf 72.7%
+-commutative72.7%
mul-1-neg72.7%
unsub-neg72.7%
*-commutative72.7%
unpow272.7%
times-frac76.3%
Simplified76.3%
associate-*l/76.3%
sub-div76.9%
Applied egg-rr76.9%
Final simplification78.5%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (or (<= y.im -7.2e+76) (not (<= y.im 7.4e+52))) (/ (- 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 <= -7.2e+76) || !(y_46_im <= 7.4e+52)) {
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 <= (-7.2d+76)) .or. (.not. (y_46im <= 7.4d+52))) 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 <= -7.2e+76) || !(y_46_im <= 7.4e+52)) {
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 <= -7.2e+76) or not (y_46_im <= 7.4e+52): 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 <= -7.2e+76) || !(y_46_im <= 7.4e+52)) tmp = Float64(Float64(-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 <= -7.2e+76) || ~((y_46_im <= 7.4e+52))) 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, -7.2e+76], N[Not[LessEqual[y$46$im, 7.4e+52]], $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.2 \cdot 10^{+76} \lor \neg \left(y.im \leq 7.4 \cdot 10^{+52}\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 < -7.2000000000000006e76 or 7.3999999999999999e52 < y.im Initial program 36.0%
Taylor expanded in y.re around 0 80.9%
associate-*r/80.9%
neg-mul-180.9%
Simplified80.9%
if -7.2000000000000006e76 < y.im < 7.3999999999999999e52Initial program 75.6%
Taylor expanded in y.re around inf 72.7%
+-commutative72.7%
mul-1-neg72.7%
unsub-neg72.7%
*-commutative72.7%
unpow272.7%
times-frac76.3%
Simplified76.3%
associate-*r/76.9%
sub-div77.6%
Applied egg-rr77.6%
Final simplification78.9%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (or (<= y.im -8.5e-14) (not (<= y.im 5.8e+26))) (/ (- (* y.re (/ x.im 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 <= -8.5e-14) || !(y_46_im <= 5.8e+26)) {
tmp = ((y_46_re * (x_46_im / 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 <= (-8.5d-14)) .or. (.not. (y_46im <= 5.8d+26))) then
tmp = ((y_46re * (x_46im / 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 <= -8.5e-14) || !(y_46_im <= 5.8e+26)) {
tmp = ((y_46_re * (x_46_im / 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 <= -8.5e-14) or not (y_46_im <= 5.8e+26): tmp = ((y_46_re * (x_46_im / 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 <= -8.5e-14) || !(y_46_im <= 5.8e+26)) tmp = Float64(Float64(Float64(y_46_re * Float64(x_46_im / 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 <= -8.5e-14) || ~((y_46_im <= 5.8e+26))) tmp = ((y_46_re * (x_46_im / 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, -8.5e-14], N[Not[LessEqual[y$46$im, 5.8e+26]], $MachinePrecision]], N[(N[(N[(y$46$re * N[(x$46$im / 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 -8.5 \cdot 10^{-14} \lor \neg \left(y.im \leq 5.8 \cdot 10^{+26}\right):\\
\;\;\;\;\frac{y.re \cdot \frac{x.im}{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 < -8.50000000000000038e-14 or 5.8e26 < y.im Initial program 43.0%
*-un-lft-identity43.0%
add-sqr-sqrt43.0%
times-frac43.0%
hypot-def43.0%
hypot-def56.8%
Applied egg-rr56.8%
Taylor expanded in y.re around 0 78.1%
neg-mul-178.1%
unpow278.1%
times-frac83.5%
*-commutative83.5%
+-commutative83.5%
unsub-neg83.5%
associate-*l/84.3%
div-sub84.3%
Simplified84.3%
if -8.50000000000000038e-14 < y.im < 5.8e26Initial program 74.5%
Taylor expanded in y.re around inf 76.9%
+-commutative76.9%
mul-1-neg76.9%
unsub-neg76.9%
*-commutative76.9%
unpow276.9%
times-frac80.2%
Simplified80.2%
associate-*r/80.9%
sub-div81.7%
Applied egg-rr81.7%
Final simplification82.9%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (<= y.im -4.2e-14)
(/ (- (* x.im (/ y.re y.im)) x.re) y.im)
(if (<= y.im 6.8e+26)
(/ (- x.im (* x.re (/ y.im y.re))) y.re)
(/ (- (* y.re (/ x.im y.im)) x.re) y.im))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_im <= -4.2e-14) {
tmp = ((x_46_im * (y_46_re / y_46_im)) - x_46_re) / y_46_im;
} else if (y_46_im <= 6.8e+26) {
tmp = (x_46_im - (x_46_re * (y_46_im / y_46_re))) / y_46_re;
} else {
tmp = ((y_46_re * (x_46_im / 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 <= (-4.2d-14)) then
tmp = ((x_46im * (y_46re / y_46im)) - x_46re) / y_46im
else if (y_46im <= 6.8d+26) then
tmp = (x_46im - (x_46re * (y_46im / y_46re))) / y_46re
else
tmp = ((y_46re * (x_46im / 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 <= -4.2e-14) {
tmp = ((x_46_im * (y_46_re / y_46_im)) - x_46_re) / y_46_im;
} else if (y_46_im <= 6.8e+26) {
tmp = (x_46_im - (x_46_re * (y_46_im / y_46_re))) / y_46_re;
} else {
tmp = ((y_46_re * (x_46_im / 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 <= -4.2e-14: tmp = ((x_46_im * (y_46_re / y_46_im)) - x_46_re) / y_46_im elif y_46_im <= 6.8e+26: tmp = (x_46_im - (x_46_re * (y_46_im / y_46_re))) / y_46_re else: tmp = ((y_46_re * (x_46_im / y_46_im)) - x_46_re) / y_46_im return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if (y_46_im <= -4.2e-14) tmp = Float64(Float64(Float64(x_46_im * Float64(y_46_re / y_46_im)) - x_46_re) / y_46_im); elseif (y_46_im <= 6.8e+26) 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(y_46_re * Float64(x_46_im / 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 <= -4.2e-14) tmp = ((x_46_im * (y_46_re / y_46_im)) - x_46_re) / y_46_im; elseif (y_46_im <= 6.8e+26) tmp = (x_46_im - (x_46_re * (y_46_im / y_46_re))) / y_46_re; else tmp = ((y_46_re * (x_46_im / 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, -4.2e-14], 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, 6.8e+26], 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[(y$46$re * N[(x$46$im / y$46$im), $MachinePrecision]), $MachinePrecision] - x$46$re), $MachinePrecision] / y$46$im), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.im \leq -4.2 \cdot 10^{-14}:\\
\;\;\;\;\frac{x.im \cdot \frac{y.re}{y.im} - x.re}{y.im}\\
\mathbf{elif}\;y.im \leq 6.8 \cdot 10^{+26}:\\
\;\;\;\;\frac{x.im - x.re \cdot \frac{y.im}{y.re}}{y.re}\\
\mathbf{else}:\\
\;\;\;\;\frac{y.re \cdot \frac{x.im}{y.im} - x.re}{y.im}\\
\end{array}
\end{array}
if y.im < -4.1999999999999998e-14Initial program 46.6%
Taylor expanded in y.re around 0 78.5%
+-commutative78.5%
mul-1-neg78.5%
unsub-neg78.5%
*-commutative78.5%
unpow278.5%
times-frac81.8%
Simplified81.8%
associate-*r/81.8%
sub-div81.8%
Applied egg-rr81.8%
if -4.1999999999999998e-14 < y.im < 6.8000000000000005e26Initial program 74.5%
Taylor expanded in y.re around inf 76.9%
+-commutative76.9%
mul-1-neg76.9%
unsub-neg76.9%
*-commutative76.9%
unpow276.9%
times-frac80.2%
Simplified80.2%
associate-*r/80.9%
sub-div81.7%
Applied egg-rr81.7%
if 6.8000000000000005e26 < y.im Initial program 39.1%
*-un-lft-identity39.1%
add-sqr-sqrt39.1%
times-frac39.2%
hypot-def39.2%
hypot-def57.2%
Applied egg-rr57.2%
Taylor expanded in y.re around 0 77.7%
neg-mul-177.7%
unpow277.7%
times-frac85.4%
*-commutative85.4%
+-commutative85.4%
unsub-neg85.4%
associate-*l/87.0%
div-sub87.0%
Simplified87.0%
Final simplification82.9%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (or (<= y.im -1.8e-15) (not (<= y.im 1.7e+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 <= -1.8e-15) || !(y_46_im <= 1.7e+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 <= (-1.8d-15)) .or. (.not. (y_46im <= 1.7d+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 <= -1.8e-15) || !(y_46_im <= 1.7e+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 <= -1.8e-15) or not (y_46_im <= 1.7e+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 <= -1.8e-15) || !(y_46_im <= 1.7e+31)) tmp = Float64(Float64(-x_46_re) / y_46_im); else tmp = Float64(x_46_im / y_46_re); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if ((y_46_im <= -1.8e-15) || ~((y_46_im <= 1.7e+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, -1.8e-15], N[Not[LessEqual[y$46$im, 1.7e+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 -1.8 \cdot 10^{-15} \lor \neg \left(y.im \leq 1.7 \cdot 10^{+31}\right):\\
\;\;\;\;\frac{-x.re}{y.im}\\
\mathbf{else}:\\
\;\;\;\;\frac{x.im}{y.re}\\
\end{array}
\end{array}
if y.im < -1.8000000000000001e-15 or 1.6999999999999999e31 < y.im Initial program 42.5%
Taylor expanded in y.re around 0 74.9%
associate-*r/74.9%
neg-mul-174.9%
Simplified74.9%
if -1.8000000000000001e-15 < y.im < 1.6999999999999999e31Initial program 74.7%
Taylor expanded in y.re around inf 60.9%
Final simplification67.5%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (<= y.im -1.8e+194) (/ x.re y.im) (if (<= y.im 3.7e+205) (/ x.im y.re) (/ x.re y.im))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_im <= -1.8e+194) {
tmp = x_46_re / y_46_im;
} else if (y_46_im <= 3.7e+205) {
tmp = x_46_im / y_46_re;
} else {
tmp = x_46_re / y_46_im;
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: tmp
if (y_46im <= (-1.8d+194)) then
tmp = x_46re / y_46im
else if (y_46im <= 3.7d+205) then
tmp = x_46im / y_46re
else
tmp = x_46re / y_46im
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_im <= -1.8e+194) {
tmp = x_46_re / y_46_im;
} else if (y_46_im <= 3.7e+205) {
tmp = x_46_im / y_46_re;
} else {
tmp = x_46_re / y_46_im;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if y_46_im <= -1.8e+194: tmp = x_46_re / y_46_im elif y_46_im <= 3.7e+205: tmp = x_46_im / y_46_re else: tmp = x_46_re / y_46_im return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if (y_46_im <= -1.8e+194) tmp = Float64(x_46_re / y_46_im); elseif (y_46_im <= 3.7e+205) tmp = Float64(x_46_im / y_46_re); else tmp = Float64(x_46_re / y_46_im); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if (y_46_im <= -1.8e+194) tmp = x_46_re / y_46_im; elseif (y_46_im <= 3.7e+205) tmp = x_46_im / y_46_re; else tmp = x_46_re / y_46_im; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[y$46$im, -1.8e+194], N[(x$46$re / y$46$im), $MachinePrecision], If[LessEqual[y$46$im, 3.7e+205], N[(x$46$im / y$46$re), $MachinePrecision], N[(x$46$re / y$46$im), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.im \leq -1.8 \cdot 10^{+194}:\\
\;\;\;\;\frac{x.re}{y.im}\\
\mathbf{elif}\;y.im \leq 3.7 \cdot 10^{+205}:\\
\;\;\;\;\frac{x.im}{y.re}\\
\mathbf{else}:\\
\;\;\;\;\frac{x.re}{y.im}\\
\end{array}
\end{array}
if y.im < -1.8e194 or 3.69999999999999981e205 < y.im Initial program 31.5%
*-un-lft-identity31.5%
add-sqr-sqrt31.5%
times-frac31.5%
hypot-def31.5%
hypot-def47.8%
Applied egg-rr47.8%
Taylor expanded in y.re around 0 59.9%
neg-mul-159.9%
Simplified59.9%
Taylor expanded in y.im around -inf 31.2%
if -1.8e194 < y.im < 3.69999999999999981e205Initial program 68.1%
Taylor expanded in y.re around inf 47.0%
Final simplification43.3%
(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 59.5%
Taylor expanded in y.re around inf 39.1%
Final simplification39.1%
herbie shell --seed 2023290
(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))))