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(a + b \cdot c\right) \cdot \left(c \cdot i\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)) (* (+ 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 * (((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)) - ((a + (b * c)) * (c * i)));
}
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(a + Float64(b * c)) * Float64(c * i))))
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[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * N[(c * i), $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(a + b \cdot c\right) \cdot \left(c \cdot i\right)\right)
Alternatives Alternative 1 Accuracy 96.1% Cost 8392
\[\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:\\
\;\;\;\;2 \cdot \left(x \cdot y - c \cdot \left(t_1 \cdot i\right)\right)\\
\mathbf{elif}\;t_2 \leq 10^{+293}:\\
\;\;\;\;2 \cdot \left(\left(x \cdot y + z \cdot t\right) - t_2\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(c \cdot i\right) \cdot -2}{\frac{1}{\mathsf{fma}\left(c, b, a\right)}}\\
\end{array}
\]
Alternative 2 Accuracy 75.4% Cost 5088
\[\begin{array}{l}
t_1 := a + b \cdot c\\
t_2 := c \cdot \left(t_1 \cdot i\right)\\
t_3 := 2 \cdot \left(x \cdot y - t_2\right)\\
t_4 := c \cdot t_1\\
t_5 := 2 \cdot \left(z \cdot t - i \cdot t_4\right)\\
\mathbf{if}\;t_4 \leq -5 \cdot 10^{+113}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;t_4 \leq -0.5:\\
\;\;\;\;t_5\\
\mathbf{elif}\;t_4 \leq -1 \cdot 10^{-72}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;t_4 \leq -4 \cdot 10^{-118}:\\
\;\;\;\;t_5\\
\mathbf{elif}\;t_4 \leq 2 \cdot 10^{-148}:\\
\;\;\;\;2 \cdot \left(x \cdot y + z \cdot t\right)\\
\mathbf{elif}\;t_4 \leq 5 \cdot 10^{+37}:\\
\;\;\;\;t_5\\
\mathbf{elif}\;t_4 \leq 2 \cdot 10^{+91}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;t_4 \leq 4 \cdot 10^{+286}:\\
\;\;\;\;t_5\\
\mathbf{else}:\\
\;\;\;\;t_2 \cdot -2\\
\end{array}
\]
Alternative 3 Accuracy 78.0% Cost 3668
\[\begin{array}{l}
t_1 := a + b \cdot c\\
t_2 := 2 \cdot \left(x \cdot y - c \cdot \left(t_1 \cdot i\right)\right)\\
t_3 := c \cdot t_1\\
t_4 := 2 \cdot \left(z \cdot t - i \cdot t_3\right)\\
t_5 := 2 \cdot \left(\left(x \cdot y + z \cdot t\right) - c \cdot \left(b \cdot \left(c \cdot i\right)\right)\right)\\
\mathbf{if}\;t_3 \leq -5 \cdot 10^{+110}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t_3 \leq 2 \cdot 10^{-148}:\\
\;\;\;\;t_5\\
\mathbf{elif}\;t_3 \leq 5 \cdot 10^{+37}:\\
\;\;\;\;t_4\\
\mathbf{elif}\;t_3 \leq 2 \cdot 10^{+91}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t_3 \leq 10^{+139}:\\
\;\;\;\;t_4\\
\mathbf{else}:\\
\;\;\;\;t_5\\
\end{array}
\]
Alternative 4 Accuracy 82.6% Cost 3536
\[\begin{array}{l}
t_1 := a + b \cdot c\\
t_2 := i \cdot \left(c \cdot t_1\right)\\
t_3 := 2 \cdot \left(z \cdot t - t_2\right)\\
\mathbf{if}\;t_2 \leq -\infty:\\
\;\;\;\;2 \cdot \left(x \cdot y - c \cdot \left(b \cdot \left(c \cdot i\right)\right)\right)\\
\mathbf{elif}\;t_2 \leq -4 \cdot 10^{-98}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;t_2 \leq 10^{+29}:\\
\;\;\;\;2 \cdot \left(x \cdot y + z \cdot t\right)\\
\mathbf{elif}\;t_2 \leq 4 \cdot 10^{+307}:\\
\;\;\;\;t_3\\
\mathbf{else}:\\
\;\;\;\;\left(c \cdot \left(t_1 \cdot i\right)\right) \cdot -2\\
\end{array}
\]
Alternative 5 Accuracy 96.1% Cost 2504
\[\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:\\
\;\;\;\;2 \cdot \left(x \cdot y - c \cdot \left(t_1 \cdot i\right)\right)\\
\mathbf{elif}\;t_2 \leq 10^{+293}:\\
\;\;\;\;2 \cdot \left(\left(x \cdot y + z \cdot t\right) - t_2\right)\\
\mathbf{else}:\\
\;\;\;\;-2 \cdot \left(\left(c \cdot i\right) \cdot \left(b \cdot c\right)\right) + -2 \cdot \left(a \cdot \left(c \cdot i\right)\right)\\
\end{array}
\]
Alternative 6 Accuracy 62.3% Cost 1764
\[\begin{array}{l}
\mathbf{if}\;i \leq -1.5 \cdot 10^{+98} \lor \neg \left(i \leq -9.5 \cdot 10^{+63} \lor \neg \left(i \leq 1.16 \cdot 10^{-226}\right) \land \left(i \leq 1.22 \cdot 10^{-210} \lor \neg \left(i \leq 5 \cdot 10^{-114}\right) \land \left(i \leq 4 \cdot 10^{-99} \lor \neg \left(i \leq 1.05 \cdot 10^{+71}\right) \land i \leq 7 \cdot 10^{+109}\right)\right)\right):\\
\;\;\;\;2 \cdot \left(x \cdot y + z \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;\left(c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\right) \cdot -2\\
\end{array}
\]
Alternative 7 Accuracy 64.2% Cost 1760
\[\begin{array}{l}
t_1 := \left(c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\right) \cdot -2\\
t_2 := 2 \cdot \left(x \cdot y + z \cdot t\right)\\
t_3 := 2 \cdot \left(z \cdot t - i \cdot \left(a \cdot c\right)\right)\\
\mathbf{if}\;i \leq -9.5 \cdot 10^{+63}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;i \leq 1.16 \cdot 10^{-226}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;i \leq 1.22 \cdot 10^{-210}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;i \leq 5 \cdot 10^{-114}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;i \leq 3.7 \cdot 10^{-100}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;i \leq 1.7 \cdot 10^{+71}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;i \leq 2.7 \cdot 10^{+110}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;i \leq 1.4 \cdot 10^{+169}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_3\\
\end{array}
\]
Alternative 8 Accuracy 64.1% Cost 1760
\[\begin{array}{l}
t_1 := \left(c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\right) \cdot -2\\
t_2 := 2 \cdot \left(x \cdot y + z \cdot t\right)\\
t_3 := 2 \cdot \left(z \cdot t - i \cdot \left(a \cdot c\right)\right)\\
\mathbf{if}\;i \leq -9.5 \cdot 10^{+63}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;i \leq 1.16 \cdot 10^{-226}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;i \leq 1.22 \cdot 10^{-210}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;i \leq 6.5 \cdot 10^{-122}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;i \leq 3.1 \cdot 10^{-87}:\\
\;\;\;\;2 \cdot \left(x \cdot y - c \cdot \left(b \cdot \left(c \cdot i\right)\right)\right)\\
\mathbf{elif}\;i \leq 1.9 \cdot 10^{+69}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;i \leq 7 \cdot 10^{+109}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;i \leq 4.1 \cdot 10^{+168}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_3\\
\end{array}
\]
Alternative 9 Accuracy 40.3% Cost 848
\[\begin{array}{l}
t_1 := 2 \cdot \left(z \cdot t\right)\\
t_2 := 2 \cdot \left(x \cdot y\right)\\
\mathbf{if}\;y \leq -5.2 \cdot 10^{-92}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq 1.55 \cdot 10^{-278}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 6 \cdot 10^{-176}:\\
\;\;\;\;c \cdot \left(-2 \cdot \left(a \cdot i\right)\right)\\
\mathbf{elif}\;y \leq 4.9 \cdot 10^{+121}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\]
Alternative 10 Accuracy 40.6% Cost 848
\[\begin{array}{l}
t_1 := 2 \cdot \left(z \cdot t\right)\\
t_2 := 2 \cdot \left(x \cdot y\right)\\
\mathbf{if}\;y \leq -8 \cdot 10^{-91}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq 1.55 \cdot 10^{-279}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 9.6 \cdot 10^{-176}:\\
\;\;\;\;-2 \cdot \left(a \cdot \left(c \cdot i\right)\right)\\
\mathbf{elif}\;y \leq 5 \cdot 10^{+121}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\]
Alternative 11 Accuracy 62.1% Cost 841
\[\begin{array}{l}
\mathbf{if}\;y \leq 1.6 \cdot 10^{-278} \lor \neg \left(y \leq 6 \cdot 10^{-176}\right):\\
\;\;\;\;2 \cdot \left(x \cdot y + z \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;-2 \cdot \left(a \cdot \left(c \cdot i\right)\right)\\
\end{array}
\]
Alternative 12 Accuracy 43.2% Cost 585
\[\begin{array}{l}
\mathbf{if}\;x \leq -8.5 \cdot 10^{+36} \lor \neg \left(x \leq 1.2 \cdot 10^{-53}\right):\\
\;\;\;\;2 \cdot \left(x \cdot y\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(z \cdot t\right)\\
\end{array}
\]
Alternative 13 Accuracy 34.5% Cost 320
\[2 \cdot \left(z \cdot t\right)
\]
Alternative 14 Accuracy 0.0% Cost 192
\[\frac{0}{0}
\]