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}\;b \cdot c \leq 2 \cdot 10^{+301}:\\
\;\;\;\;\mathsf{fma}\left(j, k \cdot -27, \mathsf{fma}\left(x, i \cdot -4, \mathsf{fma}\left(t, \mathsf{fma}\left(x, 18 \cdot \left(y \cdot z\right), -4 \cdot a\right), b \cdot c\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\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 (<= (* b c) 2e+301)
(fma
j
(* k -27.0)
(fma x (* i -4.0) (fma t (fma x (* 18.0 (* y z)) (* -4.0 a)) (* b c))))
(* b c))) 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 ((b * c) <= 2e+301) {
tmp = fma(j, (k * -27.0), fma(x, (i * -4.0), fma(t, fma(x, (18.0 * (y * z)), (-4.0 * a)), (b * c))));
} else {
tmp = b * c;
}
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 (Float64(b * c) <= 2e+301)
tmp = fma(j, Float64(k * -27.0), fma(x, Float64(i * -4.0), fma(t, fma(x, Float64(18.0 * Float64(y * z)), Float64(-4.0 * a)), Float64(b * c))));
else
tmp = Float64(b * c);
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[N[(b * c), $MachinePrecision], 2e+301], N[(j * N[(k * -27.0), $MachinePrecision] + N[(x * N[(i * -4.0), $MachinePrecision] + N[(t * N[(x * N[(18.0 * N[(y * z), $MachinePrecision]), $MachinePrecision] + N[(-4.0 * a), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(b * c), $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}\;b \cdot c \leq 2 \cdot 10^{+301}:\\
\;\;\;\;\mathsf{fma}\left(j, k \cdot -27, \mathsf{fma}\left(x, i \cdot -4, \mathsf{fma}\left(t, \mathsf{fma}\left(x, 18 \cdot \left(y \cdot z\right), -4 \cdot a\right), b \cdot c\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
Alternatives Alternative 1 Accuracy 91.3% Cost 27204
\[\begin{array}{l}
\mathbf{if}\;b \cdot c \leq 2 \cdot 10^{+301}:\\
\;\;\;\;\mathsf{fma}\left(j, k \cdot -27, \mathsf{fma}\left(x, i \cdot -4, \mathsf{fma}\left(t, \mathsf{fma}\left(x, 18 \cdot \left(y \cdot z\right), -4 \cdot a\right), b \cdot c\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\]
Alternative 2 Accuracy 91.8% Cost 4036
\[\begin{array}{l}
t_1 := \left(\left(b \cdot c + \left(t \cdot \left(z \cdot \left(y \cdot \left(x \cdot 18\right)\right)\right) - t \cdot \left(a \cdot 4\right)\right)\right) - i \cdot \left(x \cdot 4\right)\right) - k \cdot \left(j \cdot 27\right)\\
\mathbf{if}\;t_1 \leq \infty:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(y \cdot \left(t \cdot z\right)\right) - i \cdot 4\right)\\
\end{array}
\]
Alternative 3 Accuracy 86.9% Cost 2116
\[\begin{array}{l}
\mathbf{if}\;b \cdot c \leq 10^{+249}:\\
\;\;\;\;\left(b \cdot c + t \cdot \left(\left(y \cdot z\right) \cdot \left(x \cdot 18\right) - a \cdot 4\right)\right) - \left(x \cdot \left(i \cdot 4\right) + j \cdot \left(k \cdot 27\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot c + -4 \cdot \left(t \cdot a\right)\right) - 27 \cdot \left(j \cdot k\right)\\
\end{array}
\]
Alternative 4 Accuracy 80.5% Cost 1736
\[\begin{array}{l}
\mathbf{if}\;t \leq -7.4 \cdot 10^{+130}:\\
\;\;\;\;t \cdot \left(18 \cdot \left(y \cdot \left(x \cdot z\right)\right) - a \cdot 4\right)\\
\mathbf{elif}\;t \leq 2.25 \cdot 10^{+187}:\\
\;\;\;\;\left(b \cdot c + -4 \cdot \left(t \cdot a\right)\right) - \left(27 \cdot \left(j \cdot k\right) + 4 \cdot \left(x \cdot i\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot c + t \cdot \left(\left(y \cdot z\right) \cdot \left(x \cdot 18\right) - a \cdot 4\right)\right) - j \cdot \left(k \cdot 27\right)\\
\end{array}
\]
Alternative 5 Accuracy 80.9% Cost 1736
\[\begin{array}{l}
t_1 := b \cdot c + t \cdot \left(\left(y \cdot z\right) \cdot \left(x \cdot 18\right) - a \cdot 4\right)\\
\mathbf{if}\;t \leq -1.18 \cdot 10^{-85}:\\
\;\;\;\;t_1 - x \cdot \left(i \cdot 4\right)\\
\mathbf{elif}\;t \leq 2.5 \cdot 10^{+187}:\\
\;\;\;\;\left(b \cdot c + -4 \cdot \left(t \cdot a\right)\right) - \left(27 \cdot \left(j \cdot k\right) + 4 \cdot \left(x \cdot i\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_1 - j \cdot \left(k \cdot 27\right)\\
\end{array}
\]
Alternative 6 Accuracy 79.4% Cost 1609
\[\begin{array}{l}
\mathbf{if}\;t \leq -1.85 \cdot 10^{+129} \lor \neg \left(t \leq 1.28 \cdot 10^{+210}\right):\\
\;\;\;\;t \cdot \left(18 \cdot \left(y \cdot \left(x \cdot z\right)\right) - a \cdot 4\right)\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot c + -4 \cdot \left(t \cdot a\right)\right) - \left(27 \cdot \left(j \cdot k\right) + 4 \cdot \left(x \cdot i\right)\right)\\
\end{array}
\]
Alternative 7 Accuracy 49.5% Cost 1428
\[\begin{array}{l}
t_1 := 27 \cdot \left(j \cdot k\right)\\
t_2 := -4 \cdot \left(t \cdot a\right)\\
t_3 := -4 \cdot \left(t \cdot a + x \cdot i\right)\\
t_4 := b \cdot c - t_1\\
\mathbf{if}\;b \leq -4 \cdot 10^{+163}:\\
\;\;\;\;t_4\\
\mathbf{elif}\;b \leq -1.15 \cdot 10^{+88}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;b \leq -16500000000000:\\
\;\;\;\;b \cdot c + t_2\\
\mathbf{elif}\;b \leq -1.55 \cdot 10^{-212}:\\
\;\;\;\;t_2 - t_1\\
\mathbf{elif}\;b \leq 4.2 \cdot 10^{-268}:\\
\;\;\;\;27 \cdot \left(j \cdot \left(-k\right)\right) - 4 \cdot \left(x \cdot i\right)\\
\mathbf{elif}\;b \leq 7.2 \cdot 10^{-94}:\\
\;\;\;\;t_3\\
\mathbf{else}:\\
\;\;\;\;t_4\\
\end{array}
\]
Alternative 8 Accuracy 40.4% Cost 1368
\[\begin{array}{l}
t_1 := -4 \cdot \left(t \cdot a + x \cdot i\right)\\
\mathbf{if}\;b \leq -5.5 \cdot 10^{+267}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;b \leq -8.5 \cdot 10^{+259}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \leq -1.42 \cdot 10^{+169}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;b \leq -0.0086:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \leq -1.1 \cdot 10^{-119}:\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\
\mathbf{elif}\;b \leq 1.3 \cdot 10^{-68}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\]
Alternative 9 Accuracy 55.9% Cost 1360
\[\begin{array}{l}
t_1 := b \cdot c - 27 \cdot \left(j \cdot k\right)\\
t_2 := t \cdot \left(18 \cdot \left(y \cdot \left(x \cdot z\right)\right) - a \cdot 4\right)\\
\mathbf{if}\;t \leq -7.6 \cdot 10^{+118}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq 3.15 \cdot 10^{-282}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 1.22 \cdot 10^{+33}:\\
\;\;\;\;27 \cdot \left(j \cdot \left(-k\right)\right) - 4 \cdot \left(x \cdot i\right)\\
\mathbf{elif}\;t \leq 6.2 \cdot 10^{+169}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\]
Alternative 10 Accuracy 71.5% Cost 1360
\[\begin{array}{l}
t_1 := 27 \cdot \left(j \cdot k\right)\\
t_2 := t \cdot \left(18 \cdot \left(y \cdot \left(x \cdot z\right)\right) - a \cdot 4\right)\\
\mathbf{if}\;t \leq -1.75 \cdot 10^{+121}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq 8 \cdot 10^{+35}:\\
\;\;\;\;b \cdot c - \left(t_1 + 4 \cdot \left(x \cdot i\right)\right)\\
\mathbf{elif}\;t \leq 1.1 \cdot 10^{+162}:\\
\;\;\;\;\left(b \cdot c + -4 \cdot \left(t \cdot a\right)\right) - t_1\\
\mathbf{elif}\;t \leq 1.16 \cdot 10^{+203}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(y \cdot \left(t \cdot z\right)\right) - i \cdot 4\right)\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\]
Alternative 11 Accuracy 46.1% Cost 1236
\[\begin{array}{l}
t_1 := -4 \cdot \left(t \cdot a + x \cdot i\right)\\
t_2 := b \cdot c + -4 \cdot \left(t \cdot a\right)\\
\mathbf{if}\;b \leq -4 \cdot 10^{+163}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;b \leq -2.5 \cdot 10^{+88}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \leq -0.0018:\\
\;\;\;\;t_2\\
\mathbf{elif}\;b \leq -2 \cdot 10^{-122}:\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\
\mathbf{elif}\;b \leq 7 \cdot 10^{-69}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\]
Alternative 12 Accuracy 70.0% Cost 1225
\[\begin{array}{l}
\mathbf{if}\;t \leq -1.9 \cdot 10^{+113} \lor \neg \left(t \leq 7.8 \cdot 10^{+202}\right):\\
\;\;\;\;t \cdot \left(18 \cdot \left(y \cdot \left(x \cdot z\right)\right) - a \cdot 4\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c - \left(27 \cdot \left(j \cdot k\right) + 4 \cdot \left(x \cdot i\right)\right)\\
\end{array}
\]
Alternative 13 Accuracy 31.6% Cost 1112
\[\begin{array}{l}
t_1 := -27 \cdot \left(j \cdot k\right)\\
t_2 := x \cdot \left(i \cdot -4\right)\\
\mathbf{if}\;c \leq -1.15 \cdot 10^{-122}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;c \leq 3.2 \cdot 10^{-177}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;c \leq 1.75 \cdot 10^{-98}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;c \leq 3.1:\\
\;\;\;\;t_1\\
\mathbf{elif}\;c \leq 2.15 \cdot 10^{+74}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;c \leq 5.8 \cdot 10^{+112}:\\
\;\;\;\;t \cdot \left(-4 \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\]
Alternative 14 Accuracy 49.2% Cost 1104
\[\begin{array}{l}
t_1 := -4 \cdot \left(t \cdot a + x \cdot i\right)\\
t_2 := b \cdot c - 27 \cdot \left(j \cdot k\right)\\
\mathbf{if}\;j \leq -7.6 \cdot 10^{+77}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;j \leq -6.8 \cdot 10^{-56}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;j \leq -3.7 \cdot 10^{-207}:\\
\;\;\;\;b \cdot c + -4 \cdot \left(t \cdot a\right)\\
\mathbf{elif}\;j \leq 1.85 \cdot 10^{-84}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\]
Alternative 15 Accuracy 32.1% Cost 716
\[\begin{array}{l}
\mathbf{if}\;c \leq -1.15 \cdot 10^{-122}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;c \leq 1.3 \cdot 10^{+53}:\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\
\mathbf{elif}\;c \leq 6.6 \cdot 10^{+112}:\\
\;\;\;\;t \cdot \left(-4 \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\]
Alternative 16 Accuracy 31.1% Cost 584
\[\begin{array}{l}
\mathbf{if}\;c \leq -1.15 \cdot 10^{-122}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;c \leq 4 \cdot 10^{+176}:\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\]
Alternative 17 Accuracy 23.7% Cost 192
\[b \cdot c
\]