\frac{a - b}{2 \cdot h}\frac{a - b}{2 \cdot h}double code(double a, double b, double h) {
return ((double) (((double) (a - b)) / ((double) (2.0 * h))));
}
double code(double a, double b, double h) {
return ((double) (((double) (a - b)) / ((double) (2.0 * h))));
}



Bits error versus a



Bits error versus b



Bits error versus h
Results
Initial program 0.0
Final simplification0.0
herbie shell --seed 2020153
(FPCore (a b h)
:name "(/ (- a b) (* 2 h))"
:precision binary64
(/ (- a b) (* 2.0 h)))