
(FPCore (x.re x.im y.re y.im) :precision binary64 (/ (+ (* x.re y.re) (* x.im y.im)) (+ (* y.re y.re) (* y.im y.im))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return ((x_46_re * y_46_re) + (x_46_im * y_46_im)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im));
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
code = ((x_46re * y_46re) + (x_46im * y_46im)) / ((y_46re * y_46re) + (y_46im * y_46im))
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return ((x_46_re * y_46_re) + (x_46_im * y_46_im)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im));
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): return ((x_46_re * y_46_re) + (x_46_im * y_46_im)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im))
function code(x_46_re, x_46_im, y_46_re, y_46_im) return Float64(Float64(Float64(x_46_re * y_46_re) + Float64(x_46_im * y_46_im)) / Float64(Float64(y_46_re * y_46_re) + Float64(y_46_im * y_46_im))) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = ((x_46_re * y_46_re) + (x_46_im * y_46_im)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im)); end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[(N[(N[(x$46$re * y$46$re), $MachinePrecision] + N[(x$46$im * y$46$im), $MachinePrecision]), $MachinePrecision] / N[(N[(y$46$re * y$46$re), $MachinePrecision] + N[(y$46$im * y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x.re \cdot y.re + x.im \cdot y.im}{y.re \cdot y.re + y.im \cdot y.im}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 10 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x.re x.im y.re y.im) :precision binary64 (/ (+ (* x.re y.re) (* x.im y.im)) (+ (* y.re y.re) (* y.im y.im))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return ((x_46_re * y_46_re) + (x_46_im * y_46_im)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im));
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
code = ((x_46re * y_46re) + (x_46im * y_46im)) / ((y_46re * y_46re) + (y_46im * y_46im))
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
return ((x_46_re * y_46_re) + (x_46_im * y_46_im)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im));
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): return ((x_46_re * y_46_re) + (x_46_im * y_46_im)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im))
function code(x_46_re, x_46_im, y_46_re, y_46_im) return Float64(Float64(Float64(x_46_re * y_46_re) + Float64(x_46_im * y_46_im)) / Float64(Float64(y_46_re * y_46_re) + Float64(y_46_im * y_46_im))) end
function tmp = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = ((x_46_re * y_46_re) + (x_46_im * y_46_im)) / ((y_46_re * y_46_re) + (y_46_im * y_46_im)); end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := N[(N[(N[(x$46$re * y$46$re), $MachinePrecision] + N[(x$46$im * y$46$im), $MachinePrecision]), $MachinePrecision] / N[(N[(y$46$re * y$46$re), $MachinePrecision] + N[(y$46$im * y$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x.re \cdot y.re + x.im \cdot y.im}{y.re \cdot y.re + y.im \cdot y.im}
\end{array}
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (<= y.im -1.66e+97)
(/ (fma (/ x.re y.im) y.re x.im) y.im)
(if (<= y.im -3.5e-57)
(/ (+ (* x.im y.im) (* y.re x.re)) (+ (* y.im y.im) (* y.re y.re)))
(if (<= y.im 1.25e-159)
(/ (fma (/ x.im y.re) y.im x.re) y.re)
(if (<= y.im 7.5e+146)
(/
1.0
(/ (fma y.im y.im (* y.re y.re)) (fma y.im x.im (* y.re x.re))))
(/ (fma x.re (/ y.re y.im) x.im) y.im))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_im <= -1.66e+97) {
tmp = fma((x_46_re / y_46_im), y_46_re, x_46_im) / y_46_im;
} else if (y_46_im <= -3.5e-57) {
tmp = ((x_46_im * y_46_im) + (y_46_re * x_46_re)) / ((y_46_im * y_46_im) + (y_46_re * y_46_re));
} else if (y_46_im <= 1.25e-159) {
tmp = fma((x_46_im / y_46_re), y_46_im, x_46_re) / y_46_re;
} else if (y_46_im <= 7.5e+146) {
tmp = 1.0 / (fma(y_46_im, y_46_im, (y_46_re * y_46_re)) / fma(y_46_im, x_46_im, (y_46_re * x_46_re)));
} else {
tmp = fma(x_46_re, (y_46_re / y_46_im), x_46_im) / y_46_im;
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if (y_46_im <= -1.66e+97) tmp = Float64(fma(Float64(x_46_re / y_46_im), y_46_re, x_46_im) / y_46_im); elseif (y_46_im <= -3.5e-57) tmp = Float64(Float64(Float64(x_46_im * y_46_im) + Float64(y_46_re * x_46_re)) / Float64(Float64(y_46_im * y_46_im) + Float64(y_46_re * y_46_re))); elseif (y_46_im <= 1.25e-159) tmp = Float64(fma(Float64(x_46_im / y_46_re), y_46_im, x_46_re) / y_46_re); elseif (y_46_im <= 7.5e+146) tmp = Float64(1.0 / Float64(fma(y_46_im, y_46_im, Float64(y_46_re * y_46_re)) / fma(y_46_im, x_46_im, Float64(y_46_re * x_46_re)))); else tmp = Float64(fma(x_46_re, Float64(y_46_re / y_46_im), x_46_im) / y_46_im); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[y$46$im, -1.66e+97], N[(N[(N[(x$46$re / y$46$im), $MachinePrecision] * y$46$re + x$46$im), $MachinePrecision] / y$46$im), $MachinePrecision], If[LessEqual[y$46$im, -3.5e-57], N[(N[(N[(x$46$im * y$46$im), $MachinePrecision] + N[(y$46$re * x$46$re), $MachinePrecision]), $MachinePrecision] / N[(N[(y$46$im * y$46$im), $MachinePrecision] + N[(y$46$re * y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y$46$im, 1.25e-159], N[(N[(N[(x$46$im / y$46$re), $MachinePrecision] * y$46$im + x$46$re), $MachinePrecision] / y$46$re), $MachinePrecision], If[LessEqual[y$46$im, 7.5e+146], N[(1.0 / N[(N[(y$46$im * y$46$im + N[(y$46$re * y$46$re), $MachinePrecision]), $MachinePrecision] / N[(y$46$im * x$46$im + N[(y$46$re * x$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x$46$re * N[(y$46$re / y$46$im), $MachinePrecision] + x$46$im), $MachinePrecision] / y$46$im), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.im \leq -1.66 \cdot 10^{+97}:\\
\;\;\;\;\frac{\mathsf{fma}\left(\frac{x.re}{y.im}, y.re, x.im\right)}{y.im}\\
\mathbf{elif}\;y.im \leq -3.5 \cdot 10^{-57}:\\
\;\;\;\;\frac{x.im \cdot y.im + y.re \cdot x.re}{y.im \cdot y.im + y.re \cdot y.re}\\
\mathbf{elif}\;y.im \leq 1.25 \cdot 10^{-159}:\\
\;\;\;\;\frac{\mathsf{fma}\left(\frac{x.im}{y.re}, y.im, x.re\right)}{y.re}\\
\mathbf{elif}\;y.im \leq 7.5 \cdot 10^{+146}:\\
\;\;\;\;\frac{1}{\frac{\mathsf{fma}\left(y.im, y.im, y.re \cdot y.re\right)}{\mathsf{fma}\left(y.im, x.im, y.re \cdot x.re\right)}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\mathsf{fma}\left(x.re, \frac{y.re}{y.im}, x.im\right)}{y.im}\\
\end{array}
\end{array}
if y.im < -1.6599999999999999e97Initial program 38.7%
Taylor expanded in y.im around inf
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f6490.6
Applied rewrites90.6%
if -1.6599999999999999e97 < y.im < -3.49999999999999991e-57Initial program 77.5%
if -3.49999999999999991e-57 < y.im < 1.25000000000000008e-159Initial program 66.8%
Taylor expanded in y.re around inf
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f6494.1
Applied rewrites94.1%
if 1.25000000000000008e-159 < y.im < 7.49999999999999983e146Initial program 84.8%
lift-/.f64N/A
clear-numN/A
lower-/.f64N/A
lower-/.f6484.8
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lower-fma.f6484.8
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f6484.8
lift-*.f64N/A
*-commutativeN/A
lower-*.f6484.8
Applied rewrites84.8%
if 7.49999999999999983e146 < y.im Initial program 29.7%
Taylor expanded in y.re around inf
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f6412.6
Applied rewrites12.6%
Applied rewrites12.6%
Taylor expanded in y.im around inf
lower-/.f64N/A
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6493.9
Applied rewrites93.9%
Final simplification89.0%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0
(/ (+ (* x.im y.im) (* y.re x.re)) (+ (* y.im y.im) (* y.re y.re)))))
(if (<= y.im -1.66e+97)
(/ (fma (/ x.re y.im) y.re x.im) y.im)
(if (<= y.im -3.5e-57)
t_0
(if (<= y.im 1.25e-159)
(/ (fma (/ x.im y.re) y.im x.re) y.re)
(if (<= y.im 7.5e+146)
t_0
(/ (fma x.re (/ y.re y.im) x.im) y.im)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = ((x_46_im * y_46_im) + (y_46_re * x_46_re)) / ((y_46_im * y_46_im) + (y_46_re * y_46_re));
double tmp;
if (y_46_im <= -1.66e+97) {
tmp = fma((x_46_re / y_46_im), y_46_re, x_46_im) / y_46_im;
} else if (y_46_im <= -3.5e-57) {
tmp = t_0;
} else if (y_46_im <= 1.25e-159) {
tmp = fma((x_46_im / y_46_re), y_46_im, x_46_re) / y_46_re;
} else if (y_46_im <= 7.5e+146) {
tmp = t_0;
} else {
tmp = fma(x_46_re, (y_46_re / y_46_im), x_46_im) / y_46_im;
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(Float64(Float64(x_46_im * y_46_im) + Float64(y_46_re * x_46_re)) / Float64(Float64(y_46_im * y_46_im) + Float64(y_46_re * y_46_re))) tmp = 0.0 if (y_46_im <= -1.66e+97) tmp = Float64(fma(Float64(x_46_re / y_46_im), y_46_re, x_46_im) / y_46_im); elseif (y_46_im <= -3.5e-57) tmp = t_0; elseif (y_46_im <= 1.25e-159) tmp = Float64(fma(Float64(x_46_im / y_46_re), y_46_im, x_46_re) / y_46_re); elseif (y_46_im <= 7.5e+146) tmp = t_0; else tmp = Float64(fma(x_46_re, Float64(y_46_re / y_46_im), x_46_im) / y_46_im); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[(N[(x$46$im * y$46$im), $MachinePrecision] + N[(y$46$re * x$46$re), $MachinePrecision]), $MachinePrecision] / N[(N[(y$46$im * y$46$im), $MachinePrecision] + N[(y$46$re * y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$im, -1.66e+97], N[(N[(N[(x$46$re / y$46$im), $MachinePrecision] * y$46$re + x$46$im), $MachinePrecision] / y$46$im), $MachinePrecision], If[LessEqual[y$46$im, -3.5e-57], t$95$0, If[LessEqual[y$46$im, 1.25e-159], N[(N[(N[(x$46$im / y$46$re), $MachinePrecision] * y$46$im + x$46$re), $MachinePrecision] / y$46$re), $MachinePrecision], If[LessEqual[y$46$im, 7.5e+146], t$95$0, N[(N[(x$46$re * N[(y$46$re / y$46$im), $MachinePrecision] + x$46$im), $MachinePrecision] / y$46$im), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x.im \cdot y.im + y.re \cdot x.re}{y.im \cdot y.im + y.re \cdot y.re}\\
\mathbf{if}\;y.im \leq -1.66 \cdot 10^{+97}:\\
\;\;\;\;\frac{\mathsf{fma}\left(\frac{x.re}{y.im}, y.re, x.im\right)}{y.im}\\
\mathbf{elif}\;y.im \leq -3.5 \cdot 10^{-57}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y.im \leq 1.25 \cdot 10^{-159}:\\
\;\;\;\;\frac{\mathsf{fma}\left(\frac{x.im}{y.re}, y.im, x.re\right)}{y.re}\\
\mathbf{elif}\;y.im \leq 7.5 \cdot 10^{+146}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{\mathsf{fma}\left(x.re, \frac{y.re}{y.im}, x.im\right)}{y.im}\\
\end{array}
\end{array}
if y.im < -1.6599999999999999e97Initial program 38.7%
Taylor expanded in y.im around inf
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f6490.6
Applied rewrites90.6%
if -1.6599999999999999e97 < y.im < -3.49999999999999991e-57 or 1.25000000000000008e-159 < y.im < 7.49999999999999983e146Initial program 82.3%
if -3.49999999999999991e-57 < y.im < 1.25000000000000008e-159Initial program 66.8%
Taylor expanded in y.re around inf
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f6494.1
Applied rewrites94.1%
if 7.49999999999999983e146 < y.im Initial program 29.7%
Taylor expanded in y.re around inf
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f6412.6
Applied rewrites12.6%
Applied rewrites12.6%
Taylor expanded in y.im around inf
lower-/.f64N/A
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6493.9
Applied rewrites93.9%
Final simplification89.0%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (<= y.im -2.3e+188)
(/ x.im y.im)
(if (<= y.im -5.2e+102)
(/ (/ (* y.re x.re) y.im) y.im)
(if (<= y.im -1.4e-55)
(* (/ x.im (fma y.im y.im (* y.re y.re))) y.im)
(if (<= y.im 6.8e-52)
(/ x.re y.re)
(if (<= y.im 8.5e+103)
(/ (fma y.re x.re (* x.im y.im)) (* y.im y.im))
(/ x.im y.im)))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_im <= -2.3e+188) {
tmp = x_46_im / y_46_im;
} else if (y_46_im <= -5.2e+102) {
tmp = ((y_46_re * x_46_re) / y_46_im) / y_46_im;
} else if (y_46_im <= -1.4e-55) {
tmp = (x_46_im / fma(y_46_im, y_46_im, (y_46_re * y_46_re))) * y_46_im;
} else if (y_46_im <= 6.8e-52) {
tmp = x_46_re / y_46_re;
} else if (y_46_im <= 8.5e+103) {
tmp = fma(y_46_re, x_46_re, (x_46_im * y_46_im)) / (y_46_im * y_46_im);
} else {
tmp = x_46_im / y_46_im;
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if (y_46_im <= -2.3e+188) tmp = Float64(x_46_im / y_46_im); elseif (y_46_im <= -5.2e+102) tmp = Float64(Float64(Float64(y_46_re * x_46_re) / y_46_im) / y_46_im); elseif (y_46_im <= -1.4e-55) tmp = Float64(Float64(x_46_im / fma(y_46_im, y_46_im, Float64(y_46_re * y_46_re))) * y_46_im); elseif (y_46_im <= 6.8e-52) tmp = Float64(x_46_re / y_46_re); elseif (y_46_im <= 8.5e+103) tmp = Float64(fma(y_46_re, x_46_re, Float64(x_46_im * y_46_im)) / Float64(y_46_im * y_46_im)); else tmp = Float64(x_46_im / 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, -2.3e+188], N[(x$46$im / y$46$im), $MachinePrecision], If[LessEqual[y$46$im, -5.2e+102], N[(N[(N[(y$46$re * x$46$re), $MachinePrecision] / y$46$im), $MachinePrecision] / y$46$im), $MachinePrecision], If[LessEqual[y$46$im, -1.4e-55], N[(N[(x$46$im / N[(y$46$im * y$46$im + N[(y$46$re * y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * y$46$im), $MachinePrecision], If[LessEqual[y$46$im, 6.8e-52], N[(x$46$re / y$46$re), $MachinePrecision], If[LessEqual[y$46$im, 8.5e+103], N[(N[(y$46$re * x$46$re + N[(x$46$im * y$46$im), $MachinePrecision]), $MachinePrecision] / N[(y$46$im * y$46$im), $MachinePrecision]), $MachinePrecision], N[(x$46$im / y$46$im), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.im \leq -2.3 \cdot 10^{+188}:\\
\;\;\;\;\frac{x.im}{y.im}\\
\mathbf{elif}\;y.im \leq -5.2 \cdot 10^{+102}:\\
\;\;\;\;\frac{\frac{y.re \cdot x.re}{y.im}}{y.im}\\
\mathbf{elif}\;y.im \leq -1.4 \cdot 10^{-55}:\\
\;\;\;\;\frac{x.im}{\mathsf{fma}\left(y.im, y.im, y.re \cdot y.re\right)} \cdot y.im\\
\mathbf{elif}\;y.im \leq 6.8 \cdot 10^{-52}:\\
\;\;\;\;\frac{x.re}{y.re}\\
\mathbf{elif}\;y.im \leq 8.5 \cdot 10^{+103}:\\
\;\;\;\;\frac{\mathsf{fma}\left(y.re, x.re, x.im \cdot y.im\right)}{y.im \cdot y.im}\\
\mathbf{else}:\\
\;\;\;\;\frac{x.im}{y.im}\\
\end{array}
\end{array}
if y.im < -2.30000000000000011e188 or 8.4999999999999992e103 < y.im Initial program 36.8%
Taylor expanded in y.im around inf
lower-/.f6481.4
Applied rewrites81.4%
if -2.30000000000000011e188 < y.im < -5.20000000000000013e102Initial program 58.3%
Taylor expanded in y.im around inf
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f6479.1
Applied rewrites79.1%
Taylor expanded in y.im around 0
Applied rewrites78.8%
if -5.20000000000000013e102 < y.im < -1.39999999999999992e-55Initial program 76.1%
Taylor expanded in x.im around inf
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
unpow2N/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6462.3
Applied rewrites62.3%
if -1.39999999999999992e-55 < y.im < 6.80000000000000035e-52Initial program 68.2%
Taylor expanded in y.im around 0
lower-/.f6476.4
Applied rewrites76.4%
if 6.80000000000000035e-52 < y.im < 8.4999999999999992e103Initial program 91.7%
Taylor expanded in y.im around inf
unpow2N/A
lower-*.f6463.7
Applied rewrites63.7%
lift-+.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f6463.7
Applied rewrites63.7%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* (/ x.im (fma y.im y.im (* y.re y.re))) y.im)))
(if (<= y.im -2.3e+188)
(/ x.im y.im)
(if (<= y.im -5.2e+102)
(/ (/ (* y.re x.re) y.im) y.im)
(if (<= y.im -1.4e-55)
t_0
(if (<= y.im 1e-44)
(/ x.re y.re)
(if (<= y.im 4.5e+104) t_0 (/ x.im y.im))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = (x_46_im / fma(y_46_im, y_46_im, (y_46_re * y_46_re))) * y_46_im;
double tmp;
if (y_46_im <= -2.3e+188) {
tmp = x_46_im / y_46_im;
} else if (y_46_im <= -5.2e+102) {
tmp = ((y_46_re * x_46_re) / y_46_im) / y_46_im;
} else if (y_46_im <= -1.4e-55) {
tmp = t_0;
} else if (y_46_im <= 1e-44) {
tmp = x_46_re / y_46_re;
} else if (y_46_im <= 4.5e+104) {
tmp = t_0;
} else {
tmp = x_46_im / y_46_im;
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(Float64(x_46_im / fma(y_46_im, y_46_im, Float64(y_46_re * y_46_re))) * y_46_im) tmp = 0.0 if (y_46_im <= -2.3e+188) tmp = Float64(x_46_im / y_46_im); elseif (y_46_im <= -5.2e+102) tmp = Float64(Float64(Float64(y_46_re * x_46_re) / y_46_im) / y_46_im); elseif (y_46_im <= -1.4e-55) tmp = t_0; elseif (y_46_im <= 1e-44) tmp = Float64(x_46_re / y_46_re); elseif (y_46_im <= 4.5e+104) tmp = t_0; else tmp = Float64(x_46_im / y_46_im); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[(x$46$im / N[(y$46$im * y$46$im + N[(y$46$re * y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * y$46$im), $MachinePrecision]}, If[LessEqual[y$46$im, -2.3e+188], N[(x$46$im / y$46$im), $MachinePrecision], If[LessEqual[y$46$im, -5.2e+102], N[(N[(N[(y$46$re * x$46$re), $MachinePrecision] / y$46$im), $MachinePrecision] / y$46$im), $MachinePrecision], If[LessEqual[y$46$im, -1.4e-55], t$95$0, If[LessEqual[y$46$im, 1e-44], N[(x$46$re / y$46$re), $MachinePrecision], If[LessEqual[y$46$im, 4.5e+104], t$95$0, N[(x$46$im / y$46$im), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x.im}{\mathsf{fma}\left(y.im, y.im, y.re \cdot y.re\right)} \cdot y.im\\
\mathbf{if}\;y.im \leq -2.3 \cdot 10^{+188}:\\
\;\;\;\;\frac{x.im}{y.im}\\
\mathbf{elif}\;y.im \leq -5.2 \cdot 10^{+102}:\\
\;\;\;\;\frac{\frac{y.re \cdot x.re}{y.im}}{y.im}\\
\mathbf{elif}\;y.im \leq -1.4 \cdot 10^{-55}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y.im \leq 10^{-44}:\\
\;\;\;\;\frac{x.re}{y.re}\\
\mathbf{elif}\;y.im \leq 4.5 \cdot 10^{+104}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{x.im}{y.im}\\
\end{array}
\end{array}
if y.im < -2.30000000000000011e188 or 4.4999999999999998e104 < y.im Initial program 37.3%
Taylor expanded in y.im around inf
lower-/.f6482.6
Applied rewrites82.6%
if -2.30000000000000011e188 < y.im < -5.20000000000000013e102Initial program 58.3%
Taylor expanded in y.im around inf
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f6479.1
Applied rewrites79.1%
Taylor expanded in y.im around 0
Applied rewrites78.8%
if -5.20000000000000013e102 < y.im < -1.39999999999999992e-55 or 9.99999999999999953e-45 < y.im < 4.4999999999999998e104Initial program 82.5%
Taylor expanded in x.im around inf
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
unpow2N/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6460.1
Applied rewrites60.1%
if -1.39999999999999992e-55 < y.im < 9.99999999999999953e-45Initial program 68.5%
Taylor expanded in y.im around 0
lower-/.f6475.8
Applied rewrites75.8%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (* (/ x.im (fma y.im y.im (* y.re y.re))) y.im)))
(if (<= y.im -2.3e+188)
(/ x.im y.im)
(if (<= y.im -5.2e+102)
(* (/ (/ x.re y.im) y.im) y.re)
(if (<= y.im -1.4e-55)
t_0
(if (<= y.im 1e-44)
(/ x.re y.re)
(if (<= y.im 4.5e+104) t_0 (/ x.im y.im))))))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = (x_46_im / fma(y_46_im, y_46_im, (y_46_re * y_46_re))) * y_46_im;
double tmp;
if (y_46_im <= -2.3e+188) {
tmp = x_46_im / y_46_im;
} else if (y_46_im <= -5.2e+102) {
tmp = ((x_46_re / y_46_im) / y_46_im) * y_46_re;
} else if (y_46_im <= -1.4e-55) {
tmp = t_0;
} else if (y_46_im <= 1e-44) {
tmp = x_46_re / y_46_re;
} else if (y_46_im <= 4.5e+104) {
tmp = t_0;
} else {
tmp = x_46_im / y_46_im;
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) t_0 = Float64(Float64(x_46_im / fma(y_46_im, y_46_im, Float64(y_46_re * y_46_re))) * y_46_im) tmp = 0.0 if (y_46_im <= -2.3e+188) tmp = Float64(x_46_im / y_46_im); elseif (y_46_im <= -5.2e+102) tmp = Float64(Float64(Float64(x_46_re / y_46_im) / y_46_im) * y_46_re); elseif (y_46_im <= -1.4e-55) tmp = t_0; elseif (y_46_im <= 1e-44) tmp = Float64(x_46_re / y_46_re); elseif (y_46_im <= 4.5e+104) tmp = t_0; else tmp = Float64(x_46_im / y_46_im); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[(x$46$im / N[(y$46$im * y$46$im + N[(y$46$re * y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * y$46$im), $MachinePrecision]}, If[LessEqual[y$46$im, -2.3e+188], N[(x$46$im / y$46$im), $MachinePrecision], If[LessEqual[y$46$im, -5.2e+102], N[(N[(N[(x$46$re / y$46$im), $MachinePrecision] / y$46$im), $MachinePrecision] * y$46$re), $MachinePrecision], If[LessEqual[y$46$im, -1.4e-55], t$95$0, If[LessEqual[y$46$im, 1e-44], N[(x$46$re / y$46$re), $MachinePrecision], If[LessEqual[y$46$im, 4.5e+104], t$95$0, N[(x$46$im / y$46$im), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x.im}{\mathsf{fma}\left(y.im, y.im, y.re \cdot y.re\right)} \cdot y.im\\
\mathbf{if}\;y.im \leq -2.3 \cdot 10^{+188}:\\
\;\;\;\;\frac{x.im}{y.im}\\
\mathbf{elif}\;y.im \leq -5.2 \cdot 10^{+102}:\\
\;\;\;\;\frac{\frac{x.re}{y.im}}{y.im} \cdot y.re\\
\mathbf{elif}\;y.im \leq -1.4 \cdot 10^{-55}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y.im \leq 10^{-44}:\\
\;\;\;\;\frac{x.re}{y.re}\\
\mathbf{elif}\;y.im \leq 4.5 \cdot 10^{+104}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{x.im}{y.im}\\
\end{array}
\end{array}
if y.im < -2.30000000000000011e188 or 4.4999999999999998e104 < y.im Initial program 37.3%
Taylor expanded in y.im around inf
lower-/.f6482.6
Applied rewrites82.6%
if -2.30000000000000011e188 < y.im < -5.20000000000000013e102Initial program 58.3%
Taylor expanded in x.im around 0
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
unpow2N/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6452.8
Applied rewrites52.8%
Taylor expanded in y.im around inf
Applied rewrites52.8%
Taylor expanded in y.im around inf
Applied rewrites66.0%
if -5.20000000000000013e102 < y.im < -1.39999999999999992e-55 or 9.99999999999999953e-45 < y.im < 4.4999999999999998e104Initial program 82.5%
Taylor expanded in x.im around inf
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
unpow2N/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6460.1
Applied rewrites60.1%
if -1.39999999999999992e-55 < y.im < 9.99999999999999953e-45Initial program 68.5%
Taylor expanded in y.im around 0
lower-/.f6475.8
Applied rewrites75.8%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (<= y.re -6e+143)
(/ x.re y.re)
(if (<= y.re -1.56e-19)
(* (/ y.re (fma y.im y.im (* y.re y.re))) x.re)
(if (<= y.re 3.3e+84)
(/ (fma x.re (/ y.re y.im) x.im) y.im)
(/ x.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 <= -6e+143) {
tmp = x_46_re / y_46_re;
} else if (y_46_re <= -1.56e-19) {
tmp = (y_46_re / fma(y_46_im, y_46_im, (y_46_re * y_46_re))) * x_46_re;
} else if (y_46_re <= 3.3e+84) {
tmp = fma(x_46_re, (y_46_re / y_46_im), x_46_im) / y_46_im;
} else {
tmp = x_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 <= -6e+143) tmp = Float64(x_46_re / y_46_re); elseif (y_46_re <= -1.56e-19) tmp = Float64(Float64(y_46_re / fma(y_46_im, y_46_im, Float64(y_46_re * y_46_re))) * x_46_re); elseif (y_46_re <= 3.3e+84) tmp = Float64(fma(x_46_re, Float64(y_46_re / y_46_im), x_46_im) / y_46_im); else tmp = Float64(x_46_re / y_46_re); end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[y$46$re, -6e+143], N[(x$46$re / y$46$re), $MachinePrecision], If[LessEqual[y$46$re, -1.56e-19], N[(N[(y$46$re / N[(y$46$im * y$46$im + N[(y$46$re * y$46$re), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * x$46$re), $MachinePrecision], If[LessEqual[y$46$re, 3.3e+84], N[(N[(x$46$re * N[(y$46$re / y$46$im), $MachinePrecision] + x$46$im), $MachinePrecision] / y$46$im), $MachinePrecision], N[(x$46$re / y$46$re), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.re \leq -6 \cdot 10^{+143}:\\
\;\;\;\;\frac{x.re}{y.re}\\
\mathbf{elif}\;y.re \leq -1.56 \cdot 10^{-19}:\\
\;\;\;\;\frac{y.re}{\mathsf{fma}\left(y.im, y.im, y.re \cdot y.re\right)} \cdot x.re\\
\mathbf{elif}\;y.re \leq 3.3 \cdot 10^{+84}:\\
\;\;\;\;\frac{\mathsf{fma}\left(x.re, \frac{y.re}{y.im}, x.im\right)}{y.im}\\
\mathbf{else}:\\
\;\;\;\;\frac{x.re}{y.re}\\
\end{array}
\end{array}
if y.re < -6.0000000000000001e143 or 3.30000000000000017e84 < y.re Initial program 40.0%
Taylor expanded in y.im around 0
lower-/.f6476.2
Applied rewrites76.2%
if -6.0000000000000001e143 < y.re < -1.56000000000000003e-19Initial program 78.1%
Taylor expanded in y.im around inf
lower-/.f6425.5
Applied rewrites25.5%
Taylor expanded in x.im around 0
*-commutativeN/A
associate-*l/N/A
lower-*.f64N/A
lower-/.f64N/A
unpow2N/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6469.6
Applied rewrites69.6%
if -1.56000000000000003e-19 < y.re < 3.30000000000000017e84Initial program 75.7%
Taylor expanded in y.re around inf
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f6431.4
Applied rewrites31.4%
Applied rewrites31.3%
Taylor expanded in y.im around inf
lower-/.f64N/A
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6479.4
Applied rewrites79.4%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(if (<= y.im -3.6e-53)
(/ (fma (/ x.re y.im) y.re x.im) y.im)
(if (<= y.im 7.2e-52)
(/ (fma (/ x.im y.re) y.im x.re) y.re)
(/ (fma x.re (/ y.re y.im) x.im) y.im))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_im <= -3.6e-53) {
tmp = fma((x_46_re / y_46_im), y_46_re, x_46_im) / y_46_im;
} else if (y_46_im <= 7.2e-52) {
tmp = fma((x_46_im / y_46_re), y_46_im, x_46_re) / y_46_re;
} else {
tmp = fma(x_46_re, (y_46_re / y_46_im), x_46_im) / y_46_im;
}
return tmp;
}
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if (y_46_im <= -3.6e-53) tmp = Float64(fma(Float64(x_46_re / y_46_im), y_46_re, x_46_im) / y_46_im); elseif (y_46_im <= 7.2e-52) tmp = Float64(fma(Float64(x_46_im / y_46_re), y_46_im, x_46_re) / y_46_re); else tmp = Float64(fma(x_46_re, Float64(y_46_re / y_46_im), x_46_im) / 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, -3.6e-53], N[(N[(N[(x$46$re / y$46$im), $MachinePrecision] * y$46$re + x$46$im), $MachinePrecision] / y$46$im), $MachinePrecision], If[LessEqual[y$46$im, 7.2e-52], N[(N[(N[(x$46$im / y$46$re), $MachinePrecision] * y$46$im + x$46$re), $MachinePrecision] / y$46$re), $MachinePrecision], N[(N[(x$46$re * N[(y$46$re / y$46$im), $MachinePrecision] + x$46$im), $MachinePrecision] / y$46$im), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.im \leq -3.6 \cdot 10^{-53}:\\
\;\;\;\;\frac{\mathsf{fma}\left(\frac{x.re}{y.im}, y.re, x.im\right)}{y.im}\\
\mathbf{elif}\;y.im \leq 7.2 \cdot 10^{-52}:\\
\;\;\;\;\frac{\mathsf{fma}\left(\frac{x.im}{y.re}, y.im, x.re\right)}{y.re}\\
\mathbf{else}:\\
\;\;\;\;\frac{\mathsf{fma}\left(x.re, \frac{y.re}{y.im}, x.im\right)}{y.im}\\
\end{array}
\end{array}
if y.im < -3.5999999999999999e-53Initial program 56.3%
Taylor expanded in y.im around inf
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f6474.4
Applied rewrites74.4%
if -3.5999999999999999e-53 < y.im < 7.19999999999999976e-52Initial program 68.2%
Taylor expanded in y.re around inf
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f6491.3
Applied rewrites91.3%
if 7.19999999999999976e-52 < y.im Initial program 65.4%
Taylor expanded in y.re around inf
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f6428.4
Applied rewrites28.4%
Applied rewrites28.4%
Taylor expanded in y.im around inf
lower-/.f64N/A
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6474.9
Applied rewrites74.9%
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (/ (fma x.re (/ y.re y.im) x.im) y.im)))
(if (<= y.im -3.6e-53)
t_0
(if (<= y.im 7.2e-52) (/ (fma (/ x.im y.re) y.im x.re) 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 = fma(x_46_re, (y_46_re / y_46_im), x_46_im) / y_46_im;
double tmp;
if (y_46_im <= -3.6e-53) {
tmp = t_0;
} else if (y_46_im <= 7.2e-52) {
tmp = fma((x_46_im / y_46_re), y_46_im, x_46_re) / 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(fma(x_46_re, Float64(y_46_re / y_46_im), x_46_im) / y_46_im) tmp = 0.0 if (y_46_im <= -3.6e-53) tmp = t_0; elseif (y_46_im <= 7.2e-52) tmp = Float64(fma(Float64(x_46_im / y_46_re), y_46_im, x_46_re) / y_46_re); else tmp = t_0; end return tmp end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[(x$46$re * N[(y$46$re / y$46$im), $MachinePrecision] + x$46$im), $MachinePrecision] / y$46$im), $MachinePrecision]}, If[LessEqual[y$46$im, -3.6e-53], t$95$0, If[LessEqual[y$46$im, 7.2e-52], N[(N[(N[(x$46$im / y$46$re), $MachinePrecision] * y$46$im + x$46$re), $MachinePrecision] / y$46$re), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{\mathsf{fma}\left(x.re, \frac{y.re}{y.im}, x.im\right)}{y.im}\\
\mathbf{if}\;y.im \leq -3.6 \cdot 10^{-53}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y.im \leq 7.2 \cdot 10^{-52}:\\
\;\;\;\;\frac{\mathsf{fma}\left(\frac{x.im}{y.re}, y.im, x.re\right)}{y.re}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if y.im < -3.5999999999999999e-53 or 7.19999999999999976e-52 < y.im Initial program 60.9%
Taylor expanded in y.re around inf
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f6428.4
Applied rewrites28.4%
Applied rewrites28.4%
Taylor expanded in y.im around inf
lower-/.f64N/A
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6474.6
Applied rewrites74.6%
if -3.5999999999999999e-53 < y.im < 7.19999999999999976e-52Initial program 68.2%
Taylor expanded in y.re around inf
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f6491.3
Applied rewrites91.3%
(FPCore (x.re x.im y.re y.im) :precision binary64 (if (<= y.im -2e-53) (/ x.im y.im) (if (<= y.im 1.05e-44) (/ x.re y.re) (/ x.im y.im))))
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_im <= -2e-53) {
tmp = x_46_im / y_46_im;
} else if (y_46_im <= 1.05e-44) {
tmp = x_46_re / y_46_re;
} else {
tmp = x_46_im / y_46_im;
}
return tmp;
}
real(8) function code(x_46re, x_46im, y_46re, y_46im)
real(8), intent (in) :: x_46re
real(8), intent (in) :: x_46im
real(8), intent (in) :: y_46re
real(8), intent (in) :: y_46im
real(8) :: tmp
if (y_46im <= (-2d-53)) then
tmp = x_46im / y_46im
else if (y_46im <= 1.05d-44) then
tmp = x_46re / y_46re
else
tmp = x_46im / y_46im
end if
code = tmp
end function
public static double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double tmp;
if (y_46_im <= -2e-53) {
tmp = x_46_im / y_46_im;
} else if (y_46_im <= 1.05e-44) {
tmp = x_46_re / y_46_re;
} else {
tmp = x_46_im / y_46_im;
}
return tmp;
}
def code(x_46_re, x_46_im, y_46_re, y_46_im): tmp = 0 if y_46_im <= -2e-53: tmp = x_46_im / y_46_im elif y_46_im <= 1.05e-44: tmp = x_46_re / y_46_re else: tmp = x_46_im / y_46_im return tmp
function code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0 if (y_46_im <= -2e-53) tmp = Float64(x_46_im / y_46_im); elseif (y_46_im <= 1.05e-44) tmp = Float64(x_46_re / y_46_re); else tmp = Float64(x_46_im / y_46_im); end return tmp end
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im) tmp = 0.0; if (y_46_im <= -2e-53) tmp = x_46_im / y_46_im; elseif (y_46_im <= 1.05e-44) tmp = x_46_re / y_46_re; else tmp = x_46_im / y_46_im; end tmp_2 = tmp; end
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := If[LessEqual[y$46$im, -2e-53], N[(x$46$im / y$46$im), $MachinePrecision], If[LessEqual[y$46$im, 1.05e-44], N[(x$46$re / y$46$re), $MachinePrecision], N[(x$46$im / y$46$im), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y.im \leq -2 \cdot 10^{-53}:\\
\;\;\;\;\frac{x.im}{y.im}\\
\mathbf{elif}\;y.im \leq 1.05 \cdot 10^{-44}:\\
\;\;\;\;\frac{x.re}{y.re}\\
\mathbf{else}:\\
\;\;\;\;\frac{x.im}{y.im}\\
\end{array}
\end{array}
if y.im < -2.00000000000000006e-53 or 1.05000000000000001e-44 < y.im Initial program 60.7%
Taylor expanded in y.im around inf
lower-/.f6460.4
Applied rewrites60.4%
if -2.00000000000000006e-53 < y.im < 1.05000000000000001e-44Initial program 68.5%
Taylor expanded in y.im around 0
lower-/.f6475.8
Applied rewrites75.8%
(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 63.9%
Taylor expanded in y.im around inf
lower-/.f6441.3
Applied rewrites41.3%
herbie shell --seed 2024288
(FPCore (x.re x.im y.re y.im)
:name "_divideComplex, real part"
:precision binary64
(/ (+ (* x.re y.re) (* x.im y.im)) (+ (* y.re y.re) (* y.im y.im))))