\[\left(x \cdot \left(y - 1\right) - y \cdot 0.5\right) + 0.918938533204673
\]
↓
\[\left(x \cdot \left(y + -1\right) + y \cdot -0.5\right) + 0.918938533204673
\]
(FPCore (x y)
:precision binary64
(+ (- (* x (- y 1.0)) (* y 0.5)) 0.918938533204673))
↓
(FPCore (x y)
:precision binary64
(+ (+ (* x (+ y -1.0)) (* y -0.5)) 0.918938533204673))
double code(double x, double y) {
return ((x * (y - 1.0)) - (y * 0.5)) + 0.918938533204673;
}
↓
double code(double x, double y) {
return ((x * (y + -1.0)) + (y * -0.5)) + 0.918938533204673;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = ((x * (y - 1.0d0)) - (y * 0.5d0)) + 0.918938533204673d0
end function
↓
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = ((x * (y + (-1.0d0))) + (y * (-0.5d0))) + 0.918938533204673d0
end function
public static double code(double x, double y) {
return ((x * (y - 1.0)) - (y * 0.5)) + 0.918938533204673;
}
↓
public static double code(double x, double y) {
return ((x * (y + -1.0)) + (y * -0.5)) + 0.918938533204673;
}
def code(x, y):
return ((x * (y - 1.0)) - (y * 0.5)) + 0.918938533204673
↓
def code(x, y):
return ((x * (y + -1.0)) + (y * -0.5)) + 0.918938533204673
function code(x, y)
return Float64(Float64(Float64(x * Float64(y - 1.0)) - Float64(y * 0.5)) + 0.918938533204673)
end
↓
function code(x, y)
return Float64(Float64(Float64(x * Float64(y + -1.0)) + Float64(y * -0.5)) + 0.918938533204673)
end
function tmp = code(x, y)
tmp = ((x * (y - 1.0)) - (y * 0.5)) + 0.918938533204673;
end
↓
function tmp = code(x, y)
tmp = ((x * (y + -1.0)) + (y * -0.5)) + 0.918938533204673;
end
code[x_, y_] := N[(N[(N[(x * N[(y - 1.0), $MachinePrecision]), $MachinePrecision] - N[(y * 0.5), $MachinePrecision]), $MachinePrecision] + 0.918938533204673), $MachinePrecision]
↓
code[x_, y_] := N[(N[(N[(x * N[(y + -1.0), $MachinePrecision]), $MachinePrecision] + N[(y * -0.5), $MachinePrecision]), $MachinePrecision] + 0.918938533204673), $MachinePrecision]
\left(x \cdot \left(y - 1\right) - y \cdot 0.5\right) + 0.918938533204673
↓
\left(x \cdot \left(y + -1\right) + y \cdot -0.5\right) + 0.918938533204673
Alternatives
| Alternative 1 |
|---|
| Error | 44.45% |
|---|
| Cost | 1248 |
|---|
\[\begin{array}{l}
\mathbf{if}\;x \leq -1.2 \cdot 10^{+62}:\\
\;\;\;\;-x\\
\mathbf{elif}\;x \leq -2 \cdot 10^{+46}:\\
\;\;\;\;x \cdot y\\
\mathbf{elif}\;x \leq -1550:\\
\;\;\;\;-x\\
\mathbf{elif}\;x \leq -1.02 \cdot 10^{-280}:\\
\;\;\;\;y \cdot -0.5\\
\mathbf{elif}\;x \leq 1.8 \cdot 10^{-271}:\\
\;\;\;\;0.918938533204673\\
\mathbf{elif}\;x \leq 1.82 \cdot 10^{-68}:\\
\;\;\;\;y \cdot -0.5\\
\mathbf{elif}\;x \leq 7.8 \cdot 10^{-54}:\\
\;\;\;\;0.918938533204673\\
\mathbf{elif}\;x \leq 0.92:\\
\;\;\;\;y \cdot -0.5\\
\mathbf{else}:\\
\;\;\;\;-x\\
\end{array}
\]
| Alternative 2 |
|---|
| Error | 43.22% |
|---|
| Cost | 1116 |
|---|
\[\begin{array}{l}
\mathbf{if}\;y \leq -1.85:\\
\;\;\;\;y \cdot -0.5\\
\mathbf{elif}\;y \leq -9.5 \cdot 10^{-148}:\\
\;\;\;\;0.918938533204673\\
\mathbf{elif}\;y \leq 5.5 \cdot 10^{-298}:\\
\;\;\;\;-x\\
\mathbf{elif}\;y \leq 1.35 \cdot 10^{-133}:\\
\;\;\;\;0.918938533204673\\
\mathbf{elif}\;y \leq 1.22 \cdot 10^{-88}:\\
\;\;\;\;-x\\
\mathbf{elif}\;y \leq 2.02 \cdot 10^{-38}:\\
\;\;\;\;0.918938533204673\\
\mathbf{elif}\;y \leq 1.1:\\
\;\;\;\;-x\\
\mathbf{else}:\\
\;\;\;\;y \cdot -0.5\\
\end{array}
\]
| Alternative 3 |
|---|
| Error | 1.56% |
|---|
| Cost | 841 |
|---|
\[\begin{array}{l}
\mathbf{if}\;x \leq -430000 \lor \neg \left(x \leq 110000\right):\\
\;\;\;\;x \cdot \left(y + -1\right)\\
\mathbf{else}:\\
\;\;\;\;0.918938533204673 + \left(x \cdot y + y \cdot -0.5\right)\\
\end{array}
\]
| Alternative 4 |
|---|
| Error | 1.54% |
|---|
| Cost | 713 |
|---|
\[\begin{array}{l}
\mathbf{if}\;x \leq -320000 \lor \neg \left(x \leq 470000\right):\\
\;\;\;\;x \cdot \left(y + -1\right)\\
\mathbf{else}:\\
\;\;\;\;0.918938533204673 + y \cdot \left(x + -0.5\right)\\
\end{array}
\]
| Alternative 5 |
|---|
| Error | 2.37% |
|---|
| Cost | 712 |
|---|
\[\begin{array}{l}
\mathbf{if}\;y \leq -1.36:\\
\;\;\;\;y \cdot \left(x + -0.5\right)\\
\mathbf{elif}\;y \leq 1:\\
\;\;\;\;0.918938533204673 - x\\
\mathbf{else}:\\
\;\;\;\;x \cdot y + y \cdot -0.5\\
\end{array}
\]
| Alternative 6 |
|---|
| Error | 2.36% |
|---|
| Cost | 585 |
|---|
\[\begin{array}{l}
\mathbf{if}\;y \leq -1.42 \lor \neg \left(y \leq 1.6\right):\\
\;\;\;\;y \cdot \left(x + -0.5\right)\\
\mathbf{else}:\\
\;\;\;\;0.918938533204673 - x\\
\end{array}
\]
| Alternative 7 |
|---|
| Error | 0.02% |
|---|
| Cost | 576 |
|---|
\[\left(0.918938533204673 + y \cdot \left(x + -0.5\right)\right) - x
\]
| Alternative 8 |
|---|
| Error | 16.63% |
|---|
| Cost | 456 |
|---|
\[\begin{array}{l}
\mathbf{if}\;y \leq -78000000:\\
\;\;\;\;y \cdot -0.5\\
\mathbf{elif}\;y \leq 1.85:\\
\;\;\;\;0.918938533204673 - x\\
\mathbf{else}:\\
\;\;\;\;y \cdot -0.5\\
\end{array}
\]
| Alternative 9 |
|---|
| Error | 46.24% |
|---|
| Cost | 392 |
|---|
\[\begin{array}{l}
\mathbf{if}\;x \leq -8 \cdot 10^{-11}:\\
\;\;\;\;-x\\
\mathbf{elif}\;x \leq 2.65 \cdot 10^{-36}:\\
\;\;\;\;0.918938533204673\\
\mathbf{else}:\\
\;\;\;\;-x\\
\end{array}
\]
| Alternative 10 |
|---|
| Error | 70.43% |
|---|
| Cost | 64 |
|---|
\[0.918938533204673
\]