\[\left(x + y\right) \cdot \left(1 - z\right)
\]
↓
\[\left(x + y\right) \cdot \left(1 - z\right)
\]
(FPCore (x y z) :precision binary64 (* (+ x y) (- 1.0 z)))
↓
(FPCore (x y z) :precision binary64 (* (+ x y) (- 1.0 z)))
double code(double x, double y, double z) {
return (x + y) * (1.0 - z);
}
↓
double code(double x, double y, double z) {
return (x + y) * (1.0 - 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) * (1.0d0 - 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) * (1.0d0 - z)
end function
public static double code(double x, double y, double z) {
return (x + y) * (1.0 - z);
}
↓
public static double code(double x, double y, double z) {
return (x + y) * (1.0 - z);
}
def code(x, y, z):
return (x + y) * (1.0 - z)
↓
def code(x, y, z):
return (x + y) * (1.0 - z)
function code(x, y, z)
return Float64(Float64(x + y) * Float64(1.0 - z))
end
↓
function code(x, y, z)
return Float64(Float64(x + y) * Float64(1.0 - z))
end
function tmp = code(x, y, z)
tmp = (x + y) * (1.0 - z);
end
↓
function tmp = code(x, y, z)
tmp = (x + y) * (1.0 - z);
end
code[x_, y_, z_] := N[(N[(x + y), $MachinePrecision] * N[(1.0 - z), $MachinePrecision]), $MachinePrecision]
↓
code[x_, y_, z_] := N[(N[(x + y), $MachinePrecision] * N[(1.0 - z), $MachinePrecision]), $MachinePrecision]
\left(x + y\right) \cdot \left(1 - z\right)
↓
\left(x + y\right) \cdot \left(1 - z\right)
Alternatives
| Alternative 1 |
|---|
| Error | 12.3 |
|---|
| Cost | 1880 |
|---|
\[\begin{array}{l}
t_0 := y \cdot \left(1 - z\right)\\
t_1 := z \cdot \left(-x\right)\\
\mathbf{if}\;1 - z \leq -1 \cdot 10^{+82}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;1 - z \leq -2 \cdot 10^{+50}:\\
\;\;\;\;z \cdot \left(-y\right)\\
\mathbf{elif}\;1 - z \leq -1 \cdot 10^{+30}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;1 - z \leq -1:\\
\;\;\;\;t_0\\
\mathbf{elif}\;1 - z \leq 1:\\
\;\;\;\;y + x\\
\mathbf{elif}\;1 - z \leq 10^{+51}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
| Alternative 2 |
|---|
| Error | 1.7 |
|---|
| Cost | 904 |
|---|
\[\begin{array}{l}
t_0 := \left(y + x\right) \cdot \left(-z\right)\\
\mathbf{if}\;1 - z \leq -1:\\
\;\;\;\;t_0\\
\mathbf{elif}\;1 - z \leq 2:\\
\;\;\;\;y + x\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
| Alternative 3 |
|---|
| Error | 12.6 |
|---|
| Cost | 652 |
|---|
\[\begin{array}{l}
t_0 := z \cdot \left(-x\right)\\
\mathbf{if}\;z \leq -1.15 \cdot 10^{+51}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq -190:\\
\;\;\;\;z \cdot \left(-y\right)\\
\mathbf{elif}\;z \leq 1:\\
\;\;\;\;y + x\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
| Alternative 4 |
|---|
| Error | 12.8 |
|---|
| Cost | 520 |
|---|
\[\begin{array}{l}
t_0 := z \cdot \left(-x\right)\\
\mathbf{if}\;z \leq -1960000:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq 1:\\
\;\;\;\;y + x\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
| Alternative 5 |
|---|
| Error | 24.3 |
|---|
| Cost | 452 |
|---|
\[\begin{array}{l}
\mathbf{if}\;y \leq 2.95 \cdot 10^{-102}:\\
\;\;\;\;\left(1 - z\right) \cdot x\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(1 - z\right)\\
\end{array}
\]
| Alternative 6 |
|---|
| Error | 38.6 |
|---|
| Cost | 196 |
|---|
\[\begin{array}{l}
\mathbf{if}\;y \leq 4.7 \cdot 10^{-101}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\]
| Alternative 7 |
|---|
| Error | 23.4 |
|---|
| Cost | 192 |
|---|
\[y + x
\]
| Alternative 8 |
|---|
| Error | 42.9 |
|---|
| Cost | 64 |
|---|
\[x
\]