Average Error: 14.7 → 0.4
Time: 5.4m
Precision: 64
Internal Precision: 128
\[\frac{1}{x + 1} - \frac{1}{x}\]
\[\frac{-1}{(x \cdot x + x)_*}\]

Error

Bits error versus x

Derivation

  1. Initial program 14.7

    \[\frac{1}{x + 1} - \frac{1}{x}\]
  2. Using strategy rm
  3. Applied add-sqr-sqrt14.7

    \[\leadsto \frac{1}{x + 1} - \frac{\color{blue}{\sqrt{1} \cdot \sqrt{1}}}{x}\]
  4. Applied associate-/l*14.7

    \[\leadsto \frac{1}{x + 1} - \color{blue}{\frac{\sqrt{1}}{\frac{x}{\sqrt{1}}}}\]
  5. Applied add-sqr-sqrt14.7

    \[\leadsto \frac{\color{blue}{\sqrt{1} \cdot \sqrt{1}}}{x + 1} - \frac{\sqrt{1}}{\frac{x}{\sqrt{1}}}\]
  6. Applied associate-/l*14.7

    \[\leadsto \color{blue}{\frac{\sqrt{1}}{\frac{x + 1}{\sqrt{1}}}} - \frac{\sqrt{1}}{\frac{x}{\sqrt{1}}}\]
  7. Applied frac-sub14.2

    \[\leadsto \color{blue}{\frac{\sqrt{1} \cdot \frac{x}{\sqrt{1}} - \frac{x + 1}{\sqrt{1}} \cdot \sqrt{1}}{\frac{x + 1}{\sqrt{1}} \cdot \frac{x}{\sqrt{1}}}}\]
  8. Simplified0.4

    \[\leadsto \frac{\color{blue}{-1}}{\frac{x + 1}{\sqrt{1}} \cdot \frac{x}{\sqrt{1}}}\]
  9. Simplified0.4

    \[\leadsto \frac{-1}{\color{blue}{(x \cdot x + x)_*}}\]
  10. Final simplification0.4

    \[\leadsto \frac{-1}{(x \cdot x + x)_*}\]

Reproduce

herbie shell --seed 2019088 +o rules:numerics
(FPCore (x)
  :name "2frac (problem 3.3.1)"
  (- (/ 1 (+ x 1)) (/ 1 x)))