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



Bits error versus x



Bits error versus y



Bits error versus z
Results
Initial program Error: 1.7 bits
Taylor expanded around 0 Error: 3.3 bits
SimplifiedError: 1.7 bits
Final simplificationError: 1.7 bits
herbie shell --seed 2020203
(FPCore (x y z)
:name "fabs fraction 1"
:precision binary64
(fabs (- (/ (+ x 4.0) y) (* (/ x y) z))))