Math FPCore C Fortran Java Python Julia MATLAB Wolfram TeX \[\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 Accuracy 100.0% Cost 448
\[\left(1 - z\right) \cdot \left(x + y\right)
\]
Alternative 2 Accuracy 74.8% 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 -2 \cdot 10^{+202}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;1 - z \leq -5 \cdot 10^{+148}:\\
\;\;\;\;z \cdot \left(-y\right)\\
\mathbf{elif}\;1 - z \leq -4 \cdot 10^{+103}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;1 - z \leq -2000000000:\\
\;\;\;\;t_0\\
\mathbf{elif}\;1 - z \leq 2:\\
\;\;\;\;x + y\\
\mathbf{elif}\;1 - z \leq 10^{+249}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
Alternative 3 Accuracy 74.4% Cost 1445
\[\begin{array}{l}
t_0 := x \cdot \left(-z\right)\\
t_1 := z \cdot \left(-y\right)\\
\mathbf{if}\;z \leq -1.1 \cdot 10^{+250}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq -8.5 \cdot 10^{+176}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -1.4 \cdot 10^{+160}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq -3.1 \cdot 10^{+103}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -650000000:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq 1:\\
\;\;\;\;x + y\\
\mathbf{elif}\;z \leq 6.5 \cdot 10^{+102} \lor \neg \left(z \leq 1.55 \cdot 10^{+147}\right) \land z \leq 4.4 \cdot 10^{+187}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
Alternative 4 Accuracy 97.6% Cost 905
\[\begin{array}{l}
\mathbf{if}\;1 - z \leq -2000000000 \lor \neg \left(1 - z \leq 2\right):\\
\;\;\;\;z \cdot \left(\left(-x\right) - y\right)\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\]
Alternative 5 Accuracy 74.7% Cost 521
\[\begin{array}{l}
\mathbf{if}\;z \leq -650000000 \lor \neg \left(z \leq 1\right):\\
\;\;\;\;x \cdot \left(-z\right)\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\]
Alternative 6 Accuracy 63.4% Cost 452
\[\begin{array}{l}
\mathbf{if}\;y \leq 8 \cdot 10^{-49}:\\
\;\;\;\;x \cdot \left(1 - z\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(1 - z\right)\\
\end{array}
\]
Alternative 7 Accuracy 32.1% Cost 196
\[\begin{array}{l}
\mathbf{if}\;x \leq -3.2 \cdot 10^{-57}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\]
Alternative 8 Accuracy 50.5% Cost 192
\[x + y
\]
Alternative 9 Accuracy 26.0% Cost 64
\[x
\]