\[\frac{x - y}{2 - \left(x + y\right)}
\]
↓
\[\frac{x - y}{2 - \left(x + y\right)}
\]
(FPCore (x y) :precision binary64 (/ (- x y) (- 2.0 (+ x y))))
↓
(FPCore (x y) :precision binary64 (/ (- x y) (- 2.0 (+ x y))))
double code(double x, double y) {
return (x - y) / (2.0 - (x + y));
}
↓
double code(double x, double y) {
return (x - y) / (2.0 - (x + y));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = (x - y) / (2.0d0 - (x + y))
end function
↓
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = (x - y) / (2.0d0 - (x + y))
end function
public static double code(double x, double y) {
return (x - y) / (2.0 - (x + y));
}
↓
public static double code(double x, double y) {
return (x - y) / (2.0 - (x + y));
}
def code(x, y):
return (x - y) / (2.0 - (x + y))
↓
def code(x, y):
return (x - y) / (2.0 - (x + y))
function code(x, y)
return Float64(Float64(x - y) / Float64(2.0 - Float64(x + y)))
end
↓
function code(x, y)
return Float64(Float64(x - y) / Float64(2.0 - Float64(x + y)))
end
function tmp = code(x, y)
tmp = (x - y) / (2.0 - (x + y));
end
↓
function tmp = code(x, y)
tmp = (x - y) / (2.0 - (x + y));
end
code[x_, y_] := N[(N[(x - y), $MachinePrecision] / N[(2.0 - N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
↓
code[x_, y_] := N[(N[(x - y), $MachinePrecision] / N[(2.0 - N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\frac{x - y}{2 - \left(x + y\right)}
↓
\frac{x - y}{2 - \left(x + y\right)}
Alternatives
| Alternative 1 |
|---|
| Accuracy | 62.4% |
|---|
| Cost | 1376 |
|---|
\[\begin{array}{l}
t_0 := 1 + \frac{2}{y}\\
\mathbf{if}\;y \leq -1.02 \cdot 10^{+120}:\\
\;\;\;\;1\\
\mathbf{elif}\;y \leq -3.4 \cdot 10^{+102}:\\
\;\;\;\;-1\\
\mathbf{elif}\;y \leq -65000000000:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y \leq -1.9 \cdot 10^{-36}:\\
\;\;\;\;-1\\
\mathbf{elif}\;y \leq -2.55 \cdot 10^{-70}:\\
\;\;\;\;y \cdot -0.5\\
\mathbf{elif}\;y \leq -1.36 \cdot 10^{-272}:\\
\;\;\;\;-1\\
\mathbf{elif}\;y \leq 2.3 \cdot 10^{-286}:\\
\;\;\;\;x \cdot 0.5\\
\mathbf{elif}\;y \leq 8600:\\
\;\;\;\;-1\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
| Alternative 2 |
|---|
| Accuracy | 62.6% |
|---|
| Cost | 1376 |
|---|
\[\begin{array}{l}
t_0 := 1 - \frac{x}{y}\\
\mathbf{if}\;y \leq -1.02 \cdot 10^{+120}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y \leq -3.4 \cdot 10^{+102}:\\
\;\;\;\;-1\\
\mathbf{elif}\;y \leq -500000000000:\\
\;\;\;\;1 + \frac{2}{y}\\
\mathbf{elif}\;y \leq -4.4 \cdot 10^{-35}:\\
\;\;\;\;-1\\
\mathbf{elif}\;y \leq -2.35 \cdot 10^{-69}:\\
\;\;\;\;y \cdot -0.5\\
\mathbf{elif}\;y \leq -2.1 \cdot 10^{-272}:\\
\;\;\;\;-1\\
\mathbf{elif}\;y \leq 2.65 \cdot 10^{-284}:\\
\;\;\;\;x \cdot 0.5\\
\mathbf{elif}\;y \leq 420000000000:\\
\;\;\;\;-1\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
| Alternative 3 |
|---|
| Accuracy | 74.0% |
|---|
| Cost | 1242 |
|---|
\[\begin{array}{l}
t_0 := \frac{y}{y + \left(x + -2\right)}\\
\mathbf{if}\;y \leq -1.02 \cdot 10^{+120}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y \leq -3.1 \cdot 10^{+102}:\\
\;\;\;\;-1\\
\mathbf{elif}\;y \leq -105000000000 \lor \neg \left(y \leq -4.1 \cdot 10^{-35}\right) \land \left(y \leq -5.1 \cdot 10^{-70} \lor \neg \left(y \leq 3.1 \cdot 10^{-52}\right)\right):\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{2 - x}\\
\end{array}
\]
| Alternative 4 |
|---|
| Accuracy | 74.0% |
|---|
| Cost | 1242 |
|---|
\[\begin{array}{l}
\mathbf{if}\;y \leq -1.02 \cdot 10^{+120}:\\
\;\;\;\;\frac{2 - \left(x + x\right)}{y} + 1\\
\mathbf{elif}\;y \leq -3.4 \cdot 10^{+102}:\\
\;\;\;\;-1\\
\mathbf{elif}\;y \leq -145000000000 \lor \neg \left(y \leq -2.8 \cdot 10^{-35} \lor \neg \left(y \leq -5 \cdot 10^{-70}\right) \land y \leq 1.45 \cdot 10^{-52}\right):\\
\;\;\;\;\frac{y}{y + \left(x + -2\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{2 - x}\\
\end{array}
\]
| Alternative 5 |
|---|
| Accuracy | 62.3% |
|---|
| Cost | 1120 |
|---|
\[\begin{array}{l}
\mathbf{if}\;y \leq -1.02 \cdot 10^{+120}:\\
\;\;\;\;1\\
\mathbf{elif}\;y \leq -3.4 \cdot 10^{+102}:\\
\;\;\;\;-1\\
\mathbf{elif}\;y \leq -500000000000:\\
\;\;\;\;1\\
\mathbf{elif}\;y \leq -1.65 \cdot 10^{-36}:\\
\;\;\;\;-1\\
\mathbf{elif}\;y \leq -1.32 \cdot 10^{-70}:\\
\;\;\;\;y \cdot -0.5\\
\mathbf{elif}\;y \leq -2.25 \cdot 10^{-272}:\\
\;\;\;\;-1\\
\mathbf{elif}\;y \leq 3.7 \cdot 10^{-284}:\\
\;\;\;\;x \cdot 0.5\\
\mathbf{elif}\;y \leq 24500000000:\\
\;\;\;\;-1\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\]
| Alternative 6 |
|---|
| Accuracy | 73.8% |
|---|
| Cost | 1113 |
|---|
\[\begin{array}{l}
\mathbf{if}\;y \leq -1.02 \cdot 10^{+120}:\\
\;\;\;\;1 - \frac{x}{y}\\
\mathbf{elif}\;y \leq -2 \cdot 10^{+102}:\\
\;\;\;\;-1\\
\mathbf{elif}\;y \leq -300000000000:\\
\;\;\;\;1 + \frac{2}{y}\\
\mathbf{elif}\;y \leq -2.7 \cdot 10^{-36} \lor \neg \left(y \leq -6.5 \cdot 10^{-70}\right) \land y \leq 3.4 \cdot 10^{-53}:\\
\;\;\;\;\frac{x}{2 - x}\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{y + -2}\\
\end{array}
\]
| Alternative 7 |
|---|
| Accuracy | 74.2% |
|---|
| Cost | 1112 |
|---|
\[\begin{array}{l}
t_0 := 1 - \frac{x}{y}\\
t_1 := \frac{x}{2 - x}\\
\mathbf{if}\;y \leq -3.8 \cdot 10^{+120}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y \leq -3.4 \cdot 10^{+102}:\\
\;\;\;\;-1\\
\mathbf{elif}\;y \leq -1850000000000:\\
\;\;\;\;1 + \frac{2}{y}\\
\mathbf{elif}\;y \leq -1.65 \cdot 10^{-35}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -3.6 \cdot 10^{-69}:\\
\;\;\;\;y \cdot -0.5\\
\mathbf{elif}\;y \leq 3550000000000:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
| Alternative 8 |
|---|
| Accuracy | 62.2% |
|---|
| Cost | 856 |
|---|
\[\begin{array}{l}
\mathbf{if}\;y \leq -1.4 \cdot 10^{+120}:\\
\;\;\;\;1\\
\mathbf{elif}\;y \leq -3.4 \cdot 10^{+102}:\\
\;\;\;\;-1\\
\mathbf{elif}\;y \leq -1450000000000:\\
\;\;\;\;1\\
\mathbf{elif}\;y \leq -6.5 \cdot 10^{-36}:\\
\;\;\;\;-1\\
\mathbf{elif}\;y \leq -1.3 \cdot 10^{-69}:\\
\;\;\;\;y \cdot -0.5\\
\mathbf{elif}\;y \leq 220000000:\\
\;\;\;\;-1\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\]
| Alternative 9 |
|---|
| Accuracy | 62.5% |
|---|
| Cost | 592 |
|---|
\[\begin{array}{l}
\mathbf{if}\;y \leq -3.8 \cdot 10^{+120}:\\
\;\;\;\;1\\
\mathbf{elif}\;y \leq -2 \cdot 10^{+102}:\\
\;\;\;\;-1\\
\mathbf{elif}\;y \leq -2150000000000:\\
\;\;\;\;1\\
\mathbf{elif}\;y \leq 250000000:\\
\;\;\;\;-1\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\]
| Alternative 10 |
|---|
| Accuracy | 38.3% |
|---|
| Cost | 64 |
|---|
\[-1
\]