\[x \cdot \left(\left(\left(\left(y + z\right) + z\right) + y\right) + t\right) + y \cdot 5
\]
↓
\[\mathsf{fma}\left(y, 5, x \cdot \left(t + \left(y + z\right) \cdot 2\right)\right)
\]
(FPCore (x y z t)
:precision binary64
(+ (* x (+ (+ (+ (+ y z) z) y) t)) (* y 5.0)))
↓
(FPCore (x y z t) :precision binary64 (fma y 5.0 (* x (+ t (* (+ y z) 2.0)))))
double code(double x, double y, double z, double t) {
return (x * ((((y + z) + z) + y) + t)) + (y * 5.0);
}
↓
double code(double x, double y, double z, double t) {
return fma(y, 5.0, (x * (t + ((y + z) * 2.0))));
}
function code(x, y, z, t)
return Float64(Float64(x * Float64(Float64(Float64(Float64(y + z) + z) + y) + t)) + Float64(y * 5.0))
end
↓
function code(x, y, z, t)
return fma(y, 5.0, Float64(x * Float64(t + Float64(Float64(y + z) * 2.0))))
end
code[x_, y_, z_, t_] := N[(N[(x * N[(N[(N[(N[(y + z), $MachinePrecision] + z), $MachinePrecision] + y), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision] + N[(y * 5.0), $MachinePrecision]), $MachinePrecision]
↓
code[x_, y_, z_, t_] := N[(y * 5.0 + N[(x * N[(t + N[(N[(y + z), $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
x \cdot \left(\left(\left(\left(y + z\right) + z\right) + y\right) + t\right) + y \cdot 5
↓
\mathsf{fma}\left(y, 5, x \cdot \left(t + \left(y + z\right) \cdot 2\right)\right)
Alternatives
| Alternative 1 |
|---|
| Accuracy | 52.0% |
|---|
| Cost | 2165 |
|---|
\[\begin{array}{l}
t_1 := 2 \cdot \left(x \cdot z\right)\\
t_2 := x \cdot \left(t + y \cdot 2\right)\\
t_3 := y \cdot \left(5 + x \cdot 2\right)\\
\mathbf{if}\;z \leq -1.05 \cdot 10^{+187}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -3 \cdot 10^{+76}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;z \leq -6 \cdot 10^{+36}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -2.5 \cdot 10^{+17}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq -3.6 \cdot 10^{-44}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;z \leq -2.9 \cdot 10^{-71}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq -9 \cdot 10^{-152}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;z \leq -6.3 \cdot 10^{-248}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq 5.8 \cdot 10^{-272}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;z \leq 1.6 \cdot 10^{-140}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq 1.15 \cdot 10^{+19} \lor \neg \left(z \leq 1.5 \cdot 10^{+130}\right) \land z \leq 3 \cdot 10^{+194}:\\
\;\;\;\;t_3\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
| Alternative 2 |
|---|
| Accuracy | 99.9% |
|---|
| Cost | 1600 |
|---|
\[\left(\left(2 \cdot \left(y \cdot x\right) + \left(x \cdot t + 4 \cdot \left(x \cdot z\right)\right)\right) + \left(x \cdot z\right) \cdot -2\right) + y \cdot 5
\]
| Alternative 3 |
|---|
| Accuracy | 84.0% |
|---|
| Cost | 1364 |
|---|
\[\begin{array}{l}
t_1 := x \cdot t + y \cdot 5\\
t_2 := y \cdot 5 + x \cdot \left(z + z\right)\\
t_3 := \left(y + z\right) \cdot 2\\
\mathbf{if}\;x \leq -9.2 \cdot 10^{-33}:\\
\;\;\;\;x \cdot \left(t + t_3\right)\\
\mathbf{elif}\;x \leq -5.1 \cdot 10^{-110}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 1.2 \cdot 10^{-244}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq 8.5 \cdot 10^{-175}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 0.065:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;x \cdot t + x \cdot t_3\\
\end{array}
\]
| Alternative 4 |
|---|
| Accuracy | 51.1% |
|---|
| Cost | 1244 |
|---|
\[\begin{array}{l}
t_1 := 2 \cdot \left(x \cdot z\right)\\
t_2 := x \cdot \left(t + y \cdot 2\right)\\
\mathbf{if}\;y \leq -4.2 \cdot 10^{+85}:\\
\;\;\;\;y \cdot 5\\
\mathbf{elif}\;y \leq -1250000:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq -4 \cdot 10^{-47}:\\
\;\;\;\;y \cdot 5\\
\mathbf{elif}\;y \leq -1.45 \cdot 10^{-255}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq 8.5 \cdot 10^{-274}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 3.2 \cdot 10^{-87}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq 42000000000000:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;y \cdot 5\\
\end{array}
\]
| Alternative 5 |
|---|
| Accuracy | 84.1% |
|---|
| Cost | 1236 |
|---|
\[\begin{array}{l}
t_1 := x \cdot t + y \cdot 5\\
t_2 := x \cdot \left(t + \left(y + z\right) \cdot 2\right)\\
t_3 := y \cdot 5 + x \cdot \left(z + z\right)\\
\mathbf{if}\;x \leq -2.8 \cdot 10^{-32}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq -5.5 \cdot 10^{-109}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 8.8 \cdot 10^{-247}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;x \leq 5.2 \cdot 10^{-167}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 0.065:\\
\;\;\;\;t_3\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\]
| Alternative 6 |
|---|
| Accuracy | 49.9% |
|---|
| Cost | 980 |
|---|
\[\begin{array}{l}
t_1 := 2 \cdot \left(x \cdot z\right)\\
\mathbf{if}\;y \leq -9.5 \cdot 10^{-107}:\\
\;\;\;\;y \cdot 5\\
\mathbf{elif}\;y \leq -1.45 \cdot 10^{-255}:\\
\;\;\;\;x \cdot t\\
\mathbf{elif}\;y \leq 2.4 \cdot 10^{-191}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 1.05 \cdot 10^{-88}:\\
\;\;\;\;x \cdot t\\
\mathbf{elif}\;y \leq 44000000000000:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;y \cdot 5\\
\end{array}
\]
| Alternative 7 |
|---|
| Accuracy | 77.8% |
|---|
| Cost | 978 |
|---|
\[\begin{array}{l}
\mathbf{if}\;y \leq -2.3 \cdot 10^{+45} \lor \neg \left(y \leq -7.4 \cdot 10^{-5} \lor \neg \left(y \leq -3.35 \cdot 10^{-37}\right) \land y \leq 40000000000000\right):\\
\;\;\;\;y \cdot \left(5 + x \cdot 2\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(t + z \cdot 2\right)\\
\end{array}
\]
| Alternative 8 |
|---|
| Accuracy | 78.6% |
|---|
| Cost | 976 |
|---|
\[\begin{array}{l}
t_1 := x \cdot \left(t + z \cdot 2\right)\\
t_2 := y \cdot \left(5 + x \cdot 2\right)\\
\mathbf{if}\;y \leq -4.1 \cdot 10^{+45}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq -3.5 \cdot 10^{+21}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -5.3 \cdot 10^{-33}:\\
\;\;\;\;x \cdot t + y \cdot 5\\
\mathbf{elif}\;y \leq 54000000000000:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\]
| Alternative 9 |
|---|
| Accuracy | 99.9% |
|---|
| Cost | 960 |
|---|
\[y \cdot 5 + x \cdot \left(t + \left(y + \left(z + \left(y + z\right)\right)\right)\right)
\]
| Alternative 10 |
|---|
| Accuracy | 84.6% |
|---|
| Cost | 841 |
|---|
\[\begin{array}{l}
\mathbf{if}\;x \leq -1.36 \cdot 10^{-31} \lor \neg \left(x \leq 1.2 \cdot 10^{-21}\right):\\
\;\;\;\;x \cdot \left(t + \left(y + z\right) \cdot 2\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot t + y \cdot 5\\
\end{array}
\]
| Alternative 11 |
|---|
| Accuracy | 50.2% |
|---|
| Cost | 456 |
|---|
\[\begin{array}{l}
\mathbf{if}\;y \leq -9.8 \cdot 10^{-107}:\\
\;\;\;\;y \cdot 5\\
\mathbf{elif}\;y \leq 4300000000000:\\
\;\;\;\;x \cdot t\\
\mathbf{else}:\\
\;\;\;\;y \cdot 5\\
\end{array}
\]
| Alternative 12 |
|---|
| Accuracy | 26.8% |
|---|
| Cost | 192 |
|---|
\[x \cdot t
\]