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 35.2 Cost 1112
\[\begin{array}{l}
t_1 := \frac{0.5 \cdot y}{t}\\
t_2 := z \cdot \frac{-0.5}{t}\\
\mathbf{if}\;x \leq -1.8687920500254332 \cdot 10^{-19}:\\
\;\;\;\;0.5 \cdot \frac{x}{t}\\
\mathbf{elif}\;x \leq -4.8304259875799976 \cdot 10^{-36}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq -5.44809706222954 \cdot 10^{-135}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 5.436354679616663 \cdot 10^{-298}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq 4.769209405228054 \cdot 10^{-262}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 5.792073951147582 \cdot 10^{-133}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
Alternative 2 Error 35.2 Cost 1112
\[\begin{array}{l}
t_1 := \frac{0.5 \cdot y}{t}\\
t_2 := -0.5 \cdot \frac{z}{t}\\
\mathbf{if}\;x \leq -1.8687920500254332 \cdot 10^{-19}:\\
\;\;\;\;0.5 \cdot \frac{x}{t}\\
\mathbf{elif}\;x \leq -4.8304259875799976 \cdot 10^{-36}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq -5.44809706222954 \cdot 10^{-135}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 5.436354679616663 \cdot 10^{-298}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq 4.769209405228054 \cdot 10^{-262}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 5.792073951147582 \cdot 10^{-133}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
Alternative 3 Error 14.7 Cost 712
\[\begin{array}{l}
t_1 := -0.5 \cdot \frac{z}{t}\\
\mathbf{if}\;z \leq -3.1838753574723133 \cdot 10^{+93}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 4.723536750205161 \cdot 10^{-24}:\\
\;\;\;\;\frac{0.5}{t} \cdot \left(y + x\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
Alternative 4 Error 9.5 Cost 712
\[\begin{array}{l}
t_1 := 0.5 \cdot \frac{x - z}{t}\\
\mathbf{if}\;z \leq -287397808677.0836:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 3.1944818338294234 \cdot 10^{-40}:\\
\;\;\;\;\frac{0.5}{t} \cdot \left(y + x\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
Alternative 5 Error 16.2 Cost 580
\[\begin{array}{l}
\mathbf{if}\;x \leq -1.111706429061843 \cdot 10^{-74}:\\
\;\;\;\;0.5 \cdot \frac{x - z}{t}\\
\mathbf{else}:\\
\;\;\;\;0.5 \cdot \frac{y - z}{t}\\
\end{array}
\]
Alternative 6 Error 0.3 Cost 576
\[\left(\left(y - z\right) + x\right) \cdot \frac{0.5}{t}
\]
Alternative 7 Error 0.1 Cost 576
\[\frac{\left(y + x\right) - z}{t \cdot 2}
\]
Alternative 8 Error 36.7 Cost 452
\[\begin{array}{l}
\mathbf{if}\;x \leq -2.1334271025931996 \cdot 10^{-78}:\\
\;\;\;\;\frac{0.5}{\frac{t}{x}}\\
\mathbf{else}:\\
\;\;\;\;\frac{0.5 \cdot y}{t}\\
\end{array}
\]
Alternative 9 Error 36.7 Cost 452
\[\begin{array}{l}
\mathbf{if}\;x \leq -2.1334271025931996 \cdot 10^{-78}:\\
\;\;\;\;x \cdot \frac{0.5}{t}\\
\mathbf{else}:\\
\;\;\;\;\frac{0.5 \cdot y}{t}\\
\end{array}
\]
Alternative 10 Error 36.6 Cost 452
\[\begin{array}{l}
\mathbf{if}\;x \leq -2.1334271025931996 \cdot 10^{-78}:\\
\;\;\;\;0.5 \cdot \frac{x}{t}\\
\mathbf{else}:\\
\;\;\;\;\frac{0.5 \cdot y}{t}\\
\end{array}
\]
Alternative 11 Error 41.4 Cost 320
\[\frac{0.5 \cdot y}{t}
\]