\[\left(x \cdot \left(y - 1\right) - y \cdot 0.5\right) + 0.918938533204673
\]
↓
\[\left(0.918938533204673 + y \cdot \left(x + -0.5\right)\right) - x
\]
(FPCore (x y)
:precision binary64
(+ (- (* x (- y 1.0)) (* y 0.5)) 0.918938533204673))
↓
(FPCore (x y) :precision binary64 (- (+ 0.918938533204673 (* y (+ x -0.5))) x))
double code(double x, double y) {
return ((x * (y - 1.0)) - (y * 0.5)) + 0.918938533204673;
}
↓
double code(double x, double y) {
return (0.918938533204673 + (y * (x + -0.5))) - x;
}
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 = (0.918938533204673d0 + (y * (x + (-0.5d0)))) - x
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 (0.918938533204673 + (y * (x + -0.5))) - x;
}
def code(x, y):
return ((x * (y - 1.0)) - (y * 0.5)) + 0.918938533204673
↓
def code(x, y):
return (0.918938533204673 + (y * (x + -0.5))) - x
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(0.918938533204673 + Float64(y * Float64(x + -0.5))) - x)
end
function tmp = code(x, y)
tmp = ((x * (y - 1.0)) - (y * 0.5)) + 0.918938533204673;
end
↓
function tmp = code(x, y)
tmp = (0.918938533204673 + (y * (x + -0.5))) - x;
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[(0.918938533204673 + N[(y * N[(x + -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]
\left(x \cdot \left(y - 1\right) - y \cdot 0.5\right) + 0.918938533204673
↓
\left(0.918938533204673 + y \cdot \left(x + -0.5\right)\right) - x
Alternatives
| Alternative 1 |
|---|
| Error | 1.0 |
|---|
| Cost | 841 |
|---|
\[\begin{array}{l}
\mathbf{if}\;y \leq -1.1 \cdot 10^{-9} \lor \neg \left(y \leq 1.2 \cdot 10^{-8}\right):\\
\;\;\;\;0.918938533204673 + \left(y \cdot x + y \cdot -0.5\right)\\
\mathbf{else}:\\
\;\;\;\;0.918938533204673 - x\\
\end{array}
\]
| Alternative 2 |
|---|
| Error | 28.8 |
|---|
| Cost | 588 |
|---|
\[\begin{array}{l}
\mathbf{if}\;y \leq -0.96:\\
\;\;\;\;y \cdot -0.5\\
\mathbf{elif}\;y \leq 1:\\
\;\;\;\;-x\\
\mathbf{elif}\;y \leq 10^{+149}:\\
\;\;\;\;y \cdot x\\
\mathbf{else}:\\
\;\;\;\;y \cdot -0.5\\
\end{array}
\]
| Alternative 3 |
|---|
| Error | 11.2 |
|---|
| Cost | 588 |
|---|
\[\begin{array}{l}
\mathbf{if}\;y \leq -170:\\
\;\;\;\;y \cdot -0.5\\
\mathbf{elif}\;y \leq 1.2:\\
\;\;\;\;0.918938533204673 - x\\
\mathbf{elif}\;y \leq 9.2 \cdot 10^{+148}:\\
\;\;\;\;y \cdot x\\
\mathbf{else}:\\
\;\;\;\;y \cdot -0.5\\
\end{array}
\]
| Alternative 4 |
|---|
| Error | 1.7 |
|---|
| Cost | 585 |
|---|
\[\begin{array}{l}
\mathbf{if}\;y \leq -1.45 \lor \neg \left(y \leq 1.42\right):\\
\;\;\;\;y \cdot \left(x + -0.5\right)\\
\mathbf{else}:\\
\;\;\;\;0.918938533204673 - x\\
\end{array}
\]
| Alternative 5 |
|---|
| Error | 1.7 |
|---|
| Cost | 584 |
|---|
\[\begin{array}{l}
\mathbf{if}\;y \leq -1.36:\\
\;\;\;\;y \cdot x + y \cdot -0.5\\
\mathbf{elif}\;y \leq 1.82:\\
\;\;\;\;0.918938533204673 - x\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(x + -0.5\right)\\
\end{array}
\]
| Alternative 6 |
|---|
| Error | 28.0 |
|---|
| Cost | 456 |
|---|
\[\begin{array}{l}
\mathbf{if}\;y \leq -1.15:\\
\;\;\;\;y \cdot -0.5\\
\mathbf{elif}\;y \leq 1.05:\\
\;\;\;\;-x\\
\mathbf{else}:\\
\;\;\;\;y \cdot -0.5\\
\end{array}
\]
| Alternative 7 |
|---|
| Error | 44.8 |
|---|
| Cost | 128 |
|---|
\[-x
\]