\[ \begin{array}{c}[y, z, t] = \mathsf{sort}([y, z, t])\\ [a, b] = \mathsf{sort}([a, b])\\ \end{array} \]
Math FPCore C Julia Wolfram TeX \[\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b
\]
↓
\[\begin{array}{l}
\mathbf{if}\;\left(y \cdot 9\right) \cdot z \leq 2 \cdot 10^{+167}:\\
\;\;\;\;\mathsf{fma}\left(x, 2, \mathsf{fma}\left(t, y \cdot \left(z \cdot -9\right), b \cdot \left(a \cdot 27\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(a, 27 \cdot b, x \cdot 2 - y \cdot \left(9 \cdot \left(z \cdot t\right)\right)\right)\\
\end{array}
\]
(FPCore (x y z t a b)
:precision binary64
(+ (- (* x 2.0) (* (* (* y 9.0) z) t)) (* (* a 27.0) b))) ↓
(FPCore (x y z t a b)
:precision binary64
(if (<= (* (* y 9.0) z) 2e+167)
(fma x 2.0 (fma t (* y (* z -9.0)) (* b (* a 27.0))))
(fma a (* 27.0 b) (- (* x 2.0) (* y (* 9.0 (* z t))))))) double code(double x, double y, double z, double t, double a, double b) {
return ((x * 2.0) - (((y * 9.0) * z) * t)) + ((a * 27.0) * b);
}
↓
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (((y * 9.0) * z) <= 2e+167) {
tmp = fma(x, 2.0, fma(t, (y * (z * -9.0)), (b * (a * 27.0))));
} else {
tmp = fma(a, (27.0 * b), ((x * 2.0) - (y * (9.0 * (z * t)))));
}
return tmp;
}
function code(x, y, z, t, a, b)
return Float64(Float64(Float64(x * 2.0) - Float64(Float64(Float64(y * 9.0) * z) * t)) + Float64(Float64(a * 27.0) * b))
end
↓
function code(x, y, z, t, a, b)
tmp = 0.0
if (Float64(Float64(y * 9.0) * z) <= 2e+167)
tmp = fma(x, 2.0, fma(t, Float64(y * Float64(z * -9.0)), Float64(b * Float64(a * 27.0))));
else
tmp = fma(a, Float64(27.0 * b), Float64(Float64(x * 2.0) - Float64(y * Float64(9.0 * Float64(z * t)))));
end
return tmp
end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x * 2.0), $MachinePrecision] - N[(N[(N[(y * 9.0), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] + N[(N[(a * 27.0), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
↓
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[N[(N[(y * 9.0), $MachinePrecision] * z), $MachinePrecision], 2e+167], N[(x * 2.0 + N[(t * N[(y * N[(z * -9.0), $MachinePrecision]), $MachinePrecision] + N[(b * N[(a * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * N[(27.0 * b), $MachinePrecision] + N[(N[(x * 2.0), $MachinePrecision] - N[(y * N[(9.0 * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b
↓
\begin{array}{l}
\mathbf{if}\;\left(y \cdot 9\right) \cdot z \leq 2 \cdot 10^{+167}:\\
\;\;\;\;\mathsf{fma}\left(x, 2, \mathsf{fma}\left(t, y \cdot \left(z \cdot -9\right), b \cdot \left(a \cdot 27\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(a, 27 \cdot b, x \cdot 2 - y \cdot \left(9 \cdot \left(z \cdot t\right)\right)\right)\\
\end{array}
Alternatives Alternative 1 Error 0.6 Cost 7748
\[\begin{array}{l}
\mathbf{if}\;\left(y \cdot 9\right) \cdot z \leq 2 \cdot 10^{+167}:\\
\;\;\;\;\left(x \cdot 2 + t \cdot \left(z \cdot \left(y \cdot -9\right)\right)\right) + b \cdot \left(a \cdot 27\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(a, 27 \cdot b, x \cdot 2 - y \cdot \left(9 \cdot \left(z \cdot t\right)\right)\right)\\
\end{array}
\]
Alternative 2 Error 33.7 Cost 1636
\[\begin{array}{l}
t_1 := -9 \cdot \left(y \cdot \left(z \cdot t\right)\right)\\
t_2 := 27 \cdot \left(a \cdot b\right)\\
t_3 := b \cdot \left(a \cdot 27\right)\\
\mathbf{if}\;b \leq -8.2 \cdot 10^{-85}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;b \leq 2 \cdot 10^{-68}:\\
\;\;\;\;x \cdot 2\\
\mathbf{elif}\;b \leq 1.85 \cdot 10^{-7}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \leq 4 \cdot 10^{+57}:\\
\;\;\;\;x \cdot 2\\
\mathbf{elif}\;b \leq 3.6 \cdot 10^{+70}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;b \leq 2.6 \cdot 10^{+91}:\\
\;\;\;\;x \cdot 2\\
\mathbf{elif}\;b \leq 4.9 \cdot 10^{+126}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;b \leq 1.8 \cdot 10^{+145}:\\
\;\;\;\;x \cdot 2\\
\mathbf{elif}\;b \leq 6.5 \cdot 10^{+163}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_3\\
\end{array}
\]
Alternative 3 Error 33.7 Cost 1636
\[\begin{array}{l}
t_1 := y \cdot \left(t \cdot \left(z \cdot -9\right)\right)\\
t_2 := 27 \cdot \left(a \cdot b\right)\\
t_3 := b \cdot \left(a \cdot 27\right)\\
\mathbf{if}\;b \leq -8.2 \cdot 10^{-85}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;b \leq 2.8 \cdot 10^{-68}:\\
\;\;\;\;x \cdot 2\\
\mathbf{elif}\;b \leq 2.2 \cdot 10^{-7}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \leq 2.8 \cdot 10^{+56}:\\
\;\;\;\;x \cdot 2\\
\mathbf{elif}\;b \leq 3.6 \cdot 10^{+70}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;b \leq 1.9 \cdot 10^{+91}:\\
\;\;\;\;x \cdot 2\\
\mathbf{elif}\;b \leq 6.2 \cdot 10^{+126}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;b \leq 7.8 \cdot 10^{+143}:\\
\;\;\;\;x \cdot 2\\
\mathbf{elif}\;b \leq 2.1 \cdot 10^{+164}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_3\\
\end{array}
\]
Alternative 4 Error 33.7 Cost 1636
\[\begin{array}{l}
t_1 := 27 \cdot \left(a \cdot b\right)\\
t_2 := b \cdot \left(a \cdot 27\right)\\
\mathbf{if}\;b \leq -8.2 \cdot 10^{-85}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \leq 9.5 \cdot 10^{-69}:\\
\;\;\;\;x \cdot 2\\
\mathbf{elif}\;b \leq 3 \cdot 10^{-8}:\\
\;\;\;\;y \cdot \left(z \cdot \left(t \cdot -9\right)\right)\\
\mathbf{elif}\;b \leq 1.2 \cdot 10^{+59}:\\
\;\;\;\;x \cdot 2\\
\mathbf{elif}\;b \leq 1.42 \cdot 10^{+71}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \leq 3 \cdot 10^{+91}:\\
\;\;\;\;x \cdot 2\\
\mathbf{elif}\;b \leq 5.4 \cdot 10^{+126}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;b \leq 1.4 \cdot 10^{+145}:\\
\;\;\;\;x \cdot 2\\
\mathbf{elif}\;b \leq 9.2 \cdot 10^{+163}:\\
\;\;\;\;y \cdot \left(t \cdot \left(z \cdot -9\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\]
Alternative 5 Error 33.6 Cost 1636
\[\begin{array}{l}
t_1 := 27 \cdot \left(a \cdot b\right)\\
t_2 := b \cdot \left(a \cdot 27\right)\\
\mathbf{if}\;b \leq -8 \cdot 10^{-85}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \leq 1.15 \cdot 10^{-66}:\\
\;\;\;\;x \cdot 2\\
\mathbf{elif}\;b \leq 1.7 \cdot 10^{-7}:\\
\;\;\;\;\left(y \cdot z\right) \cdot \left(t \cdot -9\right)\\
\mathbf{elif}\;b \leq 1.3 \cdot 10^{+59}:\\
\;\;\;\;x \cdot 2\\
\mathbf{elif}\;b \leq 2 \cdot 10^{+71}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \leq 2.7 \cdot 10^{+91}:\\
\;\;\;\;x \cdot 2\\
\mathbf{elif}\;b \leq 6.2 \cdot 10^{+126}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;b \leq 6 \cdot 10^{+144}:\\
\;\;\;\;x \cdot 2\\
\mathbf{elif}\;b \leq 6.5 \cdot 10^{+163}:\\
\;\;\;\;y \cdot \left(t \cdot \left(z \cdot -9\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\]
Alternative 6 Error 10.7 Cost 1480
\[\begin{array}{l}
t_1 := b \cdot \left(a \cdot 27\right)\\
\mathbf{if}\;t_1 \leq -1 \cdot 10^{+35}:\\
\;\;\;\;a \cdot \left(27 \cdot b\right) + x \cdot 2\\
\mathbf{elif}\;t_1 \leq 2 \cdot 10^{-6}:\\
\;\;\;\;x \cdot 2 + -9 \cdot \left(y \cdot \left(z \cdot t\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot 2 + t_1\\
\end{array}
\]
Alternative 7 Error 1.3 Cost 1220
\[\begin{array}{l}
\mathbf{if}\;z \leq -5.8 \cdot 10^{+75}:\\
\;\;\;\;x \cdot 2 + -9 \cdot \left(y \cdot \left(z \cdot t\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot 2 - t \cdot \left(9 \cdot \left(y \cdot z\right)\right)\right) + b \cdot \left(a \cdot 27\right)\\
\end{array}
\]
Alternative 8 Error 0.7 Cost 1220
\[\begin{array}{l}
\mathbf{if}\;z \leq -1 \cdot 10^{+34}:\\
\;\;\;\;\left(x \cdot 2 + \left(z \cdot t\right) \cdot \left(y \cdot -9\right)\right) + a \cdot \left(27 \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot 2 - t \cdot \left(9 \cdot \left(y \cdot z\right)\right)\right) + b \cdot \left(a \cdot 27\right)\\
\end{array}
\]
Alternative 9 Error 16.2 Cost 1105
\[\begin{array}{l}
\mathbf{if}\;z \leq -1.4 \cdot 10^{+60}:\\
\;\;\;\;z \cdot \left(-9 \cdot \left(y \cdot t\right)\right)\\
\mathbf{elif}\;z \leq -2.8 \cdot 10^{-79} \lor \neg \left(z \leq -2.4 \cdot 10^{-94}\right) \land z \leq 1.12 \cdot 10^{+29}:\\
\;\;\;\;a \cdot \left(27 \cdot b\right) + x \cdot 2\\
\mathbf{else}:\\
\;\;\;\;\left(y \cdot z\right) \cdot \left(t \cdot -9\right)\\
\end{array}
\]
Alternative 10 Error 16.1 Cost 1105
\[\begin{array}{l}
\mathbf{if}\;z \leq -7.5 \cdot 10^{+50}:\\
\;\;\;\;z \cdot \left(-9 \cdot \left(y \cdot t\right)\right)\\
\mathbf{elif}\;z \leq -2.8 \cdot 10^{-79}:\\
\;\;\;\;a \cdot \left(27 \cdot b\right) + x \cdot 2\\
\mathbf{elif}\;z \leq -2.4 \cdot 10^{-94} \lor \neg \left(z \leq 2.25 \cdot 10^{+30}\right):\\
\;\;\;\;\left(y \cdot z\right) \cdot \left(t \cdot -9\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot 2 + b \cdot \left(a \cdot 27\right)\\
\end{array}
\]
Alternative 11 Error 27.9 Cost 585
\[\begin{array}{l}
\mathbf{if}\;x \leq -16500 \lor \neg \left(x \leq 3.6 \cdot 10^{+48}\right):\\
\;\;\;\;x \cdot 2\\
\mathbf{else}:\\
\;\;\;\;b \cdot \left(a \cdot 27\right)\\
\end{array}
\]
Alternative 12 Error 27.9 Cost 584
\[\begin{array}{l}
\mathbf{if}\;x \leq -185000:\\
\;\;\;\;x \cdot 2\\
\mathbf{elif}\;x \leq 3 \cdot 10^{+48}:\\
\;\;\;\;27 \cdot \left(a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot 2\\
\end{array}
\]
Alternative 13 Error 37.8 Cost 192
\[x \cdot 2
\]