\left(\frac{1}{8} \cdot x - \frac{y \cdot z}{2}\right) + t\mathsf{fma}\left(\frac{x}{8}, 1, \mathsf{fma}\left(-\frac{y}{2}, z, t\right)\right)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((x / 8.0), 1.0, fma(-(y / 2.0), z, t));
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 0.0 |
|---|---|
| Target | 0.0 |
| Herbie | 0.0 |
Initial program 0.0
Simplified0.0
Final simplification0.0
herbie shell --seed 2020057 +o rules:numerics
(FPCore (x y z t)
:name "Diagrams.Solve.Polynomial:quartForm from diagrams-solve-0.1, B"
:precision binary64
:herbie-target
(- (+ (/ x 8) t) (* (/ z 2) y))
(+ (- (* (/ 1 8) x) (/ (* y z) 2)) t))