| Alternative 1 | |
|---|---|
| Error | 12.8 |
| Cost | 585 |
\[\begin{array}{l}
\mathbf{if}\;y \leq -4.2 \cdot 10^{-42} \lor \neg \left(y \leq 2.6 \cdot 10^{-55}\right):\\
\;\;\;\;y \cdot \left(x + z\right)\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\]
(FPCore (x y z) :precision binary64 (+ x (* y (+ z x))))
(FPCore (x y z) :precision binary64 (fma y (+ x z) x))
double code(double x, double y, double z) {
return x + (y * (z + x));
}
double code(double x, double y, double z) {
return fma(y, (x + z), x);
}
function code(x, y, z) return Float64(x + Float64(y * Float64(z + x))) end
function code(x, y, z) return fma(y, Float64(x + z), x) end
code[x_, y_, z_] := N[(x + N[(y * N[(z + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
code[x_, y_, z_] := N[(y * N[(x + z), $MachinePrecision] + x), $MachinePrecision]
x + y \cdot \left(z + x\right)
\mathsf{fma}\left(y, x + z, x\right)
Initial program 0.0
Simplified0.0
Final simplification0.0
| Alternative 1 | |
|---|---|
| Error | 12.8 |
| Cost | 585 |
| Alternative 2 | |
|---|---|
| Error | 12.6 |
| Cost | 585 |
| Alternative 3 | |
|---|---|
| Error | 1.0 |
| Cost | 585 |
| Alternative 4 | |
|---|---|
| Error | 24.4 |
| Cost | 456 |
| Alternative 5 | |
|---|---|
| Error | 24.3 |
| Cost | 456 |
| Alternative 6 | |
|---|---|
| Error | 0.0 |
| Cost | 448 |
| Alternative 7 | |
|---|---|
| Error | 35.2 |
| Cost | 64 |
herbie shell --seed 2022340
(FPCore (x y z)
:name "Main:bigenough2 from A"
:precision binary64
(+ x (* y (+ z x))))