\left|\frac{x + 4}{y} - \frac{x}{y} \cdot z\right|\left|\frac{\left(x + 4\right) - x \cdot z}{y}\right|(FPCore (x y z) :precision binary64 (fabs (- (/ (+ x 4.0) y) (* (/ x y) z))))
(FPCore (x y z) :precision binary64 (fabs (/ (- (+ x 4.0) (* x z)) y)))
double code(double x, double y, double z) {
return fabs(((x + 4.0) / y) - ((x / y) * z));
}
double code(double x, double y, double z) {
return fabs(((x + 4.0) - (x * z)) / y);
}



Bits error versus x



Bits error versus y



Bits error versus z
Results
Initial program 1.5
Simplified3.3
Final simplification3.3
herbie shell --seed 2020274
(FPCore (x y z)
:name "fabs fraction 1"
:precision binary64
(fabs (- (/ (+ x 4.0) y) (* (/ x y) z))))