Math FPCore C Fortran Java Python Julia MATLAB Wolfram TeX \[x + \left(y - z\right) \cdot \left(t - x\right)
\]
↓
\[\left(x + \left(y - z\right) \cdot t\right) - \left(y - z\right) \cdot x
\]
(FPCore (x y z t) :precision binary64 (+ x (* (- y z) (- t x)))) ↓
(FPCore (x y z t) :precision binary64 (- (+ x (* (- y z) t)) (* (- y z) x))) double code(double x, double y, double z, double t) {
return x + ((y - z) * (t - x));
}
↓
double code(double x, double y, double z, double t) {
return (x + ((y - z) * t)) - ((y - z) * x);
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = x + ((y - z) * (t - x))
end function
↓
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = (x + ((y - z) * t)) - ((y - z) * x)
end function
public static double code(double x, double y, double z, double t) {
return x + ((y - z) * (t - x));
}
↓
public static double code(double x, double y, double z, double t) {
return (x + ((y - z) * t)) - ((y - z) * x);
}
def code(x, y, z, t):
return x + ((y - z) * (t - x))
↓
def code(x, y, z, t):
return (x + ((y - z) * t)) - ((y - z) * x)
function code(x, y, z, t)
return Float64(x + Float64(Float64(y - z) * Float64(t - x)))
end
↓
function code(x, y, z, t)
return Float64(Float64(x + Float64(Float64(y - z) * t)) - Float64(Float64(y - z) * x))
end
function tmp = code(x, y, z, t)
tmp = x + ((y - z) * (t - x));
end
↓
function tmp = code(x, y, z, t)
tmp = (x + ((y - z) * t)) - ((y - z) * x);
end
code[x_, y_, z_, t_] := N[(x + N[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
↓
code[x_, y_, z_, t_] := N[(N[(x + N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] - N[(N[(y - z), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision]
x + \left(y - z\right) \cdot \left(t - x\right)
↓
\left(x + \left(y - z\right) \cdot t\right) - \left(y - z\right) \cdot x
Alternatives Alternative 1 Error 25.3 Cost 2036
\[\begin{array}{l}
t_1 := z \cdot \left(x - t\right)\\
t_2 := t \cdot \left(y - z\right)\\
t_3 := y \cdot \left(t - x\right)\\
t_4 := \left(1 + z\right) \cdot x\\
\mathbf{if}\;y \leq -5.5 \cdot 10^{-51}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;y \leq -1.2 \cdot 10^{-93}:\\
\;\;\;\;t_4\\
\mathbf{elif}\;y \leq -5.6 \cdot 10^{-117}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq -2.05 \cdot 10^{-143}:\\
\;\;\;\;t_4\\
\mathbf{elif}\;y \leq -1.35 \cdot 10^{-157}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq -3.2 \cdot 10^{-272}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 1.6 \cdot 10^{-230}:\\
\;\;\;\;t_4\\
\mathbf{elif}\;y \leq 1.2 \cdot 10^{-143}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 1.05 \cdot 10^{-74}:\\
\;\;\;\;t_4\\
\mathbf{elif}\;y \leq 1.46 \cdot 10^{-28}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq 3.8 \cdot 10^{-15}:\\
\;\;\;\;t_4\\
\mathbf{elif}\;y \leq 1.3 \cdot 10^{+37}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;y \leq 4 \cdot 10^{+160}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_3\\
\end{array}
\]
Alternative 2 Error 41.8 Cost 1444
\[\begin{array}{l}
t_1 := t \cdot \left(-z\right)\\
\mathbf{if}\;y \leq -1.4 \cdot 10^{+138}:\\
\;\;\;\;x \cdot \left(-y\right)\\
\mathbf{elif}\;y \leq -4.5 \cdot 10^{-51}:\\
\;\;\;\;y \cdot t\\
\mathbf{elif}\;y \leq -1.3 \cdot 10^{-109}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq -6.8 \cdot 10^{-263}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 4.4 \cdot 10^{-228}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 1.26 \cdot 10^{-143}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 2.65 \cdot 10^{-102}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 1.55 \cdot 10^{+55}:\\
\;\;\;\;z \cdot x\\
\mathbf{elif}\;y \leq 5.8 \cdot 10^{+138}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;y \cdot t\\
\end{array}
\]
Alternative 3 Error 40.0 Cost 1180
\[\begin{array}{l}
t_1 := t \cdot \left(-z\right)\\
\mathbf{if}\;z \leq -1.6 \cdot 10^{+100}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -1:\\
\;\;\;\;z \cdot x\\
\mathbf{elif}\;z \leq -2.9 \cdot 10^{-105}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq -5.3 \cdot 10^{-220}:\\
\;\;\;\;y \cdot t\\
\mathbf{elif}\;z \leq -5.5 \cdot 10^{-287}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 5.8 \cdot 10^{-156}:\\
\;\;\;\;y \cdot t\\
\mathbf{elif}\;z \leq 3.1 \cdot 10^{-23}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
Alternative 4 Error 29.3 Cost 1112
\[\begin{array}{l}
t_1 := y \cdot \left(t - x\right)\\
t_2 := t \cdot \left(y - z\right)\\
\mathbf{if}\;y \leq -580:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -1 \cdot 10^{-270}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq 1.15 \cdot 10^{-230}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 4.05 \cdot 10^{-143}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq 2.2 \cdot 10^{-101}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 2.6 \cdot 10^{+160}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
Alternative 5 Error 26.4 Cost 1112
\[\begin{array}{l}
t_1 := z \cdot \left(x - t\right)\\
t_2 := y \cdot \left(t - x\right)\\
\mathbf{if}\;z \leq -2.05 \cdot 10^{-57}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -2.8 \cdot 10^{-227}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq -8.7 \cdot 10^{-290}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 9 \cdot 10^{-73}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq 1.45 \cdot 10^{-28}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 1.05 \cdot 10^{-17}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
Alternative 6 Error 40.1 Cost 984
\[\begin{array}{l}
\mathbf{if}\;z \leq -0.98:\\
\;\;\;\;z \cdot x\\
\mathbf{elif}\;z \leq -3.1 \cdot 10^{-106}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq -2.8 \cdot 10^{-216}:\\
\;\;\;\;y \cdot t\\
\mathbf{elif}\;z \leq -8.2 \cdot 10^{-287}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 1.02 \cdot 10^{-154}:\\
\;\;\;\;y \cdot t\\
\mathbf{elif}\;z \leq 1:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;z \cdot x\\
\end{array}
\]
Alternative 7 Error 29.1 Cost 716
\[\begin{array}{l}
\mathbf{if}\;x \leq -2.9 \cdot 10^{+44}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq -1.55 \cdot 10^{-44}:\\
\;\;\;\;z \cdot x\\
\mathbf{elif}\;x \leq 1.05 \cdot 10^{+111}:\\
\;\;\;\;t \cdot \left(y - z\right)\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\]
Alternative 8 Error 13.5 Cost 712
\[\begin{array}{l}
t_1 := z \cdot \left(x - t\right)\\
\mathbf{if}\;z \leq -3.15:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 6800:\\
\;\;\;\;x + t \cdot \left(y - z\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
Alternative 9 Error 11.8 Cost 712
\[\begin{array}{l}
t_1 := x + t \cdot \left(y - z\right)\\
\mathbf{if}\;t \leq -9.2 \cdot 10^{-71}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 3.5 \cdot 10^{-104}:\\
\;\;\;\;x + x \cdot \left(z - y\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
Alternative 10 Error 10.6 Cost 712
\[\begin{array}{l}
t_1 := x + z \cdot \left(x - t\right)\\
\mathbf{if}\;z \leq -2.5 \cdot 10^{-57}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 2.7 \cdot 10^{-18}:\\
\;\;\;\;y \cdot \left(t - x\right) + x\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
Alternative 11 Error 18.3 Cost 584
\[\begin{array}{l}
t_1 := z \cdot \left(x - t\right)\\
\mathbf{if}\;z \leq -2.6 \cdot 10^{-36}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 3.1 \cdot 10^{-23}:\\
\;\;\;\;y \cdot t + x\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
Alternative 12 Error 0.0 Cost 576
\[x + \left(y - z\right) \cdot \left(t - x\right)
\]
Alternative 13 Error 38.9 Cost 456
\[\begin{array}{l}
\mathbf{if}\;y \leq -5 \cdot 10^{-51}:\\
\;\;\;\;y \cdot t\\
\mathbf{elif}\;y \leq 1.62 \cdot 10^{-100}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y \cdot t\\
\end{array}
\]
Alternative 14 Error 47.7 Cost 64
\[x
\]