Math FPCore C Fortran Java Python Julia MATLAB Wolfram TeX \[\left(x + y\right) \cdot \left(1 - z\right)
\]
↓
\[\left(1 - z\right) \cdot x + \left(1 - z\right) \cdot y
\]
(FPCore (x y z) :precision binary64 (* (+ x y) (- 1.0 z))) ↓
(FPCore (x y z) :precision binary64 (+ (* (- 1.0 z) x) (* (- 1.0 z) 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) + ((1.0 - z) * 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) + ((1.0d0 - z) * 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) + ((1.0 - z) * y);
}
def code(x, y, z):
return (x + y) * (1.0 - z)
↓
def code(x, y, z):
return ((1.0 - z) * x) + ((1.0 - z) * y)
function code(x, y, z)
return Float64(Float64(x + y) * Float64(1.0 - z))
end
↓
function code(x, y, z)
return Float64(Float64(Float64(1.0 - z) * x) + Float64(Float64(1.0 - z) * 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) + ((1.0 - z) * y);
end
code[x_, y_, z_] := N[(N[(x + y), $MachinePrecision] * N[(1.0 - z), $MachinePrecision]), $MachinePrecision]
↓
code[x_, y_, z_] := N[(N[(N[(1.0 - z), $MachinePrecision] * x), $MachinePrecision] + N[(N[(1.0 - z), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]
\left(x + y\right) \cdot \left(1 - z\right)
↓
\left(1 - z\right) \cdot x + \left(1 - z\right) \cdot y
Alternatives Alternative 1 Error 12.6 Cost 1113
\[\begin{array}{l}
t_0 := \left(1 - z\right) \cdot x\\
t_1 := z \cdot \left(-y\right)\\
\mathbf{if}\;z \leq -2.1 \cdot 10^{+50}:\\
\;\;\;\;x \cdot \left(-z\right)\\
\mathbf{elif}\;z \leq -1.15 \cdot 10^{+17}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -4 \cdot 10^{-16}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq 2.6 \cdot 10^{-8}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;z \leq 7.1 \cdot 10^{+81} \lor \neg \left(z \leq 1.3 \cdot 10^{+219}\right):\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
Alternative 2 Error 12.7 Cost 1113
\[\begin{array}{l}
t_0 := z \cdot \left(-y\right)\\
\mathbf{if}\;z \leq -2.5 \cdot 10^{+50}:\\
\;\;\;\;x \cdot \left(-z\right)\\
\mathbf{elif}\;z \leq -4.6 \cdot 10^{+18}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq -4 \cdot 10^{-16}:\\
\;\;\;\;x - z \cdot x\\
\mathbf{elif}\;z \leq 2.2 \cdot 10^{-8}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;z \leq 6.2 \cdot 10^{+81} \lor \neg \left(z \leq 1.4 \cdot 10^{+219}\right):\\
\;\;\;\;\left(1 - z\right) \cdot x\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
Alternative 3 Error 13.1 Cost 1049
\[\begin{array}{l}
t_0 := x \cdot \left(-z\right)\\
t_1 := z \cdot \left(-y\right)\\
\mathbf{if}\;z \leq -1.2 \cdot 10^{+50}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq -4.9 \cdot 10^{+17}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -6.8:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq 1:\\
\;\;\;\;x + y\\
\mathbf{elif}\;z \leq 1.35 \cdot 10^{+84} \lor \neg \left(z \leq 1.32 \cdot 10^{+219}\right):\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
Alternative 4 Error 13.0 Cost 917
\[\begin{array}{l}
t_0 := x \cdot \left(-z\right)\\
\mathbf{if}\;z \leq -1.05 \cdot 10^{+50}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq -490:\\
\;\;\;\;\left(1 - z\right) \cdot y\\
\mathbf{elif}\;z \leq 1:\\
\;\;\;\;x + y\\
\mathbf{elif}\;z \leq 6 \cdot 10^{+81} \lor \neg \left(z \leq 1.4 \cdot 10^{+219}\right):\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;z \cdot \left(-y\right)\\
\end{array}
\]
Alternative 5 Error 1.8 Cost 905
\[\begin{array}{l}
\mathbf{if}\;1 - z \leq -1000 \lor \neg \left(1 - z \leq 2\right):\\
\;\;\;\;z \cdot \left(\left(-x\right) - y\right)\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\]
Alternative 6 Error 13.5 Cost 521
\[\begin{array}{l}
\mathbf{if}\;z \leq -120 \lor \neg \left(z \leq 1\right):\\
\;\;\;\;x \cdot \left(-z\right)\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\]
Alternative 7 Error 0.0 Cost 448
\[\left(1 - z\right) \cdot \left(x + y\right)
\]
Alternative 8 Error 40.2 Cost 196
\[\begin{array}{l}
\mathbf{if}\;x \leq -1.55 \cdot 10^{-162}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\]
Alternative 9 Error 24.1 Cost 192
\[x + y
\]
Alternative 10 Error 43.5 Cost 64
\[x
\]