Average Error: 0.0 → 0.0
Time: 820.0ms
Precision: binary64
\[\frac{a - b}{2 \cdot h}\]
\[\frac{a - b}{2 \cdot h}\]
\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))));
}

Error

Bits error versus a

Bits error versus b

Bits error versus h

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.0

    \[\frac{a - b}{2 \cdot h}\]
  2. Final simplification0.0

    \[\leadsto \frac{a - b}{2 \cdot h}\]

Reproduce

herbie shell --seed 2020153 
(FPCore (a b h)
  :name "(/ (- a b) (* 2 h))"
  :precision binary64
  (/ (- a b) (* 2.0 h)))