\[ \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}
\]
↓
\[0.5 \cdot \frac{y - z}{t} + 0.5 \cdot \frac{x}{t}
\]
(FPCore (x y z t) :precision binary64 (/ (- (+ x y) z) (* t 2.0))) ↓
(FPCore (x y z t)
:precision binary64
(+ (* 0.5 (/ (- y z) t)) (* 0.5 (/ x t)))) 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 (0.5 * ((y - z) / t)) + (0.5 * (x / t));
}
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 = (0.5d0 * ((y - z) / t)) + (0.5d0 * (x / t))
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 (0.5 * ((y - z) / t)) + (0.5 * (x / t));
}
def code(x, y, z, t):
return ((x + y) - z) / (t * 2.0)
↓
def code(x, y, z, t):
return (0.5 * ((y - z) / t)) + (0.5 * (x / t))
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(0.5 * Float64(Float64(y - z) / t)) + Float64(0.5 * Float64(x / t)))
end
function tmp = code(x, y, z, t)
tmp = ((x + y) - z) / (t * 2.0);
end
↓
function tmp = code(x, y, z, t)
tmp = (0.5 * ((y - z) / t)) + (0.5 * (x / t));
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[(0.5 * N[(N[(y - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] + N[(0.5 * N[(x / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\frac{\left(x + y\right) - z}{t \cdot 2}
↓
0.5 \cdot \frac{y - z}{t} + 0.5 \cdot \frac{x}{t}
Alternatives Alternative 1 Error 26.4 Cost 1244
\[\begin{array}{l}
t_1 := z \cdot \frac{-0.5}{t}\\
t_2 := y \cdot \frac{0.5}{t}\\
\mathbf{if}\;x \leq -2.7459369957840644 \cdot 10^{-40}:\\
\;\;\;\;0.5 \cdot \frac{x}{t}\\
\mathbf{elif}\;x \leq -6.526256346597655 \cdot 10^{-80}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq -6.741720364843608 \cdot 10^{-103}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq -2.2384659789149964 \cdot 10^{-141}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq -4.337777309831154 \cdot 10^{-259}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq -3.4456307688211523 \cdot 10^{-302}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq 4.5139684045868965 \cdot 10^{-226}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\]
Alternative 2 Error 26.4 Cost 1244
\[\begin{array}{l}
t_1 := z \cdot \frac{-0.5}{t}\\
t_2 := \frac{0.5 \cdot y}{t}\\
\mathbf{if}\;x \leq -2.7459369957840644 \cdot 10^{-40}:\\
\;\;\;\;0.5 \cdot \frac{x}{t}\\
\mathbf{elif}\;x \leq -6.526256346597655 \cdot 10^{-80}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq -6.741720364843608 \cdot 10^{-103}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq -2.2384659789149964 \cdot 10^{-141}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq -4.337777309831154 \cdot 10^{-259}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq -3.4456307688211523 \cdot 10^{-302}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq 4.5139684045868965 \cdot 10^{-226}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\]
Alternative 3 Error 26.3 Cost 1244
\[\begin{array}{l}
t_1 := -0.5 \cdot \frac{z}{t}\\
t_2 := \frac{0.5 \cdot y}{t}\\
\mathbf{if}\;x \leq -2.7459369957840644 \cdot 10^{-40}:\\
\;\;\;\;0.5 \cdot \frac{x}{t}\\
\mathbf{elif}\;x \leq -6.526256346597655 \cdot 10^{-80}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq -6.741720364843608 \cdot 10^{-103}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq -2.2384659789149964 \cdot 10^{-141}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq -4.337777309831154 \cdot 10^{-259}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq -3.4456307688211523 \cdot 10^{-302}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq 4.5139684045868965 \cdot 10^{-226}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\]
Alternative 4 Error 11.9 Cost 580
\[\begin{array}{l}
\mathbf{if}\;y \leq 1.6721304867145286 \cdot 10^{+96}:\\
\;\;\;\;\frac{0.5}{t} \cdot \left(x - z\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{0.5 \cdot y}{t}\\
\end{array}
\]
Alternative 5 Error 11.7 Cost 580
\[\begin{array}{l}
\mathbf{if}\;y \leq 1.6721304867145286 \cdot 10^{+96}:\\
\;\;\;\;0.5 \cdot \frac{x - z}{t}\\
\mathbf{else}:\\
\;\;\;\;\frac{0.5 \cdot y}{t}\\
\end{array}
\]
Alternative 6 Error 6.3 Cost 580
\[\begin{array}{l}
\mathbf{if}\;x \leq -4.8883363713880545 \cdot 10^{-31}:\\
\;\;\;\;0.5 \cdot \frac{x - z}{t}\\
\mathbf{else}:\\
\;\;\;\;\left(y - z\right) \cdot \frac{0.5}{t}\\
\end{array}
\]
Alternative 7 Error 6.3 Cost 580
\[\begin{array}{l}
\mathbf{if}\;x \leq -6.588970868030848 \cdot 10^{-35}:\\
\;\;\;\;0.5 \cdot \frac{x - z}{t}\\
\mathbf{else}:\\
\;\;\;\;\frac{0.5}{\frac{t}{y - z}}\\
\end{array}
\]
Alternative 8 Error 6.2 Cost 580
\[\begin{array}{l}
\mathbf{if}\;x \leq -4.8883363713880545 \cdot 10^{-31}:\\
\;\;\;\;0.5 \cdot \frac{x - z}{t}\\
\mathbf{else}:\\
\;\;\;\;0.5 \cdot \frac{y - z}{t}\\
\end{array}
\]
Alternative 9 Error 0.3 Cost 576
\[\left(\left(y - z\right) + x\right) \cdot \frac{0.5}{t}
\]
Alternative 10 Error 0.1 Cost 576
\[\frac{\left(y + x\right) - z}{t \cdot 2}
\]
Alternative 11 Error 27.3 Cost 452
\[\begin{array}{l}
\mathbf{if}\;x \leq -2.7459369957840644 \cdot 10^{-40}:\\
\;\;\;\;\frac{0.5}{\frac{t}{x}}\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{0.5}{t}\\
\end{array}
\]
Alternative 12 Error 27.3 Cost 452
\[\begin{array}{l}
\mathbf{if}\;x \leq -2.7459369957840644 \cdot 10^{-40}:\\
\;\;\;\;0.5 \cdot \frac{x}{t}\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{0.5}{t}\\
\end{array}
\]
Alternative 13 Error 41.0 Cost 320
\[y \cdot \frac{0.5}{t}
\]