Math FPCore C Julia Wolfram TeX \[\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b
\]
↓
\[\mathsf{fma}\left(t + \left(y - 2\right), b, x - \mathsf{fma}\left(y + -1, z, a \cdot \left(t + -1\right)\right)\right)
\]
(FPCore (x y z t a b)
:precision binary64
(+ (- (- x (* (- y 1.0) z)) (* (- t 1.0) a)) (* (- (+ y t) 2.0) b))) ↓
(FPCore (x y z t a b)
:precision binary64
(fma (+ t (- y 2.0)) b (- x (fma (+ y -1.0) z (* a (+ t -1.0)))))) double code(double x, double y, double z, double t, double a, double b) {
return ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b);
}
↓
double code(double x, double y, double z, double t, double a, double b) {
return fma((t + (y - 2.0)), b, (x - fma((y + -1.0), z, (a * (t + -1.0)))));
}
function code(x, y, z, t, a, b)
return Float64(Float64(Float64(x - Float64(Float64(y - 1.0) * z)) - Float64(Float64(t - 1.0) * a)) + Float64(Float64(Float64(y + t) - 2.0) * b))
end
↓
function code(x, y, z, t, a, b)
return fma(Float64(t + Float64(y - 2.0)), b, Float64(x - fma(Float64(y + -1.0), z, Float64(a * Float64(t + -1.0)))))
end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x - N[(N[(y - 1.0), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision] - N[(N[(t - 1.0), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
↓
code[x_, y_, z_, t_, a_, b_] := N[(N[(t + N[(y - 2.0), $MachinePrecision]), $MachinePrecision] * b + N[(x - N[(N[(y + -1.0), $MachinePrecision] * z + N[(a * N[(t + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b
↓
\mathsf{fma}\left(t + \left(y - 2\right), b, x - \mathsf{fma}\left(y + -1, z, a \cdot \left(t + -1\right)\right)\right)
Alternatives Alternative 1 Accuracy 97.6% Cost 13888
\[\mathsf{fma}\left(t + \left(y - 2\right), b, x - \mathsf{fma}\left(y + -1, z, a \cdot \left(t + -1\right)\right)\right)
\]
Alternative 2 Accuracy 98.0% Cost 2756
\[\begin{array}{l}
t_1 := \left(\left(x + z \cdot \left(1 - y\right)\right) + a \cdot \left(1 - t\right)\right) + b \cdot \left(\left(t + y\right) - 2\right)\\
\mathbf{if}\;t_1 \leq \infty:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(b - a\right)\\
\end{array}
\]
Alternative 3 Accuracy 64.8% Cost 1500
\[\begin{array}{l}
t_1 := \left(x + a\right) - t \cdot a\\
t_2 := x + b \cdot \left(\left(t + y\right) - 2\right)\\
t_3 := x + z \cdot \left(1 - y\right)\\
\mathbf{if}\;b \leq -76000:\\
\;\;\;\;t_2\\
\mathbf{elif}\;b \leq -2.35 \cdot 10^{-40}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \leq -1.55 \cdot 10^{-118}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;b \leq -1.6 \cdot 10^{-134}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \leq 1.9 \cdot 10^{-63}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;b \leq 8.2 \cdot 10^{-14}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \leq 3.1 \cdot 10^{-6}:\\
\;\;\;\;x - y \cdot z\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\]
Alternative 4 Accuracy 53.5% Cost 1372
\[\begin{array}{l}
t_1 := b \cdot \left(\left(t + y\right) - 2\right)\\
t_2 := a \cdot \left(1 - t\right)\\
t_3 := x - y \cdot z\\
\mathbf{if}\;b \leq -160000000:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \leq -5.6 \cdot 10^{-40}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;b \leq -1 \cdot 10^{-119}:\\
\;\;\;\;z \cdot \left(1 - y\right)\\
\mathbf{elif}\;b \leq -1.25 \cdot 10^{-134}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;b \leq -2.1 \cdot 10^{-301}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;b \leq 2.6 \cdot 10^{-288}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;b \leq 132000000000:\\
\;\;\;\;t_3\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
Alternative 5 Accuracy 61.7% Cost 1372
\[\begin{array}{l}
t_1 := \left(x + a\right) - t \cdot a\\
t_2 := b \cdot \left(\left(t + y\right) - 2\right)\\
t_3 := x + z \cdot \left(1 - y\right)\\
\mathbf{if}\;b \leq -310000000000:\\
\;\;\;\;t_2\\
\mathbf{elif}\;b \leq -7.4 \cdot 10^{-41}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \leq -1.15 \cdot 10^{-119}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;b \leq -1.55 \cdot 10^{-134}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \leq 1.5 \cdot 10^{-64}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;b \leq 5.2 \cdot 10^{-14}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \leq 10^{+81}:\\
\;\;\;\;t_3\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\]
Alternative 6 Accuracy 78.2% Cost 1360
\[\begin{array}{l}
t_1 := z \cdot \left(1 - y\right)\\
t_2 := \left(x + t_1\right) + t \cdot \left(b - a\right)\\
t_3 := \left(x + z\right) + b \cdot \left(\left(t + y\right) - 2\right)\\
\mathbf{if}\;b \leq -9 \cdot 10^{+15}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;b \leq -3.5 \cdot 10^{-134}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;b \leq 7.6 \cdot 10^{-219}:\\
\;\;\;\;\left(x + a\right) + t_1\\
\mathbf{elif}\;b \leq 4.25 \cdot 10^{+21}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_3\\
\end{array}
\]
Alternative 7 Accuracy 82.5% Cost 1360
\[\begin{array}{l}
t_1 := z \cdot \left(1 - y\right)\\
t_2 := x + t_1\\
t_3 := t_2 - b \cdot \left(2 - y\right)\\
t_4 := t_2 - t \cdot \left(a - b\right)\\
\mathbf{if}\;t \leq -9 \cdot 10^{+40}:\\
\;\;\;\;t_4\\
\mathbf{elif}\;t \leq -1.25 \cdot 10^{-247}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;t \leq 1.1 \cdot 10^{-257}:\\
\;\;\;\;\left(x + a\right) + t_1\\
\mathbf{elif}\;t \leq 1.25 \cdot 10^{+25}:\\
\;\;\;\;t_3\\
\mathbf{else}:\\
\;\;\;\;t_4\\
\end{array}
\]
Alternative 8 Accuracy 86.6% Cost 1225
\[\begin{array}{l}
\mathbf{if}\;b \leq -2250000000 \lor \neg \left(b \leq 27\right):\\
\;\;\;\;\left(z + \left(x + y \cdot \left(b - z\right)\right)\right) + b \cdot \left(t - 2\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x + z \cdot \left(1 - y\right)\right) + \left(a - t \cdot a\right)\\
\end{array}
\]
Alternative 9 Accuracy 86.5% Cost 1225
\[\begin{array}{l}
t_1 := x + z \cdot \left(1 - y\right)\\
\mathbf{if}\;b \leq -410000 \lor \neg \left(b \leq 0.4\right):\\
\;\;\;\;t_1 + b \cdot \left(\left(t + y\right) - 2\right)\\
\mathbf{else}:\\
\;\;\;\;t_1 + \left(a - t \cdot a\right)\\
\end{array}
\]
Alternative 10 Accuracy 49.7% Cost 1112
\[\begin{array}{l}
t_1 := y \cdot \left(b - z\right)\\
\mathbf{if}\;y \leq -5.7 \cdot 10^{-5}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -4.6 \cdot 10^{-173}:\\
\;\;\;\;x + z\\
\mathbf{elif}\;y \leq 2 \cdot 10^{-294}:\\
\;\;\;\;b \cdot \left(t - 2\right)\\
\mathbf{elif}\;y \leq 1.6 \cdot 10^{-12}:\\
\;\;\;\;x + z\\
\mathbf{elif}\;y \leq 1.55 \cdot 10^{+43}:\\
\;\;\;\;t \cdot \left(b - a\right)\\
\mathbf{elif}\;y \leq 3.9 \cdot 10^{+56}:\\
\;\;\;\;x + z\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
Alternative 11 Accuracy 49.9% Cost 1112
\[\begin{array}{l}
t_1 := y \cdot \left(b - z\right)\\
\mathbf{if}\;y \leq -5.7 \cdot 10^{-5}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -3.8 \cdot 10^{-173}:\\
\;\;\;\;x + z\\
\mathbf{elif}\;y \leq 3.8 \cdot 10^{-298}:\\
\;\;\;\;b \cdot \left(t - 2\right)\\
\mathbf{elif}\;y \leq 4.8 \cdot 10^{-14}:\\
\;\;\;\;x + z\\
\mathbf{elif}\;y \leq 9 \cdot 10^{+42}:\\
\;\;\;\;t \cdot \left(b - a\right)\\
\mathbf{elif}\;y \leq 4.5 \cdot 10^{+56}:\\
\;\;\;\;x - y \cdot z\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
Alternative 12 Accuracy 61.3% Cost 1108
\[\begin{array}{l}
t_1 := b \cdot \left(\left(t + y\right) - 2\right)\\
t_2 := x + z \cdot \left(1 - y\right)\\
\mathbf{if}\;b \leq -1.05 \cdot 10^{+14}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \leq -6.4 \cdot 10^{-40}:\\
\;\;\;\;x + t \cdot \left(b - a\right)\\
\mathbf{elif}\;b \leq -5.8 \cdot 10^{-121}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;b \leq -7.4 \cdot 10^{-135}:\\
\;\;\;\;a \cdot \left(1 - t\right)\\
\mathbf{elif}\;b \leq 4.3 \cdot 10^{+81}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
Alternative 13 Accuracy 73.7% Cost 1100
\[\begin{array}{l}
t_1 := \left(x + z\right) + b \cdot \left(\left(t + y\right) - 2\right)\\
\mathbf{if}\;b \leq -1720000000000:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \leq -6.4 \cdot 10^{-40}:\\
\;\;\;\;\left(x + z\right) + t \cdot \left(b - a\right)\\
\mathbf{elif}\;b \leq 1.35 \cdot 10^{+26}:\\
\;\;\;\;\left(x + a\right) + z \cdot \left(1 - y\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
Alternative 14 Accuracy 85.2% Cost 1097
\[\begin{array}{l}
\mathbf{if}\;b \leq -1450000000 \lor \neg \left(b \leq 2.6 \cdot 10^{+58}\right):\\
\;\;\;\;\left(x + z\right) + b \cdot \left(\left(t + y\right) - 2\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x + z \cdot \left(1 - y\right)\right) + \left(a - t \cdot a\right)\\
\end{array}
\]
Alternative 15 Accuracy 36.9% Cost 1048
\[\begin{array}{l}
t_1 := y \cdot \left(-z\right)\\
\mathbf{if}\;y \leq -620000000:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -4.6 \cdot 10^{-173}:\\
\;\;\;\;x + z\\
\mathbf{elif}\;y \leq 1.35 \cdot 10^{-297}:\\
\;\;\;\;b \cdot \left(t - 2\right)\\
\mathbf{elif}\;y \leq 8 \cdot 10^{-14}:\\
\;\;\;\;x + z\\
\mathbf{elif}\;y \leq 7.6 \cdot 10^{+43}:\\
\;\;\;\;t \cdot \left(b - a\right)\\
\mathbf{elif}\;y \leq 3.2 \cdot 10^{+57}:\\
\;\;\;\;x + z\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
Alternative 16 Accuracy 56.8% Cost 976
\[\begin{array}{l}
t_1 := x + t \cdot \left(b - a\right)\\
t_2 := y \cdot \left(b - z\right)\\
\mathbf{if}\;y \leq -2200000:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq 5.1 \cdot 10^{-270}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 8 \cdot 10^{-14}:\\
\;\;\;\;x + z\\
\mathbf{elif}\;y \leq 3.9 \cdot 10^{+56}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\]
Alternative 17 Accuracy 70.7% Cost 972
\[\begin{array}{l}
t_1 := x + b \cdot \left(\left(t + y\right) - 2\right)\\
\mathbf{if}\;b \leq -950000:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \leq -6.4 \cdot 10^{-40}:\\
\;\;\;\;\left(x + a\right) - t \cdot a\\
\mathbf{elif}\;b \leq 7 \cdot 10^{+34}:\\
\;\;\;\;\left(x + a\right) + z \cdot \left(1 - y\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
Alternative 18 Accuracy 71.3% Cost 972
\[\begin{array}{l}
t_1 := x + b \cdot \left(\left(t + y\right) - 2\right)\\
\mathbf{if}\;b \leq -2.2 \cdot 10^{+15}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \leq -1.06 \cdot 10^{-41}:\\
\;\;\;\;\left(x + z\right) + t \cdot \left(b - a\right)\\
\mathbf{elif}\;b \leq 1.75 \cdot 10^{+34}:\\
\;\;\;\;\left(x + a\right) + z \cdot \left(1 - y\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
Alternative 19 Accuracy 41.8% Cost 848
\[\begin{array}{l}
t_1 := z \cdot \left(1 - y\right)\\
t_2 := a \cdot \left(1 - t\right)\\
\mathbf{if}\;a \leq -2.1 \cdot 10^{-34}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;a \leq -6 \cdot 10^{-123}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq -3.7 \cdot 10^{-233}:\\
\;\;\;\;x + z\\
\mathbf{elif}\;a \leq 2.25 \cdot 10^{+137}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\]
Alternative 20 Accuracy 36.0% Cost 784
\[\begin{array}{l}
t_1 := y \cdot \left(-z\right)\\
\mathbf{if}\;y \leq -7500000000:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -3.7 \cdot 10^{-173}:\\
\;\;\;\;x + z\\
\mathbf{elif}\;y \leq 4.5 \cdot 10^{-294}:\\
\;\;\;\;b \cdot \left(t - 2\right)\\
\mathbf{elif}\;y \leq 2.7 \cdot 10^{+57}:\\
\;\;\;\;x + z\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
Alternative 21 Accuracy 21.1% Cost 592
\[\begin{array}{l}
\mathbf{if}\;x \leq -3 \cdot 10^{+102}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq -4.2 \cdot 10^{-261}:\\
\;\;\;\;a\\
\mathbf{elif}\;x \leq 3.3 \cdot 10^{-190}:\\
\;\;\;\;z\\
\mathbf{elif}\;x \leq 1.5 \cdot 10^{+65}:\\
\;\;\;\;a\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\]
Alternative 22 Accuracy 25.6% Cost 588
\[\begin{array}{l}
\mathbf{if}\;b \leq -2.9 \cdot 10^{+244}:\\
\;\;\;\;t \cdot b\\
\mathbf{elif}\;b \leq -4500:\\
\;\;\;\;y \cdot b\\
\mathbf{elif}\;b \leq 1350000000:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y \cdot b\\
\end{array}
\]
Alternative 23 Accuracy 36.7% Cost 521
\[\begin{array}{l}
\mathbf{if}\;y \leq -3600000 \lor \neg \left(y \leq 3 \cdot 10^{+57}\right):\\
\;\;\;\;y \cdot \left(-z\right)\\
\mathbf{else}:\\
\;\;\;\;x + z\\
\end{array}
\]
Alternative 24 Accuracy 24.5% Cost 456
\[\begin{array}{l}
\mathbf{if}\;b \leq -8 \cdot 10^{+161}:\\
\;\;\;\;t \cdot b\\
\mathbf{elif}\;b \leq 5800000:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t \cdot b\\
\end{array}
\]
Alternative 25 Accuracy 35.3% Cost 456
\[\begin{array}{l}
\mathbf{if}\;y \leq -1.05 \cdot 10^{+20}:\\
\;\;\;\;y \cdot b\\
\mathbf{elif}\;y \leq 6.7 \cdot 10^{+56}:\\
\;\;\;\;x + z\\
\mathbf{else}:\\
\;\;\;\;y \cdot b\\
\end{array}
\]
Alternative 26 Accuracy 21.3% Cost 328
\[\begin{array}{l}
\mathbf{if}\;x \leq -6.7 \cdot 10^{+102}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 9.5 \cdot 10^{+64}:\\
\;\;\;\;a\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\]
Alternative 27 Accuracy 11.2% Cost 64
\[a
\]