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 Error 3.58% Cost 2505
\[\begin{array}{l}
t_1 := a + b \cdot c\\
t_2 := i \cdot \left(c \cdot t_1\right)\\
\mathbf{if}\;t_2 \leq -4 \cdot 10^{+272} \lor \neg \left(t_2 \leq 2 \cdot 10^{+189}\right):\\
\;\;\;\;2 \cdot \left(z \cdot t - t_1 \cdot \left(c \cdot i\right)\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\left(z \cdot t + x \cdot y\right) - t_2\right)\\
\end{array}
\]
Alternative 2 Error 15.22% 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^{-73} \lor \neg \left(t_2 \leq 10^{+17}\right):\\
\;\;\;\;2 \cdot \left(z \cdot t - t_1 \cdot \left(c \cdot i\right)\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(z \cdot t + x \cdot y\right)\\
\end{array}
\]
Alternative 3 Error 34.8% Cost 1497
\[\begin{array}{l}
t_1 := -2 \cdot \left(c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\right)\\
\mathbf{if}\;c \leq -2.8 \cdot 10^{+56}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;c \leq -9 \cdot 10^{-53}:\\
\;\;\;\;2 \cdot \left(z \cdot t - \left(c \cdot i\right) \cdot \left(b \cdot c\right)\right)\\
\mathbf{elif}\;c \leq -6.2 \cdot 10^{-86}:\\
\;\;\;\;2 \cdot \left(x \cdot y - i \cdot \left(a \cdot c\right)\right)\\
\mathbf{elif}\;c \leq 4.9 \cdot 10^{-48} \lor \neg \left(c \leq 7.6 \cdot 10^{+77}\right) \land c \leq 1.15 \cdot 10^{+205}:\\
\;\;\;\;2 \cdot \left(z \cdot t + x \cdot y\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
Alternative 4 Error 33.7% Cost 1234
\[\begin{array}{l}
\mathbf{if}\;c \leq -3.8 \cdot 10^{+52} \lor \neg \left(c \leq 2.8 \cdot 10^{-48} \lor \neg \left(c \leq 6 \cdot 10^{+77}\right) \land c \leq 1.1 \cdot 10^{+206}\right):\\
\;\;\;\;-2 \cdot \left(c \cdot \left(\left(a + b \cdot c\right) \cdot i\right)\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(z \cdot t + x \cdot y\right)\\
\end{array}
\]
Alternative 5 Error 58.21% Cost 1112
\[\begin{array}{l}
t_1 := 2 \cdot \left(z \cdot t\right)\\
t_2 := -2 \cdot \left(a \cdot \left(c \cdot i\right)\right)\\
t_3 := 2 \cdot \left(x \cdot y\right)\\
\mathbf{if}\;x \leq -1.42 \cdot 10^{+60}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;x \leq -6.6 \cdot 10^{+37}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq -6 \cdot 10^{-7}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq -8 \cdot 10^{-198}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq -4.1 \cdot 10^{-234}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq 0.00021:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_3\\
\end{array}
\]
Alternative 6 Error 59.66% Cost 1112
\[\begin{array}{l}
t_1 := 2 \cdot \left(x \cdot y\right)\\
t_2 := 2 \cdot \left(z \cdot t\right)\\
\mathbf{if}\;z \leq -1 \cdot 10^{-8}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq -1.2 \cdot 10^{-78}:\\
\;\;\;\;-2 \cdot \left(c \cdot \left(a \cdot i\right)\right)\\
\mathbf{elif}\;z \leq -9.8 \cdot 10^{-111}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq -2.1 \cdot 10^{-154}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -3 \cdot 10^{-198}:\\
\;\;\;\;-2 \cdot \left(a \cdot \left(c \cdot i\right)\right)\\
\mathbf{elif}\;z \leq 5.5 \cdot 10^{-179}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\]
Alternative 7 Error 39.24% Cost 1106
\[\begin{array}{l}
\mathbf{if}\;i \leq -2.9 \cdot 10^{+173} \lor \neg \left(i \leq 4.4 \cdot 10^{+37}\right) \land \left(i \leq 4.3 \cdot 10^{+105} \lor \neg \left(i \leq 7.2 \cdot 10^{+148}\right)\right):\\
\;\;\;\;-2 \cdot \left(a \cdot \left(c \cdot i\right)\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(z \cdot t + x \cdot y\right)\\
\end{array}
\]
Alternative 8 Error 60.25% Cost 850
\[\begin{array}{l}
\mathbf{if}\;t \leq -5 \cdot 10^{-242} \lor \neg \left(t \leq 1.1 \cdot 10^{-29} \lor \neg \left(t \leq 7 \cdot 10^{+170}\right) \land t \leq 3.05 \cdot 10^{+212}\right):\\
\;\;\;\;2 \cdot \left(z \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(x \cdot y\right)\\
\end{array}
\]
Alternative 9 Error 67.21% Cost 320
\[2 \cdot \left(z \cdot t\right)
\]