\[ \begin{array}{c}[j, k] = \mathsf{sort}([j, k])\\ \end{array} \]
Math FPCore C Julia Wolfram TeX \[\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k
\]
↓
\[\begin{array}{l}
\mathbf{if}\;x \leq 10^{-51}:\\
\;\;\;\;\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - t \cdot \left(a \cdot 4\right)\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(x, \mathsf{fma}\left(18, t \cdot \left(y \cdot z\right), i \cdot -4\right), \mathsf{fma}\left(t, a \cdot -4, \mathsf{fma}\left(b, c, k \cdot \left(j \cdot -27\right)\right)\right)\right)\\
\end{array}
\]
(FPCore (x y z t a b c i j k)
:precision binary64
(-
(-
(+ (- (* (* (* (* x 18.0) y) z) t) (* (* a 4.0) t)) (* b c))
(* (* x 4.0) i))
(* (* j 27.0) k))) ↓
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= x 1e-51)
(-
(-
(+ (- (* (* (* (* x 18.0) y) z) t) (* t (* a 4.0))) (* b c))
(* (* x 4.0) i))
(* (* j 27.0) k))
(fma
x
(fma 18.0 (* t (* y z)) (* i -4.0))
(fma t (* a -4.0) (fma b c (* k (* j -27.0))))))) double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
↓
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (x <= 1e-51) {
tmp = (((((((x * 18.0) * y) * z) * t) - (t * (a * 4.0))) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
} else {
tmp = fma(x, fma(18.0, (t * (y * z)), (i * -4.0)), fma(t, (a * -4.0), fma(b, c, (k * (j * -27.0)))));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j, k)
return Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 18.0) * y) * z) * t) - Float64(Float64(a * 4.0) * t)) + Float64(b * c)) - Float64(Float64(x * 4.0) * i)) - Float64(Float64(j * 27.0) * k))
end
↓
function code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0
if (x <= 1e-51)
tmp = Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 18.0) * y) * z) * t) - Float64(t * Float64(a * 4.0))) + Float64(b * c)) - Float64(Float64(x * 4.0) * i)) - Float64(Float64(j * 27.0) * k));
else
tmp = fma(x, fma(18.0, Float64(t * Float64(y * z)), Float64(i * -4.0)), fma(t, Float64(a * -4.0), fma(b, c, Float64(k * Float64(j * -27.0)))));
end
return tmp
end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := N[(N[(N[(N[(N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision] - N[(N[(a * 4.0), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]
↓
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[x, 1e-51], N[(N[(N[(N[(N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision] - N[(t * N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision], N[(x * N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision] + N[(i * -4.0), $MachinePrecision]), $MachinePrecision] + N[(t * N[(a * -4.0), $MachinePrecision] + N[(b * c + N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k
↓
\begin{array}{l}
\mathbf{if}\;x \leq 10^{-51}:\\
\;\;\;\;\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - t \cdot \left(a \cdot 4\right)\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(x, \mathsf{fma}\left(18, t \cdot \left(y \cdot z\right), i \cdot -4\right), \mathsf{fma}\left(t, a \cdot -4, \mathsf{fma}\left(b, c, k \cdot \left(j \cdot -27\right)\right)\right)\right)\\
\end{array}
Alternatives Alternative 1 Accuracy 45.9% Cost 16068
\[\begin{array}{l}
t_1 := \left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - t \cdot \left(a \cdot 4\right)\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\\
\mathbf{if}\;t_1 \leq 2 \cdot 10^{+289}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(x, \mathsf{fma}\left(18, t \cdot \left(y \cdot z\right), i \cdot -4\right), b \cdot c + -27 \cdot \left(j \cdot k\right)\right)\\
\end{array}
\]
Alternative 2 Accuracy 45.9% Cost 9092
\[\begin{array}{l}
t_1 := \left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - t \cdot \left(a \cdot 4\right)\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\\
\mathbf{if}\;t_1 \leq 4 \cdot 10^{+306}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(-j, 27 \cdot k, i \cdot \left(x \cdot -4\right)\right)\\
\end{array}
\]
Alternative 3 Accuracy 45.9% Cost 3652
\[\begin{array}{l}
t_1 := \left(j \cdot 27\right) \cdot k\\
t_2 := \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - t \cdot \left(a \cdot 4\right)\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\\
\mathbf{if}\;t_2 \leq 4 \cdot 10^{+306}:\\
\;\;\;\;t_2 - t_1\\
\mathbf{else}:\\
\;\;\;\;i \cdot \left(x \cdot -4\right) - t_1\\
\end{array}
\]
Alternative 4 Accuracy 42.3% Cost 2768
\[\begin{array}{l}
t_1 := -4 \cdot \left(t \cdot a\right)\\
t_2 := \left(j \cdot 27\right) \cdot k\\
t_3 := \left(b \cdot c - 4 \cdot \left(x \cdot i + t \cdot a\right)\right) - t_2\\
\mathbf{if}\;t_2 \leq -1 \cdot 10^{-317}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;t_2 \leq 5 \cdot 10^{-132}:\\
\;\;\;\;b \cdot c + \left(t_1 + x \cdot \left(i \cdot -4 + 18 \cdot \left(y \cdot \left(z \cdot t\right)\right)\right)\right)\\
\mathbf{elif}\;t_2 \leq 10^{-60}:\\
\;\;\;\;t \cdot \left(18 \cdot \left(y \cdot \left(x \cdot z\right)\right) - a \cdot 4\right) - t_2\\
\mathbf{elif}\;t_2 \leq 2 \cdot 10^{-50}:\\
\;\;\;\;b \cdot c + \left(t_1 + x \cdot \left(y \cdot \left(t \cdot \left(18 \cdot z\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_3\\
\end{array}
\]
Alternative 5 Accuracy 36.9% Cost 2512
\[\begin{array}{l}
t_1 := \left(j \cdot 27\right) \cdot k\\
t_2 := \left(b \cdot c - 4 \cdot \left(t \cdot a\right)\right) - t_1\\
t_3 := b \cdot c - 4 \cdot \left(x \cdot i + t \cdot a\right)\\
\mathbf{if}\;t_1 \leq -1000:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t_1 \leq 5 \cdot 10^{-132}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;t_1 \leq 2 \cdot 10^{-18}:\\
\;\;\;\;t \cdot \left(18 \cdot \left(y \cdot \left(x \cdot z\right)\right) - a \cdot 4\right) - t_1\\
\mathbf{elif}\;t_1 \leq 5 \cdot 10^{+86}:\\
\;\;\;\;t_3\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\]
Alternative 6 Accuracy 28.8% Cost 2256
\[\begin{array}{l}
t_1 := b \cdot c - 4 \cdot \left(t \cdot a\right)\\
t_2 := \left(j \cdot 27\right) \cdot k\\
\mathbf{if}\;t_2 \leq -2 \cdot 10^{+37}:\\
\;\;\;\;i \cdot \left(x \cdot -4\right) - t_2\\
\mathbf{elif}\;t_2 \leq 2 \cdot 10^{-186}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t_2 \leq 10^{-62}:\\
\;\;\;\;x \cdot \left(i \cdot -4 + 18 \cdot \left(z \cdot \left(y \cdot t\right)\right)\right)\\
\mathbf{elif}\;t_2 \leq 10^{+43}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(a \cdot -4\right) - t_2\\
\end{array}
\]
Alternative 7 Accuracy 28.6% Cost 2256
\[\begin{array}{l}
t_1 := b \cdot c - 4 \cdot \left(t \cdot a\right)\\
t_2 := \left(j \cdot 27\right) \cdot k\\
\mathbf{if}\;t_2 \leq -2 \cdot 10^{+37}:\\
\;\;\;\;i \cdot \left(x \cdot -4\right) - t_2\\
\mathbf{elif}\;t_2 \leq 5 \cdot 10^{-200}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t_2 \leq 2 \cdot 10^{-50}:\\
\;\;\;\;t \cdot \left(a \cdot -4 + 18 \cdot \left(y \cdot \left(x \cdot z\right)\right)\right)\\
\mathbf{elif}\;t_2 \leq 10^{+43}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(a \cdot -4\right) - t_2\\
\end{array}
\]
Alternative 8 Accuracy 44.4% Cost 1856
\[\left(b \cdot c + t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right)\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right)
\]
Alternative 9 Accuracy 38.2% Cost 1737
\[\begin{array}{l}
t_1 := \left(j \cdot 27\right) \cdot k\\
\mathbf{if}\;t_1 \leq -1000 \lor \neg \left(t_1 \leq 10^{-62}\right):\\
\;\;\;\;\left(b \cdot c - 4 \cdot \left(t \cdot a\right)\right) - t_1\\
\mathbf{else}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i + t \cdot a\right)\\
\end{array}
\]
Alternative 10 Accuracy 36.4% Cost 1608
\[\begin{array}{l}
t_1 := \left(j \cdot 27\right) \cdot k\\
\mathbf{if}\;t_1 \leq -5 \cdot 10^{+142}:\\
\;\;\;\;i \cdot \left(x \cdot -4\right) - t_1\\
\mathbf{elif}\;t_1 \leq 5 \cdot 10^{+137}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i + t \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(a \cdot -4\right) - t_1\\
\end{array}
\]
Alternative 11 Accuracy 24.0% Cost 1499
\[\begin{array}{l}
\mathbf{if}\;t \leq -1.8 \cdot 10^{+156} \lor \neg \left(t \leq -1.4 \cdot 10^{+63}\right) \land \left(t \leq -1.12 \cdot 10^{+18} \lor \neg \left(t \leq 7.8 \cdot 10^{-194}\right) \land \left(t \leq 6.4 \cdot 10^{+102} \lor \neg \left(t \leq 3.3 \cdot 10^{+234}\right)\right)\right):\\
\;\;\;\;b \cdot c - 4 \cdot \left(t \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;i \cdot \left(x \cdot -4\right) - \left(j \cdot 27\right) \cdot k\\
\end{array}
\]
Alternative 12 Accuracy 24.8% Cost 1364
\[\begin{array}{l}
t_1 := b \cdot c - 4 \cdot \left(t \cdot a\right)\\
t_2 := \left(j \cdot 27\right) \cdot k\\
t_3 := i \cdot \left(x \cdot -4\right) - t_2\\
\mathbf{if}\;t \leq -8.5 \cdot 10^{+154}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -1.6 \cdot 10^{+63}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;t \leq -1.8 \cdot 10^{+21}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 8.5 \cdot 10^{-197}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;t \leq 4.25 \cdot 10^{+101}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(a \cdot -4\right) - t_2\\
\end{array}
\]
Alternative 13 Accuracy 42.3% Cost 1216
\[\left(b \cdot c - 4 \cdot \left(x \cdot i + t \cdot a\right)\right) - \left(j \cdot 27\right) \cdot k
\]
Alternative 14 Accuracy 14.3% Cost 1112
\[\begin{array}{l}
t_1 := -27 \cdot \left(j \cdot k\right)\\
t_2 := -4 \cdot \left(x \cdot i\right)\\
\mathbf{if}\;i \leq -2.4 \cdot 10^{+88}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;i \leq -1.05 \cdot 10^{-215}:\\
\;\;\;\;-4 \cdot \left(t \cdot a\right)\\
\mathbf{elif}\;i \leq 3.7 \cdot 10^{-269}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;i \leq 0.052:\\
\;\;\;\;t_1\\
\mathbf{elif}\;i \leq 1.7 \cdot 10^{+217}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;i \leq 3.3 \cdot 10^{+284}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\]
Alternative 15 Accuracy 23.0% Cost 840
\[\begin{array}{l}
\mathbf{if}\;j \leq -7.8 \cdot 10^{+130}:\\
\;\;\;\;k \cdot \left(j \cdot -27\right)\\
\mathbf{elif}\;j \leq 9.2 \cdot 10^{-207}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(t \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\
\end{array}
\]
Alternative 16 Accuracy 16.8% Cost 585
\[\begin{array}{l}
\mathbf{if}\;j \leq -2 \cdot 10^{+93} \lor \neg \left(j \leq 4.3 \cdot 10^{-196}\right):\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\]
Alternative 17 Accuracy 16.8% Cost 584
\[\begin{array}{l}
\mathbf{if}\;j \leq -2.15 \cdot 10^{+93}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right)\\
\mathbf{elif}\;j \leq 3.1 \cdot 10^{-196}:\\
\;\;\;\;b \cdot c\\
\mathbf{else}:\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\
\end{array}
\]
Alternative 18 Accuracy 12.7% Cost 192
\[b \cdot c
\]