\[\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 | 27.7 |
|---|
| Cost | 1116 |
|---|
\[\begin{array}{l}
\mathbf{if}\;x \leq -0.92:\\
\;\;\;\;-x\\
\mathbf{elif}\;x \leq -1.35 \cdot 10^{-52}:\\
\;\;\;\;0.918938533204673\\
\mathbf{elif}\;x \leq -2.9 \cdot 10^{-166}:\\
\;\;\;\;y \cdot -0.5\\
\mathbf{elif}\;x \leq 9.4 \cdot 10^{-114}:\\
\;\;\;\;0.918938533204673\\
\mathbf{elif}\;x \leq 1.6 \cdot 10^{-34}:\\
\;\;\;\;y \cdot -0.5\\
\mathbf{elif}\;x \leq 6.5 \cdot 10^{-19}:\\
\;\;\;\;0.918938533204673\\
\mathbf{elif}\;x \leq 0.65:\\
\;\;\;\;y \cdot -0.5\\
\mathbf{else}:\\
\;\;\;\;-x\\
\end{array}
\]
| Alternative 2 |
|---|
| Error | 1.4 |
|---|
| Cost | 840 |
|---|
\[\begin{array}{l}
\mathbf{if}\;y \leq -4600:\\
\;\;\;\;x \cdot y + y \cdot -0.5\\
\mathbf{elif}\;y \leq 170000000:\\
\;\;\;\;\left(1.918938533204673 + \left(-1 - x\right)\right) + x \cdot y\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(x + -0.5\right)\\
\end{array}
\]
| Alternative 3 |
|---|
| Error | 0.3 |
|---|
| Cost | 704 |
|---|
\[\left(1.918938533204673 + \left(-1 - x\right)\right) + y \cdot \left(x + -0.5\right)
\]
| Alternative 4 |
|---|
| Error | 11.2 |
|---|
| Cost | 588 |
|---|
\[\begin{array}{l}
\mathbf{if}\;y \leq -25:\\
\;\;\;\;y \cdot -0.5\\
\mathbf{elif}\;y \leq 1.65:\\
\;\;\;\;0.918938533204673 - x\\
\mathbf{elif}\;y \leq 3.65 \cdot 10^{+140}:\\
\;\;\;\;x \cdot y\\
\mathbf{else}:\\
\;\;\;\;y \cdot -0.5\\
\end{array}
\]
| Alternative 5 |
|---|
| Error | 1.6 |
|---|
| Cost | 585 |
|---|
\[\begin{array}{l}
\mathbf{if}\;y \leq -1.55 \lor \neg \left(y \leq 1.5\right):\\
\;\;\;\;y \cdot \left(x + -0.5\right)\\
\mathbf{else}:\\
\;\;\;\;0.918938533204673 - x\\
\end{array}
\]
| Alternative 6 |
|---|
| Error | 1.6 |
|---|
| Cost | 584 |
|---|
\[\begin{array}{l}
\mathbf{if}\;y \leq -1.46:\\
\;\;\;\;x \cdot y + y \cdot -0.5\\
\mathbf{elif}\;y \leq 1.7:\\
\;\;\;\;0.918938533204673 - x\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(x + -0.5\right)\\
\end{array}
\]
| Alternative 7 |
|---|
| Error | 28.0 |
|---|
| Cost | 392 |
|---|
\[\begin{array}{l}
\mathbf{if}\;x \leq -0.92:\\
\;\;\;\;-x\\
\mathbf{elif}\;x \leq 6.6 \cdot 10^{-7}:\\
\;\;\;\;0.918938533204673\\
\mathbf{else}:\\
\;\;\;\;-x\\
\end{array}
\]
| Alternative 8 |
|---|
| Error | 45.1 |
|---|
| Cost | 64 |
|---|
\[0.918938533204673
\]