\frac{\sin \left(x - h\right) - \sin x}{h}\frac{\sin \left(x - h\right) - \sin x}{h}double code(double x, double h) {
return ((double) (((double) (((double) sin(((double) (x - h)))) - ((double) sin(x)))) / h));
}
double code(double x, double h) {
return ((double) (((double) (((double) sin(((double) (x - h)))) - ((double) sin(x)))) / h));
}



Bits error versus x



Bits error versus h
Results
Initial program 37.6
Final simplification37.6
herbie shell --seed 2020152
(FPCore (x h)
:name "(/ (- (sin (- x h)) (sin x)) h)"
:precision binary64
(/ (- (sin (- x h)) (sin x)) h))