Average Error: 37.6 → 37.6
Time: 3.6s
Precision: binary64
\[\frac{\sin \left(x - h\right) - \sin x}{h}\]
\[\frac{\sin \left(x - h\right) - \sin x}{h}\]
\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));
}

Error

Bits error versus x

Bits error versus h

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 37.6

    \[\frac{\sin \left(x - h\right) - \sin x}{h}\]
  2. Final simplification37.6

    \[\leadsto \frac{\sin \left(x - h\right) - \sin x}{h}\]

Reproduce

herbie shell --seed 2020152 
(FPCore (x h)
  :name "(/ (- (sin (- x h)) (sin x)) h)"
  :precision binary64
  (/ (- (sin (- x h)) (sin x)) h))