
(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 12 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 (<=
(/ (- (* x.im y.re) (* x.re y.im)) (+ (* y.re y.re) (* y.im y.im)))
1e+217)
(*
(/ 1.0 (hypot y.re y.im))
(/ (fma x.im y.re (* x.re (- y.im))) (hypot y.re y.im)))
(fma
(/ y.re (hypot y.re y.im))
(/ x.im (hypot y.re y.im))
(* x.re (/ (/ y.im (hypot y.im y.re)) (- (hypot 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 ((((x_46_im * y_46_re) - (x_46_re * y_46_im)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im))) <= 1e+217) {
tmp = (1.0 / hypot(y_46_re, y_46_im)) * (fma(x_46_im, y_46_re, (x_46_re * -y_46_im)) / hypot(y_46_re, y_46_im));
} else {
tmp = fma((y_46_re / hypot(y_46_re, y_46_im)), (x_46_im / hypot(y_46_re, y_46_im)), (x_46_re * ((y_46_im / hypot(y_46_im, y_46_re)) / -hypot(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 (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))) <= 1e+217) tmp = Float64(Float64(1.0 / hypot(y_46_re, y_46_im)) * Float64(fma(x_46_im, y_46_re, Float64(x_46_re * Float64(-y_46_im))) / hypot(y_46_re, y_46_im))); else tmp = fma(Float64(y_46_re / hypot(y_46_re, y_46_im)), Float64(x_46_im / hypot(y_46_re, y_46_im)), Float64(x_46_re * Float64(Float64(y_46_im / hypot(y_46_im, y_46_re)) / Float64(-hypot(y_46_im, y_46_re))))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[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], 1e+217], N[(N[(1.0 / N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision]), $MachinePrecision] * N[(N[(x$46$im * y$46$re + N[(x$46$re * (-y$46$im)), $MachinePrecision]), $MachinePrecision] / N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y$46$re / N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision]), $MachinePrecision] * N[(x$46$im / N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision]), $MachinePrecision] + N[(x$46$re * N[(N[(y$46$im / N[Sqrt[y$46$im ^ 2 + y$46$re ^ 2], $MachinePrecision]), $MachinePrecision] / (-N[Sqrt[y$46$im ^ 2 + y$46$re ^ 2], $MachinePrecision])), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{x.im \cdot y.re - x.re \cdot y.im}{y.re \cdot y.re + y.im \cdot y.im} \leq 10^{+217}:\\
\;\;\;\;\frac{1}{\mathsf{hypot}\left(y.re, y.im\right)} \cdot \frac{\mathsf{fma}\left(x.im, y.re, x.re \cdot \left(-y.im\right)\right)}{\mathsf{hypot}\left(y.re, y.im\right)}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y.re}{\mathsf{hypot}\left(y.re, y.im\right)}, \frac{x.im}{\mathsf{hypot}\left(y.re, y.im\right)}, x.re \cdot \frac{\frac{y.im}{\mathsf{hypot}\left(y.im, y.re\right)}}{-\mathsf{hypot}\left(y.im, y.re\right)}\right)\\
\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))) < 9.9999999999999996e216Initial program 76.8%
*-un-lft-identity76.8%
add-sqr-sqrt76.8%
times-frac76.8%
hypot-define76.8%
fmm-def76.8%
distribute-rgt-neg-in76.8%
hypot-define96.9%
Applied egg-rr96.9%
if 9.9999999999999996e216 < (/.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 13.9%
div-sub11.0%
*-commutative11.0%
add-sqr-sqrt11.0%
times-frac13.8%
fmm-def13.8%
hypot-define13.8%
hypot-define51.0%
associate-/l*62.6%
add-sqr-sqrt62.6%
pow262.6%
hypot-define62.6%
Applied egg-rr62.6%
*-un-lft-identity62.6%
unpow262.6%
times-frac97.0%
Applied egg-rr97.0%
associate-*l/97.0%
*-lft-identity97.0%
hypot-undefine62.6%
unpow262.6%
unpow262.6%
+-commutative62.6%
unpow262.6%
unpow262.6%
hypot-define97.0%
hypot-undefine62.6%
unpow262.6%
unpow262.6%
+-commutative62.6%
unpow262.6%
unpow262.6%
hypot-define97.0%
Simplified97.0%
Final simplification97.0%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0
(fma
(/ y.re (hypot y.re y.im))
(/ x.im (hypot y.re y.im))
(* x.re (/ (- y.im) (pow (hypot y.re y.im) 2.0))))))
(if (<= y.im -3.3e+161)
(/ (- (* x.im (/ y.re y.im)) x.re) y.im)
(if (<= y.im -9.6e-135)
t_0
(if (<= y.im 1.5e-130)
(/ (- x.im (/ (* x.re y.im) y.re)) y.re)
(if (<= y.im 1.15e+142)
t_0
(/ 1.0 (/ y.im (- (* y.re (/ x.im y.im)) x.re)))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = fma((y_46_re / hypot(y_46_re, y_46_im)), (x_46_im / hypot(y_46_re, y_46_im)), (x_46_re * (-y_46_im / pow(hypot(y_46_re, y_46_im), 2.0))));
double tmp;
if (y_46_im <= -3.3e+161) {
tmp = ((x_46_im * (y_46_re / y_46_im)) - x_46_re) / y_46_im;
} else if (y_46_im <= -9.6e-135) {
tmp = t_0;
} else if (y_46_im <= 1.5e-130) {
tmp = (x_46_im - ((x_46_re * y_46_im) / y_46_re)) / y_46_re;
} else if (y_46_im <= 1.15e+142) {
tmp = t_0;
} else {
tmp = 1.0 / (y_46_im / ((y_46_re * (x_46_im / y_46_im)) - x_46_re));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = fma(Float64(y_46_re / hypot(y_46_re, y_46_im)), Float64(x_46_im / hypot(y_46_re, y_46_im)), Float64(x_46_re * Float64(Float64(-y_46_im) / (hypot(y_46_re, y_46_im) ^ 2.0)))) tmp = 0.0 if (y_46_im <= -3.3e+161) tmp = Float64(Float64(Float64(x_46_im * Float64(y_46_re / y_46_im)) - x_46_re) / y_46_im); elseif (y_46_im <= -9.6e-135) tmp = t_0; elseif (y_46_im <= 1.5e-130) tmp = Float64(Float64(x_46_im - Float64(Float64(x_46_re * y_46_im) / y_46_re)) / y_46_re); elseif (y_46_im <= 1.15e+142) tmp = t_0; else tmp = Float64(1.0 / Float64(y_46_im / Float64(Float64(y_46_re * Float64(x_46_im / y_46_im)) - x_46_re))); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[(y$46$re / N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision]), $MachinePrecision] * N[(x$46$im / N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision]), $MachinePrecision] + N[(x$46$re * N[((-y$46$im) / N[Power[N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -3.3e+161], 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, -9.6e-135], t$95$0, If[LessEqual[y$46$im, 1.5e-130], N[(N[(x$46$im - N[(N[(x$46$re * y$46$im), $MachinePrecision] / y$46$re), $MachinePrecision]), $MachinePrecision] / y$46$re), $MachinePrecision], If[LessEqual[y$46$im, 1.15e+142], t$95$0, N[(1.0 / N[(y$46$im / N[(N[(y$46$re * N[(x$46$im / y$46$im), $MachinePrecision]), $MachinePrecision] - x$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \mathsf{fma}\left(\frac{y.re}{\mathsf{hypot}\left(y.re, y.im\right)}, \frac{x.im}{\mathsf{hypot}\left(y.re, y.im\right)}, x.re \cdot \frac{-y.im}{{\left(\mathsf{hypot}\left(y.re, y.im\right)\right)}^{2}}\right)\\
\mathbf{if}\;y.im \leq -3.3 \cdot 10^{+161}:\\
\;\;\;\;\frac{x.im \cdot \frac{y.re}{y.im} - x.re}{y.im}\\
\mathbf{elif}\;y.im \leq -9.6 \cdot 10^{-135}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y.im \leq 1.5 \cdot 10^{-130}:\\
\;\;\;\;\frac{x.im - \frac{x.re \cdot y.im}{y.re}}{y.re}\\
\mathbf{elif}\;y.im \leq 1.15 \cdot 10^{+142}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\frac{y.im}{y.re \cdot \frac{x.im}{y.im} - x.re}}\\
\end{array}
\end{array}
if y.im < -3.29999999999999997e161Initial program 12.6%
Taylor expanded in y.re around 0 68.4%
+-commutative68.4%
mul-1-neg68.4%
unsub-neg68.4%
unpow268.4%
associate-/r*77.9%
div-sub77.9%
associate-/l*87.8%
Simplified87.8%
if -3.29999999999999997e161 < y.im < -9.5999999999999994e-135 or 1.49999999999999993e-130 < y.im < 1.15000000000000001e142Initial program 72.0%
div-sub72.0%
*-commutative72.0%
add-sqr-sqrt71.9%
times-frac69.0%
fmm-def69.0%
hypot-define69.0%
hypot-define86.8%
associate-/l*93.8%
add-sqr-sqrt93.8%
pow293.8%
hypot-define93.8%
Applied egg-rr93.8%
if -9.5999999999999994e-135 < y.im < 1.49999999999999993e-130Initial program 69.9%
Taylor expanded in y.re around inf 96.1%
mul-1-neg96.1%
unsub-neg96.1%
unsub-neg96.1%
remove-double-neg96.1%
mul-1-neg96.1%
neg-mul-196.1%
mul-1-neg96.1%
distribute-lft-in96.1%
distribute-lft-in96.1%
mul-1-neg96.1%
unsub-neg96.1%
neg-mul-196.1%
mul-1-neg96.1%
remove-double-neg96.1%
associate-/l*94.2%
Simplified94.2%
add-sqr-sqrt48.4%
sqrt-unprod75.2%
sqr-neg75.2%
sqrt-unprod34.5%
add-sqr-sqrt71.4%
associate-/l*71.4%
*-commutative71.4%
add-sqr-sqrt34.5%
sqrt-unprod76.4%
sqr-neg76.4%
sqrt-unprod49.1%
add-sqr-sqrt96.1%
Applied egg-rr96.1%
if 1.15000000000000001e142 < y.im Initial program 28.2%
Taylor expanded in y.im around inf 80.5%
+-commutative80.5%
mul-1-neg80.5%
unsub-neg80.5%
*-commutative80.5%
Applied egg-rr80.5%
clear-num80.1%
inv-pow80.1%
associate-/l*88.7%
fmm-def88.7%
Applied egg-rr88.7%
unpow-188.7%
fmm-undef88.7%
Simplified88.7%
Final simplification93.1%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (<=
(/ (- (* x.im y.re) (* x.re y.im)) (+ (* y.re y.re) (* y.im y.im)))
2e+238)
(*
(/ 1.0 (hypot y.re y.im))
(/ (fma x.im y.re (* x.re (- y.im))) (hypot y.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 ((((x_46_im * y_46_re) - (x_46_re * y_46_im)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im))) <= 2e+238) {
tmp = (1.0 / hypot(y_46_re, y_46_im)) * (fma(x_46_im, y_46_re, (x_46_re * -y_46_im)) / hypot(y_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 (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))) <= 2e+238) tmp = Float64(Float64(1.0 / hypot(y_46_re, y_46_im)) * Float64(fma(x_46_im, y_46_re, Float64(x_46_re * Float64(-y_46_im))) / hypot(y_46_re, y_46_im))); else tmp = Float64(Float64(x_46_im - Float64(x_46_re * Float64(y_46_im / y_46_re))) / y_46_re); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[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], 2e+238], N[(N[(1.0 / N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision]), $MachinePrecision] * N[(N[(x$46$im * y$46$re + N[(x$46$re * (-y$46$im)), $MachinePrecision]), $MachinePrecision] / N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision]), $MachinePrecision]), $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}\;\frac{x.im \cdot y.re - x.re \cdot y.im}{y.re \cdot y.re + y.im \cdot y.im} \leq 2 \cdot 10^{+238}:\\
\;\;\;\;\frac{1}{\mathsf{hypot}\left(y.re, y.im\right)} \cdot \frac{\mathsf{fma}\left(x.im, y.re, x.re \cdot \left(-y.im\right)\right)}{\mathsf{hypot}\left(y.re, y.im\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x.im - x.re \cdot \frac{y.im}{y.re}}{y.re}\\
\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))) < 2.0000000000000001e238Initial program 76.9%
*-un-lft-identity76.9%
add-sqr-sqrt76.9%
times-frac76.9%
hypot-define76.9%
fmm-def76.9%
distribute-rgt-neg-in76.9%
hypot-define97.0%
Applied egg-rr97.0%
if 2.0000000000000001e238 < (/.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 12.7%
Taylor expanded in y.re around inf 51.6%
mul-1-neg51.6%
unsub-neg51.6%
unsub-neg51.6%
remove-double-neg51.6%
mul-1-neg51.6%
neg-mul-151.6%
mul-1-neg51.6%
distribute-lft-in51.6%
distribute-lft-in51.6%
mul-1-neg51.6%
unsub-neg51.6%
neg-mul-151.6%
mul-1-neg51.6%
remove-double-neg51.6%
associate-/l*59.6%
Simplified59.6%
Final simplification86.2%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0
(/ (- (* x.im y.re) (* x.re y.im)) (+ (* y.re y.re) (* y.im y.im)))))
(if (<= y.re -4.1e+103)
(/ (- x.im (/ (* x.re y.im) y.re)) y.re)
(if (<= y.re -4.8e-47)
t_0
(if (<= y.re 1.7e-110)
(/ (- (/ (* x.im y.re) y.im) x.re) y.im)
(if (<= y.re 6.4e+75)
t_0
(/ (- 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 t_0 = ((x_46_im * y_46_re) - (x_46_re * y_46_im)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im));
double tmp;
if (y_46_re <= -4.1e+103) {
tmp = (x_46_im - ((x_46_re * y_46_im) / y_46_re)) / y_46_re;
} else if (y_46_re <= -4.8e-47) {
tmp = t_0;
} else if (y_46_re <= 1.7e-110) {
tmp = (((x_46_im * y_46_re) / y_46_im) - x_46_re) / y_46_im;
} else if (y_46_re <= 6.4e+75) {
tmp = t_0;
} 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) :: t_0
real(8) :: tmp
t_0 = ((x_46im * y_46re) - (x_46re * y_46im)) / ((y_46re * y_46re) + (y_46im * y_46im))
if (y_46re <= (-4.1d+103)) then
tmp = (x_46im - ((x_46re * y_46im) / y_46re)) / y_46re
else if (y_46re <= (-4.8d-47)) then
tmp = t_0
else if (y_46re <= 1.7d-110) then
tmp = (((x_46im * y_46re) / y_46im) - x_46re) / y_46im
else if (y_46re <= 6.4d+75) then
tmp = t_0
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 t_0 = ((x_46_im * y_46_re) - (x_46_re * y_46_im)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im));
double tmp;
if (y_46_re <= -4.1e+103) {
tmp = (x_46_im - ((x_46_re * y_46_im) / y_46_re)) / y_46_re;
} else if (y_46_re <= -4.8e-47) {
tmp = t_0;
} else if (y_46_re <= 1.7e-110) {
tmp = (((x_46_im * y_46_re) / y_46_im) - x_46_re) / y_46_im;
} else if (y_46_re <= 6.4e+75) {
tmp = t_0;
} 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): t_0 = ((x_46_im * y_46_re) - (x_46_re * y_46_im)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im)) tmp = 0 if y_46_re <= -4.1e+103: tmp = (x_46_im - ((x_46_re * y_46_im) / y_46_re)) / y_46_re elif y_46_re <= -4.8e-47: tmp = t_0 elif y_46_re <= 1.7e-110: tmp = (((x_46_im * y_46_re) / y_46_im) - x_46_re) / y_46_im elif y_46_re <= 6.4e+75: tmp = t_0 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) t_0 = 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))) tmp = 0.0 if (y_46_re <= -4.1e+103) tmp = Float64(Float64(x_46_im - Float64(Float64(x_46_re * y_46_im) / y_46_re)) / y_46_re); elseif (y_46_re <= -4.8e-47) tmp = t_0; elseif (y_46_re <= 1.7e-110) tmp = Float64(Float64(Float64(Float64(x_46_im * y_46_re) / y_46_im) - x_46_re) / y_46_im); elseif (y_46_re <= 6.4e+75) tmp = t_0; 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) t_0 = ((x_46_im * y_46_re) - (x_46_re * y_46_im)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im)); tmp = 0.0; if (y_46_re <= -4.1e+103) tmp = (x_46_im - ((x_46_re * y_46_im) / y_46_re)) / y_46_re; elseif (y_46_re <= -4.8e-47) tmp = t_0; elseif (y_46_re <= 1.7e-110) tmp = (((x_46_im * y_46_re) / y_46_im) - x_46_re) / y_46_im; elseif (y_46_re <= 6.4e+75) tmp = t_0; 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_] := Block[{t$95$0 = 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$re, -4.1e+103], N[(N[(x$46$im - N[(N[(x$46$re * y$46$im), $MachinePrecision] / y$46$re), $MachinePrecision]), $MachinePrecision] / y$46$re), $MachinePrecision], If[LessEqual[y$46$re, -4.8e-47], t$95$0, If[LessEqual[y$46$re, 1.7e-110], N[(N[(N[(N[(x$46$im * y$46$re), $MachinePrecision] / y$46$im), $MachinePrecision] - x$46$re), $MachinePrecision] / y$46$im), $MachinePrecision], If[LessEqual[y$46$re, 6.4e+75], t$95$0, 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}
t_0 := \frac{x.im \cdot y.re - x.re \cdot y.im}{y.re \cdot y.re + y.im \cdot y.im}\\
\mathbf{if}\;y.re \leq -4.1 \cdot 10^{+103}:\\
\;\;\;\;\frac{x.im - \frac{x.re \cdot y.im}{y.re}}{y.re}\\
\mathbf{elif}\;y.re \leq -4.8 \cdot 10^{-47}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y.re \leq 1.7 \cdot 10^{-110}:\\
\;\;\;\;\frac{\frac{x.im \cdot y.re}{y.im} - x.re}{y.im}\\
\mathbf{elif}\;y.re \leq 6.4 \cdot 10^{+75}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{x.im - x.re \cdot \frac{y.im}{y.re}}{y.re}\\
\end{array}
\end{array}
if y.re < -4.1000000000000002e103Initial program 27.8%
Taylor expanded in y.re around inf 86.3%
mul-1-neg86.3%
unsub-neg86.3%
unsub-neg86.3%
remove-double-neg86.3%
mul-1-neg86.3%
neg-mul-186.3%
mul-1-neg86.3%
distribute-lft-in86.3%
distribute-lft-in86.3%
mul-1-neg86.3%
unsub-neg86.3%
neg-mul-186.3%
mul-1-neg86.3%
remove-double-neg86.3%
associate-/l*84.0%
Simplified84.0%
add-sqr-sqrt33.0%
sqrt-unprod70.7%
sqr-neg70.7%
sqrt-unprod43.3%
add-sqr-sqrt74.5%
associate-/l*74.5%
*-commutative74.5%
add-sqr-sqrt43.2%
sqrt-unprod70.7%
sqr-neg70.7%
sqrt-unprod33.0%
add-sqr-sqrt86.3%
Applied egg-rr86.3%
if -4.1000000000000002e103 < y.re < -4.7999999999999999e-47 or 1.7000000000000001e-110 < y.re < 6.39999999999999969e75Initial program 85.6%
if -4.7999999999999999e-47 < y.re < 1.7000000000000001e-110Initial program 66.3%
Taylor expanded in y.im around inf 89.2%
+-commutative89.2%
mul-1-neg89.2%
unsub-neg89.2%
*-commutative89.2%
Applied egg-rr89.2%
if 6.39999999999999969e75 < y.re Initial program 27.9%
Taylor expanded in y.re around inf 72.9%
mul-1-neg72.9%
unsub-neg72.9%
unsub-neg72.9%
remove-double-neg72.9%
mul-1-neg72.9%
neg-mul-172.9%
mul-1-neg72.9%
distribute-lft-in72.9%
distribute-lft-in72.9%
mul-1-neg72.9%
unsub-neg72.9%
neg-mul-172.9%
mul-1-neg72.9%
remove-double-neg72.9%
associate-/l*83.6%
Simplified83.6%
Final simplification86.7%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (<= y.re -6.6e-26)
(/ (- x.im (/ (* x.re y.im) y.re)) y.re)
(if (or (<= y.re 1.5e-67) (and (not (<= y.re 6.4e+70)) (<= y.re 9e+117)))
(/ (- (* x.im (/ y.re 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_re <= -6.6e-26) {
tmp = (x_46_im - ((x_46_re * y_46_im) / y_46_re)) / y_46_re;
} else if ((y_46_re <= 1.5e-67) || (!(y_46_re <= 6.4e+70) && (y_46_re <= 9e+117))) {
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_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_46re <= (-6.6d-26)) then
tmp = (x_46im - ((x_46re * y_46im) / y_46re)) / y_46re
else if ((y_46re <= 1.5d-67) .or. (.not. (y_46re <= 6.4d+70)) .and. (y_46re <= 9d+117)) then
tmp = ((x_46im * (y_46re / 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_re <= -6.6e-26) {
tmp = (x_46_im - ((x_46_re * y_46_im) / y_46_re)) / y_46_re;
} else if ((y_46_re <= 1.5e-67) || (!(y_46_re <= 6.4e+70) && (y_46_re <= 9e+117))) {
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_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_re <= -6.6e-26: tmp = (x_46_im - ((x_46_re * y_46_im) / y_46_re)) / y_46_re elif (y_46_re <= 1.5e-67) or (not (y_46_re <= 6.4e+70) and (y_46_re <= 9e+117)): 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_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_re <= -6.6e-26) tmp = Float64(Float64(x_46_im - Float64(Float64(x_46_re * y_46_im) / y_46_re)) / y_46_re); elseif ((y_46_re <= 1.5e-67) || (!(y_46_re <= 6.4e+70) && (y_46_re <= 9e+117))) 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_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_re <= -6.6e-26) tmp = (x_46_im - ((x_46_re * y_46_im) / y_46_re)) / y_46_re; elseif ((y_46_re <= 1.5e-67) || (~((y_46_re <= 6.4e+70)) && (y_46_re <= 9e+117))) 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_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[LessEqual[y$46$re, -6.6e-26], N[(N[(x$46$im - N[(N[(x$46$re * y$46$im), $MachinePrecision] / y$46$re), $MachinePrecision]), $MachinePrecision] / y$46$re), $MachinePrecision], If[Or[LessEqual[y$46$re, 1.5e-67], And[N[Not[LessEqual[y$46$re, 6.4e+70]], $MachinePrecision], LessEqual[y$46$re, 9e+117]]], 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$im / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y$46$re), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq -6.6 \cdot 10^{-26}:\\
\;\;\;\;\frac{x.im - \frac{x.re \cdot y.im}{y.re}}{y.re}\\
\mathbf{elif}\;y.re \leq 1.5 \cdot 10^{-67} \lor \neg \left(y.re \leq 6.4 \cdot 10^{+70}\right) \land y.re \leq 9 \cdot 10^{+117}:\\
\;\;\;\;\frac{x.im \cdot \frac{y.re}{y.im} - x.re}{y.im}\\
\mathbf{else}:\\
\;\;\;\;\frac{x.im - x.re \cdot \frac{y.im}{y.re}}{y.re}\\
\end{array}
\end{array}
if y.re < -6.5999999999999997e-26Initial program 50.3%
Taylor expanded in y.re around inf 79.2%
mul-1-neg79.2%
unsub-neg79.2%
unsub-neg79.2%
remove-double-neg79.2%
mul-1-neg79.2%
neg-mul-179.2%
mul-1-neg79.2%
distribute-lft-in79.2%
distribute-lft-in79.2%
mul-1-neg79.2%
unsub-neg79.2%
neg-mul-179.2%
mul-1-neg79.2%
remove-double-neg79.2%
associate-/l*78.0%
Simplified78.0%
add-sqr-sqrt34.3%
sqrt-unprod60.6%
sqr-neg60.6%
sqrt-unprod31.7%
add-sqr-sqrt60.6%
associate-/l*60.6%
*-commutative60.6%
add-sqr-sqrt31.7%
sqrt-unprod60.6%
sqr-neg60.6%
sqrt-unprod34.3%
add-sqr-sqrt79.2%
Applied egg-rr79.2%
if -6.5999999999999997e-26 < y.re < 1.50000000000000016e-67 or 6.4000000000000005e70 < y.re < 9e117Initial program 68.2%
Taylor expanded in y.re around 0 77.6%
+-commutative77.6%
mul-1-neg77.6%
unsub-neg77.6%
unpow277.6%
associate-/r*82.5%
div-sub84.9%
associate-/l*84.7%
Simplified84.7%
if 1.50000000000000016e-67 < y.re < 6.4000000000000005e70 or 9e117 < y.re Initial program 47.2%
Taylor expanded in y.re around inf 76.4%
mul-1-neg76.4%
unsub-neg76.4%
unsub-neg76.4%
remove-double-neg76.4%
mul-1-neg76.4%
neg-mul-176.4%
mul-1-neg76.4%
distribute-lft-in76.4%
distribute-lft-in76.4%
mul-1-neg76.4%
unsub-neg76.4%
neg-mul-176.4%
mul-1-neg76.4%
remove-double-neg76.4%
associate-/l*84.5%
Simplified84.5%
Final simplification83.2%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (<= y.re -1.36e-27)
(/ (- x.im (/ (* x.re y.im) y.re)) y.re)
(if (<= y.re 4.4e-67)
(/ (- (/ (* x.im y.re) y.im) x.re) y.im)
(if (or (<= y.re 1.6e+69) (not (<= y.re 9e+117)))
(/ (- 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_re <= -1.36e-27) {
tmp = (x_46_im - ((x_46_re * y_46_im) / y_46_re)) / y_46_re;
} else if (y_46_re <= 4.4e-67) {
tmp = (((x_46_im * y_46_re) / y_46_im) - x_46_re) / y_46_im;
} else if ((y_46_re <= 1.6e+69) || !(y_46_re <= 9e+117)) {
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_46re <= (-1.36d-27)) then
tmp = (x_46im - ((x_46re * y_46im) / y_46re)) / y_46re
else if (y_46re <= 4.4d-67) then
tmp = (((x_46im * y_46re) / y_46im) - x_46re) / y_46im
else if ((y_46re <= 1.6d+69) .or. (.not. (y_46re <= 9d+117))) 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_re <= -1.36e-27) {
tmp = (x_46_im - ((x_46_re * y_46_im) / y_46_re)) / y_46_re;
} else if (y_46_re <= 4.4e-67) {
tmp = (((x_46_im * y_46_re) / y_46_im) - x_46_re) / y_46_im;
} else if ((y_46_re <= 1.6e+69) || !(y_46_re <= 9e+117)) {
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_re <= -1.36e-27: tmp = (x_46_im - ((x_46_re * y_46_im) / y_46_re)) / y_46_re elif y_46_re <= 4.4e-67: tmp = (((x_46_im * y_46_re) / y_46_im) - x_46_re) / y_46_im elif (y_46_re <= 1.6e+69) or not (y_46_re <= 9e+117): 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_re <= -1.36e-27) tmp = Float64(Float64(x_46_im - Float64(Float64(x_46_re * y_46_im) / y_46_re)) / y_46_re); elseif (y_46_re <= 4.4e-67) tmp = Float64(Float64(Float64(Float64(x_46_im * y_46_re) / y_46_im) - x_46_re) / y_46_im); elseif ((y_46_re <= 1.6e+69) || !(y_46_re <= 9e+117)) 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_re <= -1.36e-27) tmp = (x_46_im - ((x_46_re * y_46_im) / y_46_re)) / y_46_re; elseif (y_46_re <= 4.4e-67) tmp = (((x_46_im * y_46_re) / y_46_im) - x_46_re) / y_46_im; elseif ((y_46_re <= 1.6e+69) || ~((y_46_re <= 9e+117))) 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$re, -1.36e-27], N[(N[(x$46$im - N[(N[(x$46$re * y$46$im), $MachinePrecision] / y$46$re), $MachinePrecision]), $MachinePrecision] / y$46$re), $MachinePrecision], If[LessEqual[y$46$re, 4.4e-67], N[(N[(N[(N[(x$46$im * y$46$re), $MachinePrecision] / y$46$im), $MachinePrecision] - x$46$re), $MachinePrecision] / y$46$im), $MachinePrecision], If[Or[LessEqual[y$46$re, 1.6e+69], N[Not[LessEqual[y$46$re, 9e+117]], $MachinePrecision]], 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.re \leq -1.36 \cdot 10^{-27}:\\
\;\;\;\;\frac{x.im - \frac{x.re \cdot y.im}{y.re}}{y.re}\\
\mathbf{elif}\;y.re \leq 4.4 \cdot 10^{-67}:\\
\;\;\;\;\frac{\frac{x.im \cdot y.re}{y.im} - x.re}{y.im}\\
\mathbf{elif}\;y.re \leq 1.6 \cdot 10^{+69} \lor \neg \left(y.re \leq 9 \cdot 10^{+117}\right):\\
\;\;\;\;\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.re < -1.36e-27Initial program 50.3%
Taylor expanded in y.re around inf 79.2%
mul-1-neg79.2%
unsub-neg79.2%
unsub-neg79.2%
remove-double-neg79.2%
mul-1-neg79.2%
neg-mul-179.2%
mul-1-neg79.2%
distribute-lft-in79.2%
distribute-lft-in79.2%
mul-1-neg79.2%
unsub-neg79.2%
neg-mul-179.2%
mul-1-neg79.2%
remove-double-neg79.2%
associate-/l*78.0%
Simplified78.0%
add-sqr-sqrt34.3%
sqrt-unprod60.6%
sqr-neg60.6%
sqrt-unprod31.7%
add-sqr-sqrt60.6%
associate-/l*60.6%
*-commutative60.6%
add-sqr-sqrt31.7%
sqrt-unprod60.6%
sqr-neg60.6%
sqrt-unprod34.3%
add-sqr-sqrt79.2%
Applied egg-rr79.2%
if -1.36e-27 < y.re < 4.4000000000000002e-67Initial program 69.8%
Taylor expanded in y.im around inf 87.3%
+-commutative87.3%
mul-1-neg87.3%
unsub-neg87.3%
*-commutative87.3%
Applied egg-rr87.3%
if 4.4000000000000002e-67 < y.re < 1.59999999999999992e69 or 9e117 < y.re Initial program 47.2%
Taylor expanded in y.re around inf 76.4%
mul-1-neg76.4%
unsub-neg76.4%
unsub-neg76.4%
remove-double-neg76.4%
mul-1-neg76.4%
neg-mul-176.4%
mul-1-neg76.4%
distribute-lft-in76.4%
distribute-lft-in76.4%
mul-1-neg76.4%
unsub-neg76.4%
neg-mul-176.4%
mul-1-neg76.4%
remove-double-neg76.4%
associate-/l*84.5%
Simplified84.5%
if 1.59999999999999992e69 < y.re < 9e117Initial program 50.0%
Taylor expanded in y.re around 0 47.5%
+-commutative47.5%
mul-1-neg47.5%
unsub-neg47.5%
unpow247.5%
associate-/r*57.5%
div-sub57.5%
associate-/l*77.2%
Simplified77.2%
Final simplification84.1%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (/ x.re (- y.im))) (t_1 (/ (- x.im (* x.re (/ y.im y.re))) y.re)))
(if (<= y.re -1.25e-18)
t_1
(if (<= y.re -4.9e-188)
t_0
(if (<= y.re -4.1e-223)
(/ (* y.re (/ x.im y.im)) y.im)
(if (<= y.re 7.8e-103) t_0 t_1))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = x_46_re / -y_46_im;
double t_1 = (x_46_im - (x_46_re * (y_46_im / y_46_re))) / y_46_re;
double tmp;
if (y_46_re <= -1.25e-18) {
tmp = t_1;
} else if (y_46_re <= -4.9e-188) {
tmp = t_0;
} else if (y_46_re <= -4.1e-223) {
tmp = (y_46_re * (x_46_im / y_46_im)) / y_46_im;
} else if (y_46_re <= 7.8e-103) {
tmp = t_0;
} else {
tmp = t_1;
}
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) :: tmp
t_0 = x_46re / -y_46im
t_1 = (x_46im - (x_46re * (y_46im / y_46re))) / y_46re
if (y_46re <= (-1.25d-18)) then
tmp = t_1
else if (y_46re <= (-4.9d-188)) then
tmp = t_0
else if (y_46re <= (-4.1d-223)) then
tmp = (y_46re * (x_46im / y_46im)) / y_46im
else if (y_46re <= 7.8d-103) then
tmp = t_0
else
tmp = t_1
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_re / -y_46_im;
double t_1 = (x_46_im - (x_46_re * (y_46_im / y_46_re))) / y_46_re;
double tmp;
if (y_46_re <= -1.25e-18) {
tmp = t_1;
} else if (y_46_re <= -4.9e-188) {
tmp = t_0;
} else if (y_46_re <= -4.1e-223) {
tmp = (y_46_re * (x_46_im / y_46_im)) / y_46_im;
} else if (y_46_re <= 7.8e-103) {
tmp = t_0;
} else {
tmp = t_1;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = x_46_re / -y_46_im t_1 = (x_46_im - (x_46_re * (y_46_im / y_46_re))) / y_46_re tmp = 0 if y_46_re <= -1.25e-18: tmp = t_1 elif y_46_re <= -4.9e-188: tmp = t_0 elif y_46_re <= -4.1e-223: tmp = (y_46_re * (x_46_im / y_46_im)) / y_46_im elif y_46_re <= 7.8e-103: tmp = t_0 else: tmp = t_1 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(x_46_re / Float64(-y_46_im)) t_1 = Float64(Float64(x_46_im - Float64(x_46_re * Float64(y_46_im / y_46_re))) / y_46_re) tmp = 0.0 if (y_46_re <= -1.25e-18) tmp = t_1; elseif (y_46_re <= -4.9e-188) tmp = t_0; elseif (y_46_re <= -4.1e-223) tmp = Float64(Float64(y_46_re * Float64(x_46_im / y_46_im)) / y_46_im); elseif (y_46_re <= 7.8e-103) tmp = t_0; else tmp = t_1; end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = x_46_re / -y_46_im; t_1 = (x_46_im - (x_46_re * (y_46_im / y_46_re))) / y_46_re; tmp = 0.0; if (y_46_re <= -1.25e-18) tmp = t_1; elseif (y_46_re <= -4.9e-188) tmp = t_0; elseif (y_46_re <= -4.1e-223) tmp = (y_46_re * (x_46_im / y_46_im)) / y_46_im; elseif (y_46_re <= 7.8e-103) tmp = t_0; else tmp = t_1; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(x$46$re / (-y$46$im)), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x$46$im - N[(x$46$re * N[(y$46$im / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y$46$re), $MachinePrecision]}, If[LessEqual[y$46$re, -1.25e-18], t$95$1, If[LessEqual[y$46$re, -4.9e-188], t$95$0, If[LessEqual[y$46$re, -4.1e-223], N[(N[(y$46$re * N[(x$46$im / y$46$im), $MachinePrecision]), $MachinePrecision] / y$46$im), $MachinePrecision], If[LessEqual[y$46$re, 7.8e-103], t$95$0, t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x.re}{-y.im}\\
t_1 := \frac{x.im - x.re \cdot \frac{y.im}{y.re}}{y.re}\\
\mathbf{if}\;y.re \leq -1.25 \cdot 10^{-18}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y.re \leq -4.9 \cdot 10^{-188}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y.re \leq -4.1 \cdot 10^{-223}:\\
\;\;\;\;\frac{y.re \cdot \frac{x.im}{y.im}}{y.im}\\
\mathbf{elif}\;y.re \leq 7.8 \cdot 10^{-103}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y.re < -1.25000000000000009e-18 or 7.8000000000000004e-103 < y.re Initial program 50.0%
Taylor expanded in y.re around inf 73.5%
mul-1-neg73.5%
unsub-neg73.5%
unsub-neg73.5%
remove-double-neg73.5%
mul-1-neg73.5%
neg-mul-173.5%
mul-1-neg73.5%
distribute-lft-in73.5%
distribute-lft-in73.5%
mul-1-neg73.5%
unsub-neg73.5%
neg-mul-173.5%
mul-1-neg73.5%
remove-double-neg73.5%
associate-/l*76.5%
Simplified76.5%
if -1.25000000000000009e-18 < y.re < -4.90000000000000004e-188 or -4.10000000000000015e-223 < y.re < 7.8000000000000004e-103Initial program 66.7%
Taylor expanded in y.re around 0 71.4%
associate-*r/71.4%
neg-mul-171.4%
Simplified71.4%
if -4.90000000000000004e-188 < y.re < -4.10000000000000015e-223Initial program 99.8%
Taylor expanded in y.im around inf 99.6%
Taylor expanded in x.re around 0 99.6%
*-commutative99.6%
associate-*r/100.0%
Simplified100.0%
Final simplification75.0%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (/ x.re (- y.im))))
(if (<= y.re -6e-18)
(/ (- x.im (/ (* x.re y.im) y.re)) y.re)
(if (<= y.re -5.5e-188)
t_0
(if (<= y.re -4.1e-223)
(/ (* y.re (/ x.im y.im)) y.im)
(if (<= y.re 7.8e-103)
t_0
(/ (- 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 t_0 = x_46_re / -y_46_im;
double tmp;
if (y_46_re <= -6e-18) {
tmp = (x_46_im - ((x_46_re * y_46_im) / y_46_re)) / y_46_re;
} else if (y_46_re <= -5.5e-188) {
tmp = t_0;
} else if (y_46_re <= -4.1e-223) {
tmp = (y_46_re * (x_46_im / y_46_im)) / y_46_im;
} else if (y_46_re <= 7.8e-103) {
tmp = t_0;
} 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) :: t_0
real(8) :: tmp
t_0 = x_46re / -y_46im
if (y_46re <= (-6d-18)) then
tmp = (x_46im - ((x_46re * y_46im) / y_46re)) / y_46re
else if (y_46re <= (-5.5d-188)) then
tmp = t_0
else if (y_46re <= (-4.1d-223)) then
tmp = (y_46re * (x_46im / y_46im)) / y_46im
else if (y_46re <= 7.8d-103) then
tmp = t_0
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 t_0 = x_46_re / -y_46_im;
double tmp;
if (y_46_re <= -6e-18) {
tmp = (x_46_im - ((x_46_re * y_46_im) / y_46_re)) / y_46_re;
} else if (y_46_re <= -5.5e-188) {
tmp = t_0;
} else if (y_46_re <= -4.1e-223) {
tmp = (y_46_re * (x_46_im / y_46_im)) / y_46_im;
} else if (y_46_re <= 7.8e-103) {
tmp = t_0;
} 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): t_0 = x_46_re / -y_46_im tmp = 0 if y_46_re <= -6e-18: tmp = (x_46_im - ((x_46_re * y_46_im) / y_46_re)) / y_46_re elif y_46_re <= -5.5e-188: tmp = t_0 elif y_46_re <= -4.1e-223: tmp = (y_46_re * (x_46_im / y_46_im)) / y_46_im elif y_46_re <= 7.8e-103: tmp = t_0 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) t_0 = Float64(x_46_re / Float64(-y_46_im)) tmp = 0.0 if (y_46_re <= -6e-18) tmp = Float64(Float64(x_46_im - Float64(Float64(x_46_re * y_46_im) / y_46_re)) / y_46_re); elseif (y_46_re <= -5.5e-188) tmp = t_0; elseif (y_46_re <= -4.1e-223) tmp = Float64(Float64(y_46_re * Float64(x_46_im / y_46_im)) / y_46_im); elseif (y_46_re <= 7.8e-103) tmp = t_0; 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) t_0 = x_46_re / -y_46_im; tmp = 0.0; if (y_46_re <= -6e-18) tmp = (x_46_im - ((x_46_re * y_46_im) / y_46_re)) / y_46_re; elseif (y_46_re <= -5.5e-188) tmp = t_0; elseif (y_46_re <= -4.1e-223) tmp = (y_46_re * (x_46_im / y_46_im)) / y_46_im; elseif (y_46_re <= 7.8e-103) tmp = t_0; 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_] := Block[{t$95$0 = N[(x$46$re / (-y$46$im)), $MachinePrecision]}, If[LessEqual[y$46$re, -6e-18], N[(N[(x$46$im - N[(N[(x$46$re * y$46$im), $MachinePrecision] / y$46$re), $MachinePrecision]), $MachinePrecision] / y$46$re), $MachinePrecision], If[LessEqual[y$46$re, -5.5e-188], t$95$0, If[LessEqual[y$46$re, -4.1e-223], N[(N[(y$46$re * N[(x$46$im / y$46$im), $MachinePrecision]), $MachinePrecision] / y$46$im), $MachinePrecision], If[LessEqual[y$46$re, 7.8e-103], t$95$0, 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}
t_0 := \frac{x.re}{-y.im}\\
\mathbf{if}\;y.re \leq -6 \cdot 10^{-18}:\\
\;\;\;\;\frac{x.im - \frac{x.re \cdot y.im}{y.re}}{y.re}\\
\mathbf{elif}\;y.re \leq -5.5 \cdot 10^{-188}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y.re \leq -4.1 \cdot 10^{-223}:\\
\;\;\;\;\frac{y.re \cdot \frac{x.im}{y.im}}{y.im}\\
\mathbf{elif}\;y.re \leq 7.8 \cdot 10^{-103}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{x.im - x.re \cdot \frac{y.im}{y.re}}{y.re}\\
\end{array}
\end{array}
if y.re < -5.99999999999999966e-18Initial program 48.8%
Taylor expanded in y.re around inf 80.9%
mul-1-neg80.9%
unsub-neg80.9%
unsub-neg80.9%
remove-double-neg80.9%
mul-1-neg80.9%
neg-mul-180.9%
mul-1-neg80.9%
distribute-lft-in80.9%
distribute-lft-in80.9%
mul-1-neg80.9%
unsub-neg80.9%
neg-mul-180.9%
mul-1-neg80.9%
remove-double-neg80.9%
associate-/l*79.5%
Simplified79.5%
add-sqr-sqrt33.2%
sqrt-unprod61.2%
sqr-neg61.2%
sqrt-unprod33.7%
add-sqr-sqrt61.2%
associate-/l*61.2%
*-commutative61.2%
add-sqr-sqrt33.6%
sqrt-unprod61.2%
sqr-neg61.2%
sqrt-unprod33.2%
add-sqr-sqrt80.9%
Applied egg-rr80.9%
if -5.99999999999999966e-18 < y.re < -5.5000000000000002e-188 or -4.10000000000000015e-223 < y.re < 7.8000000000000004e-103Initial program 66.7%
Taylor expanded in y.re around 0 71.4%
associate-*r/71.4%
neg-mul-171.4%
Simplified71.4%
if -5.5000000000000002e-188 < y.re < -4.10000000000000015e-223Initial program 99.8%
Taylor expanded in y.im around inf 99.6%
Taylor expanded in x.re around 0 99.6%
*-commutative99.6%
associate-*r/100.0%
Simplified100.0%
if 7.8000000000000004e-103 < y.re Initial program 51.0%
Taylor expanded in y.re around inf 67.4%
mul-1-neg67.4%
unsub-neg67.4%
unsub-neg67.4%
remove-double-neg67.4%
mul-1-neg67.4%
neg-mul-167.4%
mul-1-neg67.4%
distribute-lft-in67.4%
distribute-lft-in67.4%
mul-1-neg67.4%
unsub-neg67.4%
neg-mul-167.4%
mul-1-neg67.4%
remove-double-neg67.4%
associate-/l*74.0%
Simplified74.0%
Final simplification75.3%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (/ x.re (- y.im))))
(if (<= y.re -1.8e+15)
(/ x.im y.re)
(if (<= y.re -4.9e-188)
t_0
(if (<= y.re -4.1e-223)
(* y.re (/ (/ x.im y.im) y.im))
(if (<= y.re 6500000.0) t_0 (/ x.im y.re)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = x_46_re / -y_46_im;
double tmp;
if (y_46_re <= -1.8e+15) {
tmp = x_46_im / y_46_re;
} else if (y_46_re <= -4.9e-188) {
tmp = t_0;
} else if (y_46_re <= -4.1e-223) {
tmp = y_46_re * ((x_46_im / y_46_im) / y_46_im);
} else if (y_46_re <= 6500000.0) {
tmp = t_0;
} 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) :: t_0
real(8) :: tmp
t_0 = x_46re / -y_46im
if (y_46re <= (-1.8d+15)) then
tmp = x_46im / y_46re
else if (y_46re <= (-4.9d-188)) then
tmp = t_0
else if (y_46re <= (-4.1d-223)) then
tmp = y_46re * ((x_46im / y_46im) / y_46im)
else if (y_46re <= 6500000.0d0) then
tmp = t_0
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 t_0 = x_46_re / -y_46_im;
double tmp;
if (y_46_re <= -1.8e+15) {
tmp = x_46_im / y_46_re;
} else if (y_46_re <= -4.9e-188) {
tmp = t_0;
} else if (y_46_re <= -4.1e-223) {
tmp = y_46_re * ((x_46_im / y_46_im) / y_46_im);
} else if (y_46_re <= 6500000.0) {
tmp = t_0;
} else {
tmp = x_46_im / y_46_re;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = x_46_re / -y_46_im tmp = 0 if y_46_re <= -1.8e+15: tmp = x_46_im / y_46_re elif y_46_re <= -4.9e-188: tmp = t_0 elif y_46_re <= -4.1e-223: tmp = y_46_re * ((x_46_im / y_46_im) / y_46_im) elif y_46_re <= 6500000.0: tmp = t_0 else: tmp = x_46_im / y_46_re return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(x_46_re / Float64(-y_46_im)) tmp = 0.0 if (y_46_re <= -1.8e+15) tmp = Float64(x_46_im / y_46_re); elseif (y_46_re <= -4.9e-188) tmp = t_0; elseif (y_46_re <= -4.1e-223) tmp = Float64(y_46_re * Float64(Float64(x_46_im / y_46_im) / y_46_im)); elseif (y_46_re <= 6500000.0) tmp = t_0; 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) t_0 = x_46_re / -y_46_im; tmp = 0.0; if (y_46_re <= -1.8e+15) tmp = x_46_im / y_46_re; elseif (y_46_re <= -4.9e-188) tmp = t_0; elseif (y_46_re <= -4.1e-223) tmp = y_46_re * ((x_46_im / y_46_im) / y_46_im); elseif (y_46_re <= 6500000.0) tmp = t_0; 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_] := Block[{t$95$0 = N[(x$46$re / (-y$46$im)), $MachinePrecision]}, If[LessEqual[y$46$re, -1.8e+15], N[(x$46$im / y$46$re), $MachinePrecision], If[LessEqual[y$46$re, -4.9e-188], t$95$0, If[LessEqual[y$46$re, -4.1e-223], N[(y$46$re * N[(N[(x$46$im / y$46$im), $MachinePrecision] / y$46$im), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 6500000.0], t$95$0, N[(x$46$im / y$46$re), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x.re}{-y.im}\\
\mathbf{if}\;y.re \leq -1.8 \cdot 10^{+15}:\\
\;\;\;\;\frac{x.im}{y.re}\\
\mathbf{elif}\;y.re \leq -4.9 \cdot 10^{-188}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y.re \leq -4.1 \cdot 10^{-223}:\\
\;\;\;\;y.re \cdot \frac{\frac{x.im}{y.im}}{y.im}\\
\mathbf{elif}\;y.re \leq 6500000:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{x.im}{y.re}\\
\end{array}
\end{array}
if y.re < -1.8e15 or 6.5e6 < y.re Initial program 43.5%
Taylor expanded in y.re around inf 66.3%
if -1.8e15 < y.re < -4.90000000000000004e-188 or -4.10000000000000015e-223 < y.re < 6.5e6Initial program 69.6%
Taylor expanded in y.re around 0 66.1%
associate-*r/66.1%
neg-mul-166.1%
Simplified66.1%
if -4.90000000000000004e-188 < y.re < -4.10000000000000015e-223Initial program 99.8%
Taylor expanded in y.im around inf 99.6%
Taylor expanded in x.re around 0 99.6%
*-commutative99.6%
associate-*r/100.0%
Simplified100.0%
associate-/l*86.3%
Applied egg-rr86.3%
Final simplification66.8%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (/ x.re (- y.im))))
(if (<= y.re -5.1e+14)
(/ x.im y.re)
(if (<= y.re -4.9e-188)
t_0
(if (<= y.re -4.1e-223)
(/ (* y.re (/ x.im y.im)) y.im)
(if (<= y.re 280000.0) t_0 (/ x.im y.re)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = x_46_re / -y_46_im;
double tmp;
if (y_46_re <= -5.1e+14) {
tmp = x_46_im / y_46_re;
} else if (y_46_re <= -4.9e-188) {
tmp = t_0;
} else if (y_46_re <= -4.1e-223) {
tmp = (y_46_re * (x_46_im / y_46_im)) / y_46_im;
} else if (y_46_re <= 280000.0) {
tmp = t_0;
} 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) :: t_0
real(8) :: tmp
t_0 = x_46re / -y_46im
if (y_46re <= (-5.1d+14)) then
tmp = x_46im / y_46re
else if (y_46re <= (-4.9d-188)) then
tmp = t_0
else if (y_46re <= (-4.1d-223)) then
tmp = (y_46re * (x_46im / y_46im)) / y_46im
else if (y_46re <= 280000.0d0) then
tmp = t_0
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 t_0 = x_46_re / -y_46_im;
double tmp;
if (y_46_re <= -5.1e+14) {
tmp = x_46_im / y_46_re;
} else if (y_46_re <= -4.9e-188) {
tmp = t_0;
} else if (y_46_re <= -4.1e-223) {
tmp = (y_46_re * (x_46_im / y_46_im)) / y_46_im;
} else if (y_46_re <= 280000.0) {
tmp = t_0;
} else {
tmp = x_46_im / y_46_re;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = x_46_re / -y_46_im tmp = 0 if y_46_re <= -5.1e+14: tmp = x_46_im / y_46_re elif y_46_re <= -4.9e-188: tmp = t_0 elif y_46_re <= -4.1e-223: tmp = (y_46_re * (x_46_im / y_46_im)) / y_46_im elif y_46_re <= 280000.0: tmp = t_0 else: tmp = x_46_im / y_46_re return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(x_46_re / Float64(-y_46_im)) tmp = 0.0 if (y_46_re <= -5.1e+14) tmp = Float64(x_46_im / y_46_re); elseif (y_46_re <= -4.9e-188) tmp = t_0; elseif (y_46_re <= -4.1e-223) tmp = Float64(Float64(y_46_re * Float64(x_46_im / y_46_im)) / y_46_im); elseif (y_46_re <= 280000.0) tmp = t_0; 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) t_0 = x_46_re / -y_46_im; tmp = 0.0; if (y_46_re <= -5.1e+14) tmp = x_46_im / y_46_re; elseif (y_46_re <= -4.9e-188) tmp = t_0; elseif (y_46_re <= -4.1e-223) tmp = (y_46_re * (x_46_im / y_46_im)) / y_46_im; elseif (y_46_re <= 280000.0) tmp = t_0; 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_] := Block[{t$95$0 = N[(x$46$re / (-y$46$im)), $MachinePrecision]}, If[LessEqual[y$46$re, -5.1e+14], N[(x$46$im / y$46$re), $MachinePrecision], If[LessEqual[y$46$re, -4.9e-188], t$95$0, If[LessEqual[y$46$re, -4.1e-223], N[(N[(y$46$re * N[(x$46$im / y$46$im), $MachinePrecision]), $MachinePrecision] / y$46$im), $MachinePrecision], If[LessEqual[y$46$re, 280000.0], t$95$0, N[(x$46$im / y$46$re), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x.re}{-y.im}\\
\mathbf{if}\;y.re \leq -5.1 \cdot 10^{+14}:\\
\;\;\;\;\frac{x.im}{y.re}\\
\mathbf{elif}\;y.re \leq -4.9 \cdot 10^{-188}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y.re \leq -4.1 \cdot 10^{-223}:\\
\;\;\;\;\frac{y.re \cdot \frac{x.im}{y.im}}{y.im}\\
\mathbf{elif}\;y.re \leq 280000:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{x.im}{y.re}\\
\end{array}
\end{array}
if y.re < -5.1e14 or 2.8e5 < y.re Initial program 43.5%
Taylor expanded in y.re around inf 66.3%
if -5.1e14 < y.re < -4.90000000000000004e-188 or -4.10000000000000015e-223 < y.re < 2.8e5Initial program 69.6%
Taylor expanded in y.re around 0 66.1%
associate-*r/66.1%
neg-mul-166.1%
Simplified66.1%
if -4.90000000000000004e-188 < y.re < -4.10000000000000015e-223Initial program 99.8%
Taylor expanded in y.im around inf 99.6%
Taylor expanded in x.re around 0 99.6%
*-commutative99.6%
associate-*r/100.0%
Simplified100.0%
Final simplification67.1%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (or (<= y.re -9e+18) (not (<= y.re 4100000.0))) (/ 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 <= -9e+18) || !(y_46_re <= 4100000.0)) {
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 <= (-9d+18)) .or. (.not. (y_46re <= 4100000.0d0))) 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 <= -9e+18) || !(y_46_re <= 4100000.0)) {
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 <= -9e+18) or not (y_46_re <= 4100000.0): 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 <= -9e+18) || !(y_46_re <= 4100000.0)) 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 <= -9e+18) || ~((y_46_re <= 4100000.0))) 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, -9e+18], N[Not[LessEqual[y$46$re, 4100000.0]], $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 -9 \cdot 10^{+18} \lor \neg \left(y.re \leq 4100000\right):\\
\;\;\;\;\frac{x.im}{y.re}\\
\mathbf{else}:\\
\;\;\;\;\frac{x.re}{-y.im}\\
\end{array}
\end{array}
if y.re < -9e18 or 4.1e6 < y.re Initial program 43.5%
Taylor expanded in y.re around inf 66.3%
if -9e18 < y.re < 4.1e6Initial program 71.1%
Taylor expanded in y.re around 0 63.6%
associate-*r/63.6%
neg-mul-163.6%
Simplified63.6%
Final simplification64.8%
(FPCore (x.re x.im y.re y.im) :precision binary64 (/ x.im y.re))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return x_46_im / y_46_re;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
code = x_46im / y_46re
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return x_46_im / y_46_re;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): return x_46_im / y_46_re
function code(x_46_re, x_46_im, y_46_re, y_46_im) return Float64(x_46_im / y_46_re) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = x_46_im / y_46_re; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[(x$46$im / y$46$re), $MachinePrecision]
\begin{array}{l}
\\
\frac{x.im}{y.re}
\end{array}
Initial program 58.4%
Taylor expanded in y.re around inf 41.9%
Final simplification41.9%
herbie shell --seed 2024079
(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))))