\[\left(x + 1\right) \cdot y - x
\]
↓
\[\left(y + y \cdot x\right) - x
\]
(FPCore (x y) :precision binary64 (- (* (+ x 1.0) y) x))
↓
(FPCore (x y) :precision binary64 (- (+ y (* y x)) x))
double code(double x, double y) {
return ((x + 1.0) * y) - x;
}
↓
double code(double x, double y) {
return (y + (y * x)) - x;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = ((x + 1.0d0) * y) - x
end function
↓
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = (y + (y * x)) - x
end function
public static double code(double x, double y) {
return ((x + 1.0) * y) - x;
}
↓
public static double code(double x, double y) {
return (y + (y * x)) - x;
}
def code(x, y):
return ((x + 1.0) * y) - x
↓
def code(x, y):
return (y + (y * x)) - x
function code(x, y)
return Float64(Float64(Float64(x + 1.0) * y) - x)
end
↓
function code(x, y)
return Float64(Float64(y + Float64(y * x)) - x)
end
function tmp = code(x, y)
tmp = ((x + 1.0) * y) - x;
end
↓
function tmp = code(x, y)
tmp = (y + (y * x)) - x;
end
code[x_, y_] := N[(N[(N[(x + 1.0), $MachinePrecision] * y), $MachinePrecision] - x), $MachinePrecision]
↓
code[x_, y_] := N[(N[(y + N[(y * x), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]
\left(x + 1\right) \cdot y - x
↓
\left(y + y \cdot x\right) - x
Alternatives
| Alternative 1 |
|---|
| Error | 21.1 |
|---|
| Cost | 1116 |
|---|
\[\begin{array}{l}
\mathbf{if}\;y \leq -2.462727838651239 \cdot 10^{+57}:\\
\;\;\;\;y\\
\mathbf{elif}\;y \leq -3591884723.9442334:\\
\;\;\;\;y \cdot x\\
\mathbf{elif}\;y \leq -1.1106876130983833 \cdot 10^{-38}:\\
\;\;\;\;y\\
\mathbf{elif}\;y \leq -1.4465926375257377 \cdot 10^{-57}:\\
\;\;\;\;-x\\
\mathbf{elif}\;y \leq -1.8756960272177727 \cdot 10^{-69}:\\
\;\;\;\;y\\
\mathbf{elif}\;y \leq 2.0821980638028852 \cdot 10^{-10}:\\
\;\;\;\;-x\\
\mathbf{elif}\;y \leq 1.8 \cdot 10^{+184}:\\
\;\;\;\;y \cdot x\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\]
| Alternative 2 |
|---|
| Error | 12.2 |
|---|
| Cost | 720 |
|---|
\[\begin{array}{l}
\mathbf{if}\;y \leq -2.462727838651239 \cdot 10^{+57}:\\
\;\;\;\;y - x\\
\mathbf{elif}\;y \leq -3591884723.9442334:\\
\;\;\;\;y \cdot x\\
\mathbf{elif}\;y \leq 2.873425183934111 \cdot 10^{-10}:\\
\;\;\;\;y - x\\
\mathbf{elif}\;y \leq 1.8 \cdot 10^{+184}:\\
\;\;\;\;y \cdot x\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\]
| Alternative 3 |
|---|
| Error | 1.1 |
|---|
| Cost | 584 |
|---|
\[\begin{array}{l}
t_0 := y + y \cdot x\\
\mathbf{if}\;y \leq -3591884723.9442334:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y \leq 2.0821980638028852 \cdot 10^{-10}:\\
\;\;\;\;y - x\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
| Alternative 4 |
|---|
| Error | 1.2 |
|---|
| Cost | 584 |
|---|
\[\begin{array}{l}
t_0 := x \cdot \left(y - 1\right)\\
\mathbf{if}\;x \leq -2.725095584507185 \cdot 10^{+19}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq 7.79806940227454 \cdot 10^{-7}:\\
\;\;\;\;y - x\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
| Alternative 5 |
|---|
| Error | 19.0 |
|---|
| Cost | 392 |
|---|
\[\begin{array}{l}
\mathbf{if}\;x \leq -5.183019914880556 \cdot 10^{-18}:\\
\;\;\;\;-x\\
\mathbf{elif}\;x \leq 2.22336810658957 \cdot 10^{-28}:\\
\;\;\;\;y\\
\mathbf{else}:\\
\;\;\;\;-x\\
\end{array}
\]
| Alternative 6 |
|---|
| Error | 36.5 |
|---|
| Cost | 64 |
|---|
\[y
\]