\mathsf{fma}\left(x, y, z\right) - \left(1 + \left(x \cdot y + z\right)\right)\sqrt[3]{{\left(\left(\mathsf{fma}\left(x, y, z\right) - \left(z + x \cdot y\right)\right) - 1\right)}^{3}}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 cbrt(pow(((fma(x, y, z) - (z + (x * y))) - 1.0), 3.0));
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 44.9 |
|---|---|
| Target | 0 |
| Herbie | 8.1 |
Initial program 44.9
rmApplied add-cbrt-cube44.9
Simplified44.9
rmApplied associate--r+31.1
rmApplied associate--r+14.9
rmApplied associate--l-8.1
Final simplification8.1
herbie shell --seed 2020106
(FPCore (x y z)
:name "simple fma test"
:precision binary64
:herbie-target
-1
(- (fma x y z) (+ 1 (+ (* x y) z))))