Math FPCore C Fortran Java Python Julia MATLAB Wolfram TeX \[\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 100.0% Cost 576
\[\frac{x - y}{2 - \left(x + y\right)}
\]
Alternative 2 Accuracy 57.4% Cost 1376
\[\begin{array}{l}
t_0 := \frac{y}{x} + -1\\
\mathbf{if}\;x \leq -2800000:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq -3.2 \cdot 10^{-91}:\\
\;\;\;\;1\\
\mathbf{elif}\;x \leq -3 \cdot 10^{-127}:\\
\;\;\;\;x \cdot 0.5\\
\mathbf{elif}\;x \leq -3.5 \cdot 10^{-187}:\\
\;\;\;\;y \cdot -0.5\\
\mathbf{elif}\;x \leq -2.7 \cdot 10^{-235}:\\
\;\;\;\;x \cdot 0.5\\
\mathbf{elif}\;x \leq 1.2 \cdot 10^{-160}:\\
\;\;\;\;1\\
\mathbf{elif}\;x \leq 1.08 \cdot 10^{-44}:\\
\;\;\;\;x \cdot 0.5\\
\mathbf{elif}\;x \leq 4.8 \cdot 10^{+36}:\\
\;\;\;\;1\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
Alternative 3 Accuracy 71.1% Cost 1376
\[\begin{array}{l}
t_0 := \frac{x}{2 - x}\\
\mathbf{if}\;y \leq -3.8 \cdot 10^{+131}:\\
\;\;\;\;1\\
\mathbf{elif}\;y \leq -3.1 \cdot 10^{+100}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y \leq -1900000000:\\
\;\;\;\;1\\
\mathbf{elif}\;y \leq 1.15 \cdot 10^{-100}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y \leq 1.14 \cdot 10^{-60}:\\
\;\;\;\;y \cdot -0.5\\
\mathbf{elif}\;y \leq 2500000000:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y \leq 4.7 \cdot 10^{+122}:\\
\;\;\;\;1\\
\mathbf{elif}\;y \leq 3.9 \cdot 10^{+170}:\\
\;\;\;\;\frac{y}{x} + -1\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\]
Alternative 4 Accuracy 57.2% Cost 1120
\[\begin{array}{l}
\mathbf{if}\;x \leq -10000000:\\
\;\;\;\;-1\\
\mathbf{elif}\;x \leq -2.7 \cdot 10^{-90}:\\
\;\;\;\;1\\
\mathbf{elif}\;x \leq -1.9 \cdot 10^{-126}:\\
\;\;\;\;x \cdot 0.5\\
\mathbf{elif}\;x \leq -6.5 \cdot 10^{-188}:\\
\;\;\;\;y \cdot -0.5\\
\mathbf{elif}\;x \leq -2.7 \cdot 10^{-235}:\\
\;\;\;\;x \cdot 0.5\\
\mathbf{elif}\;x \leq 2.1 \cdot 10^{-161}:\\
\;\;\;\;1\\
\mathbf{elif}\;x \leq 4.4 \cdot 10^{-45}:\\
\;\;\;\;x \cdot 0.5\\
\mathbf{elif}\;x \leq 2.8 \cdot 10^{+37}:\\
\;\;\;\;1\\
\mathbf{else}:\\
\;\;\;\;-1\\
\end{array}
\]
Alternative 5 Accuracy 57.1% Cost 856
\[\begin{array}{l}
\mathbf{if}\;x \leq -6000000:\\
\;\;\;\;-1\\
\mathbf{elif}\;x \leq -2.8 \cdot 10^{-91}:\\
\;\;\;\;1\\
\mathbf{elif}\;x \leq -2.6 \cdot 10^{-235}:\\
\;\;\;\;x \cdot 0.5\\
\mathbf{elif}\;x \leq 1.3 \cdot 10^{-160}:\\
\;\;\;\;1\\
\mathbf{elif}\;x \leq 1.05 \cdot 10^{-45}:\\
\;\;\;\;x \cdot 0.5\\
\mathbf{elif}\;x \leq 1.35 \cdot 10^{+37}:\\
\;\;\;\;1\\
\mathbf{else}:\\
\;\;\;\;-1\\
\end{array}
\]
Alternative 6 Accuracy 74.7% Cost 648
\[\begin{array}{l}
\mathbf{if}\;x \leq -15200000:\\
\;\;\;\;\frac{x}{2 - x}\\
\mathbf{elif}\;x \leq 3.3 \cdot 10^{+36}:\\
\;\;\;\;\frac{y}{y + -2}\\
\mathbf{else}:\\
\;\;\;\;\frac{x - y}{-x}\\
\end{array}
\]
Alternative 7 Accuracy 74.7% Cost 584
\[\begin{array}{l}
\mathbf{if}\;x \leq -960000:\\
\;\;\;\;\frac{x}{2 - x}\\
\mathbf{elif}\;x \leq 2.85 \cdot 10^{+36}:\\
\;\;\;\;\frac{y}{y + -2}\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{x} + -1\\
\end{array}
\]
Alternative 8 Accuracy 62.3% Cost 328
\[\begin{array}{l}
\mathbf{if}\;x \leq -2000000:\\
\;\;\;\;-1\\
\mathbf{elif}\;x \leq 3.9 \cdot 10^{+36}:\\
\;\;\;\;1\\
\mathbf{else}:\\
\;\;\;\;-1\\
\end{array}
\]
Alternative 9 Accuracy 37.6% Cost 64
\[-1
\]