
(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 9 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 (/ (- x.im (* y.im (/ x.re y.re))) y.re)))
(if (<= y.re -4800000000.0)
t_0
(if (<= y.re 4.3e-47)
(/ (- (* y.re (/ x.im y.im)) x.re) y.im)
(if (<= y.re 2.75e+66)
(/
(* y.re (- x.im (* x.re (/ y.im y.re))))
(+ (* y.re y.re) (* y.im y.im)))
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_im - (y_46_im * (x_46_re / y_46_re))) / y_46_re;
double tmp;
if (y_46_re <= -4800000000.0) {
tmp = t_0;
} else if (y_46_re <= 4.3e-47) {
tmp = ((y_46_re * (x_46_im / y_46_im)) - x_46_re) / y_46_im;
} else if (y_46_re <= 2.75e+66) {
tmp = (y_46_re * (x_46_im - (x_46_re * (y_46_im / y_46_re)))) / ((y_46_re * y_46_re) + (y_46_im * y_46_im));
} 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_46im - (y_46im * (x_46re / y_46re))) / y_46re
if (y_46re <= (-4800000000.0d0)) then
tmp = t_0
else if (y_46re <= 4.3d-47) then
tmp = ((y_46re * (x_46im / y_46im)) - x_46re) / y_46im
else if (y_46re <= 2.75d+66) then
tmp = (y_46re * (x_46im - (x_46re * (y_46im / y_46re)))) / ((y_46re * y_46re) + (y_46im * y_46im))
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_im - (y_46_im * (x_46_re / y_46_re))) / y_46_re;
double tmp;
if (y_46_re <= -4800000000.0) {
tmp = t_0;
} else if (y_46_re <= 4.3e-47) {
tmp = ((y_46_re * (x_46_im / y_46_im)) - x_46_re) / y_46_im;
} else if (y_46_re <= 2.75e+66) {
tmp = (y_46_re * (x_46_im - (x_46_re * (y_46_im / y_46_re)))) / ((y_46_re * y_46_re) + (y_46_im * y_46_im));
} else {
tmp = t_0;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = (x_46_im - (y_46_im * (x_46_re / y_46_re))) / y_46_re tmp = 0 if y_46_re <= -4800000000.0: tmp = t_0 elif y_46_re <= 4.3e-47: tmp = ((y_46_re * (x_46_im / y_46_im)) - x_46_re) / y_46_im elif y_46_re <= 2.75e+66: tmp = (y_46_re * (x_46_im - (x_46_re * (y_46_im / y_46_re)))) / ((y_46_re * y_46_re) + (y_46_im * y_46_im)) 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_im - Float64(y_46_im * Float64(x_46_re / y_46_re))) / y_46_re) tmp = 0.0 if (y_46_re <= -4800000000.0) tmp = t_0; elseif (y_46_re <= 4.3e-47) tmp = Float64(Float64(Float64(y_46_re * Float64(x_46_im / y_46_im)) - x_46_re) / y_46_im); elseif (y_46_re <= 2.75e+66) tmp = Float64(Float64(y_46_re * Float64(x_46_im - Float64(x_46_re * Float64(y_46_im / y_46_re)))) / Float64(Float64(y_46_re * y_46_re) + Float64(y_46_im * y_46_im))); 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_im - (y_46_im * (x_46_re / y_46_re))) / y_46_re; tmp = 0.0; if (y_46_re <= -4800000000.0) tmp = t_0; elseif (y_46_re <= 4.3e-47) tmp = ((y_46_re * (x_46_im / y_46_im)) - x_46_re) / y_46_im; elseif (y_46_re <= 2.75e+66) tmp = (y_46_re * (x_46_im - (x_46_re * (y_46_im / y_46_re)))) / ((y_46_re * y_46_re) + (y_46_im * y_46_im)); 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[(N[(x$46$im - N[(y$46$im * N[(x$46$re / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y$46$re), $MachinePrecision]}, If[LessEqual[y$46$re, -4800000000.0], t$95$0, If[LessEqual[y$46$re, 4.3e-47], 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$re, 2.75e+66], N[(N[(y$46$re * N[(x$46$im - N[(x$46$re * N[(y$46$im / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(y$46$re * y$46$re), $MachinePrecision] + N[(y$46$im * y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x.im - y.im \cdot \frac{x.re}{y.re}}{y.re}\\
\mathbf{if}\;y.re \leq -4800000000:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y.re \leq 4.3 \cdot 10^{-47}:\\
\;\;\;\;\frac{y.re \cdot \frac{x.im}{y.im} - x.re}{y.im}\\
\mathbf{elif}\;y.re \leq 2.75 \cdot 10^{+66}:\\
\;\;\;\;\frac{y.re \cdot \left(x.im - x.re \cdot \frac{y.im}{y.re}\right)}{y.re \cdot y.re + y.im \cdot y.im}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if y.re < -4.8e9 or 2.75e66 < y.re Initial program 44.8%
Taylor expanded in y.re around inf 79.2%
mul-1-neg79.2%
unsub-neg79.2%
remove-double-neg79.2%
mul-1-neg79.2%
neg-mul-179.2%
unsub-neg79.2%
mul-1-neg79.2%
distribute-lft-in79.2%
distribute-lft-in79.2%
mul-1-neg79.2%
unsub-neg79.2%
neg-mul-179.2%
mul-1-neg79.2%
remove-double-neg79.2%
associate-/l*81.6%
Simplified81.6%
Taylor expanded in x.re around 0 79.2%
*-commutative79.2%
*-un-lft-identity79.2%
times-frac82.8%
Applied egg-rr82.8%
if -4.8e9 < y.re < 4.2999999999999998e-47Initial program 71.0%
Taylor expanded in y.re around 0 78.4%
+-commutative78.4%
mul-1-neg78.4%
unsub-neg78.4%
unpow278.4%
associate-/r*82.8%
div-sub85.3%
*-commutative85.3%
associate-/l*85.3%
Simplified85.3%
if 4.2999999999999998e-47 < y.re < 2.75e66Initial program 95.6%
Taylor expanded in y.re around inf 95.6%
mul-1-neg95.6%
unsub-neg95.6%
associate-/l*95.7%
Simplified95.7%
Final simplification85.1%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (<= y.re -750000000000.0)
(/ (- x.im (* y.im (/ x.re y.re))) y.re)
(if (<= y.re 1.95e-45)
(/ (- (* y.re (/ x.im y.im)) x.re) y.im)
(if (<= y.re 6.4e+91)
(/ (- (* y.re x.im) (* y.im x.re)) (+ (* y.re y.re) (* y.im y.im)))
(/ (- x.im (* x.re (/ y.im y.re))) y.re)))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_re <= -750000000000.0) {
tmp = (x_46_im - (y_46_im * (x_46_re / y_46_re))) / y_46_re;
} else if (y_46_re <= 1.95e-45) {
tmp = ((y_46_re * (x_46_im / y_46_im)) - x_46_re) / y_46_im;
} else if (y_46_re <= 6.4e+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 = (x_46_im - (x_46_re * (y_46_im / y_46_re))) / y_46_re;
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: tmp
if (y_46re <= (-750000000000.0d0)) then
tmp = (x_46im - (y_46im * (x_46re / y_46re))) / y_46re
else if (y_46re <= 1.95d-45) then
tmp = ((y_46re * (x_46im / y_46im)) - x_46re) / y_46im
else if (y_46re <= 6.4d+91) then
tmp = ((y_46re * x_46im) - (y_46im * x_46re)) / ((y_46re * y_46re) + (y_46im * y_46im))
else
tmp = (x_46im - (x_46re * (y_46im / y_46re))) / y_46re
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_re <= -750000000000.0) {
tmp = (x_46_im - (y_46_im * (x_46_re / y_46_re))) / y_46_re;
} else if (y_46_re <= 1.95e-45) {
tmp = ((y_46_re * (x_46_im / y_46_im)) - x_46_re) / y_46_im;
} else if (y_46_re <= 6.4e+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 = (x_46_im - (x_46_re * (y_46_im / y_46_re))) / y_46_re;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if y_46_re <= -750000000000.0: tmp = (x_46_im - (y_46_im * (x_46_re / y_46_re))) / y_46_re elif y_46_re <= 1.95e-45: tmp = ((y_46_re * (x_46_im / y_46_im)) - x_46_re) / y_46_im elif y_46_re <= 6.4e+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 = (x_46_im - (x_46_re * (y_46_im / y_46_re))) / y_46_re return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if (y_46_re <= -750000000000.0) tmp = Float64(Float64(x_46_im - Float64(y_46_im * Float64(x_46_re / y_46_re))) / y_46_re); elseif (y_46_re <= 1.95e-45) tmp = Float64(Float64(Float64(y_46_re * Float64(x_46_im / y_46_im)) - x_46_re) / y_46_im); elseif (y_46_re <= 6.4e+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(x_46_im - Float64(x_46_re * Float64(y_46_im / y_46_re))) / y_46_re); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if (y_46_re <= -750000000000.0) tmp = (x_46_im - (y_46_im * (x_46_re / y_46_re))) / y_46_re; elseif (y_46_re <= 1.95e-45) tmp = ((y_46_re * (x_46_im / y_46_im)) - x_46_re) / y_46_im; elseif (y_46_re <= 6.4e+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 = (x_46_im - (x_46_re * (y_46_im / y_46_re))) / y_46_re; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[y$46$re, -750000000000.0], N[(N[(x$46$im - N[(y$46$im * N[(x$46$re / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y$46$re), $MachinePrecision], If[LessEqual[y$46$re, 1.95e-45], 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$re, 6.4e+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[(x$46$im - N[(x$46$re * N[(y$46$im / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y$46$re), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq -750000000000:\\
\;\;\;\;\frac{x.im - y.im \cdot \frac{x.re}{y.re}}{y.re}\\
\mathbf{elif}\;y.re \leq 1.95 \cdot 10^{-45}:\\
\;\;\;\;\frac{y.re \cdot \frac{x.im}{y.im} - x.re}{y.im}\\
\mathbf{elif}\;y.re \leq 6.4 \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{x.im - x.re \cdot \frac{y.im}{y.re}}{y.re}\\
\end{array}
\end{array}
if y.re < -7.5e11Initial program 48.1%
Taylor expanded in y.re around inf 77.4%
mul-1-neg77.4%
unsub-neg77.4%
remove-double-neg77.4%
mul-1-neg77.4%
neg-mul-177.4%
unsub-neg77.4%
mul-1-neg77.4%
distribute-lft-in77.4%
distribute-lft-in77.4%
mul-1-neg77.4%
unsub-neg77.4%
neg-mul-177.4%
mul-1-neg77.4%
remove-double-neg77.4%
associate-/l*77.6%
Simplified77.6%
Taylor expanded in x.re around 0 77.4%
*-commutative77.4%
*-un-lft-identity77.4%
times-frac79.1%
Applied egg-rr79.1%
if -7.5e11 < y.re < 1.95e-45Initial program 71.0%
Taylor expanded in y.re around 0 78.4%
+-commutative78.4%
mul-1-neg78.4%
unsub-neg78.4%
unpow278.4%
associate-/r*82.8%
div-sub85.3%
*-commutative85.3%
associate-/l*85.3%
Simplified85.3%
if 1.95e-45 < y.re < 6.39999999999999979e91Initial program 96.4%
if 6.39999999999999979e91 < y.re Initial program 32.9%
Taylor expanded in y.re around inf 79.5%
mul-1-neg79.5%
unsub-neg79.5%
remove-double-neg79.5%
mul-1-neg79.5%
neg-mul-179.5%
unsub-neg79.5%
mul-1-neg79.5%
distribute-lft-in79.5%
distribute-lft-in79.5%
mul-1-neg79.5%
unsub-neg79.5%
neg-mul-179.5%
mul-1-neg79.5%
remove-double-neg79.5%
associate-/l*86.7%
Simplified86.7%
Final simplification85.1%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (/ (- x.im (* y.im (/ x.re y.re))) y.re)))
(if (<= y.re -115000000000.0)
t_0
(if (<= y.re 2.4e-42)
(/ (- (* y.re (/ x.im y.im)) x.re) y.im)
(if (<= y.re 1.05e+66)
(/ (* y.re x.im) (+ (* y.re y.re) (* y.im y.im)))
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_im - (y_46_im * (x_46_re / y_46_re))) / y_46_re;
double tmp;
if (y_46_re <= -115000000000.0) {
tmp = t_0;
} else if (y_46_re <= 2.4e-42) {
tmp = ((y_46_re * (x_46_im / y_46_im)) - x_46_re) / y_46_im;
} else if (y_46_re <= 1.05e+66) {
tmp = (y_46_re * x_46_im) / ((y_46_re * y_46_re) + (y_46_im * y_46_im));
} 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_46im - (y_46im * (x_46re / y_46re))) / y_46re
if (y_46re <= (-115000000000.0d0)) then
tmp = t_0
else if (y_46re <= 2.4d-42) then
tmp = ((y_46re * (x_46im / y_46im)) - x_46re) / y_46im
else if (y_46re <= 1.05d+66) then
tmp = (y_46re * x_46im) / ((y_46re * y_46re) + (y_46im * y_46im))
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_im - (y_46_im * (x_46_re / y_46_re))) / y_46_re;
double tmp;
if (y_46_re <= -115000000000.0) {
tmp = t_0;
} else if (y_46_re <= 2.4e-42) {
tmp = ((y_46_re * (x_46_im / y_46_im)) - x_46_re) / y_46_im;
} else if (y_46_re <= 1.05e+66) {
tmp = (y_46_re * x_46_im) / ((y_46_re * y_46_re) + (y_46_im * y_46_im));
} else {
tmp = t_0;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): t_0 = (x_46_im - (y_46_im * (x_46_re / y_46_re))) / y_46_re tmp = 0 if y_46_re <= -115000000000.0: tmp = t_0 elif y_46_re <= 2.4e-42: tmp = ((y_46_re * (x_46_im / y_46_im)) - x_46_re) / y_46_im elif y_46_re <= 1.05e+66: tmp = (y_46_re * x_46_im) / ((y_46_re * y_46_re) + (y_46_im * y_46_im)) 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_im - Float64(y_46_im * Float64(x_46_re / y_46_re))) / y_46_re) tmp = 0.0 if (y_46_re <= -115000000000.0) tmp = t_0; elseif (y_46_re <= 2.4e-42) tmp = Float64(Float64(Float64(y_46_re * Float64(x_46_im / y_46_im)) - x_46_re) / y_46_im); elseif (y_46_re <= 1.05e+66) tmp = Float64(Float64(y_46_re * x_46_im) / Float64(Float64(y_46_re * y_46_re) + Float64(y_46_im * y_46_im))); 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_im - (y_46_im * (x_46_re / y_46_re))) / y_46_re; tmp = 0.0; if (y_46_re <= -115000000000.0) tmp = t_0; elseif (y_46_re <= 2.4e-42) tmp = ((y_46_re * (x_46_im / y_46_im)) - x_46_re) / y_46_im; elseif (y_46_re <= 1.05e+66) tmp = (y_46_re * x_46_im) / ((y_46_re * y_46_re) + (y_46_im * y_46_im)); 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[(N[(x$46$im - N[(y$46$im * N[(x$46$re / y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y$46$re), $MachinePrecision]}, If[LessEqual[y$46$re, -115000000000.0], t$95$0, If[LessEqual[y$46$re, 2.4e-42], 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$re, 1.05e+66], N[(N[(y$46$re * x$46$im), $MachinePrecision] / N[(N[(y$46$re * y$46$re), $MachinePrecision] + N[(y$46$im * y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x.im - y.im \cdot \frac{x.re}{y.re}}{y.re}\\
\mathbf{if}\;y.re \leq -115000000000:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y.re \leq 2.4 \cdot 10^{-42}:\\
\;\;\;\;\frac{y.re \cdot \frac{x.im}{y.im} - x.re}{y.im}\\
\mathbf{elif}\;y.re \leq 1.05 \cdot 10^{+66}:\\
\;\;\;\;\frac{y.re \cdot x.im}{y.re \cdot y.re + y.im \cdot y.im}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if y.re < -1.15e11 or 1.05000000000000003e66 < y.re Initial program 44.8%
Taylor expanded in y.re around inf 79.2%
mul-1-neg79.2%
unsub-neg79.2%
remove-double-neg79.2%
mul-1-neg79.2%
neg-mul-179.2%
unsub-neg79.2%
mul-1-neg79.2%
distribute-lft-in79.2%
distribute-lft-in79.2%
mul-1-neg79.2%
unsub-neg79.2%
neg-mul-179.2%
mul-1-neg79.2%
remove-double-neg79.2%
associate-/l*81.6%
Simplified81.6%
Taylor expanded in x.re around 0 79.2%
*-commutative79.2%
*-un-lft-identity79.2%
times-frac82.8%
Applied egg-rr82.8%
if -1.15e11 < y.re < 2.40000000000000003e-42Initial program 71.0%
Taylor expanded in y.re around 0 78.4%
+-commutative78.4%
mul-1-neg78.4%
unsub-neg78.4%
unpow278.4%
associate-/r*82.8%
div-sub85.3%
*-commutative85.3%
associate-/l*85.3%
Simplified85.3%
if 2.40000000000000003e-42 < y.re < 1.05000000000000003e66Initial program 95.6%
Taylor expanded in x.im around inf 84.0%
*-commutative84.0%
Simplified84.0%
Final simplification84.1%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (or (<= y.im -1e-91) (not (<= y.im 12200000000.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 <= -1e-91) || !(y_46_im <= 12200000000.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 <= (-1d-91)) .or. (.not. (y_46im <= 12200000000.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 <= -1e-91) || !(y_46_im <= 12200000000.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 <= -1e-91) or not (y_46_im <= 12200000000.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 <= -1e-91) || !(y_46_im <= 12200000000.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 <= -1e-91) || ~((y_46_im <= 12200000000.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, -1e-91], N[Not[LessEqual[y$46$im, 12200000000.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 -1 \cdot 10^{-91} \lor \neg \left(y.im \leq 12200000000\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 < -1.00000000000000002e-91 or 1.22e10 < y.im Initial program 51.4%
Taylor expanded in y.re around 0 73.1%
+-commutative73.1%
mul-1-neg73.1%
unsub-neg73.1%
unpow273.1%
associate-/r*75.3%
div-sub75.3%
*-commutative75.3%
associate-/l*76.8%
Simplified76.8%
Taylor expanded in y.re around 0 75.3%
associate-*r/76.2%
Simplified76.2%
if -1.00000000000000002e-91 < y.im < 1.22e10Initial program 73.1%
Taylor expanded in y.re around inf 88.3%
mul-1-neg88.3%
unsub-neg88.3%
remove-double-neg88.3%
mul-1-neg88.3%
neg-mul-188.3%
unsub-neg88.3%
mul-1-neg88.3%
distribute-lft-in88.3%
distribute-lft-in88.3%
mul-1-neg88.3%
unsub-neg88.3%
neg-mul-188.3%
mul-1-neg88.3%
remove-double-neg88.3%
associate-/l*87.5%
Simplified87.5%
Taylor expanded in x.re around 0 88.3%
Final simplification81.9%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (or (<= y.im -4e-50) (not (<= y.im 95000000.0))) (/ (- 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 <= -4e-50) || !(y_46_im <= 95000000.0)) {
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 <= (-4d-50)) .or. (.not. (y_46im <= 95000000.0d0))) 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 <= -4e-50) || !(y_46_im <= 95000000.0)) {
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 <= -4e-50) or not (y_46_im <= 95000000.0): 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 <= -4e-50) || !(y_46_im <= 95000000.0)) 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 <= -4e-50) || ~((y_46_im <= 95000000.0))) 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, -4e-50], N[Not[LessEqual[y$46$im, 95000000.0]], $MachinePrecision]], N[((-x$46$re) / y$46$im), $MachinePrecision], N[(N[(x$46$im - N[(N[(y$46$im * x$46$re), $MachinePrecision] / y$46$re), $MachinePrecision]), $MachinePrecision] / y$46$re), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.im \leq -4 \cdot 10^{-50} \lor \neg \left(y.im \leq 95000000\right):\\
\;\;\;\;\frac{-x.re}{y.im}\\
\mathbf{else}:\\
\;\;\;\;\frac{x.im - \frac{y.im \cdot x.re}{y.re}}{y.re}\\
\end{array}
\end{array}
if y.im < -4.00000000000000003e-50 or 9.5e7 < y.im Initial program 50.3%
Taylor expanded in y.re around 0 69.3%
associate-*r/69.3%
neg-mul-169.3%
Simplified69.3%
if -4.00000000000000003e-50 < y.im < 9.5e7Initial program 72.7%
Taylor expanded in y.re around inf 85.4%
mul-1-neg85.4%
unsub-neg85.4%
remove-double-neg85.4%
mul-1-neg85.4%
neg-mul-185.4%
unsub-neg85.4%
mul-1-neg85.4%
distribute-lft-in85.4%
distribute-lft-in85.4%
mul-1-neg85.4%
unsub-neg85.4%
neg-mul-185.4%
mul-1-neg85.4%
remove-double-neg85.4%
associate-/l*84.7%
Simplified84.7%
Taylor expanded in x.re around 0 85.4%
Final simplification77.5%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (or (<= y.im -4e-50) (not (<= y.im 2.85e+94))) (/ (- 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 <= -4e-50) || !(y_46_im <= 2.85e+94)) {
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 <= (-4d-50)) .or. (.not. (y_46im <= 2.85d+94))) 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 <= -4e-50) || !(y_46_im <= 2.85e+94)) {
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 <= -4e-50) or not (y_46_im <= 2.85e+94): 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 <= -4e-50) || !(y_46_im <= 2.85e+94)) 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 <= -4e-50) || ~((y_46_im <= 2.85e+94))) 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, -4e-50], N[Not[LessEqual[y$46$im, 2.85e+94]], $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 \cdot 10^{-50} \lor \neg \left(y.im \leq 2.85 \cdot 10^{+94}\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.00000000000000003e-50 or 2.8500000000000001e94 < y.im Initial program 47.6%
Taylor expanded in y.re around 0 73.1%
associate-*r/73.1%
neg-mul-173.1%
Simplified73.1%
if -4.00000000000000003e-50 < y.im < 2.8500000000000001e94Initial program 72.6%
Taylor expanded in y.re around inf 80.8%
mul-1-neg80.8%
unsub-neg80.8%
remove-double-neg80.8%
mul-1-neg80.8%
neg-mul-180.8%
unsub-neg80.8%
mul-1-neg80.8%
distribute-lft-in80.8%
distribute-lft-in80.8%
mul-1-neg80.8%
unsub-neg80.8%
neg-mul-180.8%
mul-1-neg80.8%
remove-double-neg80.8%
associate-/l*80.8%
Simplified80.8%
Final simplification77.4%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (<= y.im -1e-91)
(/ (- (* x.im (/ y.re y.im)) x.re) y.im)
(if (<= y.im 38000000000.0)
(/ (- x.im (/ (* y.im x.re) y.re)) y.re)
(/ (- (* y.re (/ 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 tmp;
if (y_46_im <= -1e-91) {
tmp = ((x_46_im * (y_46_re / y_46_im)) - x_46_re) / y_46_im;
} else if (y_46_im <= 38000000000.0) {
tmp = (x_46_im - ((y_46_im * x_46_re) / y_46_re)) / y_46_re;
} else {
tmp = ((y_46_re * (x_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) :: tmp
if (y_46im <= (-1d-91)) then
tmp = ((x_46im * (y_46re / y_46im)) - x_46re) / y_46im
else if (y_46im <= 38000000000.0d0) then
tmp = (x_46im - ((y_46im * x_46re) / y_46re)) / y_46re
else
tmp = ((y_46re * (x_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 tmp;
if (y_46_im <= -1e-91) {
tmp = ((x_46_im * (y_46_re / y_46_im)) - x_46_re) / y_46_im;
} else if (y_46_im <= 38000000000.0) {
tmp = (x_46_im - ((y_46_im * x_46_re) / y_46_re)) / y_46_re;
} else {
tmp = ((y_46_re * (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): tmp = 0 if y_46_im <= -1e-91: tmp = ((x_46_im * (y_46_re / y_46_im)) - x_46_re) / y_46_im elif y_46_im <= 38000000000.0: tmp = (x_46_im - ((y_46_im * x_46_re) / y_46_re)) / y_46_re else: tmp = ((y_46_re * (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) tmp = 0.0 if (y_46_im <= -1e-91) tmp = Float64(Float64(Float64(x_46_im * Float64(y_46_re / y_46_im)) - x_46_re) / y_46_im); elseif (y_46_im <= 38000000000.0) tmp = Float64(Float64(x_46_im - Float64(Float64(y_46_im * x_46_re) / y_46_re)) / y_46_re); else tmp = Float64(Float64(Float64(y_46_re * Float64(x_46_im / y_46_im)) - x_46_re) / y_46_im); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if (y_46_im <= -1e-91) tmp = ((x_46_im * (y_46_re / y_46_im)) - x_46_re) / y_46_im; elseif (y_46_im <= 38000000000.0) tmp = (x_46_im - ((y_46_im * x_46_re) / y_46_re)) / y_46_re; else tmp = ((y_46_re * (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_] := If[LessEqual[y$46$im, -1e-91], N[(N[(N[(x$46$im * N[(y$46$re / y$46$im), $MachinePrecision]), $MachinePrecision] - x$46$re), $MachinePrecision] / y$46$im), $MachinePrecision], If[LessEqual[y$46$im, 38000000000.0], N[(N[(x$46$im - N[(N[(y$46$im * x$46$re), $MachinePrecision] / y$46$re), $MachinePrecision]), $MachinePrecision] / y$46$re), $MachinePrecision], N[(N[(N[(y$46$re * N[(x$46$im / y$46$im), $MachinePrecision]), $MachinePrecision] - x$46$re), $MachinePrecision] / y$46$im), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.im \leq -1 \cdot 10^{-91}:\\
\;\;\;\;\frac{x.im \cdot \frac{y.re}{y.im} - x.re}{y.im}\\
\mathbf{elif}\;y.im \leq 38000000000:\\
\;\;\;\;\frac{x.im - \frac{y.im \cdot x.re}{y.re}}{y.re}\\
\mathbf{else}:\\
\;\;\;\;\frac{y.re \cdot \frac{x.im}{y.im} - x.re}{y.im}\\
\end{array}
\end{array}
if y.im < -1.00000000000000002e-91Initial program 59.2%
Taylor expanded in y.re around 0 75.8%
+-commutative75.8%
mul-1-neg75.8%
unsub-neg75.8%
unpow275.8%
associate-/r*77.0%
div-sub77.0%
*-commutative77.0%
associate-/l*77.1%
Simplified77.1%
Taylor expanded in y.re around 0 77.0%
associate-*r/77.2%
Simplified77.2%
if -1.00000000000000002e-91 < y.im < 3.8e10Initial program 73.1%
Taylor expanded in y.re around inf 88.3%
mul-1-neg88.3%
unsub-neg88.3%
remove-double-neg88.3%
mul-1-neg88.3%
neg-mul-188.3%
unsub-neg88.3%
mul-1-neg88.3%
distribute-lft-in88.3%
distribute-lft-in88.3%
mul-1-neg88.3%
unsub-neg88.3%
neg-mul-188.3%
mul-1-neg88.3%
remove-double-neg88.3%
associate-/l*87.5%
Simplified87.5%
Taylor expanded in x.re around 0 88.3%
if 3.8e10 < y.im Initial program 40.5%
Taylor expanded in y.re around 0 69.4%
+-commutative69.4%
mul-1-neg69.4%
unsub-neg69.4%
unpow269.4%
associate-/r*72.8%
div-sub72.8%
*-commutative72.8%
associate-/l*76.4%
Simplified76.4%
Final simplification82.3%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (or (<= y.im -4e-50) (not (<= y.im 700000000000.0))) (/ (- 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 <= -4e-50) || !(y_46_im <= 700000000000.0)) {
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 <= (-4d-50)) .or. (.not. (y_46im <= 700000000000.0d0))) 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 <= -4e-50) || !(y_46_im <= 700000000000.0)) {
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 <= -4e-50) or not (y_46_im <= 700000000000.0): 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 <= -4e-50) || !(y_46_im <= 700000000000.0)) 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 <= -4e-50) || ~((y_46_im <= 700000000000.0))) 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, -4e-50], N[Not[LessEqual[y$46$im, 700000000000.0]], $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 -4 \cdot 10^{-50} \lor \neg \left(y.im \leq 700000000000\right):\\
\;\;\;\;\frac{-x.re}{y.im}\\
\mathbf{else}:\\
\;\;\;\;\frac{x.im}{y.re}\\
\end{array}
\end{array}
if y.im < -4.00000000000000003e-50 or 7e11 < y.im Initial program 50.3%
Taylor expanded in y.re around 0 69.3%
associate-*r/69.3%
neg-mul-169.3%
Simplified69.3%
if -4.00000000000000003e-50 < y.im < 7e11Initial program 72.7%
Taylor expanded in y.re around inf 71.3%
Final simplification70.3%
(FPCore (x.re x.im y.re y.im) :precision binary64 (/ x.im y.re))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return x_46_im / y_46_re;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
code = x_46im / y_46re
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return x_46_im / y_46_re;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): return x_46_im / y_46_re
function code(x_46_re, x_46_im, y_46_re, y_46_im) return Float64(x_46_im / y_46_re) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = x_46_im / y_46_re; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[(x$46$im / y$46$re), $MachinePrecision]
\begin{array}{l}
\\
\frac{x.im}{y.re}
\end{array}
Initial program 61.7%
Taylor expanded in y.re around inf 46.1%
herbie shell --seed 2024100
(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))))