Math FPCore C Fortran Java Python Julia MATLAB Wolfram TeX \[\left(x + y\right) \cdot \left(1 - z\right)
\]
↓
\[-1 \cdot \left(\left(y + x\right) \cdot z\right) + \left(y + x\right)
\]
(FPCore (x y z) :precision binary64 (* (+ x y) (- 1.0 z))) ↓
(FPCore (x y z) :precision binary64 (+ (* -1.0 (* (+ y x) z)) (+ y x))) 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 * ((y + x) * z)) + (y + 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 = ((-1.0d0) * ((y + x) * z)) + (y + 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 (-1.0 * ((y + x) * z)) + (y + x);
}
def code(x, y, z):
return (x + y) * (1.0 - z)
↓
def code(x, y, z):
return (-1.0 * ((y + x) * z)) + (y + x)
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 * Float64(Float64(y + x) * z)) + Float64(y + x))
end
function tmp = code(x, y, z)
tmp = (x + y) * (1.0 - z);
end
↓
function tmp = code(x, y, z)
tmp = (-1.0 * ((y + x) * z)) + (y + x);
end
code[x_, y_, z_] := N[(N[(x + y), $MachinePrecision] * N[(1.0 - z), $MachinePrecision]), $MachinePrecision]
↓
code[x_, y_, z_] := N[(N[(-1.0 * N[(N[(y + x), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision] + N[(y + x), $MachinePrecision]), $MachinePrecision]
\left(x + y\right) \cdot \left(1 - z\right)
↓
-1 \cdot \left(\left(y + x\right) \cdot z\right) + \left(y + x\right)
Alternatives Alternative 1 Error 12.6 Cost 840
\[\begin{array}{l}
t_0 := y \cdot \left(1 - z\right)\\
\mathbf{if}\;1 - z \leq 0.95:\\
\;\;\;\;t_0\\
\mathbf{elif}\;1 - z \leq 1.05:\\
\;\;\;\;y + x\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
Alternative 2 Error 1.7 Cost 780
\[\begin{array}{l}
t_0 := \left(y + x\right) \cdot \left(-z\right)\\
\mathbf{if}\;z \leq -1:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq 9.6 \cdot 10^{-7}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;z \leq 480000000:\\
\;\;\;\;\left(1 - z\right) \cdot x\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
Alternative 3 Error 25.9 Cost 716
\[\begin{array}{l}
t_0 := \left(1 - z\right) \cdot x\\
t_1 := y \cdot \left(1 - z\right)\\
\mathbf{if}\;x \leq -7.2 \cdot 10^{-13}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq -6.6 \cdot 10^{-53}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq -1.35 \cdot 10^{-161}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
Alternative 4 Error 26.0 Cost 716
\[\begin{array}{l}
t_0 := y \cdot \left(1 - z\right)\\
\mathbf{if}\;x \leq -4.2 \cdot 10^{-15}:\\
\;\;\;\;x - z \cdot x\\
\mathbf{elif}\;x \leq -1.7 \cdot 10^{-52}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq -1.35 \cdot 10^{-161}:\\
\;\;\;\;\left(1 - z\right) \cdot x\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
Alternative 5 Error 25.9 Cost 716
\[\begin{array}{l}
\mathbf{if}\;x \leq -2.7 \cdot 10^{-12}:\\
\;\;\;\;x - z \cdot x\\
\mathbf{elif}\;x \leq -8.5 \cdot 10^{-53}:\\
\;\;\;\;y \cdot \left(1 - z\right)\\
\mathbf{elif}\;x \leq -1.35 \cdot 10^{-161}:\\
\;\;\;\;\left(1 - z\right) \cdot x\\
\mathbf{else}:\\
\;\;\;\;y - z \cdot y\\
\end{array}
\]
Alternative 6 Error 13.3 Cost 520
\[\begin{array}{l}
t_0 := z \cdot \left(-x\right)\\
\mathbf{if}\;z \leq -8.8 \cdot 10^{+15}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq 1:\\
\;\;\;\;y + x\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
Alternative 7 Error 13.1 Cost 520
\[\begin{array}{l}
t_0 := z \cdot \left(-y\right)\\
\mathbf{if}\;z \leq -27:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq 1:\\
\;\;\;\;y + x\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
Alternative 8 Error 0.0 Cost 448
\[\left(x + y\right) \cdot \left(1 - z\right)
\]
Alternative 9 Error 39.1 Cost 196
\[\begin{array}{l}
\mathbf{if}\;y \leq 2.8 \cdot 10^{-107}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\]
Alternative 10 Error 23.7 Cost 192
\[y + x
\]
Alternative 11 Error 43.1 Cost 64
\[x
\]