Math FPCore C Fortran Java Python Julia MATLAB Wolfram TeX \[x \cdot y + \left(x - 1\right) \cdot z
\]
↓
\[x \cdot y + \left(x - 1\right) \cdot z
\]
(FPCore (x y z) :precision binary64 (+ (* x y) (* (- x 1.0) z))) ↓
(FPCore (x y z) :precision binary64 (+ (* x y) (* (- x 1.0) z))) double code(double x, double y, double z) {
return (x * y) + ((x - 1.0) * z);
}
↓
double code(double x, double y, double z) {
return (x * y) + ((x - 1.0) * z);
}
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) + ((x - 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 = (x * y) + ((x - 1.0d0) * z)
end function
public static double code(double x, double y, double z) {
return (x * y) + ((x - 1.0) * z);
}
↓
public static double code(double x, double y, double z) {
return (x * y) + ((x - 1.0) * z);
}
def code(x, y, z):
return (x * y) + ((x - 1.0) * z)
↓
def code(x, y, z):
return (x * y) + ((x - 1.0) * z)
function code(x, y, z)
return Float64(Float64(x * y) + Float64(Float64(x - 1.0) * z))
end
↓
function code(x, y, z)
return Float64(Float64(x * y) + Float64(Float64(x - 1.0) * z))
end
function tmp = code(x, y, z)
tmp = (x * y) + ((x - 1.0) * z);
end
↓
function tmp = code(x, y, z)
tmp = (x * y) + ((x - 1.0) * z);
end
code[x_, y_, z_] := N[(N[(x * y), $MachinePrecision] + N[(N[(x - 1.0), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]
↓
code[x_, y_, z_] := N[(N[(x * y), $MachinePrecision] + N[(N[(x - 1.0), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]
x \cdot y + \left(x - 1\right) \cdot z
↓
x \cdot y + \left(x - 1\right) \cdot z
Alternatives Alternative 1 Error 23.7 Cost 720
\[\begin{array}{l}
\mathbf{if}\;x \leq -0.00075:\\
\;\;\;\;y \cdot x\\
\mathbf{elif}\;x \leq 1.9 \cdot 10^{-13}:\\
\;\;\;\;-z\\
\mathbf{elif}\;x \leq 3.65 \cdot 10^{+99}:\\
\;\;\;\;y \cdot x\\
\mathbf{elif}\;x \leq 2.7 \cdot 10^{+206}:\\
\;\;\;\;z \cdot x\\
\mathbf{else}:\\
\;\;\;\;y \cdot x\\
\end{array}
\]
Alternative 2 Error 0.8 Cost 712
\[\begin{array}{l}
\mathbf{if}\;x \leq -1:\\
\;\;\;\;\left(y + z\right) \cdot x\\
\mathbf{elif}\;x \leq 0.0003:\\
\;\;\;\;x \cdot y + \left(-z\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot y + z \cdot x\\
\end{array}
\]
Alternative 3 Error 0.8 Cost 648
\[\begin{array}{l}
t_0 := \left(y + z\right) \cdot x\\
\mathbf{if}\;x \leq -1:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq 0.0003:\\
\;\;\;\;x \cdot y + \left(-z\right)\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
Alternative 4 Error 12.3 Cost 584
\[\begin{array}{l}
t_0 := \left(y + z\right) \cdot x\\
\mathbf{if}\;x \leq -0.00075:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq 7.5 \cdot 10^{-17}:\\
\;\;\;\;-z\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
Alternative 5 Error 13.6 Cost 584
\[\begin{array}{l}
t_0 := \left(x - 1\right) \cdot z\\
\mathbf{if}\;z \leq -1.15 \cdot 10^{-140}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq 7.2 \cdot 10^{-90}:\\
\;\;\;\;\left(y + z\right) \cdot x\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
Alternative 6 Error 13.7 Cost 584
\[\begin{array}{l}
\mathbf{if}\;z \leq -6.2 \cdot 10^{-143}:\\
\;\;\;\;z \cdot x - z\\
\mathbf{elif}\;z \leq 1.36 \cdot 10^{-89}:\\
\;\;\;\;\left(y + z\right) \cdot x\\
\mathbf{else}:\\
\;\;\;\;\left(x - 1\right) \cdot z\\
\end{array}
\]
Alternative 7 Error 24.0 Cost 456
\[\begin{array}{l}
\mathbf{if}\;x \leq -0.00075:\\
\;\;\;\;y \cdot x\\
\mathbf{elif}\;x \leq 1.42 \cdot 10^{-12}:\\
\;\;\;\;-z\\
\mathbf{else}:\\
\;\;\;\;y \cdot x\\
\end{array}
\]
Alternative 8 Error 0.0 Cost 448
\[x \cdot \left(z + y\right) - z
\]
Alternative 9 Error 35.1 Cost 128
\[-z
\]