
(FPCore (x.re x.im y.re y.im) :precision binary64 (/ (+ (* x.re y.re) (* x.im 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_re * y_46_re) + (x_46_im * 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_46re * y_46re) + (x_46im * 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_re * y_46_re) + (x_46_im * 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_re * y_46_re) + (x_46_im * 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_re * y_46_re) + Float64(x_46_im * 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_re * y_46_re) + (x_46_im * 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$re * y$46$re), $MachinePrecision] + N[(x$46$im * 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.re \cdot y.re + x.im \cdot y.im}{y.re \cdot y.re + y.im \cdot y.im}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 15 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x.re x.im y.re y.im) :precision binary64 (/ (+ (* x.re y.re) (* x.im 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_re * y_46_re) + (x_46_im * 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_46re * y_46re) + (x_46im * 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_re * y_46_re) + (x_46_im * 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_re * y_46_re) + (x_46_im * 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_re * y_46_re) + Float64(x_46_im * 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_re * y_46_re) + (x_46_im * 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$re * y$46$re), $MachinePrecision] + N[(x$46$im * 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.re \cdot y.re + x.im \cdot y.im}{y.re \cdot y.re + y.im \cdot y.im}
\end{array}
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (/ (fma x.re y.re (* x.im y.im)) (fma y.re y.re (* y.im y.im)))))
(if (<= y.im -6.1e+88)
(/ (+ x.im (/ x.re (/ y.im y.re))) y.im)
(if (<= y.im -1e-89)
t_0
(if (<= y.im 1.62e-105)
(/ (fma x.im (/ y.im y.re) x.re) y.re)
(if (<= y.im 3.4e+38)
t_0
(/ (+ x.im (* x.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) {
double t_0 = fma(x_46_re, y_46_re, (x_46_im * y_46_im)) / fma(y_46_re, y_46_re, (y_46_im * y_46_im));
double tmp;
if (y_46_im <= -6.1e+88) {
tmp = (x_46_im + (x_46_re / (y_46_im / y_46_re))) / y_46_im;
} else if (y_46_im <= -1e-89) {
tmp = t_0;
} else if (y_46_im <= 1.62e-105) {
tmp = fma(x_46_im, (y_46_im / y_46_re), x_46_re) / y_46_re;
} else if (y_46_im <= 3.4e+38) {
tmp = t_0;
} else {
tmp = (x_46_im + (x_46_re * (y_46_re / y_46_im))) / y_46_im;
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(fma(x_46_re, y_46_re, Float64(x_46_im * y_46_im)) / fma(y_46_re, y_46_re, Float64(y_46_im * y_46_im))) tmp = 0.0 if (y_46_im <= -6.1e+88) tmp = Float64(Float64(x_46_im + Float64(x_46_re / Float64(y_46_im / y_46_re))) / y_46_im); elseif (y_46_im <= -1e-89) tmp = t_0; elseif (y_46_im <= 1.62e-105) tmp = Float64(fma(x_46_im, Float64(y_46_im / y_46_re), x_46_re) / y_46_re); elseif (y_46_im <= 3.4e+38) tmp = t_0; else tmp = Float64(Float64(x_46_im + Float64(x_46_re * Float64(y_46_re / y_46_im))) / 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$re * y$46$re + N[(x$46$im * y$46$im), $MachinePrecision]), $MachinePrecision] / N[(y$46$re * y$46$re + N[(y$46$im * y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -6.1e+88], N[(N[(x$46$im + N[(x$46$re / N[(y$46$im / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y$46$im), $MachinePrecision], If[LessEqual[y$46$im, -1e-89], t$95$0, If[LessEqual[y$46$im, 1.62e-105], N[(N[(x$46$im * N[(y$46$im / y$46$re), $MachinePrecision] + x$46$re), $MachinePrecision] / y$46$re), $MachinePrecision], If[LessEqual[y$46$im, 3.4e+38], t$95$0, N[(N[(x$46$im + N[(x$46$re * N[(y$46$re / y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y$46$im), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{\mathsf{fma}\left(x.re, y.re, x.im \cdot y.im\right)}{\mathsf{fma}\left(y.re, y.re, y.im \cdot y.im\right)}\\
\mathbf{if}\;y.im \leq -6.1 \cdot 10^{+88}:\\
\;\;\;\;\frac{x.im + \frac{x.re}{\frac{y.im}{y.re}}}{y.im}\\
\mathbf{elif}\;y.im \leq -1 \cdot 10^{-89}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y.im \leq 1.62 \cdot 10^{-105}:\\
\;\;\;\;\frac{\mathsf{fma}\left(x.im, \frac{y.im}{y.re}, x.re\right)}{y.re}\\
\mathbf{elif}\;y.im \leq 3.4 \cdot 10^{+38}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{x.im + x.re \cdot \frac{y.re}{y.im}}{y.im}\\
\end{array}
\end{array}
if y.im < -6.0999999999999998e88Initial program 32.2%
Taylor expanded in y.im around inf 77.3%
associate-/l*83.2%
Simplified83.2%
clear-num83.2%
un-div-inv83.3%
Applied egg-rr83.3%
if -6.0999999999999998e88 < y.im < -1.00000000000000004e-89 or 1.62e-105 < y.im < 3.39999999999999996e38Initial program 91.6%
fma-define91.6%
fma-define91.6%
Simplified91.6%
if -1.00000000000000004e-89 < y.im < 1.62e-105Initial program 70.8%
Taylor expanded in y.re around inf 92.4%
+-commutative92.4%
associate-/l*93.6%
fma-define93.6%
Simplified93.6%
if 3.39999999999999996e38 < y.im Initial program 53.2%
Taylor expanded in y.im around inf 84.4%
associate-/l*86.6%
Simplified86.6%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (<=
(/ (+ (* x.re y.re) (* x.im y.im)) (+ (* y.re y.re) (* y.im y.im)))
1e+306)
(*
(/ 1.0 (hypot y.re y.im))
(/ (fma x.re y.re (* x.im y.im)) (hypot y.re y.im)))
(/ (+ x.im (* x.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) {
double tmp;
if ((((x_46_re * y_46_re) + (x_46_im * y_46_im)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im))) <= 1e+306) {
tmp = (1.0 / hypot(y_46_re, y_46_im)) * (fma(x_46_re, y_46_re, (x_46_im * y_46_im)) / hypot(y_46_re, y_46_im));
} else {
tmp = (x_46_im + (x_46_re * (y_46_re / y_46_im))) / y_46_im;
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if (Float64(Float64(Float64(x_46_re * y_46_re) + Float64(x_46_im * y_46_im)) / Float64(Float64(y_46_re * y_46_re) + Float64(y_46_im * y_46_im))) <= 1e+306) tmp = Float64(Float64(1.0 / hypot(y_46_re, y_46_im)) * Float64(fma(x_46_re, y_46_re, Float64(x_46_im * y_46_im)) / hypot(y_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_im); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[N[(N[(N[(x$46$re * y$46$re), $MachinePrecision] + N[(x$46$im * 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+306], N[(N[(1.0 / N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision]), $MachinePrecision] * N[(N[(x$46$re * y$46$re + N[(x$46$im * 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$re / y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y$46$im), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{x.re \cdot y.re + x.im \cdot y.im}{y.re \cdot y.re + y.im \cdot y.im} \leq 10^{+306}:\\
\;\;\;\;\frac{1}{\mathsf{hypot}\left(y.re, y.im\right)} \cdot \frac{\mathsf{fma}\left(x.re, y.re, x.im \cdot y.im\right)}{\mathsf{hypot}\left(y.re, y.im\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x.im + x.re \cdot \frac{y.re}{y.im}}{y.im}\\
\end{array}
\end{array}
if (/.f64 (+.f64 (*.f64 x.re y.re) (*.f64 x.im y.im)) (+.f64 (*.f64 y.re y.re) (*.f64 y.im y.im))) < 1.00000000000000002e306Initial program 81.6%
*-un-lft-identity81.6%
associate-*r/81.6%
fma-define81.6%
add-sqr-sqrt81.6%
times-frac81.5%
fma-define81.5%
hypot-define81.6%
fma-define81.6%
fma-define81.6%
hypot-define95.8%
Applied egg-rr95.8%
if 1.00000000000000002e306 < (/.f64 (+.f64 (*.f64 x.re y.re) (*.f64 x.im y.im)) (+.f64 (*.f64 y.re y.re) (*.f64 y.im y.im))) Initial program 11.7%
Taylor expanded in y.im around inf 60.1%
associate-/l*65.2%
Simplified65.2%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (+ (* x.re y.re) (* x.im y.im))))
(if (<= (/ t_0 (+ (* y.re y.re) (* y.im y.im))) 1e+306)
(* (/ 1.0 (hypot y.re y.im)) (/ t_0 (hypot y.re y.im)))
(/ (+ x.im (* x.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) {
double t_0 = (x_46_re * y_46_re) + (x_46_im * y_46_im);
double tmp;
if ((t_0 / ((y_46_re * y_46_re) + (y_46_im * y_46_im))) <= 1e+306) {
tmp = (1.0 / hypot(y_46_re, y_46_im)) * (t_0 / hypot(y_46_re, y_46_im));
} else {
tmp = (x_46_im + (x_46_re * (y_46_re / y_46_im))) / y_46_im;
}
return tmp;
}
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = (x_46_re * y_46_re) + (x_46_im * y_46_im);
double tmp;
if ((t_0 / ((y_46_re * y_46_re) + (y_46_im * y_46_im))) <= 1e+306) {
tmp = (1.0 / Math.hypot(y_46_re, y_46_im)) * (t_0 / Math.hypot(y_46_re, y_46_im));
} else {
tmp = (x_46_im + (x_46_re * (y_46_re / y_46_im))) / y_46_im;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = (x_46_re * y_46_re) + (x_46_im * y_46_im) tmp = 0 if (t_0 / ((y_46_re * y_46_re) + (y_46_im * y_46_im))) <= 1e+306: tmp = (1.0 / math.hypot(y_46_re, y_46_im)) * (t_0 / math.hypot(y_46_re, y_46_im)) else: tmp = (x_46_im + (x_46_re * (y_46_re / y_46_im))) / 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_re * y_46_re) + Float64(x_46_im * 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))) <= 1e+306) tmp = Float64(Float64(1.0 / hypot(y_46_re, y_46_im)) * Float64(t_0 / hypot(y_46_re, y_46_im))); else tmp = Float64(Float64(x_46_im + Float64(x_46_re * Float64(y_46_re / y_46_im))) / y_46_im); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = (x_46_re * y_46_re) + (x_46_im * y_46_im); tmp = 0.0; if ((t_0 / ((y_46_re * y_46_re) + (y_46_im * y_46_im))) <= 1e+306) tmp = (1.0 / hypot(y_46_re, y_46_im)) * (t_0 / hypot(y_46_re, y_46_im)); else tmp = (x_46_im + (x_46_re * (y_46_re / y_46_im))) / y_46_im; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[(x$46$re * y$46$re), $MachinePrecision] + N[(x$46$im * 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], 1e+306], 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[(x$46$im + N[(x$46$re * N[(y$46$re / y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y$46$im), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x.re \cdot y.re + x.im \cdot y.im\\
\mathbf{if}\;\frac{t\_0}{y.re \cdot y.re + y.im \cdot y.im} \leq 10^{+306}:\\
\;\;\;\;\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{x.im + x.re \cdot \frac{y.re}{y.im}}{y.im}\\
\end{array}
\end{array}
if (/.f64 (+.f64 (*.f64 x.re y.re) (*.f64 x.im y.im)) (+.f64 (*.f64 y.re y.re) (*.f64 y.im y.im))) < 1.00000000000000002e306Initial program 81.6%
*-un-lft-identity81.6%
associate-*r/81.6%
fma-define81.6%
add-sqr-sqrt81.6%
times-frac81.5%
fma-define81.5%
hypot-define81.6%
fma-define81.6%
fma-define81.6%
hypot-define95.8%
Applied egg-rr95.8%
fma-define95.8%
Applied egg-rr95.8%
if 1.00000000000000002e306 < (/.f64 (+.f64 (*.f64 x.re y.re) (*.f64 x.im y.im)) (+.f64 (*.f64 y.re y.re) (*.f64 y.im y.im))) Initial program 11.7%
Taylor expanded in y.im around inf 60.1%
associate-/l*65.2%
Simplified65.2%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0
(/ (+ (* x.re y.re) (* x.im y.im)) (+ (* y.re y.re) (* y.im y.im)))))
(if (<= y.im -1.32e+94)
(/ (+ x.im (/ x.re (/ y.im y.re))) y.im)
(if (<= y.im -1.1e-82)
t_0
(if (<= y.im 1.25e-106)
(/ (fma x.im (/ y.im y.re) x.re) y.re)
(if (<= y.im 3.4e+38)
t_0
(/ (+ x.im (* x.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) {
double t_0 = ((x_46_re * y_46_re) + (x_46_im * y_46_im)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im));
double tmp;
if (y_46_im <= -1.32e+94) {
tmp = (x_46_im + (x_46_re / (y_46_im / y_46_re))) / y_46_im;
} else if (y_46_im <= -1.1e-82) {
tmp = t_0;
} else if (y_46_im <= 1.25e-106) {
tmp = fma(x_46_im, (y_46_im / y_46_re), x_46_re) / y_46_re;
} else if (y_46_im <= 3.4e+38) {
tmp = t_0;
} else {
tmp = (x_46_im + (x_46_re * (y_46_re / y_46_im))) / y_46_im;
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(Float64(Float64(x_46_re * y_46_re) + Float64(x_46_im * y_46_im)) / Float64(Float64(y_46_re * y_46_re) + Float64(y_46_im * y_46_im))) tmp = 0.0 if (y_46_im <= -1.32e+94) tmp = Float64(Float64(x_46_im + Float64(x_46_re / Float64(y_46_im / y_46_re))) / y_46_im); elseif (y_46_im <= -1.1e-82) tmp = t_0; elseif (y_46_im <= 1.25e-106) tmp = Float64(fma(x_46_im, Float64(y_46_im / y_46_re), x_46_re) / y_46_re); elseif (y_46_im <= 3.4e+38) tmp = t_0; else tmp = Float64(Float64(x_46_im + Float64(x_46_re * Float64(y_46_re / y_46_im))) / 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[(N[(x$46$re * y$46$re), $MachinePrecision] + N[(x$46$im * 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, -1.32e+94], N[(N[(x$46$im + N[(x$46$re / N[(y$46$im / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y$46$im), $MachinePrecision], If[LessEqual[y$46$im, -1.1e-82], t$95$0, If[LessEqual[y$46$im, 1.25e-106], N[(N[(x$46$im * N[(y$46$im / y$46$re), $MachinePrecision] + x$46$re), $MachinePrecision] / y$46$re), $MachinePrecision], If[LessEqual[y$46$im, 3.4e+38], t$95$0, N[(N[(x$46$im + N[(x$46$re * N[(y$46$re / y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y$46$im), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x.re \cdot y.re + x.im \cdot y.im}{y.re \cdot y.re + y.im \cdot y.im}\\
\mathbf{if}\;y.im \leq -1.32 \cdot 10^{+94}:\\
\;\;\;\;\frac{x.im + \frac{x.re}{\frac{y.im}{y.re}}}{y.im}\\
\mathbf{elif}\;y.im \leq -1.1 \cdot 10^{-82}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y.im \leq 1.25 \cdot 10^{-106}:\\
\;\;\;\;\frac{\mathsf{fma}\left(x.im, \frac{y.im}{y.re}, x.re\right)}{y.re}\\
\mathbf{elif}\;y.im \leq 3.4 \cdot 10^{+38}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{x.im + x.re \cdot \frac{y.re}{y.im}}{y.im}\\
\end{array}
\end{array}
if y.im < -1.32000000000000003e94Initial program 32.2%
Taylor expanded in y.im around inf 77.3%
associate-/l*83.2%
Simplified83.2%
clear-num83.2%
un-div-inv83.3%
Applied egg-rr83.3%
if -1.32000000000000003e94 < y.im < -1.09999999999999993e-82 or 1.24999999999999996e-106 < y.im < 3.39999999999999996e38Initial program 91.6%
if -1.09999999999999993e-82 < y.im < 1.24999999999999996e-106Initial program 70.8%
Taylor expanded in y.re around inf 92.4%
+-commutative92.4%
associate-/l*93.6%
fma-define93.6%
Simplified93.6%
if 3.39999999999999996e38 < y.im Initial program 53.2%
Taylor expanded in y.im around inf 84.4%
associate-/l*86.6%
Simplified86.6%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0
(/ (+ (* x.re y.re) (* x.im y.im)) (+ (* y.re y.re) (* y.im y.im)))))
(if (<= y.im -2.8e+92)
(/ (+ x.im (/ x.re (/ y.im y.re))) y.im)
(if (<= y.im -9.2e-81)
t_0
(if (<= y.im 8.8e-107)
(/ (+ x.re (/ x.im (/ y.re y.im))) y.re)
(if (<= y.im 3.4e+38)
t_0
(/ (+ x.im (* x.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) {
double t_0 = ((x_46_re * y_46_re) + (x_46_im * y_46_im)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im));
double tmp;
if (y_46_im <= -2.8e+92) {
tmp = (x_46_im + (x_46_re / (y_46_im / y_46_re))) / y_46_im;
} else if (y_46_im <= -9.2e-81) {
tmp = t_0;
} else if (y_46_im <= 8.8e-107) {
tmp = (x_46_re + (x_46_im / (y_46_re / y_46_im))) / y_46_re;
} else if (y_46_im <= 3.4e+38) {
tmp = t_0;
} else {
tmp = (x_46_im + (x_46_re * (y_46_re / y_46_im))) / y_46_im;
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
real(8) :: tmp
t_0 = ((x_46re * y_46re) + (x_46im * y_46im)) / ((y_46re * y_46re) + (y_46im * y_46im))
if (y_46im <= (-2.8d+92)) then
tmp = (x_46im + (x_46re / (y_46im / y_46re))) / y_46im
else if (y_46im <= (-9.2d-81)) then
tmp = t_0
else if (y_46im <= 8.8d-107) then
tmp = (x_46re + (x_46im / (y_46re / y_46im))) / y_46re
else if (y_46im <= 3.4d+38) then
tmp = t_0
else
tmp = (x_46im + (x_46re * (y_46re / y_46im))) / y_46im
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = ((x_46_re * y_46_re) + (x_46_im * y_46_im)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im));
double tmp;
if (y_46_im <= -2.8e+92) {
tmp = (x_46_im + (x_46_re / (y_46_im / y_46_re))) / y_46_im;
} else if (y_46_im <= -9.2e-81) {
tmp = t_0;
} else if (y_46_im <= 8.8e-107) {
tmp = (x_46_re + (x_46_im / (y_46_re / y_46_im))) / y_46_re;
} else if (y_46_im <= 3.4e+38) {
tmp = t_0;
} else {
tmp = (x_46_im + (x_46_re * (y_46_re / y_46_im))) / y_46_im;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = ((x_46_re * y_46_re) + (x_46_im * y_46_im)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im)) tmp = 0 if y_46_im <= -2.8e+92: tmp = (x_46_im + (x_46_re / (y_46_im / y_46_re))) / y_46_im elif y_46_im <= -9.2e-81: tmp = t_0 elif y_46_im <= 8.8e-107: tmp = (x_46_re + (x_46_im / (y_46_re / y_46_im))) / y_46_re elif y_46_im <= 3.4e+38: tmp = t_0 else: tmp = (x_46_im + (x_46_re * (y_46_re / y_46_im))) / y_46_im return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(Float64(Float64(x_46_re * y_46_re) + Float64(x_46_im * y_46_im)) / Float64(Float64(y_46_re * y_46_re) + Float64(y_46_im * y_46_im))) tmp = 0.0 if (y_46_im <= -2.8e+92) tmp = Float64(Float64(x_46_im + Float64(x_46_re / Float64(y_46_im / y_46_re))) / y_46_im); elseif (y_46_im <= -9.2e-81) tmp = t_0; elseif (y_46_im <= 8.8e-107) tmp = Float64(Float64(x_46_re + Float64(x_46_im / Float64(y_46_re / y_46_im))) / y_46_re); elseif (y_46_im <= 3.4e+38) tmp = t_0; else tmp = Float64(Float64(x_46_im + Float64(x_46_re * Float64(y_46_re / y_46_im))) / y_46_im); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = ((x_46_re * y_46_re) + (x_46_im * y_46_im)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im)); tmp = 0.0; if (y_46_im <= -2.8e+92) tmp = (x_46_im + (x_46_re / (y_46_im / y_46_re))) / y_46_im; elseif (y_46_im <= -9.2e-81) tmp = t_0; elseif (y_46_im <= 8.8e-107) tmp = (x_46_re + (x_46_im / (y_46_re / y_46_im))) / y_46_re; elseif (y_46_im <= 3.4e+38) tmp = t_0; else tmp = (x_46_im + (x_46_re * (y_46_re / y_46_im))) / y_46_im; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[(N[(x$46$re * y$46$re), $MachinePrecision] + N[(x$46$im * 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, -2.8e+92], N[(N[(x$46$im + N[(x$46$re / N[(y$46$im / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y$46$im), $MachinePrecision], If[LessEqual[y$46$im, -9.2e-81], t$95$0, If[LessEqual[y$46$im, 8.8e-107], N[(N[(x$46$re + N[(x$46$im / N[(y$46$re / y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y$46$re), $MachinePrecision], If[LessEqual[y$46$im, 3.4e+38], t$95$0, N[(N[(x$46$im + N[(x$46$re * N[(y$46$re / y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y$46$im), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x.re \cdot y.re + x.im \cdot y.im}{y.re \cdot y.re + y.im \cdot y.im}\\
\mathbf{if}\;y.im \leq -2.8 \cdot 10^{+92}:\\
\;\;\;\;\frac{x.im + \frac{x.re}{\frac{y.im}{y.re}}}{y.im}\\
\mathbf{elif}\;y.im \leq -9.2 \cdot 10^{-81}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y.im \leq 8.8 \cdot 10^{-107}:\\
\;\;\;\;\frac{x.re + \frac{x.im}{\frac{y.re}{y.im}}}{y.re}\\
\mathbf{elif}\;y.im \leq 3.4 \cdot 10^{+38}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{x.im + x.re \cdot \frac{y.re}{y.im}}{y.im}\\
\end{array}
\end{array}
if y.im < -2.80000000000000001e92Initial program 32.2%
Taylor expanded in y.im around inf 77.3%
associate-/l*83.2%
Simplified83.2%
clear-num83.2%
un-div-inv83.3%
Applied egg-rr83.3%
if -2.80000000000000001e92 < y.im < -9.19999999999999965e-81 or 8.8000000000000005e-107 < y.im < 3.39999999999999996e38Initial program 91.6%
if -9.19999999999999965e-81 < y.im < 8.8000000000000005e-107Initial program 70.8%
Taylor expanded in y.re around inf 92.4%
associate-/l*93.6%
Simplified93.6%
clear-num93.6%
un-div-inv93.6%
Applied egg-rr93.6%
if 3.39999999999999996e38 < y.im Initial program 53.2%
Taylor expanded in y.im around inf 84.4%
associate-/l*86.6%
Simplified86.6%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (<= y.im -1.35e+24)
(/ (+ x.im (/ x.re (/ y.im y.re))) y.im)
(if (<= y.im 4.8e-106)
(/ (+ x.re (/ x.im (/ y.re y.im))) y.re)
(if (<= y.im 1.9e+17)
(/ (* x.im y.im) (+ (* y.re y.re) (* y.im y.im)))
(if (<= y.im 1.45e+36)
(/ (+ x.re (/ y.im (/ y.re x.im))) y.re)
(/ (+ x.im (* x.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) {
double tmp;
if (y_46_im <= -1.35e+24) {
tmp = (x_46_im + (x_46_re / (y_46_im / y_46_re))) / y_46_im;
} else if (y_46_im <= 4.8e-106) {
tmp = (x_46_re + (x_46_im / (y_46_re / y_46_im))) / y_46_re;
} else if (y_46_im <= 1.9e+17) {
tmp = (x_46_im * y_46_im) / ((y_46_re * y_46_re) + (y_46_im * y_46_im));
} else if (y_46_im <= 1.45e+36) {
tmp = (x_46_re + (y_46_im / (y_46_re / x_46_im))) / y_46_re;
} else {
tmp = (x_46_im + (x_46_re * (y_46_re / y_46_im))) / y_46_im;
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: tmp
if (y_46im <= (-1.35d+24)) then
tmp = (x_46im + (x_46re / (y_46im / y_46re))) / y_46im
else if (y_46im <= 4.8d-106) then
tmp = (x_46re + (x_46im / (y_46re / y_46im))) / y_46re
else if (y_46im <= 1.9d+17) then
tmp = (x_46im * y_46im) / ((y_46re * y_46re) + (y_46im * y_46im))
else if (y_46im <= 1.45d+36) then
tmp = (x_46re + (y_46im / (y_46re / x_46im))) / y_46re
else
tmp = (x_46im + (x_46re * (y_46re / y_46im))) / y_46im
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_im <= -1.35e+24) {
tmp = (x_46_im + (x_46_re / (y_46_im / y_46_re))) / y_46_im;
} else if (y_46_im <= 4.8e-106) {
tmp = (x_46_re + (x_46_im / (y_46_re / y_46_im))) / y_46_re;
} else if (y_46_im <= 1.9e+17) {
tmp = (x_46_im * y_46_im) / ((y_46_re * y_46_re) + (y_46_im * y_46_im));
} else if (y_46_im <= 1.45e+36) {
tmp = (x_46_re + (y_46_im / (y_46_re / x_46_im))) / y_46_re;
} else {
tmp = (x_46_im + (x_46_re * (y_46_re / y_46_im))) / y_46_im;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if y_46_im <= -1.35e+24: tmp = (x_46_im + (x_46_re / (y_46_im / y_46_re))) / y_46_im elif y_46_im <= 4.8e-106: tmp = (x_46_re + (x_46_im / (y_46_re / y_46_im))) / y_46_re elif y_46_im <= 1.9e+17: tmp = (x_46_im * y_46_im) / ((y_46_re * y_46_re) + (y_46_im * y_46_im)) elif y_46_im <= 1.45e+36: tmp = (x_46_re + (y_46_im / (y_46_re / x_46_im))) / y_46_re else: tmp = (x_46_im + (x_46_re * (y_46_re / y_46_im))) / y_46_im return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if (y_46_im <= -1.35e+24) tmp = Float64(Float64(x_46_im + Float64(x_46_re / Float64(y_46_im / y_46_re))) / y_46_im); elseif (y_46_im <= 4.8e-106) tmp = Float64(Float64(x_46_re + Float64(x_46_im / Float64(y_46_re / y_46_im))) / y_46_re); elseif (y_46_im <= 1.9e+17) tmp = Float64(Float64(x_46_im * y_46_im) / Float64(Float64(y_46_re * y_46_re) + Float64(y_46_im * y_46_im))); elseif (y_46_im <= 1.45e+36) tmp = Float64(Float64(x_46_re + Float64(y_46_im / Float64(y_46_re / x_46_im))) / y_46_re); else tmp = Float64(Float64(x_46_im + Float64(x_46_re * Float64(y_46_re / y_46_im))) / y_46_im); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if (y_46_im <= -1.35e+24) tmp = (x_46_im + (x_46_re / (y_46_im / y_46_re))) / y_46_im; elseif (y_46_im <= 4.8e-106) tmp = (x_46_re + (x_46_im / (y_46_re / y_46_im))) / y_46_re; elseif (y_46_im <= 1.9e+17) tmp = (x_46_im * y_46_im) / ((y_46_re * y_46_re) + (y_46_im * y_46_im)); elseif (y_46_im <= 1.45e+36) tmp = (x_46_re + (y_46_im / (y_46_re / x_46_im))) / y_46_re; else tmp = (x_46_im + (x_46_re * (y_46_re / y_46_im))) / y_46_im; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[y$46$im, -1.35e+24], N[(N[(x$46$im + N[(x$46$re / N[(y$46$im / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y$46$im), $MachinePrecision], If[LessEqual[y$46$im, 4.8e-106], N[(N[(x$46$re + N[(x$46$im / N[(y$46$re / y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y$46$re), $MachinePrecision], If[LessEqual[y$46$im, 1.9e+17], N[(N[(x$46$im * y$46$im), $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, 1.45e+36], N[(N[(x$46$re + N[(y$46$im / N[(y$46$re / x$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y$46$re), $MachinePrecision], N[(N[(x$46$im + N[(x$46$re * N[(y$46$re / y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y$46$im), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.im \leq -1.35 \cdot 10^{+24}:\\
\;\;\;\;\frac{x.im + \frac{x.re}{\frac{y.im}{y.re}}}{y.im}\\
\mathbf{elif}\;y.im \leq 4.8 \cdot 10^{-106}:\\
\;\;\;\;\frac{x.re + \frac{x.im}{\frac{y.re}{y.im}}}{y.re}\\
\mathbf{elif}\;y.im \leq 1.9 \cdot 10^{+17}:\\
\;\;\;\;\frac{x.im \cdot y.im}{y.re \cdot y.re + y.im \cdot y.im}\\
\mathbf{elif}\;y.im \leq 1.45 \cdot 10^{+36}:\\
\;\;\;\;\frac{x.re + \frac{y.im}{\frac{y.re}{x.im}}}{y.re}\\
\mathbf{else}:\\
\;\;\;\;\frac{x.im + x.re \cdot \frac{y.re}{y.im}}{y.im}\\
\end{array}
\end{array}
if y.im < -1.35e24Initial program 44.0%
Taylor expanded in y.im around inf 77.5%
associate-/l*82.2%
Simplified82.2%
clear-num82.2%
un-div-inv82.2%
Applied egg-rr82.2%
if -1.35e24 < y.im < 4.7999999999999995e-106Initial program 74.6%
Taylor expanded in y.re around inf 86.0%
associate-/l*86.9%
Simplified86.9%
clear-num86.9%
un-div-inv86.9%
Applied egg-rr86.9%
if 4.7999999999999995e-106 < y.im < 1.9e17Initial program 99.7%
Taylor expanded in x.re around 0 70.4%
if 1.9e17 < y.im < 1.45e36Initial program 72.9%
Taylor expanded in y.re around inf 86.1%
+-commutative86.1%
associate-/l*86.1%
fma-define86.1%
Simplified86.1%
fma-undefine86.1%
associate-*r/86.1%
*-commutative86.1%
associate-/l*86.1%
Applied egg-rr86.1%
clear-num86.1%
un-div-inv86.1%
Applied egg-rr86.1%
if 1.45e36 < y.im Initial program 53.2%
Taylor expanded in y.im around inf 84.4%
associate-/l*86.6%
Simplified86.6%
Final simplification83.8%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (/ (+ x.im (/ x.re (/ y.im y.re))) y.im)))
(if (<= y.im -2.4e+23)
t_0
(if (<= y.im 1.35e-76)
(/ (+ x.re (/ x.im (/ y.re y.im))) y.re)
(if (<= y.im 4.6e-24)
t_0
(if (<= y.im 8.5e+37)
(/ (+ x.re (/ y.im (/ y.re x.im))) y.re)
(/ (+ x.im (* x.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) {
double t_0 = (x_46_im + (x_46_re / (y_46_im / y_46_re))) / y_46_im;
double tmp;
if (y_46_im <= -2.4e+23) {
tmp = t_0;
} else if (y_46_im <= 1.35e-76) {
tmp = (x_46_re + (x_46_im / (y_46_re / y_46_im))) / y_46_re;
} else if (y_46_im <= 4.6e-24) {
tmp = t_0;
} else if (y_46_im <= 8.5e+37) {
tmp = (x_46_re + (y_46_im / (y_46_re / x_46_im))) / y_46_re;
} else {
tmp = (x_46_im + (x_46_re * (y_46_re / y_46_im))) / y_46_im;
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
real(8) :: tmp
t_0 = (x_46im + (x_46re / (y_46im / y_46re))) / y_46im
if (y_46im <= (-2.4d+23)) then
tmp = t_0
else if (y_46im <= 1.35d-76) then
tmp = (x_46re + (x_46im / (y_46re / y_46im))) / y_46re
else if (y_46im <= 4.6d-24) then
tmp = t_0
else if (y_46im <= 8.5d+37) then
tmp = (x_46re + (y_46im / (y_46re / x_46im))) / y_46re
else
tmp = (x_46im + (x_46re * (y_46re / y_46im))) / y_46im
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = (x_46_im + (x_46_re / (y_46_im / y_46_re))) / y_46_im;
double tmp;
if (y_46_im <= -2.4e+23) {
tmp = t_0;
} else if (y_46_im <= 1.35e-76) {
tmp = (x_46_re + (x_46_im / (y_46_re / y_46_im))) / y_46_re;
} else if (y_46_im <= 4.6e-24) {
tmp = t_0;
} else if (y_46_im <= 8.5e+37) {
tmp = (x_46_re + (y_46_im / (y_46_re / x_46_im))) / y_46_re;
} else {
tmp = (x_46_im + (x_46_re * (y_46_re / y_46_im))) / y_46_im;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = (x_46_im + (x_46_re / (y_46_im / y_46_re))) / y_46_im tmp = 0 if y_46_im <= -2.4e+23: tmp = t_0 elif y_46_im <= 1.35e-76: tmp = (x_46_re + (x_46_im / (y_46_re / y_46_im))) / y_46_re elif y_46_im <= 4.6e-24: tmp = t_0 elif y_46_im <= 8.5e+37: tmp = (x_46_re + (y_46_im / (y_46_re / x_46_im))) / y_46_re else: tmp = (x_46_im + (x_46_re * (y_46_re / y_46_im))) / 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 + Float64(x_46_re / Float64(y_46_im / y_46_re))) / y_46_im) tmp = 0.0 if (y_46_im <= -2.4e+23) tmp = t_0; elseif (y_46_im <= 1.35e-76) tmp = Float64(Float64(x_46_re + Float64(x_46_im / Float64(y_46_re / y_46_im))) / y_46_re); elseif (y_46_im <= 4.6e-24) tmp = t_0; elseif (y_46_im <= 8.5e+37) tmp = Float64(Float64(x_46_re + Float64(y_46_im / Float64(y_46_re / x_46_im))) / y_46_re); else tmp = Float64(Float64(x_46_im + Float64(x_46_re * Float64(y_46_re / y_46_im))) / y_46_im); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = (x_46_im + (x_46_re / (y_46_im / y_46_re))) / y_46_im; tmp = 0.0; if (y_46_im <= -2.4e+23) tmp = t_0; elseif (y_46_im <= 1.35e-76) tmp = (x_46_re + (x_46_im / (y_46_re / y_46_im))) / y_46_re; elseif (y_46_im <= 4.6e-24) tmp = t_0; elseif (y_46_im <= 8.5e+37) tmp = (x_46_re + (y_46_im / (y_46_re / x_46_im))) / y_46_re; else tmp = (x_46_im + (x_46_re * (y_46_re / y_46_im))) / y_46_im; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[(x$46$im + N[(x$46$re / N[(y$46$im / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y$46$im), $MachinePrecision]}, If[LessEqual[y$46$im, -2.4e+23], t$95$0, If[LessEqual[y$46$im, 1.35e-76], N[(N[(x$46$re + N[(x$46$im / N[(y$46$re / y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y$46$re), $MachinePrecision], If[LessEqual[y$46$im, 4.6e-24], t$95$0, If[LessEqual[y$46$im, 8.5e+37], N[(N[(x$46$re + N[(y$46$im / N[(y$46$re / x$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y$46$re), $MachinePrecision], N[(N[(x$46$im + N[(x$46$re * N[(y$46$re / y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y$46$im), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x.im + \frac{x.re}{\frac{y.im}{y.re}}}{y.im}\\
\mathbf{if}\;y.im \leq -2.4 \cdot 10^{+23}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y.im \leq 1.35 \cdot 10^{-76}:\\
\;\;\;\;\frac{x.re + \frac{x.im}{\frac{y.re}{y.im}}}{y.re}\\
\mathbf{elif}\;y.im \leq 4.6 \cdot 10^{-24}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y.im \leq 8.5 \cdot 10^{+37}:\\
\;\;\;\;\frac{x.re + \frac{y.im}{\frac{y.re}{x.im}}}{y.re}\\
\mathbf{else}:\\
\;\;\;\;\frac{x.im + x.re \cdot \frac{y.re}{y.im}}{y.im}\\
\end{array}
\end{array}
if y.im < -2.4e23 or 1.35e-76 < y.im < 4.6000000000000002e-24Initial program 53.4%
Taylor expanded in y.im around inf 77.6%
associate-/l*81.5%
Simplified81.5%
clear-num81.5%
un-div-inv81.5%
Applied egg-rr81.5%
if -2.4e23 < y.im < 1.35e-76Initial program 76.3%
Taylor expanded in y.re around inf 83.7%
associate-/l*84.5%
Simplified84.5%
clear-num84.5%
un-div-inv84.5%
Applied egg-rr84.5%
if 4.6000000000000002e-24 < y.im < 8.4999999999999999e37Initial program 87.4%
Taylor expanded in y.re around inf 74.1%
+-commutative74.1%
associate-/l*74.1%
fma-define74.1%
Simplified74.1%
fma-undefine74.1%
associate-*r/74.1%
*-commutative74.1%
associate-/l*74.1%
Applied egg-rr74.1%
clear-num74.0%
un-div-inv74.1%
Applied egg-rr74.1%
if 8.4999999999999999e37 < y.im Initial program 53.2%
Taylor expanded in y.im around inf 84.4%
associate-/l*86.6%
Simplified86.6%
Final simplification83.4%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (/ (+ x.im (/ x.re (/ y.im y.re))) y.im)))
(if (<= y.im -1.3e+34)
t_0
(if (<= y.im 1.35e-76)
(/ (+ x.re (/ x.im (/ y.re y.im))) y.re)
(if (<= y.im 1.15e-25)
t_0
(if (<= y.im 2e+36)
(/ (+ x.re (* y.im (/ x.im y.re))) y.re)
(/ (+ x.im (* x.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) {
double t_0 = (x_46_im + (x_46_re / (y_46_im / y_46_re))) / y_46_im;
double tmp;
if (y_46_im <= -1.3e+34) {
tmp = t_0;
} else if (y_46_im <= 1.35e-76) {
tmp = (x_46_re + (x_46_im / (y_46_re / y_46_im))) / y_46_re;
} else if (y_46_im <= 1.15e-25) {
tmp = t_0;
} else if (y_46_im <= 2e+36) {
tmp = (x_46_re + (y_46_im * (x_46_im / y_46_re))) / y_46_re;
} else {
tmp = (x_46_im + (x_46_re * (y_46_re / y_46_im))) / y_46_im;
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
real(8) :: tmp
t_0 = (x_46im + (x_46re / (y_46im / y_46re))) / y_46im
if (y_46im <= (-1.3d+34)) then
tmp = t_0
else if (y_46im <= 1.35d-76) then
tmp = (x_46re + (x_46im / (y_46re / y_46im))) / y_46re
else if (y_46im <= 1.15d-25) then
tmp = t_0
else if (y_46im <= 2d+36) then
tmp = (x_46re + (y_46im * (x_46im / y_46re))) / y_46re
else
tmp = (x_46im + (x_46re * (y_46re / y_46im))) / y_46im
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = (x_46_im + (x_46_re / (y_46_im / y_46_re))) / y_46_im;
double tmp;
if (y_46_im <= -1.3e+34) {
tmp = t_0;
} else if (y_46_im <= 1.35e-76) {
tmp = (x_46_re + (x_46_im / (y_46_re / y_46_im))) / y_46_re;
} else if (y_46_im <= 1.15e-25) {
tmp = t_0;
} else if (y_46_im <= 2e+36) {
tmp = (x_46_re + (y_46_im * (x_46_im / y_46_re))) / y_46_re;
} else {
tmp = (x_46_im + (x_46_re * (y_46_re / y_46_im))) / y_46_im;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = (x_46_im + (x_46_re / (y_46_im / y_46_re))) / y_46_im tmp = 0 if y_46_im <= -1.3e+34: tmp = t_0 elif y_46_im <= 1.35e-76: tmp = (x_46_re + (x_46_im / (y_46_re / y_46_im))) / y_46_re elif y_46_im <= 1.15e-25: tmp = t_0 elif y_46_im <= 2e+36: tmp = (x_46_re + (y_46_im * (x_46_im / y_46_re))) / y_46_re else: tmp = (x_46_im + (x_46_re * (y_46_re / y_46_im))) / 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 + Float64(x_46_re / Float64(y_46_im / y_46_re))) / y_46_im) tmp = 0.0 if (y_46_im <= -1.3e+34) tmp = t_0; elseif (y_46_im <= 1.35e-76) tmp = Float64(Float64(x_46_re + Float64(x_46_im / Float64(y_46_re / y_46_im))) / y_46_re); elseif (y_46_im <= 1.15e-25) tmp = t_0; elseif (y_46_im <= 2e+36) tmp = Float64(Float64(x_46_re + Float64(y_46_im * Float64(x_46_im / y_46_re))) / y_46_re); else tmp = Float64(Float64(x_46_im + Float64(x_46_re * Float64(y_46_re / y_46_im))) / y_46_im); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = (x_46_im + (x_46_re / (y_46_im / y_46_re))) / y_46_im; tmp = 0.0; if (y_46_im <= -1.3e+34) tmp = t_0; elseif (y_46_im <= 1.35e-76) tmp = (x_46_re + (x_46_im / (y_46_re / y_46_im))) / y_46_re; elseif (y_46_im <= 1.15e-25) tmp = t_0; elseif (y_46_im <= 2e+36) tmp = (x_46_re + (y_46_im * (x_46_im / y_46_re))) / y_46_re; else tmp = (x_46_im + (x_46_re * (y_46_re / y_46_im))) / y_46_im; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[(x$46$im + N[(x$46$re / N[(y$46$im / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y$46$im), $MachinePrecision]}, If[LessEqual[y$46$im, -1.3e+34], t$95$0, If[LessEqual[y$46$im, 1.35e-76], N[(N[(x$46$re + N[(x$46$im / N[(y$46$re / y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y$46$re), $MachinePrecision], If[LessEqual[y$46$im, 1.15e-25], t$95$0, If[LessEqual[y$46$im, 2e+36], N[(N[(x$46$re + N[(y$46$im * N[(x$46$im / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y$46$re), $MachinePrecision], N[(N[(x$46$im + N[(x$46$re * N[(y$46$re / y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y$46$im), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x.im + \frac{x.re}{\frac{y.im}{y.re}}}{y.im}\\
\mathbf{if}\;y.im \leq -1.3 \cdot 10^{+34}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y.im \leq 1.35 \cdot 10^{-76}:\\
\;\;\;\;\frac{x.re + \frac{x.im}{\frac{y.re}{y.im}}}{y.re}\\
\mathbf{elif}\;y.im \leq 1.15 \cdot 10^{-25}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y.im \leq 2 \cdot 10^{+36}:\\
\;\;\;\;\frac{x.re + y.im \cdot \frac{x.im}{y.re}}{y.re}\\
\mathbf{else}:\\
\;\;\;\;\frac{x.im + x.re \cdot \frac{y.re}{y.im}}{y.im}\\
\end{array}
\end{array}
if y.im < -1.29999999999999999e34 or 1.35e-76 < y.im < 1.15e-25Initial program 53.4%
Taylor expanded in y.im around inf 77.6%
associate-/l*81.5%
Simplified81.5%
clear-num81.5%
un-div-inv81.5%
Applied egg-rr81.5%
if -1.29999999999999999e34 < y.im < 1.35e-76Initial program 76.3%
Taylor expanded in y.re around inf 83.7%
associate-/l*84.5%
Simplified84.5%
clear-num84.5%
un-div-inv84.5%
Applied egg-rr84.5%
if 1.15e-25 < y.im < 2.00000000000000008e36Initial program 87.4%
Taylor expanded in y.re around inf 74.1%
+-commutative74.1%
associate-/l*74.1%
fma-define74.1%
Simplified74.1%
fma-undefine74.1%
associate-*r/74.1%
*-commutative74.1%
associate-/l*74.1%
Applied egg-rr74.1%
if 2.00000000000000008e36 < y.im Initial program 53.2%
Taylor expanded in y.im around inf 84.4%
associate-/l*86.6%
Simplified86.6%
Final simplification83.4%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (/ (+ x.re (/ x.im (/ y.re y.im))) y.re))
(t_1 (/ (+ x.im (/ x.re (/ y.im y.re))) y.im)))
(if (<= y.im -8.5e+23)
t_1
(if (<= y.im 1.12e-76)
t_0
(if (<= y.im 4.5e-25)
t_1
(if (<= y.im 1.9e+36)
t_0
(/ (+ x.im (* x.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) {
double t_0 = (x_46_re + (x_46_im / (y_46_re / y_46_im))) / y_46_re;
double t_1 = (x_46_im + (x_46_re / (y_46_im / y_46_re))) / y_46_im;
double tmp;
if (y_46_im <= -8.5e+23) {
tmp = t_1;
} else if (y_46_im <= 1.12e-76) {
tmp = t_0;
} else if (y_46_im <= 4.5e-25) {
tmp = t_1;
} else if (y_46_im <= 1.9e+36) {
tmp = t_0;
} else {
tmp = (x_46_im + (x_46_re * (y_46_re / y_46_im))) / y_46_im;
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = (x_46re + (x_46im / (y_46re / y_46im))) / y_46re
t_1 = (x_46im + (x_46re / (y_46im / y_46re))) / y_46im
if (y_46im <= (-8.5d+23)) then
tmp = t_1
else if (y_46im <= 1.12d-76) then
tmp = t_0
else if (y_46im <= 4.5d-25) then
tmp = t_1
else if (y_46im <= 1.9d+36) then
tmp = t_0
else
tmp = (x_46im + (x_46re * (y_46re / y_46im))) / y_46im
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = (x_46_re + (x_46_im / (y_46_re / y_46_im))) / y_46_re;
double t_1 = (x_46_im + (x_46_re / (y_46_im / y_46_re))) / y_46_im;
double tmp;
if (y_46_im <= -8.5e+23) {
tmp = t_1;
} else if (y_46_im <= 1.12e-76) {
tmp = t_0;
} else if (y_46_im <= 4.5e-25) {
tmp = t_1;
} else if (y_46_im <= 1.9e+36) {
tmp = t_0;
} else {
tmp = (x_46_im + (x_46_re * (y_46_re / y_46_im))) / y_46_im;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = (x_46_re + (x_46_im / (y_46_re / y_46_im))) / y_46_re t_1 = (x_46_im + (x_46_re / (y_46_im / y_46_re))) / y_46_im tmp = 0 if y_46_im <= -8.5e+23: tmp = t_1 elif y_46_im <= 1.12e-76: tmp = t_0 elif y_46_im <= 4.5e-25: tmp = t_1 elif y_46_im <= 1.9e+36: tmp = t_0 else: tmp = (x_46_im + (x_46_re * (y_46_re / y_46_im))) / 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_re + Float64(x_46_im / Float64(y_46_re / y_46_im))) / y_46_re) t_1 = Float64(Float64(x_46_im + Float64(x_46_re / Float64(y_46_im / y_46_re))) / y_46_im) tmp = 0.0 if (y_46_im <= -8.5e+23) tmp = t_1; elseif (y_46_im <= 1.12e-76) tmp = t_0; elseif (y_46_im <= 4.5e-25) tmp = t_1; elseif (y_46_im <= 1.9e+36) tmp = t_0; else tmp = Float64(Float64(x_46_im + Float64(x_46_re * Float64(y_46_re / y_46_im))) / y_46_im); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = (x_46_re + (x_46_im / (y_46_re / y_46_im))) / y_46_re; t_1 = (x_46_im + (x_46_re / (y_46_im / y_46_re))) / y_46_im; tmp = 0.0; if (y_46_im <= -8.5e+23) tmp = t_1; elseif (y_46_im <= 1.12e-76) tmp = t_0; elseif (y_46_im <= 4.5e-25) tmp = t_1; elseif (y_46_im <= 1.9e+36) tmp = t_0; else tmp = (x_46_im + (x_46_re * (y_46_re / y_46_im))) / y_46_im; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[(x$46$re + N[(x$46$im / N[(y$46$re / y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y$46$re), $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$im), $MachinePrecision]}, If[LessEqual[y$46$im, -8.5e+23], t$95$1, If[LessEqual[y$46$im, 1.12e-76], t$95$0, If[LessEqual[y$46$im, 4.5e-25], t$95$1, If[LessEqual[y$46$im, 1.9e+36], t$95$0, N[(N[(x$46$im + N[(x$46$re * N[(y$46$re / y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y$46$im), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x.re + \frac{x.im}{\frac{y.re}{y.im}}}{y.re}\\
t_1 := \frac{x.im + \frac{x.re}{\frac{y.im}{y.re}}}{y.im}\\
\mathbf{if}\;y.im \leq -8.5 \cdot 10^{+23}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y.im \leq 1.12 \cdot 10^{-76}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y.im \leq 4.5 \cdot 10^{-25}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y.im \leq 1.9 \cdot 10^{+36}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{x.im + x.re \cdot \frac{y.re}{y.im}}{y.im}\\
\end{array}
\end{array}
if y.im < -8.5000000000000001e23 or 1.12e-76 < y.im < 4.5000000000000001e-25Initial program 53.4%
Taylor expanded in y.im around inf 77.6%
associate-/l*81.5%
Simplified81.5%
clear-num81.5%
un-div-inv81.5%
Applied egg-rr81.5%
if -8.5000000000000001e23 < y.im < 1.12e-76 or 4.5000000000000001e-25 < y.im < 1.90000000000000012e36Initial program 77.6%
Taylor expanded in y.re around inf 82.6%
associate-/l*83.3%
Simplified83.3%
clear-num83.3%
un-div-inv83.4%
Applied egg-rr83.4%
if 1.90000000000000012e36 < y.im Initial program 53.2%
Taylor expanded in y.im around inf 84.4%
associate-/l*86.6%
Simplified86.6%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (/ (+ x.re (* x.im (/ y.im y.re))) y.re))
(t_1 (/ (+ x.im (/ x.re (/ y.im y.re))) y.im)))
(if (<= y.im -3.1e+26)
t_1
(if (<= y.im 1.05e-76)
t_0
(if (<= y.im 1.2e-23)
t_1
(if (<= y.im 4.2e+37)
t_0
(/ (+ x.im (* x.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) {
double t_0 = (x_46_re + (x_46_im * (y_46_im / y_46_re))) / y_46_re;
double t_1 = (x_46_im + (x_46_re / (y_46_im / y_46_re))) / y_46_im;
double tmp;
if (y_46_im <= -3.1e+26) {
tmp = t_1;
} else if (y_46_im <= 1.05e-76) {
tmp = t_0;
} else if (y_46_im <= 1.2e-23) {
tmp = t_1;
} else if (y_46_im <= 4.2e+37) {
tmp = t_0;
} else {
tmp = (x_46_im + (x_46_re * (y_46_re / y_46_im))) / y_46_im;
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = (x_46re + (x_46im * (y_46im / y_46re))) / y_46re
t_1 = (x_46im + (x_46re / (y_46im / y_46re))) / y_46im
if (y_46im <= (-3.1d+26)) then
tmp = t_1
else if (y_46im <= 1.05d-76) then
tmp = t_0
else if (y_46im <= 1.2d-23) then
tmp = t_1
else if (y_46im <= 4.2d+37) then
tmp = t_0
else
tmp = (x_46im + (x_46re * (y_46re / y_46im))) / y_46im
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = (x_46_re + (x_46_im * (y_46_im / y_46_re))) / y_46_re;
double t_1 = (x_46_im + (x_46_re / (y_46_im / y_46_re))) / y_46_im;
double tmp;
if (y_46_im <= -3.1e+26) {
tmp = t_1;
} else if (y_46_im <= 1.05e-76) {
tmp = t_0;
} else if (y_46_im <= 1.2e-23) {
tmp = t_1;
} else if (y_46_im <= 4.2e+37) {
tmp = t_0;
} else {
tmp = (x_46_im + (x_46_re * (y_46_re / y_46_im))) / y_46_im;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = (x_46_re + (x_46_im * (y_46_im / y_46_re))) / y_46_re t_1 = (x_46_im + (x_46_re / (y_46_im / y_46_re))) / y_46_im tmp = 0 if y_46_im <= -3.1e+26: tmp = t_1 elif y_46_im <= 1.05e-76: tmp = t_0 elif y_46_im <= 1.2e-23: tmp = t_1 elif y_46_im <= 4.2e+37: tmp = t_0 else: tmp = (x_46_im + (x_46_re * (y_46_re / y_46_im))) / 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_re + Float64(x_46_im * Float64(y_46_im / y_46_re))) / y_46_re) t_1 = Float64(Float64(x_46_im + Float64(x_46_re / Float64(y_46_im / y_46_re))) / y_46_im) tmp = 0.0 if (y_46_im <= -3.1e+26) tmp = t_1; elseif (y_46_im <= 1.05e-76) tmp = t_0; elseif (y_46_im <= 1.2e-23) tmp = t_1; elseif (y_46_im <= 4.2e+37) tmp = t_0; else tmp = Float64(Float64(x_46_im + Float64(x_46_re * Float64(y_46_re / y_46_im))) / y_46_im); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = (x_46_re + (x_46_im * (y_46_im / y_46_re))) / y_46_re; t_1 = (x_46_im + (x_46_re / (y_46_im / y_46_re))) / y_46_im; tmp = 0.0; if (y_46_im <= -3.1e+26) tmp = t_1; elseif (y_46_im <= 1.05e-76) tmp = t_0; elseif (y_46_im <= 1.2e-23) tmp = t_1; elseif (y_46_im <= 4.2e+37) tmp = t_0; else tmp = (x_46_im + (x_46_re * (y_46_re / y_46_im))) / y_46_im; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[(x$46$re + N[(x$46$im * N[(y$46$im / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y$46$re), $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$im), $MachinePrecision]}, If[LessEqual[y$46$im, -3.1e+26], t$95$1, If[LessEqual[y$46$im, 1.05e-76], t$95$0, If[LessEqual[y$46$im, 1.2e-23], t$95$1, If[LessEqual[y$46$im, 4.2e+37], t$95$0, N[(N[(x$46$im + N[(x$46$re * N[(y$46$re / y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y$46$im), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x.re + x.im \cdot \frac{y.im}{y.re}}{y.re}\\
t_1 := \frac{x.im + \frac{x.re}{\frac{y.im}{y.re}}}{y.im}\\
\mathbf{if}\;y.im \leq -3.1 \cdot 10^{+26}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y.im \leq 1.05 \cdot 10^{-76}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y.im \leq 1.2 \cdot 10^{-23}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y.im \leq 4.2 \cdot 10^{+37}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{x.im + x.re \cdot \frac{y.re}{y.im}}{y.im}\\
\end{array}
\end{array}
if y.im < -3.1e26 or 1.04999999999999996e-76 < y.im < 1.19999999999999998e-23Initial program 53.4%
Taylor expanded in y.im around inf 77.6%
associate-/l*81.5%
Simplified81.5%
clear-num81.5%
un-div-inv81.5%
Applied egg-rr81.5%
if -3.1e26 < y.im < 1.04999999999999996e-76 or 1.19999999999999998e-23 < y.im < 4.2000000000000002e37Initial program 77.6%
Taylor expanded in y.re around inf 82.6%
associate-/l*83.3%
Simplified83.3%
if 4.2000000000000002e37 < y.im Initial program 53.2%
Taylor expanded in y.im around inf 84.4%
associate-/l*86.6%
Simplified86.6%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (or (<= y.re -5e+110) (not (<= y.re 2.1e-8))) (/ x.re y.re) (/ (+ x.im (/ x.re (/ y.im y.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 <= -5e+110) || !(y_46_re <= 2.1e-8)) {
tmp = x_46_re / y_46_re;
} else {
tmp = (x_46_im + (x_46_re / (y_46_im / y_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 <= (-5d+110)) .or. (.not. (y_46re <= 2.1d-8))) then
tmp = x_46re / y_46re
else
tmp = (x_46im + (x_46re / (y_46im / y_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 <= -5e+110) || !(y_46_re <= 2.1e-8)) {
tmp = x_46_re / y_46_re;
} else {
tmp = (x_46_im + (x_46_re / (y_46_im / y_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 <= -5e+110) or not (y_46_re <= 2.1e-8): tmp = x_46_re / y_46_re else: tmp = (x_46_im + (x_46_re / (y_46_im / y_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 <= -5e+110) || !(y_46_re <= 2.1e-8)) tmp = Float64(x_46_re / y_46_re); else tmp = Float64(Float64(x_46_im + Float64(x_46_re / Float64(y_46_im / y_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 <= -5e+110) || ~((y_46_re <= 2.1e-8))) tmp = x_46_re / y_46_re; else tmp = (x_46_im + (x_46_re / (y_46_im / y_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, -5e+110], N[Not[LessEqual[y$46$re, 2.1e-8]], $MachinePrecision]], N[(x$46$re / y$46$re), $MachinePrecision], N[(N[(x$46$im + N[(x$46$re / N[(y$46$im / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y$46$im), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq -5 \cdot 10^{+110} \lor \neg \left(y.re \leq 2.1 \cdot 10^{-8}\right):\\
\;\;\;\;\frac{x.re}{y.re}\\
\mathbf{else}:\\
\;\;\;\;\frac{x.im + \frac{x.re}{\frac{y.im}{y.re}}}{y.im}\\
\end{array}
\end{array}
if y.re < -4.99999999999999978e110 or 2.09999999999999994e-8 < y.re Initial program 59.0%
Taylor expanded in y.re around inf 75.7%
if -4.99999999999999978e110 < y.re < 2.09999999999999994e-8Initial program 69.9%
Taylor expanded in y.im around inf 73.5%
associate-/l*74.7%
Simplified74.7%
clear-num74.7%
un-div-inv74.7%
Applied egg-rr74.7%
Final simplification75.1%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (or (<= y.re -6.4e+110) (not (<= y.re 2e-8))) (/ x.re y.re) (/ (+ x.im (* x.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) {
double tmp;
if ((y_46_re <= -6.4e+110) || !(y_46_re <= 2e-8)) {
tmp = x_46_re / y_46_re;
} else {
tmp = (x_46_im + (x_46_re * (y_46_re / y_46_im))) / y_46_im;
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: tmp
if ((y_46re <= (-6.4d+110)) .or. (.not. (y_46re <= 2d-8))) then
tmp = x_46re / y_46re
else
tmp = (x_46im + (x_46re * (y_46re / y_46im))) / y_46im
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_re <= -6.4e+110) || !(y_46_re <= 2e-8)) {
tmp = x_46_re / y_46_re;
} else {
tmp = (x_46_im + (x_46_re * (y_46_re / y_46_im))) / y_46_im;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if (y_46_re <= -6.4e+110) or not (y_46_re <= 2e-8): tmp = x_46_re / y_46_re else: tmp = (x_46_im + (x_46_re * (y_46_re / y_46_im))) / y_46_im return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if ((y_46_re <= -6.4e+110) || !(y_46_re <= 2e-8)) tmp = Float64(x_46_re / y_46_re); else tmp = Float64(Float64(x_46_im + Float64(x_46_re * Float64(y_46_re / y_46_im))) / y_46_im); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if ((y_46_re <= -6.4e+110) || ~((y_46_re <= 2e-8))) tmp = x_46_re / y_46_re; else tmp = (x_46_im + (x_46_re * (y_46_re / y_46_im))) / 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.4e+110], N[Not[LessEqual[y$46$re, 2e-8]], $MachinePrecision]], N[(x$46$re / y$46$re), $MachinePrecision], N[(N[(x$46$im + N[(x$46$re * N[(y$46$re / y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y$46$im), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq -6.4 \cdot 10^{+110} \lor \neg \left(y.re \leq 2 \cdot 10^{-8}\right):\\
\;\;\;\;\frac{x.re}{y.re}\\
\mathbf{else}:\\
\;\;\;\;\frac{x.im + x.re \cdot \frac{y.re}{y.im}}{y.im}\\
\end{array}
\end{array}
if y.re < -6.39999999999999988e110 or 2e-8 < y.re Initial program 59.0%
Taylor expanded in y.re around inf 75.7%
if -6.39999999999999988e110 < y.re < 2e-8Initial program 69.9%
Taylor expanded in y.im around inf 73.5%
associate-/l*74.7%
Simplified74.7%
Final simplification75.1%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (or (<= y.re -5.9e+110) (not (<= y.re 2.1e-8))) (/ x.re y.re) (/ x.im y.im)))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_re <= -5.9e+110) || !(y_46_re <= 2.1e-8)) {
tmp = x_46_re / y_46_re;
} else {
tmp = x_46_im / y_46_im;
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: tmp
if ((y_46re <= (-5.9d+110)) .or. (.not. (y_46re <= 2.1d-8))) then
tmp = x_46re / y_46re
else
tmp = x_46im / y_46im
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_re <= -5.9e+110) || !(y_46_re <= 2.1e-8)) {
tmp = x_46_re / y_46_re;
} else {
tmp = x_46_im / y_46_im;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if (y_46_re <= -5.9e+110) or not (y_46_re <= 2.1e-8): tmp = x_46_re / y_46_re else: tmp = x_46_im / y_46_im return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if ((y_46_re <= -5.9e+110) || !(y_46_re <= 2.1e-8)) tmp = Float64(x_46_re / y_46_re); else tmp = Float64(x_46_im / y_46_im); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if ((y_46_re <= -5.9e+110) || ~((y_46_re <= 2.1e-8))) tmp = x_46_re / y_46_re; else tmp = x_46_im / y_46_im; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[Or[LessEqual[y$46$re, -5.9e+110], N[Not[LessEqual[y$46$re, 2.1e-8]], $MachinePrecision]], N[(x$46$re / y$46$re), $MachinePrecision], N[(x$46$im / y$46$im), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq -5.9 \cdot 10^{+110} \lor \neg \left(y.re \leq 2.1 \cdot 10^{-8}\right):\\
\;\;\;\;\frac{x.re}{y.re}\\
\mathbf{else}:\\
\;\;\;\;\frac{x.im}{y.im}\\
\end{array}
\end{array}
if y.re < -5.8999999999999997e110 or 2.09999999999999994e-8 < y.re Initial program 59.0%
Taylor expanded in y.re around inf 75.7%
if -5.8999999999999997e110 < y.re < 2.09999999999999994e-8Initial program 69.9%
Taylor expanded in y.re around 0 61.1%
Final simplification66.7%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (or (<= y.re -3.7e+143) (not (<= y.re 2.4e+189))) (/ x.im y.re) (/ x.im y.im)))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_re <= -3.7e+143) || !(y_46_re <= 2.4e+189)) {
tmp = x_46_im / y_46_re;
} else {
tmp = x_46_im / y_46_im;
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: tmp
if ((y_46re <= (-3.7d+143)) .or. (.not. (y_46re <= 2.4d+189))) then
tmp = x_46im / y_46re
else
tmp = x_46im / y_46im
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_re <= -3.7e+143) || !(y_46_re <= 2.4e+189)) {
tmp = x_46_im / y_46_re;
} else {
tmp = x_46_im / y_46_im;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if (y_46_re <= -3.7e+143) or not (y_46_re <= 2.4e+189): tmp = x_46_im / y_46_re else: tmp = x_46_im / y_46_im return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if ((y_46_re <= -3.7e+143) || !(y_46_re <= 2.4e+189)) tmp = Float64(x_46_im / y_46_re); else tmp = Float64(x_46_im / y_46_im); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if ((y_46_re <= -3.7e+143) || ~((y_46_re <= 2.4e+189))) tmp = x_46_im / y_46_re; else tmp = x_46_im / y_46_im; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[Or[LessEqual[y$46$re, -3.7e+143], N[Not[LessEqual[y$46$re, 2.4e+189]], $MachinePrecision]], N[(x$46$im / y$46$re), $MachinePrecision], N[(x$46$im / y$46$im), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq -3.7 \cdot 10^{+143} \lor \neg \left(y.re \leq 2.4 \cdot 10^{+189}\right):\\
\;\;\;\;\frac{x.im}{y.re}\\
\mathbf{else}:\\
\;\;\;\;\frac{x.im}{y.im}\\
\end{array}
\end{array}
if y.re < -3.7000000000000002e143 or 2.4000000000000001e189 < y.re Initial program 49.1%
*-un-lft-identity49.1%
associate-*r/49.1%
fma-define49.1%
add-sqr-sqrt49.1%
times-frac49.0%
fma-define49.0%
hypot-define49.0%
fma-define49.0%
fma-define49.0%
hypot-define71.8%
Applied egg-rr71.8%
Taylor expanded in y.re around 0 11.3%
Taylor expanded in y.re around inf 11.8%
+-commutative11.8%
Simplified11.8%
Taylor expanded in x.re around 0 34.3%
if -3.7000000000000002e143 < y.re < 2.4000000000000001e189Initial program 70.0%
Taylor expanded in y.re around 0 54.5%
Final simplification50.4%
(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 65.7%
Taylor expanded in y.re around 0 45.7%
herbie shell --seed 2024103
(FPCore (x.re x.im y.re y.im)
:name "_divideComplex, real part"
:precision binary64
(/ (+ (* x.re y.re) (* x.im y.im)) (+ (* y.re y.re) (* y.im y.im))))