\[ \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\\
\mathbf{if}\;t_2 \leq -2 \cdot 10^{+238}:\\
\;\;\;\;y \cdot \left(t \cdot \left(x - z\right)\right)\\
\mathbf{elif}\;t_2 \leq -2 \cdot 10^{-284}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t_2 \leq 10^{-317}:\\
\;\;\;\;x \cdot \left(y \cdot t\right) - z \cdot \left(y \cdot t\right)\\
\mathbf{elif}\;t_2 \leq 10^{+169}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(x \cdot t - z \cdot t\right)\\
\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))))
(if (<= t_2 -2e+238)
(* y (* t (- x z)))
(if (<= t_2 -2e-284)
t_1
(if (<= t_2 1e-317)
(- (* x (* y t)) (* z (* y t)))
(if (<= t_2 1e+169) t_1 (* y (- (* x t) (* z t))))))))) 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 tmp;
if (t_2 <= -2e+238) {
tmp = y * (t * (x - z));
} else if (t_2 <= -2e-284) {
tmp = t_1;
} else if (t_2 <= 1e-317) {
tmp = (x * (y * t)) - (z * (y * t));
} else if (t_2 <= 1e+169) {
tmp = t_1;
} else {
tmp = y * ((x * t) - (z * t));
}
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))
tmp = 0.0
if (t_2 <= -2e+238)
tmp = Float64(y * Float64(t * Float64(x - z)));
elseif (t_2 <= -2e-284)
tmp = t_1;
elseif (t_2 <= 1e-317)
tmp = Float64(Float64(x * Float64(y * t)) - Float64(z * Float64(y * t)));
elseif (t_2 <= 1e+169)
tmp = t_1;
else
tmp = Float64(y * Float64(Float64(x * t) - Float64(z * t)));
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]}, If[LessEqual[t$95$2, -2e+238], N[(y * N[(t * N[(x - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, -2e-284], t$95$1, If[LessEqual[t$95$2, 1e-317], N[(N[(x * N[(y * t), $MachinePrecision]), $MachinePrecision] - N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 1e+169], t$95$1, N[(y * N[(N[(x * t), $MachinePrecision] - N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\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\\
\mathbf{if}\;t_2 \leq -2 \cdot 10^{+238}:\\
\;\;\;\;y \cdot \left(t \cdot \left(x - z\right)\right)\\
\mathbf{elif}\;t_2 \leq -2 \cdot 10^{-284}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t_2 \leq 10^{-317}:\\
\;\;\;\;x \cdot \left(y \cdot t\right) - z \cdot \left(y \cdot t\right)\\
\mathbf{elif}\;t_2 \leq 10^{+169}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(x \cdot t - z \cdot t\right)\\
\end{array}
Alternatives Alternative 1 Error 0.5 Cost 2640
\[\begin{array}{l}
t_1 := t \cdot \left(y \cdot \left(x - z\right)\right)\\
t_2 := x \cdot y - y \cdot z\\
t_3 := y \cdot \left(t \cdot \left(x - z\right)\right)\\
\mathbf{if}\;t_2 \leq -2 \cdot 10^{+238}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;t_2 \leq -5 \cdot 10^{-305}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t_2 \leq 10^{-317}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;t_2 \leq 10^{+169}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(x \cdot t - z \cdot t\right)\\
\end{array}
\]
Alternative 2 Error 0.5 Cost 2640
\[\begin{array}{l}
t_1 := t \cdot \left(y \cdot \left(x - z\right)\right)\\
t_2 := x \cdot y - y \cdot z\\
\mathbf{if}\;t_2 \leq -2 \cdot 10^{+238}:\\
\;\;\;\;y \cdot \left(t \cdot \left(x - z\right)\right)\\
\mathbf{elif}\;t_2 \leq -2 \cdot 10^{-284}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t_2 \leq 10^{-317}:\\
\;\;\;\;\left(y \cdot t\right) \cdot \frac{1}{\frac{1}{x - z}}\\
\mathbf{elif}\;t_2 \leq 10^{+169}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(x \cdot t - z \cdot t\right)\\
\end{array}
\]
Alternative 3 Error 0.5 Cost 2640
\[\begin{array}{l}
t_1 := t \cdot \left(y \cdot \left(x - z\right)\right)\\
t_2 := x \cdot y - y \cdot z\\
\mathbf{if}\;t_2 \leq -2 \cdot 10^{+238}:\\
\;\;\;\;y \cdot \left(t \cdot \left(x - z\right)\right)\\
\mathbf{elif}\;t_2 \leq -2 \cdot 10^{-284}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t_2 \leq 10^{-317}:\\
\;\;\;\;x \cdot \left(y \cdot t\right) - z \cdot \left(y \cdot t\right)\\
\mathbf{elif}\;t_2 \leq 10^{+169}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(x \cdot t - z \cdot t\right)\\
\end{array}
\]
Alternative 4 Error 20.7 Cost 1308
\[\begin{array}{l}
t_1 := x \cdot \left(y \cdot t\right)\\
t_2 := y \cdot \left(x \cdot t\right)\\
t_3 := t \cdot \left(z \cdot \left(-y\right)\right)\\
\mathbf{if}\;x \leq -1.5160411728458046 \cdot 10^{+46}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq -1.6446502769178921 \cdot 10^{-35}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;x \leq -1.6383415681467727 \cdot 10^{-85}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 4.4249787263865344 \cdot 10^{-234}:\\
\;\;\;\;\left(z \cdot t\right) \cdot \left(-y\right)\\
\mathbf{elif}\;x \leq 2.1422372796740175 \cdot 10^{-122}:\\
\;\;\;\;z \cdot \left(t \cdot \left(-y\right)\right)\\
\mathbf{elif}\;x \leq 6.84166318247281 \cdot 10^{-85}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 4.883398283140772 \cdot 10^{-55}:\\
\;\;\;\;t_3\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\]
Alternative 5 Error 20.7 Cost 1176
\[\begin{array}{l}
t_1 := x \cdot \left(y \cdot t\right)\\
t_2 := y \cdot \left(x \cdot t\right)\\
t_3 := \left(z \cdot t\right) \cdot \left(-y\right)\\
\mathbf{if}\;x \leq -1.5160411728458046 \cdot 10^{+46}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq -1.6446502769178921 \cdot 10^{-35}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;x \leq -1.6383415681467727 \cdot 10^{-85}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 2.1422372796740175 \cdot 10^{-122}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;x \leq 6.84166318247281 \cdot 10^{-85}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 4.883398283140772 \cdot 10^{-55}:\\
\;\;\;\;t_3\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\]
Alternative 6 Error 20.9 Cost 1176
\[\begin{array}{l}
t_1 := y \cdot \left(x \cdot t\right)\\
t_2 := \left(z \cdot t\right) \cdot \left(-y\right)\\
\mathbf{if}\;x \leq -1.5160411728458046 \cdot 10^{+46}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq -1.6446502769178921 \cdot 10^{-35}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq -2.948675441101861 \cdot 10^{-108}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 2.1422372796740175 \cdot 10^{-122}:\\
\;\;\;\;z \cdot \left(t \cdot \left(-y\right)\right)\\
\mathbf{elif}\;x \leq 6.84166318247281 \cdot 10^{-85}:\\
\;\;\;\;x \cdot \left(y \cdot t\right)\\
\mathbf{elif}\;x \leq 4.883398283140772 \cdot 10^{-55}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
Alternative 7 Error 7.9 Cost 712
\[\begin{array}{l}
t_1 := y \cdot \left(x \cdot t\right)\\
\mathbf{if}\;x \leq -1 \cdot 10^{+195}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 10^{+155}:\\
\;\;\;\;t \cdot \left(y \cdot \left(x - z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
Alternative 8 Error 7.0 Cost 712
\[\begin{array}{l}
t_1 := y \cdot \left(t \cdot \left(x - z\right)\right)\\
\mathbf{if}\;z \leq 7.773364321466139 \cdot 10^{-296}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 7.428723056914474 \cdot 10^{-84}:\\
\;\;\;\;t \cdot \left(y \cdot \left(x - z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
Alternative 9 Error 31.4 Cost 320
\[y \cdot \left(x \cdot t\right)
\]