\[\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 | 1.7 |
|---|
| Cost | 904 |
|---|
\[\begin{array}{l}
t_0 := z \cdot \left(\left(-y\right) - x\right)\\
\mathbf{if}\;1 - z \leq -1:\\
\;\;\;\;t_0\\
\mathbf{elif}\;1 - z \leq 2:\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
| Alternative 2 |
|---|
| Error | 12.7 |
|---|
| Cost | 848 |
|---|
\[\begin{array}{l}
t_0 := y \cdot \left(-z\right)\\
\mathbf{if}\;z \leq -1.22 \cdot 10^{+35}:\\
\;\;\;\;x \cdot \left(-z\right)\\
\mathbf{elif}\;z \leq -1569656.80020315:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq 7.922054069000986 \cdot 10^{-11}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;z \leq 137918518.19776228:\\
\;\;\;\;x - x \cdot z\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
| Alternative 3 |
|---|
| Error | 12.5 |
|---|
| Cost | 716 |
|---|
\[\begin{array}{l}
t_0 := y \cdot \left(1 - z\right)\\
\mathbf{if}\;z \leq -1.22 \cdot 10^{+35}:\\
\;\;\;\;x \cdot \left(-z\right)\\
\mathbf{elif}\;z \leq -0.0010153119489744239:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq 4.4552649754634 \cdot 10^{-6}:\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
| Alternative 4 |
|---|
| Error | 13.0 |
|---|
| Cost | 652 |
|---|
\[\begin{array}{l}
t_0 := y \cdot \left(-z\right)\\
\mathbf{if}\;z \leq -1.22 \cdot 10^{+35}:\\
\;\;\;\;x \cdot \left(-z\right)\\
\mathbf{elif}\;z \leq -1569656.80020315:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq 0.31326431225840107:\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
| Alternative 5 |
|---|
| Error | 12.7 |
|---|
| Cost | 520 |
|---|
\[\begin{array}{l}
t_0 := y \cdot \left(-z\right)\\
\mathbf{if}\;z \leq -1569656.80020315:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq 0.31326431225840107:\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
| Alternative 6 |
|---|
| Error | 38.8 |
|---|
| Cost | 460 |
|---|
\[\begin{array}{l}
\mathbf{if}\;x \leq -0.0021538445002805186:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq -1.2311439335666232 \cdot 10^{-54}:\\
\;\;\;\;y\\
\mathbf{elif}\;x \leq -1.0437138918385737 \cdot 10^{-148}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\]
| Alternative 7 |
|---|
| Error | 23.6 |
|---|
| Cost | 192 |
|---|
\[x + y
\]
| Alternative 8 |
|---|
| Error | 43.4 |
|---|
| Cost | 64 |
|---|
\[x
\]