\[\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 | 1.3 |
|---|
| Cost | 776 |
|---|
\[\begin{array}{l}
t_0 := x \cdot y - 0.5 \cdot y\\
\mathbf{if}\;y \leq -7.5 \cdot 10^{+23}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y \leq 33000000000:\\
\;\;\;\;\left(-\left(1 - y\right) \cdot x\right) + 0.918938533204673\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
| Alternative 2 |
|---|
| Error | 1.2 |
|---|
| Cost | 712 |
|---|
\[\begin{array}{l}
\mathbf{if}\;y \leq -1.6 \cdot 10^{-8}:\\
\;\;\;\;y \cdot \left(x - 0.5\right) + 0.918938533204673\\
\mathbf{elif}\;y \leq 1.4:\\
\;\;\;\;\left(-x\right) + 0.918938533204673\\
\mathbf{else}:\\
\;\;\;\;x \cdot y - 0.5 \cdot y\\
\end{array}
\]
| Alternative 3 |
|---|
| Error | 0.0 |
|---|
| Cost | 640 |
|---|
\[\left(-\left(y \cdot \left(0.5 - x\right) + x\right)\right) + 0.918938533204673
\]
| Alternative 4 |
|---|
| Error | 28.8 |
|---|
| Cost | 588 |
|---|
\[\begin{array}{l}
\mathbf{if}\;y \leq -7.5 \cdot 10^{+23}:\\
\;\;\;\;y \cdot -0.5\\
\mathbf{elif}\;y \leq 1.7:\\
\;\;\;\;0.918938533204673\\
\mathbf{elif}\;y \leq 9.5 \cdot 10^{+74}:\\
\;\;\;\;y \cdot x\\
\mathbf{else}:\\
\;\;\;\;y \cdot -0.5\\
\end{array}
\]
| Alternative 5 |
|---|
| Error | 10.9 |
|---|
| Cost | 588 |
|---|
\[\begin{array}{l}
\mathbf{if}\;y \leq -7.5 \cdot 10^{+23}:\\
\;\;\;\;y \cdot -0.5\\
\mathbf{elif}\;y \leq 1.15:\\
\;\;\;\;\left(-x\right) + 0.918938533204673\\
\mathbf{elif}\;y \leq 2.7 \cdot 10^{+81}:\\
\;\;\;\;y \cdot x\\
\mathbf{else}:\\
\;\;\;\;y \cdot -0.5\\
\end{array}
\]
| Alternative 6 |
|---|
| Error | 1.5 |
|---|
| Cost | 584 |
|---|
\[\begin{array}{l}
t_0 := y \cdot \left(x - 0.5\right)\\
\mathbf{if}\;y \leq -1.42:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y \leq 1.1:\\
\;\;\;\;\left(-x\right) + 0.918938533204673\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
| Alternative 7 |
|---|
| Error | 1.2 |
|---|
| Cost | 584 |
|---|
\[\begin{array}{l}
t_0 := y \cdot \left(x - 0.5\right)\\
\mathbf{if}\;y \leq -3.3 \cdot 10^{-8}:\\
\;\;\;\;t_0 + 0.918938533204673\\
\mathbf{elif}\;y \leq 1.8:\\
\;\;\;\;\left(-x\right) + 0.918938533204673\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
| Alternative 8 |
|---|
| Error | 28.6 |
|---|
| Cost | 456 |
|---|
\[\begin{array}{l}
\mathbf{if}\;y \leq -7.5 \cdot 10^{+23}:\\
\;\;\;\;y \cdot -0.5\\
\mathbf{elif}\;y \leq 0.0118:\\
\;\;\;\;0.918938533204673\\
\mathbf{else}:\\
\;\;\;\;y \cdot -0.5\\
\end{array}
\]
| Alternative 9 |
|---|
| Error | 45.4 |
|---|
| Cost | 64 |
|---|
\[0.918938533204673
\]