\[\frac{x - y}{1 - y}
\]
↓
\[\frac{y - x}{y + -1}
\]
(FPCore (x y) :precision binary64 (/ (- x y) (- 1.0 y)))
↓
(FPCore (x y) :precision binary64 (/ (- y x) (+ y -1.0)))
double code(double x, double y) {
return (x - y) / (1.0 - y);
}
↓
double code(double x, double y) {
return (y - x) / (y + -1.0);
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = (x - y) / (1.0d0 - y)
end function
↓
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = (y - x) / (y + (-1.0d0))
end function
public static double code(double x, double y) {
return (x - y) / (1.0 - y);
}
↓
public static double code(double x, double y) {
return (y - x) / (y + -1.0);
}
def code(x, y):
return (x - y) / (1.0 - y)
↓
def code(x, y):
return (y - x) / (y + -1.0)
function code(x, y)
return Float64(Float64(x - y) / Float64(1.0 - y))
end
↓
function code(x, y)
return Float64(Float64(y - x) / Float64(y + -1.0))
end
function tmp = code(x, y)
tmp = (x - y) / (1.0 - y);
end
↓
function tmp = code(x, y)
tmp = (y - x) / (y + -1.0);
end
code[x_, y_] := N[(N[(x - y), $MachinePrecision] / N[(1.0 - y), $MachinePrecision]), $MachinePrecision]
↓
code[x_, y_] := N[(N[(y - x), $MachinePrecision] / N[(y + -1.0), $MachinePrecision]), $MachinePrecision]
\frac{x - y}{1 - y}
↓
\frac{y - x}{y + -1}
Alternatives
| Alternative 1 |
|---|
| Error | 17.9 |
|---|
| Cost | 988 |
|---|
\[\begin{array}{l}
\mathbf{if}\;y \leq -4.15 \cdot 10^{+71}:\\
\;\;\;\;1\\
\mathbf{elif}\;y \leq -963087761.6241825:\\
\;\;\;\;-\frac{x}{y}\\
\mathbf{elif}\;y \leq 5.226740379858147 \cdot 10^{-126}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 1.2834374157684195 \cdot 10^{-102}:\\
\;\;\;\;-y\\
\mathbf{elif}\;y \leq 1.0725131574691057 \cdot 10^{-70}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 4.705181824743841 \cdot 10^{-30}:\\
\;\;\;\;-y\\
\mathbf{elif}\;y \leq 0.18645086324144028:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\]
| Alternative 2 |
|---|
| Error | 17.7 |
|---|
| Cost | 856 |
|---|
\[\begin{array}{l}
\mathbf{if}\;y \leq -1.1599504212554834 \cdot 10^{-13}:\\
\;\;\;\;1\\
\mathbf{elif}\;y \leq 5.226740379858147 \cdot 10^{-126}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 1.2834374157684195 \cdot 10^{-102}:\\
\;\;\;\;-y\\
\mathbf{elif}\;y \leq 1.0725131574691057 \cdot 10^{-70}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 4.705181824743841 \cdot 10^{-30}:\\
\;\;\;\;-y\\
\mathbf{elif}\;y \leq 0.18645086324144028:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\]
| Alternative 3 |
|---|
| Error | 9.5 |
|---|
| Cost | 716 |
|---|
\[\begin{array}{l}
\mathbf{if}\;y \leq -4.15 \cdot 10^{+71}:\\
\;\;\;\;1\\
\mathbf{elif}\;y \leq -963087761.6241825:\\
\;\;\;\;-\frac{x}{y}\\
\mathbf{elif}\;y \leq 0.18645086324144028:\\
\;\;\;\;x - y\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{y + -1}\\
\end{array}
\]
| Alternative 4 |
|---|
| Error | 9.5 |
|---|
| Cost | 716 |
|---|
\[\begin{array}{l}
\mathbf{if}\;y \leq -4.15 \cdot 10^{+71}:\\
\;\;\;\;1\\
\mathbf{elif}\;y \leq -963087761.6241825:\\
\;\;\;\;\frac{-x}{y + -1}\\
\mathbf{elif}\;y \leq 0.18645086324144028:\\
\;\;\;\;x - y\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{y + -1}\\
\end{array}
\]
| Alternative 5 |
|---|
| Error | 9.7 |
|---|
| Cost | 588 |
|---|
\[\begin{array}{l}
\mathbf{if}\;y \leq -4.15 \cdot 10^{+71}:\\
\;\;\;\;1\\
\mathbf{elif}\;y \leq -963087761.6241825:\\
\;\;\;\;-\frac{x}{y}\\
\mathbf{elif}\;y \leq 0.18645086324144028:\\
\;\;\;\;x - y\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\]
| Alternative 6 |
|---|
| Error | 17.1 |
|---|
| Cost | 328 |
|---|
\[\begin{array}{l}
\mathbf{if}\;y \leq -1.1599504212554834 \cdot 10^{-13}:\\
\;\;\;\;1\\
\mathbf{elif}\;y \leq 0.18645086324144028:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\]
| Alternative 7 |
|---|
| Error | 39.5 |
|---|
| Cost | 64 |
|---|
\[1
\]