\[1 - \frac{\left(1 - x\right) \cdot y}{y + 1}
\]
↓
\[\begin{array}{l}
t_0 := \frac{1}{y} + x\\
\mathbf{if}\;y \leq -9.2 \cdot 10^{+16}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y \leq 50000000000:\\
\;\;\;\;1 - \frac{\left(1 - x\right) \cdot y}{y + 1}\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
(FPCore (x y) :precision binary64 (- 1.0 (/ (* (- 1.0 x) y) (+ y 1.0))))
↓
(FPCore (x y)
:precision binary64
(let* ((t_0 (+ (/ 1.0 y) x)))
(if (<= y -9.2e+16)
t_0
(if (<= y 50000000000.0) (- 1.0 (/ (* (- 1.0 x) y) (+ y 1.0))) t_0))))double code(double x, double y) {
return 1.0 - (((1.0 - x) * y) / (y + 1.0));
}
↓
double code(double x, double y) {
double t_0 = (1.0 / y) + x;
double tmp;
if (y <= -9.2e+16) {
tmp = t_0;
} else if (y <= 50000000000.0) {
tmp = 1.0 - (((1.0 - x) * y) / (y + 1.0));
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = 1.0d0 - (((1.0d0 - x) * y) / (y + 1.0d0))
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
t_0 = (1.0d0 / y) + x
if (y <= (-9.2d+16)) then
tmp = t_0
else if (y <= 50000000000.0d0) then
tmp = 1.0d0 - (((1.0d0 - x) * y) / (y + 1.0d0))
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y) {
return 1.0 - (((1.0 - x) * y) / (y + 1.0));
}
↓
public static double code(double x, double y) {
double t_0 = (1.0 / y) + x;
double tmp;
if (y <= -9.2e+16) {
tmp = t_0;
} else if (y <= 50000000000.0) {
tmp = 1.0 - (((1.0 - x) * y) / (y + 1.0));
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y):
return 1.0 - (((1.0 - x) * y) / (y + 1.0))
↓
def code(x, y):
t_0 = (1.0 / y) + x
tmp = 0
if y <= -9.2e+16:
tmp = t_0
elif y <= 50000000000.0:
tmp = 1.0 - (((1.0 - x) * y) / (y + 1.0))
else:
tmp = t_0
return tmp
function code(x, y)
return Float64(1.0 - Float64(Float64(Float64(1.0 - x) * y) / Float64(y + 1.0)))
end
↓
function code(x, y)
t_0 = Float64(Float64(1.0 / y) + x)
tmp = 0.0
if (y <= -9.2e+16)
tmp = t_0;
elseif (y <= 50000000000.0)
tmp = Float64(1.0 - Float64(Float64(Float64(1.0 - x) * y) / Float64(y + 1.0)));
else
tmp = t_0;
end
return tmp
end
function tmp = code(x, y)
tmp = 1.0 - (((1.0 - x) * y) / (y + 1.0));
end
↓
function tmp_2 = code(x, y)
t_0 = (1.0 / y) + x;
tmp = 0.0;
if (y <= -9.2e+16)
tmp = t_0;
elseif (y <= 50000000000.0)
tmp = 1.0 - (((1.0 - x) * y) / (y + 1.0));
else
tmp = t_0;
end
tmp_2 = tmp;
end
code[x_, y_] := N[(1.0 - N[(N[(N[(1.0 - x), $MachinePrecision] * y), $MachinePrecision] / N[(y + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
↓
code[x_, y_] := Block[{t$95$0 = N[(N[(1.0 / y), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[y, -9.2e+16], t$95$0, If[LessEqual[y, 50000000000.0], N[(1.0 - N[(N[(N[(1.0 - x), $MachinePrecision] * y), $MachinePrecision] / N[(y + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]
1 - \frac{\left(1 - x\right) \cdot y}{y + 1}
↓
\begin{array}{l}
t_0 := \frac{1}{y} + x\\
\mathbf{if}\;y \leq -9.2 \cdot 10^{+16}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y \leq 50000000000:\\
\;\;\;\;1 - \frac{\left(1 - x\right) \cdot y}{y + 1}\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
Alternatives
| Alternative 1 |
|---|
| Error | 0.9 |
|---|
| Cost | 904 |
|---|
\[\begin{array}{l}
t_0 := \frac{1}{y} + x\\
\mathbf{if}\;y \leq -4.6 \cdot 10^{+142}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y \leq 6.4 \cdot 10^{+15}:\\
\;\;\;\;\frac{\left(-y \cdot x\right) - 1}{-1 - y}\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
| Alternative 2 |
|---|
| Error | 1.3 |
|---|
| Cost | 712 |
|---|
\[\begin{array}{l}
t_0 := \frac{1 - x}{y} + x\\
\mathbf{if}\;y \leq -1:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y \leq 1.2:\\
\;\;\;\;1 - \left(-y \cdot x\right)\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
| Alternative 3 |
|---|
| Error | 1.1 |
|---|
| Cost | 712 |
|---|
\[\begin{array}{l}
t_0 := \frac{1 - x}{y} + x\\
\mathbf{if}\;y \leq -1:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y \leq 1:\\
\;\;\;\;1 - y \cdot \left(1 - x\right)\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
| Alternative 4 |
|---|
| Error | 1.5 |
|---|
| Cost | 648 |
|---|
\[\begin{array}{l}
t_0 := \frac{1}{y} + x\\
\mathbf{if}\;y \leq -1:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y \leq 1:\\
\;\;\;\;1 - \left(-y \cdot x\right)\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
| Alternative 5 |
|---|
| Error | 9.0 |
|---|
| Cost | 584 |
|---|
\[\begin{array}{l}
t_0 := \frac{1}{y} + x\\
\mathbf{if}\;y \leq -1:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y \leq 0.14:\\
\;\;\;\;1 - y\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
| Alternative 6 |
|---|
| Error | 8.8 |
|---|
| Cost | 584 |
|---|
\[\begin{array}{l}
t_0 := \frac{1}{y} + x\\
\mathbf{if}\;y \leq -1150000:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y \leq 2.1:\\
\;\;\;\;\frac{-1}{-1 - y}\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
| Alternative 7 |
|---|
| Error | 16.6 |
|---|
| Cost | 456 |
|---|
\[\begin{array}{l}
\mathbf{if}\;y \leq -1:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 0.6:\\
\;\;\;\;1 - y\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\]
| Alternative 8 |
|---|
| Error | 17.4 |
|---|
| Cost | 328 |
|---|
\[\begin{array}{l}
\mathbf{if}\;y \leq -1:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 3 \cdot 10^{+26}:\\
\;\;\;\;1\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\]
| Alternative 9 |
|---|
| Error | 38.8 |
|---|
| Cost | 64 |
|---|
\[1
\]