\[ \begin{array}{c}[y, t] = \mathsf{sort}([y, t])\\ \end{array} \]
Math FPCore C Julia Wolfram TeX \[\left(x \cdot y - z \cdot y\right) \cdot t
\]
↓
\[\begin{array}{l}
t_1 := \mathsf{fma}\left(y \cdot \left(x - z\right), t, t \cdot \mathsf{fma}\left(y, -z, y \cdot z\right)\right)\\
t_2 := x \cdot y - y \cdot z\\
t_3 := \left(x - z\right) \cdot \left(y \cdot t\right)\\
\mathbf{if}\;t_2 \leq -\infty:\\
\;\;\;\;t_3\\
\mathbf{elif}\;t_2 \leq -1 \cdot 10^{-178}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t_2 \leq 10^{-218}:\\
\;\;\;\;y \cdot \left(\left(x - z\right) \cdot t\right)\\
\mathbf{elif}\;t_2 \leq 10^{+219}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_3\\
\end{array}
\]
(FPCore (x y z t) :precision binary64 (* (- (* x y) (* z y)) t)) ↓
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (fma (* y (- x z)) t (* t (fma y (- z) (* y z)))))
(t_2 (- (* x y) (* y z)))
(t_3 (* (- x z) (* y t))))
(if (<= t_2 (- INFINITY))
t_3
(if (<= t_2 -1e-178)
t_1
(if (<= t_2 1e-218)
(* y (* (- x z) t))
(if (<= t_2 1e+219) t_1 t_3)))))) 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 = fma((y * (x - z)), t, (t * fma(y, -z, (y * z))));
double t_2 = (x * y) - (y * z);
double t_3 = (x - z) * (y * t);
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = t_3;
} else if (t_2 <= -1e-178) {
tmp = t_1;
} else if (t_2 <= 1e-218) {
tmp = y * ((x - z) * t);
} else if (t_2 <= 1e+219) {
tmp = t_1;
} else {
tmp = t_3;
}
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 = fma(Float64(y * Float64(x - z)), t, Float64(t * fma(y, Float64(-z), Float64(y * z))))
t_2 = Float64(Float64(x * y) - Float64(y * z))
t_3 = Float64(Float64(x - z) * Float64(y * t))
tmp = 0.0
if (t_2 <= Float64(-Inf))
tmp = t_3;
elseif (t_2 <= -1e-178)
tmp = t_1;
elseif (t_2 <= 1e-218)
tmp = Float64(y * Float64(Float64(x - z) * t));
elseif (t_2 <= 1e+219)
tmp = t_1;
else
tmp = t_3;
end
return 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[(y * N[(x - z), $MachinePrecision]), $MachinePrecision] * t + N[(t * N[(y * (-z) + N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * y), $MachinePrecision] - N[(y * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(x - z), $MachinePrecision] * N[(y * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], t$95$3, If[LessEqual[t$95$2, -1e-178], t$95$1, If[LessEqual[t$95$2, 1e-218], N[(y * N[(N[(x - z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 1e+219], t$95$1, t$95$3]]]]]]]
\left(x \cdot y - z \cdot y\right) \cdot t
↓
\begin{array}{l}
t_1 := \mathsf{fma}\left(y \cdot \left(x - z\right), t, t \cdot \mathsf{fma}\left(y, -z, y \cdot z\right)\right)\\
t_2 := x \cdot y - y \cdot z\\
t_3 := \left(x - z\right) \cdot \left(y \cdot t\right)\\
\mathbf{if}\;t_2 \leq -\infty:\\
\;\;\;\;t_3\\
\mathbf{elif}\;t_2 \leq -1 \cdot 10^{-178}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t_2 \leq 10^{-218}:\\
\;\;\;\;y \cdot \left(\left(x - z\right) \cdot t\right)\\
\mathbf{elif}\;t_2 \leq 10^{+219}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_3\\
\end{array}
Alternatives Alternative 1 Error 0.7 Cost 2640
\[\begin{array}{l}
t_1 := x \cdot y - y \cdot z\\
t_2 := y \cdot \left(\left(x - z\right) \cdot t\right)\\
\mathbf{if}\;t_1 \leq -4 \cdot 10^{+210}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t_1 \leq -5 \cdot 10^{-155}:\\
\;\;\;\;t \cdot \left(y \cdot \left(x - z\right)\right)\\
\mathbf{elif}\;t_1 \leq 10^{-218}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t_1 \leq 5 \cdot 10^{+185}:\\
\;\;\;\;t_1 \cdot t\\
\mathbf{else}:\\
\;\;\;\;\left(x - z\right) \cdot \left(y \cdot t\right)\\
\end{array}
\]
Alternative 2 Error 19.9 Cost 912
\[\begin{array}{l}
t_1 := y \cdot \left(z \cdot \left(-t\right)\right)\\
\mathbf{if}\;x \leq -1070770.2605367599:\\
\;\;\;\;y \cdot \left(x \cdot t\right)\\
\mathbf{elif}\;x \leq 3.445538999220402 \cdot 10^{-128}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 2.97930192731501 \cdot 10^{-92}:\\
\;\;\;\;\left(x \cdot y\right) \cdot t\\
\mathbf{elif}\;x \leq 1.3592837751672966 \cdot 10^{-7}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(y \cdot t\right)\\
\end{array}
\]
Alternative 3 Error 19.9 Cost 912
\[\begin{array}{l}
t_1 := t \cdot \left(z \cdot \left(-y\right)\right)\\
\mathbf{if}\;x \leq -63396.88368210693:\\
\;\;\;\;y \cdot \left(x \cdot t\right)\\
\mathbf{elif}\;x \leq 3.445538999220402 \cdot 10^{-128}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 2.97930192731501 \cdot 10^{-92}:\\
\;\;\;\;\left(x \cdot y\right) \cdot t\\
\mathbf{elif}\;x \leq 1.3592837751672966 \cdot 10^{-7}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(y \cdot t\right)\\
\end{array}
\]
Alternative 4 Error 2.6 Cost 580
\[\begin{array}{l}
\mathbf{if}\;y \leq -1 \cdot 10^{+36}:\\
\;\;\;\;\left(x - z\right) \cdot \left(y \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(y \cdot \left(x - z\right)\right)\\
\end{array}
\]
Alternative 5 Error 29.3 Cost 452
\[\begin{array}{l}
\mathbf{if}\;y \leq -1.5 \cdot 10^{+36}:\\
\;\;\;\;x \cdot \left(y \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot y\right) \cdot t\\
\end{array}
\]
Alternative 6 Error 29.7 Cost 452
\[\begin{array}{l}
\mathbf{if}\;t \leq 10^{+70}:\\
\;\;\;\;y \cdot \left(x \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot y\right) \cdot t\\
\end{array}
\]
Alternative 7 Error 6.9 Cost 448
\[\left(x - z\right) \cdot \left(y \cdot t\right)
\]
Alternative 8 Error 31.6 Cost 320
\[\left(x \cdot y\right) \cdot t
\]