\[ \begin{array}{c}[x, y] = \mathsf{sort}([x, y])\\ \end{array} \]
Math FPCore C Fortran Java Python Julia MATLAB Wolfram TeX \[\frac{\left(x + y\right) - z}{t \cdot 2}
\]
↓
\[\left(\frac{x - z}{t} + \frac{y}{t}\right) \cdot 0.5
\]
(FPCore (x y z t) :precision binary64 (/ (- (+ x y) z) (* t 2.0))) ↓
(FPCore (x y z t) :precision binary64 (* (+ (/ (- x z) t) (/ y t)) 0.5)) double code(double x, double y, double z, double t) {
return ((x + y) - z) / (t * 2.0);
}
↓
double code(double x, double y, double z, double t) {
return (((x - z) / t) + (y / t)) * 0.5;
}
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 * 2.0d0)
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 - z) / t) + (y / t)) * 0.5d0
end function
public static double code(double x, double y, double z, double t) {
return ((x + y) - z) / (t * 2.0);
}
↓
public static double code(double x, double y, double z, double t) {
return (((x - z) / t) + (y / t)) * 0.5;
}
def code(x, y, z, t):
return ((x + y) - z) / (t * 2.0)
↓
def code(x, y, z, t):
return (((x - z) / t) + (y / t)) * 0.5
function code(x, y, z, t)
return Float64(Float64(Float64(x + y) - z) / Float64(t * 2.0))
end
↓
function code(x, y, z, t)
return Float64(Float64(Float64(Float64(x - z) / t) + Float64(y / t)) * 0.5)
end
function tmp = code(x, y, z, t)
tmp = ((x + y) - z) / (t * 2.0);
end
↓
function tmp = code(x, y, z, t)
tmp = (((x - z) / t) + (y / t)) * 0.5;
end
code[x_, y_, z_, t_] := N[(N[(N[(x + y), $MachinePrecision] - z), $MachinePrecision] / N[(t * 2.0), $MachinePrecision]), $MachinePrecision]
↓
code[x_, y_, z_, t_] := N[(N[(N[(N[(x - z), $MachinePrecision] / t), $MachinePrecision] + N[(y / t), $MachinePrecision]), $MachinePrecision] * 0.5), $MachinePrecision]
\frac{\left(x + y\right) - z}{t \cdot 2}
↓
\left(\frac{x - z}{t} + \frac{y}{t}\right) \cdot 0.5
Alternatives Alternative 1 Error 27.0 Cost 1376
\[\begin{array}{l}
t_1 := \frac{y \cdot 0.5}{t}\\
t_2 := \frac{x}{\frac{t}{0.5}}\\
t_3 := -0.5 \cdot \frac{z}{t}\\
\mathbf{if}\;x \leq -1.0422830064006472 \cdot 10^{+61}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq -8.490185412162121 \cdot 10^{+19}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq -0.04818218621818409:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq -5.963724248589354 \cdot 10^{-183}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;x \leq -1.6232878753408387 \cdot 10^{-259}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq -3.5710474559422605 \cdot 10^{-291}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;x \leq 4.539652451897301 \cdot 10^{-212}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 5.969706393242968 \cdot 10^{-71}:\\
\;\;\;\;t_3\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
Alternative 2 Error 14.0 Cost 976
\[\begin{array}{l}
t_1 := -0.5 \cdot \frac{z}{t}\\
t_2 := \frac{x + y}{t \cdot 2}\\
\mathbf{if}\;z \leq -9 \cdot 10^{+168}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -2.9731126194282375 \cdot 10^{+90}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq -1.8411463389161615 \cdot 10^{+29}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 1.7045725971702525 \cdot 10^{+57}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
Alternative 3 Error 7.4 Cost 844
\[\begin{array}{l}
t_1 := \frac{x - z}{t} \cdot 0.5\\
\mathbf{if}\;x \leq -1 \cdot 10^{+130}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq -23121653.143168956:\\
\;\;\;\;\frac{x + y}{t \cdot 2}\\
\mathbf{elif}\;x \leq -7.649831640126826 \cdot 10^{-67}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;0.5 \cdot \frac{y - z}{t}\\
\end{array}
\]
Alternative 4 Error 9.2 Cost 712
\[\begin{array}{l}
t_1 := \frac{x - z}{t} \cdot 0.5\\
\mathbf{if}\;z \leq -1.8411463389161615 \cdot 10^{+29}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 1.9456849078039833 \cdot 10^{+43}:\\
\;\;\;\;\frac{x + y}{t \cdot 2}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
Alternative 5 Error 0.3 Cost 576
\[\left(x + \left(y - z\right)\right) \cdot \frac{0.5}{t}
\]
Alternative 6 Error 0.1 Cost 576
\[\frac{\left(x + y\right) - z}{t \cdot 2}
\]
Alternative 7 Error 29.6 Cost 452
\[\begin{array}{l}
\mathbf{if}\;x \leq -0.04818218621818409:\\
\;\;\;\;\frac{x}{\frac{t}{0.5}}\\
\mathbf{else}:\\
\;\;\;\;-0.5 \cdot \frac{z}{t}\\
\end{array}
\]
Alternative 8 Error 41.6 Cost 320
\[\frac{x}{\frac{t}{0.5}}
\]