\[ \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}
t_1 := \left(a \cdot 27\right) \cdot b\\
\mathbf{if}\;y \cdot 9 \leq -1 \cdot 10^{+36}:\\
\;\;\;\;\mathsf{fma}\left(x, 2, \mathsf{fma}\left(y, t \cdot \left(z \cdot -9\right), t_1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_1 + \left(\left(z \cdot -9\right) \cdot \left(y \cdot t\right) + x \cdot 2\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
(let* ((t_1 (* (* a 27.0) b)))
(if (<= (* y 9.0) -1e+36)
(fma x 2.0 (fma y (* t (* z -9.0)) t_1))
(+ t_1 (+ (* (* z -9.0) (* y t)) (* x 2.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 t_1 = (a * 27.0) * b;
double tmp;
if ((y * 9.0) <= -1e+36) {
tmp = fma(x, 2.0, fma(y, (t * (z * -9.0)), t_1));
} else {
tmp = t_1 + (((z * -9.0) * (y * t)) + (x * 2.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)
t_1 = Float64(Float64(a * 27.0) * b)
tmp = 0.0
if (Float64(y * 9.0) <= -1e+36)
tmp = fma(x, 2.0, fma(y, Float64(t * Float64(z * -9.0)), t_1));
else
tmp = Float64(t_1 + Float64(Float64(Float64(z * -9.0) * Float64(y * t)) + Float64(x * 2.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_] := Block[{t$95$1 = N[(N[(a * 27.0), $MachinePrecision] * b), $MachinePrecision]}, If[LessEqual[N[(y * 9.0), $MachinePrecision], -1e+36], N[(x * 2.0 + N[(y * N[(t * N[(z * -9.0), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision], N[(t$95$1 + N[(N[(N[(z * -9.0), $MachinePrecision] * N[(y * t), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $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}
t_1 := \left(a \cdot 27\right) \cdot b\\
\mathbf{if}\;y \cdot 9 \leq -1 \cdot 10^{+36}:\\
\;\;\;\;\mathsf{fma}\left(x, 2, \mathsf{fma}\left(y, t \cdot \left(z \cdot -9\right), t_1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_1 + \left(\left(z \cdot -9\right) \cdot \left(y \cdot t\right) + x \cdot 2\right)\\
\end{array}
Alternatives Alternative 1 Accuracy 99.0% Cost 7620.00
\[\begin{array}{l}
\mathbf{if}\;y \cdot 9 \leq -1 \cdot 10^{+36}:\\
\;\;\;\;\mathsf{fma}\left(a, 27 \cdot b, x \cdot 2 + y \cdot \left(-9 \cdot \left(t \cdot z\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(a \cdot 27\right) \cdot b + \left(\left(z \cdot -9\right) \cdot \left(y \cdot t\right) + x \cdot 2\right)\\
\end{array}
\]
Alternative 2 Accuracy 74.5% Cost 1492.00
\[\begin{array}{l}
t_1 := \left(a \cdot 27\right) \cdot b\\
t_2 := t_1 + t \cdot \left(y \cdot \left(z \cdot -9\right)\right)\\
t_3 := x \cdot 2 + a \cdot \left(27 \cdot b\right)\\
\mathbf{if}\;t \leq 4.4 \cdot 10^{+51}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;t \leq 4.5 \cdot 10^{+79}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq 5.8 \cdot 10^{+129}:\\
\;\;\;\;t_1 + x \cdot 2\\
\mathbf{elif}\;t \leq 1.02 \cdot 10^{+152}:\\
\;\;\;\;x \cdot 2 + \left(t \cdot z\right) \cdot \left(y \cdot -9\right)\\
\mathbf{elif}\;t \leq 1.05 \cdot 10^{+161}:\\
\;\;\;\;t_3\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\]
Alternative 3 Accuracy 74.7% Cost 1492.00
\[\begin{array}{l}
t_1 := \left(a \cdot 27\right) \cdot b\\
t_2 := x \cdot 2 + a \cdot \left(27 \cdot b\right)\\
\mathbf{if}\;t \leq 1.1 \cdot 10^{+55}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq 4.6 \cdot 10^{+79}:\\
\;\;\;\;27 \cdot \left(a \cdot b\right) + -9 \cdot \left(y \cdot \left(t \cdot z\right)\right)\\
\mathbf{elif}\;t \leq 1.95 \cdot 10^{+131}:\\
\;\;\;\;t_1 + x \cdot 2\\
\mathbf{elif}\;t \leq 1.95 \cdot 10^{+152}:\\
\;\;\;\;x \cdot 2 + \left(t \cdot z\right) \cdot \left(y \cdot -9\right)\\
\mathbf{elif}\;t \leq 1.15 \cdot 10^{+161}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_1 + t \cdot \left(y \cdot \left(z \cdot -9\right)\right)\\
\end{array}
\]
Alternative 4 Accuracy 83.6% Cost 1480.00
\[\begin{array}{l}
t_1 := \left(a \cdot 27\right) \cdot b\\
\mathbf{if}\;t_1 \leq -2 \cdot 10^{-101}:\\
\;\;\;\;t_1 + x \cdot 2\\
\mathbf{elif}\;t_1 \leq 5 \cdot 10^{-55}:\\
\;\;\;\;x \cdot 2 + \left(t \cdot z\right) \cdot \left(y \cdot -9\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot 2 + a \cdot \left(27 \cdot b\right)\\
\end{array}
\]
Alternative 5 Accuracy 83.6% Cost 1480.00
\[\begin{array}{l}
t_1 := \left(a \cdot 27\right) \cdot b\\
\mathbf{if}\;t_1 \leq -2 \cdot 10^{-101}:\\
\;\;\;\;t_1 + x \cdot 2\\
\mathbf{elif}\;t_1 \leq 5 \cdot 10^{-55}:\\
\;\;\;\;x \cdot 2 + -9 \cdot \left(y \cdot \left(t \cdot z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot 2 + a \cdot \left(27 \cdot b\right)\\
\end{array}
\]
Alternative 6 Accuracy 91.2% Cost 1220.00
\[\begin{array}{l}
t_1 := \left(a \cdot 27\right) \cdot b\\
\mathbf{if}\;t \leq 1.35 \cdot 10^{+252}:\\
\;\;\;\;t_1 + \left(\left(z \cdot -9\right) \cdot \left(y \cdot t\right) + x \cdot 2\right)\\
\mathbf{else}:\\
\;\;\;\;t_1 + t \cdot \left(y \cdot \left(z \cdot -9\right)\right)\\
\end{array}
\]
Alternative 7 Accuracy 99.1% Cost 1220.00
\[\begin{array}{l}
t_1 := \left(a \cdot 27\right) \cdot b\\
\mathbf{if}\;z \leq -1.7 \cdot 10^{-46}:\\
\;\;\;\;t_1 + \left(\left(z \cdot -9\right) \cdot \left(y \cdot t\right) + x \cdot 2\right)\\
\mathbf{else}:\\
\;\;\;\;t_1 + \left(x \cdot 2 + t \cdot \left(-9 \cdot \left(y \cdot z\right)\right)\right)\\
\end{array}
\]
Alternative 8 Accuracy 74.4% Cost 1104.00
\[\begin{array}{l}
t_1 := x \cdot 2 + a \cdot \left(27 \cdot b\right)\\
t_2 := -9 \cdot \left(z \cdot \left(y \cdot t\right)\right)\\
\mathbf{if}\;z \leq -1.55 \cdot 10^{+54}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq 6.8 \cdot 10^{-71}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 5 \cdot 10^{-59}:\\
\;\;\;\;\left(t \cdot z\right) \cdot \left(y \cdot -9\right)\\
\mathbf{elif}\;z \leq 2 \cdot 10^{+59}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\]
Alternative 9 Accuracy 74.5% Cost 1104.00
\[\begin{array}{l}
t_1 := -9 \cdot \left(z \cdot \left(y \cdot t\right)\right)\\
\mathbf{if}\;z \leq -2.6 \cdot 10^{+55}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 6.8 \cdot 10^{-71}:\\
\;\;\;\;\left(a \cdot 27\right) \cdot b + x \cdot 2\\
\mathbf{elif}\;z \leq 5 \cdot 10^{-59}:\\
\;\;\;\;\left(t \cdot z\right) \cdot \left(y \cdot -9\right)\\
\mathbf{elif}\;z \leq 4 \cdot 10^{+59}:\\
\;\;\;\;x \cdot 2 + a \cdot \left(27 \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
Alternative 10 Accuracy 55.7% Cost 848.00
\[\begin{array}{l}
\mathbf{if}\;x \leq -0.13:\\
\;\;\;\;x \cdot 2\\
\mathbf{elif}\;x \leq -4.8 \cdot 10^{-105}:\\
\;\;\;\;a \cdot \left(27 \cdot b\right)\\
\mathbf{elif}\;x \leq -1.34 \cdot 10^{-188}:\\
\;\;\;\;-9 \cdot \left(y \cdot \left(t \cdot z\right)\right)\\
\mathbf{elif}\;x \leq 1.52 \cdot 10^{-18}:\\
\;\;\;\;\left(a \cdot 27\right) \cdot b\\
\mathbf{else}:\\
\;\;\;\;x \cdot 2\\
\end{array}
\]
Alternative 11 Accuracy 56.6% Cost 584.00
\[\begin{array}{l}
\mathbf{if}\;x \leq -0.054:\\
\;\;\;\;x \cdot 2\\
\mathbf{elif}\;x \leq 1.12 \cdot 10^{-17}:\\
\;\;\;\;27 \cdot \left(a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot 2\\
\end{array}
\]
Alternative 12 Accuracy 56.5% Cost 584.00
\[\begin{array}{l}
\mathbf{if}\;x \leq -0.0305:\\
\;\;\;\;x \cdot 2\\
\mathbf{elif}\;x \leq 5 \cdot 10^{-19}:\\
\;\;\;\;a \cdot \left(27 \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot 2\\
\end{array}
\]
Alternative 13 Accuracy 56.5% Cost 584.00
\[\begin{array}{l}
\mathbf{if}\;x \leq -0.066:\\
\;\;\;\;x \cdot 2\\
\mathbf{elif}\;x \leq 1.52 \cdot 10^{-18}:\\
\;\;\;\;\left(a \cdot 27\right) \cdot b\\
\mathbf{else}:\\
\;\;\;\;x \cdot 2\\
\end{array}
\]
Alternative 14 Accuracy 41.5% Cost 192.00
\[x \cdot 2
\]