\[\frac{\left(x \cdot 2\right) \cdot y}{x - y}
\]
↓
\[\begin{array}{l}
t_0 := \frac{\left(x \cdot 2\right) \cdot y}{x - y}\\
\mathbf{if}\;y \leq -1.6 \cdot 10^{+43}:\\
\;\;\;\;\begin{array}{l}
\mathbf{if}\;y \ne 0:\\
\;\;\;\;\frac{x}{\frac{x - y}{y}} \cdot 2\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}\\
\mathbf{elif}\;y \leq 3 \cdot 10^{-30}:\\
\;\;\;\;\begin{array}{l}
\mathbf{if}\;x \ne 0:\\
\;\;\;\;\frac{2 \cdot y}{\frac{x - y}{x}}\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}\\
\mathbf{else}:\\
\;\;\;\;\frac{2 \cdot y}{x - y} \cdot x\\
\end{array}
\]
(FPCore (x y) :precision binary64 (/ (* (* x 2.0) y) (- x y)))
↓
(FPCore (x y)
:precision binary64
(let* ((t_0 (/ (* (* x 2.0) y) (- x y))))
(if (<= y -1.6e+43)
(if (!= y 0.0) (* (/ x (/ (- x y) y)) 2.0) t_0)
(if (<= y 3e-30)
(if (!= x 0.0) (/ (* 2.0 y) (/ (- x y) x)) t_0)
(* (/ (* 2.0 y) (- x y)) x)))))double code(double x, double y) {
return ((x * 2.0) * y) / (x - y);
}
↓
double code(double x, double y) {
double t_0 = ((x * 2.0) * y) / (x - y);
double tmp_1;
if (y <= -1.6e+43) {
double tmp_2;
if (y != 0.0) {
tmp_2 = (x / ((x - y) / y)) * 2.0;
} else {
tmp_2 = t_0;
}
tmp_1 = tmp_2;
} else if (y <= 3e-30) {
double tmp_3;
if (x != 0.0) {
tmp_3 = (2.0 * y) / ((x - y) / x);
} else {
tmp_3 = t_0;
}
tmp_1 = tmp_3;
} else {
tmp_1 = ((2.0 * y) / (x - y)) * x;
}
return tmp_1;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = ((x * 2.0d0) * y) / (x - y)
end function
↓
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: t_0
real(8) :: tmp
real(8) :: tmp_1
real(8) :: tmp_2
real(8) :: tmp_3
t_0 = ((x * 2.0d0) * y) / (x - y)
if (y <= (-1.6d+43)) then
if (y /= 0.0d0) then
tmp_2 = (x / ((x - y) / y)) * 2.0d0
else
tmp_2 = t_0
end if
tmp_1 = tmp_2
else if (y <= 3d-30) then
if (x /= 0.0d0) then
tmp_3 = (2.0d0 * y) / ((x - y) / x)
else
tmp_3 = t_0
end if
tmp_1 = tmp_3
else
tmp_1 = ((2.0d0 * y) / (x - y)) * x
end if
code = tmp_1
end function
public static double code(double x, double y) {
return ((x * 2.0) * y) / (x - y);
}
↓
public static double code(double x, double y) {
double t_0 = ((x * 2.0) * y) / (x - y);
double tmp_1;
if (y <= -1.6e+43) {
double tmp_2;
if (y != 0.0) {
tmp_2 = (x / ((x - y) / y)) * 2.0;
} else {
tmp_2 = t_0;
}
tmp_1 = tmp_2;
} else if (y <= 3e-30) {
double tmp_3;
if (x != 0.0) {
tmp_3 = (2.0 * y) / ((x - y) / x);
} else {
tmp_3 = t_0;
}
tmp_1 = tmp_3;
} else {
tmp_1 = ((2.0 * y) / (x - y)) * x;
}
return tmp_1;
}
def code(x, y):
return ((x * 2.0) * y) / (x - y)
↓
def code(x, y):
t_0 = ((x * 2.0) * y) / (x - y)
tmp_1 = 0
if y <= -1.6e+43:
tmp_2 = 0
if y != 0.0:
tmp_2 = (x / ((x - y) / y)) * 2.0
else:
tmp_2 = t_0
tmp_1 = tmp_2
elif y <= 3e-30:
tmp_3 = 0
if x != 0.0:
tmp_3 = (2.0 * y) / ((x - y) / x)
else:
tmp_3 = t_0
tmp_1 = tmp_3
else:
tmp_1 = ((2.0 * y) / (x - y)) * x
return tmp_1
function code(x, y)
return Float64(Float64(Float64(x * 2.0) * y) / Float64(x - y))
end
↓
function code(x, y)
t_0 = Float64(Float64(Float64(x * 2.0) * y) / Float64(x - y))
tmp_1 = 0.0
if (y <= -1.6e+43)
tmp_2 = 0.0
if (y != 0.0)
tmp_2 = Float64(Float64(x / Float64(Float64(x - y) / y)) * 2.0);
else
tmp_2 = t_0;
end
tmp_1 = tmp_2;
elseif (y <= 3e-30)
tmp_3 = 0.0
if (x != 0.0)
tmp_3 = Float64(Float64(2.0 * y) / Float64(Float64(x - y) / x));
else
tmp_3 = t_0;
end
tmp_1 = tmp_3;
else
tmp_1 = Float64(Float64(Float64(2.0 * y) / Float64(x - y)) * x);
end
return tmp_1
end
function tmp = code(x, y)
tmp = ((x * 2.0) * y) / (x - y);
end
↓
function tmp_5 = code(x, y)
t_0 = ((x * 2.0) * y) / (x - y);
tmp_2 = 0.0;
if (y <= -1.6e+43)
tmp_3 = 0.0;
if (y ~= 0.0)
tmp_3 = (x / ((x - y) / y)) * 2.0;
else
tmp_3 = t_0;
end
tmp_2 = tmp_3;
elseif (y <= 3e-30)
tmp_4 = 0.0;
if (x ~= 0.0)
tmp_4 = (2.0 * y) / ((x - y) / x);
else
tmp_4 = t_0;
end
tmp_2 = tmp_4;
else
tmp_2 = ((2.0 * y) / (x - y)) * x;
end
tmp_5 = tmp_2;
end
code[x_, y_] := N[(N[(N[(x * 2.0), $MachinePrecision] * y), $MachinePrecision] / N[(x - y), $MachinePrecision]), $MachinePrecision]
↓
code[x_, y_] := Block[{t$95$0 = N[(N[(N[(x * 2.0), $MachinePrecision] * y), $MachinePrecision] / N[(x - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.6e+43], If[Unequal[y, 0.0], N[(N[(x / N[(N[(x - y), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision], t$95$0], If[LessEqual[y, 3e-30], If[Unequal[x, 0.0], N[(N[(2.0 * y), $MachinePrecision] / N[(N[(x - y), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], t$95$0], N[(N[(N[(2.0 * y), $MachinePrecision] / N[(x - y), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]]]]
\frac{\left(x \cdot 2\right) \cdot y}{x - y}
↓
\begin{array}{l}
t_0 := \frac{\left(x \cdot 2\right) \cdot y}{x - y}\\
\mathbf{if}\;y \leq -1.6 \cdot 10^{+43}:\\
\;\;\;\;\begin{array}{l}
\mathbf{if}\;y \ne 0:\\
\;\;\;\;\frac{x}{\frac{x - y}{y}} \cdot 2\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}\\
\mathbf{elif}\;y \leq 3 \cdot 10^{-30}:\\
\;\;\;\;\begin{array}{l}
\mathbf{if}\;x \ne 0:\\
\;\;\;\;\frac{2 \cdot y}{\frac{x - y}{x}}\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}\\
\mathbf{else}:\\
\;\;\;\;\frac{2 \cdot y}{x - y} \cdot x\\
\end{array}
Alternatives
| Alternative 1 |
|---|
| Error | 0.6 |
|---|
| Cost | 3152 |
|---|
\[\begin{array}{l}
t_0 := \frac{\left(x \cdot 2\right) \cdot y}{x - y}\\
t_1 := \frac{2 \cdot y}{x - y} \cdot x\\
\mathbf{if}\;t_0 \leq -\infty:\\
\;\;\;\;\left(\frac{2}{x - y} \cdot y\right) \cdot x\\
\mathbf{elif}\;t_0 \leq -4 \cdot 10^{-307}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;t_0 \leq 2 \cdot 10^{-302}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t_0 \leq 5 \cdot 10^{-30}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
| Alternative 2 |
|---|
| Error | 0.2 |
|---|
| Cost | 972 |
|---|
\[\begin{array}{l}
\mathbf{if}\;y \leq -7 \cdot 10^{+42}:\\
\;\;\;\;\left(\frac{2}{x - y} \cdot y\right) \cdot x\\
\mathbf{elif}\;y \leq 8 \cdot 10^{-30}:\\
\;\;\;\;\begin{array}{l}
\mathbf{if}\;x \ne 0:\\
\;\;\;\;\frac{2 \cdot y}{\frac{x - y}{x}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(x \cdot 2\right) \cdot y}{x - y}\\
\end{array}\\
\mathbf{else}:\\
\;\;\;\;\frac{2 \cdot y}{x - y} \cdot x\\
\end{array}
\]
| Alternative 3 |
|---|
| Error | 0.2 |
|---|
| Cost | 968 |
|---|
\[\begin{array}{l}
\mathbf{if}\;y \leq -5.5 \cdot 10^{-47}:\\
\;\;\;\;\left(\frac{2}{x - y} \cdot y\right) \cdot x\\
\mathbf{elif}\;y \leq 5 \cdot 10^{-30}:\\
\;\;\;\;\left(\frac{-1}{y - x} \cdot x\right) \cdot \left(2 \cdot y\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{2 \cdot y}{x - y} \cdot x\\
\end{array}
\]
| Alternative 4 |
|---|
| Error | 4.2 |
|---|
| Cost | 840 |
|---|
\[\begin{array}{l}
t_0 := \left(\frac{2}{x - y} \cdot y\right) \cdot x\\
\mathbf{if}\;y \leq -4.9 \cdot 10^{-169}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y \leq 1.32 \cdot 10^{-101}:\\
\;\;\;\;2 \cdot y\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
| Alternative 5 |
|---|
| Error | 4.2 |
|---|
| Cost | 840 |
|---|
\[\begin{array}{l}
\mathbf{if}\;y \leq -2.7 \cdot 10^{-169}:\\
\;\;\;\;\left(\frac{2}{x - y} \cdot y\right) \cdot x\\
\mathbf{elif}\;y \leq 3 \cdot 10^{-101}:\\
\;\;\;\;2 \cdot y\\
\mathbf{else}:\\
\;\;\;\;\frac{2 \cdot y}{x - y} \cdot x\\
\end{array}
\]
| Alternative 6 |
|---|
| Error | 15.7 |
|---|
| Cost | 456 |
|---|
\[\begin{array}{l}
\mathbf{if}\;y \leq -1.65 \cdot 10^{-9}:\\
\;\;\;\;x \cdot -2\\
\mathbf{elif}\;y \leq 5.5 \cdot 10^{+25}:\\
\;\;\;\;2 \cdot y\\
\mathbf{else}:\\
\;\;\;\;x \cdot -2\\
\end{array}
\]
| Alternative 7 |
|---|
| Error | 31.5 |
|---|
| Cost | 192 |
|---|
\[2 \cdot y
\]