\[ \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^{+149}:\\
\;\;\;\;\left(x \cdot 2 - \left(y \cdot z\right) \cdot \left(9 \cdot t\right)\right) + a \cdot \left(27 \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(x, 2, \mathsf{fma}\left(y, t \cdot \left(z \cdot -9\right), b \cdot \left(a \cdot 27\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+149)
(+ (- (* x 2.0) (* (* y z) (* 9.0 t))) (* a (* 27.0 b)))
(fma x 2.0 (fma y (* t (* z -9.0)) (* b (* a 27.0)))))) 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+149) {
tmp = ((x * 2.0) - ((y * z) * (9.0 * t))) + (a * (27.0 * b));
} else {
tmp = fma(x, 2.0, fma(y, (t * (z * -9.0)), (b * (a * 27.0))));
}
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+149)
tmp = Float64(Float64(Float64(x * 2.0) - Float64(Float64(y * z) * Float64(9.0 * t))) + Float64(a * Float64(27.0 * b)));
else
tmp = fma(x, 2.0, fma(y, Float64(t * Float64(z * -9.0)), Float64(b * Float64(a * 27.0))));
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+149], N[(N[(N[(x * 2.0), $MachinePrecision] - N[(N[(y * z), $MachinePrecision] * N[(9.0 * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * 2.0 + N[(y * N[(t * N[(z * -9.0), $MachinePrecision]), $MachinePrecision] + N[(b * N[(a * 27.0), $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^{+149}:\\
\;\;\;\;\left(x \cdot 2 - \left(y \cdot z\right) \cdot \left(9 \cdot t\right)\right) + a \cdot \left(27 \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(x, 2, \mathsf{fma}\left(y, t \cdot \left(z \cdot -9\right), b \cdot \left(a \cdot 27\right)\right)\right)\\
\end{array}
Alternatives Alternative 1 Error 0.7 Cost 7748
\[\begin{array}{l}
\mathbf{if}\;\left(y \cdot 9\right) \cdot z \leq 10^{+172}:\\
\;\;\;\;\left(x \cdot 2 - \left(y \cdot z\right) \cdot \left(9 \cdot t\right)\right) + a \cdot \left(27 \cdot b\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 10.7 Cost 1481
\[\begin{array}{l}
t_1 := b \cdot \left(a \cdot 27\right)\\
\mathbf{if}\;t_1 \leq -5 \cdot 10^{+68} \lor \neg \left(t_1 \leq 10^{-23}\right):\\
\;\;\;\;a \cdot \left(27 \cdot b\right) + x \cdot 2\\
\mathbf{else}:\\
\;\;\;\;x \cdot 2 - \left(y \cdot 9\right) \cdot \left(z \cdot t\right)\\
\end{array}
\]
Alternative 3 Error 10.7 Cost 1481
\[\begin{array}{l}
t_1 := b \cdot \left(a \cdot 27\right)\\
\mathbf{if}\;t_1 \leq -5 \cdot 10^{+68} \lor \neg \left(t_1 \leq 10^{-23}\right):\\
\;\;\;\;a \cdot \left(27 \cdot b\right) + x \cdot 2\\
\mathbf{else}:\\
\;\;\;\;x \cdot 2 + -9 \cdot \left(y \cdot \left(z \cdot t\right)\right)\\
\end{array}
\]
Alternative 4 Error 21.0 Cost 1369
\[\begin{array}{l}
t_1 := a \cdot \left(27 \cdot b\right)\\
t_2 := t_1 + x \cdot 2\\
\mathbf{if}\;x \leq -6 \cdot 10^{-74}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq -5.8 \cdot 10^{-183}:\\
\;\;\;\;z \cdot \left(y \cdot \left(t \cdot -9\right)\right)\\
\mathbf{elif}\;x \leq -5.8 \cdot 10^{-231}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 6.1 \cdot 10^{-293}:\\
\;\;\;\;-9 \cdot \left(\left(y \cdot z\right) \cdot t\right)\\
\mathbf{elif}\;x \leq 8.5 \cdot 10^{-183} \lor \neg \left(x \leq 4.4 \cdot 10^{-124}\right):\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(-9 \cdot \left(z \cdot t\right)\right)\\
\end{array}
\]
Alternative 5 Error 21.0 Cost 1368
\[\begin{array}{l}
t_1 := a \cdot \left(27 \cdot b\right)\\
t_2 := t_1 + x \cdot 2\\
\mathbf{if}\;x \leq -1.15 \cdot 10^{-70}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq -4.2 \cdot 10^{-183}:\\
\;\;\;\;z \cdot \left(y \cdot \left(t \cdot -9\right)\right)\\
\mathbf{elif}\;x \leq -3 \cdot 10^{-231}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 7.2 \cdot 10^{-293}:\\
\;\;\;\;-9 \cdot \left(\left(y \cdot z\right) \cdot t\right)\\
\mathbf{elif}\;x \leq 2.1 \cdot 10^{-182}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq 6.5 \cdot 10^{-125}:\\
\;\;\;\;y \cdot \left(-9 \cdot \left(z \cdot t\right)\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot \left(a \cdot 27\right) + x \cdot 2\\
\end{array}
\]
Alternative 6 Error 30.0 Cost 1244
\[\begin{array}{l}
t_1 := a \cdot \left(27 \cdot b\right)\\
t_2 := -9 \cdot \left(y \cdot \left(z \cdot t\right)\right)\\
\mathbf{if}\;x \leq -1.4 \cdot 10^{+77}:\\
\;\;\;\;x \cdot 2\\
\mathbf{elif}\;x \leq -1.95 \cdot 10^{-183}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq -1.25 \cdot 10^{-230}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 6.2 \cdot 10^{-293}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq 3.7 \cdot 10^{-183}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 2.15 \cdot 10^{-124}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq 3850000000:\\
\;\;\;\;b \cdot \left(a \cdot 27\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot 2\\
\end{array}
\]
Alternative 7 Error 30.1 Cost 1244
\[\begin{array}{l}
t_1 := a \cdot \left(27 \cdot b\right)\\
t_2 := -9 \cdot \left(\left(y \cdot z\right) \cdot t\right)\\
\mathbf{if}\;x \leq -9.5 \cdot 10^{+81}:\\
\;\;\;\;x \cdot 2\\
\mathbf{elif}\;x \leq -2.4 \cdot 10^{-183}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq -5.2 \cdot 10^{-231}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 8.6 \cdot 10^{-293}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq 2.6 \cdot 10^{-183}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 3.4 \cdot 10^{-123}:\\
\;\;\;\;-9 \cdot \left(y \cdot \left(z \cdot t\right)\right)\\
\mathbf{elif}\;x \leq 5200000000:\\
\;\;\;\;b \cdot \left(a \cdot 27\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot 2\\
\end{array}
\]
Alternative 8 Error 30.1 Cost 1244
\[\begin{array}{l}
t_1 := a \cdot \left(27 \cdot b\right)\\
t_2 := -9 \cdot \left(\left(y \cdot z\right) \cdot t\right)\\
\mathbf{if}\;x \leq -9.5 \cdot 10^{+79}:\\
\;\;\;\;x \cdot 2\\
\mathbf{elif}\;x \leq -4.2 \cdot 10^{-183}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq -9.2 \cdot 10^{-231}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 7.1 \cdot 10^{-293}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq 2 \cdot 10^{-182}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 4.1 \cdot 10^{-125}:\\
\;\;\;\;y \cdot \left(-9 \cdot \left(z \cdot t\right)\right)\\
\mathbf{elif}\;x \leq 4600000000:\\
\;\;\;\;b \cdot \left(a \cdot 27\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot 2\\
\end{array}
\]
Alternative 9 Error 12.8 Cost 1229
\[\begin{array}{l}
t_1 := b \cdot \left(a \cdot 27\right)\\
\mathbf{if}\;x \leq -1.16 \cdot 10^{+164}:\\
\;\;\;\;t_1 + x \cdot 2\\
\mathbf{elif}\;x \leq -2.7 \cdot 10^{+73} \lor \neg \left(x \leq 1150\right):\\
\;\;\;\;x \cdot 2 + -9 \cdot \left(y \cdot \left(z \cdot t\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_1 + y \cdot \left(-9 \cdot \left(z \cdot t\right)\right)\\
\end{array}
\]
Alternative 10 Error 12.8 Cost 1228
\[\begin{array}{l}
t_1 := y \cdot \left(z \cdot t\right)\\
\mathbf{if}\;x \leq -1.4 \cdot 10^{+167}:\\
\;\;\;\;b \cdot \left(a \cdot 27\right) + x \cdot 2\\
\mathbf{elif}\;x \leq -1.4 \cdot 10^{+79}:\\
\;\;\;\;x \cdot 2 - \left(y \cdot 9\right) \cdot \left(z \cdot t\right)\\
\mathbf{elif}\;x \leq 900:\\
\;\;\;\;27 \cdot \left(a \cdot b\right) - 9 \cdot t_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot 2 + -9 \cdot t_1\\
\end{array}
\]
Alternative 11 Error 1.8 Cost 1220
\[\begin{array}{l}
t_1 := a \cdot \left(27 \cdot b\right)\\
\mathbf{if}\;z \leq 1.6 \cdot 10^{+28}:\\
\;\;\;\;t_1 + \left(x \cdot 2 - \left(y \cdot 9\right) \cdot \left(z \cdot t\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_1 + z \cdot \left(t \cdot \left(y \cdot -9\right)\right)\\
\end{array}
\]
Alternative 12 Error 0.6 Cost 1220
\[\begin{array}{l}
t_1 := a \cdot \left(27 \cdot b\right)\\
\mathbf{if}\;z \leq -5 \cdot 10^{-48}:\\
\;\;\;\;t_1 + \left(x \cdot 2 - \left(y \cdot 9\right) \cdot \left(z \cdot t\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot 2 - \left(y \cdot z\right) \cdot \left(9 \cdot t\right)\right) + t_1\\
\end{array}
\]
Alternative 13 Error 28.4 Cost 585
\[\begin{array}{l}
\mathbf{if}\;x \leq -4 \cdot 10^{+78} \lor \neg \left(x \leq 5000000000\right):\\
\;\;\;\;x \cdot 2\\
\mathbf{else}:\\
\;\;\;\;27 \cdot \left(a \cdot b\right)\\
\end{array}
\]
Alternative 14 Error 28.4 Cost 585
\[\begin{array}{l}
\mathbf{if}\;x \leq -1.95 \cdot 10^{+77} \lor \neg \left(x \leq 3800000000\right):\\
\;\;\;\;x \cdot 2\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(27 \cdot b\right)\\
\end{array}
\]
Alternative 15 Error 37.3 Cost 192
\[x \cdot 2
\]