
(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 10 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x.re x.im y.re y.im) :precision binary64 (/ (- (* x.im y.re) (* x.re y.im)) (+ (* y.re y.re) (* y.im y.im))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return ((x_46_im * y_46_re) - (x_46_re * y_46_im)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im));
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
code = ((x_46im * y_46re) - (x_46re * y_46im)) / ((y_46re * y_46re) + (y_46im * y_46im))
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return ((x_46_im * y_46_re) - (x_46_re * y_46_im)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im));
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): return ((x_46_im * y_46_re) - (x_46_re * y_46_im)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im))
function code(x_46_re, x_46_im, y_46_re, y_46_im) return Float64(Float64(Float64(x_46_im * y_46_re) - Float64(x_46_re * y_46_im)) / Float64(Float64(y_46_re * y_46_re) + Float64(y_46_im * y_46_im))) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = ((x_46_im * y_46_re) - (x_46_re * y_46_im)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im)); end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[(N[(N[(x$46$im * y$46$re), $MachinePrecision] - N[(x$46$re * y$46$im), $MachinePrecision]), $MachinePrecision] / N[(N[(y$46$re * y$46$re), $MachinePrecision] + N[(y$46$im * y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x.im \cdot y.re - x.re \cdot y.im}{y.re \cdot y.re + y.im \cdot y.im}
\end{array}
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (<= y.im -4e+43)
(/ (- (* y.re (/ x.im y.im)) x.re) y.im)
(if (<= y.im -3.8e-132)
(/ (fma x.im y.re (* y.im (- x.re))) (fma y.im y.im (* y.re y.re)))
(if (<= y.im 1.16e-157)
(/ (- x.im (/ (* y.im x.re) y.re)) y.re)
(if (<= y.im 1.8e+91)
(/ (- (* y.re x.im) (* y.im x.re)) (+ (* y.re y.re) (* y.im y.im)))
(/ (- (/ 1.0 (/ (/ y.im 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_im <= -4e+43) {
tmp = ((y_46_re * (x_46_im / y_46_im)) - x_46_re) / y_46_im;
} else if (y_46_im <= -3.8e-132) {
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 if (y_46_im <= 1.16e-157) {
tmp = (x_46_im - ((y_46_im * x_46_re) / y_46_re)) / y_46_re;
} else if (y_46_im <= 1.8e+91) {
tmp = ((y_46_re * x_46_im) - (y_46_im * x_46_re)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im));
} else {
tmp = ((1.0 / ((y_46_im / x_46_im) / y_46_re)) - 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 <= -4e+43) 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.8e-132) 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))); elseif (y_46_im <= 1.16e-157) tmp = Float64(Float64(x_46_im - Float64(Float64(y_46_im * x_46_re) / y_46_re)) / y_46_re); elseif (y_46_im <= 1.8e+91) tmp = 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))); else tmp = Float64(Float64(Float64(1.0 / Float64(Float64(y_46_im / x_46_im) / y_46_re)) - 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, -4e+43], 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.8e-132], 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], If[LessEqual[y$46$im, 1.16e-157], 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, 1.8e+91], 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], N[(N[(N[(1.0 / N[(N[(y$46$im / x$46$im), $MachinePrecision] / y$46$re), $MachinePrecision]), $MachinePrecision] - x$46$re), $MachinePrecision] / y$46$im), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.im \leq -4 \cdot 10^{+43}:\\
\;\;\;\;\frac{y.re \cdot \frac{x.im}{y.im} - x.re}{y.im}\\
\mathbf{elif}\;y.im \leq -3.8 \cdot 10^{-132}:\\
\;\;\;\;\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{elif}\;y.im \leq 1.16 \cdot 10^{-157}:\\
\;\;\;\;\frac{x.im - \frac{y.im \cdot x.re}{y.re}}{y.re}\\
\mathbf{elif}\;y.im \leq 1.8 \cdot 10^{+91}:\\
\;\;\;\;\frac{y.re \cdot x.im - y.im \cdot x.re}{y.re \cdot y.re + y.im \cdot y.im}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{1}{\frac{\frac{y.im}{x.im}}{y.re}} - x.re}{y.im}\\
\end{array}
\end{array}
if y.im < -4.00000000000000006e43Initial program 57.1%
fma-neg57.1%
distribute-rgt-neg-out57.1%
+-commutative57.1%
fma-define57.1%
Simplified57.1%
Taylor expanded in y.re around 0 89.9%
+-commutative89.9%
mul-1-neg89.9%
unsub-neg89.9%
unpow289.9%
associate-/r*89.0%
div-sub89.0%
*-commutative89.0%
associate-/l*94.8%
Simplified94.8%
if -4.00000000000000006e43 < y.im < -3.7999999999999997e-132Initial program 84.7%
fma-neg84.7%
distribute-rgt-neg-out84.7%
+-commutative84.7%
fma-define84.7%
Simplified84.7%
if -3.7999999999999997e-132 < y.im < 1.15999999999999992e-157Initial program 61.8%
fma-neg61.8%
distribute-rgt-neg-out61.8%
+-commutative61.8%
fma-define61.8%
Simplified61.8%
Taylor expanded in y.re around inf 90.6%
mul-1-neg90.6%
unsub-neg90.6%
*-commutative90.6%
associate-/l*89.6%
Simplified89.6%
associate-*r/90.6%
Applied egg-rr90.6%
if 1.15999999999999992e-157 < y.im < 1.8e91Initial program 79.8%
if 1.8e91 < y.im Initial program 39.3%
fma-neg39.3%
distribute-rgt-neg-out39.3%
+-commutative39.3%
fma-define39.3%
Simplified39.3%
Taylor expanded in y.im around inf 77.6%
clear-num77.6%
inv-pow77.6%
Applied egg-rr77.6%
unpow-177.6%
associate-/r*77.8%
Simplified77.8%
Final simplification86.4%
(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.9e+43)
(/ (- (* y.re (/ x.im y.im)) x.re) y.im)
(if (<= y.im -9.8e-131)
t_0
(if (<= y.im 1.05e-157)
(/ (- x.im (/ (* y.im x.re) y.re)) y.re)
(if (<= y.im 2.5e+91)
t_0
(/ (- (/ 1.0 (/ (/ y.im 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 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.9e+43) {
tmp = ((y_46_re * (x_46_im / y_46_im)) - x_46_re) / y_46_im;
} else if (y_46_im <= -9.8e-131) {
tmp = t_0;
} else if (y_46_im <= 1.05e-157) {
tmp = (x_46_im - ((y_46_im * x_46_re) / y_46_re)) / y_46_re;
} else if (y_46_im <= 2.5e+91) {
tmp = t_0;
} else {
tmp = ((1.0 / ((y_46_im / x_46_im) / y_46_re)) - 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 <= (-2.9d+43)) then
tmp = ((y_46re * (x_46im / y_46im)) - x_46re) / y_46im
else if (y_46im <= (-9.8d-131)) then
tmp = t_0
else if (y_46im <= 1.05d-157) then
tmp = (x_46im - ((y_46im * x_46re) / y_46re)) / y_46re
else if (y_46im <= 2.5d+91) then
tmp = t_0
else
tmp = ((1.0d0 / ((y_46im / x_46im) / y_46re)) - 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 <= -2.9e+43) {
tmp = ((y_46_re * (x_46_im / y_46_im)) - x_46_re) / y_46_im;
} else if (y_46_im <= -9.8e-131) {
tmp = t_0;
} else if (y_46_im <= 1.05e-157) {
tmp = (x_46_im - ((y_46_im * x_46_re) / y_46_re)) / y_46_re;
} else if (y_46_im <= 2.5e+91) {
tmp = t_0;
} else {
tmp = ((1.0 / ((y_46_im / x_46_im) / y_46_re)) - 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.9e+43: tmp = ((y_46_re * (x_46_im / y_46_im)) - x_46_re) / y_46_im elif y_46_im <= -9.8e-131: tmp = t_0 elif y_46_im <= 1.05e-157: tmp = (x_46_im - ((y_46_im * x_46_re) / y_46_re)) / y_46_re elif y_46_im <= 2.5e+91: tmp = t_0 else: tmp = ((1.0 / ((y_46_im / x_46_im) / y_46_re)) - 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.9e+43) tmp = Float64(Float64(Float64(y_46_re * Float64(x_46_im / y_46_im)) - x_46_re) / y_46_im); elseif (y_46_im <= -9.8e-131) tmp = t_0; elseif (y_46_im <= 1.05e-157) 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.5e+91) tmp = t_0; else tmp = Float64(Float64(Float64(1.0 / Float64(Float64(y_46_im / x_46_im) / y_46_re)) - 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.9e+43) tmp = ((y_46_re * (x_46_im / y_46_im)) - x_46_re) / y_46_im; elseif (y_46_im <= -9.8e-131) tmp = t_0; elseif (y_46_im <= 1.05e-157) tmp = (x_46_im - ((y_46_im * x_46_re) / y_46_re)) / y_46_re; elseif (y_46_im <= 2.5e+91) tmp = t_0; else tmp = ((1.0 / ((y_46_im / x_46_im) / y_46_re)) - 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.9e+43], 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, -9.8e-131], t$95$0, If[LessEqual[y$46$im, 1.05e-157], 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.5e+91], t$95$0, N[(N[(N[(1.0 / N[(N[(y$46$im / x$46$im), $MachinePrecision] / y$46$re), $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.re \cdot y.re + y.im \cdot y.im}\\
\mathbf{if}\;y.im \leq -2.9 \cdot 10^{+43}:\\
\;\;\;\;\frac{y.re \cdot \frac{x.im}{y.im} - x.re}{y.im}\\
\mathbf{elif}\;y.im \leq -9.8 \cdot 10^{-131}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y.im \leq 1.05 \cdot 10^{-157}:\\
\;\;\;\;\frac{x.im - \frac{y.im \cdot x.re}{y.re}}{y.re}\\
\mathbf{elif}\;y.im \leq 2.5 \cdot 10^{+91}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{1}{\frac{\frac{y.im}{x.im}}{y.re}} - x.re}{y.im}\\
\end{array}
\end{array}
if y.im < -2.9000000000000002e43Initial program 57.1%
fma-neg57.1%
distribute-rgt-neg-out57.1%
+-commutative57.1%
fma-define57.1%
Simplified57.1%
Taylor expanded in y.re around 0 89.9%
+-commutative89.9%
mul-1-neg89.9%
unsub-neg89.9%
unpow289.9%
associate-/r*89.0%
div-sub89.0%
*-commutative89.0%
associate-/l*94.8%
Simplified94.8%
if -2.9000000000000002e43 < y.im < -9.8000000000000004e-131 or 1.05e-157 < y.im < 2.5000000000000001e91Initial program 82.1%
if -9.8000000000000004e-131 < y.im < 1.05e-157Initial program 61.8%
fma-neg61.8%
distribute-rgt-neg-out61.8%
+-commutative61.8%
fma-define61.8%
Simplified61.8%
Taylor expanded in y.re around inf 90.6%
mul-1-neg90.6%
unsub-neg90.6%
*-commutative90.6%
associate-/l*89.6%
Simplified89.6%
associate-*r/90.6%
Applied egg-rr90.6%
if 2.5000000000000001e91 < y.im Initial program 39.3%
fma-neg39.3%
distribute-rgt-neg-out39.3%
+-commutative39.3%
fma-define39.3%
Simplified39.3%
Taylor expanded in y.im around inf 77.6%
clear-num77.6%
inv-pow77.6%
Applied egg-rr77.6%
unpow-177.6%
associate-/r*77.8%
Simplified77.8%
Final simplification86.4%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (or (<= y.im -1.05e+40) (not (<= y.im 2600000000.0))) (/ (- (* y.re (/ x.im y.im)) 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 <= -1.05e+40) || !(y_46_im <= 2600000000.0)) {
tmp = ((y_46_re * (x_46_im / y_46_im)) - 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 <= (-1.05d+40)) .or. (.not. (y_46im <= 2600000000.0d0))) then
tmp = ((y_46re * (x_46im / y_46im)) - 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 <= -1.05e+40) || !(y_46_im <= 2600000000.0)) {
tmp = ((y_46_re * (x_46_im / y_46_im)) - 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 <= -1.05e+40) or not (y_46_im <= 2600000000.0): tmp = ((y_46_re * (x_46_im / y_46_im)) - 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 <= -1.05e+40) || !(y_46_im <= 2600000000.0)) tmp = Float64(Float64(Float64(y_46_re * Float64(x_46_im / y_46_im)) - x_46_re) / y_46_im); else tmp = Float64(Float64(x_46_im - Float64(Float64(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 <= -1.05e+40) || ~((y_46_im <= 2600000000.0))) tmp = ((y_46_re * (x_46_im / y_46_im)) - 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, -1.05e+40], N[Not[LessEqual[y$46$im, 2600000000.0]], $MachinePrecision]], N[(N[(N[(y$46$re * N[(x$46$im / y$46$im), $MachinePrecision]), $MachinePrecision] - x$46$re), $MachinePrecision] / y$46$im), $MachinePrecision], N[(N[(x$46$im - N[(N[(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 -1.05 \cdot 10^{+40} \lor \neg \left(y.im \leq 2600000000\right):\\
\;\;\;\;\frac{y.re \cdot \frac{x.im}{y.im} - 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 < -1.05000000000000005e40 or 2.6e9 < y.im Initial program 53.7%
fma-neg53.7%
distribute-rgt-neg-out53.7%
+-commutative53.7%
fma-define53.7%
Simplified53.7%
Taylor expanded in y.re around 0 78.1%
+-commutative78.1%
mul-1-neg78.1%
unsub-neg78.1%
unpow278.1%
associate-/r*79.3%
div-sub79.3%
*-commutative79.3%
associate-/l*82.8%
Simplified82.8%
if -1.05000000000000005e40 < y.im < 2.6e9Initial program 71.7%
fma-neg71.7%
distribute-rgt-neg-out71.7%
+-commutative71.7%
fma-define71.7%
Simplified71.7%
Taylor expanded in y.re around inf 81.5%
mul-1-neg81.5%
unsub-neg81.5%
*-commutative81.5%
associate-/l*80.3%
Simplified80.3%
associate-*r/81.5%
Applied egg-rr81.5%
Final simplification82.1%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (or (<= y.im -4.8e+39) (not (<= y.im 1800000000.0))) (/ (- (* x.im (/ y.re y.im)) 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.8e+39) || !(y_46_im <= 1800000000.0)) {
tmp = ((x_46_im * (y_46_re / y_46_im)) - 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.8d+39)) .or. (.not. (y_46im <= 1800000000.0d0))) then
tmp = ((x_46im * (y_46re / y_46im)) - 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.8e+39) || !(y_46_im <= 1800000000.0)) {
tmp = ((x_46_im * (y_46_re / y_46_im)) - 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.8e+39) or not (y_46_im <= 1800000000.0): tmp = ((x_46_im * (y_46_re / y_46_im)) - 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.8e+39) || !(y_46_im <= 1800000000.0)) 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(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.8e+39) || ~((y_46_im <= 1800000000.0))) tmp = ((x_46_im * (y_46_re / y_46_im)) - 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.8e+39], N[Not[LessEqual[y$46$im, 1800000000.0]], $MachinePrecision]], 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[(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.8 \cdot 10^{+39} \lor \neg \left(y.im \leq 1800000000\right):\\
\;\;\;\;\frac{x.im \cdot \frac{y.re}{y.im} - 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.8000000000000002e39 or 1.8e9 < y.im Initial program 53.7%
fma-neg53.7%
distribute-rgt-neg-out53.7%
+-commutative53.7%
fma-define53.7%
Simplified53.7%
Taylor expanded in y.im around inf 79.3%
neg-mul-179.3%
+-commutative79.3%
unsub-neg79.3%
associate-/l*81.7%
Applied egg-rr81.7%
if -4.8000000000000002e39 < y.im < 1.8e9Initial program 71.7%
fma-neg71.7%
distribute-rgt-neg-out71.7%
+-commutative71.7%
fma-define71.7%
Simplified71.7%
Taylor expanded in y.re around inf 81.5%
mul-1-neg81.5%
unsub-neg81.5%
*-commutative81.5%
associate-/l*80.3%
Simplified80.3%
associate-*r/81.5%
Applied egg-rr81.5%
Final simplification81.6%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (or (<= y.im -2.7e+39) (not (<= y.im 9e+113))) (/ (- 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 <= -2.7e+39) || !(y_46_im <= 9e+113)) {
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 <= (-2.7d+39)) .or. (.not. (y_46im <= 9d+113))) 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 <= -2.7e+39) || !(y_46_im <= 9e+113)) {
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 <= -2.7e+39) or not (y_46_im <= 9e+113): 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 <= -2.7e+39) || !(y_46_im <= 9e+113)) tmp = Float64(Float64(-x_46_re) / 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 <= -2.7e+39) || ~((y_46_im <= 9e+113))) 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, -2.7e+39], N[Not[LessEqual[y$46$im, 9e+113]], $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 -2.7 \cdot 10^{+39} \lor \neg \left(y.im \leq 9 \cdot 10^{+113}\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 < -2.70000000000000003e39 or 9.0000000000000001e113 < y.im Initial program 50.3%
fma-neg50.3%
distribute-rgt-neg-out50.3%
+-commutative50.3%
fma-define50.3%
Simplified50.3%
Taylor expanded in y.re around 0 79.0%
associate-*r/79.0%
neg-mul-179.0%
Simplified79.0%
if -2.70000000000000003e39 < y.im < 9.0000000000000001e113Initial program 70.7%
fma-neg70.7%
distribute-rgt-neg-out70.7%
+-commutative70.7%
fma-define70.7%
Simplified70.7%
Taylor expanded in y.re around inf 76.4%
mul-1-neg76.4%
unsub-neg76.4%
*-commutative76.4%
associate-/l*75.9%
Simplified75.9%
associate-*r/76.4%
Applied egg-rr76.4%
Final simplification77.3%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (or (<= y.im -5.5e+42) (not (<= y.im 2e+114))) (/ (- 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 <= -5.5e+42) || !(y_46_im <= 2e+114)) {
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 <= (-5.5d+42)) .or. (.not. (y_46im <= 2d+114))) 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 <= -5.5e+42) || !(y_46_im <= 2e+114)) {
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 <= -5.5e+42) or not (y_46_im <= 2e+114): 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 <= -5.5e+42) || !(y_46_im <= 2e+114)) tmp = Float64(Float64(-x_46_re) / y_46_im); else tmp = Float64(Float64(x_46_im - Float64(y_46_im * 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 <= -5.5e+42) || ~((y_46_im <= 2e+114))) 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, -5.5e+42], N[Not[LessEqual[y$46$im, 2e+114]], $MachinePrecision]], N[((-x$46$re) / y$46$im), $MachinePrecision], N[(N[(x$46$im - N[(y$46$im * N[(x$46$re / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y$46$re), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.im \leq -5.5 \cdot 10^{+42} \lor \neg \left(y.im \leq 2 \cdot 10^{+114}\right):\\
\;\;\;\;\frac{-x.re}{y.im}\\
\mathbf{else}:\\
\;\;\;\;\frac{x.im - y.im \cdot \frac{x.re}{y.re}}{y.re}\\
\end{array}
\end{array}
if y.im < -5.50000000000000001e42 or 2e114 < y.im Initial program 50.3%
fma-neg50.3%
distribute-rgt-neg-out50.3%
+-commutative50.3%
fma-define50.3%
Simplified50.3%
Taylor expanded in y.re around 0 79.0%
associate-*r/79.0%
neg-mul-179.0%
Simplified79.0%
if -5.50000000000000001e42 < y.im < 2e114Initial program 70.7%
fma-neg70.7%
distribute-rgt-neg-out70.7%
+-commutative70.7%
fma-define70.7%
Simplified70.7%
Taylor expanded in y.re around inf 76.4%
mul-1-neg76.4%
unsub-neg76.4%
*-commutative76.4%
associate-/l*75.9%
Simplified75.9%
Final simplification76.9%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (or (<= y.im -4.1e+40) (not (<= y.im 4.4e+114))) (/ (- 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 <= -4.1e+40) || !(y_46_im <= 4.4e+114)) {
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 <= (-4.1d+40)) .or. (.not. (y_46im <= 4.4d+114))) 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 <= -4.1e+40) || !(y_46_im <= 4.4e+114)) {
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 <= -4.1e+40) or not (y_46_im <= 4.4e+114): 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 <= -4.1e+40) || !(y_46_im <= 4.4e+114)) tmp = Float64(Float64(-x_46_re) / y_46_im); else tmp = Float64(Float64(x_46_im - Float64(x_46_re * Float64(y_46_im / y_46_re))) / y_46_re); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if ((y_46_im <= -4.1e+40) || ~((y_46_im <= 4.4e+114))) 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, -4.1e+40], N[Not[LessEqual[y$46$im, 4.4e+114]], $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 -4.1 \cdot 10^{+40} \lor \neg \left(y.im \leq 4.4 \cdot 10^{+114}\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 < -4.1000000000000002e40 or 4.4000000000000001e114 < y.im Initial program 50.3%
fma-neg50.3%
distribute-rgt-neg-out50.3%
+-commutative50.3%
fma-define50.3%
Simplified50.3%
Taylor expanded in y.re around 0 79.0%
associate-*r/79.0%
neg-mul-179.0%
Simplified79.0%
if -4.1000000000000002e40 < y.im < 4.4000000000000001e114Initial program 70.7%
fma-neg70.7%
distribute-rgt-neg-out70.7%
+-commutative70.7%
fma-define70.7%
Simplified70.7%
Taylor expanded in y.re around inf 76.4%
mul-1-neg76.4%
unsub-neg76.4%
*-commutative76.4%
associate-/l*75.9%
Simplified75.9%
Taylor expanded in y.re around inf 76.4%
mul-1-neg76.4%
sub-neg76.4%
associate-*r/75.6%
Simplified75.6%
Final simplification76.7%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (or (<= y.im -2.2e+39) (not (<= y.im 9e+113))) (/ (- 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.2e+39) || !(y_46_im <= 9e+113)) {
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.2d+39)) .or. (.not. (y_46im <= 9d+113))) 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.2e+39) || !(y_46_im <= 9e+113)) {
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.2e+39) or not (y_46_im <= 9e+113): 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.2e+39) || !(y_46_im <= 9e+113)) 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 <= -2.2e+39) || ~((y_46_im <= 9e+113))) 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, -2.2e+39], N[Not[LessEqual[y$46$im, 9e+113]], $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 -2.2 \cdot 10^{+39} \lor \neg \left(y.im \leq 9 \cdot 10^{+113}\right):\\
\;\;\;\;\frac{-x.re}{y.im}\\
\mathbf{else}:\\
\;\;\;\;\frac{x.im}{y.re}\\
\end{array}
\end{array}
if y.im < -2.2000000000000001e39 or 9.0000000000000001e113 < y.im Initial program 50.3%
fma-neg50.3%
distribute-rgt-neg-out50.3%
+-commutative50.3%
fma-define50.3%
Simplified50.3%
Taylor expanded in y.re around 0 79.0%
associate-*r/79.0%
neg-mul-179.0%
Simplified79.0%
if -2.2000000000000001e39 < y.im < 9.0000000000000001e113Initial program 70.7%
fma-neg70.7%
distribute-rgt-neg-out70.7%
+-commutative70.7%
fma-define70.7%
Simplified70.7%
Taylor expanded in y.re around inf 59.1%
Final simplification65.7%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (or (<= y.im -2.95e+113) (not (<= y.im 7.6e+203))) (/ 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.95e+113) || !(y_46_im <= 7.6e+203)) {
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.95d+113)) .or. (.not. (y_46im <= 7.6d+203))) 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.95e+113) || !(y_46_im <= 7.6e+203)) {
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.95e+113) or not (y_46_im <= 7.6e+203): 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.95e+113) || !(y_46_im <= 7.6e+203)) 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.95e+113) || ~((y_46_im <= 7.6e+203))) 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, -2.95e+113], N[Not[LessEqual[y$46$im, 7.6e+203]], $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 -2.95 \cdot 10^{+113} \lor \neg \left(y.im \leq 7.6 \cdot 10^{+203}\right):\\
\;\;\;\;\frac{x.re}{y.im}\\
\mathbf{else}:\\
\;\;\;\;\frac{x.im}{y.re}\\
\end{array}
\end{array}
if y.im < -2.95000000000000011e113 or 7.60000000000000047e203 < y.im Initial program 44.3%
fma-neg44.3%
distribute-rgt-neg-out44.3%
+-commutative44.3%
fma-define44.3%
Simplified44.3%
Taylor expanded in y.re around 0 87.4%
associate-*r/87.4%
neg-mul-187.4%
Simplified87.4%
add-sqr-sqrt21.1%
sqrt-unprod39.6%
sqr-neg39.6%
sqrt-unprod20.4%
add-sqr-sqrt34.2%
div-inv34.2%
Applied egg-rr34.2%
associate-*r/34.2%
*-rgt-identity34.2%
Simplified34.2%
if -2.95000000000000011e113 < y.im < 7.60000000000000047e203Initial program 69.1%
fma-neg69.1%
distribute-rgt-neg-out69.1%
+-commutative69.1%
fma-define69.1%
Simplified69.1%
Taylor expanded in y.re around inf 52.6%
Final simplification48.8%
(FPCore (x.re x.im y.re y.im) :precision binary64 (/ x.im y.re))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return x_46_im / y_46_re;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
code = x_46im / y_46re
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return x_46_im / y_46_re;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): return x_46_im / y_46_re
function code(x_46_re, x_46_im, y_46_re, y_46_im) return Float64(x_46_im / y_46_re) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = x_46_im / y_46_re; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[(x$46$im / y$46$re), $MachinePrecision]
\begin{array}{l}
\\
\frac{x.im}{y.re}
\end{array}
Initial program 64.0%
fma-neg64.0%
distribute-rgt-neg-out64.0%
+-commutative64.0%
fma-define64.0%
Simplified64.0%
Taylor expanded in y.re around inf 42.9%
herbie shell --seed 2024136
(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))))