
(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 13 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 -1e+138)
(/ (- (* y.re (/ x.im y.im)) x.re) y.im)
(if (<= y.im -3.3e-128)
(/ (- (* x.im y.re) (* x.re y.im)) (+ (* y.re y.re) (* y.im y.im)))
(if (<= y.im 4.6e-8)
(/ (- x.im (/ (* x.re y.im) y.re)) y.re)
(/ (fma y.re (/ 1.0 (/ 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 <= -1e+138) {
tmp = ((y_46_re * (x_46_im / y_46_im)) - x_46_re) / y_46_im;
} else if (y_46_im <= -3.3e-128) {
tmp = ((x_46_im * y_46_re) - (x_46_re * y_46_im)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im));
} else if (y_46_im <= 4.6e-8) {
tmp = (x_46_im - ((x_46_re * y_46_im) / y_46_re)) / y_46_re;
} else {
tmp = fma(y_46_re, (1.0 / (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 <= -1e+138) tmp = Float64(Float64(Float64(y_46_re * Float64(x_46_im / y_46_im)) - x_46_re) / y_46_im); elseif (y_46_im <= -3.3e-128) tmp = Float64(Float64(Float64(x_46_im * y_46_re) - Float64(x_46_re * y_46_im)) / Float64(Float64(y_46_re * y_46_re) + Float64(y_46_im * y_46_im))); elseif (y_46_im <= 4.6e-8) tmp = Float64(Float64(x_46_im - Float64(Float64(x_46_re * y_46_im) / y_46_re)) / y_46_re); else tmp = Float64(fma(y_46_re, Float64(1.0 / Float64(y_46_im / x_46_im)), Float64(-x_46_re)) / y_46_im); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[y$46$im, -1e+138], 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, -3.3e-128], N[(N[(N[(x$46$im * y$46$re), $MachinePrecision] - N[(x$46$re * y$46$im), $MachinePrecision]), $MachinePrecision] / N[(N[(y$46$re * y$46$re), $MachinePrecision] + N[(y$46$im * y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 4.6e-8], N[(N[(x$46$im - N[(N[(x$46$re * y$46$im), $MachinePrecision] / y$46$re), $MachinePrecision]), $MachinePrecision] / y$46$re), $MachinePrecision], N[(N[(y$46$re * N[(1.0 / 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 -1 \cdot 10^{+138}:\\
\;\;\;\;\frac{y.re \cdot \frac{x.im}{y.im} - x.re}{y.im}\\
\mathbf{elif}\;y.im \leq -3.3 \cdot 10^{-128}:\\
\;\;\;\;\frac{x.im \cdot y.re - x.re \cdot y.im}{y.re \cdot y.re + y.im \cdot y.im}\\
\mathbf{elif}\;y.im \leq 4.6 \cdot 10^{-8}:\\
\;\;\;\;\frac{x.im - \frac{x.re \cdot y.im}{y.re}}{y.re}\\
\mathbf{else}:\\
\;\;\;\;\frac{\mathsf{fma}\left(y.re, \frac{1}{\frac{y.im}{x.im}}, -x.re\right)}{y.im}\\
\end{array}
\end{array}
if y.im < -1e138Initial program 22.3%
*-un-lft-identity22.3%
add-sqr-sqrt22.3%
times-frac22.3%
hypot-define22.3%
hypot-define52.3%
Applied egg-rr52.3%
Taylor expanded in y.im around inf 87.8%
+-commutative87.8%
*-commutative87.8%
associate-*r/90.4%
neg-mul-190.4%
sub-neg90.4%
Simplified90.4%
if -1e138 < y.im < -3.3e-128Initial program 87.5%
if -3.3e-128 < y.im < 4.6000000000000002e-8Initial program 70.3%
Taylor expanded in y.re around inf 91.0%
remove-double-neg91.0%
mul-1-neg91.0%
mul-1-neg91.0%
distribute-neg-in91.0%
distribute-neg-in91.0%
mul-1-neg91.0%
remove-double-neg91.0%
mul-1-neg91.0%
associate-*r/91.0%
associate-*r*91.0%
mul-1-neg91.0%
Simplified91.0%
if 4.6000000000000002e-8 < y.im Initial program 57.9%
Taylor expanded in y.re around 0 78.0%
+-commutative78.0%
mul-1-neg78.0%
unsub-neg78.0%
unpow278.0%
associate-/r*80.5%
div-sub80.5%
*-commutative80.5%
associate-/l*84.5%
fmm-def84.4%
Simplified84.4%
clear-num84.5%
inv-pow84.5%
Applied egg-rr84.5%
unpow-184.5%
Simplified84.5%
Final simplification88.6%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (- (* x.im y.re) (* x.re y.im))))
(if (<= (/ t_0 (+ (* y.re y.re) (* y.im y.im))) INFINITY)
(* (/ 1.0 (hypot y.re y.im)) (/ t_0 (hypot y.re y.im)))
(/ (fma y.re (/ 1.0 (/ 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 = (x_46_im * y_46_re) - (x_46_re * y_46_im);
double tmp;
if ((t_0 / ((y_46_re * y_46_re) + (y_46_im * y_46_im))) <= ((double) INFINITY)) {
tmp = (1.0 / hypot(y_46_re, y_46_im)) * (t_0 / hypot(y_46_re, y_46_im));
} else {
tmp = fma(y_46_re, (1.0 / (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(x_46_im * y_46_re) - Float64(x_46_re * y_46_im)) tmp = 0.0 if (Float64(t_0 / Float64(Float64(y_46_re * y_46_re) + Float64(y_46_im * y_46_im))) <= Inf) 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(fma(y_46_re, Float64(1.0 / Float64(y_46_im / x_46_im)), Float64(-x_46_re)) / y_46_im); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[(x$46$im * y$46$re), $MachinePrecision] - N[(x$46$re * y$46$im), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(t$95$0 / N[(N[(y$46$re * y$46$re), $MachinePrecision] + N[(y$46$im * y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], Infinity], 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[(y$46$re * N[(1.0 / N[(y$46$im / x$46$im), $MachinePrecision]), $MachinePrecision] + (-x$46$re)), $MachinePrecision] / y$46$im), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x.im \cdot y.re - x.re \cdot y.im\\
\mathbf{if}\;\frac{t\_0}{y.re \cdot y.re + y.im \cdot y.im} \leq \infty:\\
\;\;\;\;\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{\mathsf{fma}\left(y.re, \frac{1}{\frac{y.im}{x.im}}, -x.re\right)}{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))) < +inf.0Initial program 79.5%
*-un-lft-identity79.5%
add-sqr-sqrt79.4%
times-frac79.4%
hypot-define79.4%
hypot-define95.5%
Applied egg-rr95.5%
if +inf.0 < (/.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 0.0%
Taylor expanded in y.re around 0 45.2%
+-commutative45.2%
mul-1-neg45.2%
unsub-neg45.2%
unpow245.2%
associate-/r*47.7%
div-sub47.8%
*-commutative47.8%
associate-/l*53.7%
fmm-def53.7%
Simplified53.7%
clear-num53.7%
inv-pow53.7%
Applied egg-rr53.7%
unpow-153.7%
Simplified53.7%
(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 -2.7e+138)
t_0
(if (<= y.im -9.5e-129)
(/ (- (* x.im y.re) (* x.re y.im)) (+ (* y.re y.re) (* y.im y.im)))
(if (<= y.im 8.8e-11) (/ (- 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 <= -2.7e+138) {
tmp = t_0;
} else if (y_46_im <= -9.5e-129) {
tmp = ((x_46_im * y_46_re) - (x_46_re * y_46_im)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im));
} else if (y_46_im <= 8.8e-11) {
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 <= (-2.7d+138)) then
tmp = t_0
else if (y_46im <= (-9.5d-129)) then
tmp = ((x_46im * y_46re) - (x_46re * y_46im)) / ((y_46re * y_46re) + (y_46im * y_46im))
else if (y_46im <= 8.8d-11) 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 <= -2.7e+138) {
tmp = t_0;
} else if (y_46_im <= -9.5e-129) {
tmp = ((x_46_im * y_46_re) - (x_46_re * y_46_im)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im));
} else if (y_46_im <= 8.8e-11) {
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 <= -2.7e+138: tmp = t_0 elif y_46_im <= -9.5e-129: tmp = ((x_46_im * y_46_re) - (x_46_re * y_46_im)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im)) elif y_46_im <= 8.8e-11: 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 <= -2.7e+138) tmp = t_0; elseif (y_46_im <= -9.5e-129) tmp = Float64(Float64(Float64(x_46_im * y_46_re) - Float64(x_46_re * y_46_im)) / Float64(Float64(y_46_re * y_46_re) + Float64(y_46_im * y_46_im))); elseif (y_46_im <= 8.8e-11) tmp = Float64(Float64(x_46_im - Float64(Float64(x_46_re * 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 <= -2.7e+138) tmp = t_0; elseif (y_46_im <= -9.5e-129) tmp = ((x_46_im * y_46_re) - (x_46_re * y_46_im)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im)); elseif (y_46_im <= 8.8e-11) 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, -2.7e+138], t$95$0, If[LessEqual[y$46$im, -9.5e-129], N[(N[(N[(x$46$im * y$46$re), $MachinePrecision] - N[(x$46$re * y$46$im), $MachinePrecision]), $MachinePrecision] / N[(N[(y$46$re * y$46$re), $MachinePrecision] + N[(y$46$im * y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 8.8e-11], N[(N[(x$46$im - N[(N[(x$46$re * y$46$im), $MachinePrecision] / y$46$re), $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 -2.7 \cdot 10^{+138}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y.im \leq -9.5 \cdot 10^{-129}:\\
\;\;\;\;\frac{x.im \cdot y.re - x.re \cdot y.im}{y.re \cdot y.re + y.im \cdot y.im}\\
\mathbf{elif}\;y.im \leq 8.8 \cdot 10^{-11}:\\
\;\;\;\;\frac{x.im - \frac{x.re \cdot y.im}{y.re}}{y.re}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if y.im < -2.70000000000000009e138 or 8.8000000000000006e-11 < y.im Initial program 43.3%
*-un-lft-identity43.3%
add-sqr-sqrt43.3%
times-frac43.2%
hypot-define43.2%
hypot-define62.9%
Applied egg-rr62.9%
Taylor expanded in y.im around inf 83.5%
+-commutative83.5%
*-commutative83.5%
associate-*r/86.9%
neg-mul-186.9%
sub-neg86.9%
Simplified86.9%
if -2.70000000000000009e138 < y.im < -9.5000000000000006e-129Initial program 87.5%
if -9.5000000000000006e-129 < y.im < 8.8000000000000006e-11Initial program 70.3%
Taylor expanded in y.re around inf 91.0%
remove-double-neg91.0%
mul-1-neg91.0%
mul-1-neg91.0%
distribute-neg-in91.0%
distribute-neg-in91.0%
mul-1-neg91.0%
remove-double-neg91.0%
mul-1-neg91.0%
associate-*r/91.0%
associate-*r*91.0%
mul-1-neg91.0%
Simplified91.0%
Final simplification88.6%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (<= y.re -4.4e+32)
(- (/ x.im y.re) (/ (* y.im (/ x.re y.re)) y.re))
(if (<= y.re 8.8e-11)
(/ (- (* x.im (/ y.re y.im)) x.re) y.im)
(- (/ x.im y.re) (* 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_re <= -4.4e+32) {
tmp = (x_46_im / y_46_re) - ((y_46_im * (x_46_re / y_46_re)) / y_46_re);
} else if (y_46_re <= 8.8e-11) {
tmp = ((x_46_im * (y_46_re / y_46_im)) - x_46_re) / y_46_im;
} else {
tmp = (x_46_im / y_46_re) - (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_46re <= (-4.4d+32)) then
tmp = (x_46im / y_46re) - ((y_46im * (x_46re / y_46re)) / y_46re)
else if (y_46re <= 8.8d-11) then
tmp = ((x_46im * (y_46re / y_46im)) - x_46re) / y_46im
else
tmp = (x_46im / y_46re) - (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_re <= -4.4e+32) {
tmp = (x_46_im / y_46_re) - ((y_46_im * (x_46_re / y_46_re)) / y_46_re);
} else if (y_46_re <= 8.8e-11) {
tmp = ((x_46_im * (y_46_re / y_46_im)) - x_46_re) / y_46_im;
} else {
tmp = (x_46_im / y_46_re) - (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_re <= -4.4e+32: tmp = (x_46_im / y_46_re) - ((y_46_im * (x_46_re / y_46_re)) / y_46_re) elif y_46_re <= 8.8e-11: tmp = ((x_46_im * (y_46_re / y_46_im)) - x_46_re) / y_46_im else: tmp = (x_46_im / y_46_re) - (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_re <= -4.4e+32) tmp = Float64(Float64(x_46_im / y_46_re) - Float64(Float64(y_46_im * Float64(x_46_re / y_46_re)) / y_46_re)); elseif (y_46_re <= 8.8e-11) 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 / y_46_re) - Float64(y_46_im * Float64(Float64(x_46_re / y_46_re) / y_46_re))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if (y_46_re <= -4.4e+32) tmp = (x_46_im / y_46_re) - ((y_46_im * (x_46_re / y_46_re)) / y_46_re); elseif (y_46_re <= 8.8e-11) tmp = ((x_46_im * (y_46_re / y_46_im)) - x_46_re) / y_46_im; else tmp = (x_46_im / y_46_re) - (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[LessEqual[y$46$re, -4.4e+32], N[(N[(x$46$im / y$46$re), $MachinePrecision] - N[(N[(y$46$im * N[(x$46$re / y$46$re), $MachinePrecision]), $MachinePrecision] / y$46$re), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 8.8e-11], 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 / y$46$re), $MachinePrecision] - N[(y$46$im * N[(N[(x$46$re / y$46$re), $MachinePrecision] / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq -4.4 \cdot 10^{+32}:\\
\;\;\;\;\frac{x.im}{y.re} - \frac{y.im \cdot \frac{x.re}{y.re}}{y.re}\\
\mathbf{elif}\;y.re \leq 8.8 \cdot 10^{-11}:\\
\;\;\;\;\frac{x.im \cdot \frac{y.re}{y.im} - x.re}{y.im}\\
\mathbf{else}:\\
\;\;\;\;\frac{x.im}{y.re} - y.im \cdot \frac{\frac{x.re}{y.re}}{y.re}\\
\end{array}
\end{array}
if y.re < -4.40000000000000002e32Initial program 56.4%
Taylor expanded in y.re around inf 75.9%
remove-double-neg75.9%
mul-1-neg75.9%
mul-1-neg75.9%
distribute-neg-in75.9%
distribute-neg-in75.9%
mul-1-neg75.9%
remove-double-neg75.9%
unsub-neg75.9%
associate-/l*81.7%
Simplified81.7%
clear-num81.7%
un-div-inv81.7%
Applied egg-rr81.7%
div-sub81.7%
associate-/r/83.2%
*-commutative83.2%
Applied egg-rr83.2%
if -4.40000000000000002e32 < y.re < 8.8000000000000006e-11Initial program 69.7%
*-un-lft-identity69.7%
add-sqr-sqrt69.7%
times-frac69.6%
hypot-define69.6%
hypot-define82.8%
Applied egg-rr82.8%
Taylor expanded in y.im around inf 80.9%
+-commutative80.9%
*-commutative80.9%
associate-*r/78.9%
neg-mul-178.9%
sub-neg78.9%
Simplified78.9%
clear-num78.9%
un-div-inv78.9%
Applied egg-rr78.9%
associate-/r/81.0%
Simplified81.0%
if 8.8000000000000006e-11 < y.re Initial program 60.2%
Taylor expanded in y.re around inf 78.9%
remove-double-neg78.9%
mul-1-neg78.9%
mul-1-neg78.9%
distribute-neg-in78.9%
distribute-neg-in78.9%
mul-1-neg78.9%
remove-double-neg78.9%
unsub-neg78.9%
associate-/l*81.3%
Simplified81.3%
clear-num81.2%
un-div-inv81.3%
Applied egg-rr81.3%
div-sub81.3%
associate-/r/81.3%
*-commutative81.3%
Applied egg-rr81.3%
associate-/l*83.3%
Applied egg-rr83.3%
Final simplification82.0%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (<= y.re -4e+32)
(/ (- x.im (* y.im (/ x.re y.re))) y.re)
(if (<= y.re 7.8e-8)
(/ (- (* x.im (/ y.re y.im)) x.re) y.im)
(- (/ x.im y.re) (* 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_re <= -4e+32) {
tmp = (x_46_im - (y_46_im * (x_46_re / y_46_re))) / y_46_re;
} else if (y_46_re <= 7.8e-8) {
tmp = ((x_46_im * (y_46_re / y_46_im)) - x_46_re) / y_46_im;
} else {
tmp = (x_46_im / y_46_re) - (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_46re <= (-4d+32)) then
tmp = (x_46im - (y_46im * (x_46re / y_46re))) / y_46re
else if (y_46re <= 7.8d-8) then
tmp = ((x_46im * (y_46re / y_46im)) - x_46re) / y_46im
else
tmp = (x_46im / y_46re) - (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_re <= -4e+32) {
tmp = (x_46_im - (y_46_im * (x_46_re / y_46_re))) / y_46_re;
} else if (y_46_re <= 7.8e-8) {
tmp = ((x_46_im * (y_46_re / y_46_im)) - x_46_re) / y_46_im;
} else {
tmp = (x_46_im / y_46_re) - (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_re <= -4e+32: tmp = (x_46_im - (y_46_im * (x_46_re / y_46_re))) / y_46_re elif y_46_re <= 7.8e-8: tmp = ((x_46_im * (y_46_re / y_46_im)) - x_46_re) / y_46_im else: tmp = (x_46_im / y_46_re) - (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_re <= -4e+32) tmp = Float64(Float64(x_46_im - Float64(y_46_im * Float64(x_46_re / y_46_re))) / y_46_re); elseif (y_46_re <= 7.8e-8) 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 / y_46_re) - Float64(y_46_im * Float64(Float64(x_46_re / y_46_re) / y_46_re))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if (y_46_re <= -4e+32) tmp = (x_46_im - (y_46_im * (x_46_re / y_46_re))) / y_46_re; elseif (y_46_re <= 7.8e-8) tmp = ((x_46_im * (y_46_re / y_46_im)) - x_46_re) / y_46_im; else tmp = (x_46_im / y_46_re) - (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[LessEqual[y$46$re, -4e+32], N[(N[(x$46$im - N[(y$46$im * N[(x$46$re / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y$46$re), $MachinePrecision], If[LessEqual[y$46$re, 7.8e-8], 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 / y$46$re), $MachinePrecision] - N[(y$46$im * N[(N[(x$46$re / y$46$re), $MachinePrecision] / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq -4 \cdot 10^{+32}:\\
\;\;\;\;\frac{x.im - y.im \cdot \frac{x.re}{y.re}}{y.re}\\
\mathbf{elif}\;y.re \leq 7.8 \cdot 10^{-8}:\\
\;\;\;\;\frac{x.im \cdot \frac{y.re}{y.im} - x.re}{y.im}\\
\mathbf{else}:\\
\;\;\;\;\frac{x.im}{y.re} - y.im \cdot \frac{\frac{x.re}{y.re}}{y.re}\\
\end{array}
\end{array}
if y.re < -4.00000000000000021e32Initial program 56.4%
Taylor expanded in y.re around inf 75.9%
remove-double-neg75.9%
mul-1-neg75.9%
mul-1-neg75.9%
distribute-neg-in75.9%
distribute-neg-in75.9%
mul-1-neg75.9%
remove-double-neg75.9%
unsub-neg75.9%
associate-/l*81.7%
Simplified81.7%
clear-num81.7%
un-div-inv81.7%
Applied egg-rr81.7%
associate-/r/83.1%
Simplified83.1%
if -4.00000000000000021e32 < y.re < 7.7999999999999997e-8Initial program 69.7%
*-un-lft-identity69.7%
add-sqr-sqrt69.7%
times-frac69.6%
hypot-define69.6%
hypot-define82.8%
Applied egg-rr82.8%
Taylor expanded in y.im around inf 80.9%
+-commutative80.9%
*-commutative80.9%
associate-*r/78.9%
neg-mul-178.9%
sub-neg78.9%
Simplified78.9%
clear-num78.9%
un-div-inv78.9%
Applied egg-rr78.9%
associate-/r/81.0%
Simplified81.0%
if 7.7999999999999997e-8 < y.re Initial program 60.2%
Taylor expanded in y.re around inf 78.9%
remove-double-neg78.9%
mul-1-neg78.9%
mul-1-neg78.9%
distribute-neg-in78.9%
distribute-neg-in78.9%
mul-1-neg78.9%
remove-double-neg78.9%
unsub-neg78.9%
associate-/l*81.3%
Simplified81.3%
clear-num81.2%
un-div-inv81.3%
Applied egg-rr81.3%
div-sub81.3%
associate-/r/81.3%
*-commutative81.3%
Applied egg-rr81.3%
associate-/l*83.3%
Applied egg-rr83.3%
Final simplification82.0%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (or (<= y.im -3.4e+48) (not (<= y.im 2.45e-12))) (/ (- (* y.re (/ x.im y.im)) x.re) y.im) (/ (- x.im (/ (* x.re y.im) y.re)) y.re)))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_im <= -3.4e+48) || !(y_46_im <= 2.45e-12)) {
tmp = ((y_46_re * (x_46_im / y_46_im)) - x_46_re) / y_46_im;
} else {
tmp = (x_46_im - ((x_46_re * y_46_im) / y_46_re)) / y_46_re;
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: tmp
if ((y_46im <= (-3.4d+48)) .or. (.not. (y_46im <= 2.45d-12))) then
tmp = ((y_46re * (x_46im / y_46im)) - x_46re) / y_46im
else
tmp = (x_46im - ((x_46re * y_46im) / y_46re)) / y_46re
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_im <= -3.4e+48) || !(y_46_im <= 2.45e-12)) {
tmp = ((y_46_re * (x_46_im / y_46_im)) - x_46_re) / y_46_im;
} else {
tmp = (x_46_im - ((x_46_re * y_46_im) / y_46_re)) / y_46_re;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if (y_46_im <= -3.4e+48) or not (y_46_im <= 2.45e-12): tmp = ((y_46_re * (x_46_im / y_46_im)) - x_46_re) / y_46_im else: tmp = (x_46_im - ((x_46_re * y_46_im) / y_46_re)) / y_46_re return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if ((y_46_im <= -3.4e+48) || !(y_46_im <= 2.45e-12)) 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(x_46_re * 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 <= -3.4e+48) || ~((y_46_im <= 2.45e-12))) tmp = ((y_46_re * (x_46_im / y_46_im)) - x_46_re) / y_46_im; else tmp = (x_46_im - ((x_46_re * y_46_im) / y_46_re)) / y_46_re; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[Or[LessEqual[y$46$im, -3.4e+48], N[Not[LessEqual[y$46$im, 2.45e-12]], $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[(x$46$re * y$46$im), $MachinePrecision] / y$46$re), $MachinePrecision]), $MachinePrecision] / y$46$re), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.im \leq -3.4 \cdot 10^{+48} \lor \neg \left(y.im \leq 2.45 \cdot 10^{-12}\right):\\
\;\;\;\;\frac{y.re \cdot \frac{x.im}{y.im} - x.re}{y.im}\\
\mathbf{else}:\\
\;\;\;\;\frac{x.im - \frac{x.re \cdot y.im}{y.re}}{y.re}\\
\end{array}
\end{array}
if y.im < -3.4000000000000003e48 or 2.44999999999999986e-12 < y.im Initial program 48.3%
*-un-lft-identity48.3%
add-sqr-sqrt48.3%
times-frac48.2%
hypot-define48.2%
hypot-define66.2%
Applied egg-rr66.2%
Taylor expanded in y.im around inf 81.0%
+-commutative81.0%
*-commutative81.0%
associate-*r/84.0%
neg-mul-184.0%
sub-neg84.0%
Simplified84.0%
if -3.4000000000000003e48 < y.im < 2.44999999999999986e-12Initial program 76.8%
Taylor expanded in y.re around inf 80.4%
remove-double-neg80.4%
mul-1-neg80.4%
mul-1-neg80.4%
distribute-neg-in80.4%
distribute-neg-in80.4%
mul-1-neg80.4%
remove-double-neg80.4%
mul-1-neg80.4%
associate-*r/80.4%
associate-*r*80.4%
mul-1-neg80.4%
Simplified80.4%
Final simplification81.9%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (or (<= y.im -3.4e+48) (not (<= y.im 6.5e-11))) (/ (- (* y.re (/ x.im 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 <= -3.4e+48) || !(y_46_im <= 6.5e-11)) {
tmp = ((y_46_re * (x_46_im / y_46_im)) - x_46_re) / y_46_im;
} else {
tmp = (x_46_im - (x_46_re / (y_46_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 <= (-3.4d+48)) .or. (.not. (y_46im <= 6.5d-11))) then
tmp = ((y_46re * (x_46im / 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 <= -3.4e+48) || !(y_46_im <= 6.5e-11)) {
tmp = ((y_46_re * (x_46_im / y_46_im)) - x_46_re) / y_46_im;
} else {
tmp = (x_46_im - (x_46_re / (y_46_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 <= -3.4e+48) or not (y_46_im <= 6.5e-11): tmp = ((y_46_re * (x_46_im / y_46_im)) - x_46_re) / y_46_im else: tmp = (x_46_im - (x_46_re / (y_46_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 <= -3.4e+48) || !(y_46_im <= 6.5e-11)) tmp = Float64(Float64(Float64(y_46_re * Float64(x_46_im / y_46_im)) - x_46_re) / y_46_im); else tmp = Float64(Float64(x_46_im - Float64(x_46_re / Float64(y_46_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 <= -3.4e+48) || ~((y_46_im <= 6.5e-11))) tmp = ((y_46_re * (x_46_im / y_46_im)) - x_46_re) / y_46_im; else tmp = (x_46_im - (x_46_re / (y_46_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, -3.4e+48], N[Not[LessEqual[y$46$im, 6.5e-11]], $MachinePrecision]], N[(N[(N[(y$46$re * N[(x$46$im / y$46$im), $MachinePrecision]), $MachinePrecision] - x$46$re), $MachinePrecision] / y$46$im), $MachinePrecision], N[(N[(x$46$im - N[(x$46$re / N[(y$46$re / y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y$46$re), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.im \leq -3.4 \cdot 10^{+48} \lor \neg \left(y.im \leq 6.5 \cdot 10^{-11}\right):\\
\;\;\;\;\frac{y.re \cdot \frac{x.im}{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 < -3.4000000000000003e48 or 6.49999999999999953e-11 < y.im Initial program 48.3%
*-un-lft-identity48.3%
add-sqr-sqrt48.3%
times-frac48.2%
hypot-define48.2%
hypot-define66.2%
Applied egg-rr66.2%
Taylor expanded in y.im around inf 81.0%
+-commutative81.0%
*-commutative81.0%
associate-*r/84.0%
neg-mul-184.0%
sub-neg84.0%
Simplified84.0%
if -3.4000000000000003e48 < y.im < 6.49999999999999953e-11Initial program 76.8%
Taylor expanded in y.re around inf 80.4%
remove-double-neg80.4%
mul-1-neg80.4%
mul-1-neg80.4%
distribute-neg-in80.4%
distribute-neg-in80.4%
mul-1-neg80.4%
remove-double-neg80.4%
unsub-neg80.4%
associate-/l*80.1%
Simplified80.1%
clear-num80.2%
un-div-inv80.1%
Applied egg-rr80.1%
Final simplification81.8%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (or (<= y.im -4.2e+48) (not (<= y.im 4.5e-9))) (/ 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 <= -4.2e+48) || !(y_46_im <= 4.5e-9)) {
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 <= (-4.2d+48)) .or. (.not. (y_46im <= 4.5d-9))) 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 <= -4.2e+48) || !(y_46_im <= 4.5e-9)) {
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 <= -4.2e+48) or not (y_46_im <= 4.5e-9): 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 <= -4.2e+48) || !(y_46_im <= 4.5e-9)) 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 <= -4.2e+48) || ~((y_46_im <= 4.5e-9))) 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, -4.2e+48], N[Not[LessEqual[y$46$im, 4.5e-9]], $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 -4.2 \cdot 10^{+48} \lor \neg \left(y.im \leq 4.5 \cdot 10^{-9}\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 < -4.1999999999999997e48 or 4.49999999999999976e-9 < y.im Initial program 48.3%
Taylor expanded in y.re around 0 71.5%
associate-*r/71.5%
mul-1-neg71.5%
Simplified71.5%
if -4.1999999999999997e48 < y.im < 4.49999999999999976e-9Initial program 76.8%
Taylor expanded in y.re around inf 80.4%
remove-double-neg80.4%
mul-1-neg80.4%
mul-1-neg80.4%
distribute-neg-in80.4%
distribute-neg-in80.4%
mul-1-neg80.4%
remove-double-neg80.4%
unsub-neg80.4%
associate-/l*80.1%
Simplified80.1%
clear-num80.2%
un-div-inv80.1%
Applied egg-rr80.1%
Final simplification76.4%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (or (<= y.im -1.2e+53) (not (<= y.im 4.1e-6))) (/ 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.2e+53) || !(y_46_im <= 4.1e-6)) {
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.2d+53)) .or. (.not. (y_46im <= 4.1d-6))) 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.2e+53) || !(y_46_im <= 4.1e-6)) {
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.2e+53) or not (y_46_im <= 4.1e-6): 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.2e+53) || !(y_46_im <= 4.1e-6)) 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.2e+53) || ~((y_46_im <= 4.1e-6))) 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.2e+53], N[Not[LessEqual[y$46$im, 4.1e-6]], $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.2 \cdot 10^{+53} \lor \neg \left(y.im \leq 4.1 \cdot 10^{-6}\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.2e53 or 4.0999999999999997e-6 < y.im Initial program 48.3%
Taylor expanded in y.re around 0 71.5%
associate-*r/71.5%
mul-1-neg71.5%
Simplified71.5%
if -1.2e53 < y.im < 4.0999999999999997e-6Initial program 76.8%
Taylor expanded in y.re around inf 80.4%
remove-double-neg80.4%
mul-1-neg80.4%
mul-1-neg80.4%
distribute-neg-in80.4%
distribute-neg-in80.4%
mul-1-neg80.4%
remove-double-neg80.4%
unsub-neg80.4%
associate-/l*80.1%
Simplified80.1%
Final simplification76.4%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (or (<= y.re -6.3e+32) (not (<= y.re 1.85e-6))) (/ 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 <= -6.3e+32) || !(y_46_re <= 1.85e-6)) {
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 <= (-6.3d+32)) .or. (.not. (y_46re <= 1.85d-6))) 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 <= -6.3e+32) || !(y_46_re <= 1.85e-6)) {
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 <= -6.3e+32) or not (y_46_re <= 1.85e-6): 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 <= -6.3e+32) || !(y_46_re <= 1.85e-6)) 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 <= -6.3e+32) || ~((y_46_re <= 1.85e-6))) 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, -6.3e+32], N[Not[LessEqual[y$46$re, 1.85e-6]], $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 -6.3 \cdot 10^{+32} \lor \neg \left(y.re \leq 1.85 \cdot 10^{-6}\right):\\
\;\;\;\;\frac{x.im}{y.re}\\
\mathbf{else}:\\
\;\;\;\;\frac{x.re}{-y.im}\\
\end{array}
\end{array}
if y.re < -6.3000000000000002e32 or 1.8500000000000001e-6 < y.re Initial program 58.6%
Taylor expanded in y.re around inf 68.2%
if -6.3000000000000002e32 < y.re < 1.8500000000000001e-6Initial program 69.7%
Taylor expanded in y.re around 0 66.4%
associate-*r/66.4%
mul-1-neg66.4%
Simplified66.4%
Final simplification67.2%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (or (<= y.im -1.5e+102) (not (<= y.im 4.6e+134))) (/ x.re y.im) (/ x.im y.re)))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_im <= -1.5e+102) || !(y_46_im <= 4.6e+134)) {
tmp = x_46_re / y_46_im;
} else {
tmp = x_46_im / y_46_re;
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: tmp
if ((y_46im <= (-1.5d+102)) .or. (.not. (y_46im <= 4.6d+134))) then
tmp = x_46re / y_46im
else
tmp = x_46im / y_46re
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_im <= -1.5e+102) || !(y_46_im <= 4.6e+134)) {
tmp = x_46_re / y_46_im;
} else {
tmp = x_46_im / y_46_re;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if (y_46_im <= -1.5e+102) or not (y_46_im <= 4.6e+134): tmp = x_46_re / y_46_im else: tmp = x_46_im / y_46_re return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if ((y_46_im <= -1.5e+102) || !(y_46_im <= 4.6e+134)) 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 <= -1.5e+102) || ~((y_46_im <= 4.6e+134))) tmp = x_46_re / y_46_im; else tmp = x_46_im / y_46_re; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[Or[LessEqual[y$46$im, -1.5e+102], N[Not[LessEqual[y$46$im, 4.6e+134]], $MachinePrecision]], N[(x$46$re / y$46$im), $MachinePrecision], N[(x$46$im / y$46$re), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.im \leq -1.5 \cdot 10^{+102} \lor \neg \left(y.im \leq 4.6 \cdot 10^{+134}\right):\\
\;\;\;\;\frac{x.re}{y.im}\\
\mathbf{else}:\\
\;\;\;\;\frac{x.im}{y.re}\\
\end{array}
\end{array}
if y.im < -1.4999999999999999e102 or 4.5999999999999996e134 < y.im Initial program 36.3%
Taylor expanded in y.re around 0 78.0%
associate-*r/78.0%
mul-1-neg78.0%
Simplified78.0%
div-inv77.8%
add-sqr-sqrt44.8%
sqrt-unprod47.1%
sqr-neg47.1%
sqrt-unprod12.7%
add-sqr-sqrt29.7%
Applied egg-rr29.7%
associate-*r/29.7%
*-rgt-identity29.7%
Simplified29.7%
if -1.4999999999999999e102 < y.im < 4.5999999999999996e134Initial program 76.0%
Taylor expanded in y.re around inf 54.5%
Final simplification47.4%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (<= y.im -1.42e+165) (/ x.im y.im) (/ x.im y.re)))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_im <= -1.42e+165) {
tmp = x_46_im / y_46_im;
} else {
tmp = x_46_im / y_46_re;
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: tmp
if (y_46im <= (-1.42d+165)) then
tmp = x_46im / y_46im
else
tmp = x_46im / y_46re
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_im <= -1.42e+165) {
tmp = x_46_im / y_46_im;
} else {
tmp = x_46_im / y_46_re;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if y_46_im <= -1.42e+165: tmp = x_46_im / y_46_im else: tmp = x_46_im / y_46_re return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if (y_46_im <= -1.42e+165) tmp = Float64(x_46_im / y_46_im); else tmp = Float64(x_46_im / y_46_re); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if (y_46_im <= -1.42e+165) tmp = x_46_im / 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$im, -1.42e+165], N[(x$46$im / y$46$im), $MachinePrecision], N[(x$46$im / y$46$re), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.im \leq -1.42 \cdot 10^{+165}:\\
\;\;\;\;\frac{x.im}{y.im}\\
\mathbf{else}:\\
\;\;\;\;\frac{x.im}{y.re}\\
\end{array}
\end{array}
if y.im < -1.42e165Initial program 21.8%
*-un-lft-identity21.8%
add-sqr-sqrt21.8%
times-frac21.8%
hypot-define21.8%
hypot-define52.4%
Applied egg-rr52.4%
Taylor expanded in y.re around -inf 3.1%
associate-*r/8.3%
+-commutative8.3%
neg-mul-18.3%
unsub-neg8.3%
associate-*r/3.1%
*-commutative3.1%
associate-/l*8.6%
Simplified8.6%
Taylor expanded in y.im around -inf 3.6%
+-commutative3.6%
neg-mul-13.6%
sub-neg3.6%
Simplified3.6%
Taylor expanded in x.im around inf 21.0%
if -1.42e165 < y.im Initial program 71.3%
Taylor expanded in y.re around inf 48.3%
(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 64.6%
*-un-lft-identity64.6%
add-sqr-sqrt64.6%
times-frac64.5%
hypot-define64.5%
hypot-define78.1%
Applied egg-rr78.1%
Taylor expanded in y.re around -inf 27.9%
associate-*r/29.0%
+-commutative29.0%
neg-mul-129.0%
unsub-neg29.0%
associate-*r/27.9%
*-commutative27.9%
associate-/l*29.0%
Simplified29.0%
Taylor expanded in y.im around -inf 4.9%
+-commutative4.9%
neg-mul-14.9%
sub-neg4.9%
Simplified4.9%
Taylor expanded in x.im around inf 10.1%
herbie shell --seed 2024186
(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))))