
(FPCore (x.re x.im y.re y.im) :precision binary64 (/ (- (* x.im y.re) (* x.re y.im)) (+ (* y.re y.re) (* y.im y.im))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return ((x_46_im * y_46_re) - (x_46_re * y_46_im)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im));
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
code = ((x_46im * y_46re) - (x_46re * y_46im)) / ((y_46re * y_46re) + (y_46im * y_46im))
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return ((x_46_im * y_46_re) - (x_46_re * y_46_im)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im));
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): return ((x_46_im * y_46_re) - (x_46_re * y_46_im)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im))
function code(x_46_re, x_46_im, y_46_re, y_46_im) return Float64(Float64(Float64(x_46_im * y_46_re) - Float64(x_46_re * y_46_im)) / Float64(Float64(y_46_re * y_46_re) + Float64(y_46_im * y_46_im))) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = ((x_46_im * y_46_re) - (x_46_re * y_46_im)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im)); end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[(N[(N[(x$46$im * y$46$re), $MachinePrecision] - N[(x$46$re * y$46$im), $MachinePrecision]), $MachinePrecision] / N[(N[(y$46$re * y$46$re), $MachinePrecision] + N[(y$46$im * y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x.im \cdot y.re - x.re \cdot y.im}{y.re \cdot y.re + y.im \cdot y.im}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 13 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x.re x.im y.re y.im) :precision binary64 (/ (- (* x.im y.re) (* x.re y.im)) (+ (* y.re y.re) (* y.im y.im))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return ((x_46_im * y_46_re) - (x_46_re * y_46_im)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im));
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
code = ((x_46im * y_46re) - (x_46re * y_46im)) / ((y_46re * y_46re) + (y_46im * y_46im))
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return ((x_46_im * y_46_re) - (x_46_re * y_46_im)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im));
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): return ((x_46_im * y_46_re) - (x_46_re * y_46_im)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im))
function code(x_46_re, x_46_im, y_46_re, y_46_im) return Float64(Float64(Float64(x_46_im * y_46_re) - Float64(x_46_re * y_46_im)) / Float64(Float64(y_46_re * y_46_re) + Float64(y_46_im * y_46_im))) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = ((x_46_im * y_46_re) - (x_46_re * y_46_im)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im)); end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[(N[(N[(x$46$im * y$46$re), $MachinePrecision] - N[(x$46$re * y$46$im), $MachinePrecision]), $MachinePrecision] / N[(N[(y$46$re * y$46$re), $MachinePrecision] + N[(y$46$im * y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x.im \cdot y.re - x.re \cdot y.im}{y.re \cdot y.re + y.im \cdot y.im}
\end{array}
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0
(fma
(/ y.re (hypot y.re y.im))
(/ x.im (hypot y.re y.im))
(/ (- x.re) (/ (pow (hypot y.re y.im) 2.0) y.im)))))
(if (<= y.im -1.25e+154)
(* (/ 1.0 (hypot y.re y.im)) (- x.re (/ (* y.re x.im) y.im)))
(if (<= y.im -9.5e-280)
t_0
(if (<= y.im 9e+42)
(/
(/ (- (* y.re x.im) (* y.im x.re)) (hypot y.re y.im))
(hypot y.re y.im))
(if (<= y.im 3.9e+118)
t_0
(- (/ y.re (/ 1.0 (/ (/ x.im y.im) y.im))) (/ x.re y.im))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = fma((y_46_re / hypot(y_46_re, y_46_im)), (x_46_im / hypot(y_46_re, y_46_im)), (-x_46_re / (pow(hypot(y_46_re, y_46_im), 2.0) / y_46_im)));
double tmp;
if (y_46_im <= -1.25e+154) {
tmp = (1.0 / hypot(y_46_re, y_46_im)) * (x_46_re - ((y_46_re * x_46_im) / y_46_im));
} else if (y_46_im <= -9.5e-280) {
tmp = t_0;
} else if (y_46_im <= 9e+42) {
tmp = (((y_46_re * x_46_im) - (y_46_im * x_46_re)) / hypot(y_46_re, y_46_im)) / hypot(y_46_re, y_46_im);
} else if (y_46_im <= 3.9e+118) {
tmp = t_0;
} else {
tmp = (y_46_re / (1.0 / ((x_46_im / y_46_im) / y_46_im))) - (x_46_re / y_46_im);
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = fma(Float64(y_46_re / hypot(y_46_re, y_46_im)), Float64(x_46_im / hypot(y_46_re, y_46_im)), Float64(Float64(-x_46_re) / Float64((hypot(y_46_re, y_46_im) ^ 2.0) / y_46_im))) tmp = 0.0 if (y_46_im <= -1.25e+154) tmp = Float64(Float64(1.0 / hypot(y_46_re, y_46_im)) * Float64(x_46_re - Float64(Float64(y_46_re * x_46_im) / y_46_im))); elseif (y_46_im <= -9.5e-280) tmp = t_0; elseif (y_46_im <= 9e+42) tmp = Float64(Float64(Float64(Float64(y_46_re * x_46_im) - Float64(y_46_im * x_46_re)) / hypot(y_46_re, y_46_im)) / hypot(y_46_re, y_46_im)); elseif (y_46_im <= 3.9e+118) tmp = t_0; else tmp = Float64(Float64(y_46_re / Float64(1.0 / Float64(Float64(x_46_im / y_46_im) / y_46_im))) - Float64(x_46_re / y_46_im)); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[(y$46$re / N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision]), $MachinePrecision] * N[(x$46$im / N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision]), $MachinePrecision] + N[((-x$46$re) / N[(N[Power[N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision], 2.0], $MachinePrecision] / y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -1.25e+154], N[(N[(1.0 / N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision]), $MachinePrecision] * N[(x$46$re - N[(N[(y$46$re * x$46$im), $MachinePrecision] / y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, -9.5e-280], t$95$0, If[LessEqual[y$46$im, 9e+42], N[(N[(N[(N[(y$46$re * x$46$im), $MachinePrecision] - N[(y$46$im * x$46$re), $MachinePrecision]), $MachinePrecision] / N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision]), $MachinePrecision] / N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 3.9e+118], t$95$0, N[(N[(y$46$re / N[(1.0 / N[(N[(x$46$im / y$46$im), $MachinePrecision] / y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x$46$re / y$46$im), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \mathsf{fma}\left(\frac{y.re}{\mathsf{hypot}\left(y.re, y.im\right)}, \frac{x.im}{\mathsf{hypot}\left(y.re, y.im\right)}, \frac{-x.re}{\frac{{\left(\mathsf{hypot}\left(y.re, y.im\right)\right)}^{2}}{y.im}}\right)\\
\mathbf{if}\;y.im \leq -1.25 \cdot 10^{+154}:\\
\;\;\;\;\frac{1}{\mathsf{hypot}\left(y.re, y.im\right)} \cdot \left(x.re - \frac{y.re \cdot x.im}{y.im}\right)\\
\mathbf{elif}\;y.im \leq -9.5 \cdot 10^{-280}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y.im \leq 9 \cdot 10^{+42}:\\
\;\;\;\;\frac{\frac{y.re \cdot x.im - y.im \cdot x.re}{\mathsf{hypot}\left(y.re, y.im\right)}}{\mathsf{hypot}\left(y.re, y.im\right)}\\
\mathbf{elif}\;y.im \leq 3.9 \cdot 10^{+118}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{y.re}{\frac{1}{\frac{\frac{x.im}{y.im}}{y.im}}} - \frac{x.re}{y.im}\\
\end{array}
\end{array}
if y.im < -1.25000000000000001e154Initial program 19.9%
*-un-lft-identity19.9%
add-sqr-sqrt19.9%
times-frac19.9%
hypot-def19.9%
hypot-def45.3%
Applied egg-rr45.3%
Taylor expanded in y.im around -inf 92.9%
associate-*r/92.9%
neg-mul-192.9%
distribute-rgt-neg-in92.9%
Simplified92.9%
if -1.25000000000000001e154 < y.im < -9.50000000000000082e-280 or 9.00000000000000025e42 < y.im < 3.9e118Initial program 67.8%
div-sub63.9%
sub-neg63.9%
*-commutative63.9%
add-sqr-sqrt63.9%
times-frac71.0%
fma-def71.0%
hypot-def71.0%
hypot-def91.1%
associate-/l*93.8%
add-sqr-sqrt93.8%
pow293.8%
hypot-def93.8%
Applied egg-rr93.8%
if -9.50000000000000082e-280 < y.im < 9.00000000000000025e42Initial program 77.1%
*-un-lft-identity77.1%
add-sqr-sqrt77.1%
times-frac77.1%
hypot-def77.1%
hypot-def92.3%
Applied egg-rr92.3%
associate-*l/92.5%
*-un-lft-identity92.5%
Applied egg-rr92.5%
if 3.9e118 < y.im Initial program 19.2%
Taylor expanded in y.re around 0 81.1%
+-commutative81.1%
mul-1-neg81.1%
unsub-neg81.1%
*-commutative81.1%
associate-/l*90.9%
Simplified90.9%
pow290.9%
add-sqr-sqrt35.9%
times-frac41.9%
Applied egg-rr41.9%
unpow241.9%
Simplified41.9%
unpow241.9%
clear-num41.9%
clear-num41.9%
frac-times41.9%
metadata-eval41.9%
Applied egg-rr41.9%
associate-*r/41.9%
associate-*l/41.9%
rem-square-sqrt96.9%
Simplified96.9%
Final simplification93.6%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (- (* y.re x.im) (* y.im x.re)))
(t_1 (/ t_0 (+ (* y.re y.re) (* y.im y.im))))
(t_2 (pow (hypot y.re y.im) 2.0)))
(if (<= t_1 2e-137)
(/ (/ t_0 (hypot y.re y.im)) (hypot y.re y.im))
(if (<= t_1 INFINITY)
(- (/ x.im (/ t_2 y.re)) (/ x.re (/ t_2 y.im)))
(- (/ y.re (/ y.im (/ x.im y.im))) (/ x.re y.im))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = (y_46_re * x_46_im) - (y_46_im * x_46_re);
double t_1 = t_0 / ((y_46_re * y_46_re) + (y_46_im * y_46_im));
double t_2 = pow(hypot(y_46_re, y_46_im), 2.0);
double tmp;
if (t_1 <= 2e-137) {
tmp = (t_0 / hypot(y_46_re, y_46_im)) / hypot(y_46_re, y_46_im);
} else if (t_1 <= ((double) INFINITY)) {
tmp = (x_46_im / (t_2 / y_46_re)) - (x_46_re / (t_2 / y_46_im));
} else {
tmp = (y_46_re / (y_46_im / (x_46_im / y_46_im))) - (x_46_re / 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 = (y_46_re * x_46_im) - (y_46_im * x_46_re);
double t_1 = t_0 / ((y_46_re * y_46_re) + (y_46_im * y_46_im));
double t_2 = Math.pow(Math.hypot(y_46_re, y_46_im), 2.0);
double tmp;
if (t_1 <= 2e-137) {
tmp = (t_0 / Math.hypot(y_46_re, y_46_im)) / Math.hypot(y_46_re, y_46_im);
} else if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = (x_46_im / (t_2 / y_46_re)) - (x_46_re / (t_2 / y_46_im));
} else {
tmp = (y_46_re / (y_46_im / (x_46_im / y_46_im))) - (x_46_re / y_46_im);
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = (y_46_re * x_46_im) - (y_46_im * x_46_re) t_1 = t_0 / ((y_46_re * y_46_re) + (y_46_im * y_46_im)) t_2 = math.pow(math.hypot(y_46_re, y_46_im), 2.0) tmp = 0 if t_1 <= 2e-137: tmp = (t_0 / math.hypot(y_46_re, y_46_im)) / math.hypot(y_46_re, y_46_im) elif t_1 <= math.inf: tmp = (x_46_im / (t_2 / y_46_re)) - (x_46_re / (t_2 / y_46_im)) else: tmp = (y_46_re / (y_46_im / (x_46_im / y_46_im))) - (x_46_re / y_46_im) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(Float64(y_46_re * x_46_im) - Float64(y_46_im * x_46_re)) t_1 = Float64(t_0 / Float64(Float64(y_46_re * y_46_re) + Float64(y_46_im * y_46_im))) t_2 = hypot(y_46_re, y_46_im) ^ 2.0 tmp = 0.0 if (t_1 <= 2e-137) tmp = Float64(Float64(t_0 / hypot(y_46_re, y_46_im)) / hypot(y_46_re, y_46_im)); elseif (t_1 <= Inf) tmp = Float64(Float64(x_46_im / Float64(t_2 / y_46_re)) - Float64(x_46_re / Float64(t_2 / y_46_im))); else tmp = Float64(Float64(y_46_re / Float64(y_46_im / Float64(x_46_im / y_46_im))) - Float64(x_46_re / y_46_im)); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = (y_46_re * x_46_im) - (y_46_im * x_46_re); t_1 = t_0 / ((y_46_re * y_46_re) + (y_46_im * y_46_im)); t_2 = hypot(y_46_re, y_46_im) ^ 2.0; tmp = 0.0; if (t_1 <= 2e-137) tmp = (t_0 / hypot(y_46_re, y_46_im)) / hypot(y_46_re, y_46_im); elseif (t_1 <= Inf) tmp = (x_46_im / (t_2 / y_46_re)) - (x_46_re / (t_2 / y_46_im)); else tmp = (y_46_re / (y_46_im / (x_46_im / y_46_im))) - (x_46_re / y_46_im); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[(y$46$re * x$46$im), $MachinePrecision] - N[(y$46$im * x$46$re), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(t$95$0 / N[(N[(y$46$re * y$46$re), $MachinePrecision] + N[(y$46$im * y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Power[N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision], 2.0], $MachinePrecision]}, If[LessEqual[t$95$1, 2e-137], N[(N[(t$95$0 / N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision]), $MachinePrecision] / N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, Infinity], N[(N[(x$46$im / N[(t$95$2 / y$46$re), $MachinePrecision]), $MachinePrecision] - N[(x$46$re / N[(t$95$2 / y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y$46$re / N[(y$46$im / N[(x$46$im / y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x$46$re / y$46$im), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot x.im - y.im \cdot x.re\\
t_1 := \frac{t_0}{y.re \cdot y.re + y.im \cdot y.im}\\
t_2 := {\left(\mathsf{hypot}\left(y.re, y.im\right)\right)}^{2}\\
\mathbf{if}\;t_1 \leq 2 \cdot 10^{-137}:\\
\;\;\;\;\frac{\frac{t_0}{\mathsf{hypot}\left(y.re, y.im\right)}}{\mathsf{hypot}\left(y.re, y.im\right)}\\
\mathbf{elif}\;t_1 \leq \infty:\\
\;\;\;\;\frac{x.im}{\frac{t_2}{y.re}} - \frac{x.re}{\frac{t_2}{y.im}}\\
\mathbf{else}:\\
\;\;\;\;\frac{y.re}{\frac{y.im}{\frac{x.im}{y.im}}} - \frac{x.re}{y.im}\\
\end{array}
\end{array}
if (/.f64 (-.f64 (*.f64 x.im y.re) (*.f64 x.re y.im)) (+.f64 (*.f64 y.re y.re) (*.f64 y.im y.im))) < 1.99999999999999996e-137Initial program 68.3%
*-un-lft-identity68.3%
add-sqr-sqrt68.3%
times-frac68.3%
hypot-def68.3%
hypot-def95.4%
Applied egg-rr95.4%
associate-*l/95.5%
*-un-lft-identity95.5%
Applied egg-rr95.5%
if 1.99999999999999996e-137 < (/.f64 (-.f64 (*.f64 x.im y.re) (*.f64 x.re y.im)) (+.f64 (*.f64 y.re y.re) (*.f64 y.im y.im))) < +inf.0Initial program 81.4%
div-sub75.5%
associate-/l*86.9%
add-sqr-sqrt86.9%
pow286.9%
hypot-def86.9%
associate-/l*92.6%
add-sqr-sqrt92.6%
pow292.6%
hypot-def92.6%
Applied egg-rr92.6%
if +inf.0 < (/.f64 (-.f64 (*.f64 x.im y.re) (*.f64 x.re y.im)) (+.f64 (*.f64 y.re y.re) (*.f64 y.im y.im))) Initial program 0.0%
Taylor expanded in y.re around 0 59.0%
+-commutative59.0%
mul-1-neg59.0%
unsub-neg59.0%
*-commutative59.0%
associate-/l*64.7%
Simplified64.7%
pow264.7%
add-sqr-sqrt33.3%
times-frac33.5%
Applied egg-rr33.5%
unpow233.5%
Simplified33.5%
unpow233.5%
clear-num33.5%
frac-times33.5%
*-un-lft-identity33.5%
Applied egg-rr33.5%
associate-*l/33.5%
rem-square-sqrt64.9%
Simplified64.9%
Final simplification88.2%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (- (* y.re x.im) (* y.im x.re))))
(if (<= (/ t_0 (+ (* y.re y.re) (* y.im y.im))) 2e+297)
(/ (/ t_0 (hypot y.re y.im)) (hypot y.re y.im))
(- (/ y.re (/ y.im (/ x.im y.im))) (/ x.re y.im)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = (y_46_re * x_46_im) - (y_46_im * x_46_re);
double tmp;
if ((t_0 / ((y_46_re * y_46_re) + (y_46_im * y_46_im))) <= 2e+297) {
tmp = (t_0 / hypot(y_46_re, y_46_im)) / hypot(y_46_re, y_46_im);
} else {
tmp = (y_46_re / (y_46_im / (x_46_im / y_46_im))) - (x_46_re / 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 = (y_46_re * x_46_im) - (y_46_im * x_46_re);
double tmp;
if ((t_0 / ((y_46_re * y_46_re) + (y_46_im * y_46_im))) <= 2e+297) {
tmp = (t_0 / Math.hypot(y_46_re, y_46_im)) / Math.hypot(y_46_re, y_46_im);
} else {
tmp = (y_46_re / (y_46_im / (x_46_im / y_46_im))) - (x_46_re / y_46_im);
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = (y_46_re * x_46_im) - (y_46_im * x_46_re) tmp = 0 if (t_0 / ((y_46_re * y_46_re) + (y_46_im * y_46_im))) <= 2e+297: tmp = (t_0 / math.hypot(y_46_re, y_46_im)) / math.hypot(y_46_re, y_46_im) else: tmp = (y_46_re / (y_46_im / (x_46_im / y_46_im))) - (x_46_re / y_46_im) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(Float64(y_46_re * x_46_im) - Float64(y_46_im * x_46_re)) tmp = 0.0 if (Float64(t_0 / Float64(Float64(y_46_re * y_46_re) + Float64(y_46_im * y_46_im))) <= 2e+297) tmp = Float64(Float64(t_0 / hypot(y_46_re, y_46_im)) / hypot(y_46_re, y_46_im)); else tmp = Float64(Float64(y_46_re / Float64(y_46_im / Float64(x_46_im / y_46_im))) - Float64(x_46_re / y_46_im)); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = (y_46_re * x_46_im) - (y_46_im * x_46_re); tmp = 0.0; if ((t_0 / ((y_46_re * y_46_re) + (y_46_im * y_46_im))) <= 2e+297) tmp = (t_0 / hypot(y_46_re, y_46_im)) / hypot(y_46_re, y_46_im); else tmp = (y_46_re / (y_46_im / (x_46_im / y_46_im))) - (x_46_re / y_46_im); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[(y$46$re * x$46$im), $MachinePrecision] - N[(y$46$im * x$46$re), $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], 2e+297], N[(N[(t$95$0 / N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision]), $MachinePrecision] / N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision]), $MachinePrecision], N[(N[(y$46$re / N[(y$46$im / N[(x$46$im / y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x$46$re / y$46$im), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y.re \cdot x.im - y.im \cdot x.re\\
\mathbf{if}\;\frac{t_0}{y.re \cdot y.re + y.im \cdot y.im} \leq 2 \cdot 10^{+297}:\\
\;\;\;\;\frac{\frac{t_0}{\mathsf{hypot}\left(y.re, y.im\right)}}{\mathsf{hypot}\left(y.re, y.im\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{y.re}{\frac{y.im}{\frac{x.im}{y.im}}} - \frac{x.re}{y.im}\\
\end{array}
\end{array}
if (/.f64 (-.f64 (*.f64 x.im y.re) (*.f64 x.re y.im)) (+.f64 (*.f64 y.re y.re) (*.f64 y.im y.im))) < 2e297Initial program 76.6%
*-un-lft-identity76.6%
add-sqr-sqrt76.6%
times-frac76.5%
hypot-def76.5%
hypot-def96.4%
Applied egg-rr96.4%
associate-*l/96.6%
*-un-lft-identity96.6%
Applied egg-rr96.6%
if 2e297 < (/.f64 (-.f64 (*.f64 x.im y.re) (*.f64 x.re y.im)) (+.f64 (*.f64 y.re y.re) (*.f64 y.im y.im))) Initial program 10.1%
Taylor expanded in y.re around 0 54.5%
+-commutative54.5%
mul-1-neg54.5%
unsub-neg54.5%
*-commutative54.5%
associate-/l*61.8%
Simplified61.8%
pow261.8%
add-sqr-sqrt31.4%
times-frac31.6%
Applied egg-rr31.6%
unpow231.6%
Simplified31.6%
unpow231.6%
clear-num31.6%
frac-times31.6%
*-un-lft-identity31.6%
Applied egg-rr31.6%
associate-*l/31.6%
rem-square-sqrt62.1%
Simplified62.1%
Final simplification86.5%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0
(/ (- (* y.re x.im) (* y.im x.re)) (+ (* y.re y.re) (* y.im y.im)))))
(if (<= y.im -2.5e+95)
(* (/ 1.0 (hypot y.re y.im)) (- x.re (/ (* y.re x.im) y.im)))
(if (<= y.im -3.8e-63)
t_0
(if (<= y.im 3.9e-82)
(- (/ x.im y.re) (* y.im (/ (/ x.re y.re) y.re)))
(if (<= y.im 2e+118)
t_0
(- (/ y.re (/ 1.0 (/ (/ x.im y.im) y.im))) (/ x.re y.im))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = ((y_46_re * x_46_im) - (y_46_im * x_46_re)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im));
double tmp;
if (y_46_im <= -2.5e+95) {
tmp = (1.0 / hypot(y_46_re, y_46_im)) * (x_46_re - ((y_46_re * x_46_im) / y_46_im));
} else if (y_46_im <= -3.8e-63) {
tmp = t_0;
} else if (y_46_im <= 3.9e-82) {
tmp = (x_46_im / y_46_re) - (y_46_im * ((x_46_re / y_46_re) / y_46_re));
} else if (y_46_im <= 2e+118) {
tmp = t_0;
} else {
tmp = (y_46_re / (1.0 / ((x_46_im / y_46_im) / y_46_im))) - (x_46_re / 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 = ((y_46_re * x_46_im) - (y_46_im * x_46_re)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im));
double tmp;
if (y_46_im <= -2.5e+95) {
tmp = (1.0 / Math.hypot(y_46_re, y_46_im)) * (x_46_re - ((y_46_re * x_46_im) / y_46_im));
} else if (y_46_im <= -3.8e-63) {
tmp = t_0;
} else if (y_46_im <= 3.9e-82) {
tmp = (x_46_im / y_46_re) - (y_46_im * ((x_46_re / y_46_re) / y_46_re));
} else if (y_46_im <= 2e+118) {
tmp = t_0;
} else {
tmp = (y_46_re / (1.0 / ((x_46_im / y_46_im) / y_46_im))) - (x_46_re / y_46_im);
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = ((y_46_re * x_46_im) - (y_46_im * x_46_re)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im)) tmp = 0 if y_46_im <= -2.5e+95: tmp = (1.0 / math.hypot(y_46_re, y_46_im)) * (x_46_re - ((y_46_re * x_46_im) / y_46_im)) elif y_46_im <= -3.8e-63: tmp = t_0 elif y_46_im <= 3.9e-82: tmp = (x_46_im / y_46_re) - (y_46_im * ((x_46_re / y_46_re) / y_46_re)) elif y_46_im <= 2e+118: tmp = t_0 else: tmp = (y_46_re / (1.0 / ((x_46_im / y_46_im) / y_46_im))) - (x_46_re / y_46_im) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(Float64(Float64(y_46_re * x_46_im) - Float64(y_46_im * x_46_re)) / Float64(Float64(y_46_re * y_46_re) + Float64(y_46_im * y_46_im))) tmp = 0.0 if (y_46_im <= -2.5e+95) tmp = Float64(Float64(1.0 / hypot(y_46_re, y_46_im)) * Float64(x_46_re - Float64(Float64(y_46_re * x_46_im) / y_46_im))); elseif (y_46_im <= -3.8e-63) tmp = t_0; elseif (y_46_im <= 3.9e-82) tmp = Float64(Float64(x_46_im / y_46_re) - Float64(y_46_im * Float64(Float64(x_46_re / y_46_re) / y_46_re))); elseif (y_46_im <= 2e+118) tmp = t_0; else tmp = Float64(Float64(y_46_re / Float64(1.0 / Float64(Float64(x_46_im / y_46_im) / y_46_im))) - Float64(x_46_re / y_46_im)); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = ((y_46_re * x_46_im) - (y_46_im * x_46_re)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im)); tmp = 0.0; if (y_46_im <= -2.5e+95) tmp = (1.0 / hypot(y_46_re, y_46_im)) * (x_46_re - ((y_46_re * x_46_im) / y_46_im)); elseif (y_46_im <= -3.8e-63) tmp = t_0; elseif (y_46_im <= 3.9e-82) tmp = (x_46_im / y_46_re) - (y_46_im * ((x_46_re / y_46_re) / y_46_re)); elseif (y_46_im <= 2e+118) tmp = t_0; else tmp = (y_46_re / (1.0 / ((x_46_im / y_46_im) / y_46_im))) - (x_46_re / y_46_im); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := 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$re * y$46$re), $MachinePrecision] + N[(y$46$im * y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -2.5e+95], N[(N[(1.0 / N[Sqrt[y$46$re ^ 2 + y$46$im ^ 2], $MachinePrecision]), $MachinePrecision] * N[(x$46$re - N[(N[(y$46$re * x$46$im), $MachinePrecision] / y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, -3.8e-63], t$95$0, If[LessEqual[y$46$im, 3.9e-82], N[(N[(x$46$im / y$46$re), $MachinePrecision] - N[(y$46$im * N[(N[(x$46$re / y$46$re), $MachinePrecision] / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 2e+118], t$95$0, N[(N[(y$46$re / N[(1.0 / N[(N[(x$46$im / y$46$im), $MachinePrecision] / y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x$46$re / y$46$im), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{y.re \cdot x.im - y.im \cdot x.re}{y.re \cdot y.re + y.im \cdot y.im}\\
\mathbf{if}\;y.im \leq -2.5 \cdot 10^{+95}:\\
\;\;\;\;\frac{1}{\mathsf{hypot}\left(y.re, y.im\right)} \cdot \left(x.re - \frac{y.re \cdot x.im}{y.im}\right)\\
\mathbf{elif}\;y.im \leq -3.8 \cdot 10^{-63}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y.im \leq 3.9 \cdot 10^{-82}:\\
\;\;\;\;\frac{x.im}{y.re} - y.im \cdot \frac{\frac{x.re}{y.re}}{y.re}\\
\mathbf{elif}\;y.im \leq 2 \cdot 10^{+118}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{y.re}{\frac{1}{\frac{\frac{x.im}{y.im}}{y.im}}} - \frac{x.re}{y.im}\\
\end{array}
\end{array}
if y.im < -2.50000000000000012e95Initial program 20.7%
*-un-lft-identity20.7%
add-sqr-sqrt20.7%
times-frac20.7%
hypot-def20.7%
hypot-def47.6%
Applied egg-rr47.6%
Taylor expanded in y.im around -inf 81.7%
associate-*r/81.7%
neg-mul-181.7%
distribute-rgt-neg-in81.7%
Simplified81.7%
if -2.50000000000000012e95 < y.im < -3.80000000000000017e-63 or 3.89999999999999973e-82 < y.im < 1.99999999999999993e118Initial program 77.4%
if -3.80000000000000017e-63 < y.im < 3.89999999999999973e-82Initial program 72.7%
Taylor expanded in y.re around inf 84.8%
+-commutative84.8%
mul-1-neg84.8%
unsub-neg84.8%
associate-/l*81.9%
associate-/r/80.0%
Simplified80.0%
*-un-lft-identity80.0%
pow280.0%
times-frac84.1%
Applied egg-rr84.1%
associate-*l/84.1%
*-lft-identity84.1%
Simplified84.1%
if 1.99999999999999993e118 < y.im Initial program 19.2%
Taylor expanded in y.re around 0 81.1%
+-commutative81.1%
mul-1-neg81.1%
unsub-neg81.1%
*-commutative81.1%
associate-/l*90.9%
Simplified90.9%
pow290.9%
add-sqr-sqrt35.9%
times-frac41.9%
Applied egg-rr41.9%
unpow241.9%
Simplified41.9%
unpow241.9%
clear-num41.9%
clear-num41.9%
frac-times41.9%
metadata-eval41.9%
Applied egg-rr41.9%
associate-*r/41.9%
associate-*l/41.9%
rem-square-sqrt96.9%
Simplified96.9%
Final simplification83.1%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0
(/ (- (* y.re x.im) (* y.im x.re)) (+ (* y.re y.re) (* y.im y.im)))))
(if (<= y.im -1.78e+109)
(* (- x.re (/ (* y.re x.im) y.im)) (/ -1.0 y.im))
(if (<= y.im -3.6e-61)
t_0
(if (<= y.im 3.5e-82)
(- (/ x.im y.re) (* y.im (/ (/ x.re y.re) y.re)))
(if (<= y.im 3.6e+118)
t_0
(- (/ y.re (/ 1.0 (/ (/ x.im y.im) y.im))) (/ x.re y.im))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = ((y_46_re * x_46_im) - (y_46_im * x_46_re)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im));
double tmp;
if (y_46_im <= -1.78e+109) {
tmp = (x_46_re - ((y_46_re * x_46_im) / y_46_im)) * (-1.0 / y_46_im);
} else if (y_46_im <= -3.6e-61) {
tmp = t_0;
} else if (y_46_im <= 3.5e-82) {
tmp = (x_46_im / y_46_re) - (y_46_im * ((x_46_re / y_46_re) / y_46_re));
} else if (y_46_im <= 3.6e+118) {
tmp = t_0;
} else {
tmp = (y_46_re / (1.0 / ((x_46_im / y_46_im) / y_46_im))) - (x_46_re / y_46_im);
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
real(8) :: tmp
t_0 = ((y_46re * x_46im) - (y_46im * x_46re)) / ((y_46re * y_46re) + (y_46im * y_46im))
if (y_46im <= (-1.78d+109)) then
tmp = (x_46re - ((y_46re * x_46im) / y_46im)) * ((-1.0d0) / y_46im)
else if (y_46im <= (-3.6d-61)) then
tmp = t_0
else if (y_46im <= 3.5d-82) then
tmp = (x_46im / y_46re) - (y_46im * ((x_46re / y_46re) / y_46re))
else if (y_46im <= 3.6d+118) then
tmp = t_0
else
tmp = (y_46re / (1.0d0 / ((x_46im / y_46im) / y_46im))) - (x_46re / y_46im)
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = ((y_46_re * x_46_im) - (y_46_im * x_46_re)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im));
double tmp;
if (y_46_im <= -1.78e+109) {
tmp = (x_46_re - ((y_46_re * x_46_im) / y_46_im)) * (-1.0 / y_46_im);
} else if (y_46_im <= -3.6e-61) {
tmp = t_0;
} else if (y_46_im <= 3.5e-82) {
tmp = (x_46_im / y_46_re) - (y_46_im * ((x_46_re / y_46_re) / y_46_re));
} else if (y_46_im <= 3.6e+118) {
tmp = t_0;
} else {
tmp = (y_46_re / (1.0 / ((x_46_im / y_46_im) / y_46_im))) - (x_46_re / y_46_im);
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = ((y_46_re * x_46_im) - (y_46_im * x_46_re)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im)) tmp = 0 if y_46_im <= -1.78e+109: tmp = (x_46_re - ((y_46_re * x_46_im) / y_46_im)) * (-1.0 / y_46_im) elif y_46_im <= -3.6e-61: tmp = t_0 elif y_46_im <= 3.5e-82: tmp = (x_46_im / y_46_re) - (y_46_im * ((x_46_re / y_46_re) / y_46_re)) elif y_46_im <= 3.6e+118: tmp = t_0 else: tmp = (y_46_re / (1.0 / ((x_46_im / y_46_im) / y_46_im))) - (x_46_re / y_46_im) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(Float64(Float64(y_46_re * x_46_im) - Float64(y_46_im * x_46_re)) / Float64(Float64(y_46_re * y_46_re) + Float64(y_46_im * y_46_im))) tmp = 0.0 if (y_46_im <= -1.78e+109) tmp = Float64(Float64(x_46_re - Float64(Float64(y_46_re * x_46_im) / y_46_im)) * Float64(-1.0 / y_46_im)); elseif (y_46_im <= -3.6e-61) tmp = t_0; elseif (y_46_im <= 3.5e-82) tmp = Float64(Float64(x_46_im / y_46_re) - Float64(y_46_im * Float64(Float64(x_46_re / y_46_re) / y_46_re))); elseif (y_46_im <= 3.6e+118) tmp = t_0; else tmp = Float64(Float64(y_46_re / Float64(1.0 / Float64(Float64(x_46_im / y_46_im) / y_46_im))) - Float64(x_46_re / y_46_im)); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = ((y_46_re * x_46_im) - (y_46_im * x_46_re)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im)); tmp = 0.0; if (y_46_im <= -1.78e+109) tmp = (x_46_re - ((y_46_re * x_46_im) / y_46_im)) * (-1.0 / y_46_im); elseif (y_46_im <= -3.6e-61) tmp = t_0; elseif (y_46_im <= 3.5e-82) tmp = (x_46_im / y_46_re) - (y_46_im * ((x_46_re / y_46_re) / y_46_re)); elseif (y_46_im <= 3.6e+118) tmp = t_0; else tmp = (y_46_re / (1.0 / ((x_46_im / y_46_im) / y_46_im))) - (x_46_re / y_46_im); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := 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$re * y$46$re), $MachinePrecision] + N[(y$46$im * y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -1.78e+109], N[(N[(x$46$re - N[(N[(y$46$re * x$46$im), $MachinePrecision] / y$46$im), $MachinePrecision]), $MachinePrecision] * N[(-1.0 / y$46$im), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, -3.6e-61], t$95$0, If[LessEqual[y$46$im, 3.5e-82], N[(N[(x$46$im / y$46$re), $MachinePrecision] - N[(y$46$im * N[(N[(x$46$re / y$46$re), $MachinePrecision] / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 3.6e+118], t$95$0, N[(N[(y$46$re / N[(1.0 / N[(N[(x$46$im / y$46$im), $MachinePrecision] / y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x$46$re / y$46$im), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{y.re \cdot x.im - y.im \cdot x.re}{y.re \cdot y.re + y.im \cdot y.im}\\
\mathbf{if}\;y.im \leq -1.78 \cdot 10^{+109}:\\
\;\;\;\;\left(x.re - \frac{y.re \cdot x.im}{y.im}\right) \cdot \frac{-1}{y.im}\\
\mathbf{elif}\;y.im \leq -3.6 \cdot 10^{-61}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y.im \leq 3.5 \cdot 10^{-82}:\\
\;\;\;\;\frac{x.im}{y.re} - y.im \cdot \frac{\frac{x.re}{y.re}}{y.re}\\
\mathbf{elif}\;y.im \leq 3.6 \cdot 10^{+118}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{y.re}{\frac{1}{\frac{\frac{x.im}{y.im}}{y.im}}} - \frac{x.re}{y.im}\\
\end{array}
\end{array}
if y.im < -1.7800000000000001e109Initial program 21.3%
*-un-lft-identity21.3%
add-sqr-sqrt21.3%
times-frac21.3%
hypot-def21.3%
hypot-def47.4%
Applied egg-rr47.4%
Taylor expanded in y.im around -inf 84.7%
associate-*r/84.7%
neg-mul-184.7%
distribute-rgt-neg-in84.7%
Simplified84.7%
Taylor expanded in y.im around -inf 84.6%
if -1.7800000000000001e109 < y.im < -3.60000000000000014e-61 or 3.4999999999999999e-82 < y.im < 3.6e118Initial program 75.6%
if -3.60000000000000014e-61 < y.im < 3.4999999999999999e-82Initial program 72.7%
Taylor expanded in y.re around inf 84.8%
+-commutative84.8%
mul-1-neg84.8%
unsub-neg84.8%
associate-/l*81.9%
associate-/r/80.0%
Simplified80.0%
*-un-lft-identity80.0%
pow280.0%
times-frac84.1%
Applied egg-rr84.1%
associate-*l/84.1%
*-lft-identity84.1%
Simplified84.1%
if 3.6e118 < y.im Initial program 19.2%
Taylor expanded in y.re around 0 81.1%
+-commutative81.1%
mul-1-neg81.1%
unsub-neg81.1%
*-commutative81.1%
associate-/l*90.9%
Simplified90.9%
pow290.9%
add-sqr-sqrt35.9%
times-frac41.9%
Applied egg-rr41.9%
unpow241.9%
Simplified41.9%
unpow241.9%
clear-num41.9%
clear-num41.9%
frac-times41.9%
metadata-eval41.9%
Applied egg-rr41.9%
associate-*r/41.9%
associate-*l/41.9%
rem-square-sqrt96.9%
Simplified96.9%
Final simplification83.1%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (/ (- x.re) y.im)))
(if (<= y.im -7.6e+128)
t_0
(if (<= y.im -115.0)
(/ x.im y.re)
(if (<= y.im -5.8e-58)
t_0
(if (<= y.im 4.6e+15)
(/ x.im y.re)
(if (<= y.im 4.5e+48)
(/ (* x.im (/ y.re y.im)) y.im)
(if (<= y.im 8.2e+99) (/ x.im y.re) t_0))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = -x_46_re / y_46_im;
double tmp;
if (y_46_im <= -7.6e+128) {
tmp = t_0;
} else if (y_46_im <= -115.0) {
tmp = x_46_im / y_46_re;
} else if (y_46_im <= -5.8e-58) {
tmp = t_0;
} else if (y_46_im <= 4.6e+15) {
tmp = x_46_im / y_46_re;
} else if (y_46_im <= 4.5e+48) {
tmp = (x_46_im * (y_46_re / y_46_im)) / y_46_im;
} else if (y_46_im <= 8.2e+99) {
tmp = x_46_im / y_46_re;
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: t_0
real(8) :: tmp
t_0 = -x_46re / y_46im
if (y_46im <= (-7.6d+128)) then
tmp = t_0
else if (y_46im <= (-115.0d0)) then
tmp = x_46im / y_46re
else if (y_46im <= (-5.8d-58)) then
tmp = t_0
else if (y_46im <= 4.6d+15) then
tmp = x_46im / y_46re
else if (y_46im <= 4.5d+48) then
tmp = (x_46im * (y_46re / y_46im)) / y_46im
else if (y_46im <= 8.2d+99) then
tmp = x_46im / y_46re
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = -x_46_re / y_46_im;
double tmp;
if (y_46_im <= -7.6e+128) {
tmp = t_0;
} else if (y_46_im <= -115.0) {
tmp = x_46_im / y_46_re;
} else if (y_46_im <= -5.8e-58) {
tmp = t_0;
} else if (y_46_im <= 4.6e+15) {
tmp = x_46_im / y_46_re;
} else if (y_46_im <= 4.5e+48) {
tmp = (x_46_im * (y_46_re / y_46_im)) / y_46_im;
} else if (y_46_im <= 8.2e+99) {
tmp = x_46_im / y_46_re;
} else {
tmp = t_0;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = -x_46_re / y_46_im tmp = 0 if y_46_im <= -7.6e+128: tmp = t_0 elif y_46_im <= -115.0: tmp = x_46_im / y_46_re elif y_46_im <= -5.8e-58: tmp = t_0 elif y_46_im <= 4.6e+15: tmp = x_46_im / y_46_re elif y_46_im <= 4.5e+48: tmp = (x_46_im * (y_46_re / y_46_im)) / y_46_im elif y_46_im <= 8.2e+99: tmp = x_46_im / y_46_re else: tmp = t_0 return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(Float64(-x_46_re) / y_46_im) tmp = 0.0 if (y_46_im <= -7.6e+128) tmp = t_0; elseif (y_46_im <= -115.0) tmp = Float64(x_46_im / y_46_re); elseif (y_46_im <= -5.8e-58) tmp = t_0; elseif (y_46_im <= 4.6e+15) tmp = Float64(x_46_im / y_46_re); elseif (y_46_im <= 4.5e+48) tmp = Float64(Float64(x_46_im * Float64(y_46_re / y_46_im)) / y_46_im); elseif (y_46_im <= 8.2e+99) tmp = Float64(x_46_im / y_46_re); else tmp = t_0; end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = -x_46_re / y_46_im; tmp = 0.0; if (y_46_im <= -7.6e+128) tmp = t_0; elseif (y_46_im <= -115.0) tmp = x_46_im / y_46_re; elseif (y_46_im <= -5.8e-58) tmp = t_0; elseif (y_46_im <= 4.6e+15) tmp = x_46_im / y_46_re; elseif (y_46_im <= 4.5e+48) tmp = (x_46_im * (y_46_re / y_46_im)) / y_46_im; elseif (y_46_im <= 8.2e+99) tmp = x_46_im / y_46_re; else tmp = t_0; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[((-x$46$re) / y$46$im), $MachinePrecision]}, If[LessEqual[y$46$im, -7.6e+128], t$95$0, If[LessEqual[y$46$im, -115.0], N[(x$46$im / y$46$re), $MachinePrecision], If[LessEqual[y$46$im, -5.8e-58], t$95$0, If[LessEqual[y$46$im, 4.6e+15], N[(x$46$im / y$46$re), $MachinePrecision], If[LessEqual[y$46$im, 4.5e+48], N[(N[(x$46$im * N[(y$46$re / y$46$im), $MachinePrecision]), $MachinePrecision] / y$46$im), $MachinePrecision], If[LessEqual[y$46$im, 8.2e+99], N[(x$46$im / y$46$re), $MachinePrecision], t$95$0]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-x.re}{y.im}\\
\mathbf{if}\;y.im \leq -7.6 \cdot 10^{+128}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y.im \leq -115:\\
\;\;\;\;\frac{x.im}{y.re}\\
\mathbf{elif}\;y.im \leq -5.8 \cdot 10^{-58}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y.im \leq 4.6 \cdot 10^{+15}:\\
\;\;\;\;\frac{x.im}{y.re}\\
\mathbf{elif}\;y.im \leq 4.5 \cdot 10^{+48}:\\
\;\;\;\;\frac{x.im \cdot \frac{y.re}{y.im}}{y.im}\\
\mathbf{elif}\;y.im \leq 8.2 \cdot 10^{+99}:\\
\;\;\;\;\frac{x.im}{y.re}\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if y.im < -7.5999999999999998e128 or -115 < y.im < -5.7999999999999998e-58 or 8.19999999999999959e99 < y.im Initial program 31.7%
Taylor expanded in y.re around 0 81.9%
associate-*r/81.9%
neg-mul-181.9%
Simplified81.9%
if -7.5999999999999998e128 < y.im < -115 or -5.7999999999999998e-58 < y.im < 4.6e15 or 4.49999999999999995e48 < y.im < 8.19999999999999959e99Initial program 71.8%
Taylor expanded in y.re around inf 61.7%
if 4.6e15 < y.im < 4.49999999999999995e48Initial program 68.5%
Taylor expanded in x.im around inf 57.5%
*-commutative57.5%
Simplified57.5%
Taylor expanded in y.re around 0 56.2%
*-commutative56.2%
associate-*l/45.4%
*-commutative45.4%
Simplified45.4%
*-un-lft-identity45.4%
unpow245.4%
times-frac45.4%
Applied egg-rr45.4%
associate-*l/45.5%
*-lft-identity45.5%
Simplified45.5%
associate-*r/54.7%
Applied egg-rr54.7%
Final simplification68.8%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (or (<= y.im -7.6e+128) (not (<= y.im 8.5e+99))) (/ (- x.re) y.im) (- (/ x.im y.re) (* y.im (/ (/ x.re y.re) y.re)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_im <= -7.6e+128) || !(y_46_im <= 8.5e+99)) {
tmp = -x_46_re / y_46_im;
} else {
tmp = (x_46_im / y_46_re) - (y_46_im * ((x_46_re / y_46_re) / y_46_re));
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: tmp
if ((y_46im <= (-7.6d+128)) .or. (.not. (y_46im <= 8.5d+99))) then
tmp = -x_46re / y_46im
else
tmp = (x_46im / y_46re) - (y_46im * ((x_46re / y_46re) / y_46re))
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_im <= -7.6e+128) || !(y_46_im <= 8.5e+99)) {
tmp = -x_46_re / y_46_im;
} else {
tmp = (x_46_im / y_46_re) - (y_46_im * ((x_46_re / y_46_re) / y_46_re));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if (y_46_im <= -7.6e+128) or not (y_46_im <= 8.5e+99): tmp = -x_46_re / y_46_im else: tmp = (x_46_im / y_46_re) - (y_46_im * ((x_46_re / y_46_re) / y_46_re)) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if ((y_46_im <= -7.6e+128) || !(y_46_im <= 8.5e+99)) tmp = Float64(Float64(-x_46_re) / y_46_im); else tmp = Float64(Float64(x_46_im / y_46_re) - Float64(y_46_im * Float64(Float64(x_46_re / y_46_re) / y_46_re))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if ((y_46_im <= -7.6e+128) || ~((y_46_im <= 8.5e+99))) tmp = -x_46_re / y_46_im; else tmp = (x_46_im / y_46_re) - (y_46_im * ((x_46_re / y_46_re) / y_46_re)); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[Or[LessEqual[y$46$im, -7.6e+128], N[Not[LessEqual[y$46$im, 8.5e+99]], $MachinePrecision]], N[((-x$46$re) / y$46$im), $MachinePrecision], N[(N[(x$46$im / y$46$re), $MachinePrecision] - N[(y$46$im * N[(N[(x$46$re / y$46$re), $MachinePrecision] / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.im \leq -7.6 \cdot 10^{+128} \lor \neg \left(y.im \leq 8.5 \cdot 10^{+99}\right):\\
\;\;\;\;\frac{-x.re}{y.im}\\
\mathbf{else}:\\
\;\;\;\;\frac{x.im}{y.re} - y.im \cdot \frac{\frac{x.re}{y.re}}{y.re}\\
\end{array}
\end{array}
if y.im < -7.5999999999999998e128 or 8.49999999999999984e99 < y.im Initial program 24.8%
Taylor expanded in y.re around 0 84.3%
associate-*r/84.3%
neg-mul-184.3%
Simplified84.3%
if -7.5999999999999998e128 < y.im < 8.49999999999999984e99Initial program 72.6%
Taylor expanded in y.re around inf 66.3%
+-commutative66.3%
mul-1-neg66.3%
unsub-neg66.3%
associate-/l*65.2%
associate-/r/63.7%
Simplified63.7%
*-un-lft-identity63.7%
pow263.7%
times-frac67.6%
Applied egg-rr67.6%
associate-*l/67.5%
*-lft-identity67.5%
Simplified67.5%
Final simplification73.0%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (or (<= y.im -1.2e+32) (not (<= y.im 8.5e-35))) (- (/ y.re (/ y.im (/ x.im y.im))) (/ x.re y.im)) (- (/ x.im y.re) (* y.im (/ (/ x.re y.re) y.re)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_im <= -1.2e+32) || !(y_46_im <= 8.5e-35)) {
tmp = (y_46_re / (y_46_im / (x_46_im / y_46_im))) - (x_46_re / y_46_im);
} else {
tmp = (x_46_im / y_46_re) - (y_46_im * ((x_46_re / y_46_re) / y_46_re));
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: tmp
if ((y_46im <= (-1.2d+32)) .or. (.not. (y_46im <= 8.5d-35))) then
tmp = (y_46re / (y_46im / (x_46im / y_46im))) - (x_46re / y_46im)
else
tmp = (x_46im / y_46re) - (y_46im * ((x_46re / y_46re) / y_46re))
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if ((y_46_im <= -1.2e+32) || !(y_46_im <= 8.5e-35)) {
tmp = (y_46_re / (y_46_im / (x_46_im / y_46_im))) - (x_46_re / y_46_im);
} else {
tmp = (x_46_im / y_46_re) - (y_46_im * ((x_46_re / y_46_re) / y_46_re));
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if (y_46_im <= -1.2e+32) or not (y_46_im <= 8.5e-35): tmp = (y_46_re / (y_46_im / (x_46_im / y_46_im))) - (x_46_re / y_46_im) else: tmp = (x_46_im / y_46_re) - (y_46_im * ((x_46_re / y_46_re) / y_46_re)) return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if ((y_46_im <= -1.2e+32) || !(y_46_im <= 8.5e-35)) tmp = Float64(Float64(y_46_re / Float64(y_46_im / Float64(x_46_im / y_46_im))) - Float64(x_46_re / y_46_im)); else tmp = Float64(Float64(x_46_im / y_46_re) - Float64(y_46_im * Float64(Float64(x_46_re / y_46_re) / y_46_re))); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if ((y_46_im <= -1.2e+32) || ~((y_46_im <= 8.5e-35))) tmp = (y_46_re / (y_46_im / (x_46_im / y_46_im))) - (x_46_re / y_46_im); else tmp = (x_46_im / y_46_re) - (y_46_im * ((x_46_re / y_46_re) / y_46_re)); end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[Or[LessEqual[y$46$im, -1.2e+32], N[Not[LessEqual[y$46$im, 8.5e-35]], $MachinePrecision]], N[(N[(y$46$re / N[(y$46$im / N[(x$46$im / y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x$46$re / y$46$im), $MachinePrecision]), $MachinePrecision], N[(N[(x$46$im / y$46$re), $MachinePrecision] - N[(y$46$im * N[(N[(x$46$re / y$46$re), $MachinePrecision] / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.im \leq -1.2 \cdot 10^{+32} \lor \neg \left(y.im \leq 8.5 \cdot 10^{-35}\right):\\
\;\;\;\;\frac{y.re}{\frac{y.im}{\frac{x.im}{y.im}}} - \frac{x.re}{y.im}\\
\mathbf{else}:\\
\;\;\;\;\frac{x.im}{y.re} - y.im \cdot \frac{\frac{x.re}{y.re}}{y.re}\\
\end{array}
\end{array}
if y.im < -1.19999999999999996e32 or 8.5000000000000001e-35 < y.im Initial program 41.6%
Taylor expanded in y.re around 0 70.9%
+-commutative70.9%
mul-1-neg70.9%
unsub-neg70.9%
*-commutative70.9%
associate-/l*72.8%
Simplified72.8%
pow272.8%
add-sqr-sqrt36.9%
times-frac39.0%
Applied egg-rr39.0%
unpow239.0%
Simplified39.0%
unpow239.0%
clear-num39.0%
frac-times39.0%
*-un-lft-identity39.0%
Applied egg-rr39.0%
associate-*l/39.0%
rem-square-sqrt76.2%
Simplified76.2%
if -1.19999999999999996e32 < y.im < 8.5000000000000001e-35Initial program 74.4%
Taylor expanded in y.re around inf 77.7%
+-commutative77.7%
mul-1-neg77.7%
unsub-neg77.7%
associate-/l*75.5%
associate-/r/74.0%
Simplified74.0%
*-un-lft-identity74.0%
pow274.0%
times-frac77.2%
Applied egg-rr77.2%
associate-*l/77.2%
*-lft-identity77.2%
Simplified77.2%
Final simplification76.7%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (or (<= y.re -820000000.0) (not (<= y.re 96000.0))) (- (/ x.im y.re) (* y.im (/ (/ x.re y.re) y.re))) (* (- x.re (/ (* y.re x.im) y.im)) (/ -1.0 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 <= -820000000.0) || !(y_46_re <= 96000.0)) {
tmp = (x_46_im / y_46_re) - (y_46_im * ((x_46_re / y_46_re) / y_46_re));
} else {
tmp = (x_46_re - ((y_46_re * x_46_im) / y_46_im)) * (-1.0 / 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 <= (-820000000.0d0)) .or. (.not. (y_46re <= 96000.0d0))) then
tmp = (x_46im / y_46re) - (y_46im * ((x_46re / y_46re) / y_46re))
else
tmp = (x_46re - ((y_46re * x_46im) / y_46im)) * ((-1.0d0) / 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 <= -820000000.0) || !(y_46_re <= 96000.0)) {
tmp = (x_46_im / y_46_re) - (y_46_im * ((x_46_re / y_46_re) / y_46_re));
} else {
tmp = (x_46_re - ((y_46_re * x_46_im) / y_46_im)) * (-1.0 / 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 <= -820000000.0) or not (y_46_re <= 96000.0): tmp = (x_46_im / y_46_re) - (y_46_im * ((x_46_re / y_46_re) / y_46_re)) else: tmp = (x_46_re - ((y_46_re * x_46_im) / y_46_im)) * (-1.0 / 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 <= -820000000.0) || !(y_46_re <= 96000.0)) tmp = Float64(Float64(x_46_im / y_46_re) - Float64(y_46_im * Float64(Float64(x_46_re / y_46_re) / y_46_re))); else tmp = Float64(Float64(x_46_re - Float64(Float64(y_46_re * x_46_im) / y_46_im)) * Float64(-1.0 / 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 <= -820000000.0) || ~((y_46_re <= 96000.0))) tmp = (x_46_im / y_46_re) - (y_46_im * ((x_46_re / y_46_re) / y_46_re)); else tmp = (x_46_re - ((y_46_re * x_46_im) / y_46_im)) * (-1.0 / 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, -820000000.0], N[Not[LessEqual[y$46$re, 96000.0]], $MachinePrecision]], N[(N[(x$46$im / y$46$re), $MachinePrecision] - N[(y$46$im * N[(N[(x$46$re / y$46$re), $MachinePrecision] / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x$46$re - N[(N[(y$46$re * x$46$im), $MachinePrecision] / y$46$im), $MachinePrecision]), $MachinePrecision] * N[(-1.0 / y$46$im), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq -820000000 \lor \neg \left(y.re \leq 96000\right):\\
\;\;\;\;\frac{x.im}{y.re} - y.im \cdot \frac{\frac{x.re}{y.re}}{y.re}\\
\mathbf{else}:\\
\;\;\;\;\left(x.re - \frac{y.re \cdot x.im}{y.im}\right) \cdot \frac{-1}{y.im}\\
\end{array}
\end{array}
if y.re < -8.2e8 or 96000 < y.re Initial program 43.0%
Taylor expanded in y.re around inf 68.8%
+-commutative68.8%
mul-1-neg68.8%
unsub-neg68.8%
associate-/l*68.4%
associate-/r/70.1%
Simplified70.1%
*-un-lft-identity70.1%
pow270.1%
times-frac73.3%
Applied egg-rr73.3%
associate-*l/73.3%
*-lft-identity73.3%
Simplified73.3%
if -8.2e8 < y.re < 96000Initial program 69.8%
*-un-lft-identity69.8%
add-sqr-sqrt69.8%
times-frac69.7%
hypot-def69.7%
hypot-def82.4%
Applied egg-rr82.4%
Taylor expanded in y.im around -inf 43.8%
associate-*r/43.8%
neg-mul-143.8%
distribute-rgt-neg-in43.8%
Simplified43.8%
Taylor expanded in y.im around -inf 79.9%
Final simplification76.7%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (or (<= y.im -7.6e+128)
(not
(or (<= y.im -900.0)
(and (not (<= y.im -5.5e-56)) (<= y.im 1.75e+100)))))
(/ (- 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 <= -7.6e+128) || !((y_46_im <= -900.0) || (!(y_46_im <= -5.5e-56) && (y_46_im <= 1.75e+100)))) {
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 <= (-7.6d+128)) .or. (.not. (y_46im <= (-900.0d0)) .or. (.not. (y_46im <= (-5.5d-56))) .and. (y_46im <= 1.75d+100))) 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 <= -7.6e+128) || !((y_46_im <= -900.0) || (!(y_46_im <= -5.5e-56) && (y_46_im <= 1.75e+100)))) {
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 <= -7.6e+128) or not ((y_46_im <= -900.0) or (not (y_46_im <= -5.5e-56) and (y_46_im <= 1.75e+100))): 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 <= -7.6e+128) || !((y_46_im <= -900.0) || (!(y_46_im <= -5.5e-56) && (y_46_im <= 1.75e+100)))) tmp = Float64(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 <= -7.6e+128) || ~(((y_46_im <= -900.0) || (~((y_46_im <= -5.5e-56)) && (y_46_im <= 1.75e+100))))) tmp = -x_46_re / y_46_im; else tmp = x_46_im / y_46_re; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[Or[LessEqual[y$46$im, -7.6e+128], N[Not[Or[LessEqual[y$46$im, -900.0], And[N[Not[LessEqual[y$46$im, -5.5e-56]], $MachinePrecision], LessEqual[y$46$im, 1.75e+100]]]], $MachinePrecision]], N[((-x$46$re) / y$46$im), $MachinePrecision], N[(x$46$im / y$46$re), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.im \leq -7.6 \cdot 10^{+128} \lor \neg \left(y.im \leq -900 \lor \neg \left(y.im \leq -5.5 \cdot 10^{-56}\right) \land y.im \leq 1.75 \cdot 10^{+100}\right):\\
\;\;\;\;\frac{-x.re}{y.im}\\
\mathbf{else}:\\
\;\;\;\;\frac{x.im}{y.re}\\
\end{array}
\end{array}
if y.im < -7.5999999999999998e128 or -900 < y.im < -5.4999999999999999e-56 or 1.74999999999999988e100 < y.im Initial program 31.7%
Taylor expanded in y.re around 0 81.9%
associate-*r/81.9%
neg-mul-181.9%
Simplified81.9%
if -7.5999999999999998e128 < y.im < -900 or -5.4999999999999999e-56 < y.im < 1.74999999999999988e100Initial program 71.6%
Taylor expanded in y.re around inf 58.5%
Final simplification67.0%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (<= y.im -2.4e+150) (/ 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 <= -2.4e+150) {
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 <= (-2.4d+150)) 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 <= -2.4e+150) {
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 <= -2.4e+150: 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 <= -2.4e+150) 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 <= -2.4e+150) 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, -2.4e+150], 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 -2.4 \cdot 10^{+150}:\\
\;\;\;\;\frac{x.re}{y.im}\\
\mathbf{else}:\\
\;\;\;\;\frac{x.im}{y.re}\\
\end{array}
\end{array}
if y.im < -2.40000000000000003e150Initial program 21.8%
*-un-lft-identity21.8%
add-sqr-sqrt21.8%
times-frac21.8%
hypot-def21.8%
hypot-def46.6%
Applied egg-rr46.6%
Taylor expanded in y.im around -inf 93.0%
associate-*r/93.0%
neg-mul-193.0%
distribute-rgt-neg-in93.0%
Simplified93.0%
Taylor expanded in y.re around 0 22.8%
if -2.40000000000000003e150 < y.im Initial program 64.0%
Taylor expanded in y.re around inf 47.3%
Final simplification43.3%
(FPCore (x.re x.im y.re y.im) :precision binary64 (/ x.im y.im))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return x_46_im / y_46_im;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
code = x_46im / y_46im
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return x_46_im / y_46_im;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): return x_46_im / y_46_im
function code(x_46_re, x_46_im, y_46_re, y_46_im) return Float64(x_46_im / y_46_im) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = x_46_im / y_46_im; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[(x$46$im / y$46$im), $MachinePrecision]
\begin{array}{l}
\\
\frac{x.im}{y.im}
\end{array}
Initial program 57.1%
*-un-lft-identity57.1%
add-sqr-sqrt57.1%
times-frac57.1%
hypot-def57.1%
hypot-def72.8%
Applied egg-rr72.8%
Taylor expanded in y.im around -inf 32.0%
associate-*r/32.0%
neg-mul-132.0%
distribute-rgt-neg-in32.0%
Simplified32.0%
Taylor expanded in y.re around -inf 7.9%
Final simplification7.9%
(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 57.1%
Taylor expanded in y.re around inf 41.1%
Final simplification41.1%
herbie shell --seed 2023333
(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))))