Math FPCore C Fortran Java Python Julia MATLAB Wolfram TeX \[x + \left(y - z\right) \cdot \left(t - x\right)
\]
↓
\[t \cdot \left(y - z\right) + x \cdot \left(z - \left(y - 1\right)\right)
\]
(FPCore (x y z t) :precision binary64 (+ x (* (- y z) (- t x)))) ↓
(FPCore (x y z t) :precision binary64 (+ (* t (- y z)) (* x (- z (- y 1.0))))) 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 (t * (y - z)) + (x * (z - (y - 1.0)));
}
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 = (t * (y - z)) + (x * (z - (y - 1.0d0)))
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 (t * (y - z)) + (x * (z - (y - 1.0)));
}
def code(x, y, z, t):
return x + ((y - z) * (t - x))
↓
def code(x, y, z, t):
return (t * (y - z)) + (x * (z - (y - 1.0)))
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(t * Float64(y - z)) + Float64(x * Float64(z - Float64(y - 1.0))))
end
function tmp = code(x, y, z, t)
tmp = x + ((y - z) * (t - x));
end
↓
function tmp = code(x, y, z, t)
tmp = (t * (y - z)) + (x * (z - (y - 1.0)));
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[(t * N[(y - z), $MachinePrecision]), $MachinePrecision] + N[(x * N[(z - N[(y - 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
x + \left(y - z\right) \cdot \left(t - x\right)
↓
t \cdot \left(y - z\right) + x \cdot \left(z - \left(y - 1\right)\right)
Alternatives Alternative 1 Error 29.5 Cost 1880
\[\begin{array}{l}
t_1 := t \cdot \left(y - z\right)\\
t_2 := y \cdot \left(t - x\right)\\
\mathbf{if}\;y - z \leq -1 \cdot 10^{+265}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y - z \leq -5 \cdot 10^{+182}:\\
\;\;\;\;z \cdot x\\
\mathbf{elif}\;y - z \leq -2 \cdot 10^{+118}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y - z \leq -2 \cdot 10^{-11}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y - z \leq 10^{-8}:\\
\;\;\;\;x\\
\mathbf{elif}\;y - z \leq 10^{+77}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\]
Alternative 2 Error 27.6 Cost 1376
\[\begin{array}{l}
t_1 := z \cdot \left(x - t\right)\\
t_2 := y \cdot \left(t - x\right)\\
\mathbf{if}\;z \leq -2.5 \cdot 10^{-48}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -1.12 \cdot 10^{-229}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq 9.5 \cdot 10^{-257}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 3.9 \cdot 10^{-180}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq 1.12 \cdot 10^{-104}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 2.7 \cdot 10^{-74}:\\
\;\;\;\;t \cdot \left(y - z\right)\\
\mathbf{elif}\;z \leq 6 \cdot 10^{-17}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 30000000000:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
Alternative 3 Error 12.8 Cost 976
\[\begin{array}{l}
t_1 := y \cdot \left(t - x\right)\\
\mathbf{if}\;y \leq -5 \cdot 10^{+153}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -1.12 \cdot 10^{+18}:\\
\;\;\;\;x \cdot \left(z - \left(y - 1\right)\right)\\
\mathbf{elif}\;y \leq -5.2 \cdot 10^{-13}:\\
\;\;\;\;x + t \cdot \left(y - z\right)\\
\mathbf{elif}\;y \leq 2.8 \cdot 10^{+20}:\\
\;\;\;\;x + z \cdot \left(x - t\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
Alternative 4 Error 10.4 Cost 976
\[\begin{array}{l}
t_1 := y \cdot \left(t - x\right) + x\\
t_2 := x + z \cdot \left(x - t\right)\\
\mathbf{if}\;z \leq -2 \cdot 10^{-48}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq 1.7 \cdot 10^{-112}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 7.6 \cdot 10^{-24}:\\
\;\;\;\;x + t \cdot \left(y - z\right)\\
\mathbf{elif}\;z \leq 20000000000:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\]
Alternative 5 Error 22.0 Cost 848
\[\begin{array}{l}
t_1 := z \cdot \left(x - t\right)\\
\mathbf{if}\;z \leq -1.45:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 9.2 \cdot 10^{-56}:\\
\;\;\;\;\left(1 - y\right) \cdot x\\
\mathbf{elif}\;z \leq 1250000000:\\
\;\;\;\;t \cdot \left(y - z\right)\\
\mathbf{elif}\;z \leq 19000000000:\\
\;\;\;\;y \cdot \left(-x\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
Alternative 6 Error 18.2 Cost 848
\[\begin{array}{l}
t_1 := z \cdot \left(x - t\right)\\
t_2 := y \cdot t + x\\
\mathbf{if}\;z \leq -1650:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -8.2 \cdot 10^{-137}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq -1.7 \cdot 10^{-178}:\\
\;\;\;\;\left(1 - y\right) \cdot x\\
\mathbf{elif}\;z \leq 2400000000:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
Alternative 7 Error 40.2 Cost 720
\[\begin{array}{l}
\mathbf{if}\;x \leq -1.8 \cdot 10^{+63}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq -2.2 \cdot 10^{-75}:\\
\;\;\;\;z \cdot x\\
\mathbf{elif}\;x \leq 1.1 \cdot 10^{-289}:\\
\;\;\;\;t \cdot \left(-z\right)\\
\mathbf{elif}\;x \leq 1.35 \cdot 10^{-16}:\\
\;\;\;\;y \cdot t\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\]
Alternative 8 Error 17.1 Cost 712
\[\begin{array}{l}
t_1 := x \cdot \left(z - \left(y - 1\right)\right)\\
\mathbf{if}\;x \leq -1.95 \cdot 10^{-35}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 6.2 \cdot 10^{-105}:\\
\;\;\;\;t \cdot \left(y - z\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
Alternative 9 Error 11.2 Cost 712
\[\begin{array}{l}
t_1 := x + t \cdot \left(y - z\right)\\
\mathbf{if}\;t \leq -1.7 \cdot 10^{-140}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 2.3 \cdot 10^{-52}:\\
\;\;\;\;x \cdot \left(z - \left(y - 1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
Alternative 10 Error 28.8 Cost 584
\[\begin{array}{l}
\mathbf{if}\;x \leq -370000:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 2.6 \cdot 10^{-15}:\\
\;\;\;\;t \cdot \left(y - z\right)\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\]
Alternative 11 Error 0.0 Cost 576
\[x + \left(y - z\right) \cdot \left(t - x\right)
\]
Alternative 12 Error 37.7 Cost 456
\[\begin{array}{l}
\mathbf{if}\;y \leq -1.05 \cdot 10^{-11}:\\
\;\;\;\;y \cdot t\\
\mathbf{elif}\;y \leq 1.45 \cdot 10^{-12}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y \cdot t\\
\end{array}
\]
Alternative 13 Error 38.7 Cost 456
\[\begin{array}{l}
\mathbf{if}\;z \leq -1700:\\
\;\;\;\;z \cdot x\\
\mathbf{elif}\;z \leq 2400000000:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;z \cdot x\\
\end{array}
\]
Alternative 14 Error 47.4 Cost 64
\[x
\]