\[\left(x + y\right) \cdot \left(1 - z\right)
\]
↓
\[\left(1 - z\right) \cdot \left(x + y\right)
\]
(FPCore (x y z) :precision binary64 (* (+ x y) (- 1.0 z)))
↓
(FPCore (x y z) :precision binary64 (* (- 1.0 z) (+ x y)))
double code(double x, double y, double z) {
return (x + y) * (1.0 - z);
}
↓
double code(double x, double y, double z) {
return (1.0 - z) * (x + y);
}
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 = (1.0d0 - z) * (x + y)
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 (1.0 - z) * (x + y);
}
def code(x, y, z):
return (x + y) * (1.0 - z)
↓
def code(x, y, z):
return (1.0 - z) * (x + y)
function code(x, y, z)
return Float64(Float64(x + y) * Float64(1.0 - z))
end
↓
function code(x, y, z)
return Float64(Float64(1.0 - z) * Float64(x + y))
end
function tmp = code(x, y, z)
tmp = (x + y) * (1.0 - z);
end
↓
function tmp = code(x, y, z)
tmp = (1.0 - z) * (x + y);
end
code[x_, y_, z_] := N[(N[(x + y), $MachinePrecision] * N[(1.0 - z), $MachinePrecision]), $MachinePrecision]
↓
code[x_, y_, z_] := N[(N[(1.0 - z), $MachinePrecision] * N[(x + y), $MachinePrecision]), $MachinePrecision]
\left(x + y\right) \cdot \left(1 - z\right)
↓
\left(1 - z\right) \cdot \left(x + y\right)
Alternatives
| Alternative 1 |
|---|
| Error | 12.9 |
|---|
| Cost | 1880 |
|---|
\[\begin{array}{l}
t_0 := y \cdot \left(1 - z\right)\\
t_1 := x \cdot \left(-z\right)\\
\mathbf{if}\;1 - z \leq -5 \cdot 10^{+234}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;1 - z \leq -2 \cdot 10^{+38}:\\
\;\;\;\;y \cdot \left(-z\right)\\
\mathbf{elif}\;1 - z \leq -10000000000:\\
\;\;\;\;t_1\\
\mathbf{elif}\;1 - z \leq -500000:\\
\;\;\;\;t_0\\
\mathbf{elif}\;1 - z \leq 500000000:\\
\;\;\;\;x + y\\
\mathbf{elif}\;1 - z \leq 5 \cdot 10^{+131}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
| Alternative 2 |
|---|
| Error | 2.0 |
|---|
| Cost | 1424 |
|---|
\[\begin{array}{l}
t_0 := z \cdot \left(\left(-y\right) - x\right)\\
\mathbf{if}\;1 - z \leq -500000:\\
\;\;\;\;t_0\\
\mathbf{elif}\;1 - z \leq 1:\\
\;\;\;\;x + y\\
\mathbf{elif}\;1 - z \leq 500000000:\\
\;\;\;\;x - x \cdot z\\
\mathbf{elif}\;1 - z \leq 2 \cdot 10^{+17}:\\
\;\;\;\;y \cdot \left(1 - z\right)\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
| Alternative 3 |
|---|
| Error | 25.0 |
|---|
| Cost | 980 |
|---|
\[\begin{array}{l}
t_0 := x - x \cdot z\\
t_1 := y \cdot \left(1 - z\right)\\
\mathbf{if}\;y \leq 1.5114795816327223 \cdot 10^{-148}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y \leq 7.911858793683972 \cdot 10^{-110}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 9.838964024643599 \cdot 10^{-68}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;y \leq 284912895422498100:\\
\;\;\;\;y - y \cdot z\\
\mathbf{elif}\;y \leq 3.1222481688434846 \cdot 10^{+41}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
| Alternative 4 |
|---|
| Error | 12.7 |
|---|
| Cost | 848 |
|---|
\[\begin{array}{l}
t_0 := x \cdot \left(-z\right)\\
t_1 := y - y \cdot z\\
\mathbf{if}\;z \leq -3.7 \cdot 10^{+131}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq -1276315716.0921998:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 0.09971435489618234:\\
\;\;\;\;x + y\\
\mathbf{elif}\;z \leq 5.1 \cdot 10^{+234}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
| Alternative 5 |
|---|
| Error | 12.9 |
|---|
| Cost | 784 |
|---|
\[\begin{array}{l}
t_0 := x \cdot \left(-z\right)\\
t_1 := y \cdot \left(-z\right)\\
\mathbf{if}\;z \leq -3.7 \cdot 10^{+131}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq -1276315716.0921998:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 0.09971435489618234:\\
\;\;\;\;x + y\\
\mathbf{elif}\;z \leq 5.1 \cdot 10^{+234}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
| Alternative 6 |
|---|
| Error | 13.3 |
|---|
| Cost | 520 |
|---|
\[\begin{array}{l}
t_0 := x \cdot \left(-z\right)\\
\mathbf{if}\;z \leq -232907.12960139074:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq 0.09971435489618234:\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
| Alternative 7 |
|---|
| Error | 39.5 |
|---|
| Cost | 196 |
|---|
\[\begin{array}{l}
\mathbf{if}\;y \leq 1.5114795816327223 \cdot 10^{-148}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\]
| Alternative 8 |
|---|
| Error | 23.8 |
|---|
| Cost | 192 |
|---|
\[x + y
\]
| Alternative 9 |
|---|
| Error | 43.2 |
|---|
| Cost | 64 |
|---|
\[y
\]