
(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
(if (<= y.im -2.9e+152)
(- (* (/ y.re y.im) (/ x.im y.im)) (/ x.re y.im))
(if (<= y.im 2.1e+122)
(-
(* (/ 1.0 (hypot y.re y.im)) (* x.im (/ y.re (hypot y.re y.im))))
(/ (* y.im x.re) (pow (hypot y.re y.im) 2.0)))
(/ (- (/ y.re (/ y.im x.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.9e+152) {
tmp = ((y_46_re / y_46_im) * (x_46_im / y_46_im)) - (x_46_re / y_46_im);
} else if (y_46_im <= 2.1e+122) {
tmp = ((1.0 / hypot(y_46_re, y_46_im)) * (x_46_im * (y_46_re / hypot(y_46_re, y_46_im)))) - ((y_46_im * x_46_re) / pow(hypot(y_46_re, y_46_im), 2.0));
} else {
tmp = ((y_46_re / (y_46_im / x_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 tmp;
if (y_46_im <= -2.9e+152) {
tmp = ((y_46_re / y_46_im) * (x_46_im / y_46_im)) - (x_46_re / y_46_im);
} else if (y_46_im <= 2.1e+122) {
tmp = ((1.0 / Math.hypot(y_46_re, y_46_im)) * (x_46_im * (y_46_re / Math.hypot(y_46_re, y_46_im)))) - ((y_46_im * x_46_re) / Math.pow(Math.hypot(y_46_re, y_46_im), 2.0));
} else {
tmp = ((y_46_re / (y_46_im / x_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.9e+152: tmp = ((y_46_re / y_46_im) * (x_46_im / y_46_im)) - (x_46_re / y_46_im) elif y_46_im <= 2.1e+122: tmp = ((1.0 / math.hypot(y_46_re, y_46_im)) * (x_46_im * (y_46_re / math.hypot(y_46_re, y_46_im)))) - ((y_46_im * x_46_re) / math.pow(math.hypot(y_46_re, y_46_im), 2.0)) else: tmp = ((y_46_re / (y_46_im / x_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.9e+152) 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 <= 2.1e+122) tmp = Float64(Float64(Float64(1.0 / hypot(y_46_re, y_46_im)) * Float64(x_46_im * Float64(y_46_re / hypot(y_46_re, y_46_im)))) - Float64(Float64(y_46_im * x_46_re) / (hypot(y_46_re, y_46_im) ^ 2.0))); else tmp = Float64(Float64(Float64(y_46_re / Float64(y_46_im / x_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.9e+152) tmp = ((y_46_re / y_46_im) * (x_46_im / y_46_im)) - (x_46_re / y_46_im); elseif (y_46_im <= 2.1e+122) tmp = ((1.0 / hypot(y_46_re, y_46_im)) * (x_46_im * (y_46_re / hypot(y_46_re, y_46_im)))) - ((y_46_im * x_46_re) / (hypot(y_46_re, y_46_im) ^ 2.0)); else tmp = ((y_46_re / (y_46_im / x_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.9e+152], 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, 2.1e+122], N[(N[(N[(1.0 / N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision]), $MachinePrecision] * N[(x$46$im * N[(y$46$re / N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(y$46$im * x$46$re), $MachinePrecision] / N[Power[N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(y$46$re / N[(y$46$im / x$46$im), $MachinePrecision]), $MachinePrecision] - x$46$re), $MachinePrecision] / y$46$im), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.im \leq -2.9 \cdot 10^{+152}:\\
\;\;\;\;\frac{y.re}{y.im} \cdot \frac{x.im}{y.im} - \frac{x.re}{y.im}\\
\mathbf{elif}\;y.im \leq 2.1 \cdot 10^{+122}:\\
\;\;\;\;\frac{1}{\mathsf{hypot}\left(y.re, y.im\right)} \cdot \left(x.im \cdot \frac{y.re}{\mathsf{hypot}\left(y.re, y.im\right)}\right) - \frac{y.im \cdot x.re}{{\left(\mathsf{hypot}\left(y.re, y.im\right)\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{y.re}{\frac{y.im}{x.im}} - x.re}{y.im}\\
\end{array}
\end{array}
if y.im < -2.8999999999999998e152Initial program 30.6%
Taylor expanded in y.re around 0 78.6%
+-commutative78.6%
mul-1-neg78.6%
unsub-neg78.6%
unpow278.6%
associate-/r*86.4%
div-sub86.4%
*-commutative86.4%
associate-/l*90.9%
Simplified90.9%
div-sub90.9%
sub-neg90.9%
clear-num90.9%
un-div-inv90.9%
Applied egg-rr90.9%
sub-neg90.9%
associate-/l/87.4%
Simplified87.4%
associate-/r*90.9%
div-inv90.9%
clear-num90.9%
Applied egg-rr90.9%
if -2.8999999999999998e152 < y.im < 2.10000000000000016e122Initial program 71.9%
div-sub70.0%
*-un-lft-identity70.0%
add-sqr-sqrt70.0%
times-frac69.8%
fmm-def69.8%
hypot-define69.8%
hypot-define76.4%
associate-/l*76.0%
add-sqr-sqrt76.0%
pow276.0%
hypot-define76.0%
Applied egg-rr76.0%
fmm-undef75.4%
associate-/l*89.5%
associate-*r/88.7%
*-commutative88.7%
Simplified88.7%
if 2.10000000000000016e122 < y.im Initial program 29.3%
Taylor expanded in y.re around 0 83.4%
+-commutative83.4%
mul-1-neg83.4%
unsub-neg83.4%
unpow283.4%
associate-/r*92.9%
div-sub92.9%
*-commutative92.9%
associate-/l*93.0%
Simplified93.0%
clear-num92.9%
un-div-inv93.0%
Applied egg-rr93.0%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (- (* y.re x.im) (* y.im x.re))))
(if (<= (/ t_0 (+ (* y.re y.re) (* y.im y.im))) 5e+304)
(* (/ 1.0 (hypot y.re y.im)) (/ t_0 (hypot y.re y.im)))
(/ (- (* (/ y.re y.im) x.im) x.re) y.im))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = (y_46_re * x_46_im) - (y_46_im * x_46_re);
double tmp;
if ((t_0 / ((y_46_re * y_46_re) + (y_46_im * y_46_im))) <= 5e+304) {
tmp = (1.0 / hypot(y_46_re, y_46_im)) * (t_0 / hypot(y_46_re, y_46_im));
} else {
tmp = (((y_46_re / y_46_im) * x_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 = (y_46_re * x_46_im) - (y_46_im * x_46_re);
double tmp;
if ((t_0 / ((y_46_re * y_46_re) + (y_46_im * y_46_im))) <= 5e+304) {
tmp = (1.0 / Math.hypot(y_46_re, y_46_im)) * (t_0 / Math.hypot(y_46_re, y_46_im));
} else {
tmp = (((y_46_re / y_46_im) * x_46_im) - x_46_re) / y_46_im;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = (y_46_re * x_46_im) - (y_46_im * x_46_re) tmp = 0 if (t_0 / ((y_46_re * y_46_re) + (y_46_im * y_46_im))) <= 5e+304: tmp = (1.0 / math.hypot(y_46_re, y_46_im)) * (t_0 / math.hypot(y_46_re, y_46_im)) else: tmp = (((y_46_re / y_46_im) * x_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(y_46_re * x_46_im) - Float64(y_46_im * x_46_re)) tmp = 0.0 if (Float64(t_0 / Float64(Float64(y_46_re * y_46_re) + Float64(y_46_im * y_46_im))) <= 5e+304) tmp = Float64(Float64(1.0 / hypot(y_46_re, y_46_im)) * Float64(t_0 / hypot(y_46_re, y_46_im))); else tmp = Float64(Float64(Float64(Float64(y_46_re / y_46_im) * x_46_im) - x_46_re) / y_46_im); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = (y_46_re * x_46_im) - (y_46_im * x_46_re); tmp = 0.0; if ((t_0 / ((y_46_re * y_46_re) + (y_46_im * y_46_im))) <= 5e+304) tmp = (1.0 / hypot(y_46_re, y_46_im)) * (t_0 / hypot(y_46_re, y_46_im)); else tmp = (((y_46_re / y_46_im) * x_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[(y$46$re * x$46$im), $MachinePrecision] - N[(y$46$im * x$46$re), $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+304], N[(N[(1.0 / N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision]), $MachinePrecision] * N[(t$95$0 / N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(y$46$re / y$46$im), $MachinePrecision] * x$46$im), $MachinePrecision] - x$46$re), $MachinePrecision] / y$46$im), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot x.im - y.im \cdot x.re\\
\mathbf{if}\;\frac{t\_0}{y.re \cdot y.re + y.im \cdot y.im} \leq 5 \cdot 10^{+304}:\\
\;\;\;\;\frac{1}{\mathsf{hypot}\left(y.re, y.im\right)} \cdot \frac{t\_0}{\mathsf{hypot}\left(y.re, y.im\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{y.re}{y.im} \cdot x.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.9999999999999997e304Initial program 76.2%
*-un-lft-identity76.2%
add-sqr-sqrt76.2%
times-frac76.0%
hypot-define76.0%
hypot-define97.2%
Applied egg-rr97.2%
if 4.9999999999999997e304 < (/.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 11.5%
Taylor expanded in y.re around 0 51.3%
+-commutative51.3%
mul-1-neg51.3%
unsub-neg51.3%
unpow251.3%
associate-/r*53.0%
div-sub54.5%
*-commutative54.5%
associate-/l*58.5%
Simplified58.5%
clear-num58.5%
un-div-inv58.5%
Applied egg-rr58.5%
associate-/r/58.5%
Simplified58.5%
Final simplification86.3%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (/ (- (/ y.re (/ y.im x.im)) x.re) y.im)))
(if (<= y.im -11.0)
t_0
(if (<= y.im 1.1e-152)
(/ (- x.im (/ (* y.im x.re) y.re)) y.re)
(if (<= y.im 1.25e+118)
(/ (- (* 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 / (y_46_im / x_46_im)) - x_46_re) / y_46_im;
double tmp;
if (y_46_im <= -11.0) {
tmp = t_0;
} else if (y_46_im <= 1.1e-152) {
tmp = (x_46_im - ((y_46_im * x_46_re) / y_46_re)) / y_46_re;
} else if (y_46_im <= 1.25e+118) {
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 = ((y_46re / (y_46im / x_46im)) - x_46re) / y_46im
if (y_46im <= (-11.0d0)) then
tmp = t_0
else if (y_46im <= 1.1d-152) then
tmp = (x_46im - ((y_46im * x_46re) / y_46re)) / y_46re
else if (y_46im <= 1.25d+118) 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 = ((y_46_re / (y_46_im / x_46_im)) - x_46_re) / y_46_im;
double tmp;
if (y_46_im <= -11.0) {
tmp = t_0;
} else if (y_46_im <= 1.1e-152) {
tmp = (x_46_im - ((y_46_im * x_46_re) / y_46_re)) / y_46_re;
} else if (y_46_im <= 1.25e+118) {
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 = ((y_46_re / (y_46_im / x_46_im)) - x_46_re) / y_46_im tmp = 0 if y_46_im <= -11.0: tmp = t_0 elif y_46_im <= 1.1e-152: tmp = (x_46_im - ((y_46_im * x_46_re) / y_46_re)) / y_46_re elif y_46_im <= 1.25e+118: 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(Float64(y_46_re / Float64(y_46_im / x_46_im)) - x_46_re) / y_46_im) tmp = 0.0 if (y_46_im <= -11.0) tmp = t_0; elseif (y_46_im <= 1.1e-152) tmp = Float64(Float64(x_46_im - Float64(Float64(y_46_im * x_46_re) / y_46_re)) / y_46_re); elseif (y_46_im <= 1.25e+118) 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 = ((y_46_re / (y_46_im / x_46_im)) - x_46_re) / y_46_im; tmp = 0.0; if (y_46_im <= -11.0) tmp = t_0; elseif (y_46_im <= 1.1e-152) tmp = (x_46_im - ((y_46_im * x_46_re) / y_46_re)) / y_46_re; elseif (y_46_im <= 1.25e+118) 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[(N[(y$46$re / N[(y$46$im / x$46$im), $MachinePrecision]), $MachinePrecision] - x$46$re), $MachinePrecision] / y$46$im), $MachinePrecision]}, If[LessEqual[y$46$im, -11.0], t$95$0, If[LessEqual[y$46$im, 1.1e-152], N[(N[(x$46$im - N[(N[(y$46$im * x$46$re), $MachinePrecision] / y$46$re), $MachinePrecision]), $MachinePrecision] / y$46$re), $MachinePrecision], If[LessEqual[y$46$im, 1.25e+118], 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{\frac{y.re}{\frac{y.im}{x.im}} - x.re}{y.im}\\
\mathbf{if}\;y.im \leq -11:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y.im \leq 1.1 \cdot 10^{-152}:\\
\;\;\;\;\frac{x.im - \frac{y.im \cdot x.re}{y.re}}{y.re}\\
\mathbf{elif}\;y.im \leq 1.25 \cdot 10^{+118}:\\
\;\;\;\;\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 < -11 or 1.24999999999999993e118 < y.im Initial program 39.1%
Taylor expanded in y.re around 0 75.9%
+-commutative75.9%
mul-1-neg75.9%
unsub-neg75.9%
unpow275.9%
associate-/r*82.3%
div-sub82.3%
*-commutative82.3%
associate-/l*84.1%
Simplified84.1%
clear-num84.1%
un-div-inv84.1%
Applied egg-rr84.1%
if -11 < y.im < 1.09999999999999992e-152Initial program 66.0%
*-un-lft-identity66.0%
add-sqr-sqrt66.0%
times-frac65.8%
hypot-define65.9%
hypot-define80.8%
Applied egg-rr80.8%
Taylor expanded in y.im around inf 57.1%
sub-neg57.1%
sub-neg57.1%
*-commutative57.1%
Simplified57.1%
Taylor expanded in y.re around inf 90.4%
mul-1-neg90.4%
unsub-neg90.4%
Simplified90.4%
if 1.09999999999999992e-152 < y.im < 1.24999999999999993e118Initial program 85.2%
Final simplification86.6%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (or (<= y.im -370000.0) (not (<= y.im 2.3e-37))) (/ (- (/ y.re (/ y.im x.im)) 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 <= -370000.0) || !(y_46_im <= 2.3e-37)) {
tmp = ((y_46_re / (y_46_im / x_46_im)) - 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 <= (-370000.0d0)) .or. (.not. (y_46im <= 2.3d-37))) then
tmp = ((y_46re / (y_46im / x_46im)) - 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 <= -370000.0) || !(y_46_im <= 2.3e-37)) {
tmp = ((y_46_re / (y_46_im / x_46_im)) - 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 <= -370000.0) or not (y_46_im <= 2.3e-37): tmp = ((y_46_re / (y_46_im / x_46_im)) - 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 <= -370000.0) || !(y_46_im <= 2.3e-37)) tmp = Float64(Float64(Float64(y_46_re / Float64(y_46_im / x_46_im)) - x_46_re) / y_46_im); else tmp = Float64(Float64(x_46_im - Float64(Float64(y_46_im * 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 <= -370000.0) || ~((y_46_im <= 2.3e-37))) tmp = ((y_46_re / (y_46_im / x_46_im)) - 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, -370000.0], N[Not[LessEqual[y$46$im, 2.3e-37]], $MachinePrecision]], N[(N[(N[(y$46$re / N[(y$46$im / x$46$im), $MachinePrecision]), $MachinePrecision] - x$46$re), $MachinePrecision] / y$46$im), $MachinePrecision], N[(N[(x$46$im - N[(N[(y$46$im * x$46$re), $MachinePrecision] / y$46$re), $MachinePrecision]), $MachinePrecision] / y$46$re), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.im \leq -370000 \lor \neg \left(y.im \leq 2.3 \cdot 10^{-37}\right):\\
\;\;\;\;\frac{\frac{y.re}{\frac{y.im}{x.im}} - x.re}{y.im}\\
\mathbf{else}:\\
\;\;\;\;\frac{x.im - \frac{y.im \cdot x.re}{y.re}}{y.re}\\
\end{array}
\end{array}
if y.im < -3.7e5 or 2.3e-37 < y.im Initial program 47.4%
Taylor expanded in y.re around 0 74.5%
+-commutative74.5%
mul-1-neg74.5%
unsub-neg74.5%
unpow274.5%
associate-/r*79.5%
div-sub79.5%
*-commutative79.5%
associate-/l*81.0%
Simplified81.0%
clear-num81.0%
un-div-inv81.1%
Applied egg-rr81.1%
if -3.7e5 < y.im < 2.3e-37Initial program 71.5%
*-un-lft-identity71.5%
add-sqr-sqrt71.5%
times-frac71.3%
hypot-define71.3%
hypot-define83.9%
Applied egg-rr83.9%
Taylor expanded in y.im around inf 62.7%
sub-neg62.7%
sub-neg62.7%
*-commutative62.7%
Simplified62.7%
Taylor expanded in y.re around inf 88.3%
mul-1-neg88.3%
unsub-neg88.3%
Simplified88.3%
Final simplification84.2%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (or (<= y.im -1320.0) (not (<= y.im 4.8e-36))) (/ (- (* y.re (/ x.im y.im)) 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 <= -1320.0) || !(y_46_im <= 4.8e-36)) {
tmp = ((y_46_re * (x_46_im / y_46_im)) - 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 <= (-1320.0d0)) .or. (.not. (y_46im <= 4.8d-36))) then
tmp = ((y_46re * (x_46im / y_46im)) - 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 <= -1320.0) || !(y_46_im <= 4.8e-36)) {
tmp = ((y_46_re * (x_46_im / y_46_im)) - 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 <= -1320.0) or not (y_46_im <= 4.8e-36): tmp = ((y_46_re * (x_46_im / y_46_im)) - 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 <= -1320.0) || !(y_46_im <= 4.8e-36)) 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(Float64(y_46_im * 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 <= -1320.0) || ~((y_46_im <= 4.8e-36))) tmp = ((y_46_re * (x_46_im / y_46_im)) - 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, -1320.0], N[Not[LessEqual[y$46$im, 4.8e-36]], $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[(N[(y$46$im * x$46$re), $MachinePrecision] / y$46$re), $MachinePrecision]), $MachinePrecision] / y$46$re), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.im \leq -1320 \lor \neg \left(y.im \leq 4.8 \cdot 10^{-36}\right):\\
\;\;\;\;\frac{y.re \cdot \frac{x.im}{y.im} - x.re}{y.im}\\
\mathbf{else}:\\
\;\;\;\;\frac{x.im - \frac{y.im \cdot x.re}{y.re}}{y.re}\\
\end{array}
\end{array}
if y.im < -1320 or 4.8e-36 < y.im Initial program 47.4%
Taylor expanded in y.re around 0 74.5%
+-commutative74.5%
mul-1-neg74.5%
unsub-neg74.5%
unpow274.5%
associate-/r*79.5%
div-sub79.5%
*-commutative79.5%
associate-/l*81.0%
Simplified81.0%
if -1320 < y.im < 4.8e-36Initial program 71.5%
*-un-lft-identity71.5%
add-sqr-sqrt71.5%
times-frac71.3%
hypot-define71.3%
hypot-define83.9%
Applied egg-rr83.9%
Taylor expanded in y.im around inf 62.7%
sub-neg62.7%
sub-neg62.7%
*-commutative62.7%
Simplified62.7%
Taylor expanded in y.re around inf 88.3%
mul-1-neg88.3%
unsub-neg88.3%
Simplified88.3%
Final simplification84.2%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (or (<= y.im -7.8e+16) (not (<= y.im 9.6e-35))) (/ 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 <= -7.8e+16) || !(y_46_im <= 9.6e-35)) {
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 <= (-7.8d+16)) .or. (.not. (y_46im <= 9.6d-35))) 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 <= -7.8e+16) || !(y_46_im <= 9.6e-35)) {
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 <= -7.8e+16) or not (y_46_im <= 9.6e-35): 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 <= -7.8e+16) || !(y_46_im <= 9.6e-35)) tmp = Float64(x_46_re / Float64(-y_46_im)); else tmp = Float64(Float64(x_46_im - Float64(Float64(y_46_im * 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 <= -7.8e+16) || ~((y_46_im <= 9.6e-35))) 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, -7.8e+16], N[Not[LessEqual[y$46$im, 9.6e-35]], $MachinePrecision]], N[(x$46$re / (-y$46$im)), $MachinePrecision], N[(N[(x$46$im - N[(N[(y$46$im * x$46$re), $MachinePrecision] / y$46$re), $MachinePrecision]), $MachinePrecision] / y$46$re), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.im \leq -7.8 \cdot 10^{+16} \lor \neg \left(y.im \leq 9.6 \cdot 10^{-35}\right):\\
\;\;\;\;\frac{x.re}{-y.im}\\
\mathbf{else}:\\
\;\;\;\;\frac{x.im - \frac{y.im \cdot x.re}{y.re}}{y.re}\\
\end{array}
\end{array}
if y.im < -7.8e16 or 9.6000000000000005e-35 < y.im Initial program 47.3%
Taylor expanded in y.re around 0 66.6%
associate-*r/66.6%
neg-mul-166.6%
Simplified66.6%
if -7.8e16 < y.im < 9.6000000000000005e-35Initial program 71.1%
*-un-lft-identity71.1%
add-sqr-sqrt71.1%
times-frac70.9%
hypot-define70.9%
hypot-define83.3%
Applied egg-rr83.3%
Taylor expanded in y.im around inf 62.5%
sub-neg62.5%
sub-neg62.5%
*-commutative62.5%
Simplified62.5%
Taylor expanded in y.re around inf 87.6%
mul-1-neg87.6%
unsub-neg87.6%
Simplified87.6%
Final simplification76.1%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (or (<= y.im -1.06e+31) (not (<= y.im 9.6e-35))) (/ 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.06e+31) || !(y_46_im <= 9.6e-35)) {
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 <= (-1.06d+31)) .or. (.not. (y_46im <= 9.6d-35))) 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 <= -1.06e+31) || !(y_46_im <= 9.6e-35)) {
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 <= -1.06e+31) or not (y_46_im <= 9.6e-35): 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 <= -1.06e+31) || !(y_46_im <= 9.6e-35)) 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 <= -1.06e+31) || ~((y_46_im <= 9.6e-35))) 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, -1.06e+31], N[Not[LessEqual[y$46$im, 9.6e-35]], $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 -1.06 \cdot 10^{+31} \lor \neg \left(y.im \leq 9.6 \cdot 10^{-35}\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 < -1.0600000000000001e31 or 9.6000000000000005e-35 < y.im Initial program 46.9%
Taylor expanded in y.re around 0 67.3%
associate-*r/67.3%
neg-mul-167.3%
Simplified67.3%
if -1.0600000000000001e31 < y.im < 9.6000000000000005e-35Initial program 71.0%
Taylor expanded in y.re around inf 86.3%
mul-1-neg86.3%
unsub-neg86.3%
associate-/l*85.8%
Simplified85.8%
Final simplification75.8%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (or (<= y.im -9e+30) (not (<= y.im 2.5e-45))) (/ 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 <= -9e+30) || !(y_46_im <= 2.5e-45)) {
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 <= (-9d+30)) .or. (.not. (y_46im <= 2.5d-45))) 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 <= -9e+30) || !(y_46_im <= 2.5e-45)) {
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 <= -9e+30) or not (y_46_im <= 2.5e-45): 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 <= -9e+30) || !(y_46_im <= 2.5e-45)) 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 <= -9e+30) || ~((y_46_im <= 2.5e-45))) 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, -9e+30], N[Not[LessEqual[y$46$im, 2.5e-45]], $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 -9 \cdot 10^{+30} \lor \neg \left(y.im \leq 2.5 \cdot 10^{-45}\right):\\
\;\;\;\;\frac{x.re}{-y.im}\\
\mathbf{else}:\\
\;\;\;\;\frac{x.im}{y.re}\\
\end{array}
\end{array}
if y.im < -8.9999999999999999e30 or 2.49999999999999988e-45 < y.im Initial program 47.3%
Taylor expanded in y.re around 0 66.9%
associate-*r/66.9%
neg-mul-166.9%
Simplified66.9%
if -8.9999999999999999e30 < y.im < 2.49999999999999988e-45Initial program 70.7%
Taylor expanded in y.re around inf 69.8%
Final simplification68.2%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (or (<= y.im -2.15e+181) (not (<= y.im 2e+94))) (/ 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 <= -2.15e+181) || !(y_46_im <= 2e+94)) {
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 <= (-2.15d+181)) .or. (.not. (y_46im <= 2d+94))) 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 <= -2.15e+181) || !(y_46_im <= 2e+94)) {
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 <= -2.15e+181) or not (y_46_im <= 2e+94): 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 <= -2.15e+181) || !(y_46_im <= 2e+94)) tmp = 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 <= -2.15e+181) || ~((y_46_im <= 2e+94))) 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, -2.15e+181], N[Not[LessEqual[y$46$im, 2e+94]], $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 -2.15 \cdot 10^{+181} \lor \neg \left(y.im \leq 2 \cdot 10^{+94}\right):\\
\;\;\;\;\frac{x.re}{y.im}\\
\mathbf{else}:\\
\;\;\;\;\frac{x.im}{y.re}\\
\end{array}
\end{array}
if y.im < -2.14999999999999986e181 or 2e94 < y.im Initial program 36.2%
*-un-lft-identity36.2%
add-sqr-sqrt36.2%
times-frac36.2%
hypot-define36.2%
hypot-define63.6%
Applied egg-rr63.6%
Taylor expanded in y.im around -inf 54.1%
associate-*r/54.1%
*-commutative54.1%
neg-mul-154.1%
distribute-rgt-neg-in54.1%
Simplified54.1%
Taylor expanded in y.re around 0 32.2%
if -2.14999999999999986e181 < y.im < 2e94Initial program 68.1%
Taylor expanded in y.re around inf 56.1%
Final simplification48.6%
(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 58.0%
Taylor expanded in y.re around inf 42.0%
(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 58.0%
*-un-lft-identity58.0%
add-sqr-sqrt58.0%
times-frac57.9%
hypot-define57.9%
hypot-define74.4%
Applied egg-rr74.4%
Taylor expanded in y.im around -inf 32.3%
associate-*r/32.3%
*-commutative32.3%
neg-mul-132.3%
distribute-rgt-neg-in32.3%
Simplified32.3%
Taylor expanded in y.re around -inf 8.6%
herbie shell --seed 2024181
(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))))