Average Error: 14.0 → 0.1
Time: 4.2s
Precision: binary64
\[\frac{1}{x + 1} - \frac{1}{x}\]
\[\frac{1}{x + 1} \cdot \frac{-1}{x}\]

Error

Bits error versus x

Derivation

  1. Initial program 14.0

    \[\frac{1}{x + 1} - \frac{1}{x}\]
  2. Using strategy rm
  3. Applied frac-sub13.3

    \[\leadsto \color{blue}{\frac{1 \cdot x - \left(x + 1\right) \cdot 1}{\left(x + 1\right) \cdot x}}\]
  4. Simplified13.3

    \[\leadsto \frac{\color{blue}{1 \cdot \left(x - \left(x + 1\right)\right)}}{\left(x + 1\right) \cdot x}\]
  5. Using strategy rm
  6. Applied times-frac13.3

    \[\leadsto \color{blue}{\frac{1}{x + 1} \cdot \frac{x - \left(x + 1\right)}{x}}\]
  7. Simplified0.1

    \[\leadsto \frac{1}{x + 1} \cdot \color{blue}{\frac{-1}{x}}\]
  8. Final simplification0.1

    \[\leadsto \frac{1}{x + 1} \cdot \frac{-1}{x}\]

Reproduce

herbie shell --seed 2020182 
(FPCore (x)
  :name "2frac (problem 3.3.1)"
  :precision binary64
  (- (/ 1.0 (+ x 1.0)) (/ 1.0 x)))