Math FPCore C Fortran Java Python Julia MATLAB Wolfram TeX \[x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(\frac{2}{3} - z\right)
\]
↓
\[x + \left(y - x\right) \cdot \left(4 + -6 \cdot z\right)
\]
(FPCore (x y z)
:precision binary64
(+ x (* (* (- y x) 6.0) (- (/ 2.0 3.0) z)))) ↓
(FPCore (x y z) :precision binary64 (+ x (* (- y x) (+ 4.0 (* -6.0 z))))) double code(double x, double y, double z) {
return x + (((y - x) * 6.0) * ((2.0 / 3.0) - z));
}
↓
double code(double x, double y, double z) {
return x + ((y - x) * (4.0 + (-6.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) * 6.0d0) * ((2.0d0 / 3.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) * (4.0d0 + ((-6.0d0) * z)))
end function
public static double code(double x, double y, double z) {
return x + (((y - x) * 6.0) * ((2.0 / 3.0) - z));
}
↓
public static double code(double x, double y, double z) {
return x + ((y - x) * (4.0 + (-6.0 * z)));
}
def code(x, y, z):
return x + (((y - x) * 6.0) * ((2.0 / 3.0) - z))
↓
def code(x, y, z):
return x + ((y - x) * (4.0 + (-6.0 * z)))
function code(x, y, z)
return Float64(x + Float64(Float64(Float64(y - x) * 6.0) * Float64(Float64(2.0 / 3.0) - z)))
end
↓
function code(x, y, z)
return Float64(x + Float64(Float64(y - x) * Float64(4.0 + Float64(-6.0 * z))))
end
function tmp = code(x, y, z)
tmp = x + (((y - x) * 6.0) * ((2.0 / 3.0) - z));
end
↓
function tmp = code(x, y, z)
tmp = x + ((y - x) * (4.0 + (-6.0 * z)));
end
code[x_, y_, z_] := N[(x + N[(N[(N[(y - x), $MachinePrecision] * 6.0), $MachinePrecision] * N[(N[(2.0 / 3.0), $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
↓
code[x_, y_, z_] := N[(x + N[(N[(y - x), $MachinePrecision] * N[(4.0 + N[(-6.0 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(\frac{2}{3} - z\right)
↓
x + \left(y - x\right) \cdot \left(4 + -6 \cdot z\right)
Alternatives Alternative 1 Error 20.8 Cost 1504
\[\begin{array}{l}
t_0 := -6 \cdot \left(z \cdot \left(y - x\right)\right)\\
\mathbf{if}\;z \leq -1.02 \cdot 10^{-5}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq -3.3 \cdot 10^{-165}:\\
\;\;\;\;4 \cdot y\\
\mathbf{elif}\;z \leq -1.8 \cdot 10^{-306}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 2.1 \cdot 10^{-230}:\\
\;\;\;\;4 \cdot y\\
\mathbf{elif}\;z \leq 2.5 \cdot 10^{-196}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 1.1 \cdot 10^{-129}:\\
\;\;\;\;4 \cdot y\\
\mathbf{elif}\;z \leq 1.22 \cdot 10^{-86}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 0.68:\\
\;\;\;\;4 \cdot y\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
Alternative 2 Error 20.8 Cost 1504
\[\begin{array}{l}
t_0 := -6 \cdot \left(z \cdot \left(y - x\right)\right)\\
\mathbf{if}\;z \leq -1.02 \cdot 10^{-5}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq -2 \cdot 10^{-165}:\\
\;\;\;\;4 \cdot y\\
\mathbf{elif}\;z \leq -4 \cdot 10^{-307}:\\
\;\;\;\;x \cdot \left(z \cdot 6 + -3\right)\\
\mathbf{elif}\;z \leq 2.8 \cdot 10^{-229}:\\
\;\;\;\;4 \cdot y\\
\mathbf{elif}\;z \leq 2.6 \cdot 10^{-196}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 8.5 \cdot 10^{-130}:\\
\;\;\;\;4 \cdot y\\
\mathbf{elif}\;z \leq 1.7 \cdot 10^{-86}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 0.5:\\
\;\;\;\;4 \cdot y\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
Alternative 3 Error 20.8 Cost 1504
\[\begin{array}{l}
t_0 := z \cdot \left(-6 \cdot \left(y - x\right)\right)\\
\mathbf{if}\;z \leq -1.02 \cdot 10^{-5}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq -1.8 \cdot 10^{-163}:\\
\;\;\;\;4 \cdot y\\
\mathbf{elif}\;z \leq -2.5 \cdot 10^{-307}:\\
\;\;\;\;x \cdot \left(z \cdot 6 + -3\right)\\
\mathbf{elif}\;z \leq 4.5 \cdot 10^{-229}:\\
\;\;\;\;4 \cdot y\\
\mathbf{elif}\;z \leq 5.5 \cdot 10^{-196}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 6.8 \cdot 10^{-130}:\\
\;\;\;\;4 \cdot y\\
\mathbf{elif}\;z \leq 4.7 \cdot 10^{-85}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 0.64:\\
\;\;\;\;4 \cdot y\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
Alternative 4 Error 32.4 Cost 1376
\[\begin{array}{l}
t_0 := -6 \cdot \left(z \cdot y\right)\\
\mathbf{if}\;z \leq -0.65:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq -1.5 \cdot 10^{-165}:\\
\;\;\;\;4 \cdot y\\
\mathbf{elif}\;z \leq -1.05 \cdot 10^{-305}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 8.5 \cdot 10^{-230}:\\
\;\;\;\;4 \cdot y\\
\mathbf{elif}\;z \leq 6.6 \cdot 10^{-196}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 3.4 \cdot 10^{-130}:\\
\;\;\;\;4 \cdot y\\
\mathbf{elif}\;z \leq 1.9 \cdot 10^{-86}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 4.4 \cdot 10^{-6}:\\
\;\;\;\;4 \cdot y\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
Alternative 5 Error 32.4 Cost 1376
\[\begin{array}{l}
\mathbf{if}\;z \leq -1.02 \cdot 10^{-5}:\\
\;\;\;\;6 \cdot \left(z \cdot x\right)\\
\mathbf{elif}\;z \leq -9.8 \cdot 10^{-166}:\\
\;\;\;\;4 \cdot y\\
\mathbf{elif}\;z \leq -1.05 \cdot 10^{-305}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 2.2 \cdot 10^{-230}:\\
\;\;\;\;4 \cdot y\\
\mathbf{elif}\;z \leq 2.9 \cdot 10^{-196}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 10^{-129}:\\
\;\;\;\;4 \cdot y\\
\mathbf{elif}\;z \leq 2.8 \cdot 10^{-87}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 4.4 \cdot 10^{-6}:\\
\;\;\;\;4 \cdot y\\
\mathbf{else}:\\
\;\;\;\;-6 \cdot \left(z \cdot y\right)\\
\end{array}
\]
Alternative 6 Error 32.5 Cost 1376
\[\begin{array}{l}
\mathbf{if}\;z \leq -1.02 \cdot 10^{-5}:\\
\;\;\;\;6 \cdot \left(z \cdot x\right)\\
\mathbf{elif}\;z \leq -3.2 \cdot 10^{-163}:\\
\;\;\;\;4 \cdot y\\
\mathbf{elif}\;z \leq -1.3 \cdot 10^{-306}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 2.55 \cdot 10^{-229}:\\
\;\;\;\;4 \cdot y\\
\mathbf{elif}\;z \leq 3.55 \cdot 10^{-196}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 3.5 \cdot 10^{-130}:\\
\;\;\;\;4 \cdot y\\
\mathbf{elif}\;z \leq 3.5 \cdot 10^{-87}:\\
\;\;\;\;x \cdot -3\\
\mathbf{elif}\;z \leq 4.4 \cdot 10^{-6}:\\
\;\;\;\;4 \cdot y\\
\mathbf{else}:\\
\;\;\;\;z \cdot \left(-6 \cdot y\right)\\
\end{array}
\]
Alternative 7 Error 1.8 Cost 712
\[\begin{array}{l}
t_0 := z \cdot \left(-6 \cdot \left(y - x\right)\right)\\
\mathbf{if}\;z \leq -0.58:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq 0.55:\\
\;\;\;\;4 \cdot y + x \cdot -3\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
Alternative 8 Error 0.4 Cost 704
\[x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(0.6666666666666666 - z\right)
\]
Alternative 9 Error 34.7 Cost 456
\[\begin{array}{l}
\mathbf{if}\;y \leq -7.8 \cdot 10^{-94}:\\
\;\;\;\;4 \cdot y\\
\mathbf{elif}\;y \leq 3.3 \cdot 10^{-65}:\\
\;\;\;\;x \cdot -3\\
\mathbf{else}:\\
\;\;\;\;4 \cdot y\\
\end{array}
\]
Alternative 10 Error 43.9 Cost 192
\[4 \cdot y
\]
Alternative 11 Error 62.3 Cost 64
\[x
\]