Math FPCore C Fortran Java Python Julia MATLAB Wolfram TeX \[\left(x + y\right) \cdot \left(1 - z\right)
\]
↓
\[\left(\left(y + x\right) - y \cdot z\right) - z \cdot x
\]
(FPCore (x y z) :precision binary64 (* (+ x y) (- 1.0 z))) ↓
(FPCore (x y z) :precision binary64 (- (- (+ y x) (* y z)) (* z x))) double code(double x, double y, double z) {
return (x + y) * (1.0 - z);
}
↓
double code(double x, double y, double z) {
return ((y + x) - (y * z)) - (z * x);
}
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 = ((y + x) - (y * z)) - (z * x)
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 ((y + x) - (y * z)) - (z * x);
}
def code(x, y, z):
return (x + y) * (1.0 - z)
↓
def code(x, y, z):
return ((y + x) - (y * z)) - (z * x)
function code(x, y, z)
return Float64(Float64(x + y) * Float64(1.0 - z))
end
↓
function code(x, y, z)
return Float64(Float64(Float64(y + x) - Float64(y * z)) - Float64(z * x))
end
function tmp = code(x, y, z)
tmp = (x + y) * (1.0 - z);
end
↓
function tmp = code(x, y, z)
tmp = ((y + x) - (y * z)) - (z * x);
end
code[x_, y_, z_] := N[(N[(x + y), $MachinePrecision] * N[(1.0 - z), $MachinePrecision]), $MachinePrecision]
↓
code[x_, y_, z_] := N[(N[(N[(y + x), $MachinePrecision] - N[(y * z), $MachinePrecision]), $MachinePrecision] - N[(z * x), $MachinePrecision]), $MachinePrecision]
\left(x + y\right) \cdot \left(1 - z\right)
↓
\left(\left(y + x\right) - y \cdot z\right) - z \cdot x
Alternatives Alternative 1 Error 13.0 Cost 1360
\[\begin{array}{l}
t_0 := \left(-z\right) \cdot x\\
t_1 := y \cdot \left(1 - z\right)\\
\mathbf{if}\;1 - z \leq -2 \cdot 10^{+111}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;1 - z \leq 0.999:\\
\;\;\;\;t_1\\
\mathbf{elif}\;1 - z \leq 1.005:\\
\;\;\;\;y + x\\
\mathbf{elif}\;1 - z \leq 5 \cdot 10^{+169}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
Alternative 2 Error 12.7 Cost 980
\[\begin{array}{l}
t_0 := \left(1 - z\right) \cdot x\\
\mathbf{if}\;z \leq -9.5 \cdot 10^{+171}:\\
\;\;\;\;\left(-z\right) \cdot x\\
\mathbf{elif}\;z \leq -4.9 \cdot 10^{+38}:\\
\;\;\;\;z \cdot \left(-y\right)\\
\mathbf{elif}\;z \leq -6.6 \cdot 10^{-10}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq 1.55 \cdot 10^{-6}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;z \leq 3 \cdot 10^{+105}:\\
\;\;\;\;y \cdot \left(1 - z\right)\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
Alternative 3 Error 12.7 Cost 980
\[\begin{array}{l}
\mathbf{if}\;z \leq -2.6 \cdot 10^{+170}:\\
\;\;\;\;\left(-z\right) \cdot x\\
\mathbf{elif}\;z \leq -3.95 \cdot 10^{+40}:\\
\;\;\;\;z \cdot \left(-y\right)\\
\mathbf{elif}\;z \leq -6.6 \cdot 10^{-10}:\\
\;\;\;\;x - z \cdot x\\
\mathbf{elif}\;z \leq 5.2 \cdot 10^{-6}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;z \leq 3.4 \cdot 10^{+104}:\\
\;\;\;\;y \cdot \left(1 - z\right)\\
\mathbf{else}:\\
\;\;\;\;\left(1 - z\right) \cdot x\\
\end{array}
\]
Alternative 4 Error 13.1 Cost 916
\[\begin{array}{l}
t_0 := \left(-z\right) \cdot x\\
t_1 := z \cdot \left(-y\right)\\
\mathbf{if}\;z \leq -1.4 \cdot 10^{+175}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq -2.9 \cdot 10^{+40}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -230:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq 1:\\
\;\;\;\;y + x\\
\mathbf{elif}\;z \leq 4.5 \cdot 10^{+103}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
Alternative 5 Error 1.7 Cost 648
\[\begin{array}{l}
t_0 := \left(y + x\right) \cdot \left(-z\right)\\
\mathbf{if}\;z \leq -1:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq 1:\\
\;\;\;\;y + x\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
Alternative 6 Error 0.0 Cost 576
\[\left(x + y\right) - \left(x + y\right) \cdot z
\]
Alternative 7 Error 13.7 Cost 520
\[\begin{array}{l}
t_0 := z \cdot \left(-y\right)\\
\mathbf{if}\;z \leq -7 \cdot 10^{+14}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq 1:\\
\;\;\;\;y + x\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
Alternative 8 Error 39.4 Cost 460
\[\begin{array}{l}
\mathbf{if}\;y \leq 3.85 \cdot 10^{-72}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 0.00172:\\
\;\;\;\;y\\
\mathbf{elif}\;y \leq 102000000000:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\]
Alternative 9 Error 0.0 Cost 448
\[\left(x + y\right) \cdot \left(1 - z\right)
\]
Alternative 10 Error 24.2 Cost 192
\[y + x
\]
Alternative 11 Error 44.0 Cost 64
\[x
\]