
(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 8 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 (* y.re (/ y.re (* y.im y.im))))
(t_1 (+ (* y.im y.im) (* y.re y.re)))
(t_2 (- (* x.im y.re) (* y.im x.re))))
(if (<= y.im -2.55e+92)
(/ (+ (* (/ x.im y.im) (- y.re (* y.re t_0))) (* x.re (+ t_0 -1.0))) y.im)
(if (<= y.im -4.5e-118)
(* (/ 1.0 t_1) t_2)
(if (<= y.im 3.5e-57)
(- (/ x.im y.re) (* (/ y.im y.re) (/ x.re y.re)))
(if (<= y.im 1.82e+62)
(/ t_2 t_1)
(/ (- (* x.im (/ y.re y.im)) x.re) y.im)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * (y_46_re / (y_46_im * y_46_im));
double t_1 = (y_46_im * y_46_im) + (y_46_re * y_46_re);
double t_2 = (x_46_im * y_46_re) - (y_46_im * x_46_re);
double tmp;
if (y_46_im <= -2.55e+92) {
tmp = (((x_46_im / y_46_im) * (y_46_re - (y_46_re * t_0))) + (x_46_re * (t_0 + -1.0))) / y_46_im;
} else if (y_46_im <= -4.5e-118) {
tmp = (1.0 / t_1) * t_2;
} else if (y_46_im <= 3.5e-57) {
tmp = (x_46_im / y_46_re) - ((y_46_im / y_46_re) * (x_46_re / y_46_re));
} else if (y_46_im <= 1.82e+62) {
tmp = t_2 / t_1;
} else {
tmp = ((x_46_im * (y_46_re / y_46_im)) - x_46_re) / y_46_im;
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_0 = y_46re * (y_46re / (y_46im * y_46im))
t_1 = (y_46im * y_46im) + (y_46re * y_46re)
t_2 = (x_46im * y_46re) - (y_46im * x_46re)
if (y_46im <= (-2.55d+92)) then
tmp = (((x_46im / y_46im) * (y_46re - (y_46re * t_0))) + (x_46re * (t_0 + (-1.0d0)))) / y_46im
else if (y_46im <= (-4.5d-118)) then
tmp = (1.0d0 / t_1) * t_2
else if (y_46im <= 3.5d-57) then
tmp = (x_46im / y_46re) - ((y_46im / y_46re) * (x_46re / y_46re))
else if (y_46im <= 1.82d+62) then
tmp = t_2 / t_1
else
tmp = ((x_46im * (y_46re / y_46im)) - x_46re) / y_46im
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = y_46_re * (y_46_re / (y_46_im * y_46_im));
double t_1 = (y_46_im * y_46_im) + (y_46_re * y_46_re);
double t_2 = (x_46_im * y_46_re) - (y_46_im * x_46_re);
double tmp;
if (y_46_im <= -2.55e+92) {
tmp = (((x_46_im / y_46_im) * (y_46_re - (y_46_re * t_0))) + (x_46_re * (t_0 + -1.0))) / y_46_im;
} else if (y_46_im <= -4.5e-118) {
tmp = (1.0 / t_1) * t_2;
} else if (y_46_im <= 3.5e-57) {
tmp = (x_46_im / y_46_re) - ((y_46_im / y_46_re) * (x_46_re / y_46_re));
} else if (y_46_im <= 1.82e+62) {
tmp = t_2 / t_1;
} else {
tmp = ((x_46_im * (y_46_re / y_46_im)) - x_46_re) / y_46_im;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = y_46_re * (y_46_re / (y_46_im * y_46_im)) t_1 = (y_46_im * y_46_im) + (y_46_re * y_46_re) t_2 = (x_46_im * y_46_re) - (y_46_im * x_46_re) tmp = 0 if y_46_im <= -2.55e+92: tmp = (((x_46_im / y_46_im) * (y_46_re - (y_46_re * t_0))) + (x_46_re * (t_0 + -1.0))) / y_46_im elif y_46_im <= -4.5e-118: tmp = (1.0 / t_1) * t_2 elif y_46_im <= 3.5e-57: tmp = (x_46_im / y_46_re) - ((y_46_im / y_46_re) * (x_46_re / y_46_re)) elif y_46_im <= 1.82e+62: tmp = t_2 / t_1 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(y_46_re * Float64(y_46_re / Float64(y_46_im * y_46_im))) t_1 = Float64(Float64(y_46_im * y_46_im) + Float64(y_46_re * y_46_re)) t_2 = Float64(Float64(x_46_im * y_46_re) - Float64(y_46_im * x_46_re)) tmp = 0.0 if (y_46_im <= -2.55e+92) tmp = Float64(Float64(Float64(Float64(x_46_im / y_46_im) * Float64(y_46_re - Float64(y_46_re * t_0))) + Float64(x_46_re * Float64(t_0 + -1.0))) / y_46_im); elseif (y_46_im <= -4.5e-118) tmp = Float64(Float64(1.0 / t_1) * t_2); elseif (y_46_im <= 3.5e-57) tmp = Float64(Float64(x_46_im / y_46_re) - Float64(Float64(y_46_im / y_46_re) * Float64(x_46_re / y_46_re))); elseif (y_46_im <= 1.82e+62) tmp = Float64(t_2 / t_1); else tmp = Float64(Float64(Float64(x_46_im * Float64(y_46_re / y_46_im)) - x_46_re) / y_46_im); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = y_46_re * (y_46_re / (y_46_im * y_46_im)); t_1 = (y_46_im * y_46_im) + (y_46_re * y_46_re); t_2 = (x_46_im * y_46_re) - (y_46_im * x_46_re); tmp = 0.0; if (y_46_im <= -2.55e+92) tmp = (((x_46_im / y_46_im) * (y_46_re - (y_46_re * t_0))) + (x_46_re * (t_0 + -1.0))) / y_46_im; elseif (y_46_im <= -4.5e-118) tmp = (1.0 / t_1) * t_2; elseif (y_46_im <= 3.5e-57) tmp = (x_46_im / y_46_re) - ((y_46_im / y_46_re) * (x_46_re / y_46_re)); elseif (y_46_im <= 1.82e+62) tmp = t_2 / t_1; 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[(y$46$re * N[(y$46$re / N[(y$46$im * y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(y$46$im * y$46$im), $MachinePrecision] + N[(y$46$re * y$46$re), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x$46$im * y$46$re), $MachinePrecision] - N[(y$46$im * x$46$re), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -2.55e+92], N[(N[(N[(N[(x$46$im / y$46$im), $MachinePrecision] * N[(y$46$re - N[(y$46$re * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x$46$re * N[(t$95$0 + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y$46$im), $MachinePrecision], If[LessEqual[y$46$im, -4.5e-118], N[(N[(1.0 / t$95$1), $MachinePrecision] * t$95$2), $MachinePrecision], If[LessEqual[y$46$im, 3.5e-57], N[(N[(x$46$im / y$46$re), $MachinePrecision] - N[(N[(y$46$im / y$46$re), $MachinePrecision] * N[(x$46$re / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 1.82e+62], N[(t$95$2 / t$95$1), $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 := y.re \cdot \frac{y.re}{y.im \cdot y.im}\\
t_1 := y.im \cdot y.im + y.re \cdot y.re\\
t_2 := x.im \cdot y.re - y.im \cdot x.re\\
\mathbf{if}\;y.im \leq -2.55 \cdot 10^{+92}:\\
\;\;\;\;\frac{\frac{x.im}{y.im} \cdot \left(y.re - y.re \cdot t\_0\right) + x.re \cdot \left(t\_0 + -1\right)}{y.im}\\
\mathbf{elif}\;y.im \leq -4.5 \cdot 10^{-118}:\\
\;\;\;\;\frac{1}{t\_1} \cdot t\_2\\
\mathbf{elif}\;y.im \leq 3.5 \cdot 10^{-57}:\\
\;\;\;\;\frac{x.im}{y.re} - \frac{y.im}{y.re} \cdot \frac{x.re}{y.re}\\
\mathbf{elif}\;y.im \leq 1.82 \cdot 10^{+62}:\\
\;\;\;\;\frac{t\_2}{t\_1}\\
\mathbf{else}:\\
\;\;\;\;\frac{x.im \cdot \frac{y.re}{y.im} - x.re}{y.im}\\
\end{array}
\end{array}
if y.im < -2.5500000000000001e92Initial program 30.0%
Taylor expanded in y.im around inf
Simplified82.9%
if -2.5500000000000001e92 < y.im < -4.5e-118Initial program 86.2%
div-invN/A
*-commutativeN/A
flip3-+N/A
clear-numN/A
*-lowering-*.f64N/A
Applied egg-rr86.3%
if -4.5e-118 < y.im < 3.49999999999999991e-57Initial program 73.9%
div-invN/A
*-commutativeN/A
flip3-+N/A
clear-numN/A
*-lowering-*.f64N/A
Applied egg-rr73.8%
Taylor expanded in y.im around 0
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6489.7%
Simplified89.7%
*-commutativeN/A
times-fracN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f6494.6%
Applied egg-rr94.6%
if 3.49999999999999991e-57 < y.im < 1.81999999999999998e62Initial program 95.5%
if 1.81999999999999998e62 < y.im Initial program 39.7%
Taylor expanded in y.re around 0
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
unpow2N/A
associate-/r*N/A
div-subN/A
/-lowering-/.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6481.6%
Simplified81.6%
*-commutativeN/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f6483.7%
Applied egg-rr83.7%
Final simplification89.7%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0
(/ (- (* x.im y.re) (* y.im x.re)) (+ (* y.im y.im) (* y.re y.re)))))
(if (<= y.im -1.25e+42)
(/ (- (* (/ x.im y.im) y.re) x.re) y.im)
(if (<= y.im -3e-118)
t_0
(if (<= y.im 6.5e-61)
(- (/ x.im y.re) (* (/ y.im y.re) (/ x.re y.re)))
(if (<= y.im 2.1e+62)
t_0
(/ (- (* x.im (/ y.re y.im)) x.re) y.im)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = ((x_46_im * y_46_re) - (y_46_im * x_46_re)) / ((y_46_im * y_46_im) + (y_46_re * y_46_re));
double tmp;
if (y_46_im <= -1.25e+42) {
tmp = (((x_46_im / y_46_im) * y_46_re) - x_46_re) / y_46_im;
} else if (y_46_im <= -3e-118) {
tmp = t_0;
} else if (y_46_im <= 6.5e-61) {
tmp = (x_46_im / y_46_re) - ((y_46_im / y_46_re) * (x_46_re / y_46_re));
} else if (y_46_im <= 2.1e+62) {
tmp = t_0;
} else {
tmp = ((x_46_im * (y_46_re / y_46_im)) - x_46_re) / y_46_im;
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
real(8) :: tmp
t_0 = ((x_46im * y_46re) - (y_46im * x_46re)) / ((y_46im * y_46im) + (y_46re * y_46re))
if (y_46im <= (-1.25d+42)) then
tmp = (((x_46im / y_46im) * y_46re) - x_46re) / y_46im
else if (y_46im <= (-3d-118)) then
tmp = t_0
else if (y_46im <= 6.5d-61) then
tmp = (x_46im / y_46re) - ((y_46im / y_46re) * (x_46re / y_46re))
else if (y_46im <= 2.1d+62) then
tmp = t_0
else
tmp = ((x_46im * (y_46re / y_46im)) - x_46re) / y_46im
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = ((x_46_im * y_46_re) - (y_46_im * x_46_re)) / ((y_46_im * y_46_im) + (y_46_re * y_46_re));
double tmp;
if (y_46_im <= -1.25e+42) {
tmp = (((x_46_im / y_46_im) * y_46_re) - x_46_re) / y_46_im;
} else if (y_46_im <= -3e-118) {
tmp = t_0;
} else if (y_46_im <= 6.5e-61) {
tmp = (x_46_im / y_46_re) - ((y_46_im / y_46_re) * (x_46_re / y_46_re));
} else if (y_46_im <= 2.1e+62) {
tmp = t_0;
} else {
tmp = ((x_46_im * (y_46_re / y_46_im)) - x_46_re) / y_46_im;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = ((x_46_im * y_46_re) - (y_46_im * x_46_re)) / ((y_46_im * y_46_im) + (y_46_re * y_46_re)) tmp = 0 if y_46_im <= -1.25e+42: tmp = (((x_46_im / y_46_im) * y_46_re) - x_46_re) / y_46_im elif y_46_im <= -3e-118: tmp = t_0 elif y_46_im <= 6.5e-61: tmp = (x_46_im / y_46_re) - ((y_46_im / y_46_re) * (x_46_re / y_46_re)) elif y_46_im <= 2.1e+62: tmp = t_0 else: tmp = ((x_46_im * (y_46_re / y_46_im)) - x_46_re) / y_46_im return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(Float64(Float64(x_46_im * y_46_re) - Float64(y_46_im * x_46_re)) / Float64(Float64(y_46_im * y_46_im) + Float64(y_46_re * y_46_re))) tmp = 0.0 if (y_46_im <= -1.25e+42) tmp = Float64(Float64(Float64(Float64(x_46_im / y_46_im) * y_46_re) - x_46_re) / y_46_im); elseif (y_46_im <= -3e-118) tmp = t_0; elseif (y_46_im <= 6.5e-61) tmp = Float64(Float64(x_46_im / y_46_re) - Float64(Float64(y_46_im / y_46_re) * Float64(x_46_re / y_46_re))); elseif (y_46_im <= 2.1e+62) tmp = t_0; else tmp = Float64(Float64(Float64(x_46_im * Float64(y_46_re / y_46_im)) - x_46_re) / y_46_im); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = ((x_46_im * y_46_re) - (y_46_im * x_46_re)) / ((y_46_im * y_46_im) + (y_46_re * y_46_re)); tmp = 0.0; if (y_46_im <= -1.25e+42) tmp = (((x_46_im / y_46_im) * y_46_re) - x_46_re) / y_46_im; elseif (y_46_im <= -3e-118) tmp = t_0; elseif (y_46_im <= 6.5e-61) tmp = (x_46_im / y_46_re) - ((y_46_im / y_46_re) * (x_46_re / y_46_re)); elseif (y_46_im <= 2.1e+62) tmp = t_0; else tmp = ((x_46_im * (y_46_re / y_46_im)) - x_46_re) / y_46_im; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[(N[(x$46$im * y$46$re), $MachinePrecision] - N[(y$46$im * x$46$re), $MachinePrecision]), $MachinePrecision] / N[(N[(y$46$im * y$46$im), $MachinePrecision] + N[(y$46$re * y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -1.25e+42], N[(N[(N[(N[(x$46$im / y$46$im), $MachinePrecision] * y$46$re), $MachinePrecision] - x$46$re), $MachinePrecision] / y$46$im), $MachinePrecision], If[LessEqual[y$46$im, -3e-118], t$95$0, If[LessEqual[y$46$im, 6.5e-61], N[(N[(x$46$im / y$46$re), $MachinePrecision] - N[(N[(y$46$im / y$46$re), $MachinePrecision] * N[(x$46$re / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 2.1e+62], t$95$0, N[(N[(N[(x$46$im * N[(y$46$re / y$46$im), $MachinePrecision]), $MachinePrecision] - x$46$re), $MachinePrecision] / y$46$im), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x.im \cdot y.re - y.im \cdot x.re}{y.im \cdot y.im + y.re \cdot y.re}\\
\mathbf{if}\;y.im \leq -1.25 \cdot 10^{+42}:\\
\;\;\;\;\frac{\frac{x.im}{y.im} \cdot y.re - x.re}{y.im}\\
\mathbf{elif}\;y.im \leq -3 \cdot 10^{-118}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y.im \leq 6.5 \cdot 10^{-61}:\\
\;\;\;\;\frac{x.im}{y.re} - \frac{y.im}{y.re} \cdot \frac{x.re}{y.re}\\
\mathbf{elif}\;y.im \leq 2.1 \cdot 10^{+62}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{x.im \cdot \frac{y.re}{y.im} - x.re}{y.im}\\
\end{array}
\end{array}
if y.im < -1.25000000000000002e42Initial program 38.6%
Taylor expanded in y.re around 0
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
unpow2N/A
associate-/r*N/A
div-subN/A
/-lowering-/.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6468.0%
Simplified68.0%
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f6482.7%
Applied egg-rr82.7%
if -1.25000000000000002e42 < y.im < -3.00000000000000018e-118 or 6.4999999999999994e-61 < y.im < 2.1e62Initial program 90.9%
if -3.00000000000000018e-118 < y.im < 6.4999999999999994e-61Initial program 73.9%
div-invN/A
*-commutativeN/A
flip3-+N/A
clear-numN/A
*-lowering-*.f64N/A
Applied egg-rr73.8%
Taylor expanded in y.im around 0
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6489.7%
Simplified89.7%
*-commutativeN/A
times-fracN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f6494.6%
Applied egg-rr94.6%
if 2.1e62 < y.im Initial program 39.7%
Taylor expanded in y.re around 0
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
unpow2N/A
associate-/r*N/A
div-subN/A
/-lowering-/.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6481.6%
Simplified81.6%
*-commutativeN/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f6483.7%
Applied egg-rr83.7%
Final simplification89.6%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (<= y.im -6e-15)
(/ (- (* (/ x.im y.im) y.re) x.re) y.im)
(if (<= y.im 2.6e-53)
(/ (- 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 <= -6e-15) {
tmp = (((x_46_im / y_46_im) * y_46_re) - x_46_re) / y_46_im;
} else if (y_46_im <= 2.6e-53) {
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 <= (-6d-15)) then
tmp = (((x_46im / y_46im) * y_46re) - x_46re) / y_46im
else if (y_46im <= 2.6d-53) 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 <= -6e-15) {
tmp = (((x_46_im / y_46_im) * y_46_re) - x_46_re) / y_46_im;
} else if (y_46_im <= 2.6e-53) {
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 <= -6e-15: tmp = (((x_46_im / y_46_im) * y_46_re) - x_46_re) / y_46_im elif y_46_im <= 2.6e-53: 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 <= -6e-15) tmp = Float64(Float64(Float64(Float64(x_46_im / y_46_im) * y_46_re) - x_46_re) / y_46_im); elseif (y_46_im <= 2.6e-53) 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 <= -6e-15) tmp = (((x_46_im / y_46_im) * y_46_re) - x_46_re) / y_46_im; elseif (y_46_im <= 2.6e-53) 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, -6e-15], N[(N[(N[(N[(x$46$im / y$46$im), $MachinePrecision] * y$46$re), $MachinePrecision] - x$46$re), $MachinePrecision] / y$46$im), $MachinePrecision], If[LessEqual[y$46$im, 2.6e-53], 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 -6 \cdot 10^{-15}:\\
\;\;\;\;\frac{\frac{x.im}{y.im} \cdot y.re - x.re}{y.im}\\
\mathbf{elif}\;y.im \leq 2.6 \cdot 10^{-53}:\\
\;\;\;\;\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 < -6e-15Initial program 48.7%
Taylor expanded in y.re around 0
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
unpow2N/A
associate-/r*N/A
div-subN/A
/-lowering-/.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6466.4%
Simplified66.4%
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f6478.7%
Applied egg-rr78.7%
if -6e-15 < y.im < 2.59999999999999996e-53Initial program 75.2%
div-invN/A
*-commutativeN/A
flip3-+N/A
clear-numN/A
*-lowering-*.f64N/A
Applied egg-rr75.2%
Taylor expanded in y.im around 0
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6485.3%
Simplified85.3%
associate-/r*N/A
sub-divN/A
/-lowering-/.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6488.8%
Applied egg-rr88.8%
div-subN/A
*-commutativeN/A
associate-/r*N/A
associate-*r/N/A
*-commutativeN/A
associate-/r*N/A
associate-*l/N/A
sub-divN/A
/-lowering-/.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f6489.5%
Applied egg-rr89.5%
if 2.59999999999999996e-53 < y.im Initial program 60.5%
Taylor expanded in y.re around 0
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
unpow2N/A
associate-/r*N/A
div-subN/A
/-lowering-/.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6475.6%
Simplified75.6%
*-commutativeN/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f6476.9%
Applied egg-rr76.9%
Final simplification83.5%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (/ (- (* x.im (/ y.re y.im)) x.re) y.im)))
(if (<= y.im -1.05e-14)
t_0
(if (<= y.im 2.6e-53) (/ (- x.im (* x.re (/ y.im y.re))) y.re) 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_re / y_46_im)) - x_46_re) / y_46_im;
double tmp;
if (y_46_im <= -1.05e-14) {
tmp = t_0;
} else if (y_46_im <= 2.6e-53) {
tmp = (x_46_im - (x_46_re * (y_46_im / y_46_re))) / y_46_re;
} 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_46re / y_46im)) - x_46re) / y_46im
if (y_46im <= (-1.05d-14)) then
tmp = t_0
else if (y_46im <= 2.6d-53) then
tmp = (x_46im - (x_46re * (y_46im / y_46re))) / y_46re
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_re / y_46_im)) - x_46_re) / y_46_im;
double tmp;
if (y_46_im <= -1.05e-14) {
tmp = t_0;
} else if (y_46_im <= 2.6e-53) {
tmp = (x_46_im - (x_46_re * (y_46_im / y_46_re))) / y_46_re;
} 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_re / y_46_im)) - x_46_re) / y_46_im tmp = 0 if y_46_im <= -1.05e-14: tmp = t_0 elif y_46_im <= 2.6e-53: tmp = (x_46_im - (x_46_re * (y_46_im / y_46_re))) / y_46_re 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(x_46_im * Float64(y_46_re / y_46_im)) - x_46_re) / y_46_im) tmp = 0.0 if (y_46_im <= -1.05e-14) tmp = t_0; elseif (y_46_im <= 2.6e-53) tmp = Float64(Float64(x_46_im - Float64(x_46_re * Float64(y_46_im / y_46_re))) / y_46_re); 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_re / y_46_im)) - x_46_re) / y_46_im; tmp = 0.0; if (y_46_im <= -1.05e-14) tmp = t_0; elseif (y_46_im <= 2.6e-53) tmp = (x_46_im - (x_46_re * (y_46_im / y_46_re))) / y_46_re; 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[(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.05e-14], t$95$0, If[LessEqual[y$46$im, 2.6e-53], N[(N[(x$46$im - N[(x$46$re * N[(y$46$im / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y$46$re), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x.im \cdot \frac{y.re}{y.im} - x.re}{y.im}\\
\mathbf{if}\;y.im \leq -1.05 \cdot 10^{-14}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y.im \leq 2.6 \cdot 10^{-53}:\\
\;\;\;\;\frac{x.im - x.re \cdot \frac{y.im}{y.re}}{y.re}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if y.im < -1.0499999999999999e-14 or 2.59999999999999996e-53 < y.im Initial program 55.6%
Taylor expanded in y.re around 0
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
unpow2N/A
associate-/r*N/A
div-subN/A
/-lowering-/.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6471.8%
Simplified71.8%
*-commutativeN/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f6475.4%
Applied egg-rr75.4%
if -1.0499999999999999e-14 < y.im < 2.59999999999999996e-53Initial program 75.2%
div-invN/A
*-commutativeN/A
flip3-+N/A
clear-numN/A
*-lowering-*.f64N/A
Applied egg-rr75.2%
Taylor expanded in y.im around 0
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6485.3%
Simplified85.3%
associate-/r*N/A
sub-divN/A
/-lowering-/.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6488.8%
Applied egg-rr88.8%
div-subN/A
*-commutativeN/A
associate-/r*N/A
associate-*r/N/A
*-commutativeN/A
associate-/r*N/A
associate-*l/N/A
sub-divN/A
/-lowering-/.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f6489.5%
Applied egg-rr89.5%
Final simplification82.4%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (/ (- 0.0 x.re) y.im)))
(if (<= y.im -3.1e+31)
t_0
(if (<= y.im 6200000000.0)
(/ (- x.im (* x.re (/ y.im y.re))) y.re)
t_0))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = (0.0 - x_46_re) / y_46_im;
double tmp;
if (y_46_im <= -3.1e+31) {
tmp = t_0;
} else if (y_46_im <= 6200000000.0) {
tmp = (x_46_im - (x_46_re * (y_46_im / y_46_re))) / y_46_re;
} 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 = (0.0d0 - x_46re) / y_46im
if (y_46im <= (-3.1d+31)) then
tmp = t_0
else if (y_46im <= 6200000000.0d0) then
tmp = (x_46im - (x_46re * (y_46im / y_46re))) / y_46re
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 = (0.0 - x_46_re) / y_46_im;
double tmp;
if (y_46_im <= -3.1e+31) {
tmp = t_0;
} else if (y_46_im <= 6200000000.0) {
tmp = (x_46_im - (x_46_re * (y_46_im / y_46_re))) / y_46_re;
} else {
tmp = t_0;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = (0.0 - x_46_re) / y_46_im tmp = 0 if y_46_im <= -3.1e+31: tmp = t_0 elif y_46_im <= 6200000000.0: tmp = (x_46_im - (x_46_re * (y_46_im / y_46_re))) / y_46_re else: tmp = t_0 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(Float64(0.0 - x_46_re) / y_46_im) tmp = 0.0 if (y_46_im <= -3.1e+31) tmp = t_0; elseif (y_46_im <= 6200000000.0) tmp = Float64(Float64(x_46_im - Float64(x_46_re * Float64(y_46_im / y_46_re))) / y_46_re); 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 = (0.0 - x_46_re) / y_46_im; tmp = 0.0; if (y_46_im <= -3.1e+31) tmp = t_0; elseif (y_46_im <= 6200000000.0) tmp = (x_46_im - (x_46_re * (y_46_im / y_46_re))) / y_46_re; 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[(0.0 - x$46$re), $MachinePrecision] / y$46$im), $MachinePrecision]}, If[LessEqual[y$46$im, -3.1e+31], t$95$0, If[LessEqual[y$46$im, 6200000000.0], N[(N[(x$46$im - N[(x$46$re * N[(y$46$im / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y$46$re), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{0 - x.re}{y.im}\\
\mathbf{if}\;y.im \leq -3.1 \cdot 10^{+31}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y.im \leq 6200000000:\\
\;\;\;\;\frac{x.im - x.re \cdot \frac{y.im}{y.re}}{y.re}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if y.im < -3.1000000000000002e31 or 6.2e9 < y.im Initial program 45.5%
div-invN/A
flip3--N/A
clear-numN/A
frac-2negN/A
metadata-evalN/A
frac-timesN/A
metadata-evalN/A
/-lowering-/.f64N/A
Applied egg-rr45.4%
Taylor expanded in y.re around 0
/-lowering-/.f6467.5%
Simplified67.5%
div-invN/A
clear-numN/A
mul-1-negN/A
neg-lowering-neg.f64N/A
/-lowering-/.f6467.8%
Applied egg-rr67.8%
if -3.1000000000000002e31 < y.im < 6.2e9Initial program 78.7%
div-invN/A
*-commutativeN/A
flip3-+N/A
clear-numN/A
*-lowering-*.f64N/A
Applied egg-rr78.6%
Taylor expanded in y.im around 0
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6478.2%
Simplified78.2%
associate-/r*N/A
sub-divN/A
/-lowering-/.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6481.1%
Applied egg-rr81.1%
div-subN/A
*-commutativeN/A
associate-/r*N/A
associate-*r/N/A
*-commutativeN/A
associate-/r*N/A
associate-*l/N/A
sub-divN/A
/-lowering-/.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f6481.7%
Applied egg-rr81.7%
Final simplification76.1%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (/ (- 0.0 x.re) y.im)))
(if (<= y.im -1.2e+39)
t_0
(if (<= y.im 10500000000.0)
(/ (- x.im (* y.im (/ x.re y.re))) y.re)
t_0))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = (0.0 - x_46_re) / y_46_im;
double tmp;
if (y_46_im <= -1.2e+39) {
tmp = t_0;
} else if (y_46_im <= 10500000000.0) {
tmp = (x_46_im - (y_46_im * (x_46_re / y_46_re))) / y_46_re;
} 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 = (0.0d0 - x_46re) / y_46im
if (y_46im <= (-1.2d+39)) then
tmp = t_0
else if (y_46im <= 10500000000.0d0) then
tmp = (x_46im - (y_46im * (x_46re / y_46re))) / y_46re
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 = (0.0 - x_46_re) / y_46_im;
double tmp;
if (y_46_im <= -1.2e+39) {
tmp = t_0;
} else if (y_46_im <= 10500000000.0) {
tmp = (x_46_im - (y_46_im * (x_46_re / y_46_re))) / y_46_re;
} else {
tmp = t_0;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = (0.0 - x_46_re) / y_46_im tmp = 0 if y_46_im <= -1.2e+39: tmp = t_0 elif y_46_im <= 10500000000.0: tmp = (x_46_im - (y_46_im * (x_46_re / y_46_re))) / y_46_re else: tmp = t_0 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(Float64(0.0 - x_46_re) / y_46_im) tmp = 0.0 if (y_46_im <= -1.2e+39) tmp = t_0; elseif (y_46_im <= 10500000000.0) tmp = Float64(Float64(x_46_im - Float64(y_46_im * Float64(x_46_re / y_46_re))) / y_46_re); 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 = (0.0 - x_46_re) / y_46_im; tmp = 0.0; if (y_46_im <= -1.2e+39) tmp = t_0; elseif (y_46_im <= 10500000000.0) tmp = (x_46_im - (y_46_im * (x_46_re / y_46_re))) / y_46_re; 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[(0.0 - x$46$re), $MachinePrecision] / y$46$im), $MachinePrecision]}, If[LessEqual[y$46$im, -1.2e+39], t$95$0, If[LessEqual[y$46$im, 10500000000.0], N[(N[(x$46$im - N[(y$46$im * N[(x$46$re / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y$46$re), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{0 - x.re}{y.im}\\
\mathbf{if}\;y.im \leq -1.2 \cdot 10^{+39}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y.im \leq 10500000000:\\
\;\;\;\;\frac{x.im - y.im \cdot \frac{x.re}{y.re}}{y.re}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if y.im < -1.2e39 or 1.05e10 < y.im Initial program 45.5%
div-invN/A
flip3--N/A
clear-numN/A
frac-2negN/A
metadata-evalN/A
frac-timesN/A
metadata-evalN/A
/-lowering-/.f64N/A
Applied egg-rr45.4%
Taylor expanded in y.re around 0
/-lowering-/.f6467.5%
Simplified67.5%
div-invN/A
clear-numN/A
mul-1-negN/A
neg-lowering-neg.f64N/A
/-lowering-/.f6467.8%
Applied egg-rr67.8%
if -1.2e39 < y.im < 1.05e10Initial program 78.7%
div-invN/A
*-commutativeN/A
flip3-+N/A
clear-numN/A
*-lowering-*.f64N/A
Applied egg-rr78.6%
Taylor expanded in y.im around 0
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6478.2%
Simplified78.2%
times-fracN/A
associate-*r/N/A
sub-divN/A
/-lowering-/.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f6481.1%
Applied egg-rr81.1%
Final simplification75.8%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (<= y.re -8e-108) (/ x.im y.re) (if (<= y.re 21500000000000.0) (/ (- 0.0 x.re) y.im) (/ x.im y.re))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_re <= -8e-108) {
tmp = x_46_im / y_46_re;
} else if (y_46_re <= 21500000000000.0) {
tmp = (0.0 - 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_46re <= (-8d-108)) then
tmp = x_46im / y_46re
else if (y_46re <= 21500000000000.0d0) then
tmp = (0.0d0 - 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_re <= -8e-108) {
tmp = x_46_im / y_46_re;
} else if (y_46_re <= 21500000000000.0) {
tmp = (0.0 - 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_re <= -8e-108: tmp = x_46_im / y_46_re elif y_46_re <= 21500000000000.0: tmp = (0.0 - 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_re <= -8e-108) tmp = Float64(x_46_im / y_46_re); elseif (y_46_re <= 21500000000000.0) tmp = Float64(Float64(0.0 - 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_re <= -8e-108) tmp = x_46_im / y_46_re; elseif (y_46_re <= 21500000000000.0) tmp = (0.0 - 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[LessEqual[y$46$re, -8e-108], N[(x$46$im / y$46$re), $MachinePrecision], If[LessEqual[y$46$re, 21500000000000.0], N[(N[(0.0 - x$46$re), $MachinePrecision] / y$46$im), $MachinePrecision], N[(x$46$im / y$46$re), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq -8 \cdot 10^{-108}:\\
\;\;\;\;\frac{x.im}{y.re}\\
\mathbf{elif}\;y.re \leq 21500000000000:\\
\;\;\;\;\frac{0 - x.re}{y.im}\\
\mathbf{else}:\\
\;\;\;\;\frac{x.im}{y.re}\\
\end{array}
\end{array}
if y.re < -8.00000000000000032e-108 or 2.15e13 < y.re Initial program 58.4%
Taylor expanded in y.re around inf
/-lowering-/.f6461.3%
Simplified61.3%
if -8.00000000000000032e-108 < y.re < 2.15e13Initial program 73.3%
div-invN/A
flip3--N/A
clear-numN/A
frac-2negN/A
metadata-evalN/A
frac-timesN/A
metadata-evalN/A
/-lowering-/.f64N/A
Applied egg-rr73.2%
Taylor expanded in y.re around 0
/-lowering-/.f6464.7%
Simplified64.7%
div-invN/A
clear-numN/A
mul-1-negN/A
neg-lowering-neg.f64N/A
/-lowering-/.f6465.0%
Applied egg-rr65.0%
Final simplification63.0%
(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 65.3%
Taylor expanded in y.re around inf
/-lowering-/.f6440.4%
Simplified40.4%
herbie shell --seed 2024144
(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))))