
(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 (/ (- (* y.re (/ x.im y.im)) x.re) y.im)))
(if (<= y.im -1.8e+78)
t_0
(if (<= y.im -6.6e-152)
(/ (fma x.im y.re (* y.im (- x.re))) (fma y.im y.im (* y.re y.re)))
(if (<= y.im 5.2e-12) (/ (- 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 = ((y_46_re * (x_46_im / y_46_im)) - x_46_re) / y_46_im;
double tmp;
if (y_46_im <= -1.8e+78) {
tmp = t_0;
} else if (y_46_im <= -6.6e-152) {
tmp = fma(x_46_im, y_46_re, (y_46_im * -x_46_re)) / fma(y_46_im, y_46_im, (y_46_re * y_46_re));
} else if (y_46_im <= 5.2e-12) {
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(y_46_re * Float64(x_46_im / y_46_im)) - x_46_re) / y_46_im) tmp = 0.0 if (y_46_im <= -1.8e+78) tmp = t_0; elseif (y_46_im <= -6.6e-152) tmp = Float64(fma(x_46_im, y_46_re, Float64(y_46_im * Float64(-x_46_re))) / fma(y_46_im, y_46_im, Float64(y_46_re * y_46_re))); elseif (y_46_im <= 5.2e-12) 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
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = 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, -1.8e+78], t$95$0, If[LessEqual[y$46$im, -6.6e-152], N[(N[(x$46$im * y$46$re + N[(y$46$im * (-x$46$re)), $MachinePrecision]), $MachinePrecision] / N[(y$46$im * y$46$im + N[(y$46$re * y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 5.2e-12], 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{y.re \cdot \frac{x.im}{y.im} - x.re}{y.im}\\
\mathbf{if}\;y.im \leq -1.8 \cdot 10^{+78}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y.im \leq -6.6 \cdot 10^{-152}:\\
\;\;\;\;\frac{\mathsf{fma}\left(x.im, y.re, y.im \cdot \left(-x.re\right)\right)}{\mathsf{fma}\left(y.im, y.im, y.re \cdot y.re\right)}\\
\mathbf{elif}\;y.im \leq 5.2 \cdot 10^{-12}:\\
\;\;\;\;\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.8000000000000001e78 or 5.19999999999999965e-12 < y.im Initial program 44.1%
fma-neg44.1%
distribute-rgt-neg-out44.1%
+-commutative44.1%
fma-define44.1%
Simplified44.1%
Taylor expanded in y.re around 0 75.0%
+-commutative75.0%
mul-1-neg75.0%
unsub-neg75.0%
unpow275.0%
associate-/r*79.5%
div-sub79.5%
*-commutative79.5%
associate-/l*82.4%
Simplified82.4%
if -1.8000000000000001e78 < y.im < -6.59999999999999997e-152Initial program 79.6%
fma-neg79.6%
distribute-rgt-neg-out79.6%
+-commutative79.6%
fma-define79.7%
Simplified79.7%
if -6.59999999999999997e-152 < y.im < 5.19999999999999965e-12Initial program 66.0%
fma-neg66.0%
distribute-rgt-neg-out66.0%
+-commutative66.0%
fma-define66.0%
Simplified66.0%
Taylor expanded in y.re around inf 89.6%
mul-1-neg89.6%
unsub-neg89.6%
associate-/l*90.9%
Simplified90.9%
Final simplification85.3%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (/ (- (* y.re (/ x.im y.im)) x.re) y.im)))
(if (<= y.im -1.48e+78)
t_0
(if (<= y.im -3.4e-152)
(/ (- (* y.re x.im) (* y.im x.re)) (+ (* y.re y.re) (* y.im y.im)))
(if (<= y.im 6.5e-12) (/ (- 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 = ((y_46_re * (x_46_im / y_46_im)) - x_46_re) / y_46_im;
double tmp;
if (y_46_im <= -1.48e+78) {
tmp = t_0;
} else if (y_46_im <= -3.4e-152) {
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 if (y_46_im <= 6.5e-12) {
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 = ((y_46re * (x_46im / y_46im)) - x_46re) / y_46im
if (y_46im <= (-1.48d+78)) then
tmp = t_0
else if (y_46im <= (-3.4d-152)) then
tmp = ((y_46re * x_46im) - (y_46im * x_46re)) / ((y_46re * y_46re) + (y_46im * y_46im))
else if (y_46im <= 6.5d-12) 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 = ((y_46_re * (x_46_im / y_46_im)) - x_46_re) / y_46_im;
double tmp;
if (y_46_im <= -1.48e+78) {
tmp = t_0;
} else if (y_46_im <= -3.4e-152) {
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 if (y_46_im <= 6.5e-12) {
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 = ((y_46_re * (x_46_im / y_46_im)) - x_46_re) / y_46_im tmp = 0 if y_46_im <= -1.48e+78: tmp = t_0 elif y_46_im <= -3.4e-152: 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)) elif y_46_im <= 6.5e-12: 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(y_46_re * Float64(x_46_im / y_46_im)) - x_46_re) / y_46_im) tmp = 0.0 if (y_46_im <= -1.48e+78) tmp = t_0; elseif (y_46_im <= -3.4e-152) 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))); elseif (y_46_im <= 6.5e-12) 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 = ((y_46_re * (x_46_im / y_46_im)) - x_46_re) / y_46_im; tmp = 0.0; if (y_46_im <= -1.48e+78) tmp = t_0; elseif (y_46_im <= -3.4e-152) 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)); elseif (y_46_im <= 6.5e-12) 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[(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, -1.48e+78], t$95$0, If[LessEqual[y$46$im, -3.4e-152], 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], If[LessEqual[y$46$im, 6.5e-12], 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{y.re \cdot \frac{x.im}{y.im} - x.re}{y.im}\\
\mathbf{if}\;y.im \leq -1.48 \cdot 10^{+78}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y.im \leq -3.4 \cdot 10^{-152}:\\
\;\;\;\;\frac{y.re \cdot x.im - y.im \cdot x.re}{y.re \cdot y.re + y.im \cdot y.im}\\
\mathbf{elif}\;y.im \leq 6.5 \cdot 10^{-12}:\\
\;\;\;\;\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.47999999999999998e78 or 6.5000000000000002e-12 < y.im Initial program 44.1%
fma-neg44.1%
distribute-rgt-neg-out44.1%
+-commutative44.1%
fma-define44.1%
Simplified44.1%
Taylor expanded in y.re around 0 75.0%
+-commutative75.0%
mul-1-neg75.0%
unsub-neg75.0%
unpow275.0%
associate-/r*79.5%
div-sub79.5%
*-commutative79.5%
associate-/l*82.4%
Simplified82.4%
if -1.47999999999999998e78 < y.im < -3.39999999999999984e-152Initial program 79.6%
if -3.39999999999999984e-152 < y.im < 6.5000000000000002e-12Initial program 66.0%
fma-neg66.0%
distribute-rgt-neg-out66.0%
+-commutative66.0%
fma-define66.0%
Simplified66.0%
Taylor expanded in y.re around inf 89.6%
mul-1-neg89.6%
unsub-neg89.6%
associate-/l*90.9%
Simplified90.9%
Final simplification85.3%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (or (<= y.im -2.75e-41) (not (<= y.im 6.4e-12))) (/ (- (* x.im (/ y.re y.im)) x.re) y.im) (/ (- x.im (/ x.re (/ 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 <= -2.75e-41) || !(y_46_im <= 6.4e-12)) {
tmp = ((x_46_im * (y_46_re / y_46_im)) - x_46_re) / y_46_im;
} else {
tmp = (x_46_im - (x_46_re / (y_46_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 <= (-2.75d-41)) .or. (.not. (y_46im <= 6.4d-12))) then
tmp = ((x_46im * (y_46re / y_46im)) - x_46re) / y_46im
else
tmp = (x_46im - (x_46re / (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 <= -2.75e-41) || !(y_46_im <= 6.4e-12)) {
tmp = ((x_46_im * (y_46_re / y_46_im)) - x_46_re) / y_46_im;
} else {
tmp = (x_46_im - (x_46_re / (y_46_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 <= -2.75e-41) or not (y_46_im <= 6.4e-12): tmp = ((x_46_im * (y_46_re / y_46_im)) - x_46_re) / y_46_im else: tmp = (x_46_im - (x_46_re / (y_46_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 <= -2.75e-41) || !(y_46_im <= 6.4e-12)) tmp = Float64(Float64(Float64(x_46_im * Float64(y_46_re / y_46_im)) - x_46_re) / y_46_im); else tmp = Float64(Float64(x_46_im - Float64(x_46_re / Float64(y_46_re / 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 <= -2.75e-41) || ~((y_46_im <= 6.4e-12))) tmp = ((x_46_im * (y_46_re / y_46_im)) - x_46_re) / y_46_im; else tmp = (x_46_im - (x_46_re / (y_46_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[Or[LessEqual[y$46$im, -2.75e-41], N[Not[LessEqual[y$46$im, 6.4e-12]], $MachinePrecision]], N[(N[(N[(x$46$im * N[(y$46$re / y$46$im), $MachinePrecision]), $MachinePrecision] - x$46$re), $MachinePrecision] / y$46$im), $MachinePrecision], N[(N[(x$46$im - N[(x$46$re / N[(y$46$re / y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y$46$re), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.im \leq -2.75 \cdot 10^{-41} \lor \neg \left(y.im \leq 6.4 \cdot 10^{-12}\right):\\
\;\;\;\;\frac{x.im \cdot \frac{y.re}{y.im} - x.re}{y.im}\\
\mathbf{else}:\\
\;\;\;\;\frac{x.im - \frac{x.re}{\frac{y.re}{y.im}}}{y.re}\\
\end{array}
\end{array}
if y.im < -2.75000000000000011e-41 or 6.4000000000000002e-12 < y.im Initial program 49.2%
add-cbrt-cube44.2%
pow1/344.1%
pow344.1%
pow244.1%
pow-pow44.1%
metadata-eval44.1%
Applied egg-rr44.1%
Taylor expanded in y.im around inf 76.2%
+-commutative76.2%
mul-1-neg76.2%
unsub-neg76.2%
associate-/l*78.6%
Simplified78.6%
if -2.75000000000000011e-41 < y.im < 6.4000000000000002e-12Initial program 69.7%
fma-neg69.7%
distribute-rgt-neg-out69.7%
+-commutative69.7%
fma-define69.8%
Simplified69.8%
Taylor expanded in y.re around inf 83.1%
mul-1-neg83.1%
unsub-neg83.1%
associate-/l*84.1%
Simplified84.1%
Taylor expanded in x.re around 0 83.1%
associate-*l/83.4%
associate-/r/84.1%
Simplified84.1%
Final simplification81.4%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (or (<= y.im -8.0) (not (<= y.im 1.6e+73))) (/ x.re (- y.im)) (/ (- x.im (/ x.re (/ 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 <= -8.0) || !(y_46_im <= 1.6e+73)) {
tmp = x_46_re / -y_46_im;
} else {
tmp = (x_46_im - (x_46_re / (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 <= (-8.0d0)) .or. (.not. (y_46im <= 1.6d+73))) then
tmp = x_46re / -y_46im
else
tmp = (x_46im - (x_46re / (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 <= -8.0) || !(y_46_im <= 1.6e+73)) {
tmp = x_46_re / -y_46_im;
} else {
tmp = (x_46_im - (x_46_re / (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 <= -8.0) or not (y_46_im <= 1.6e+73): tmp = x_46_re / -y_46_im else: tmp = (x_46_im - (x_46_re / (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 <= -8.0) || !(y_46_im <= 1.6e+73)) tmp = Float64(x_46_re / Float64(-y_46_im)); else tmp = Float64(Float64(x_46_im - Float64(x_46_re / Float64(y_46_re / 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 <= -8.0) || ~((y_46_im <= 1.6e+73))) tmp = x_46_re / -y_46_im; else tmp = (x_46_im - (x_46_re / (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[Or[LessEqual[y$46$im, -8.0], N[Not[LessEqual[y$46$im, 1.6e+73]], $MachinePrecision]], N[(x$46$re / (-y$46$im)), $MachinePrecision], N[(N[(x$46$im - N[(x$46$re / N[(y$46$re / y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y$46$re), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.im \leq -8 \lor \neg \left(y.im \leq 1.6 \cdot 10^{+73}\right):\\
\;\;\;\;\frac{x.re}{-y.im}\\
\mathbf{else}:\\
\;\;\;\;\frac{x.im - \frac{x.re}{\frac{y.re}{y.im}}}{y.re}\\
\end{array}
\end{array}
if y.im < -8 or 1.59999999999999991e73 < y.im Initial program 43.1%
fma-neg43.1%
distribute-rgt-neg-out43.1%
+-commutative43.1%
fma-define43.1%
Simplified43.1%
Taylor expanded in y.re around 0 71.3%
associate-*r/71.3%
neg-mul-171.3%
Simplified71.3%
if -8 < y.im < 1.59999999999999991e73Initial program 69.8%
fma-neg69.8%
distribute-rgt-neg-out69.8%
+-commutative69.8%
fma-define69.8%
Simplified69.8%
Taylor expanded in y.re around inf 75.5%
mul-1-neg75.5%
unsub-neg75.5%
associate-/l*76.8%
Simplified76.8%
Taylor expanded in x.re around 0 75.5%
associate-*l/76.2%
associate-/r/76.9%
Simplified76.9%
Final simplification74.7%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (or (<= y.im -0.00125) (not (<= y.im 2.1e+73))) (/ 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 <= -0.00125) || !(y_46_im <= 2.1e+73)) {
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 <= (-0.00125d0)) .or. (.not. (y_46im <= 2.1d+73))) 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 <= -0.00125) || !(y_46_im <= 2.1e+73)) {
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 <= -0.00125) or not (y_46_im <= 2.1e+73): 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 <= -0.00125) || !(y_46_im <= 2.1e+73)) 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 <= -0.00125) || ~((y_46_im <= 2.1e+73))) 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, -0.00125], N[Not[LessEqual[y$46$im, 2.1e+73]], $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 -0.00125 \lor \neg \left(y.im \leq 2.1 \cdot 10^{+73}\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 < -0.00125000000000000003 or 2.1000000000000001e73 < y.im Initial program 43.1%
fma-neg43.1%
distribute-rgt-neg-out43.1%
+-commutative43.1%
fma-define43.1%
Simplified43.1%
Taylor expanded in y.re around 0 71.3%
associate-*r/71.3%
neg-mul-171.3%
Simplified71.3%
if -0.00125000000000000003 < y.im < 2.1000000000000001e73Initial program 69.8%
fma-neg69.8%
distribute-rgt-neg-out69.8%
+-commutative69.8%
fma-define69.8%
Simplified69.8%
Taylor expanded in y.re around inf 75.5%
mul-1-neg75.5%
unsub-neg75.5%
associate-/l*76.8%
Simplified76.8%
Final simplification74.7%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (<= y.im -1.06e-42)
(/ (- (/ x.im (/ y.im y.re)) x.re) y.im)
(if (<= y.im 6.2e-12)
(/ (- x.im (/ x.re (/ y.re y.im))) 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 <= -1.06e-42) {
tmp = ((x_46_im / (y_46_im / y_46_re)) - x_46_re) / y_46_im;
} else if (y_46_im <= 6.2e-12) {
tmp = (x_46_im - (x_46_re / (y_46_re / y_46_im))) / 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 <= (-1.06d-42)) then
tmp = ((x_46im / (y_46im / y_46re)) - x_46re) / y_46im
else if (y_46im <= 6.2d-12) then
tmp = (x_46im - (x_46re / (y_46re / y_46im))) / 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 <= -1.06e-42) {
tmp = ((x_46_im / (y_46_im / y_46_re)) - x_46_re) / y_46_im;
} else if (y_46_im <= 6.2e-12) {
tmp = (x_46_im - (x_46_re / (y_46_re / y_46_im))) / 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 <= -1.06e-42: tmp = ((x_46_im / (y_46_im / y_46_re)) - x_46_re) / y_46_im elif y_46_im <= 6.2e-12: tmp = (x_46_im - (x_46_re / (y_46_re / y_46_im))) / 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 <= -1.06e-42) tmp = Float64(Float64(Float64(x_46_im / Float64(y_46_im / y_46_re)) - x_46_re) / y_46_im); elseif (y_46_im <= 6.2e-12) tmp = Float64(Float64(x_46_im - Float64(x_46_re / Float64(y_46_re / y_46_im))) / 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 <= -1.06e-42) tmp = ((x_46_im / (y_46_im / y_46_re)) - x_46_re) / y_46_im; elseif (y_46_im <= 6.2e-12) tmp = (x_46_im - (x_46_re / (y_46_re / y_46_im))) / 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, -1.06e-42], N[(N[(N[(x$46$im / N[(y$46$im / y$46$re), $MachinePrecision]), $MachinePrecision] - x$46$re), $MachinePrecision] / y$46$im), $MachinePrecision], If[LessEqual[y$46$im, 6.2e-12], N[(N[(x$46$im - N[(x$46$re / N[(y$46$re / y$46$im), $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 -1.06 \cdot 10^{-42}:\\
\;\;\;\;\frac{\frac{x.im}{\frac{y.im}{y.re}} - x.re}{y.im}\\
\mathbf{elif}\;y.im \leq 6.2 \cdot 10^{-12}:\\
\;\;\;\;\frac{x.im - \frac{x.re}{\frac{y.re}{y.im}}}{y.re}\\
\mathbf{else}:\\
\;\;\;\;\frac{y.re \cdot \frac{x.im}{y.im} - x.re}{y.im}\\
\end{array}
\end{array}
if y.im < -1.0600000000000001e-42Initial program 42.7%
add-cbrt-cube40.9%
pow1/340.8%
pow340.8%
pow240.8%
pow-pow40.8%
metadata-eval40.8%
Applied egg-rr40.8%
Taylor expanded in y.im around inf 74.9%
+-commutative74.9%
mul-1-neg74.9%
unsub-neg74.9%
associate-/l*76.8%
Simplified76.8%
clear-num76.8%
un-div-inv76.8%
Applied egg-rr76.8%
if -1.0600000000000001e-42 < y.im < 6.2000000000000002e-12Initial program 69.7%
fma-neg69.7%
distribute-rgt-neg-out69.7%
+-commutative69.7%
fma-define69.8%
Simplified69.8%
Taylor expanded in y.re around inf 83.1%
mul-1-neg83.1%
unsub-neg83.1%
associate-/l*84.1%
Simplified84.1%
Taylor expanded in x.re around 0 83.1%
associate-*l/83.4%
associate-/r/84.1%
Simplified84.1%
if 6.2000000000000002e-12 < y.im Initial program 54.7%
fma-neg54.7%
distribute-rgt-neg-out54.7%
+-commutative54.7%
fma-define54.7%
Simplified54.7%
Taylor expanded in y.re around 0 73.2%
+-commutative73.2%
mul-1-neg73.2%
unsub-neg73.2%
unpow273.2%
associate-/r*77.3%
div-sub77.3%
*-commutative77.3%
associate-/l*80.2%
Simplified80.2%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (<= y.im -1.12e-41)
(/ (- (* x.im (/ y.re y.im)) x.re) y.im)
(if (<= y.im 5.2e-12)
(/ (- x.im (/ x.re (/ y.re y.im))) 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 <= -1.12e-41) {
tmp = ((x_46_im * (y_46_re / y_46_im)) - x_46_re) / y_46_im;
} else if (y_46_im <= 5.2e-12) {
tmp = (x_46_im - (x_46_re / (y_46_re / y_46_im))) / 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 <= (-1.12d-41)) then
tmp = ((x_46im * (y_46re / y_46im)) - x_46re) / y_46im
else if (y_46im <= 5.2d-12) then
tmp = (x_46im - (x_46re / (y_46re / y_46im))) / 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 <= -1.12e-41) {
tmp = ((x_46_im * (y_46_re / y_46_im)) - x_46_re) / y_46_im;
} else if (y_46_im <= 5.2e-12) {
tmp = (x_46_im - (x_46_re / (y_46_re / y_46_im))) / 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 <= -1.12e-41: tmp = ((x_46_im * (y_46_re / y_46_im)) - x_46_re) / y_46_im elif y_46_im <= 5.2e-12: tmp = (x_46_im - (x_46_re / (y_46_re / y_46_im))) / 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 <= -1.12e-41) tmp = Float64(Float64(Float64(x_46_im * Float64(y_46_re / y_46_im)) - x_46_re) / y_46_im); elseif (y_46_im <= 5.2e-12) tmp = Float64(Float64(x_46_im - Float64(x_46_re / Float64(y_46_re / y_46_im))) / 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 <= -1.12e-41) tmp = ((x_46_im * (y_46_re / y_46_im)) - x_46_re) / y_46_im; elseif (y_46_im <= 5.2e-12) tmp = (x_46_im - (x_46_re / (y_46_re / y_46_im))) / 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, -1.12e-41], 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, 5.2e-12], N[(N[(x$46$im - N[(x$46$re / N[(y$46$re / y$46$im), $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 -1.12 \cdot 10^{-41}:\\
\;\;\;\;\frac{x.im \cdot \frac{y.re}{y.im} - x.re}{y.im}\\
\mathbf{elif}\;y.im \leq 5.2 \cdot 10^{-12}:\\
\;\;\;\;\frac{x.im - \frac{x.re}{\frac{y.re}{y.im}}}{y.re}\\
\mathbf{else}:\\
\;\;\;\;\frac{y.re \cdot \frac{x.im}{y.im} - x.re}{y.im}\\
\end{array}
\end{array}
if y.im < -1.11999999999999999e-41Initial program 42.7%
add-cbrt-cube40.9%
pow1/340.8%
pow340.8%
pow240.8%
pow-pow40.8%
metadata-eval40.8%
Applied egg-rr40.8%
Taylor expanded in y.im around inf 74.9%
+-commutative74.9%
mul-1-neg74.9%
unsub-neg74.9%
associate-/l*76.8%
Simplified76.8%
if -1.11999999999999999e-41 < y.im < 5.19999999999999965e-12Initial program 69.7%
fma-neg69.7%
distribute-rgt-neg-out69.7%
+-commutative69.7%
fma-define69.8%
Simplified69.8%
Taylor expanded in y.re around inf 83.1%
mul-1-neg83.1%
unsub-neg83.1%
associate-/l*84.1%
Simplified84.1%
Taylor expanded in x.re around 0 83.1%
associate-*l/83.4%
associate-/r/84.1%
Simplified84.1%
if 5.19999999999999965e-12 < y.im Initial program 54.7%
fma-neg54.7%
distribute-rgt-neg-out54.7%
+-commutative54.7%
fma-define54.7%
Simplified54.7%
Taylor expanded in y.re around 0 73.2%
+-commutative73.2%
mul-1-neg73.2%
unsub-neg73.2%
unpow273.2%
associate-/r*77.3%
div-sub77.3%
*-commutative77.3%
associate-/l*80.2%
Simplified80.2%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (or (<= y.re -8e+19) (not (<= y.re 1.04e+71))) (/ 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_re <= -8e+19) || !(y_46_re <= 1.04e+71)) {
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_46re <= (-8d+19)) .or. (.not. (y_46re <= 1.04d+71))) 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_re <= -8e+19) || !(y_46_re <= 1.04e+71)) {
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_re <= -8e+19) or not (y_46_re <= 1.04e+71): 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_re <= -8e+19) || !(y_46_re <= 1.04e+71)) tmp = Float64(x_46_im / y_46_re); else tmp = Float64(x_46_re / Float64(-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_re <= -8e+19) || ~((y_46_re <= 1.04e+71))) 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[Or[LessEqual[y$46$re, -8e+19], N[Not[LessEqual[y$46$re, 1.04e+71]], $MachinePrecision]], 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.re \leq -8 \cdot 10^{+19} \lor \neg \left(y.re \leq 1.04 \cdot 10^{+71}\right):\\
\;\;\;\;\frac{x.im}{y.re}\\
\mathbf{else}:\\
\;\;\;\;\frac{x.re}{-y.im}\\
\end{array}
\end{array}
if y.re < -8e19 or 1.04e71 < y.re Initial program 46.5%
fma-neg46.5%
distribute-rgt-neg-out46.5%
+-commutative46.5%
fma-define46.5%
Simplified46.5%
Taylor expanded in y.re around inf 73.4%
if -8e19 < y.re < 1.04e71Initial program 69.7%
fma-neg69.7%
distribute-rgt-neg-out69.7%
+-commutative69.7%
fma-define69.7%
Simplified69.7%
Taylor expanded in y.re around 0 63.0%
associate-*r/63.0%
neg-mul-163.0%
Simplified63.0%
Final simplification67.6%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (<= y.im 1.18e+131) (/ 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.18e+131) {
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.18d+131) 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.18e+131) {
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.18e+131: 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.18e+131) 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.18e+131) 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.18e+131], 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.18 \cdot 10^{+131}:\\
\;\;\;\;\frac{x.im}{y.re}\\
\mathbf{else}:\\
\;\;\;\;\frac{x.re}{y.im}\\
\end{array}
\end{array}
if y.im < 1.18e131Initial program 63.1%
fma-neg63.1%
distribute-rgt-neg-out63.1%
+-commutative63.1%
fma-define63.1%
Simplified63.1%
Taylor expanded in y.re around inf 50.0%
if 1.18e131 < y.im Initial program 37.7%
fma-neg37.7%
distribute-rgt-neg-out37.7%
+-commutative37.7%
fma-define37.7%
Simplified37.7%
Taylor expanded in y.re around 0 77.2%
associate-*r/77.2%
neg-mul-177.2%
Simplified77.2%
*-un-lft-identity77.2%
*-commutative77.2%
add-sqr-sqrt41.6%
sqrt-unprod44.1%
sqr-neg44.1%
sqrt-unprod13.6%
add-sqr-sqrt28.1%
Applied egg-rr28.1%
*-rgt-identity28.1%
Simplified28.1%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (<= y.im 7.8e+124) (/ x.im y.re) (/ x.im y.im)))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_im <= 7.8e+124) {
tmp = x_46_im / y_46_re;
} else {
tmp = x_46_im / y_46_im;
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: tmp
if (y_46im <= 7.8d+124) then
tmp = x_46im / y_46re
else
tmp = x_46im / y_46im
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_im <= 7.8e+124) {
tmp = x_46_im / y_46_re;
} else {
tmp = x_46_im / y_46_im;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if y_46_im <= 7.8e+124: tmp = x_46_im / y_46_re else: tmp = x_46_im / y_46_im return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if (y_46_im <= 7.8e+124) tmp = Float64(x_46_im / y_46_re); else tmp = Float64(x_46_im / y_46_im); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if (y_46_im <= 7.8e+124) tmp = x_46_im / y_46_re; else tmp = x_46_im / y_46_im; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[y$46$im, 7.8e+124], N[(x$46$im / y$46$re), $MachinePrecision], N[(x$46$im / y$46$im), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.im \leq 7.8 \cdot 10^{+124}:\\
\;\;\;\;\frac{x.im}{y.re}\\
\mathbf{else}:\\
\;\;\;\;\frac{x.im}{y.im}\\
\end{array}
\end{array}
if y.im < 7.8000000000000001e124Initial program 62.6%
fma-neg62.6%
distribute-rgt-neg-out62.6%
+-commutative62.6%
fma-define62.6%
Simplified62.6%
Taylor expanded in y.re around inf 50.2%
if 7.8000000000000001e124 < y.im Initial program 42.4%
fma-neg42.4%
distribute-rgt-neg-out42.4%
+-commutative42.4%
fma-define42.4%
Simplified42.4%
Taylor expanded in x.im around inf 40.6%
*-commutative40.6%
Simplified40.6%
add-sqr-sqrt40.6%
times-frac41.0%
fma-undefine41.0%
hypot-define41.0%
fma-undefine41.0%
hypot-define53.0%
Applied egg-rr53.0%
Taylor expanded in y.im around -inf 31.6%
neg-mul-131.6%
distribute-neg-frac31.6%
Simplified31.6%
Taylor expanded in y.re around -inf 16.9%
(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 59.6%
fma-neg59.6%
distribute-rgt-neg-out59.6%
+-commutative59.6%
fma-define59.6%
Simplified59.6%
Taylor expanded in x.im around inf 39.2%
*-commutative39.2%
Simplified39.2%
add-sqr-sqrt39.2%
times-frac41.6%
fma-undefine41.6%
hypot-define41.6%
fma-undefine41.6%
hypot-define58.8%
Applied egg-rr58.8%
Taylor expanded in y.im around -inf 17.8%
neg-mul-117.8%
distribute-neg-frac17.8%
Simplified17.8%
Taylor expanded in y.re around -inf 7.8%
herbie shell --seed 2024137
(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))))