Math FPCore C Julia Wolfram TeX \[2 \cdot \left(\left(x \cdot y + z \cdot t\right) - \left(\left(a + b \cdot c\right) \cdot c\right) \cdot i\right)
\]
↓
\[2 \cdot \left(\mathsf{fma}\left(x, y, z \cdot t\right) - \left(c \cdot i\right) \cdot \left(a + b \cdot c\right)\right)
\]
(FPCore (x y z t a b c i)
:precision binary64
(* 2.0 (- (+ (* x y) (* z t)) (* (* (+ a (* b c)) c) i)))) ↓
(FPCore (x y z t a b c i)
:precision binary64
(* 2.0 (- (fma x y (* z t)) (* (* c i) (+ a (* b c)))))) double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return 2.0 * (((x * y) + (z * t)) - (((a + (b * c)) * c) * i));
}
↓
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return 2.0 * (fma(x, y, (z * t)) - ((c * i) * (a + (b * c))));
}
function code(x, y, z, t, a, b, c, i)
return Float64(2.0 * Float64(Float64(Float64(x * y) + Float64(z * t)) - Float64(Float64(Float64(a + Float64(b * c)) * c) * i)))
end
↓
function code(x, y, z, t, a, b, c, i)
return Float64(2.0 * Float64(fma(x, y, Float64(z * t)) - Float64(Float64(c * i) * Float64(a + Float64(b * c)))))
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(2.0 * N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
↓
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(2.0 * N[(N[(x * y + N[(z * t), $MachinePrecision]), $MachinePrecision] - N[(N[(c * i), $MachinePrecision] * N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
2 \cdot \left(\left(x \cdot y + z \cdot t\right) - \left(\left(a + b \cdot c\right) \cdot c\right) \cdot i\right)
↓
2 \cdot \left(\mathsf{fma}\left(x, y, z \cdot t\right) - \left(c \cdot i\right) \cdot \left(a + b \cdot c\right)\right)
Alternatives Alternative 1 Accuracy 96.0% Cost 8520
\[\begin{array}{l}
t_1 := a + b \cdot c\\
t_2 := i \cdot \left(c \cdot t_1\right)\\
\mathbf{if}\;t_2 \leq -\infty:\\
\;\;\;\;\left(c \cdot \left(i \cdot t_1\right)\right) \cdot -2\\
\mathbf{elif}\;t_2 \leq 5 \cdot 10^{+240}:\\
\;\;\;\;2 \cdot \left(\left(x \cdot y + z \cdot t\right) - t_2\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(x \cdot y - \left(c \cdot i\right) \cdot \mathsf{fma}\left(c, b, a\right)\right)\\
\end{array}
\]
Alternative 2 Accuracy 87.9% Cost 3537
\[\begin{array}{l}
t_1 := a + b \cdot c\\
t_2 := i \cdot \left(c \cdot t_1\right)\\
\mathbf{if}\;t_2 \leq -\infty:\\
\;\;\;\;\left(c \cdot \left(i \cdot t_1\right)\right) \cdot -2\\
\mathbf{elif}\;t_2 \leq -1 \cdot 10^{+34} \lor \neg \left(t_2 \leq 2 \cdot 10^{+43}\right) \land t_2 \leq 4 \cdot 10^{+304}:\\
\;\;\;\;2 \cdot \left(z \cdot t - t_2\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(x \cdot y + \left(z \cdot t - c \cdot \left(a \cdot i\right)\right)\right)\\
\end{array}
\]
Alternative 3 Accuracy 96.4% Cost 2504
\[\begin{array}{l}
t_1 := a + b \cdot c\\
t_2 := c \cdot \left(i \cdot t_1\right)\\
t_3 := i \cdot \left(c \cdot t_1\right)\\
\mathbf{if}\;t_3 \leq -\infty:\\
\;\;\;\;t_2 \cdot -2\\
\mathbf{elif}\;t_3 \leq 4 \cdot 10^{+304}:\\
\;\;\;\;2 \cdot \left(\left(x \cdot y + z \cdot t\right) - t_3\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(x \cdot y - t_2\right)\\
\end{array}
\]
Alternative 4 Accuracy 88.9% Cost 2249
\[\begin{array}{l}
t_1 := a + b \cdot c\\
t_2 := i \cdot \left(c \cdot t_1\right)\\
\mathbf{if}\;t_2 \leq -1 \cdot 10^{+34} \lor \neg \left(t_2 \leq 2 \cdot 10^{+43}\right):\\
\;\;\;\;2 \cdot \left(z \cdot t - \left(c \cdot i\right) \cdot t_1\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(x \cdot y + \left(z \cdot t - c \cdot \left(a \cdot i\right)\right)\right)\\
\end{array}
\]
Alternative 5 Accuracy 89.3% Cost 2249
\[\begin{array}{l}
t_1 := a + b \cdot c\\
t_2 := i \cdot \left(c \cdot t_1\right)\\
\mathbf{if}\;t_2 \leq -1 \cdot 10^{+44} \lor \neg \left(t_2 \leq 10^{+71}\right):\\
\;\;\;\;2 \cdot \left(z \cdot t - \left(c \cdot i\right) \cdot t_1\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\left(x \cdot y + z \cdot t\right) - i \cdot \left(a \cdot c\right)\right)\\
\end{array}
\]
Alternative 6 Accuracy 57.1% Cost 2024
\[\begin{array}{l}
t_1 := c \cdot \left(i \cdot \left(b \cdot c\right)\right)\\
t_2 := 2 \cdot \left(x \cdot y - t_1\right)\\
t_3 := 2 \cdot \left(z \cdot t - t_1\right)\\
t_4 := 2 \cdot \left(x \cdot y - c \cdot \left(a \cdot i\right)\right)\\
t_5 := 2 \cdot \left(x \cdot y - i \cdot \left(a \cdot c\right)\right)\\
\mathbf{if}\;t \leq -5.6 \cdot 10^{-189}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;t \leq -2.4 \cdot 10^{-276}:\\
\;\;\;\;t_4\\
\mathbf{elif}\;t \leq 8.5 \cdot 10^{-154}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq 9 \cdot 10^{-107}:\\
\;\;\;\;t_5\\
\mathbf{elif}\;t \leq 5 \cdot 10^{-70}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq 3000:\\
\;\;\;\;t_5\\
\mathbf{elif}\;t \leq 3.1 \cdot 10^{+21}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;t \leq 4.4 \cdot 10^{+26}:\\
\;\;\;\;t_5\\
\mathbf{elif}\;t \leq 4.8 \cdot 10^{+45}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;t \leq 7.8 \cdot 10^{+59}:\\
\;\;\;\;t_4\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(x \cdot y + z \cdot t\right)\\
\end{array}
\]
Alternative 7 Accuracy 36.2% Cost 1769
\[\begin{array}{l}
t_1 := 2 \cdot \left(z \cdot t\right)\\
t_2 := 2 \cdot \left(x \cdot y\right)\\
t_3 := -2 \cdot \left(a \cdot \left(c \cdot i\right)\right)\\
\mathbf{if}\;a \leq -4.2 \cdot 10^{+129}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;a \leq -5.5 \cdot 10^{+57}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq -3.3 \cdot 10^{+38}:\\
\;\;\;\;\left(a \cdot i\right) \cdot \left(c \cdot -2\right)\\
\mathbf{elif}\;a \leq -1.5 \cdot 10^{-82}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq -4.8 \cdot 10^{-182}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;a \leq -2.15 \cdot 10^{-218}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq 5.2 \cdot 10^{-244}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;a \leq 2.9 \cdot 10^{-74}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq 3.9 \cdot 10^{+121} \lor \neg \left(a \leq 1.25 \cdot 10^{+225}\right):\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_3\\
\end{array}
\]
Alternative 8 Accuracy 70.4% Cost 1744
\[\begin{array}{l}
t_1 := 2 \cdot \left(z \cdot t - c \cdot \left(a \cdot i\right)\right)\\
t_2 := 2 \cdot \left(x \cdot y + z \cdot t\right)\\
\mathbf{if}\;x \cdot y \leq -1 \cdot 10^{-130}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \cdot y \leq 10^{-306}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \cdot y \leq 2 \cdot 10^{-202}:\\
\;\;\;\;2 \cdot \left(z \cdot t - c \cdot \left(i \cdot \left(b \cdot c\right)\right)\right)\\
\mathbf{elif}\;x \cdot y \leq 10^{-130}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\]
Alternative 9 Accuracy 75.5% Cost 1490
\[\begin{array}{l}
\mathbf{if}\;x \leq -2.5 \cdot 10^{-133} \lor \neg \left(x \leq -1.5 \cdot 10^{-235} \lor \neg \left(x \leq 5.5 \cdot 10^{-282}\right) \land x \leq 2.9 \cdot 10^{-223}\right):\\
\;\;\;\;2 \cdot \left(x \cdot y + \left(z \cdot t - c \cdot \left(a \cdot i\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(z \cdot t - c \cdot \left(i \cdot \left(b \cdot c\right)\right)\right)\\
\end{array}
\]
Alternative 10 Accuracy 82.8% Cost 1481
\[\begin{array}{l}
\mathbf{if}\;x \cdot y \leq -2 \cdot 10^{-111} \lor \neg \left(x \cdot y \leq 1.35 \cdot 10^{-63}\right):\\
\;\;\;\;2 \cdot \left(x \cdot y + \left(z \cdot t - c \cdot \left(a \cdot i\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(z \cdot t - c \cdot \left(i \cdot \left(a + b \cdot c\right)\right)\right)\\
\end{array}
\]
Alternative 11 Accuracy 70.7% Cost 1225
\[\begin{array}{l}
\mathbf{if}\;x \cdot y \leq -1 \cdot 10^{-130} \lor \neg \left(x \cdot y \leq 10^{-130}\right):\\
\;\;\;\;2 \cdot \left(x \cdot y + z \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(z \cdot t - c \cdot \left(a \cdot i\right)\right)\\
\end{array}
\]
Alternative 12 Accuracy 62.7% Cost 841
\[\begin{array}{l}
\mathbf{if}\;b \leq 6.2 \cdot 10^{+162} \lor \neg \left(b \leq 6.5 \cdot 10^{+224}\right):\\
\;\;\;\;2 \cdot \left(x \cdot y + z \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;-2 \cdot \left(i \cdot \left(b \cdot \left(c \cdot c\right)\right)\right)\\
\end{array}
\]
Alternative 13 Accuracy 43.5% Cost 585
\[\begin{array}{l}
\mathbf{if}\;x \leq -4.6 \cdot 10^{-46} \lor \neg \left(x \leq 2.1 \cdot 10^{-79}\right):\\
\;\;\;\;2 \cdot \left(x \cdot y\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(z \cdot t\right)\\
\end{array}
\]
Alternative 14 Accuracy 33.3% Cost 320
\[2 \cdot \left(z \cdot t\right)
\]