Math FPCore C Fortran Java Python Julia MATLAB Wolfram TeX \[\frac{\left(x + y\right) - z}{t \cdot 2}
\]
↓
\[\frac{\left(x + y\right) - z}{t \cdot 2}
\]
(FPCore (x y z t) :precision binary64 (/ (- (+ x y) z) (* t 2.0))) ↓
(FPCore (x y z t) :precision binary64 (/ (- (+ x y) z) (* t 2.0))) 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 + y) - z) / (t * 2.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 * 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 + y) - z) / (t * 2.0d0)
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 + y) - z) / (t * 2.0);
}
def code(x, y, z, t):
return ((x + y) - z) / (t * 2.0)
↓
def code(x, y, z, t):
return ((x + y) - z) / (t * 2.0)
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(x + y) - z) / Float64(t * 2.0))
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 + y) - z) / (t * 2.0);
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[(x + y), $MachinePrecision] - z), $MachinePrecision] / N[(t * 2.0), $MachinePrecision]), $MachinePrecision]
\frac{\left(x + y\right) - z}{t \cdot 2}
↓
\frac{\left(x + y\right) - z}{t \cdot 2}
Alternatives Alternative 1 Error 35.9 Cost 1112
\[\begin{array}{l}
t_1 := \frac{y \cdot 0.5}{t}\\
t_2 := z \cdot \frac{-0.5}{t}\\
\mathbf{if}\;x \leq -2.3288327326829534 \cdot 10^{-14}:\\
\;\;\;\;\frac{x \cdot 0.5}{t}\\
\mathbf{elif}\;x \leq -7.411017549949866 \cdot 10^{-169}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq -3.497810280870143 \cdot 10^{-237}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq -1.7307926841034523 \cdot 10^{-295}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq 2.3178774310999667 \cdot 10^{-244}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 1.6883990755191 \cdot 10^{-204}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
Alternative 2 Error 35.9 Cost 1112
\[\begin{array}{l}
t_1 := \frac{y \cdot 0.5}{t}\\
t_2 := -0.5 \cdot \frac{z}{t}\\
\mathbf{if}\;x \leq -2.3288327326829534 \cdot 10^{-14}:\\
\;\;\;\;\frac{x \cdot 0.5}{t}\\
\mathbf{elif}\;x \leq -7.411017549949866 \cdot 10^{-169}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq -3.497810280870143 \cdot 10^{-237}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq -1.7307926841034523 \cdot 10^{-295}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq 2.3178774310999667 \cdot 10^{-244}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 1.6883990755191 \cdot 10^{-204}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
Alternative 3 Error 18.3 Cost 844
\[\begin{array}{l}
t_1 := \frac{y \cdot 0.5}{t}\\
t_2 := 0.5 \cdot \frac{x - z}{t}\\
\mathbf{if}\;y \leq 1.4714256940628484 \cdot 10^{-46}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq 2.2155842541035288 \cdot 10^{+24}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 7.829106331742101 \cdot 10^{+110}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
Alternative 4 Error 29.9 Cost 584
\[\begin{array}{l}
t_1 := z \cdot \frac{-0.5}{t}\\
\mathbf{if}\;z \leq -1.3738057380601987 \cdot 10^{-48}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 4.164312964684067 \cdot 10^{+69}:\\
\;\;\;\;\frac{x \cdot 0.5}{t}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
Alternative 5 Error 15.1 Cost 580
\[\begin{array}{l}
\mathbf{if}\;y \leq 1.65586853170779 \cdot 10^{-48}:\\
\;\;\;\;0.5 \cdot \frac{x - z}{t}\\
\mathbf{else}:\\
\;\;\;\;\frac{y - z}{t \cdot 2}\\
\end{array}
\]
Alternative 6 Error 0.3 Cost 576
\[\left(x + \left(y - z\right)\right) \cdot \frac{0.5}{t}
\]
Alternative 7 Error 40.6 Cost 320
\[\frac{x \cdot 0.5}{t}
\]