\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.4 |
|---|---|
| Target | 0 |
| Herbie | 31.2 |
Initial program 45.4
rmApplied add-cbrt-cube_binary64_147845.4
Simplified45.4
rmApplied associate--r+_binary64_137845.4
rmApplied associate--r+_binary64_137831.3
rmApplied rem-cbrt-cube_binary64_146631.2
Final simplification31.2
herbie shell --seed 2021047
(FPCore (x y z)
:name "simple fma test"
:precision binary64
:herbie-target
-1.0
(- (fma x y z) (+ 1.0 (+ (* x y) z))))