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 30.8 Cost 1508
\[\begin{array}{l}
t_1 := 0.5 \cdot \frac{y}{t}\\
t_2 := \frac{z}{t} \cdot -0.5\\
t_3 := 0.5 \cdot \frac{x}{t}\\
\mathbf{if}\;z \leq -5.9 \cdot 10^{+137}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq -1.95 \cdot 10^{-103}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;z \leq -7 \cdot 10^{-167}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -8.5 \cdot 10^{-198}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;z \leq 9 \cdot 10^{-296}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 2.7 \cdot 10^{-204}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;z \leq 6.6 \cdot 10^{-63}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 240:\\
\;\;\;\;t_3\\
\mathbf{elif}\;z \leq 1.2 \cdot 10^{+69}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\]
Alternative 2 Error 13.2 Cost 712
\[\begin{array}{l}
t_1 := \frac{z}{t} \cdot -0.5\\
\mathbf{if}\;z \leq -5.9 \cdot 10^{+137}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 3.3 \cdot 10^{+69}:\\
\;\;\;\;0.5 \cdot \frac{y + x}{t}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
Alternative 3 Error 9.9 Cost 712
\[\begin{array}{l}
t_1 := 0.5 \cdot \frac{x - z}{t}\\
\mathbf{if}\;z \leq -4.8 \cdot 10^{+100}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 8.2 \cdot 10^{-60}:\\
\;\;\;\;0.5 \cdot \frac{y + x}{t}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
Alternative 4 Error 14.6 Cost 580
\[\begin{array}{l}
\mathbf{if}\;y \leq 6.2:\\
\;\;\;\;0.5 \cdot \frac{x - z}{t}\\
\mathbf{else}:\\
\;\;\;\;0.5 \cdot \frac{y - z}{t}\\
\end{array}
\]
Alternative 5 Error 0.3 Cost 576
\[\frac{0.5}{t} \cdot \left(x + \left(y - z\right)\right)
\]
Alternative 6 Error 34.8 Cost 452
\[\begin{array}{l}
\mathbf{if}\;y \leq 8.5:\\
\;\;\;\;0.5 \cdot \frac{x}{t}\\
\mathbf{else}:\\
\;\;\;\;0.5 \cdot \frac{y}{t}\\
\end{array}
\]
Alternative 7 Error 40.8 Cost 320
\[0.5 \cdot \frac{x}{t}
\]