
(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 14 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 (fma (/ y.re (hypot y.re y.im)) (/ x.im (hypot y.re y.im)) (* (/ (/ y.im (hypot y.im y.re)) (hypot y.im y.re)) (- x.re))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return fma((y_46_re / hypot(y_46_re, y_46_im)), (x_46_im / hypot(y_46_re, y_46_im)), (((y_46_im / hypot(y_46_im, y_46_re)) / hypot(y_46_im, y_46_re)) * -x_46_re));
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) return fma(Float64(y_46_re / hypot(y_46_re, y_46_im)), Float64(x_46_im / hypot(y_46_re, y_46_im)), Float64(Float64(Float64(y_46_im / hypot(y_46_im, y_46_re)) / hypot(y_46_im, y_46_re)) * Float64(-x_46_re))) end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := 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[(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] * (-x$46$re)), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\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)}, \frac{\frac{y.im}{\mathsf{hypot}\left(y.im, y.re\right)}}{\mathsf{hypot}\left(y.im, y.re\right)} \cdot \left(-x.re\right)\right)
\end{array}
Initial program 61.8%
div-sub58.6%
*-commutative58.6%
fma-define58.6%
add-sqr-sqrt58.6%
times-frac60.8%
fmm-def60.8%
fma-define60.8%
hypot-define60.8%
fma-define60.8%
hypot-define76.4%
associate-/l*79.0%
fma-define79.0%
add-sqr-sqrt79.0%
pow279.0%
Applied egg-rr79.0%
*-un-lft-identity79.0%
unpow279.0%
times-frac95.6%
Applied egg-rr95.6%
associate-*l/95.6%
*-lft-identity95.6%
hypot-undefine79.1%
unpow279.1%
unpow279.1%
+-commutative79.1%
unpow279.1%
unpow279.1%
hypot-define95.6%
hypot-undefine79.1%
unpow279.1%
unpow279.1%
+-commutative79.1%
unpow279.1%
unpow279.1%
hypot-define95.6%
Simplified95.6%
Final simplification95.6%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (/ y.re (hypot y.re y.im)))
(t_1 (/ x.im (hypot y.re y.im)))
(t_2 (fma t_0 t_1 (* (/ y.im (pow (hypot y.re y.im) 2.0)) (- x.re)))))
(if (<= y.im -5.5e+100)
(/ (- (* y.re (/ x.im y.im)) x.re) y.im)
(if (<= y.im -1.45e-112)
t_2
(if (<= y.im 1.66e-198)
(/
(- x.im (* (/ y.im (pow (cbrt y.re) 2.0)) (/ x.re (cbrt y.re))))
y.re)
(if (<= y.im 2e+63)
t_2
(fma t_0 t_1 (/ x.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 t_0 = y_46_re / hypot(y_46_re, y_46_im);
double t_1 = x_46_im / hypot(y_46_re, y_46_im);
double t_2 = fma(t_0, t_1, ((y_46_im / pow(hypot(y_46_re, y_46_im), 2.0)) * -x_46_re));
double tmp;
if (y_46_im <= -5.5e+100) {
tmp = ((y_46_re * (x_46_im / y_46_im)) - x_46_re) / y_46_im;
} else if (y_46_im <= -1.45e-112) {
tmp = t_2;
} else if (y_46_im <= 1.66e-198) {
tmp = (x_46_im - ((y_46_im / pow(cbrt(y_46_re), 2.0)) * (x_46_re / cbrt(y_46_re)))) / y_46_re;
} else if (y_46_im <= 2e+63) {
tmp = t_2;
} else {
tmp = fma(t_0, t_1, (x_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) t_0 = Float64(y_46_re / hypot(y_46_re, y_46_im)) t_1 = Float64(x_46_im / hypot(y_46_re, y_46_im)) t_2 = fma(t_0, t_1, Float64(Float64(y_46_im / (hypot(y_46_re, y_46_im) ^ 2.0)) * Float64(-x_46_re))) tmp = 0.0 if (y_46_im <= -5.5e+100) tmp = Float64(Float64(Float64(y_46_re * Float64(x_46_im / y_46_im)) - x_46_re) / y_46_im); elseif (y_46_im <= -1.45e-112) tmp = t_2; elseif (y_46_im <= 1.66e-198) tmp = Float64(Float64(x_46_im - Float64(Float64(y_46_im / (cbrt(y_46_re) ^ 2.0)) * Float64(x_46_re / cbrt(y_46_re)))) / y_46_re); elseif (y_46_im <= 2e+63) tmp = t_2; else tmp = fma(t_0, t_1, Float64(x_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_] := Block[{t$95$0 = N[(y$46$re / N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x$46$im / N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$0 * t$95$1 + N[(N[(y$46$im / N[Power[N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * (-x$46$re)), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -5.5e+100], N[(N[(N[(y$46$re * N[(x$46$im / y$46$im), $MachinePrecision]), $MachinePrecision] - x$46$re), $MachinePrecision] / y$46$im), $MachinePrecision], If[LessEqual[y$46$im, -1.45e-112], t$95$2, If[LessEqual[y$46$im, 1.66e-198], N[(N[(x$46$im - N[(N[(y$46$im / N[Power[N[Power[y$46$re, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(x$46$re / N[Power[y$46$re, 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y$46$re), $MachinePrecision], If[LessEqual[y$46$im, 2e+63], t$95$2, N[(t$95$0 * t$95$1 + N[(x$46$re / (-N[Sqrt[y$46$im ^ 2 + y$46$re ^ 2], $MachinePrecision])), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{y.re}{\mathsf{hypot}\left(y.re, y.im\right)}\\
t_1 := \frac{x.im}{\mathsf{hypot}\left(y.re, y.im\right)}\\
t_2 := \mathsf{fma}\left(t\_0, t\_1, \frac{y.im}{{\left(\mathsf{hypot}\left(y.re, y.im\right)\right)}^{2}} \cdot \left(-x.re\right)\right)\\
\mathbf{if}\;y.im \leq -5.5 \cdot 10^{+100}:\\
\;\;\;\;\frac{y.re \cdot \frac{x.im}{y.im} - x.re}{y.im}\\
\mathbf{elif}\;y.im \leq -1.45 \cdot 10^{-112}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y.im \leq 1.66 \cdot 10^{-198}:\\
\;\;\;\;\frac{x.im - \frac{y.im}{{\left(\sqrt[3]{y.re}\right)}^{2}} \cdot \frac{x.re}{\sqrt[3]{y.re}}}{y.re}\\
\mathbf{elif}\;y.im \leq 2 \cdot 10^{+63}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(t\_0, t\_1, \frac{x.re}{-\mathsf{hypot}\left(y.im, y.re\right)}\right)\\
\end{array}
\end{array}
if y.im < -5.5000000000000002e100Initial program 42.2%
Taylor expanded in y.re around 0 82.1%
+-commutative82.1%
mul-1-neg82.1%
unsub-neg82.1%
unpow282.1%
associate-/r*87.0%
div-sub87.1%
*-commutative87.1%
associate-/l*90.1%
Simplified90.1%
if -5.5000000000000002e100 < y.im < -1.44999999999999996e-112 or 1.65999999999999996e-198 < y.im < 2.00000000000000012e63Initial program 76.5%
div-sub76.5%
*-commutative76.5%
fma-define76.5%
add-sqr-sqrt76.5%
times-frac77.8%
fmm-def77.9%
fma-define77.9%
hypot-define77.9%
fma-define77.9%
hypot-define93.7%
associate-/l*93.3%
fma-define93.3%
add-sqr-sqrt93.3%
pow293.3%
Applied egg-rr93.3%
if -1.44999999999999996e-112 < y.im < 1.65999999999999996e-198Initial program 63.6%
Taylor expanded in y.re around inf 91.4%
mul-1-neg91.4%
unsub-neg91.4%
associate-/l*90.8%
Simplified90.8%
associate-*r/91.4%
clear-num91.3%
Applied egg-rr91.3%
clear-num91.4%
*-un-lft-identity91.4%
add-cube-cbrt91.2%
times-frac91.2%
pow291.2%
*-commutative91.2%
Applied egg-rr91.2%
associate-*l/91.2%
*-lft-identity91.2%
associate-/l*92.9%
associate-*l/91.6%
Simplified91.6%
if 2.00000000000000012e63 < y.im Initial program 39.6%
div-sub39.6%
*-commutative39.6%
fma-define39.6%
add-sqr-sqrt39.6%
times-frac42.2%
fmm-def42.1%
fma-define42.1%
hypot-define42.1%
fma-define42.1%
hypot-define65.4%
associate-/l*68.7%
fma-define68.7%
add-sqr-sqrt68.7%
pow268.7%
Applied egg-rr68.7%
*-un-lft-identity68.7%
unpow268.7%
times-frac97.4%
Applied egg-rr97.4%
associate-*l/97.4%
*-lft-identity97.4%
hypot-undefine68.8%
unpow268.8%
unpow268.8%
+-commutative68.8%
unpow268.8%
unpow268.8%
hypot-define97.4%
hypot-undefine68.8%
unpow268.8%
unpow268.8%
+-commutative68.8%
unpow268.8%
unpow268.8%
hypot-define97.4%
Simplified97.4%
Taylor expanded in y.im around inf 97.4%
add-sqr-sqrt62.7%
sqrt-unprod67.4%
sqr-neg67.4%
sqrt-unprod50.4%
add-sqr-sqrt55.9%
neg-sub055.9%
sub-neg55.9%
add-sqr-sqrt50.4%
sqrt-unprod67.4%
sqr-neg67.4%
sqrt-unprod62.7%
add-sqr-sqrt97.4%
un-div-inv97.6%
Applied egg-rr97.6%
+-lft-identity97.6%
Simplified97.6%
Final simplification93.1%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (- (* y.re x.im) (* y.im x.re))))
(if (<= y.im -8e+113)
(/ (- (* y.re (/ x.im y.im)) x.re) y.im)
(if (<= y.im -3.25e-111)
(/ t_0 (fma y.re y.re (* y.im y.im)))
(if (<= y.im 3e-121)
(/ (- x.im (/ (* y.im x.re) y.re)) y.re)
(if (<= y.im 5.6e-70)
(/ t_0 (+ (* y.im y.im) (* y.re y.re)))
(fma
(/ y.re (hypot y.re y.im))
(/ x.im (hypot y.re y.im))
(/ x.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 t_0 = (y_46_re * x_46_im) - (y_46_im * x_46_re);
double tmp;
if (y_46_im <= -8e+113) {
tmp = ((y_46_re * (x_46_im / y_46_im)) - x_46_re) / y_46_im;
} else if (y_46_im <= -3.25e-111) {
tmp = t_0 / fma(y_46_re, y_46_re, (y_46_im * y_46_im));
} else if (y_46_im <= 3e-121) {
tmp = (x_46_im - ((y_46_im * x_46_re) / y_46_re)) / y_46_re;
} else if (y_46_im <= 5.6e-70) {
tmp = t_0 / ((y_46_im * y_46_im) + (y_46_re * y_46_re));
} 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 / -hypot(y_46_im, y_46_re)));
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(Float64(y_46_re * x_46_im) - Float64(y_46_im * x_46_re)) tmp = 0.0 if (y_46_im <= -8e+113) tmp = Float64(Float64(Float64(y_46_re * Float64(x_46_im / y_46_im)) - x_46_re) / y_46_im); elseif (y_46_im <= -3.25e-111) tmp = Float64(t_0 / fma(y_46_re, y_46_re, Float64(y_46_im * y_46_im))); elseif (y_46_im <= 3e-121) tmp = Float64(Float64(x_46_im - Float64(Float64(y_46_im * x_46_re) / y_46_re)) / y_46_re); elseif (y_46_im <= 5.6e-70) tmp = Float64(t_0 / Float64(Float64(y_46_im * y_46_im) + Float64(y_46_re * y_46_re))); 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(-hypot(y_46_im, y_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 * x$46$im), $MachinePrecision] - N[(y$46$im * x$46$re), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -8e+113], N[(N[(N[(y$46$re * N[(x$46$im / y$46$im), $MachinePrecision]), $MachinePrecision] - x$46$re), $MachinePrecision] / y$46$im), $MachinePrecision], If[LessEqual[y$46$im, -3.25e-111], N[(t$95$0 / N[(y$46$re * y$46$re + N[(y$46$im * y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 3e-121], N[(N[(x$46$im - N[(N[(y$46$im * x$46$re), $MachinePrecision] / y$46$re), $MachinePrecision]), $MachinePrecision] / y$46$re), $MachinePrecision], If[LessEqual[y$46$im, 5.6e-70], N[(t$95$0 / N[(N[(y$46$im * y$46$im), $MachinePrecision] + N[(y$46$re * y$46$re), $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[Sqrt[y$46$im ^ 2 + y$46$re ^ 2], $MachinePrecision])), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot x.im - y.im \cdot x.re\\
\mathbf{if}\;y.im \leq -8 \cdot 10^{+113}:\\
\;\;\;\;\frac{y.re \cdot \frac{x.im}{y.im} - x.re}{y.im}\\
\mathbf{elif}\;y.im \leq -3.25 \cdot 10^{-111}:\\
\;\;\;\;\frac{t\_0}{\mathsf{fma}\left(y.re, y.re, y.im \cdot y.im\right)}\\
\mathbf{elif}\;y.im \leq 3 \cdot 10^{-121}:\\
\;\;\;\;\frac{x.im - \frac{y.im \cdot x.re}{y.re}}{y.re}\\
\mathbf{elif}\;y.im \leq 5.6 \cdot 10^{-70}:\\
\;\;\;\;\frac{t\_0}{y.im \cdot y.im + y.re \cdot y.re}\\
\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)}, \frac{x.re}{-\mathsf{hypot}\left(y.im, y.re\right)}\right)\\
\end{array}
\end{array}
if y.im < -8e113Initial program 38.9%
Taylor expanded in y.re around 0 81.1%
+-commutative81.1%
mul-1-neg81.1%
unsub-neg81.1%
unpow281.1%
associate-/r*86.3%
div-sub86.3%
*-commutative86.3%
associate-/l*89.6%
Simplified89.6%
if -8e113 < y.im < -3.24999999999999987e-111Initial program 90.3%
fma-define90.4%
Simplified90.4%
if -3.24999999999999987e-111 < y.im < 2.9999999999999999e-121Initial program 61.8%
Taylor expanded in y.re around inf 90.3%
mul-1-neg90.3%
unsub-neg90.3%
associate-/l*89.9%
Simplified89.9%
Taylor expanded in x.re around 0 90.3%
if 2.9999999999999999e-121 < y.im < 5.5999999999999998e-70Initial program 86.6%
if 5.5999999999999998e-70 < y.im Initial program 51.8%
div-sub51.8%
*-commutative51.8%
fma-define51.8%
add-sqr-sqrt51.8%
times-frac54.8%
fmm-def54.8%
fma-define54.8%
hypot-define54.8%
fma-define54.8%
hypot-define76.0%
associate-/l*78.0%
fma-define78.0%
add-sqr-sqrt78.0%
pow278.0%
Applied egg-rr78.0%
*-un-lft-identity78.0%
unpow278.0%
times-frac94.7%
Applied egg-rr94.7%
associate-*l/94.7%
*-lft-identity94.7%
hypot-undefine78.1%
unpow278.1%
unpow278.1%
+-commutative78.1%
unpow278.1%
unpow278.1%
hypot-define94.7%
hypot-undefine78.1%
unpow278.1%
unpow278.1%
+-commutative78.1%
unpow278.1%
unpow278.1%
hypot-define94.7%
Simplified94.7%
Taylor expanded in y.im around inf 88.2%
add-sqr-sqrt56.8%
sqrt-unprod66.8%
sqr-neg66.8%
sqrt-unprod41.8%
add-sqr-sqrt49.3%
neg-sub049.3%
sub-neg49.3%
add-sqr-sqrt41.8%
sqrt-unprod66.8%
sqr-neg66.8%
sqrt-unprod56.8%
add-sqr-sqrt88.2%
un-div-inv88.3%
Applied egg-rr88.3%
+-lft-identity88.3%
Simplified88.3%
Final simplification89.4%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (<= y.im -1.25e+113)
(/ (- (* y.re (/ x.im y.im)) x.re) y.im)
(if (<= y.im -5.2e-112)
(/ (- (* y.re x.im) (* y.im x.re)) (fma y.re y.re (* y.im y.im)))
(if (<= y.im 5.6e-121)
(/ (- x.im (/ (* y.im x.re) y.re)) y.re)
(if (<= y.im 2.4e+67)
(/ (fma x.im y.re (* y.im (- x.re))) (fma y.im y.im (* y.re y.re)))
(/ (- (* x.im (/ y.re y.im)) x.re) y.im))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_im <= -1.25e+113) {
tmp = ((y_46_re * (x_46_im / y_46_im)) - x_46_re) / y_46_im;
} else if (y_46_im <= -5.2e-112) {
tmp = ((y_46_re * x_46_im) - (y_46_im * x_46_re)) / fma(y_46_re, y_46_re, (y_46_im * y_46_im));
} else if (y_46_im <= 5.6e-121) {
tmp = (x_46_im - ((y_46_im * x_46_re) / y_46_re)) / y_46_re;
} else if (y_46_im <= 2.4e+67) {
tmp = fma(x_46_im, y_46_re, (y_46_im * -x_46_re)) / fma(y_46_im, y_46_im, (y_46_re * y_46_re));
} else {
tmp = ((x_46_im * (y_46_re / y_46_im)) - x_46_re) / y_46_im;
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if (y_46_im <= -1.25e+113) tmp = Float64(Float64(Float64(y_46_re * Float64(x_46_im / y_46_im)) - x_46_re) / y_46_im); elseif (y_46_im <= -5.2e-112) tmp = Float64(Float64(Float64(y_46_re * x_46_im) - Float64(y_46_im * x_46_re)) / fma(y_46_re, y_46_re, Float64(y_46_im * y_46_im))); elseif (y_46_im <= 5.6e-121) tmp = Float64(Float64(x_46_im - Float64(Float64(y_46_im * x_46_re) / y_46_re)) / y_46_re); elseif (y_46_im <= 2.4e+67) tmp = Float64(fma(x_46_im, y_46_re, Float64(y_46_im * Float64(-x_46_re))) / fma(y_46_im, y_46_im, Float64(y_46_re * y_46_re))); 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
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[y$46$im, -1.25e+113], N[(N[(N[(y$46$re * N[(x$46$im / y$46$im), $MachinePrecision]), $MachinePrecision] - x$46$re), $MachinePrecision] / y$46$im), $MachinePrecision], If[LessEqual[y$46$im, -5.2e-112], N[(N[(N[(y$46$re * x$46$im), $MachinePrecision] - N[(y$46$im * x$46$re), $MachinePrecision]), $MachinePrecision] / N[(y$46$re * y$46$re + N[(y$46$im * y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 5.6e-121], N[(N[(x$46$im - N[(N[(y$46$im * x$46$re), $MachinePrecision] / y$46$re), $MachinePrecision]), $MachinePrecision] / y$46$re), $MachinePrecision], If[LessEqual[y$46$im, 2.4e+67], N[(N[(x$46$im * y$46$re + N[(y$46$im * (-x$46$re)), $MachinePrecision]), $MachinePrecision] / N[(y$46$im * y$46$im + N[(y$46$re * y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x$46$im * N[(y$46$re / y$46$im), $MachinePrecision]), $MachinePrecision] - x$46$re), $MachinePrecision] / y$46$im), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.im \leq -1.25 \cdot 10^{+113}:\\
\;\;\;\;\frac{y.re \cdot \frac{x.im}{y.im} - x.re}{y.im}\\
\mathbf{elif}\;y.im \leq -5.2 \cdot 10^{-112}:\\
\;\;\;\;\frac{y.re \cdot x.im - y.im \cdot x.re}{\mathsf{fma}\left(y.re, y.re, y.im \cdot y.im\right)}\\
\mathbf{elif}\;y.im \leq 5.6 \cdot 10^{-121}:\\
\;\;\;\;\frac{x.im - \frac{y.im \cdot x.re}{y.re}}{y.re}\\
\mathbf{elif}\;y.im \leq 2.4 \cdot 10^{+67}:\\
\;\;\;\;\frac{\mathsf{fma}\left(x.im, y.re, y.im \cdot \left(-x.re\right)\right)}{\mathsf{fma}\left(y.im, y.im, y.re \cdot y.re\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x.im \cdot \frac{y.re}{y.im} - x.re}{y.im}\\
\end{array}
\end{array}
if y.im < -1.25e113Initial program 38.9%
Taylor expanded in y.re around 0 81.1%
+-commutative81.1%
mul-1-neg81.1%
unsub-neg81.1%
unpow281.1%
associate-/r*86.3%
div-sub86.3%
*-commutative86.3%
associate-/l*89.6%
Simplified89.6%
if -1.25e113 < y.im < -5.19999999999999983e-112Initial program 90.3%
fma-define90.4%
Simplified90.4%
if -5.19999999999999983e-112 < y.im < 5.6000000000000002e-121Initial program 61.8%
Taylor expanded in y.re around inf 90.3%
mul-1-neg90.3%
unsub-neg90.3%
associate-/l*89.9%
Simplified89.9%
Taylor expanded in x.re around 0 90.3%
if 5.6000000000000002e-121 < y.im < 2.40000000000000002e67Initial program 74.6%
fmm-def74.6%
distribute-rgt-neg-out74.6%
+-commutative74.6%
fma-define74.6%
Simplified74.6%
if 2.40000000000000002e67 < y.im Initial program 39.6%
Taylor expanded in y.re around 0 69.9%
+-commutative69.9%
mul-1-neg69.9%
unsub-neg69.9%
unpow269.9%
associate-/r*75.4%
div-sub75.4%
*-commutative75.4%
associate-/l*82.1%
Simplified82.1%
clear-num82.1%
un-div-inv82.2%
Applied egg-rr82.2%
associate-/r/82.2%
Applied egg-rr82.2%
Final simplification86.0%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (- (* y.re x.im) (* y.im x.re))))
(if (<= y.im -8e+113)
(/ (- (* y.re (/ x.im y.im)) x.re) y.im)
(if (<= y.im -2.3e-112)
(/ t_0 (fma y.re y.re (* y.im y.im)))
(if (<= y.im 1.8e-121)
(/ (- x.im (/ (* y.im x.re) y.re)) y.re)
(if (<= y.im 3e+67)
(/ t_0 (+ (* y.im 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 t_0 = (y_46_re * x_46_im) - (y_46_im * x_46_re);
double tmp;
if (y_46_im <= -8e+113) {
tmp = ((y_46_re * (x_46_im / y_46_im)) - x_46_re) / y_46_im;
} else if (y_46_im <= -2.3e-112) {
tmp = t_0 / fma(y_46_re, y_46_re, (y_46_im * y_46_im));
} else if (y_46_im <= 1.8e-121) {
tmp = (x_46_im - ((y_46_im * x_46_re) / y_46_re)) / y_46_re;
} else if (y_46_im <= 3e+67) {
tmp = t_0 / ((y_46_im * 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) t_0 = Float64(Float64(y_46_re * x_46_im) - Float64(y_46_im * x_46_re)) tmp = 0.0 if (y_46_im <= -8e+113) tmp = Float64(Float64(Float64(y_46_re * Float64(x_46_im / y_46_im)) - x_46_re) / y_46_im); elseif (y_46_im <= -2.3e-112) tmp = Float64(t_0 / fma(y_46_re, y_46_re, Float64(y_46_im * y_46_im))); elseif (y_46_im <= 1.8e-121) tmp = Float64(Float64(x_46_im - Float64(Float64(y_46_im * x_46_re) / y_46_re)) / y_46_re); elseif (y_46_im <= 3e+67) tmp = Float64(t_0 / Float64(Float64(y_46_im * y_46_im) + Float64(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
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[(y$46$re * x$46$im), $MachinePrecision] - N[(y$46$im * x$46$re), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -8e+113], N[(N[(N[(y$46$re * N[(x$46$im / y$46$im), $MachinePrecision]), $MachinePrecision] - x$46$re), $MachinePrecision] / y$46$im), $MachinePrecision], If[LessEqual[y$46$im, -2.3e-112], N[(t$95$0 / N[(y$46$re * y$46$re + N[(y$46$im * y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 1.8e-121], N[(N[(x$46$im - N[(N[(y$46$im * x$46$re), $MachinePrecision] / y$46$re), $MachinePrecision]), $MachinePrecision] / y$46$re), $MachinePrecision], If[LessEqual[y$46$im, 3e+67], N[(t$95$0 / N[(N[(y$46$im * y$46$im), $MachinePrecision] + N[(y$46$re * y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x$46$im * N[(y$46$re / y$46$im), $MachinePrecision]), $MachinePrecision] - x$46$re), $MachinePrecision] / y$46$im), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot x.im - y.im \cdot x.re\\
\mathbf{if}\;y.im \leq -8 \cdot 10^{+113}:\\
\;\;\;\;\frac{y.re \cdot \frac{x.im}{y.im} - x.re}{y.im}\\
\mathbf{elif}\;y.im \leq -2.3 \cdot 10^{-112}:\\
\;\;\;\;\frac{t\_0}{\mathsf{fma}\left(y.re, y.re, y.im \cdot y.im\right)}\\
\mathbf{elif}\;y.im \leq 1.8 \cdot 10^{-121}:\\
\;\;\;\;\frac{x.im - \frac{y.im \cdot x.re}{y.re}}{y.re}\\
\mathbf{elif}\;y.im \leq 3 \cdot 10^{+67}:\\
\;\;\;\;\frac{t\_0}{y.im \cdot y.im + y.re \cdot y.re}\\
\mathbf{else}:\\
\;\;\;\;\frac{x.im \cdot \frac{y.re}{y.im} - x.re}{y.im}\\
\end{array}
\end{array}
if y.im < -8e113Initial program 38.9%
Taylor expanded in y.re around 0 81.1%
+-commutative81.1%
mul-1-neg81.1%
unsub-neg81.1%
unpow281.1%
associate-/r*86.3%
div-sub86.3%
*-commutative86.3%
associate-/l*89.6%
Simplified89.6%
if -8e113 < y.im < -2.29999999999999991e-112Initial program 90.3%
fma-define90.4%
Simplified90.4%
if -2.29999999999999991e-112 < y.im < 1.79999999999999992e-121Initial program 61.8%
Taylor expanded in y.re around inf 90.3%
mul-1-neg90.3%
unsub-neg90.3%
associate-/l*89.9%
Simplified89.9%
Taylor expanded in x.re around 0 90.3%
if 1.79999999999999992e-121 < y.im < 3.0000000000000001e67Initial program 74.6%
if 3.0000000000000001e67 < y.im Initial program 39.6%
Taylor expanded in y.re around 0 69.9%
+-commutative69.9%
mul-1-neg69.9%
unsub-neg69.9%
unpow269.9%
associate-/r*75.4%
div-sub75.4%
*-commutative75.4%
associate-/l*82.1%
Simplified82.1%
clear-num82.1%
un-div-inv82.2%
Applied egg-rr82.2%
associate-/r/82.2%
Applied egg-rr82.2%
Final simplification86.0%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0
(/ (- (* y.re x.im) (* y.im x.re)) (+ (* y.im y.im) (* y.re y.re)))))
(if (<= y.im -6.4e+116)
(/ (- (* y.re (/ x.im y.im)) x.re) y.im)
(if (<= y.im -3.45e-112)
t_0
(if (<= y.im 1.2e-120)
(/ (- x.im (/ (* y.im x.re) y.re)) y.re)
(if (<= y.im 2.3e+67)
t_0
(/ (- (* x.im (/ y.re y.im)) x.re) y.im)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = ((y_46_re * x_46_im) - (y_46_im * x_46_re)) / ((y_46_im * y_46_im) + (y_46_re * y_46_re));
double tmp;
if (y_46_im <= -6.4e+116) {
tmp = ((y_46_re * (x_46_im / y_46_im)) - x_46_re) / y_46_im;
} else if (y_46_im <= -3.45e-112) {
tmp = t_0;
} else if (y_46_im <= 1.2e-120) {
tmp = (x_46_im - ((y_46_im * x_46_re) / y_46_re)) / y_46_re;
} else if (y_46_im <= 2.3e+67) {
tmp = t_0;
} else {
tmp = ((x_46_im * (y_46_re / y_46_im)) - x_46_re) / y_46_im;
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
real(8) :: tmp
t_0 = ((y_46re * x_46im) - (y_46im * x_46re)) / ((y_46im * y_46im) + (y_46re * y_46re))
if (y_46im <= (-6.4d+116)) then
tmp = ((y_46re * (x_46im / y_46im)) - x_46re) / y_46im
else if (y_46im <= (-3.45d-112)) then
tmp = t_0
else if (y_46im <= 1.2d-120) then
tmp = (x_46im - ((y_46im * x_46re) / y_46re)) / y_46re
else if (y_46im <= 2.3d+67) then
tmp = t_0
else
tmp = ((x_46im * (y_46re / y_46im)) - x_46re) / y_46im
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = ((y_46_re * x_46_im) - (y_46_im * x_46_re)) / ((y_46_im * y_46_im) + (y_46_re * y_46_re));
double tmp;
if (y_46_im <= -6.4e+116) {
tmp = ((y_46_re * (x_46_im / y_46_im)) - x_46_re) / y_46_im;
} else if (y_46_im <= -3.45e-112) {
tmp = t_0;
} else if (y_46_im <= 1.2e-120) {
tmp = (x_46_im - ((y_46_im * x_46_re) / y_46_re)) / y_46_re;
} else if (y_46_im <= 2.3e+67) {
tmp = t_0;
} else {
tmp = ((x_46_im * (y_46_re / y_46_im)) - x_46_re) / y_46_im;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = ((y_46_re * x_46_im) - (y_46_im * x_46_re)) / ((y_46_im * y_46_im) + (y_46_re * y_46_re)) tmp = 0 if y_46_im <= -6.4e+116: tmp = ((y_46_re * (x_46_im / y_46_im)) - x_46_re) / y_46_im elif y_46_im <= -3.45e-112: tmp = t_0 elif y_46_im <= 1.2e-120: tmp = (x_46_im - ((y_46_im * x_46_re) / y_46_re)) / y_46_re elif y_46_im <= 2.3e+67: tmp = t_0 else: tmp = ((x_46_im * (y_46_re / y_46_im)) - x_46_re) / y_46_im return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(Float64(Float64(y_46_re * x_46_im) - Float64(y_46_im * x_46_re)) / Float64(Float64(y_46_im * y_46_im) + Float64(y_46_re * y_46_re))) tmp = 0.0 if (y_46_im <= -6.4e+116) tmp = Float64(Float64(Float64(y_46_re * Float64(x_46_im / y_46_im)) - x_46_re) / y_46_im); elseif (y_46_im <= -3.45e-112) tmp = t_0; elseif (y_46_im <= 1.2e-120) tmp = Float64(Float64(x_46_im - Float64(Float64(y_46_im * x_46_re) / y_46_re)) / y_46_re); elseif (y_46_im <= 2.3e+67) tmp = t_0; else tmp = Float64(Float64(Float64(x_46_im * Float64(y_46_re / y_46_im)) - x_46_re) / y_46_im); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = ((y_46_re * x_46_im) - (y_46_im * x_46_re)) / ((y_46_im * y_46_im) + (y_46_re * y_46_re)); tmp = 0.0; if (y_46_im <= -6.4e+116) tmp = ((y_46_re * (x_46_im / y_46_im)) - x_46_re) / y_46_im; elseif (y_46_im <= -3.45e-112) tmp = t_0; elseif (y_46_im <= 1.2e-120) tmp = (x_46_im - ((y_46_im * x_46_re) / y_46_re)) / y_46_re; elseif (y_46_im <= 2.3e+67) tmp = t_0; else tmp = ((x_46_im * (y_46_re / y_46_im)) - x_46_re) / y_46_im; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[(N[(y$46$re * x$46$im), $MachinePrecision] - N[(y$46$im * x$46$re), $MachinePrecision]), $MachinePrecision] / N[(N[(y$46$im * y$46$im), $MachinePrecision] + N[(y$46$re * y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -6.4e+116], N[(N[(N[(y$46$re * N[(x$46$im / y$46$im), $MachinePrecision]), $MachinePrecision] - x$46$re), $MachinePrecision] / y$46$im), $MachinePrecision], If[LessEqual[y$46$im, -3.45e-112], t$95$0, If[LessEqual[y$46$im, 1.2e-120], N[(N[(x$46$im - N[(N[(y$46$im * x$46$re), $MachinePrecision] / y$46$re), $MachinePrecision]), $MachinePrecision] / y$46$re), $MachinePrecision], If[LessEqual[y$46$im, 2.3e+67], t$95$0, N[(N[(N[(x$46$im * N[(y$46$re / y$46$im), $MachinePrecision]), $MachinePrecision] - x$46$re), $MachinePrecision] / y$46$im), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{y.re \cdot x.im - y.im \cdot x.re}{y.im \cdot y.im + y.re \cdot y.re}\\
\mathbf{if}\;y.im \leq -6.4 \cdot 10^{+116}:\\
\;\;\;\;\frac{y.re \cdot \frac{x.im}{y.im} - x.re}{y.im}\\
\mathbf{elif}\;y.im \leq -3.45 \cdot 10^{-112}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y.im \leq 1.2 \cdot 10^{-120}:\\
\;\;\;\;\frac{x.im - \frac{y.im \cdot x.re}{y.re}}{y.re}\\
\mathbf{elif}\;y.im \leq 2.3 \cdot 10^{+67}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{x.im \cdot \frac{y.re}{y.im} - x.re}{y.im}\\
\end{array}
\end{array}
if y.im < -6.4000000000000001e116Initial program 38.9%
Taylor expanded in y.re around 0 81.1%
+-commutative81.1%
mul-1-neg81.1%
unsub-neg81.1%
unpow281.1%
associate-/r*86.3%
div-sub86.3%
*-commutative86.3%
associate-/l*89.6%
Simplified89.6%
if -6.4000000000000001e116 < y.im < -3.45000000000000009e-112 or 1.2e-120 < y.im < 2.2999999999999999e67Initial program 82.1%
if -3.45000000000000009e-112 < y.im < 1.2e-120Initial program 61.8%
Taylor expanded in y.re around inf 90.3%
mul-1-neg90.3%
unsub-neg90.3%
associate-/l*89.9%
Simplified89.9%
Taylor expanded in x.re around 0 90.3%
if 2.2999999999999999e67 < y.im Initial program 39.6%
Taylor expanded in y.re around 0 69.9%
+-commutative69.9%
mul-1-neg69.9%
unsub-neg69.9%
unpow269.9%
associate-/r*75.4%
div-sub75.4%
*-commutative75.4%
associate-/l*82.1%
Simplified82.1%
clear-num82.1%
un-div-inv82.2%
Applied egg-rr82.2%
associate-/r/82.2%
Applied egg-rr82.2%
Final simplification86.0%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (or (<= y.im -4.9e+22) (not (<= y.im 2.75e+82))) (/ x.re (- y.im)) (/ (- x.im (/ (* y.im x.re) y.re)) y.re)))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_im <= -4.9e+22) || !(y_46_im <= 2.75e+82)) {
tmp = x_46_re / -y_46_im;
} else {
tmp = (x_46_im - ((y_46_im * x_46_re) / y_46_re)) / y_46_re;
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: tmp
if ((y_46im <= (-4.9d+22)) .or. (.not. (y_46im <= 2.75d+82))) then
tmp = x_46re / -y_46im
else
tmp = (x_46im - ((y_46im * x_46re) / y_46re)) / y_46re
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_im <= -4.9e+22) || !(y_46_im <= 2.75e+82)) {
tmp = x_46_re / -y_46_im;
} else {
tmp = (x_46_im - ((y_46_im * x_46_re) / y_46_re)) / y_46_re;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if (y_46_im <= -4.9e+22) or not (y_46_im <= 2.75e+82): tmp = x_46_re / -y_46_im else: tmp = (x_46_im - ((y_46_im * x_46_re) / y_46_re)) / y_46_re return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if ((y_46_im <= -4.9e+22) || !(y_46_im <= 2.75e+82)) tmp = Float64(x_46_re / Float64(-y_46_im)); else tmp = Float64(Float64(x_46_im - Float64(Float64(y_46_im * x_46_re) / y_46_re)) / y_46_re); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if ((y_46_im <= -4.9e+22) || ~((y_46_im <= 2.75e+82))) tmp = x_46_re / -y_46_im; else tmp = (x_46_im - ((y_46_im * x_46_re) / y_46_re)) / y_46_re; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[Or[LessEqual[y$46$im, -4.9e+22], N[Not[LessEqual[y$46$im, 2.75e+82]], $MachinePrecision]], N[(x$46$re / (-y$46$im)), $MachinePrecision], N[(N[(x$46$im - N[(N[(y$46$im * x$46$re), $MachinePrecision] / y$46$re), $MachinePrecision]), $MachinePrecision] / y$46$re), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.im \leq -4.9 \cdot 10^{+22} \lor \neg \left(y.im \leq 2.75 \cdot 10^{+82}\right):\\
\;\;\;\;\frac{x.re}{-y.im}\\
\mathbf{else}:\\
\;\;\;\;\frac{x.im - \frac{y.im \cdot x.re}{y.re}}{y.re}\\
\end{array}
\end{array}
if y.im < -4.89999999999999979e22 or 2.74999999999999998e82 < y.im Initial program 48.9%
Taylor expanded in y.re around 0 68.0%
associate-*r/68.0%
neg-mul-168.0%
Simplified68.0%
if -4.89999999999999979e22 < y.im < 2.74999999999999998e82Initial program 69.1%
Taylor expanded in y.re around inf 72.8%
mul-1-neg72.8%
unsub-neg72.8%
associate-/l*72.6%
Simplified72.6%
Taylor expanded in x.re around 0 72.8%
Final simplification71.1%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (or (<= y.im -2.35e+24) (not (<= y.im 1.95e+87))) (/ x.re (- y.im)) (/ (- x.im (* x.re (/ y.im y.re))) y.re)))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_im <= -2.35e+24) || !(y_46_im <= 1.95e+87)) {
tmp = x_46_re / -y_46_im;
} else {
tmp = (x_46_im - (x_46_re * (y_46_im / y_46_re))) / y_46_re;
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: tmp
if ((y_46im <= (-2.35d+24)) .or. (.not. (y_46im <= 1.95d+87))) then
tmp = x_46re / -y_46im
else
tmp = (x_46im - (x_46re * (y_46im / y_46re))) / y_46re
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_im <= -2.35e+24) || !(y_46_im <= 1.95e+87)) {
tmp = x_46_re / -y_46_im;
} else {
tmp = (x_46_im - (x_46_re * (y_46_im / y_46_re))) / y_46_re;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if (y_46_im <= -2.35e+24) or not (y_46_im <= 1.95e+87): tmp = x_46_re / -y_46_im else: tmp = (x_46_im - (x_46_re * (y_46_im / y_46_re))) / y_46_re return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if ((y_46_im <= -2.35e+24) || !(y_46_im <= 1.95e+87)) tmp = Float64(x_46_re / Float64(-y_46_im)); else tmp = Float64(Float64(x_46_im - Float64(x_46_re * Float64(y_46_im / y_46_re))) / y_46_re); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if ((y_46_im <= -2.35e+24) || ~((y_46_im <= 1.95e+87))) tmp = x_46_re / -y_46_im; else tmp = (x_46_im - (x_46_re * (y_46_im / y_46_re))) / y_46_re; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[Or[LessEqual[y$46$im, -2.35e+24], N[Not[LessEqual[y$46$im, 1.95e+87]], $MachinePrecision]], N[(x$46$re / (-y$46$im)), $MachinePrecision], N[(N[(x$46$im - N[(x$46$re * N[(y$46$im / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y$46$re), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.im \leq -2.35 \cdot 10^{+24} \lor \neg \left(y.im \leq 1.95 \cdot 10^{+87}\right):\\
\;\;\;\;\frac{x.re}{-y.im}\\
\mathbf{else}:\\
\;\;\;\;\frac{x.im - x.re \cdot \frac{y.im}{y.re}}{y.re}\\
\end{array}
\end{array}
if y.im < -2.35e24 or 1.9500000000000001e87 < y.im Initial program 48.9%
Taylor expanded in y.re around 0 68.0%
associate-*r/68.0%
neg-mul-168.0%
Simplified68.0%
if -2.35e24 < y.im < 1.9500000000000001e87Initial program 69.1%
Taylor expanded in y.re around inf 72.8%
mul-1-neg72.8%
unsub-neg72.8%
associate-/l*72.6%
Simplified72.6%
Final simplification70.9%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (<= y.re -1e+86)
(/ (- x.im (/ (* y.im x.re) y.re)) y.re)
(if (<= y.re 1e+33)
(/ (- (* x.im (/ y.re y.im)) x.re) y.im)
(/ (- x.im (/ x.re (/ y.re y.im))) y.re))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_re <= -1e+86) {
tmp = (x_46_im - ((y_46_im * x_46_re) / y_46_re)) / y_46_re;
} else if (y_46_re <= 1e+33) {
tmp = ((x_46_im * (y_46_re / y_46_im)) - x_46_re) / y_46_im;
} else {
tmp = (x_46_im - (x_46_re / (y_46_re / y_46_im))) / y_46_re;
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: tmp
if (y_46re <= (-1d+86)) then
tmp = (x_46im - ((y_46im * x_46re) / y_46re)) / y_46re
else if (y_46re <= 1d+33) then
tmp = ((x_46im * (y_46re / y_46im)) - x_46re) / y_46im
else
tmp = (x_46im - (x_46re / (y_46re / y_46im))) / y_46re
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_re <= -1e+86) {
tmp = (x_46_im - ((y_46_im * x_46_re) / y_46_re)) / y_46_re;
} else if (y_46_re <= 1e+33) {
tmp = ((x_46_im * (y_46_re / y_46_im)) - x_46_re) / y_46_im;
} else {
tmp = (x_46_im - (x_46_re / (y_46_re / y_46_im))) / y_46_re;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if y_46_re <= -1e+86: tmp = (x_46_im - ((y_46_im * x_46_re) / y_46_re)) / y_46_re elif y_46_re <= 1e+33: tmp = ((x_46_im * (y_46_re / y_46_im)) - x_46_re) / y_46_im else: tmp = (x_46_im - (x_46_re / (y_46_re / y_46_im))) / y_46_re return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if (y_46_re <= -1e+86) tmp = Float64(Float64(x_46_im - Float64(Float64(y_46_im * x_46_re) / y_46_re)) / y_46_re); elseif (y_46_re <= 1e+33) tmp = Float64(Float64(Float64(x_46_im * Float64(y_46_re / y_46_im)) - x_46_re) / y_46_im); else tmp = Float64(Float64(x_46_im - Float64(x_46_re / Float64(y_46_re / y_46_im))) / y_46_re); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if (y_46_re <= -1e+86) tmp = (x_46_im - ((y_46_im * x_46_re) / y_46_re)) / y_46_re; elseif (y_46_re <= 1e+33) tmp = ((x_46_im * (y_46_re / y_46_im)) - x_46_re) / y_46_im; else tmp = (x_46_im - (x_46_re / (y_46_re / y_46_im))) / y_46_re; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[y$46$re, -1e+86], N[(N[(x$46$im - N[(N[(y$46$im * x$46$re), $MachinePrecision] / y$46$re), $MachinePrecision]), $MachinePrecision] / y$46$re), $MachinePrecision], If[LessEqual[y$46$re, 1e+33], N[(N[(N[(x$46$im * N[(y$46$re / y$46$im), $MachinePrecision]), $MachinePrecision] - x$46$re), $MachinePrecision] / y$46$im), $MachinePrecision], N[(N[(x$46$im - N[(x$46$re / N[(y$46$re / y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y$46$re), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq -1 \cdot 10^{+86}:\\
\;\;\;\;\frac{x.im - \frac{y.im \cdot x.re}{y.re}}{y.re}\\
\mathbf{elif}\;y.re \leq 10^{+33}:\\
\;\;\;\;\frac{x.im \cdot \frac{y.re}{y.im} - x.re}{y.im}\\
\mathbf{else}:\\
\;\;\;\;\frac{x.im - \frac{x.re}{\frac{y.re}{y.im}}}{y.re}\\
\end{array}
\end{array}
if y.re < -1e86Initial program 40.0%
Taylor expanded in y.re around inf 86.1%
mul-1-neg86.1%
unsub-neg86.1%
associate-/l*82.9%
Simplified82.9%
Taylor expanded in x.re around 0 86.1%
if -1e86 < y.re < 9.9999999999999995e32Initial program 72.2%
Taylor expanded in y.re around 0 71.7%
+-commutative71.7%
mul-1-neg71.7%
unsub-neg71.7%
unpow271.7%
associate-/r*76.4%
div-sub77.8%
*-commutative77.8%
associate-/l*77.8%
Simplified77.8%
clear-num77.8%
un-div-inv77.8%
Applied egg-rr77.8%
associate-/r/79.6%
Applied egg-rr79.6%
if 9.9999999999999995e32 < y.re Initial program 50.4%
Taylor expanded in y.re around inf 75.1%
mul-1-neg75.1%
unsub-neg75.1%
associate-/l*82.6%
Simplified82.6%
clear-num82.5%
un-div-inv82.6%
Applied egg-rr82.6%
Final simplification81.4%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (<= y.re -1e+86)
(/ (- x.im (/ (* y.im x.re) y.re)) y.re)
(if (<= y.re 1.7e+34)
(/ (- (* y.re (/ x.im y.im)) x.re) y.im)
(/ (- x.im (/ x.re (/ y.re y.im))) y.re))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_re <= -1e+86) {
tmp = (x_46_im - ((y_46_im * x_46_re) / y_46_re)) / y_46_re;
} else if (y_46_re <= 1.7e+34) {
tmp = ((y_46_re * (x_46_im / y_46_im)) - x_46_re) / y_46_im;
} else {
tmp = (x_46_im - (x_46_re / (y_46_re / y_46_im))) / y_46_re;
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: tmp
if (y_46re <= (-1d+86)) then
tmp = (x_46im - ((y_46im * x_46re) / y_46re)) / y_46re
else if (y_46re <= 1.7d+34) then
tmp = ((y_46re * (x_46im / y_46im)) - x_46re) / y_46im
else
tmp = (x_46im - (x_46re / (y_46re / y_46im))) / y_46re
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_re <= -1e+86) {
tmp = (x_46_im - ((y_46_im * x_46_re) / y_46_re)) / y_46_re;
} else if (y_46_re <= 1.7e+34) {
tmp = ((y_46_re * (x_46_im / y_46_im)) - x_46_re) / y_46_im;
} else {
tmp = (x_46_im - (x_46_re / (y_46_re / y_46_im))) / y_46_re;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if y_46_re <= -1e+86: tmp = (x_46_im - ((y_46_im * x_46_re) / y_46_re)) / y_46_re elif y_46_re <= 1.7e+34: tmp = ((y_46_re * (x_46_im / y_46_im)) - x_46_re) / y_46_im else: tmp = (x_46_im - (x_46_re / (y_46_re / y_46_im))) / y_46_re return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if (y_46_re <= -1e+86) tmp = Float64(Float64(x_46_im - Float64(Float64(y_46_im * x_46_re) / y_46_re)) / y_46_re); elseif (y_46_re <= 1.7e+34) tmp = Float64(Float64(Float64(y_46_re * Float64(x_46_im / y_46_im)) - x_46_re) / y_46_im); else tmp = Float64(Float64(x_46_im - Float64(x_46_re / Float64(y_46_re / y_46_im))) / y_46_re); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if (y_46_re <= -1e+86) tmp = (x_46_im - ((y_46_im * x_46_re) / y_46_re)) / y_46_re; elseif (y_46_re <= 1.7e+34) tmp = ((y_46_re * (x_46_im / y_46_im)) - x_46_re) / y_46_im; else tmp = (x_46_im - (x_46_re / (y_46_re / y_46_im))) / y_46_re; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[y$46$re, -1e+86], N[(N[(x$46$im - N[(N[(y$46$im * x$46$re), $MachinePrecision] / y$46$re), $MachinePrecision]), $MachinePrecision] / y$46$re), $MachinePrecision], If[LessEqual[y$46$re, 1.7e+34], N[(N[(N[(y$46$re * N[(x$46$im / y$46$im), $MachinePrecision]), $MachinePrecision] - x$46$re), $MachinePrecision] / y$46$im), $MachinePrecision], N[(N[(x$46$im - N[(x$46$re / N[(y$46$re / y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y$46$re), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq -1 \cdot 10^{+86}:\\
\;\;\;\;\frac{x.im - \frac{y.im \cdot x.re}{y.re}}{y.re}\\
\mathbf{elif}\;y.re \leq 1.7 \cdot 10^{+34}:\\
\;\;\;\;\frac{y.re \cdot \frac{x.im}{y.im} - x.re}{y.im}\\
\mathbf{else}:\\
\;\;\;\;\frac{x.im - \frac{x.re}{\frac{y.re}{y.im}}}{y.re}\\
\end{array}
\end{array}
if y.re < -1e86Initial program 40.0%
Taylor expanded in y.re around inf 86.1%
mul-1-neg86.1%
unsub-neg86.1%
associate-/l*82.9%
Simplified82.9%
Taylor expanded in x.re around 0 86.1%
if -1e86 < y.re < 1.7e34Initial program 72.2%
Taylor expanded in y.re around 0 71.7%
+-commutative71.7%
mul-1-neg71.7%
unsub-neg71.7%
unpow271.7%
associate-/r*76.4%
div-sub77.8%
*-commutative77.8%
associate-/l*77.8%
Simplified77.8%
if 1.7e34 < y.re Initial program 50.4%
Taylor expanded in y.re around inf 75.1%
mul-1-neg75.1%
unsub-neg75.1%
associate-/l*82.6%
Simplified82.6%
clear-num82.5%
un-div-inv82.6%
Applied egg-rr82.6%
Final simplification80.3%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (or (<= y.re -5.6e+31) (not (<= y.re 1.35e+42))) (/ 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 <= -5.6e+31) || !(y_46_re <= 1.35e+42)) {
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 <= (-5.6d+31)) .or. (.not. (y_46re <= 1.35d+42))) 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 <= -5.6e+31) || !(y_46_re <= 1.35e+42)) {
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 <= -5.6e+31) or not (y_46_re <= 1.35e+42): 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 <= -5.6e+31) || !(y_46_re <= 1.35e+42)) 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 <= -5.6e+31) || ~((y_46_re <= 1.35e+42))) 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, -5.6e+31], N[Not[LessEqual[y$46$re, 1.35e+42]], $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 -5.6 \cdot 10^{+31} \lor \neg \left(y.re \leq 1.35 \cdot 10^{+42}\right):\\
\;\;\;\;\frac{x.im}{y.re}\\
\mathbf{else}:\\
\;\;\;\;\frac{x.re}{-y.im}\\
\end{array}
\end{array}
if y.re < -5.60000000000000034e31 or 1.35e42 < y.re Initial program 47.3%
Taylor expanded in y.re around inf 69.9%
if -5.60000000000000034e31 < y.re < 1.35e42Initial program 72.1%
Taylor expanded in y.re around 0 59.0%
associate-*r/59.0%
neg-mul-159.0%
Simplified59.0%
Final simplification63.5%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (<= y.re -4e+32) (/ 1.0 (/ y.re x.im)) (if (<= y.re 5.8e+43) (/ x.re (- y.im)) (/ x.im y.re))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_re <= -4e+32) {
tmp = 1.0 / (y_46_re / x_46_im);
} else if (y_46_re <= 5.8e+43) {
tmp = x_46_re / -y_46_im;
} else {
tmp = x_46_im / y_46_re;
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: tmp
if (y_46re <= (-4d+32)) then
tmp = 1.0d0 / (y_46re / x_46im)
else if (y_46re <= 5.8d+43) then
tmp = x_46re / -y_46im
else
tmp = x_46im / y_46re
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_re <= -4e+32) {
tmp = 1.0 / (y_46_re / x_46_im);
} else if (y_46_re <= 5.8e+43) {
tmp = x_46_re / -y_46_im;
} else {
tmp = x_46_im / y_46_re;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if y_46_re <= -4e+32: tmp = 1.0 / (y_46_re / x_46_im) elif y_46_re <= 5.8e+43: tmp = x_46_re / -y_46_im else: tmp = x_46_im / y_46_re return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if (y_46_re <= -4e+32) tmp = Float64(1.0 / Float64(y_46_re / x_46_im)); elseif (y_46_re <= 5.8e+43) tmp = Float64(x_46_re / Float64(-y_46_im)); else tmp = Float64(x_46_im / y_46_re); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if (y_46_re <= -4e+32) tmp = 1.0 / (y_46_re / x_46_im); elseif (y_46_re <= 5.8e+43) tmp = x_46_re / -y_46_im; else tmp = x_46_im / y_46_re; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[y$46$re, -4e+32], N[(1.0 / N[(y$46$re / x$46$im), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$re, 5.8e+43], N[(x$46$re / (-y$46$im)), $MachinePrecision], N[(x$46$im / y$46$re), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq -4 \cdot 10^{+32}:\\
\;\;\;\;\frac{1}{\frac{y.re}{x.im}}\\
\mathbf{elif}\;y.re \leq 5.8 \cdot 10^{+43}:\\
\;\;\;\;\frac{x.re}{-y.im}\\
\mathbf{else}:\\
\;\;\;\;\frac{x.im}{y.re}\\
\end{array}
\end{array}
if y.re < -4.00000000000000021e32Initial program 44.6%
Taylor expanded in y.re around inf 73.8%
clear-num74.4%
inv-pow74.4%
Applied egg-rr74.4%
unpow-174.4%
Simplified74.4%
if -4.00000000000000021e32 < y.re < 5.8000000000000004e43Initial program 72.1%
Taylor expanded in y.re around 0 59.0%
associate-*r/59.0%
neg-mul-159.0%
Simplified59.0%
if 5.8000000000000004e43 < y.re Initial program 50.5%
Taylor expanded in y.re around inf 65.4%
Final simplification63.7%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (<= y.im -6.5e+119) (/ x.re y.im) (/ x.im y.re)))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_im <= -6.5e+119) {
tmp = x_46_re / y_46_im;
} else {
tmp = x_46_im / y_46_re;
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: tmp
if (y_46im <= (-6.5d+119)) then
tmp = x_46re / y_46im
else
tmp = x_46im / y_46re
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_im <= -6.5e+119) {
tmp = x_46_re / y_46_im;
} else {
tmp = x_46_im / y_46_re;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if y_46_im <= -6.5e+119: tmp = x_46_re / y_46_im else: tmp = x_46_im / y_46_re return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if (y_46_im <= -6.5e+119) tmp = Float64(x_46_re / y_46_im); else tmp = Float64(x_46_im / y_46_re); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if (y_46_im <= -6.5e+119) tmp = x_46_re / y_46_im; else tmp = x_46_im / y_46_re; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[y$46$im, -6.5e+119], N[(x$46$re / y$46$im), $MachinePrecision], N[(x$46$im / y$46$re), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.im \leq -6.5 \cdot 10^{+119}:\\
\;\;\;\;\frac{x.re}{y.im}\\
\mathbf{else}:\\
\;\;\;\;\frac{x.im}{y.re}\\
\end{array}
\end{array}
if y.im < -6.4999999999999997e119Initial program 38.9%
Taylor expanded in y.re around 0 80.1%
associate-*r/80.1%
neg-mul-180.1%
Simplified80.1%
neg-sub080.1%
sub-neg80.1%
add-sqr-sqrt35.9%
sqrt-unprod38.8%
sqr-neg38.8%
sqrt-unprod18.9%
add-sqr-sqrt29.2%
Applied egg-rr29.2%
+-lft-identity29.2%
Simplified29.2%
if -6.4999999999999997e119 < y.im Initial program 65.6%
Taylor expanded in y.re around inf 48.3%
(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 61.8%
Taylor expanded in y.re around inf 42.5%
herbie shell --seed 2024139
(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))))