\mathsf{fma}\left(x, y, z\right) - \left(1 + \left(x \cdot y + z\right)\right)\sqrt[3]{\mathsf{fma}\left(x, y, z\right) - z} \cdot \left(\sqrt[3]{\mathsf{fma}\left(x, y, z\right) - z} \cdot \sqrt[3]{\mathsf{fma}\left(x, y, z\right) - z}\right) - \left(1 + x \cdot y\right)double code(double x, double y, double z) {
return ((double) (((double) fma(x, y, z)) - ((double) (1.0 + ((double) (((double) (x * y)) + z))))));
}
double code(double x, double y, double z) {
return ((double) (((double) (((double) cbrt(((double) (((double) fma(x, y, z)) - z)))) * ((double) (((double) cbrt(((double) (((double) fma(x, y, z)) - z)))) * ((double) cbrt(((double) (((double) fma(x, y, z)) - z)))))))) - ((double) (1.0 + ((double) (x * y))))));
}




Bits error versus x




Bits error versus y




Bits error versus z
| Original | 44.8 |
|---|---|
| Target | 0 |
| Herbie | 30.8 |
Initial program 44.8
rmApplied add-cbrt-cube44.8
Simplified44.8
rmApplied associate--r+30.6
rmApplied rem-cbrt-cube30.5
rmApplied add-cube-cbrt30.8
Final simplification30.8
herbie shell --seed 2020196
(FPCore (x y z)
:name "simple fma test"
:precision binary64
:herbie-target
-1.0
(- (fma x y z) (+ 1.0 (+ (* x y) z))))