\[\left(\frac{1}{8} \cdot x - \frac{y \cdot z}{2}\right) + t
\]
↓
\[\mathsf{fma}\left(z, -0.5 \cdot y, \mathsf{fma}\left(0.125, x, t\right)\right)
\]
(FPCore (x y z t)
:precision binary64
(+ (- (* (/ 1.0 8.0) x) (/ (* y z) 2.0)) t))
↓
(FPCore (x y z t) :precision binary64 (fma z (* -0.5 y) (fma 0.125 x t)))
double code(double x, double y, double z, double t) {
return (((1.0 / 8.0) * x) - ((y * z) / 2.0)) + t;
}
↓
double code(double x, double y, double z, double t) {
return fma(z, (-0.5 * y), fma(0.125, x, t));
}
function code(x, y, z, t)
return Float64(Float64(Float64(Float64(1.0 / 8.0) * x) - Float64(Float64(y * z) / 2.0)) + t)
end
↓
function code(x, y, z, t)
return fma(z, Float64(-0.5 * y), fma(0.125, x, t))
end
code[x_, y_, z_, t_] := N[(N[(N[(N[(1.0 / 8.0), $MachinePrecision] * x), $MachinePrecision] - N[(N[(y * z), $MachinePrecision] / 2.0), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision]
↓
code[x_, y_, z_, t_] := N[(z * N[(-0.5 * y), $MachinePrecision] + N[(0.125 * x + t), $MachinePrecision]), $MachinePrecision]
\left(\frac{1}{8} \cdot x - \frac{y \cdot z}{2}\right) + t
↓
\mathsf{fma}\left(z, -0.5 \cdot y, \mathsf{fma}\left(0.125, x, t\right)\right)
Alternatives
| Alternative 1 |
|---|
| Accuracy | 54.8% |
|---|
| Cost | 1380 |
|---|
\[\begin{array}{l}
t_1 := -0.5 \cdot \left(z \cdot y\right)\\
\mathbf{if}\;x \leq -3.2 \cdot 10^{+47}:\\
\;\;\;\;0.125 \cdot x\\
\mathbf{elif}\;x \leq -1.35 \cdot 10^{-13}:\\
\;\;\;\;t\\
\mathbf{elif}\;x \leq -1.35 \cdot 10^{-24}:\\
\;\;\;\;0.125 \cdot x\\
\mathbf{elif}\;x \leq -5.8 \cdot 10^{-75}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq -2.1 \cdot 10^{-104}:\\
\;\;\;\;t\\
\mathbf{elif}\;x \leq -4.2 \cdot 10^{-137}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq -1.75 \cdot 10^{-197}:\\
\;\;\;\;t\\
\mathbf{elif}\;x \leq -1.25 \cdot 10^{-246}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 5000000000:\\
\;\;\;\;t\\
\mathbf{else}:\\
\;\;\;\;0.125 \cdot x\\
\end{array}
\]
| Alternative 2 |
|---|
| Accuracy | 86.0% |
|---|
| Cost | 968 |
|---|
\[\begin{array}{l}
t_1 := -0.5 \cdot \left(z \cdot y\right)\\
\mathbf{if}\;z \cdot y \leq -3.6 \cdot 10^{+85}:\\
\;\;\;\;0.125 \cdot x + t_1\\
\mathbf{elif}\;z \cdot y \leq 1.55 \cdot 10^{+94}:\\
\;\;\;\;t + 0.125 \cdot x\\
\mathbf{else}:\\
\;\;\;\;t + t_1\\
\end{array}
\]
| Alternative 3 |
|---|
| Accuracy | 81.4% |
|---|
| Cost | 841 |
|---|
\[\begin{array}{l}
\mathbf{if}\;z \cdot y \leq -2.4 \cdot 10^{+82} \lor \neg \left(z \cdot y \leq 2.3 \cdot 10^{+110}\right):\\
\;\;\;\;-0.5 \cdot \left(z \cdot y\right)\\
\mathbf{else}:\\
\;\;\;\;t + 0.125 \cdot x\\
\end{array}
\]
| Alternative 4 |
|---|
| Accuracy | 86.9% |
|---|
| Cost | 713 |
|---|
\[\begin{array}{l}
\mathbf{if}\;x \leq -4 \cdot 10^{+42} \lor \neg \left(x \leq 2.7 \cdot 10^{+26}\right):\\
\;\;\;\;t + 0.125 \cdot x\\
\mathbf{else}:\\
\;\;\;\;t + -0.5 \cdot \left(z \cdot y\right)\\
\end{array}
\]
| Alternative 5 |
|---|
| Accuracy | 100.0% |
|---|
| Cost | 704 |
|---|
\[t + \left(0.125 \cdot x - z \cdot \frac{y}{2}\right)
\]
| Alternative 6 |
|---|
| Accuracy | 56.5% |
|---|
| Cost | 456 |
|---|
\[\begin{array}{l}
\mathbf{if}\;t \leq -1.65 \cdot 10^{+16}:\\
\;\;\;\;t\\
\mathbf{elif}\;t \leq 3.1 \cdot 10^{+85}:\\
\;\;\;\;0.125 \cdot x\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\]
| Alternative 7 |
|---|
| Accuracy | 36.9% |
|---|
| Cost | 64 |
|---|
\[t
\]