\[x + \left(y - x\right) \cdot z
\]
↓
\[x + \left(y - x\right) \cdot z
\]
(FPCore (x y z) :precision binary64 (+ x (* (- y x) z)))
↓
(FPCore (x y z) :precision binary64 (+ x (* (- y x) z)))
double code(double x, double y, double z) {
return x + ((y - x) * z);
}
↓
double code(double x, double y, double z) {
return x + ((y - x) * z);
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = x + ((y - x) * z)
end function
↓
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = x + ((y - x) * z)
end function
public static double code(double x, double y, double z) {
return x + ((y - x) * z);
}
↓
public static double code(double x, double y, double z) {
return x + ((y - x) * z);
}
def code(x, y, z):
return x + ((y - x) * z)
↓
def code(x, y, z):
return x + ((y - x) * z)
function code(x, y, z)
return Float64(x + Float64(Float64(y - x) * z))
end
↓
function code(x, y, z)
return Float64(x + Float64(Float64(y - x) * z))
end
function tmp = code(x, y, z)
tmp = x + ((y - x) * z);
end
↓
function tmp = code(x, y, z)
tmp = x + ((y - x) * z);
end
code[x_, y_, z_] := N[(x + N[(N[(y - x), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]
↓
code[x_, y_, z_] := N[(x + N[(N[(y - x), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]
x + \left(y - x\right) \cdot z
↓
x + \left(y - x\right) \cdot z
Alternatives
| Alternative 1 |
|---|
| Accuracy | 63.4% |
|---|
| Cost | 652 |
|---|
\[\begin{array}{l}
\mathbf{if}\;z \leq -3.8 \cdot 10^{-50}:\\
\;\;\;\;y \cdot z\\
\mathbf{elif}\;z \leq 1.58 \cdot 10^{-15}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 14500000000000:\\
\;\;\;\;y \cdot z\\
\mathbf{else}:\\
\;\;\;\;z \cdot \left(-x\right)\\
\end{array}
\]
| Alternative 2 |
|---|
| Accuracy | 75.8% |
|---|
| Cost | 585 |
|---|
\[\begin{array}{l}
\mathbf{if}\;x \leq -2.8 \cdot 10^{-99} \lor \neg \left(x \leq 8 \cdot 10^{-106}\right):\\
\;\;\;\;x \cdot \left(1 - z\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot z\\
\end{array}
\]
| Alternative 3 |
|---|
| Accuracy | 79.9% |
|---|
| Cost | 585 |
|---|
\[\begin{array}{l}
\mathbf{if}\;x \leq -3.9 \cdot 10^{-75} \lor \neg \left(x \leq 0.008\right):\\
\;\;\;\;x \cdot \left(1 - z\right)\\
\mathbf{else}:\\
\;\;\;\;\left(y - x\right) \cdot z\\
\end{array}
\]
| Alternative 4 |
|---|
| Accuracy | 98.8% |
|---|
| Cost | 585 |
|---|
\[\begin{array}{l}
\mathbf{if}\;z \leq -1 \lor \neg \left(z \leq 0.22\right):\\
\;\;\;\;\left(y - x\right) \cdot z\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot z\\
\end{array}
\]
| Alternative 5 |
|---|
| Accuracy | 63.6% |
|---|
| Cost | 456 |
|---|
\[\begin{array}{l}
\mathbf{if}\;z \leq -1.3 \cdot 10^{-37}:\\
\;\;\;\;y \cdot z\\
\mathbf{elif}\;z \leq 4.4 \cdot 10^{-16}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y \cdot z\\
\end{array}
\]
| Alternative 6 |
|---|
| Accuracy | 45.7% |
|---|
| Cost | 64 |
|---|
\[x
\]