\[ \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 5 \cdot 10^{-83}:\\
\;\;\;\;\mathsf{fma}\left(x, 2, \mathsf{fma}\left(t, y \cdot \left(z \cdot -9\right), \left(a \cdot 27\right) \cdot b\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot 2 + \left(z \cdot t\right) \cdot \left(y \cdot -9\right)\right) + a \cdot \left(27 \cdot b\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) 5e-83)
(fma x 2.0 (fma t (* y (* z -9.0)) (* (* a 27.0) b)))
(+ (+ (* x 2.0) (* (* z t) (* y -9.0))) (* a (* 27.0 b))))) 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) <= 5e-83) {
tmp = fma(x, 2.0, fma(t, (y * (z * -9.0)), ((a * 27.0) * b)));
} else {
tmp = ((x * 2.0) + ((z * t) * (y * -9.0))) + (a * (27.0 * b));
}
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) <= 5e-83)
tmp = fma(x, 2.0, fma(t, Float64(y * Float64(z * -9.0)), Float64(Float64(a * 27.0) * b)));
else
tmp = Float64(Float64(Float64(x * 2.0) + Float64(Float64(z * t) * Float64(y * -9.0))) + Float64(a * Float64(27.0 * b)));
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], 5e-83], N[(x * 2.0 + N[(t * N[(y * N[(z * -9.0), $MachinePrecision]), $MachinePrecision] + N[(N[(a * 27.0), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x * 2.0), $MachinePrecision] + N[(N[(z * t), $MachinePrecision] * N[(y * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * N[(27.0 * b), $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 5 \cdot 10^{-83}:\\
\;\;\;\;\mathsf{fma}\left(x, 2, \mathsf{fma}\left(t, y \cdot \left(z \cdot -9\right), \left(a \cdot 27\right) \cdot b\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot 2 + \left(z \cdot t\right) \cdot \left(y \cdot -9\right)\right) + a \cdot \left(27 \cdot b\right)\\
\end{array}
Alternatives Alternative 1 Error 13.3 Cost 1496
\[\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 := t_2 + t_1\\
t_4 := x \cdot 2 + t_2\\
\mathbf{if}\;x \leq -1.3 \cdot 10^{+110}:\\
\;\;\;\;t_4\\
\mathbf{elif}\;x \leq -1.05 \cdot 10^{-22}:\\
\;\;\;\;x \cdot 2 + -9 \cdot \left(t \cdot \left(y \cdot z\right)\right)\\
\mathbf{elif}\;x \leq 7.6 \cdot 10^{-81}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;x \leq 7.6 \cdot 10^{+19}:\\
\;\;\;\;t_4\\
\mathbf{elif}\;x \leq 7.6 \cdot 10^{+111}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;x \leq 1.9 \cdot 10^{+190}:\\
\;\;\;\;x \cdot 2 + t_1\\
\mathbf{else}:\\
\;\;\;\;t_4\\
\end{array}
\]
Alternative 2 Error 1.3 Cost 1476
\[\begin{array}{l}
t_1 := \left(y \cdot 9\right) \cdot z\\
\mathbf{if}\;t_1 \leq 5 \cdot 10^{-83}:\\
\;\;\;\;\left(a \cdot 27\right) \cdot b + \left(x \cdot 2 - t_1 \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot 2 + \left(z \cdot t\right) \cdot \left(y \cdot -9\right)\right) + a \cdot \left(27 \cdot b\right)\\
\end{array}
\]
Alternative 3 Error 0.6 Cost 1348
\[\begin{array}{l}
t_1 := a \cdot \left(27 \cdot b\right)\\
\mathbf{if}\;y \cdot 9 \leq -5 \cdot 10^{-26}:\\
\;\;\;\;\left(x \cdot 2 + \left(z \cdot t\right) \cdot \left(y \cdot -9\right)\right) + t_1\\
\mathbf{else}:\\
\;\;\;\;t_1 + \left(x \cdot 2 + -9 \cdot \left(z \cdot \left(y \cdot t\right)\right)\right)\\
\end{array}
\]
Alternative 4 Error 5.3 Cost 1220
\[\begin{array}{l}
\mathbf{if}\;t \leq 3.9 \cdot 10^{+207}:\\
\;\;\;\;a \cdot \left(27 \cdot b\right) + \left(x \cdot 2 + -9 \cdot \left(z \cdot \left(y \cdot t\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot 2 + -9 \cdot \left(t \cdot \left(y \cdot z\right)\right)\\
\end{array}
\]
Alternative 5 Error 13.2 Cost 1101
\[\begin{array}{l}
\mathbf{if}\;z \leq -1.4 \cdot 10^{+85}:\\
\;\;\;\;y \cdot \left(-9 \cdot \left(z \cdot t\right)\right)\\
\mathbf{elif}\;z \leq -1.7 \cdot 10^{-75} \lor \neg \left(z \leq 2.1 \cdot 10^{-90}\right):\\
\;\;\;\;x \cdot 2 + -9 \cdot \left(t \cdot \left(y \cdot z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot 2 + 27 \cdot \left(a \cdot b\right)\\
\end{array}
\]
Alternative 6 Error 12.3 Cost 968
\[\begin{array}{l}
\mathbf{if}\;z \leq -1.2 \cdot 10^{-73}:\\
\;\;\;\;x \cdot 2 + -9 \cdot \left(y \cdot \left(z \cdot t\right)\right)\\
\mathbf{elif}\;z \leq 2.4 \cdot 10^{-88}:\\
\;\;\;\;x \cdot 2 + 27 \cdot \left(a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot 2 + -9 \cdot \left(t \cdot \left(y \cdot z\right)\right)\\
\end{array}
\]
Alternative 7 Error 12.4 Cost 968
\[\begin{array}{l}
\mathbf{if}\;z \leq -4.4 \cdot 10^{-75}:\\
\;\;\;\;x \cdot 2 + \left(z \cdot t\right) \cdot \left(y \cdot -9\right)\\
\mathbf{elif}\;z \leq 2.1 \cdot 10^{-88}:\\
\;\;\;\;x \cdot 2 + 27 \cdot \left(a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot 2 + -9 \cdot \left(t \cdot \left(y \cdot z\right)\right)\\
\end{array}
\]
Alternative 8 Error 16.6 Cost 708
\[\begin{array}{l}
\mathbf{if}\;z \leq -1.7 \cdot 10^{+47}:\\
\;\;\;\;y \cdot \left(-9 \cdot \left(z \cdot t\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot 2 + 27 \cdot \left(a \cdot b\right)\\
\end{array}
\]
Alternative 9 Error 28.7 Cost 584
\[\begin{array}{l}
\mathbf{if}\;x \leq -1.1 \cdot 10^{-22}:\\
\;\;\;\;x \cdot 2\\
\mathbf{elif}\;x \leq 5.6 \cdot 10^{+115}:\\
\;\;\;\;27 \cdot \left(a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot 2\\
\end{array}
\]
Alternative 10 Error 37.2 Cost 192
\[x \cdot 2
\]