\[ \begin{array}{c}[y, t] = \mathsf{sort}([y, t])\\ \end{array} \]
Math FPCore C Fortran Java Python Julia MATLAB Wolfram TeX \[\left(x \cdot y - z \cdot y\right) \cdot t
\]
↓
\[\begin{array}{l}
t_1 := x \cdot y - z \cdot y\\
t_2 := \left(x - z\right) \cdot \left(y \cdot t\right)\\
\mathbf{if}\;t_1 \leq -5 \cdot 10^{+112}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t_1 \leq -5 \cdot 10^{-136}:\\
\;\;\;\;\left(y \cdot \left(x - z\right)\right) \cdot t\\
\mathbf{elif}\;t_1 \leq 2 \cdot 10^{-318}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t_1 \leq 5 \cdot 10^{+252}:\\
\;\;\;\;t_1 \cdot t\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\]
(FPCore (x y z t) :precision binary64 (* (- (* x y) (* z y)) t)) ↓
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- (* x y) (* z y))) (t_2 (* (- x z) (* y t))))
(if (<= t_1 -5e+112)
t_2
(if (<= t_1 -5e-136)
(* (* y (- x z)) t)
(if (<= t_1 2e-318) t_2 (if (<= t_1 5e+252) (* t_1 t) t_2)))))) double code(double x, double y, double z, double t) {
return ((x * y) - (z * y)) * t;
}
↓
double code(double x, double y, double z, double t) {
double t_1 = (x * y) - (z * y);
double t_2 = (x - z) * (y * t);
double tmp;
if (t_1 <= -5e+112) {
tmp = t_2;
} else if (t_1 <= -5e-136) {
tmp = (y * (x - z)) * t;
} else if (t_1 <= 2e-318) {
tmp = t_2;
} else if (t_1 <= 5e+252) {
tmp = t_1 * t;
} else {
tmp = t_2;
}
return tmp;
}
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 * y)) * t
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
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (x * y) - (z * y)
t_2 = (x - z) * (y * t)
if (t_1 <= (-5d+112)) then
tmp = t_2
else if (t_1 <= (-5d-136)) then
tmp = (y * (x - z)) * t
else if (t_1 <= 2d-318) then
tmp = t_2
else if (t_1 <= 5d+252) then
tmp = t_1 * t
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
return ((x * y) - (z * y)) * t;
}
↓
public static double code(double x, double y, double z, double t) {
double t_1 = (x * y) - (z * y);
double t_2 = (x - z) * (y * t);
double tmp;
if (t_1 <= -5e+112) {
tmp = t_2;
} else if (t_1 <= -5e-136) {
tmp = (y * (x - z)) * t;
} else if (t_1 <= 2e-318) {
tmp = t_2;
} else if (t_1 <= 5e+252) {
tmp = t_1 * t;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t):
return ((x * y) - (z * y)) * t
↓
def code(x, y, z, t):
t_1 = (x * y) - (z * y)
t_2 = (x - z) * (y * t)
tmp = 0
if t_1 <= -5e+112:
tmp = t_2
elif t_1 <= -5e-136:
tmp = (y * (x - z)) * t
elif t_1 <= 2e-318:
tmp = t_2
elif t_1 <= 5e+252:
tmp = t_1 * t
else:
tmp = t_2
return tmp
function code(x, y, z, t)
return Float64(Float64(Float64(x * y) - Float64(z * y)) * t)
end
↓
function code(x, y, z, t)
t_1 = Float64(Float64(x * y) - Float64(z * y))
t_2 = Float64(Float64(x - z) * Float64(y * t))
tmp = 0.0
if (t_1 <= -5e+112)
tmp = t_2;
elseif (t_1 <= -5e-136)
tmp = Float64(Float64(y * Float64(x - z)) * t);
elseif (t_1 <= 2e-318)
tmp = t_2;
elseif (t_1 <= 5e+252)
tmp = Float64(t_1 * t);
else
tmp = t_2;
end
return tmp
end
function tmp = code(x, y, z, t)
tmp = ((x * y) - (z * y)) * t;
end
↓
function tmp_2 = code(x, y, z, t)
t_1 = (x * y) - (z * y);
t_2 = (x - z) * (y * t);
tmp = 0.0;
if (t_1 <= -5e+112)
tmp = t_2;
elseif (t_1 <= -5e-136)
tmp = (y * (x - z)) * t;
elseif (t_1 <= 2e-318)
tmp = t_2;
elseif (t_1 <= 5e+252)
tmp = t_1 * t;
else
tmp = t_2;
end
tmp_2 = tmp;
end
code[x_, y_, z_, t_] := N[(N[(N[(x * y), $MachinePrecision] - N[(z * y), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]
↓
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x * y), $MachinePrecision] - N[(z * y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x - z), $MachinePrecision] * N[(y * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -5e+112], t$95$2, If[LessEqual[t$95$1, -5e-136], N[(N[(y * N[(x - z), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision], If[LessEqual[t$95$1, 2e-318], t$95$2, If[LessEqual[t$95$1, 5e+252], N[(t$95$1 * t), $MachinePrecision], t$95$2]]]]]]
\left(x \cdot y - z \cdot y\right) \cdot t
↓
\begin{array}{l}
t_1 := x \cdot y - z \cdot y\\
t_2 := \left(x - z\right) \cdot \left(y \cdot t\right)\\
\mathbf{if}\;t_1 \leq -5 \cdot 10^{+112}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t_1 \leq -5 \cdot 10^{-136}:\\
\;\;\;\;\left(y \cdot \left(x - z\right)\right) \cdot t\\
\mathbf{elif}\;t_1 \leq 2 \cdot 10^{-318}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t_1 \leq 5 \cdot 10^{+252}:\\
\;\;\;\;t_1 \cdot t\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
Alternatives Alternative 1 Error 2.4 Cost 712
\[\begin{array}{l}
\mathbf{if}\;t \leq 1.45 \cdot 10^{-53}:\\
\;\;\;\;y \cdot \left(\left(x - z\right) \cdot t\right)\\
\mathbf{elif}\;t \leq 2.35 \cdot 10^{+198}:\\
\;\;\;\;\left(x - z\right) \cdot \left(y \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;\left(y \cdot \left(x - z\right)\right) \cdot t\\
\end{array}
\]
Alternative 2 Error 20.3 Cost 648
\[\begin{array}{l}
t_1 := y \cdot \left(t \cdot \left(-z\right)\right)\\
\mathbf{if}\;z \leq -1.66 \cdot 10^{-100}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 3.9 \cdot 10^{-78}:\\
\;\;\;\;x \cdot \left(y \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
Alternative 3 Error 19.9 Cost 648
\[\begin{array}{l}
\mathbf{if}\;z \leq -1.66 \cdot 10^{-100}:\\
\;\;\;\;\left(y \cdot t\right) \cdot \left(-z\right)\\
\mathbf{elif}\;z \leq 7 \cdot 10^{-78}:\\
\;\;\;\;x \cdot \left(y \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(t \cdot \left(-z\right)\right)\\
\end{array}
\]
Alternative 4 Error 19.8 Cost 648
\[\begin{array}{l}
\mathbf{if}\;z \leq -9.5 \cdot 10^{-101}:\\
\;\;\;\;\left(y \cdot t\right) \cdot \left(-z\right)\\
\mathbf{elif}\;z \leq 7.2 \cdot 10^{-78}:\\
\;\;\;\;x \cdot \left(y \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;\left(y \cdot \left(-z\right)\right) \cdot t\\
\end{array}
\]
Alternative 5 Error 8.2 Cost 580
\[\begin{array}{l}
\mathbf{if}\;t \leq 7.2 \cdot 10^{+186}:\\
\;\;\;\;y \cdot \left(\left(x - z\right) \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;\left(y \cdot \left(-z\right)\right) \cdot t\\
\end{array}
\]
Alternative 6 Error 2.9 Cost 580
\[\begin{array}{l}
\mathbf{if}\;t \leq 2.9 \cdot 10^{+73}:\\
\;\;\;\;y \cdot \left(\left(x - z\right) \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;\left(y \cdot \left(x - z\right)\right) \cdot t\\
\end{array}
\]
Alternative 7 Error 31.6 Cost 452
\[\begin{array}{l}
\mathbf{if}\;z \leq -2.6 \cdot 10^{-235}:\\
\;\;\;\;y \cdot \left(t \cdot x\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(y \cdot t\right)\\
\end{array}
\]
Alternative 8 Error 31.5 Cost 320
\[x \cdot \left(y \cdot t\right)
\]