\[\frac{x.im \cdot y.re - x.re \cdot y.im}{y.re \cdot y.re + y.im \cdot y.im}
\]
↓
\[\begin{array}{l}
t_0 := y.re \cdot y.re + y.im \cdot y.im\\
t_1 := \frac{x.im}{y.re} - \frac{y.im \cdot x.re}{t_0}\\
\mathbf{if}\;y.re \leq -1.8 \cdot 10^{+57}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y.re \leq 3.4 \cdot 10^{-17}:\\
\;\;\;\;\frac{y.re \cdot x.im}{t_0} - \frac{x.re}{y.im}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
(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))))
↓
(FPCore (x.re x.im y.re y.im)
:precision binary64
(let* ((t_0 (+ (* y.re y.re) (* y.im y.im)))
(t_1 (- (/ x.im y.re) (/ (* y.im x.re) t_0))))
(if (<= y.re -1.8e+57)
t_1
(if (<= y.re 3.4e-17) (- (/ (* y.re x.im) t_0) (/ x.re y.im)) t_1))))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));
}
↓
double code(double x_46_re, double x_46_im, double y_46_re, double y_46_im) {
double t_0 = (y_46_re * y_46_re) + (y_46_im * y_46_im);
double t_1 = (x_46_im / y_46_re) - ((y_46_im * x_46_re) / t_0);
double tmp;
if (y_46_re <= -1.8e+57) {
tmp = t_1;
} else if (y_46_re <= 3.4e-17) {
tmp = ((y_46_re * x_46_im) / t_0) - (x_46_re / y_46_im);
} else {
tmp = t_1;
}
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
code = ((x_46im * y_46re) - (x_46re * y_46im)) / ((y_46re * y_46re) + (y_46im * y_46im))
end function
↓
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) :: t_1
real(8) :: tmp
t_0 = (y_46re * y_46re) + (y_46im * y_46im)
t_1 = (x_46im / y_46re) - ((y_46im * x_46re) / t_0)
if (y_46re <= (-1.8d+57)) then
tmp = t_1
else if (y_46re <= 3.4d-17) then
tmp = ((y_46re * x_46im) / t_0) - (x_46re / y_46im)
else
tmp = t_1
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) {
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));
}
↓
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 * y_46_re) + (y_46_im * y_46_im);
double t_1 = (x_46_im / y_46_re) - ((y_46_im * x_46_re) / t_0);
double tmp;
if (y_46_re <= -1.8e+57) {
tmp = t_1;
} else if (y_46_re <= 3.4e-17) {
tmp = ((y_46_re * x_46_im) / t_0) - (x_46_re / y_46_im);
} else {
tmp = t_1;
}
return tmp;
}
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))
↓
def code(x_46_re, x_46_im, y_46_re, y_46_im):
t_0 = (y_46_re * y_46_re) + (y_46_im * y_46_im)
t_1 = (x_46_im / y_46_re) - ((y_46_im * x_46_re) / t_0)
tmp = 0
if y_46_re <= -1.8e+57:
tmp = t_1
elif y_46_re <= 3.4e-17:
tmp = ((y_46_re * x_46_im) / t_0) - (x_46_re / y_46_im)
else:
tmp = t_1
return tmp
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 code(x_46_re, x_46_im, y_46_re, y_46_im)
t_0 = Float64(Float64(y_46_re * y_46_re) + Float64(y_46_im * y_46_im))
t_1 = Float64(Float64(x_46_im / y_46_re) - Float64(Float64(y_46_im * x_46_re) / t_0))
tmp = 0.0
if (y_46_re <= -1.8e+57)
tmp = t_1;
elseif (y_46_re <= 3.4e-17)
tmp = Float64(Float64(Float64(y_46_re * x_46_im) / t_0) - Float64(x_46_re / y_46_im));
else
tmp = t_1;
end
return tmp
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
↓
function tmp_2 = code(x_46_re, x_46_im, y_46_re, y_46_im)
t_0 = (y_46_re * y_46_re) + (y_46_im * y_46_im);
t_1 = (x_46_im / y_46_re) - ((y_46_im * x_46_re) / t_0);
tmp = 0.0;
if (y_46_re <= -1.8e+57)
tmp = t_1;
elseif (y_46_re <= 3.4e-17)
tmp = ((y_46_re * x_46_im) / t_0) - (x_46_re / y_46_im);
else
tmp = t_1;
end
tmp_2 = tmp;
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]
↓
code[x$46$re_, x$46$im_, y$46$re_, y$46$im_] := Block[{t$95$0 = N[(N[(y$46$re * y$46$re), $MachinePrecision] + N[(y$46$im * y$46$im), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x$46$im / y$46$re), $MachinePrecision] - N[(N[(y$46$im * x$46$re), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y$46$re, -1.8e+57], t$95$1, If[LessEqual[y$46$re, 3.4e-17], N[(N[(N[(y$46$re * x$46$im), $MachinePrecision] / t$95$0), $MachinePrecision] - N[(x$46$re / y$46$im), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\frac{x.im \cdot y.re - x.re \cdot y.im}{y.re \cdot y.re + y.im \cdot y.im}
↓
\begin{array}{l}
t_0 := y.re \cdot y.re + y.im \cdot y.im\\
t_1 := \frac{x.im}{y.re} - \frac{y.im \cdot x.re}{t_0}\\
\mathbf{if}\;y.re \leq -1.8 \cdot 10^{+57}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y.re \leq 3.4 \cdot 10^{-17}:\\
\;\;\;\;\frac{y.re \cdot x.im}{t_0} - \frac{x.re}{y.im}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
Alternatives
| Alternative 1 |
|---|
| Error | 21.9 |
|---|
| Cost | 1556 |
|---|
\[\begin{array}{l}
t_0 := y.re \cdot y.re + y.im \cdot y.im\\
t_1 := \frac{1}{t_0}\\
\mathbf{if}\;y.re \leq -5.6 \cdot 10^{+140}:\\
\;\;\;\;\frac{x.im}{y.re}\\
\mathbf{elif}\;y.re \leq -2.6 \cdot 10^{-69}:\\
\;\;\;\;\frac{y.re}{t_0} \cdot x.im\\
\mathbf{elif}\;y.re \leq 1.85 \cdot 10^{-94}:\\
\;\;\;\;-\frac{x.re}{y.im}\\
\mathbf{elif}\;y.re \leq 2 \cdot 10^{+21}:\\
\;\;\;\;t_1 \cdot \left(y.re \cdot x.im\right)\\
\mathbf{elif}\;y.re \leq 1.2 \cdot 10^{+64}:\\
\;\;\;\;t_1 \cdot \left(y.im \cdot \left(-x.re\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x.im}{y.re}\\
\end{array}
\]
| Alternative 2 |
|---|
| Error | 21.8 |
|---|
| Cost | 1556 |
|---|
\[\begin{array}{l}
t_0 := y.re \cdot y.re + y.im \cdot y.im\\
\mathbf{if}\;y.re \leq -1.45 \cdot 10^{+141}:\\
\;\;\;\;\frac{x.im}{y.re}\\
\mathbf{elif}\;y.re \leq -7 \cdot 10^{-68}:\\
\;\;\;\;\frac{y.re}{t_0} \cdot x.im\\
\mathbf{elif}\;y.re \leq 2.4 \cdot 10^{-94}:\\
\;\;\;\;-\frac{x.re}{y.im}\\
\mathbf{elif}\;y.re \leq 2.1 \cdot 10^{+21}:\\
\;\;\;\;\frac{1}{t_0} \cdot \left(y.re \cdot x.im\right)\\
\mathbf{elif}\;y.re \leq 1.45 \cdot 10^{+64}:\\
\;\;\;\;\frac{\left(-y.im\right) \cdot \frac{x.re}{y.im \cdot y.im + y.re \cdot y.re}}{1}\\
\mathbf{else}:\\
\;\;\;\;\frac{x.im}{y.re}\\
\end{array}
\]
| Alternative 3 |
|---|
| Error | 21.8 |
|---|
| Cost | 1428 |
|---|
\[\begin{array}{l}
t_0 := y.re \cdot y.re + y.im \cdot y.im\\
\mathbf{if}\;y.re \leq -1.5 \cdot 10^{+141}:\\
\;\;\;\;\frac{x.im}{y.re}\\
\mathbf{elif}\;y.re \leq -6.8 \cdot 10^{-67}:\\
\;\;\;\;\frac{y.re}{t_0} \cdot x.im\\
\mathbf{elif}\;y.re \leq 2.4 \cdot 10^{-93}:\\
\;\;\;\;-\frac{x.re}{y.im}\\
\mathbf{elif}\;y.re \leq 1.35 \cdot 10^{+20}:\\
\;\;\;\;\frac{y.re \cdot x.im}{t_0}\\
\mathbf{elif}\;y.re \leq 2.55 \cdot 10^{+64}:\\
\;\;\;\;\frac{y.im}{y.re \cdot \left(-y.re\right) - y.im \cdot y.im} \cdot x.re\\
\mathbf{else}:\\
\;\;\;\;\frac{x.im}{y.re}\\
\end{array}
\]
| Alternative 4 |
|---|
| Error | 21.8 |
|---|
| Cost | 1428 |
|---|
\[\begin{array}{l}
t_0 := y.re \cdot y.re + y.im \cdot y.im\\
\mathbf{if}\;y.re \leq -6 \cdot 10^{+142}:\\
\;\;\;\;\frac{x.im}{y.re}\\
\mathbf{elif}\;y.re \leq -2.3 \cdot 10^{-70}:\\
\;\;\;\;\frac{y.re}{t_0} \cdot x.im\\
\mathbf{elif}\;y.re \leq 1.45 \cdot 10^{-95}:\\
\;\;\;\;-\frac{x.re}{y.im}\\
\mathbf{elif}\;y.re \leq 4.5 \cdot 10^{+20}:\\
\;\;\;\;\frac{y.re \cdot x.im}{t_0}\\
\mathbf{elif}\;y.re \leq 1.8 \cdot 10^{+64}:\\
\;\;\;\;\frac{y.im \cdot \left(-x.re\right)}{t_0}\\
\mathbf{else}:\\
\;\;\;\;\frac{x.im}{y.re}\\
\end{array}
\]
| Alternative 5 |
|---|
| Error | 21.8 |
|---|
| Cost | 1428 |
|---|
\[\begin{array}{l}
t_0 := y.re \cdot y.re + y.im \cdot y.im\\
\mathbf{if}\;y.re \leq -2.5 \cdot 10^{+141}:\\
\;\;\;\;\frac{x.im}{y.re}\\
\mathbf{elif}\;y.re \leq -1 \cdot 10^{-64}:\\
\;\;\;\;\frac{y.re}{t_0} \cdot x.im\\
\mathbf{elif}\;y.re \leq 2 \cdot 10^{-88}:\\
\;\;\;\;-\frac{x.re}{y.im}\\
\mathbf{elif}\;y.re \leq 5.4 \cdot 10^{+20}:\\
\;\;\;\;\frac{1}{t_0} \cdot \left(y.re \cdot x.im\right)\\
\mathbf{elif}\;y.re \leq 1.2 \cdot 10^{+64}:\\
\;\;\;\;\frac{y.im \cdot \left(-x.re\right)}{t_0}\\
\mathbf{else}:\\
\;\;\;\;\frac{x.im}{y.re}\\
\end{array}
\]
| Alternative 6 |
|---|
| Error | 18.1 |
|---|
| Cost | 1224 |
|---|
\[\begin{array}{l}
t_0 := -\frac{x.re}{y.im}\\
\mathbf{if}\;y.im \leq -3.3 \cdot 10^{+53}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y.im \leq 1.45 \cdot 10^{+18}:\\
\;\;\;\;\frac{x.im}{y.re} - \frac{y.im \cdot x.re}{y.re \cdot y.re + y.im \cdot y.im}\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
| Alternative 7 |
|---|
| Error | 23.8 |
|---|
| Cost | 1100 |
|---|
\[\begin{array}{l}
t_0 := -\frac{x.re}{y.im}\\
\mathbf{if}\;y.im \leq -5.5 \cdot 10^{+53}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y.im \leq 1.1 \cdot 10^{-149}:\\
\;\;\;\;\frac{x.im}{y.re}\\
\mathbf{elif}\;y.im \leq 1.22 \cdot 10^{+22}:\\
\;\;\;\;\frac{y.re}{y.re \cdot y.re + y.im \cdot y.im} \cdot x.im\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
| Alternative 8 |
|---|
| Error | 24.0 |
|---|
| Cost | 1100 |
|---|
\[\begin{array}{l}
t_0 := -\frac{x.re}{y.im}\\
\mathbf{if}\;y.im \leq -6.8 \cdot 10^{+52}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y.im \leq 3.3 \cdot 10^{-149}:\\
\;\;\;\;\frac{x.im}{y.re}\\
\mathbf{elif}\;y.im \leq 4.4 \cdot 10^{+22}:\\
\;\;\;\;\frac{y.re \cdot x.im}{y.re \cdot y.re + y.im \cdot y.im}\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
| Alternative 9 |
|---|
| Error | 23.7 |
|---|
| Cost | 520 |
|---|
\[\begin{array}{l}
t_0 := -\frac{x.re}{y.im}\\
\mathbf{if}\;y.im \leq -5 \cdot 10^{+52}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y.im \leq 1.8 \cdot 10^{-22}:\\
\;\;\;\;\frac{x.im}{y.re}\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
| Alternative 10 |
|---|
| Error | 38.1 |
|---|
| Cost | 192 |
|---|
\[\frac{x.im}{y.re}
\]