\[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 | 84.3% |
|---|
| Cost | 1628 |
|---|
\[\begin{array}{l}
t_1 := y \cdot 5 + 2 \cdot \left(x \cdot \left(y + z\right)\right)\\
t_2 := y \cdot 5 + x \cdot \left(t + \left(y + y\right)\right)\\
\mathbf{if}\;t \leq -4.6 \cdot 10^{+21}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq -1.55 \cdot 10^{-62}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -7.5 \cdot 10^{-93}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq -9 \cdot 10^{-126}:\\
\;\;\;\;x \cdot \left(t + z \cdot 2\right)\\
\mathbf{elif}\;t \leq 3 \cdot 10^{-97}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 7.6 \cdot 10^{+32}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq 2.9 \cdot 10^{+114}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;y \cdot 5 + x \cdot t\\
\end{array}
\]
| Alternative 2 |
|---|
| Accuracy | 53.6% |
|---|
| Cost | 1372 |
|---|
\[\begin{array}{l}
t_1 := x \cdot \left(t + y \cdot 2\right)\\
t_2 := 2 \cdot \left(x \cdot \left(y + z\right)\right)\\
\mathbf{if}\;y \leq -32000000:\\
\;\;\;\;y \cdot 5\\
\mathbf{elif}\;y \leq -3 \cdot 10^{-65}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq -1.3 \cdot 10^{-172}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -3.3 \cdot 10^{-277}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq -8.45 \cdot 10^{-308}:\\
\;\;\;\;x \cdot t\\
\mathbf{elif}\;y \leq 2.7 \cdot 10^{-251}:\\
\;\;\;\;z \cdot \left(x \cdot 2\right)\\
\mathbf{elif}\;y \leq 3.65 \cdot 10^{+15}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;y \cdot 5\\
\end{array}
\]
| Alternative 3 |
|---|
| Accuracy | 61.0% |
|---|
| Cost | 1240 |
|---|
\[\begin{array}{l}
t_1 := x \cdot \left(t + y \cdot 2\right)\\
t_2 := y \cdot \left(5 + x \cdot 2\right)\\
\mathbf{if}\;y \leq -4.2 \cdot 10^{-64}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq -1.05 \cdot 10^{-172}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -1.85 \cdot 10^{-277}:\\
\;\;\;\;2 \cdot \left(x \cdot \left(y + z\right)\right)\\
\mathbf{elif}\;y \leq -8.45 \cdot 10^{-308}:\\
\;\;\;\;x \cdot t\\
\mathbf{elif}\;y \leq 2.1 \cdot 10^{-257}:\\
\;\;\;\;z \cdot \left(x \cdot 2\right)\\
\mathbf{elif}\;y \leq 4.8 \cdot 10^{-76}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\]
| Alternative 4 |
|---|
| Accuracy | 51.5% |
|---|
| Cost | 1116 |
|---|
\[\begin{array}{l}
t_1 := 2 \cdot \left(x \cdot \left(y + z\right)\right)\\
\mathbf{if}\;y \leq -12000:\\
\;\;\;\;y \cdot 5\\
\mathbf{elif}\;y \leq -4.8 \cdot 10^{-97}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -4 \cdot 10^{-173}:\\
\;\;\;\;x \cdot t\\
\mathbf{elif}\;y \leq -1.95 \cdot 10^{-277}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -8.45 \cdot 10^{-308}:\\
\;\;\;\;x \cdot t\\
\mathbf{elif}\;y \leq 4.6 \cdot 10^{-253}:\\
\;\;\;\;z \cdot \left(x \cdot 2\right)\\
\mathbf{elif}\;y \leq 1.26 \cdot 10^{-76}:\\
\;\;\;\;x \cdot t\\
\mathbf{else}:\\
\;\;\;\;y \cdot 5\\
\end{array}
\]
| Alternative 5 |
|---|
| Accuracy | 98.3% |
|---|
| Cost | 1097 |
|---|
\[\begin{array}{l}
\mathbf{if}\;x \leq -2.3 \cdot 10^{+22} \lor \neg \left(x \leq 2.5\right):\\
\;\;\;\;x \cdot \left(t + \left(y + z\right) \cdot 2\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot 5 + \left(x \cdot \left(z \cdot 2\right) + x \cdot t\right)\\
\end{array}
\]
| Alternative 6 |
|---|
| Accuracy | 50.7% |
|---|
| Cost | 984 |
|---|
\[\begin{array}{l}
t_1 := z \cdot \left(x \cdot 2\right)\\
\mathbf{if}\;y \leq -1.55 \cdot 10^{-64}:\\
\;\;\;\;y \cdot 5\\
\mathbf{elif}\;y \leq -7 \cdot 10^{-173}:\\
\;\;\;\;x \cdot t\\
\mathbf{elif}\;y \leq -1.9 \cdot 10^{-277}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -8.45 \cdot 10^{-308}:\\
\;\;\;\;x \cdot t\\
\mathbf{elif}\;y \leq 1.7 \cdot 10^{-258}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 4 \cdot 10^{-76}:\\
\;\;\;\;x \cdot t\\
\mathbf{else}:\\
\;\;\;\;y \cdot 5\\
\end{array}
\]
| Alternative 7 |
|---|
| Accuracy | 85.5% |
|---|
| Cost | 969 |
|---|
\[\begin{array}{l}
\mathbf{if}\;y \leq -0.18 \lor \neg \left(y \leq 5 \cdot 10^{-76}\right):\\
\;\;\;\;y \cdot 5 + x \cdot \left(t + \left(y + y\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(t + \left(y + z\right) \cdot 2\right)\\
\end{array}
\]
| Alternative 8 |
|---|
| Accuracy | 98.3% |
|---|
| Cost | 969 |
|---|
\[\begin{array}{l}
\mathbf{if}\;x \leq -2.3 \cdot 10^{+22} \lor \neg \left(x \leq 2.5\right):\\
\;\;\;\;x \cdot \left(t + \left(y + z\right) \cdot 2\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot 5 + x \cdot \left(t + z \cdot 2\right)\\
\end{array}
\]
| Alternative 9 |
|---|
| Accuracy | 99.9% |
|---|
| Cost | 960 |
|---|
\[x \cdot \left(t + \left(y + \left(z + \left(y + z\right)\right)\right)\right) + y \cdot 5
\]
| Alternative 10 |
|---|
| Accuracy | 78.3% |
|---|
| Cost | 841 |
|---|
\[\begin{array}{l}
\mathbf{if}\;y \leq -2.25 \cdot 10^{+84} \lor \neg \left(y \leq 5 \cdot 10^{-76}\right):\\
\;\;\;\;y \cdot \left(5 + x \cdot 2\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(t + \left(y + z\right) \cdot 2\right)\\
\end{array}
\]
| Alternative 11 |
|---|
| Accuracy | 78.3% |
|---|
| Cost | 840 |
|---|
\[\begin{array}{l}
\mathbf{if}\;y \leq -2.7 \cdot 10^{+84}:\\
\;\;\;\;y \cdot \left(5 + x \cdot 2\right)\\
\mathbf{elif}\;y \leq 5 \cdot 10^{-76}:\\
\;\;\;\;x \cdot \left(t + \left(y + z\right) \cdot 2\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot 5 + y \cdot \left(x \cdot 2\right)\\
\end{array}
\]
| Alternative 12 |
|---|
| Accuracy | 76.5% |
|---|
| Cost | 713 |
|---|
\[\begin{array}{l}
\mathbf{if}\;y \leq -6 \cdot 10^{+19} \lor \neg \left(y \leq 5 \cdot 10^{-76}\right):\\
\;\;\;\;y \cdot \left(5 + x \cdot 2\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(t + z \cdot 2\right)\\
\end{array}
\]
| Alternative 13 |
|---|
| Accuracy | 50.5% |
|---|
| Cost | 456 |
|---|
\[\begin{array}{l}
\mathbf{if}\;y \leq -1.08 \cdot 10^{-63}:\\
\;\;\;\;y \cdot 5\\
\mathbf{elif}\;y \leq 2.4 \cdot 10^{-76}:\\
\;\;\;\;x \cdot t\\
\mathbf{else}:\\
\;\;\;\;y \cdot 5\\
\end{array}
\]
| Alternative 14 |
|---|
| Accuracy | 26.0% |
|---|
| Cost | 192 |
|---|
\[x \cdot t
\]