\mathsf{fma}\left(x, y, z\right) - \left(1 + \left(x \cdot y + z\right)\right)\left(\left(\mathsf{fma}\left(x, y, z\right) - z\right) - 1\right) - x \cdot y(FPCore (x y z) :precision binary64 (- (fma x y z) (+ 1.0 (+ (* x y) z))))
(FPCore (x y z) :precision binary64 (- (- (- (fma x y z) z) 1.0) (* x y)))
double code(double x, double y, double z) {
return fma(x, y, z) - (1.0 + ((x * y) + z));
}
double code(double x, double y, double z) {
return ((fma(x, y, z) - z) - 1.0) - (x * y);
}




Bits error versus x




Bits error versus y




Bits error versus z
| Original | 45.5 |
|---|---|
| Target | 0 |
| Herbie | 31.0 |
Initial program 45.5
rmApplied add-cbrt-cube_binary64_181945.5
Simplified45.5
rmApplied associate--r+_binary64_171945.5
rmApplied associate--r+_binary64_171931.1
rmApplied rem-cbrt-cube_binary64_180731.0
Final simplification31.0
herbie shell --seed 2021032
(FPCore (x y z)
:name "simple fma test"
:precision binary64
:herbie-target
-1.0
(- (fma x y z) (+ 1.0 (+ (* x y) z))))